CN110392413B - Channel scanning method and device - Google Patents

Channel scanning method and device Download PDF

Info

Publication number
CN110392413B
CN110392413B CN201910703439.3A CN201910703439A CN110392413B CN 110392413 B CN110392413 B CN 110392413B CN 201910703439 A CN201910703439 A CN 201910703439A CN 110392413 B CN110392413 B CN 110392413B
Authority
CN
China
Prior art keywords
channel
radio frequency
working
bandwidth
frequency unit
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.)
Active
Application number
CN201910703439.3A
Other languages
Chinese (zh)
Other versions
CN110392413A (en
Inventor
李丹凤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd Chengdu Branch
Original Assignee
New H3C Technologies Co Ltd Chengdu Branch
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd Chengdu Branch filed Critical New H3C Technologies Co Ltd Chengdu Branch
Priority to CN201910703439.3A priority Critical patent/CN110392413B/en
Publication of CN110392413A publication Critical patent/CN110392413A/en
Application granted granted Critical
Publication of CN110392413B publication Critical patent/CN110392413B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • H04W72/044Wireless resource allocation based on the type of the allocated resource
    • H04W72/0453Resources in frequency domain, e.g. a carrier in FDMA
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/52Allocation or scheduling criteria for wireless resources based on load

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the application provides a method and a device for scanning channels, which relate to the technical field of wireless communication, wherein the method comprises the following steps: the method comprises the steps of obtaining a channel list corresponding to a target Access Point (AP), wherein the target AP is the AP comprising a plurality of radio frequency units with the same working frequency band, then calculating at least one working bandwidth supported by each radio frequency unit according to the maximum working bandwidth and the channel bandwidth of each radio frequency unit included by the target AP, dividing channels in the channel list into at least one channel subset corresponding to the working bandwidth according to the bandwidth value of each working bandwidth, and then distributing different channel subsets to each radio frequency unit according to the first number of the channel subsets corresponding to all the working bandwidths and the second number of the radio frequency units with the same working frequency band. By adopting the method and the device, the efficiency of channel scanning can be improved.

Description

Channel scanning method and device
Technical Field
The present application relates to the field of wireless communications technologies, and in particular, to a method and an apparatus for channel scanning.
Background
With the development and popularization of wireless communication technology, the variety of network devices is increasing. Among them, an Access Point (AP) is one of the widely used network devices. The AP has the advantages of large data throughput, large number of access wireless terminals and the like, and is widely applied to places with high personnel density, such as railway stations, gymnasiums, large meeting places and the like. One AP may include a plurality of radio frequency units with an operating frequency band of 5GHz, or a plurality of radio frequency units with an operating frequency band of 2.4 GHz.
In practical applications, each rf unit is configured with a supported channel list, and the channel lists corresponding to the rf units in the same operating frequency band are usually the same. For example, if the AP includes a plurality of radio frequency units with an operating frequency band of 5GHz, the radio frequency units with the operating frequency band of 5GHz correspond to the same channel list. In the running process of the AP, each radio frequency unit scans channels included in the channel list in sequence according to the configured channel list, so as to collect data transmitted in the channels, and perform operations such as network parameter tuning, attack detection and the like according to the collected data.
However, for an AP having a plurality of radio units with the same operating frequency band, each radio unit scans all channels in the channel list, so that there is a case where each radio unit scans channels repeatedly, resulting in low efficiency of channel scanning.
Disclosure of Invention
An object of the embodiments of the present invention is to provide a method and an apparatus for channel scanning, so as to improve efficiency of channel scanning. The specific technical scheme is as follows:
in a first aspect, the present application provides a method for channel scanning, where the method includes:
acquiring a channel list corresponding to a target Access Point (AP), wherein the target AP is an AP comprising a plurality of radio frequency units with the same working frequency band;
calculating at least one working bandwidth supported by each radio frequency unit according to the maximum working bandwidth and the channel bandwidth of each radio frequency unit included in the target AP, and dividing the channels in the channel list into at least one channel subset corresponding to the working bandwidth according to the bandwidth value of each working bandwidth;
and allocating different channel subsets to each radio frequency unit according to the first number of the channel subsets corresponding to all the working bandwidths and the second number of the radio frequency units in the same working frequency band.
In a possible implementation manner, the calculating, according to the maximum operating bandwidth and the channel bandwidth of each radio frequency unit included in the target AP, at least one operating bandwidth supported by each radio frequency unit, and dividing channels in the channel list into at least one channel subset corresponding to the operating bandwidth according to a bandwidth value of each operating bandwidth includes:
calculating at least one working bandwidth supported by each radio frequency unit according to the maximum working bandwidth and the channel bandwidth of each radio frequency unit included in the target AP;
aiming at the minimum working bandwidth included in the at least one working bandwidth, dividing each channel in the channel list into a channel subset corresponding to the minimum working bandwidth;
and aiming at each working bandwidth except the minimum working bandwidth in the at least one working bandwidth, calculating the number of channels corresponding to the working bandwidth, and dividing the channels included in the channel list into a plurality of channel combinations consisting of the channels with the number of channels, wherein the channels in each channel combination are not overlapped, and each channel combination is a channel subset corresponding to the working bandwidth.
In a possible implementation manner, allocating different channel subsets to each radio frequency unit according to the first number of channel subsets corresponding to all operating bandwidths and the second number of radio frequency units in the same operating frequency band includes:
acquiring a working mode of each radio frequency unit, wherein the working mode comprises a scanning mode and a compatible mode;
if the working modes of the radio frequency units in the same working frequency band are all the same, distributing different channel subsets to each radio frequency unit according to the first number, the second number and a preset averaging algorithm;
if the working modes of the plurality of radio frequency units in the same working frequency band are not all the same, determining the radio frequency unit with the working mode as the scanning mode in the plurality of radio frequency units in the same working frequency band, and allocating different channel subsets for the radio frequency units with the scanning mode in each working mode according to the first number, the third number of the radio frequency units with the working mode as the scanning mode and the preset averaging algorithm.
In a possible implementation manner, after determining, among the plurality of radio frequency units in the same operating frequency band, that the radio frequency unit whose operating mode is the scanning mode, the method further includes:
determining a first ratio of the first number to the third number, and a second ratio of an access service duration of a working channel to a scanning duration of a single channel;
if the first ratio is larger than the second ratio, determining the product of a preset ratio and the first number to obtain a fourth number, and according to the preset averaging algorithm, allocating the fourth number of channel subsets to the radio frequency unit with the working mode being the compatible mode, and allocating other channel subsets to the radio frequency unit with the working mode being the scanning mode;
and if the first ratio is not greater than the second ratio, executing a step of allocating different channel subsets to the radio frequency units in the scanning mode for each working mode according to the first number, the third number of the radio frequency units in the scanning mode and the preset averaging algorithm.
In one possible implementation, the method further includes:
and determining a third ratio of the scanning duration to the access service duration as the preset ratio.
In a possible implementation manner, if the operating modes of the multiple radio frequency units in the same operating frequency band are all the same, allocating different channel subsets to each radio frequency unit according to the first number, the second number, and a preset averaging algorithm includes:
when the working modes of the radio frequency units in the same working frequency band are all compatible modes, determining the target number of the channel subsets distributed to each radio frequency unit according to a fourth ratio of the first number to the second number;
aiming at each radio frequency unit, determining a non-working channel subset according to a preset working channel of each radio frequency unit, wherein the working channel is a channel for providing access service;
if the target number is greater than or equal to the number of the working channels of the radio frequency unit, allocating a fifth number of non-working channel subsets and the current working channel of the radio frequency unit to the radio frequency unit, wherein the fifth number is the difference between the target number and the number of the working channels of the radio frequency unit.
In a second aspect, the present application provides an apparatus for channel scanning, the apparatus comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a channel list corresponding to a target Access Point (AP), and the target AP is an AP comprising a plurality of radio frequency units with the same working frequency band;
a dividing module, configured to calculate at least one working bandwidth supported by each radio frequency unit according to a maximum working bandwidth and a channel bandwidth of each radio frequency unit included in the target AP, and divide a channel in the channel list into at least one channel subset corresponding to the working bandwidth according to a bandwidth value of each working bandwidth;
and the allocation module is used for allocating different channel subsets to each radio frequency unit according to the first number of the channel subsets corresponding to all the working bandwidths and the second number of the radio frequency units in the same working frequency band.
In a possible implementation manner, the dividing module is specifically configured to:
calculating at least one working bandwidth supported by each radio frequency unit according to the maximum working bandwidth and the channel bandwidth of each radio frequency unit included in the target AP;
aiming at the minimum working bandwidth included in the at least one working bandwidth, dividing each channel in the channel list into a channel subset corresponding to the minimum working bandwidth;
and aiming at each working bandwidth except the minimum working bandwidth in the at least one working bandwidth, calculating the number of channels corresponding to the working bandwidth, and dividing the channels included in the channel list into a plurality of channel combinations consisting of the channels with the number of channels, wherein the channels in each channel combination are not overlapped, and each channel combination is a channel subset corresponding to the working bandwidth.
In a possible implementation manner, the allocation module is specifically configured to:
acquiring a working mode of each radio frequency unit, wherein the working mode comprises a scanning mode and a compatible mode;
if the working modes of the radio frequency units in the same working frequency band are all the same, distributing different channel subsets to each radio frequency unit according to the first number, the second number and a preset averaging algorithm;
if the working modes of the plurality of radio frequency units in the same working frequency band are not all the same, determining the radio frequency unit with the working mode as the scanning mode in the plurality of radio frequency units in the same working frequency band, and allocating different channel subsets for the radio frequency units with the scanning mode in each working mode according to the first number, the third number of the radio frequency units with the working mode as the scanning mode and the preset averaging algorithm.
In one possible implementation, the apparatus further includes: a determination module;
the determining module is configured to determine a first ratio of the first number to the third number, and a second ratio of an access service duration of a working channel to a scanning duration of a single channel;
the allocating module is further configured to determine, if the first ratio is greater than the second ratio, a product of a preset ratio and the first number to obtain a fourth number, allocate, according to the preset averaging algorithm, the fourth number of channel subsets to the radio frequency unit whose operating mode is the compatible mode, and allocate other channel subsets to the radio frequency unit whose operating mode is the scanning mode;
the allocating module is further configured to, if the first ratio is not greater than the second ratio, execute a step of allocating different channel subsets to the radio frequency units in the scan mode in each working mode according to the first number, the third number of the radio frequency units in the scan mode in the working mode, and the preset averaging algorithm.
In a possible implementation manner, the determining module is further configured to determine a third ratio of the scanning duration to the access service duration as the preset ratio.
In a possible implementation manner, the allocation module is specifically configured to:
when the working modes of the radio frequency units in the same working frequency band are all compatible modes, determining the target number of the channel subsets distributed to each radio frequency unit according to a fourth ratio of the first number to the second number;
aiming at each radio frequency unit, determining a non-working channel subset according to a preset working channel of each radio frequency unit, wherein the working channel is a channel for providing access service;
if the target number is greater than or equal to the number of the working channels of the radio frequency unit, allocating a fifth number of non-working channel subsets and the current working channel of the radio frequency unit to the radio frequency unit, wherein the fifth number is the difference between the target number and the number of the working channels of the radio frequency unit.
In a third aspect, a network device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of the first aspect when executing a program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when executed by a processor, the computer program implements the method steps of any of the first aspects.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect described above.
In the channel scanning method and apparatus provided in the embodiment of the present application, the network device may obtain a channel list corresponding to the target AP, then calculate at least one working bandwidth supported by each radio frequency unit according to the maximum working bandwidth and the channel bandwidth of each radio frequency unit included in the target AP, divide the channels in the channel list into at least one channel subset corresponding to the working bandwidth according to the bandwidth value of each working bandwidth, and then allocate different channel subsets to each radio frequency unit according to the first number of the channel subsets corresponding to all the working bandwidths and the second number of the radio frequency units in the same working frequency band. Compared with the prior art that each radio frequency unit needs to scan all channels in the channel list, in the embodiment of the application, the channels in the channel list are divided into a plurality of channel subsets, so that different radio frequency units scan different channel subsets, the situation that each radio frequency unit scans repeatedly is avoided, and the channel scanning efficiency can be improved.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a networking architecture according to an embodiment of the present application;
fig. 2 is a flowchart of a channel scanning method according to an embodiment of the present application;
fig. 3 is a flowchart of another channel scanning method provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a channel scanning apparatus according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a network device according to an embodiment of the present application.
Detailed Description
The technical solutions in 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 obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a channel scanning method, which can be applied to network equipment.
In an implementation manner, as shown in fig. 1, a net may be provided with a fit (thin) AP and an Access Controller (Access Controller, abbreviated as AC), and in this case, the method for channel scanning provided in this embodiment may be applied to an AC, after the AC allocates a scanning channel to each radio frequency unit in the fit AP, the AC may send the scanning channel allocated to each radio frequency unit in the fit AP to the fit AP in a manner of issuing configuration information, and each radio frequency unit in the fit AP may scan the scanning channel allocated to the radio frequency unit according to the AC.
In another implementation, fat APs may be provided in the network. In this case, the channel scanning method provided in this embodiment of the present application may be applied to a fat AP, where the fat AP may allocate a scanning channel to its own radio frequency unit, and then each radio frequency unit in the fat AP performs channel scanning according to the scanning channel allocated to the radio frequency unit.
In this embodiment, the network device may obtain a channel list corresponding to the target AP, divide channels in the channel list into a plurality of channel subsets according to the maximum operating bandwidth of each radio frequency unit included in the target AP, and allocate different channel subsets to each radio frequency unit according to the first number of the channel subsets and the second number of the plurality of radio frequency units in the same operating frequency band, so that each radio frequency unit scans different channel subsets. Therefore, the situation that the AP repeatedly scans the same channel subset can be avoided, and the channel scanning efficiency is improved.
The method for channel scanning provided by the embodiment of the present application will be described in detail below with reference to specific embodiments, and as shown in fig. 2, the method specifically includes the following steps.
Step 201, a channel list corresponding to a target access point AP is obtained.
The target AP is an AP including a plurality of radio frequency units with the same operating frequency band, for example, the target AP may include a plurality of radio frequency units with an operating frequency band of 5 GHz.
The channel list is composed of channels in which the radio frequency unit works, and the channels in which the radio frequency unit works correspond to the working frequency band of the radio frequency unit. According to the current WLAN standard protocol, a 2.4GHz band is divided into 13 channels, and the bandwidth of each channel is 20MHz, that is, a channel list corresponding to a 2.4GHz radio frequency unit includes 13 channels. In addition, the 5GHz band is divided into 24 channels with a bandwidth of 20MHz, but the number of channels currently used in an open mode does not reach 24, and in this embodiment, the channel list corresponding to the radio frequency unit with 5GHz includes the currently used 5GHz channel in an open mode.
It can be understood that, if the operating frequency band of the AP is 5GHz, the obtained channel list is a 5GHz channel list, and if the operating frequency band of the AP is 2.4GHz, the obtained channel list is a 2.4GHz channel list.
Step 202, calculating at least one working bandwidth supported by each radio frequency unit according to the maximum working bandwidth and the channel bandwidth of each radio frequency unit included in the target AP, and dividing the channels in the channel list into at least one channel subset corresponding to the working bandwidth according to the bandwidth value of each working bandwidth.
In this embodiment, each radio unit is configured with a maximum operating bandwidth. The current operating bandwidth of the radio frequency unit generally includes four types, namely 20M, 40M, 80M and 160M. Since the bandwidth of one channel is 20M, the 20M bandwidth is a bandwidth including 1 channel, the 40M bandwidth is a bandwidth including 2 channels, the 80M bandwidth is a bandwidth including 4 channels, and the 160M bandwidth is a bandwidth including 8 channels.
It can be understood that if the maximum operating bandwidth of the radio frequency unit is 20M, it means that the radio frequency unit supports 20M operating bandwidths; if the maximum working bandwidth of the radio frequency unit is 40M, the radio frequency unit supports two working bandwidths of 40M and 20M; if the maximum working bandwidth of the radio frequency unit is 80M, it indicates that the radio frequency unit supports three working bandwidths of 80M, 40M, and 20M; if the maximum operating bandwidth of the radio frequency unit is 160M, it indicates that the radio frequency unit supports four operating bandwidths of 160M, 80M, 40M, and 20M.
In the art, a channel that can be bonded refers to bonding a plurality of independent channels together as one channel, for example, bonding two channels with 20M bandwidth together as one channel with 40M bandwidth for use by a radio unit. In the embodiment of the present application, if a subset of channels includes a plurality of bonded channels, the plurality of bonded information may be referred to as a channel combination. For each channel, the protocol specifies whether the channel can be bonded and the channels that can be bonded, which is not limited in this application.
In one possible implementation, for each operating bandwidth, the network device may divide the channels in the channel list into at least one channel subset corresponding to the operating bandwidth according to the channels that can be bound in the channel list, and the maximum operating bandwidth and channel bandwidth of each radio frequency unit included in the target AP.
Wherein each channel subset comprises an independent channel or comprises a plurality of bonded channels, and the plurality of bonded channels included in the channel subset can be scanned by at least one radio unit included in the target AP.
Specifically, the method of dividing the information subsets is as follows.
Firstly, at least one working bandwidth supported by each radio frequency unit is calculated according to the maximum working bandwidth and the channel bandwidth of each radio frequency unit included in the target AP.
Then, for a minimum operating bandwidth included in at least one operating bandwidth, each channel in the channel list is divided into a channel subset corresponding to the minimum operating bandwidth. The minimum operating bandwidth is 20M, that is, each channel in the channel list is divided into a channel subset.
Aiming at each working bandwidth except the minimum working bandwidth in at least one working bandwidth, calculating the number of channels corresponding to the working bandwidth, and dividing the channels included in the channel list into a plurality of channel combinations formed by the channels with the number of channels, wherein the channels in each channel combination are not overlapped, and each channel combination is a channel subset corresponding to the working bandwidth.
The number of channels corresponding to the working bandwidth is a ratio of the working bandwidth to a minimum working bandwidth, for example, if the working bandwidth is 40M, the number of channels corresponding to the working bandwidth is 2. If the working bandwidth is 80M, the number of channels corresponding to the working bandwidth is 4.
In the embodiment of the present application, the channels included in each divided channel combination are channels capable of being bonded.
For ease of understanding, the principle of partitioning subsets of channels is described in connection with a hypothetical example.
Assume that the channel list includes 5 channels, channel 1, channel 2, channel 3, channel 4, and channel 5, where channel 1 and channel 2 can be bonded, channel 3 and channel 4 can be bonded, and channel 1, channel 2, channel 3, and channel 4 can be bonded, as specified by the protocol.
If the maximum operating bandwidths of the radio frequency units included in the target AP are respectively 80M, 40M, and 20M, it may be determined that the operating bandwidths of the radio frequency units include three types, namely, 80M, 40M, and 20M, and further, the channel subsets may be divided according to the three types of bandwidths.
In the channel list, the channels with the total channel bandwidth of 20M include: channel 1, channel 2, channel 3, channel 4, and channel 5, where the 5 channels respectively form a channel subset, referred to as channel subset 1 to channel subset 5, respectively, and are available for scanning by radio frequency units with maximum operating bandwidths of 20M, 40M, or 80M.
The channel with the total bandwidth of 40M comprises the following components: a combination of channel 1 and channel 2, a combination of channel 3 and channel 4, i.e. one of the channel subsets comprises channel 1 and channel 2, which may be referred to as channel subset 6; another subset of channels includes channel 3 and channel 4, which may be referred to as channel subset 7. The channel subset 6 and the channel subset 7 can be scanned by the radio frequency unit with the maximum working bandwidth of 40M or 80M.
The channel with the total bandwidth of 80M comprises the following components: the combination of channel 1, channel 2, channel 3, and channel 4, i.e., the inclusion of channel 1, channel 2, channel 3, and channel 4 in a subset of channels, may be referred to as a subset of channels 8. Channel subset 8 is available for scanning by radio units having a maximum operating bandwidth of 80M.
It can be seen that the channel list is divided into 8 channel subsets by the above-described division process.
Step 203, allocating different channel subsets to each radio frequency unit according to the first number of the channel subsets corresponding to all the working bandwidths and the second number of the radio frequency units in the same working frequency band.
In step 202, the first number of all the divided channel subsets may be determined, and the network device may determine the second number of the radio frequency units having the same operating frequency band in the target AP according to the configuration information of the target AP.
For example, if the network device is a target AP, the configuration information of the target AP itself includes the number of radio frequency units of the same working frequency band; if the network device is an AC, the AC includes configuration information of each AP connected to the AC, that is, configuration information of the target AP, and further acquires the number of radio frequency units in the same operating frequency band from the configuration information of the target AP.
Optionally, the network device may allocate the channel subsets to each radio frequency unit in various manners, for example, the network device may calculate a ratio (taking an integer) of the first number to the second number to obtain an average number of the channel subsets that each radio frequency unit needs to scan, and averagely allocate the channel subsets included in the channel list to each radio frequency unit according to the average number. If there is a remainder after dividing the first number by the second number, that is, there is a remaining channel subset after being allocated according to the average number, the channel subset may be further allocated, for example, randomly allocated to each rf unit, or allocated to each rf unit according to a certain order.
For example, if the first number of the channel subsets is 8 and the second number of the radio frequency units in the same operating frequency band is 5, each radio frequency unit may be respectively allocated one channel subset according to an integer ratio 1 between the first number and the second number, and for the remaining 3 channel subsets, the allocation of 3 radio frequency units may be randomly selected, or may be allocated according to an order from a large maximum operating bandwidth to a small maximum operating bandwidth of the radio frequency units.
It can be seen that, by using the channel scanning method provided in this embodiment of the present application, the network device may obtain a channel list corresponding to the target AP, then calculate at least one working bandwidth supported by each radio frequency unit according to the maximum working bandwidth and the channel bandwidth of each radio frequency unit included in the target AP, divide the channels in the channel list into at least one channel subset corresponding to the working bandwidth according to the bandwidth value of each working bandwidth, and then allocate different channel subsets to each radio frequency unit according to the first number of the channel subsets corresponding to all the working bandwidths and the second number of the radio frequency units in the same working frequency band. Compared with the prior art that each radio frequency unit needs to scan all channels in the channel list, in the embodiment of the application, the channels in the channel list are divided into a plurality of channel subsets, so that different radio frequency units scan different channel subsets, the situation that each radio frequency unit scans repeatedly is avoided, and the channel scanning efficiency can be improved.
In another implementation, the network device may allocate the channel subsets using different allocation policies according to different operation modes (i.e. whether to provide access services) adopted by each radio frequency unit, as shown in fig. 3, and the specific processing procedure may include the following steps.
Step 301, determining the working mode of each radio frequency unit.
In the embodiment of the present application, each rf unit may have different operating modes, where the operating modes include a scanning mode and a compatible mode. When the radio frequency unit works in the scanning mode, the radio frequency unit only scans channels and does not provide access service. When the radio frequency unit works in the compatible mode, the radio frequency unit not only performs channel scanning, but also provides access service. The network device may determine the operating mode of each radio frequency unit according to the configuration information of each radio frequency unit, and determine whether the operating modes of the radio frequency units are all the same.
If the operating modes of the plurality of radio frequency units in the same operating frequency band are all the same, different channel subsets can be allocated to each radio frequency unit according to the first number, the second number and a preset averaging algorithm.
It can be understood that, if the operating modes of the plurality of radio frequency units in the same operating frequency band are the same, the operating modes of the plurality of radio frequency units in the same operating frequency band are all scanning modes, or the operating modes of the plurality of radio frequency units in the same operating frequency band are all compatible modes.
In a possible implementation manner, no matter the operating modes of the plurality of radio frequency units in the same operating frequency band are all scanning modes, or the operating modes of the plurality of radio frequency units in the same operating frequency band are all compatible modes, the channel subsets can be evenly distributed to each radio frequency unit according to the preset averaging algorithm.
In this embodiment of the present application, if the operating modes of multiple radio frequency units in the same operating frequency band are all the same, it may be considered that the scanning capabilities of the radio frequency units are balanced, and at this time, the channel subsets may be averagely allocated to each radio frequency unit according to a preset averaging algorithm.
In another possible implementation manner, if the working modes of the plurality of radio frequency units in the same working frequency band are all scanning modes, the channel subsets are averagely allocated to each radio frequency unit according to a preset averaging algorithm; if the operating modes of the plurality of radio frequency units in the same operating frequency band are all compatible modes, step 302 to step 304 may be performed.
If the operating modes of the plurality of rf units in the same operating frequency band are not all the same, steps 305 to 308 may be executed.
The preset equalization algorithm according to the embodiment of the present application means that, if a ratio of the first number to the second number is an integer, the same number of channel subsets are allocated to each radio frequency unit according to the ratio of the first number to the second number. If the ratio of the first number to the second number is not an integer, determining a quotient and a remainder obtained by dividing the first number and the second number, allocating the same number of channel subsets to each radio frequency unit according to the determined quotient, and then randomly allocating the number of channel subsets corresponding to the remainder to different radio frequency units, or allocating the number of channel subsets to different radio frequency units according to a certain sequence.
For example, the network device may calculate a ratio (taking an integer) of the first number to the second number, obtain an average number of channel subsets that each radio frequency unit needs to scan, and distribute the channel subsets included in the channel list to each radio frequency unit according to the average number. If there is a remainder after dividing the first number by the second number, that is, there is a remaining subset of channels after being allocated according to the average number, the subset of channels may be further allocated, for example, randomly allocated.
Optionally, the network device may also allocate a subset of channels to each radio frequency unit according to the number of each subset of channels and the number of the radio frequency unit. The specific calculation process may be as follows:
assuming that the total number of channel subsets is n, the number of the channel subsets is 1-n, the total number of the radio frequency units is m, and the number of the radio frequency units is 1-m, the number of the channel subsets to be scanned by the radio frequency unit j (1 ≦ j ≦ m) is Dji, which can be calculated by the following formula, wherein i represents the ith channel subset (1 ≦ i ≦ n).
Let n/m be p (i.e., positive part); n% m ═ q (i.e. remainder portion),
then i takes the value: [ (j-1) × p +1, j × p ] < U.m × p + j (j ≦ q)
[(j-1)*p+1,j*p](j>q)
For example, if n is 13, m is 3, p is 4, and q is 1
When j is 1, i takes the value of [1,4], {13}, then Dji includes 1 st to 4 th channel subsets, and 13 th channel subset;
when j is 2, i takes on the value [5,8], and Dji includes the 5 th to 8 th channel subsets;
when j is 3, i takes on the value of [9,12], and Dji includes the 9 th to 12 th channel subsets.
Step 302, when the operating modes of the plurality of radio frequency units in the same operating frequency band are all compatible modes, determining the target number of the channel subsets allocated to each radio frequency unit according to a fourth ratio of the first number of the channel subsets to the second number of the radio frequency units in the same operating frequency band.
After the network device determines the first number and the second number, a ratio (which may be referred to as a fourth ratio) between the first number and the second number may be calculated, and then a target number of the channel subsets allocated to each radio frequency unit may be determined according to the fourth ratio. For example, if there is no remainder after division, the fourth ratio is used as the target number, and if there is a remainder, the target number corresponding to each rf unit can be determined by referring to the above formula.
For example, if the first number is 20 and the second number is 4, it may be determined that the fourth ratio is 20/4 ═ 5, that is, the target number is 5, and 5 channel subsets may be allocated to each radio unit.
If the first number is 20 and the second number is 7, it can be determined that there is a remainder after dividing the first number by the second number, and the target number corresponding to each rf unit can be determined according to the above formula.
Step 303, for each radio frequency unit, determining a non-working channel subset according to a preset working channel of each radio frequency unit.
In the embodiment of the present application, for the radio frequency units whose operating modes are compatible modes, the operating channel corresponding to each radio frequency unit has been configured in advance. The working channel may be an independent channel (i.e. 20M bandwidth channel), or may be a plurality of channels that are bound (e.g. two 20M bandwidth channels that are bound, and the bound channel is regarded as a working channel), and may be understood as a subset of the channels in the channel list.
The working channel of each radio frequency unit is a channel for providing an access service, that is, the radio frequency unit provides the access service by using the working channel. For a radio unit, the channels other than the working channel are non-working channels of the radio unit, and the radio unit can scan the non-working channels but does not provide access service by using the non-working channels.
In the channel subsets divided in the embodiment of the present application, for one radio frequency unit, the channel subsets other than the working channel subset are non-working channel subsets. Wherein the working channel subset is a channel subset including working channels. For example, if the operating channels of a radio frequency unit are bonded channel 1 and channel 2, then for the radio frequency unit, the subset of channels including bonded channel 1 and channel 2 is the operating channel subset. The subset of channels that includes only channel 1 and the subset of channels that includes only channel 2 are non-operating subsets of channels for the radio unit. But only the channel subset of channel 1 and only the channel subset of channel 2 may be the working channel subset of other radio units, and in particular the settings of the other radio units for the working channels.
Step 304, if the target number is greater than or equal to the number of working channels of the radio frequency unit, allocating a fifth number of non-working channel subsets and the current working channel of the radio frequency unit to the radio frequency unit.
Wherein the fifth number is a difference between the target number and the number of the working channels of the radio frequency unit.
For example, if it is determined through a predetermined averaging algorithm that the target number of the channel subsets to be allocated to the radio frequency unit is 5 and the number of the working channels of the radio frequency unit is 1, it may be determined that the fifth number is 4, that is, the radio frequency unit needs to scan 1 working channel subset of itself and 4 non-working channel subsets.
The number of working channels of the radio frequency unit is generally 1, and generally, the target number is greater than or equal to the number of working channels of the radio frequency unit, and the radio frequency unit preferentially scans the working channels of the radio frequency unit.
If the target number is smaller than the number of the working channels of the radio frequency unit, that is, the target number is 0, in this case, the channel subset which needs to be scanned may not be allocated to the radio frequency unit, that is, the radio frequency unit does not need to scan the channel subset; or, the radio frequency unit is allocated with its own working channel, that is, the radio frequency unit scans its own working channel, randomly selects one other radio frequency unit, and reduces the number of targets corresponding to the selected radio frequency unit by 1.
Because the access service needs a corresponding working channel, when the scanning channel of each radio frequency unit is allocated, the working channel is preferentially allocated to the radio frequency unit, so that the radio frequency unit can be prevented from switching between the working channel and the scanning channel, and the working efficiency of the radio frequency unit is improved.
Step 305, if the working modes of the plurality of radio frequency units in the same frequency band are not all the same, determining that the working mode is a radio frequency unit in a scanning mode in the plurality of radio frequency units in the same working frequency band.
In one embodiment, after determining that the radio frequency unit with the working mode being the scanning mode, the network device may allocate a different channel subset to the radio frequency unit with the scanning mode for each working mode according to the first number of channel subsets, the third number of radio frequency units with the working mode being the scanning mode, and a preset averaging algorithm.
Alternatively, in another embodiment, step 306 may be executed after step 305, and it may be determined whether to allocate a subset of channels for the radio units in the scan mode and the compatible mode according to a certain ratio.
Step 306, a first ratio of the first number to the third number and a second ratio of the access service duration of the working channel to the scanning duration of the single channel are determined.
The access service duration and the scanning duration are both preset values, and the network equipment can acquire the access service duration and the scanning duration from the configuration information of the target AP.
In this embodiment of the application, after obtaining the first number and the third number, the network device may calculate a ratio (i.e., a first ratio) between the first number and the third number, and similarly, after obtaining the access service duration and the scanning duration, the network device may calculate a ratio (i.e., a second ratio) between the access service duration and the scanning duration.
For example, assuming that there are m identical radio frequency units, where x are radio frequency units in the compatible mode, y are radio frequency units in the scanning mode, the total number of the subsets of channels to be scanned is z, the access service duration of the working channel is T1, and the scanning duration of a single channel is T2, the network device may calculate a second ratio: T1/T2, and a first ratio: z/y.
Step 307, if the first ratio is greater than the second ratio, determining a product of the preset ratio and the first number to obtain a fourth number, allocating channel subsets of the fourth number to the radio frequency units with the working modes being compatible modes according to a preset averaging algorithm, and allocating other channel subsets to the radio frequency units with the working modes being scanning modes.
In the embodiment of the present application, the second ratio (i.e., T1/T2) may represent the number of channel subsets that can be scanned in T1, and the first ratio (i.e., z/y) may represent the number of channel subsets that each scan mode rf unit needs to scan if only scan through the scan mode rf units.
The network device determines how to allocate the subset of channels by comparing the first ratio to the second ratio.
If the first ratio is greater than the second ratio, that is, (z/y) > (T1/T2), indicating that the radio frequency unit in the scanning mode cannot scan all the channel subsets to be scanned in T1, the network device may calculate a product of the preset ratio and the first number to obtain a fourth number, then, according to the preset averaging algorithm described above, allocate the fourth number of channel subsets to the radio frequency unit whose operation mode is the compatible mode, and allocate the other channel subsets except for the channel subsets in the fourth number to the radio frequency unit whose operation mode is the scanning mode.
In this embodiment, the purpose of setting the preset ratio is to enable the radio frequency units in the same operating frequency band to cooperate to complete the scanning of the channel subset in the shortest possible time. Optionally, the preset ratio may be a ratio set according to an actual situation, or a third ratio of the scanning duration to the access service duration may also be determined as the preset ratio. That is, the preset ratio p is T2/T1.
And 308, if the first ratio is not greater than the second ratio, allocating different channel subsets to the radio frequency units in the scanning mode for each working mode according to the first number, the third number of the radio frequency units in the scanning mode and a preset averaging algorithm.
In this embodiment of the application, if the first ratio is not greater than the second ratio, that is, (T1/T2) ≧ z/y), which indicates that, in T1, the radio frequency unit in the scan mode can scan all the channel subsets to be scanned, and the network device may determine that the radio frequency in the compatible mode does not allocate a scan channel, but only performs access, and at this time, only allocates a channel subset for the radio frequency unit in the scan mode. Thus, access can be guaranteed, and the scanning effect can be guaranteed.
Thus, when the radio frequency unit partially operates in the compatible mode and partially operates in the scanning mode, because the unit channel scanning capability of the scanning mode is higher than that of the radio frequency unit in the compatible mode, when the channel is allocated, the characteristic that the radio frequency unit operating in the compatible mode has relatively weaker scanning capability can be considered, and when the channel subset is allocated, the scanning channel is not allocated or is allocated less to the radio frequency unit in the compatible mode, so that the efficiency of finishing channel scanning by cooperation of different radio frequency units is ensured.
For the radio frequency units in the same operating frequency band, the maximum operating bandwidth of each radio frequency unit is usually the same, and therefore, the allocation of the channel subset may be performed according to the above-mentioned process. However, in some cases, the maximum operating bandwidth of each rf unit may not be all the same, and in this case, the network device needs to consider the maximum operating bandwidth of each rf unit when allocating the subset of channels for each rf unit.
Wherein, the radio frequency unit with the maximum working bandwidth of 80M can scan the channel subsets with the total channel bandwidth of 80M, 40M and 20M respectively; the radio frequency unit with the maximum working bandwidth of 40M can scan channel subsets with the total channel bandwidth of 40M and 20M, but cannot scan the channel subsets with the total channel bandwidth of 80M; the radio frequency unit with the maximum working bandwidth of 20M can only scan the channel subset with the total channel bandwidth of 20M. For convenience of description, in the channel list, the number of channel subsets with a total channel bandwidth of 20M may be denoted as N1, the number of channel subsets with a total channel bandwidth of 40M may be denoted as N2, and the number of channel subsets with a total channel bandwidth of 80M may be denoted as N3, and in general, N1> N2> N3.
In one implementation, the network device may determine a radio frequency unit with a maximum operating bandwidth of 80M, and for each determined radio frequency unit with the maximum operating bandwidth of 80M, the network device may preferentially allocate a channel subset with a total channel bandwidth of 80M to the radio frequency unit. As can be seen from the above example in step 202, each subset of channels with a total bandwidth of 80M includes four channels that can be bonded.
The specific allocation method is as follows.
After the network device determines the number (which may be denoted as M) of the channel subsets allocated to the radio frequency unit, if the total number M1< M of the channel subsets with the total channel bandwidth of 80M, then M1 channel subsets with the total channel bandwidth of 80M are allocated to the radio frequency unit, and since after all the M1 channel subsets with the total channel bandwidth of 80M are allocated to the radio frequency unit, the number of the channel subsets allocated to the radio frequency unit does not yet reach the number M of the channel subsets that should be allocated to the radio frequency unit, so that M-M1 channel subsets with the total channel bandwidth lower than 80M may also be allocated to the radio frequency unit. For example, if M is 5 and M1 is 3, if two channel subsets with a total channel bandwidth of 40M and 5 channel subsets with a total channel bandwidth of 20M are included in addition to the channel subset with a total channel bandwidth of 80M, two channel subsets with a total channel bandwidth of 40M, or 1 channel subset with a total channel bandwidth of 40M and 1 channel subset with a total channel bandwidth of 20M, or two channel subsets with a total channel bandwidth of 20M may be reallocated to the radio unit.
If M1> M, it is described that after M channel subsets with total channel bandwidth of 80M are allocated to the radio frequency unit with maximum operating bandwidth of 80M, channel subsets with total channel bandwidth of 80M remain unallocated, so that it can be determined whether there are other radio frequency units with maximum operating bandwidth of 80M. If so, allocating channel subsets with the total channel bandwidth of 80M to the radio frequency unit according to the determined number of the channel subsets to be allocated to the radio frequency unit. Similarly, if the number of the channel subsets to be allocated to the radio frequency unit is not yet reached after all the channel subsets with the remaining channel total bandwidth of 80M are allocated to the radio frequency unit, the channel subsets with the channel total bandwidth of 40M and/or 20M are continuously allocated to the radio frequency unit, for example, the channel subset with the channel total bandwidth of 40M may be preferentially allocated to the radio frequency unit, or the channel subset with the channel total bandwidth of 40M or 20M may be randomly allocated to the radio frequency unit; or, if there is a channel subset with the total channel bandwidth of 80M that is not allocated after allocating a channel subset with the total channel bandwidth of 80M to the radio frequency unit according to the number of channel subsets that should be allocated to the radio frequency unit, continuing to determine whether there are other radio frequency units with the maximum operating bandwidth of 80M until the channel subset with the total channel bandwidth of 80M is allocated. Similarly, the network device may also determine a channel subset with a maximum operating bandwidth of 40M, and preferentially allocate a channel subset with a total channel bandwidth of 40M to the radio frequency unit with the maximum operating bandwidth of 40M.
In one example, taking 2 rf units as an example, the maximum operating bandwidth of the rf unit 1 is 40M, and the maximum operating bandwidth of the rf unit 2 is 20M. Assuming that the number of channel subsets with a total channel bandwidth of 20M is x, and the number of channel subsets with a total channel bandwidth of 40M is y, then the channel subsets with a total channel bandwidth of 40M may be allocated to radio unit 1, and the channel subsets with a total channel bandwidth of 20M are equally divided among 2 radio units.
Optionally, the scanning duration required for each channel subset may also be considered in the allocation. Suppose that the scanning duration of the channel subset with the total channel bandwidth of 20M is t1, and the scanning duration of the channel subset with the total channel bandwidth of 40M is t 2.
Let q be x-y t2/t1, q is used to represent the size relationship between the time required for the radio unit 1 with the maximum operating bandwidth of 40M to scan the y channel subsets with the total bandwidth of 40M and the time required for the radio unit 2 with the maximum operating bandwidth of 20M to scan the x channel subsets.
If q ≦ 1, the time required for the radio unit 1 with the maximum operating bandwidth of 40M to scan the y channel subsets with the total bandwidth of 40M, and the time required for the radio unit 2 with the maximum operating bandwidth of 20M to scan the x channel subsets, are described, and since the channel subsets with the total bandwidth of 40M cannot be scanned by the radio unit 2 with the maximum operating bandwidth of 20M, the radio unit 1 is allocated with the y channel subsets with the total bandwidth of 40M, and the radio unit 2 is allocated with the x channel subsets with the total bandwidth of 20M.
If q >1, it indicates that the time required for the radio frequency unit 1 with the maximum operating bandwidth of 40M to scan y channel subsets with the total bandwidth of 40M is less than the time required for the radio frequency unit 2 with the maximum operating bandwidth of 20M to scan x channel subsets, in order to shorten the time required for scanning all the channel subsets, the radio frequency unit 1 may scan a part of more channel subsets, specifically, y channel subsets with the total bandwidth of 40M may be allocated to the radio frequency unit 1, x-q channel subsets with the total bandwidth of 20M may be allocated to the radio frequency unit 2, and q channel subset channels with the total bandwidth of 20M are equally divided between the radio frequency unit 1 and the radio frequency unit 2.
For example, x is 14, y is 6, t1 is 100ms, t2 is 200ms, and q is 14-6 is 2>1, 6 channel subsets with a total bandwidth of 40M are allocated to the radio unit 1, 12 channel subsets with a total bandwidth of 20M are allocated to the radio unit 2, and 2 channel subsets with a total bandwidth of 20M are allocated to both the radio unit 1 and the radio unit 2. In this way, the time duration consumed by the radio unit 1 and the radio unit 2 to scan the channel subsets can be made the same.
Based on the same technical concept, an embodiment of the present application further provides an apparatus for channel scanning, where the apparatus is applied to a network device, and as shown in fig. 4, the apparatus includes: an acquisition module 401, a partitioning module 402 and an allocation module 403.
An obtaining module 401, configured to obtain a channel list corresponding to a target access point AP, where the target AP is an AP including multiple radio frequency units in the same working frequency band;
a dividing module 402, configured to calculate at least one working bandwidth supported by each radio frequency unit according to a maximum working bandwidth and a channel bandwidth of each radio frequency unit included in the target AP, and divide a channel in the channel list into at least one channel subset corresponding to the working bandwidth according to a bandwidth value of each working bandwidth;
the allocating module 403 is configured to allocate different channel subsets to each radio frequency unit according to the first number of channel subsets corresponding to all operating bandwidths and the second number of radio frequency units in the same operating frequency band.
Optionally, the dividing module 402 is specifically configured to:
calculating at least one working bandwidth supported by each radio frequency unit according to the maximum working bandwidth and the channel bandwidth of each radio frequency unit included in the target AP;
aiming at least one working bandwidth comprising the minimum working bandwidth, dividing each channel in a channel list into a channel subset corresponding to the minimum working bandwidth;
aiming at each working bandwidth except the minimum working bandwidth in at least one working bandwidth, calculating the number of channels corresponding to the working bandwidth, and dividing the channels included in the channel list into a plurality of channel combinations formed by the channels with the number of channels, wherein the channels in each channel combination are not overlapped, and each channel combination is a channel subset corresponding to the working bandwidth.
Optionally, the allocating module 403 is specifically configured to:
acquiring the working mode of each radio frequency unit, wherein the working mode comprises a scanning mode and a compatible mode;
if the working modes of a plurality of radio frequency units in the same working frequency band are all the same, distributing different channel subsets to each radio frequency unit according to the first number, the second number and a preset averaging algorithm;
if the working modes of the plurality of radio frequency units in the same working frequency band are not all the same, determining the radio frequency units with the working modes as scanning modes in the plurality of radio frequency units in the same working frequency band, and allocating different channel subsets to the radio frequency units with the scanning modes in each working mode according to the first number, the third number of the radio frequency units with the working modes as the scanning modes and a preset averaging algorithm.
Optionally, the apparatus further comprises: a determination module;
a determining module, configured to determine a first ratio between the first number and the third number, and a second ratio between an access service duration of the working channel and a scanning duration of the single channel;
the allocating module 403 is further configured to determine, if the first ratio is greater than the second ratio, a product of a preset ratio and the first number to obtain a fourth number, allocate, according to a preset averaging algorithm, the fourth number of channel subsets to the radio frequency units whose operating modes are compatible modes, and allocate other channel subsets to the radio frequency units whose operating modes are scanning modes;
the allocating module 403 is further configured to, if the first ratio is not greater than the second ratio, execute a step of allocating a different channel subset to the radio frequency unit in the scanning mode for each operating mode according to the first number, the third number of the radio frequency units in the scanning mode, and a preset averaging algorithm.
Optionally, the determining module is further configured to determine a third ratio of the scanning duration to the access service duration as a preset ratio.
Optionally, the allocating module 403 is specifically configured to:
when the working modes of the radio frequency units in the same working frequency band are all compatible modes, determining the target number of the channel subsets distributed to each radio frequency unit according to a fourth ratio of the first number to the second number;
aiming at each radio frequency unit, determining a non-working channel subset according to a preset working channel of each radio frequency unit, wherein the working channel is a channel for providing access service;
if the target number is greater than or equal to the number of the working channels of the radio frequency unit, a fifth number of non-working channel subsets and the current working channels of the radio frequency unit are allocated to the radio frequency unit, wherein the fifth number is the difference between the target number and the number of the working channels of the radio frequency unit.
The embodiment of the present application further provides a network device, as shown in fig. 5, which includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501 is configured to implement the steps executed by the network device in the foregoing method embodiments when executing the program stored in the memory 503.
The communication bus mentioned in the network device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the network device and other devices.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, or discrete hardware components.
Based on the same technical concept, embodiments of the present application further provide a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the above method steps for channel scanning.
Based on the same technical concept, embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, causes the computer to perform the above-mentioned method steps of channel scanning.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, 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, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (14)

