Disclosure of Invention
The invention provides a channel switching method and equipment in an MESH network, which are used for avoiding unnecessary channel switching of the MESH network and reducing oscillation of the MESH network.
In order to achieve the above object, the present invention provides a channel switching method in a MESH network, which is applied in a WLAN including a control device and a plurality of member AP devices, and the method includes the following steps:
the control device receiving interference parameters from the plurality of member AP devices;
when the control equipment determines that channel switching is needed according to the interference parameters, the control equipment determines a channel to be switched;
and the control equipment informs the plurality of member AP equipment to switch from the current channel to the channel to be switched.
The control device receiving interference parameters from the plurality of member AP devices, previously further comprising:
the member AP equipment records neighbor member AP equipment with the same MESH ID as the member AP equipment in a neighbor list, calculates an interference parameter by utilizing the interference generated by other equipment except the neighbor member AP equipment in the neighbor list, and sends the calculated interference parameter to the control equipment.
The control device determines that channel switching is required according to the interference parameter, and the method comprises the following steps:
the control equipment receives priority information from the plurality of member AP equipment, and determines that channel switching is needed by using the priority information corresponding to the plurality of member AP equipment and the interference parameter;
the priority information includes a priority value, and the smaller the hop count of the MESH link between the member AP device and the control device is, the larger the priority value corresponding to the member AP device is.
The control device determines that channel switching is required by using the priority information and the interference parameters corresponding to the plurality of member AP devices, including:
the control device calculates a weighted average of interference parameters of the plurality of member AP devices by using the priority information and the interference parameters corresponding to the plurality of member AP devices;
and if the difference between the weighted average value of the interference parameters of the current channel and the weighted average value of the interference parameters of other channels is not less than the tolerance coefficient, the control equipment determines that channel switching is required.
The interference parameters include: collision rate, packet error rate, retransmission rate;
the control device determines that channel switching is required by using the priority information and the interference parameters corresponding to the plurality of member AP devices, including:
when the number of the collision rates reported by the plurality of member AP devices, which is greater than a preset collision rate threshold, exceeds a preset first numerical value, the control device calculates a weighted average value of the collision rates of the plurality of member AP devices by using the priority information and the collision rates corresponding to the plurality of member AP devices; if the difference between the weighted average value of the collision rate of the current channel and the weighted average value of the collision rate of other channels is not less than the trapping coefficient, the control equipment determines that channel switching is required; or,
when the number of the packet error rates reported by the plurality of member AP devices, which is greater than a preset packet error rate threshold, exceeds a preset second value, the control device calculates a weighted average value of the packet error rates of the plurality of member AP devices by using the priority information and the packet error rates corresponding to the plurality of member AP devices; if the difference between the error packet rate weighted average value of the current channel and the error packet rate weighted average value of other channels is not less than the tolerance coefficient, the control equipment determines that channel switching is required; or,
when the number of the retransmission rates reported by the plurality of member AP devices, which is greater than a preset retransmission rate threshold, exceeds a preset third numerical value, the control device calculates a retransmission rate weighted average value of the plurality of member AP devices by using the priority information and the retransmission rate corresponding to the plurality of member AP devices; and if the weighted average value of the retransmission rate of the current channel is greater than the preset retransmission rate threshold, the control equipment determines that channel switching is required.
The control device determines a channel to be switched, and specifically comprises:
when the difference between the weighted average value of the collision rate of the current channel and the weighted average value of the collision rate of other channels is not less than the tolerance coefficient, the control device determines that the channel to be switched is: in the channels with the error packet rate smaller than the preset error packet rate threshold and the retransmission rate smaller than the preset retransmission rate threshold, the channel with the minimum weighted average value of the collision rate;
when the difference between the weighted average value of the packet error rate of the current channel and the weighted average value of the packet error rate of other channels is not less than the tolerance coefficient, the control device determines that the channel to be switched is: in the channels with the conflict rate smaller than the preset conflict rate threshold and the retransmission rate smaller than the preset retransmission rate threshold, the channel with the minimum weighted average value of the packet error rate;
when the weighted average value of the retransmission rates of the current channels is greater than the preset retransmission rate threshold, the control device determines that the channel to be switched is: and the conflict rate is less than a preset conflict rate threshold, the packet error rate is less than a preset packet error rate threshold, and the retransmission rate of the channel is the minimum.
A control device for use in a WLAN including the control device and a plurality of member AP devices, the control device comprising:
a receiving module, configured to receive interference parameters from the plurality of member AP devices;
the determining module is used for determining a channel to be switched when the channel switching is determined to be required according to the interference parameters;
a sending module, configured to notify the plurality of member AP devices to switch from the current channel to the channel to be switched.
The receiving module is further configured to receive priority information from the plurality of member AP devices;
the determining module is further configured to determine that channel switching needs to be performed by using the priority information and the interference parameters corresponding to the plurality of member AP devices;
the priority information includes a priority value, and the smaller the hop count of the MESH link between the member AP device and the control device is, the larger the priority value corresponding to the member AP device is.
The determining module is specifically configured to calculate a weighted average of interference parameters of the plurality of member AP devices by using the priority information and the interference parameters corresponding to the plurality of member AP devices;
and if the difference between the weighted average value of the interference parameters of the current channel and the weighted average value of the interference parameters of other channels is not less than the tolerance coefficient, determining that channel switching is required.
The interference parameters include: collision rate, packet error rate, retransmission rate;
the determining module is specifically configured to calculate a weighted average of collision rates of the plurality of member AP devices by using priority information and collision rates corresponding to the plurality of member AP devices when a number of collision rates reported by the plurality of member AP devices, which is greater than a preset collision rate threshold, exceeds a preset first value; if the difference between the weighted average value of the collision rate of the current channel and the weighted average value of the collision rate of other channels is not less than the defect-tolerant coefficient, determining that channel switching is required; or,
when the number of the packet error rates reported by the plurality of member AP devices, which is greater than a preset packet error rate threshold, exceeds a preset second value, calculating a weighted average of the packet error rates of the plurality of member AP devices by using the priority information and the packet error rates corresponding to the plurality of member AP devices; if the difference between the error packet rate weighted average value of the current channel and the error packet rate weighted average value of other channels is not less than the tolerance coefficient, determining that channel switching is required; or,
when the number of the retransmission rates reported by the plurality of member AP devices, which is greater than a preset retransmission rate threshold, exceeds a preset third numerical value, calculating a weighted average value of the retransmission rates of the plurality of member AP devices by using the priority information and the retransmission rates corresponding to the plurality of member AP devices; and if the weighted average value of the retransmission rate of the current channel is greater than the preset retransmission rate threshold, determining that channel switching is required.
The determining module is further configured to determine that the channel to be switched is: in the channels with the error packet rate smaller than the preset error packet rate threshold and the retransmission rate smaller than the preset retransmission rate threshold, the channel with the minimum weighted average value of the collision rate;
when the difference between the error rate weighted average value of the current channel and the error rate weighted average values of other channels is not less than the tolerance coefficient, determining that the channel to be switched is: in the channels with the conflict rate smaller than the preset conflict rate threshold and the retransmission rate smaller than the preset retransmission rate threshold, the channel with the minimum weighted average value of the packet error rate;
when the weighted average value of the retransmission rates of the current channels is greater than the preset retransmission rate threshold, determining that the channels to be switched are: and the conflict rate is less than a preset conflict rate threshold, the packet error rate is less than a preset packet error rate threshold, and the retransmission rate of the channel is the minimum.
Compared with the prior art, the invention has at least the following advantages: when the MESH network automatically calibrates the channel, the channel switching is considered based on the MESH network, the condition that each member AP device operates independently is solved, and the frequency of the channel switching is effectively reduced.
Detailed Description
The invention provides a channel switching method in an MESH network, which is applied to a WLAN (wireless local area network) comprising a control device and a plurality of member AP (access point) devices, wherein the control device can be an AC (alternating current) device in the MESH network; the device can also be a CAP (Control AP) in the MESH network, the CAP is generated by electing each AP device in the MESH network, and the MPP is easy to manage, so that an administrator can designate the MPP as the CAP when selecting the CAP; when the AC equipment is control equipment, the member AP equipment is MPP, MP, MAP and the like; when the MPP is the controlling device, the member AP devices are the MP, the MAP, and the like.
Based on the above network situation, as shown in fig. 3, the method includes the following steps:
step 301, the member AP device calculates its own interference parameter, and sends the calculated interference parameter to the control device.
In the invention, member AP equipment needs to maintain a neighbor list and records the information (such as MAC address) of neighbor member AP equipment with the same MESH ID as the member AP equipment in the neighbor list; specifically, the member AP device may record the source MAC address of the Beacon frame (i.e., the MAC address of the neighbor member AP device) that is the same as its MESH ID, in a passive listening manner or the like; it should be noted that the interference generated by the neighbor member AP device recorded in the neighbor list cannot become a factor of deterioration of the channel quality; therefore, when calculating the interference parameter, the member AP device calculates the interference parameter using interference generated by other devices than the neighbor member AP device in the neighbor list.
The interference parameters include: collision rate (I), packet error rate (P), retransmission rate (R); for each member AP device, information such as collision rate (I), packet error rate (P), retransmission rate (R), etc. is continuously collected. For example, the member AP device collects once every 10s, records the values of the collision rate (I), the packet error rate (P), and the retransmission rate (R), calculates the average value of these parameters during a calibration period (e.g., 3-180 minutes, which can be configured), and finally sends the calculation result to the control device.
For example, if the collision rate (I) in the first received channel report is 4%, the current collision rate is 4%; if the collision rate (I) in the second received channel report is 6%, the current collision rate is 5%; if the collision rate (I) in the third received channel report is 7%, the current collision rate is 6%, i.e., (5+ 7)/2.
Preferably, the member AP device may further send its own priority information to the control device, where the priority information includes a priority value, and the smaller the hop count of the MESH link between the member AP device and the control device is, the larger the priority value corresponding to the member AP device is.
For example, the priority of the control device (for the scenario in which the control device is the CAP) is set to 0 by the administrator, which means that the CAP switches the channel immediately upon detecting that the channel quality of the CAP itself is not good; setting the priority of member AP equipment which is 1 hop away from the control equipment as 10, setting the priority of member AP equipment which is 2 hops away from the control equipment as 8, and so on; or, setting the priority of the member AP devices 1 hop and 2 hop away from the control device to 10, setting the priority of the member AP devices 3 hop and 4 hop away from the control device to 8, and so on; the setting condition can be selected arbitrarily, and is not described herein again.
In step 302, the control device receives interference parameters from a plurality of member AP devices.
Preferably, when the member AP device transmits its own priority information, the control device may further receive the priority information from a plurality of member AP devices.
Step 303, the control device determines that channel switching is required according to the interference parameter.
The control equipment can calculate the average value of the interference parameters of the plurality of member AP equipment by utilizing the interference parameters corresponding to the plurality of member AP equipment; and if the difference between the average value of the interference parameters of the current channel and the average value of the interference parameters of other channels is not less than the tolerance coefficient, the control equipment determines that channel switching is required.
Preferably, after receiving the priority information from the plurality of member AP devices, the control device may further determine that channel switching is required by using the priority information and the interference parameter corresponding to the plurality of member AP devices; specifically, the control device calculates a weighted average of interference parameters of the plurality of member AP devices by using priority information and the interference parameters corresponding to the plurality of member AP devices; and if the difference between the weighted average value of the interference parameters of the current channel and the weighted average value of the interference parameters of other channels is not less than the tolerance coefficient, the control equipment determines that channel switching is required.
It should be noted that the processing manner using the average value of the interference parameters or the weighted average value of the interference parameters is similar, but the feature of the preferred weight is introduced into the weighted average value of the interference parameters, and the processing of the weighted average value of the interference parameters is described in detail later.
In the invention, the control equipment can configure a preset conflict rate threshold, a preset error packet rate threshold and a preset retransmission rate threshold, and the condition that the channel quality is poor when the preset conflict rate threshold, the preset error packet rate threshold and the preset retransmission rate threshold are greater than the thresholds is met; presetting a first numerical value (which can be 3-degree numerical value information or 20-percent-degree proportional information), a second numerical value and a third numerical value; the preset first value, the preset second value and the preset third value can be the same, and can be configured arbitrarily according to actual needs, and indicate the percentage quantity of the total AP quantity occupied by the AP with poor channel quality.
When the conflict rate reported by the member AP equipment is greater than a preset conflict rate threshold and the number of the conflict rates greater than the preset conflict rate threshold exceeds a preset first numerical value, considering channel switching; similarly, when the number of the packet error rates reported by the plurality of member AP devices, which is greater than the preset packet error rate threshold, exceeds the preset second value, channel switching is considered; and when the number of the retransmission rates reported by the plurality of member AP devices, which is greater than the preset retransmission rate threshold, exceeds a preset third numerical value, considering channel switching.
For example, when 100 AP devices report a collision rate, a preset collision rate threshold is 20%, and a preset first value is 10%, then when 11 AP devices report a collision rate greater than 20%, channel switching is considered based on the collision rate; when the collision rate reported by 9 AP devices is greater than 20%, the channel switching is not considered based on the collision rate.
In the invention, after channel switching is considered based on the collision rate, the control equipment also needs to calculate the weighted average value of the collision rates of a plurality of member AP equipment by using the priority information and the collision rates corresponding to the plurality of member AP equipment; and if the difference between the weighted average value of the collision rate of the current channel and the weighted average value of the collision rate of other channels is not less than the tolerance coefficient, the control equipment determines that channel switching is required.
After channel switching is considered based on packet error rate acquisition, the control equipment calculates the weighted average of the packet error rates of the plurality of member AP equipment by using the priority information corresponding to the plurality of member AP equipment and the packet error rates; and if the difference between the error packet rate weighted average value of the current channel and the error packet rate weighted average value of other channels is not less than the tolerance coefficient, the control equipment determines that channel switching is required.
After channel switching is considered based on retransmission rate, because the retransmission rate has a great influence on the channel quality, the control device calculates the weighted average of the retransmission rates of a plurality of member AP devices by using the priority information and the retransmission rates corresponding to the plurality of member AP devices without considering the trapping coefficient; and if the weighted average value of the retransmission rate of the current channel is greater than the preset retransmission rate threshold, the control equipment directly determines that channel switching is required.
It should be noted that the preset first value, the preset second value, the preset third value and the like of the parameters can be adjusted, so that an administrator can control the network more conveniently; for example, these parameters may be set to be small, so as to ensure the working quality of the MESH network, but sacrifice the stability of the MESH network; these parameters can be set to be large to ensure the stability of the MESH network, but the quality of the MESH network operation is degraded.
When calculating the weighted average of collision rates, the weighted average of packet error rates, and the weighted average of retransmission rates, it is assumed that I (1), I (2), I (3), etc. are collision rates of member AP devices, I (total) is the weighted average of collision rates, P (1), P (2), P (3), etc. are packet error rates of member AP devices, P (total) is the weighted average of packet error rates, R (1), R (2), R (3), etc. are retransmission rates of member AP devices, and R (total) is the weighted average of retransmission rates; then:
i (total) ═ I (weight 1 × I (1) + weight 2 × I (2) ·)/sum of weights of the member AP devices;
p (total) (weight 1 × P (1) + weight 2 × P (2))/sum of the weights of the AP devices;
r (total) (weight 1 × R (1) + weight 2 × R (2))/sum of the weights of the AP devices;
the weight 1 is the preferred weight of the member AP device 1, and I (1), P (1), and R (1) are the collision rate, packet error rate, and retransmission rate of the member AP device 1, and so on.
It should be noted that, when calculating the collision rate weighted average, the collision rate weighted average of the current channel and the collision rate weighted average of other channels need to be calculated; when the weighted average of the packet error rate is calculated, the weighted average of the packet error rate of the current channel and the weighted average of the packet error rate of other channels need to be calculated; when calculating the weighted average of the retransmission rates, only the weighted average of the retransmission rates of the current channel needs to be calculated.
Further, if I (total) of the current channel — I (total) of the other channel is ═ tolerance factor (T), it indicates that the current channel is not good, and the other channel already has the precondition of becoming the working channel; if the P (total) of the current channel and the P (total) of other channels are ═ tolerance coefficient (T), the current channel is not good, and the other channels already have the precondition of becoming the working channel; if R (total) of the current channel is larger than the preset retransmission rate threshold, the current channel is not good.
Step 304, when the channel switching is determined to be needed, the control device determines the channel to be switched. Wherein the control device can determine the channel with the best channel quality as the channel to be switched.
Preferably, if it is known that channel switching is required based on the collision rate (that is, the difference between the weighted average value of the collision rate of the current channel and the weighted average value of the collision rate of other channels is not less than the tolerance coefficient), the control device determines that the channel to be switched is: and in the channels with the error packet rate smaller than the preset error packet rate threshold and the retransmission rate smaller than the preset retransmission rate threshold, the channel with the minimum weighted average value of the collision rate.
If channel switching is required to be carried out based on the packet error rate (namely the difference between the packet error rate weighted average value of the current channel and the packet error rate weighted average values of other channels is not less than the defect tolerance coefficient), the control equipment determines that the channel to be switched is as follows: and in the channels with the conflict rate smaller than the preset conflict rate threshold and the retransmission rate smaller than the preset retransmission rate threshold, the channel with the minimum weighted average value of the packet error rate.
If the channel switching is needed to be carried out based on the retransmission rate (namely the weighted average value of the retransmission rate of the current channel is greater than the preset retransmission rate threshold), the control equipment determines that the channel to be switched is as follows: and the conflict rate is less than a preset conflict rate threshold, the packet error rate is less than a preset packet error rate threshold, and the retransmission rate of the channel is the minimum.
Step 305, the control device informs a plurality of member AP devices to switch from the current channel to the channel to be switched.
In the invention, the control equipment triggers channel switching and sends a channel switching notification message to each opposite end connected with the MESH, and other member AP equipment continues to forward the channel switching notification message to each opposite end connected with the MESH after receiving the channel switching notification message so as to trigger the channel switching of the MESH network.
In addition, after the channel switching notification message is sent, before switching the channel, a switching waiting time (default is set to 5 seconds) may be waited, and the switching waiting time may be configured according to the scale of the network, so as to ensure that each member AP device can receive the channel switching notification message as much as possible.
In practical application, if some member AP devices (taking the member AP device 1 as an example) do not receive the channel switching notification message, the member AP device 1 does not know that the channel should be switched, and the upstream member AP device of the member AP device 1 has switched the channel, so that the channel of the member AP device 1 does not conform to the channel of the upstream member AP device, and the MESH connection is disconnected.
After the MESH connection is disconnected, if there is no member AP device downstream of the member AP device 1, the member AP device 1 may quickly reestablish the MESH connection with the upstream member AP device; if there are more member AP devices downstream of the member AP device 1, an uplink detection function may be used to cause the member AP device 1 to disconnect all links and then re-establish a connection with the upstream member AP device, which may use existing implementations.
The backup mechanism is explained in detail below.
Taking CAP (designating MPP as CAP) as an example of a control device, in order to avoid the problem that a MESH network cannot obtain service due to CAP failure, multiple CAPs are usually elected in the MESH network, and as shown in an application scenario diagram shown in fig. 4, two MPPs are deployed, one MPP may be elected as a primary CAP, and the other MPP is a backup CAP. The primary CAP needs to synchronize the received channel information (i.e. interference information, priority information, etc.) to the backup CAP, and the backup CAP only receives the channel information but does not process the channel information; when the primary CAP fails, the backup CAP will become the primary CAP to realize the related functions.
A wired part is used for heartbeat between the main CAP and the backup CAP, and channel information synchronization messages are transmitted by the wired part. Aiming at the abnormal condition:
(1) the wireless end is abnormal, and because the quality of the air interface changes from time to time and cannot be the same every time, when the channel information of each member AP device in the channel information synchronization message received by the backup CAP is the same for three consecutive times, the radio frequency of the main CAP is considered to be in problem, the channel information cannot be normally collected, and the main CAP is determined to be converted into the main CAP.
(2) The wired end is abnormal, if the backup CAP cannot receive the heartbeat messages at 3 continuous heartbeat intervals, the backup CAP carries out uplink detection, the state of a wired port is set as a detection point, if the wired port of the backup CAP is UP, the backup CAP is considered to be abnormal, and the backup CAP is determined to be converted into a main CAP; or, the backup CAP carries out uplink detection, the state of the wired port is set as a detection point, if the wired port of the backup CAP is DOWN, the backup CAP is considered to be abnormal, and all downlink wireless connections of the backup CAP are disconnected.
In summary, in the present invention, the reasonable selection of the channel can be realized, the quality of the whole MESH network is taken as a basis, and unnecessary channel switching of the MESH network can be avoided, so as to achieve the purpose of reducing MESH network oscillation; when the MESH network automatically calibrates channels, the condition that each member AP device operates independently is solved, and the frequency of channel switching is effectively reduced; when the channel is selected, as long as the current channel is still available, the current channel is kept, instead of selecting the optimal channel to work, so that frequent switching of the channel can be avoided; the channel calibration is uniformly managed by the control equipment, and each member AP equipment only needs to collect the interference information of the channel quality, thereby effectively reducing the workload of the member AP equipment.
The workflow of the present invention will be described with reference to specific examples.
Example 1
As shown in fig. 5, the current MESH network operates on channel 149; the CAP priority is set to 0, the priority levels of MP1, MP2, MP3, MP6, and MP7 are 4 (the number of hops with CAP is 1 hop or 2 hops), and the priority levels of MP4 and MP5 are 3 (the number of hops with CAP is 3 hops); configuring a preset collision rate threshold to 40% on the CAP, configuring a preset packet error rate threshold to 30%, configuring a preset retransmission rate threshold to 21%, configuring a preset first numerical value, a preset second numerical value and a preset third numerical value to 20%, configuring a trapping coefficient to 10%, and configuring a calibration period to 10 minutes on the member AP device.
Assuming that the current MESH network is deployed, the situation of adding and/or deleting member AP equipment can not occur any more, and the CAP and each member AP equipment start working; each member AP device collects channel quality information of each channel on an air interface in real time; after a collection of 10 minutes of a calibration period, each member AP device sends a report of the quality of each channel during the period (including I, P, R for the current channel and I, P, R for each other channel and the priority of the member AP device) to the CAP.
Considering that the processing mechanism of the parameter I, P, R is similar, the collision rate I is briefly described later, and the processing of the packet error rate P and the retransmission rate R is similar to the collision rate I and will not be described later.
After the CAP receives the quality report of each member AP device, the detection result of each member AP device shown in table 1 can be obtained, 149(I) represents the value of the collision rate of each member AP device on the 149 channel, 153(I) represents the value of the collision rate of each member AP device on the 153 channel, and so on; and 149 channels are current channels.
TABLE 1
Since the preset collision rate threshold is 40% and the preset first value is 20%, on the current channel 149, in the collision rates reported from MP1 to MP7, only the collision rate of MP7 is greater than 40%, and the number of collision rates greater than the preset collision rate threshold obtained through calculation does not exceed the preset first value (i.e., 1/7 is 14.3 and is less than 20%), the CAP considers that the channel quality of the MESH network has not reached the handover condition, and continues to use the current channel 149 to work.
Example 2
Still taking FIG. 5 as an example, the current MESH network operates on channel 149; the priority levels of MP1, MP2, MP3, MP6 and MP7 are 4, and the priority levels of MP4 and MP5 are 3; configuring a preset collision rate threshold to 40% on the CAP, configuring a preset packet error rate threshold to 30%, configuring a preset retransmission rate threshold to 21%, configuring a preset first numerical value, a preset second numerical value and a preset third numerical value to 10%, configuring a trapping coefficient to 10%, and configuring a calibration period to 10 minutes on the member AP device.
Each member AP device collects channel quality information for each channel, and after a calibration period of 10 minutes, sends a quality report for each channel during this period (including I, P, R for the current channel and I, P, R for each other channel and the priority of the member AP device) to the CAP. Subsequently, briefly explaining with the collision rate I, the CAP may obtain the detection result of each member AP device shown in table 1.
Since the preset collision rate threshold is 40% and the preset first value is 10%, on the current channel 149, only the collision rate of MP7 is greater than 40% among the collision rates reported from MP1 to MP7, and the number of collision rates greater than the preset collision rate threshold is calculated to exceed the preset first value (i.e., 1/7 is 14.3 and is greater than 10%), the CAP considers that the current channel quality of the MESH network is degraded, and considers performing channel switching.
Then, the CAP needs to calculate I (total) on each channel; for 149 channels, I (total) ═ 14.0% (4 × 3+4 × 7+4 × 6+3 × 9+3 × 8+4 × 7+4 × 50)/(4+4+4+3+3+4+ 4); for 153 channels, I (total) 2.5%; for 157 channels, I (total) is 20.6%; for 161 channels, I (total) 8.8%; for 165 channels, I (total) is 3.7%.
The I (total) of 149 channels-153 channels is 11.5% > tolerance coefficient, and the switching condition is met; i (total) of 149 channels-157 channels-6.6% < margin factor, no switching condition; i (total) of 149 channels-I (total) of 161 channels is 5.2% < margin factor, no switching condition is provided; i (total) of 149 channels to I (total) of 165 channels is 10.3% > margin coefficient, and switching conditions are provided.
Because both the 153 channel and the 165 channel meet the switching condition, the channel with the minimum weighted average value of the collision rate is selected as the channel to be switched; since the I (total) of 153 channels is 2.5% and the I (total) of 165 channels is 3.7%, 153 channels are selected as the channels to be switched.
And then, the CAP informs each member AP device to switch the channel from 149 to 153, and the MESH network switches the channel to 153 after 5 seconds.
Based on the same inventive concept as the above method, the present invention also provides a control device applied in a WLAN including the control device and a plurality of member AP devices, as shown in fig. 6, the control device including:
a receiving module 11, configured to receive interference parameters from the plurality of member AP devices;
a determining module 12, configured to determine a channel to be switched when it is determined that channel switching is required according to the interference parameter;
a sending module 13, configured to notify the plurality of member AP devices to switch from the current channel to the channel to be switched.
The receiving module 11 is further configured to receive priority information from the plurality of member AP devices;
the determining module 12 is further configured to determine that channel switching needs to be performed by using the priority information and the interference parameter corresponding to the plurality of member AP devices;
the priority information includes a priority value, and the smaller the hop count of the MESH link between the member AP device and the control device is, the larger the priority value corresponding to the member AP device is.
The determining module 12 is specifically configured to calculate a weighted average of the interference parameters of the plurality of member AP devices by using the priority information and the interference parameters corresponding to the plurality of member AP devices;
and if the difference between the weighted average value of the interference parameters of the current channel and the weighted average value of the interference parameters of other channels is not less than the tolerance coefficient, determining that channel switching is required.
The interference parameters include: collision rate, packet error rate, retransmission rate; the determining module 12 is specifically configured to calculate a weighted average of collision rates of the plurality of member AP devices by using priority information and collision rates corresponding to the plurality of member AP devices when the number of collision rates reported by the plurality of member AP devices, which is greater than a preset collision rate threshold, exceeds a preset first value; if the difference between the weighted average value of the collision rate of the current channel and the weighted average value of the collision rate of other channels is not less than the defect-tolerant coefficient, determining that channel switching is required; or,
when the number of the packet error rates reported by the plurality of member AP devices, which is greater than a preset packet error rate threshold, exceeds a preset second value, calculating a weighted average of the packet error rates of the plurality of member AP devices by using the priority information and the packet error rates corresponding to the plurality of member AP devices; if the difference between the error packet rate weighted average value of the current channel and the error packet rate weighted average value of other channels is not less than the tolerance coefficient, determining that channel switching is required; or,
when the number of the retransmission rates reported by the plurality of member AP devices, which is greater than a preset retransmission rate threshold, exceeds a preset third numerical value, calculating a weighted average value of the retransmission rates of the plurality of member AP devices by using the priority information and the retransmission rates corresponding to the plurality of member AP devices; and if the weighted average value of the retransmission rate of the current channel is greater than the preset retransmission rate threshold, determining that channel switching is required.
The determining module 12 is further configured to determine that the channel to be switched is: in the channels with the error packet rate smaller than the preset error packet rate threshold and the retransmission rate smaller than the preset retransmission rate threshold, the channel with the minimum weighted average value of the collision rate;
when the difference between the error rate weighted average value of the current channel and the error rate weighted average values of other channels is not less than the tolerance coefficient, determining that the channel to be switched is: in the channels with the conflict rate smaller than the preset conflict rate threshold and the retransmission rate smaller than the preset retransmission rate threshold, the channel with the minimum weighted average value of the packet error rate;
when the weighted average value of the retransmission rates of the current channels is greater than the preset retransmission rate threshold, determining that the channels to be switched are: and the conflict rate is less than a preset conflict rate threshold, the packet error rate is less than a preset packet error rate threshold, and the retransmission rate of the channel is the minimum.
The modules of the device can be integrated into a whole or can be separately deployed. The modules can be combined into one module, and can also be further split into a plurality of sub-modules.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by hardware, or by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
Those skilled in the art will appreciate that the drawings are merely schematic representations of one preferred embodiment and that the blocks or flow diagrams in the drawings are not necessarily required to practice the present invention.
Those skilled in the art will appreciate that the modules in the devices in the embodiments may be distributed in the devices in the embodiments according to the description of the embodiments, and may be correspondingly changed in one or more devices different from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
The above-mentioned serial numbers of the present invention are for description only and do not represent the merits of the embodiments.
The above disclosure is only for a few specific embodiments of the present invention, but the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.