1. A method of channel scanning, the method comprising:
acquiring a channel list corresponding to a target Access Point (AP), wherein the target AP is an AP comprising a plurality of radio frequency units with the same working frequency band;
calculating at least one working bandwidth supported by each radio frequency unit according to the maximum working bandwidth and the channel bandwidth of each radio frequency unit included in the target AP, and dividing the channels in the channel list into at least one channel subset corresponding to the working bandwidth according to the bandwidth value of each working bandwidth;
and allocating different channel subsets to each radio frequency unit according to the first number of the channel subsets corresponding to all the working bandwidths and the second number of the radio frequency units in the same working frequency band.
2. The method according to claim 1, wherein the calculating at least one operating bandwidth supported by each radio frequency unit according to a maximum operating bandwidth and a channel bandwidth of each radio frequency unit included in the target AP, and dividing the channels in the channel list into at least one channel subset corresponding to the operating bandwidth according to a bandwidth value of each operating bandwidth comprises:
calculating at least one working bandwidth supported by each radio frequency unit according to the maximum working bandwidth and the channel bandwidth of each radio frequency unit included in the target AP;
aiming at the minimum working bandwidth included in the at least one working bandwidth, dividing each channel in the channel list into a channel subset corresponding to the minimum working bandwidth;
and aiming at each working bandwidth except the minimum working bandwidth in the at least one working bandwidth, calculating the number of channels corresponding to the working bandwidth, and dividing the channels included in the channel list into a plurality of channel combinations consisting of the channels with the number of channels, wherein the channels in each channel combination are not overlapped, and each channel combination is a channel subset corresponding to the working bandwidth.
3. The method according to claim 1 or 2, wherein allocating different channel subsets to each radio frequency unit according to the first number of channel subsets corresponding to all operating bandwidths and the second number of radio frequency units in the same operating frequency band comprises:
acquiring a working mode of each radio frequency unit, wherein the working mode comprises a scanning mode and a compatible mode;
if the working modes of the radio frequency units in the same working frequency band are all the same, distributing different channel subsets to each radio frequency unit according to the first number, the second number and a preset averaging algorithm;
if the working modes of the plurality of radio frequency units in the same working frequency band are not all the same, determining the radio frequency unit with the working mode as the scanning mode in the plurality of radio frequency units in the same working frequency band, and allocating different channel subsets for the radio frequency units with the scanning mode in each working mode according to the first number, the third number of the radio frequency units with the working mode as the scanning mode and the preset averaging algorithm.
4. The method according to claim 3, wherein after determining that the operating mode is the scanning mode among the plurality of radio frequency units in the same operating frequency band, the method further comprises:
determining a first ratio of the first number to the third number, and a second ratio of an access service duration of a working channel to a scanning duration of a single channel;
if the first ratio is larger than the second ratio, determining the product of a preset ratio and the first number to obtain a fourth number, and according to the preset averaging algorithm, allocating the fourth number of channel subsets to the radio frequency unit with the working mode being the compatible mode, and allocating other channel subsets to the radio frequency unit with the working mode being the scanning mode;
and if the first ratio is not greater than the second ratio, executing a step of allocating different channel subsets to the radio frequency units in the scanning mode for each working mode according to the first number, the third number of the radio frequency units in the scanning mode and the preset averaging algorithm.
5. The method of claim 4, further comprising:
and determining a third ratio of the scanning duration to the access service duration as the preset ratio.
6. The method of claim 3, wherein said allocating a different subset of channels to each of the plurality of RF units according to the first number, the second number and a predetermined averaging algorithm if the operating modes of the plurality of RF units in the same operating band are all the same comprises:
when the working modes of the radio frequency units in the same working frequency band are all compatible modes, determining the target number of the channel subsets distributed to each radio frequency unit according to a fourth ratio of the first number to the second number;
aiming at each radio frequency unit, determining a non-working channel subset according to a preset working channel of each radio frequency unit, wherein the working channel is a channel for providing access service;
if the target number is greater than or equal to the number of the working channels of the radio frequency unit, allocating a fifth number of non-working channel subsets and the current working channel of the radio frequency unit to the radio frequency unit, wherein the fifth number is the difference between the target number and the number of the working channels of the radio frequency unit.
7. An apparatus for channel scanning, the apparatus comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a channel list corresponding to a target Access Point (AP), and the target AP is an AP comprising a plurality of radio frequency units with the same working frequency band;
a dividing module, configured to calculate at least one working bandwidth supported by each radio frequency unit according to a maximum working bandwidth and a channel bandwidth of each radio frequency unit included in the target AP, and divide a channel in the channel list into at least one channel subset corresponding to the working bandwidth according to a bandwidth value of each working bandwidth;
and the allocation module is used for allocating different channel subsets to each radio frequency unit according to the first number of the channel subsets corresponding to all the working bandwidths and the second number of the radio frequency units in the same working frequency band.
8. The apparatus according to claim 7, wherein the partitioning module is specifically configured to:
calculating at least one working bandwidth supported by each radio frequency unit according to the maximum working bandwidth and the channel bandwidth of each radio frequency unit included in the target AP;
aiming at the minimum working bandwidth included in the at least one working bandwidth, dividing each channel in the channel list into a channel subset corresponding to the minimum working bandwidth;
and aiming at each working bandwidth except the minimum working bandwidth in the at least one working bandwidth, calculating the number of channels corresponding to the working bandwidth, and dividing the channels included in the channel list into a plurality of channel combinations consisting of the channels with the number of channels, wherein the channels in each channel combination are not overlapped, and each channel combination is a channel subset corresponding to the working bandwidth.
9. The apparatus according to claim 7 or 8, wherein the allocation module is specifically configured to:
acquiring a working mode of each radio frequency unit, wherein the working mode comprises a scanning mode and a compatible mode;
if the working modes of the radio frequency units in the same working frequency band are all the same, distributing different channel subsets to each radio frequency unit according to the first number, the second number and a preset averaging algorithm;
if the working modes of the plurality of radio frequency units in the same working frequency band are not all the same, determining the radio frequency unit with the working mode as the scanning mode in the plurality of radio frequency units in the same working frequency band, and allocating different channel subsets for the radio frequency units with the scanning mode in each working mode according to the first number, the third number of the radio frequency units with the working mode as the scanning mode and the preset averaging algorithm.
10. The apparatus of claim 9, further comprising: a determination module;
the determining module is configured to determine a first ratio of the first number to the third number, and a second ratio of an access service duration of a working channel to a scanning duration of a single channel;
the allocating module is further configured to determine, if the first ratio is greater than the second ratio, a product of a preset ratio and the first number to obtain a fourth number, allocate, according to the preset averaging algorithm, the fourth number of channel subsets to the radio frequency unit whose operating mode is the compatible mode, and allocate other channel subsets to the radio frequency unit whose operating mode is the scanning mode;
the allocating module is further configured to, if the first ratio is not greater than the second ratio, execute a step of allocating different channel subsets to the radio frequency units in the scan mode in each working mode according to the first number, the third number of the radio frequency units in the scan mode in the working mode, and the preset averaging algorithm.
11. The apparatus of claim 10,
the determining module is further configured to determine a third ratio of the scanning duration to the access service duration as the preset ratio.
12. The apparatus according to claim 9, wherein the allocation module is specifically configured to:
when the working modes of the radio frequency units in the same working frequency band are all compatible modes, determining the target number of the channel subsets distributed to each radio frequency unit according to a fourth ratio of the first number to the second number;
aiming at each radio frequency unit, determining a non-working channel subset according to a preset working channel of each radio frequency unit, wherein the working channel is a channel for providing access service;
if the target number is greater than or equal to the number of the working channels of the radio frequency unit, allocating a fifth number of non-working channel subsets and the current working channel of the radio frequency unit to the radio frequency unit, wherein the fifth number is the difference between the target number and the number of the working channels of the radio frequency unit.
13. The network equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing the communication between the processor and the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
CN201910703439.3A 2019-07-31 2019-07-31 Channel scanning method and device Active CN110392413B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910703439.3A CN110392413B (en) 2019-07-31 2019-07-31 Channel scanning method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910703439.3A CN110392413B (en) 2019-07-31 2019-07-31 Channel scanning method and device

Publications (2)

Publication Number Publication Date
CN110392413A CN110392413A (en) 2019-10-29
CN110392413B true CN110392413B (en) 2021-09-03

Family

ID=68287966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910703439.3A Active CN110392413B (en) 2019-07-31 2019-07-31 Channel scanning method and device

Country Status (1)

Country Link
CN (1) CN110392413B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112312433B (en) * 2020-09-29 2022-02-22 新华三大数据技术有限公司 Channel configuration method and device, electronic equipment and storage medium
CN114980041A (en) * 2021-02-19 2022-08-30 Oppo广东移动通信有限公司 WiFi signal scanning method, device, terminal and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103442445A (en) * 2013-08-23 2013-12-11 京信通信系统(中国)有限公司 Channel allocation method and system
CN105357712A (en) * 2015-05-11 2016-02-24 西南交通大学 Multi-node channel scanning and distribution method in wireless network
CN105744597A (en) * 2014-12-12 2016-07-06 华为终端(东莞)有限公司 Terminal and wireless connection method
CN106304261A (en) * 2015-05-20 2017-01-04 展讯通信(上海)有限公司 mobile terminal network searching method and device
CN106332227A (en) * 2015-06-16 2017-01-11 联芯科技有限公司 Network search method and network search device
CN106982459A (en) * 2017-03-14 2017-07-25 广东欧珀移动通信有限公司 network scanning method and terminal device
CN107094315A (en) * 2017-04-24 2017-08-25 北京星网锐捷网络技术有限公司 Scan channel collocation method and device
CN108289320A (en) * 2018-04-26 2018-07-17 新华三技术有限公司 A kind of Mesh Neighbor Scans method and device
CN108834200A (en) * 2018-06-04 2018-11-16 新华三技术有限公司 A kind of cut-in method and device
CN109068404A (en) * 2018-09-30 2018-12-21 Oppo广东移动通信有限公司 Dual-card dual-standby terminal network selecting method, device, terminal device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9325484B2 (en) * 2012-11-05 2016-04-26 Xg Technology, Inc. Method to enable rapid scanning by cognitive radios

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103442445A (en) * 2013-08-23 2013-12-11 京信通信系统(中国)有限公司 Channel allocation method and system
CN105744597A (en) * 2014-12-12 2016-07-06 华为终端(东莞)有限公司 Terminal and wireless connection method
CN105357712A (en) * 2015-05-11 2016-02-24 西南交通大学 Multi-node channel scanning and distribution method in wireless network
CN106304261A (en) * 2015-05-20 2017-01-04 展讯通信(上海)有限公司 mobile terminal network searching method and device
CN106332227A (en) * 2015-06-16 2017-01-11 联芯科技有限公司 Network search method and network search device
CN106982459A (en) * 2017-03-14 2017-07-25 广东欧珀移动通信有限公司 network scanning method and terminal device
CN107094315A (en) * 2017-04-24 2017-08-25 北京星网锐捷网络技术有限公司 Scan channel collocation method and device
CN108289320A (en) * 2018-04-26 2018-07-17 新华三技术有限公司 A kind of Mesh Neighbor Scans method and device
CN108834200A (en) * 2018-06-04 2018-11-16 新华三技术有限公司 A kind of cut-in method and device
CN109068404A (en) * 2018-09-30 2018-12-21 Oppo广东移动通信有限公司 Dual-card dual-standby terminal network selecting method, device, terminal device and storage medium

Also Published As

Publication number Publication date
CN110392413A (en) 2019-10-29

Similar Documents

Publication Publication Date Title
US10966215B2 (en) Distributed channel selection for wireless networks
TWI461075B (en) Methods of optimizing scanning parameters for a plurality of channels in a wireless band
CN110830134A (en) BSS color allocation in wireless local area networks
JP7155298B2 (en) Channel hopping sequence generation with variable channel width
CN101309102B (en) Method and apparatus for scanning for an idle channel in a frequency environment
CN110392413B (en) Channel scanning method and device
CN104703281A (en) Channel distributing method, channel distributing device and Wireless Local Area Network system
US11589263B2 (en) Load-balancer for saturated wireless
WO2023216898A9 (en) Method for dynamically allocating frequency to base station, and price tag system and computer device
WO2021027783A1 (en) Method, apparatus, device, and system for allocating radio frequency resources, and storage medium
CN111045790A (en) Virtual machine deployment method and device
CN110461006B (en) Method and device for reducing WLAN interference and terminal equipment
US11277733B2 (en) Data transfer using a dual SIM phone
TWI771485B (en) Electronic apparatus, method and computer-readable storage medium for wireless communications
JP7413443B2 (en) Radio frequency resource allocation methods, apparatus, devices and systems, and storage media
CN111181668A (en) Information acquisition method and device
CN109076534B (en) System and method for allocating at least one wireless channel to an access point
US20210235289A1 (en) Cellular telecommunications network
JP2021022913A (en) Controller and control method
CN113194507B (en) Resource allocation method and device for network slices
GB2576693A (en) Cellular telecommunications network
RU2599952C2 (en) Method for reducing interferences during distribution of wi-fi network resources
CN116647918A (en) Resource allocation method and device for partial bandwidth BWP, electronic equipment and storage medium
CN114727297A (en) Network slice management method and device, electronic equipment and readable storage medium
CN112566163A (en) BSS Color value distribution method, device, medium and system

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
GR01 Patent grant
GR01 Patent grant