Disclosure of Invention
The invention aims to provide a cloud controller load balancing method and device and a cloud controller, which can effectively guarantee the normal operation of the cloud controller under the overload condition.
The technical scheme provided by the invention is as follows:
a cloud AC load balancing method is characterized in that the load balancing method comprises the following steps:
judging whether a load balancing condition is met; if so,
counting the number of each wireless AP access terminal;
judging the wireless AP needing to release the management relation according to the number of the access terminals of each wireless AP;
and releasing the management relation of the corresponding wireless AP.
In the technical scheme, if the cloud AC is judged to be overloaded, that is, the load balancing condition is met, the wireless APs needing to be released from the management relationship are judged according to the number of the wireless AP access terminals, so that the management relationship of a certain number of the wireless APs is released, the normal operation of the cloud AC is guaranteed, and the load balancing method is simple and convenient.
Further preferably, the determining whether the load balancing condition is satisfied includes:
and judging whether the number of the wireless access point access terminals currently managed by the cloud controller exceeds a preset threshold value, if so, meeting the load balancing condition.
In the technical scheme, whether the load balancing condition is met or not is judged according to the number of the wireless AP access terminals currently served by the cloud AC, and the method is simple and convenient.
Further preferably, the counting the number of the access terminals of each wireless AP includes:
periodically receiving the number of access terminals reported by each wireless AP;
and counting and storing the number of the received reports of each wireless AP.
Further preferably, the determining, according to the number of the access terminals of each wireless AP, the wireless AP that needs to release the management relationship includes:
counting the average access value of each wireless AP access terminal in a preset time period;
calculating an overload difference value between the number of the wireless access point access terminals currently managed by the cloud controller and a preset threshold value;
and determining the wireless AP for releasing the management relationship according to the average access value and the overload difference value.
In the technical scheme, the wireless AP needing to remove the management relation is judged by counting the average access value and the overload difference value of the wireless AP access terminal in the preset time period, so that the load balancing efficiency is improved, and the influence on a user is reduced to the minimum.
Further preferably, the determining, according to the number of the access terminals of each wireless AP, the wireless AP that needs to release the management relationship includes:
counting the average access value of each wireless AP access terminal in a plurality of different time periods;
calculating to obtain the access value of each wireless AP according to the average access value in different time periods;
calculating an overload difference value between the number of the wireless access point access terminals currently managed by the cloud controller and a preset threshold value;
and determining the wireless AP for releasing the management relationship according to the access score and the overload difference value.
In the technical scheme, the access point value is calculated according to the average access point values in different time periods, so that the wireless AP needing to remove the management relation is judged. In the evaluation process, the number of the current access terminals of the wireless AP is evaluated, and the number of the access terminals in a period of time is evaluated, so that the evaluation accuracy is greatly improved, the situation that the number of the access terminals of the wireless AP is higher accidentally is effectively prevented, and the influence degree on a user is reduced to the minimum while the normal work of the cloud AC is ensured.
The invention also provides a cloud AC load balancing device, which comprises:
the judging module is used for judging whether the load balancing condition is met or not and judging the wireless AP needing to release the management relation according to the number of the wireless AP access terminals counted by the counting module;
the statistical module is used for counting the number of the wireless AP access terminals;
and the relationship releasing module is used for releasing the management relationship of the corresponding wireless AP according to the judgment result of the judging module.
In the technical scheme, if the cloud AC is judged to be overloaded, that is, the load balancing condition is met, the wireless APs needing to be released from the management relationship are judged according to the number of the wireless AP access terminals, so that the management relationship of a certain number of the wireless APs is released, and the normal operation of the cloud AC is guaranteed.
Further preferably, in the determining module, it is determined whether the number of the wireless access point access terminals currently managed by the cloud controller exceeds a preset threshold;
and if the number of the wireless access point access terminals currently managed by the cloud controller exceeds a preset threshold value, the load balancing condition is met.
In the technical scheme, whether the load balancing condition is met or not is judged according to the number of the wireless AP access terminals currently served by the cloud AC, and the method is simple and convenient.
Further preferably, in the statistical module, the average access value of each wireless AP access terminal in a preset time period is counted, and an overload difference between the number of wireless AP access terminals currently managed by the cloud controller and a preset threshold is calculated;
and in the judging module, determining the wireless AP for releasing the management relationship according to the average access value and the overload difference value obtained by the counting module.
In the technical scheme, the wireless AP needing to remove the management relation is judged by counting the average access value and the overload difference value of the wireless AP access terminal in the preset time period, so that the load balancing efficiency is improved, and the influence on a user is reduced to the minimum.
Further preferably, in the statistical module, the average access values of the wireless AP access terminals in a plurality of different time periods are counted, the access score of each wireless AP is calculated according to the average access values in different time periods, and an overload difference between the number of the wireless access point access terminals currently managed by the cloud controller and a preset threshold is calculated;
and in the judging module, determining the wireless AP for relieving the management relation according to the access value and the overload difference obtained by the counting module.
In the technical scheme, the access point value is calculated according to the average access point values in different time periods, so that the wireless AP needing to remove the management relation is judged. In the evaluation process, the number of the current access terminals of the wireless AP is evaluated, and the number of the access terminals in a period of time is evaluated, so that the evaluation accuracy is greatly improved, the situation that the number of the access terminals of the wireless AP is higher accidentally is effectively prevented, and the influence degree on a user is reduced to the minimum while the normal work of the cloud AC is ensured.
The invention also provides a cloud AC, which comprises the cloud AC load balancing device.
In the technical method, if the cloud AC is overloaded, the wireless AP needing to be released from the management relationship is judged according to the number of the access terminals of each wireless AP, so that the management relationship of a certain number of wireless APs is released. In the process of judging the wireless AP needing to remove the management relation, the number of the current access terminals of the wireless AP is considered, and the number of the access terminals in a period of time is considered, so that the judgment accuracy is greatly improved, the situation that the number of the wireless AP is higher due to accidental access is effectively prevented, and the influence degree on a user is reduced to the minimum while the cloud AC works normally.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
For the sake of simplicity, the drawings only schematically show the parts relevant to the present invention, and they do not represent the actual structure as a product.
As shown in fig. 1, which is a schematic flow chart of an embodiment of a cloud AC load balancing method provided by the present invention, it can be seen from the diagram that the load balancing method includes: s10, judging whether the load balancing condition is met, if yes, jumping to S20; s20, counting the number of each wireless AP access terminal; s30, judging the wireless AP needing to release the management relation according to the number of the access terminals of each wireless AP; s40 releases the management relationship of the corresponding wireless AP.
In this embodiment, the number of the wireless AP access terminals managed by the cloud AC is counted, and whether a load balancing condition is satisfied is determined according to the number. Specifically, if the counted number of the managed wireless AP current access terminals is smaller than a preset threshold, it is determined that the load balancing condition is not satisfied, and no subsequent processing is performed; on the contrary, if the counted number of the managed wireless AP current access terminals is greater than the preset threshold, it is determined that the load balancing condition is satisfied, the step S20 is skipped to further count the number of the terminals accessed by each wireless AP currently in service, and the wireless APs with the management relation removed from the cloud AC are determined according to the number of the access terminals, that is, the cloud AC stops serving the wireless APs, so as to ensure the normal operation of the whole system and reduce the loss to the user to the maximum extent. More specifically, in the present embodiment, the preset threshold is not specifically limited, and may be appropriately set according to the actual carrying capacity of the cloud AC, for example, when the cloud AC can serve 8000 terminals at the same time in a normal condition (the cloud AC serves 4000 wireless APs at the same time, and each wireless AP has 20 terminals connected thereto), the preset threshold is set to 7500, or the preset threshold is set to 10000 which is the limit service capacity of the cloud AC.
And in the process of judging the wireless AP needing to release the management relationship, judging according to the number of the access terminals of each wireless AP, specifically, taking the wireless AP with less access terminals as the wireless AP needing to release the management relationship until the cloud AC does not have overload. In an example, if overload occurs in 20 wireless APs managed by the cloud AC, it is determined that the number of the wireless AP access terminals is 30, and one of the wireless AP access terminals is 40, and the rest are 100, the management relationship between the wireless AP with the preferred access number of 30 and the cloud AC is released, and then the wireless AP with the preferred access number of 40 is selected, and so on until the overload does not occur in the cloud AC. And if the number of the plurality of wireless AP access terminals is the same, randomly selecting the wireless AP access terminals.
As shown in fig. 2, the load balancing method according to the present embodiment includes: s10, judging whether the load balancing condition is met, if yes, jumping to S21; s21, counting the average access value of each wireless AP access terminal in a preset time period; s22 calculating an overload difference value between the number of the wireless AP access terminals currently managed by the cloud AC and a preset threshold value; s30, determining the wireless AP for releasing the management relationship according to the average access value and the overload difference value; s40 releases the management relationship of the corresponding wireless AP.
In this embodiment, the number of wireless AP access terminals managed by the cloud AC is periodically counted (e.g., wireless AP reports once every 20 minutes, reports once every 30 minutes, reports once every 1 hour, and the like), whether a load balancing condition is satisfied is determined according to the number, if the counted number of managed wireless AP access terminals is greater than a preset threshold, it is determined that the load balancing condition is satisfied, step S21 is skipped to further count the number of terminals accessed by each wireless AP currently serving, and a wireless AP that is not in a management relationship with the cloud AC is determined according to the number of access terminals, that is, the cloud AC stops serving the wireless APs, so as to ensure normal operation of the entire system and reduce loss to users to the greatest extent.
In the process of counting the number of the wireless AP access terminals, the average access value of the wireless AP access terminals in a preset time period is counted while the current number of the access terminals of the wireless AP access points is obtained; meanwhile, the number of the terminals exceeding the preset threshold value is calculated, the management relation of the corresponding number of the wireless APs is released according to the average access value of the wireless APs, and the management service is stopped being provided for the APs. Specifically, the wireless APs with the smaller average access value of the access terminal are used as the wireless APs to be released from the management relationship until the cloud AC is no longer overloaded.
In an example, if the cloud AC can serve 4000 wireless APs at the same time under a normal condition, each wireless AP has an average access of 20 terminals, that is, the cloud AC can serve 80000 terminals at the same time (the limit load value of the cloud AC is 100000), the preset threshold is 90000, and the preset time period is the latest 2 hours.
Then, when the total number of terminals accessed by each wireless AP in the system increases to 110000 at a certain moment, the server of some wireless APs needs to stop serving the redundant 20000 terminals according to the preset threshold 90000, so as to ensure the normal service of 90000 terminals.
Then, the number of the current connected terminals of each wireless AP is respectively counted, the average access value of each wireless AP in the last 2 hours is counted (the average value of the access numbers reported by the wireless APs in the last 2 hours is taken), the wireless AP point with the minimum average access value is preferentially released from the management relation according to the counted average access value, and the release is stopped until the number of the access terminals in the rest wireless APs is within the range of a preset threshold value.
As shown in fig. 3, the load balancing method according to the present embodiment includes: s10, judging whether the load balancing condition is met, if yes, jumping to S23; s23, counting the average access value of each wireless AP access terminal in a plurality of different time periods; s24, calculating the access value of each wireless AP according to the average access value in different time periods; s25 calculating an overload difference value between the number of the wireless AP access terminals currently managed by the cloud AC and a preset threshold value; s30, determining the wireless AP for releasing the management relationship according to the access score and the overload difference; s40 releases the management relationship of the corresponding wireless AP.
In this embodiment, the number of the wireless AP access terminals managed by the cloud AC is periodically counted, whether a load balancing condition is satisfied is determined according to the number, if the counted number of the managed wireless AP access terminals is greater than a preset threshold, it is determined that the load balancing condition is satisfied, step S21 is skipped to further count the number of the terminals accessed by each wireless AP currently served, and the wireless APs with which the management relationship with the cloud AC is removed are determined according to the number of the access terminals, that is, the cloud AC stops serving the wireless APs, so that the normal operation of the entire system is ensured, and the loss to the user is reduced to the maximum extent.
In the process of counting the number of the wireless AP access terminals, the average access value of the wireless AP access terminals in a plurality of preset time periods is counted while the number of the current access terminals of the wireless AP access points is obtained, and the access value of each wireless AP is calculated; meanwhile, the number of the terminals exceeding the preset threshold value is calculated, the management relation of the corresponding number of the wireless APs is released according to the access scores of the wireless APs, and the management service is stopped being provided for the APs. Specifically, the preset time periods may be set according to practical situations, such as the last 1 hour, the last 2 hours, the last 3 hours, the last 4 hours, and the like, and are not limited herein. More specifically, the wireless AP with the smaller access score is used as the wireless AP to be released from the management relationship until the cloud AC no longer has the overload condition.
In an example, in the process of calculating the access score of each wireless AP, the preset time periods are the latest 1 hour and the latest 4 hours, and the access value of the current terminal is calculated to be Q1, the average access value of the terminal in the latest 1 hour is Q2, and the average access value of the terminal in the latest 4 hours is Q3, then the access score is calculated according to the following formula:
score=a*Q3+b*Q2+c*Q1
wherein a, b and c are empirical parameters, and a + b + c is 1, and the values of a, b and c are not particularly limited and are determined according to actual conditions, such as a is 0.2, b is 0.3 and c is 0.5; as another example, a is 0.1, b is 0.3, and c is 0.6; for example, a is 0.3, b is 0.3, and c is 0.4.
As shown in fig. 4, which is a schematic diagram of an embodiment of a cloud AC load balancing apparatus provided in the present invention, it can be seen that the cloud AC load balancing apparatus 100 includes: the system comprises a judging module 110, a counting module 120 and a relation removing module 130, wherein the judging module 110 is respectively connected with the counting module 120 and the relation removing module 130.
In this embodiment, the counting module 120 periodically counts the number of the wireless AP access terminals managed by the cloud AC, so that the determining module 110 determines whether the load balancing condition is satisfied according to the number. Specifically, if the counted number of the managed wireless AP access terminals is smaller than a preset threshold, it is determined that the load balancing condition is not satisfied, and no subsequent processing is performed; on the contrary, if the counted number of the managed wireless AP access terminals is greater than the preset threshold, it is determined that the load balancing condition is satisfied. Then, the counting module 120 further counts the number of terminals accessed by each currently served wireless AP, so that the determining module 110 determines the wireless AP which is in management relation with the cloud AC according to the number of the accessed terminals and performs the release of the management relation through the relation releasing module 130, thereby ensuring the normal operation of the whole system and reducing the loss to the user to the maximum extent.
In addition, in the process of counting the number of the access terminals of each wireless AP, the counting module 120 counts the number of the access terminals reported by each wireless AP according to a period, specifically, the period here is a preset frequency, such as reporting every 20 minutes, reporting every 30 minutes, reporting every 1 hour, and the like.
In this embodiment, the statistical module 120 calculates an average access value of each wireless AP access terminal within a preset time period, and calculates an overload difference between the number of the wireless AP access terminals currently managed by the cloud AC and a preset threshold; the determining module 110 determines the wireless AP with the management release relationship according to the average access value and the overload difference obtained by the counting module 120.
In this embodiment, the counting module 120 periodically (for example, the wireless AP reports once every 20 minutes, reports once every 30 minutes, reports once every 1 hour, and the like) counts the number of the wireless AP access terminals managed by the cloud AC, so that the determining module 110 determines whether the load balancing condition is satisfied according to the number. Specifically, if the counted number of the managed wireless AP access terminals is greater than a preset threshold, it is determined that the load balancing condition is satisfied. Then, the statistical module 120 further counts an average access value of each wireless AP access terminal within a preset time period, so that the determining module 110 determines a wireless AP which is in management relation with the cloud AC according to the average access value and performs management relation release through the relation release module 130, thereby ensuring normal operation of the entire system and reducing loss to the user to the maximum extent.
Specifically, in the process of counting the number of the wireless AP access terminals, the average access value of the wireless AP access terminals in a preset time period is counted while the current number of the access terminals of the wireless AP access points is acquired; meanwhile, the number of terminals exceeding the preset threshold is calculated, the management relationship of the corresponding number of wireless APs is released according to the average access value of the wireless APs, and the management service is stopped being provided for the APs by the relationship release module 130. More specifically, the wireless AP with the smaller average access value is used as the wireless AP to be released from the management relationship until the cloud AC no longer has the overload condition.
In this embodiment, the statistical module 120 calculates an average access value of each wireless AP access terminal in a plurality of different time periods, calculates an access score of each wireless AP according to the average access value in different time periods, and calculates an overload difference between the number of the wireless AP access terminals currently managed by the cloud AC and a preset threshold; the determining module 110 determines the wireless AP with the management relationship removed according to the access score and the overload difference obtained by the counting module 120.
In this embodiment, the counting module 120 periodically counts the number of the wireless AP access terminals managed by the cloud AC, so that the determining module 110 determines whether the load balancing condition is satisfied according to the number. Specifically, if the counted number of the managed wireless AP access terminals is greater than a preset threshold, it is determined that the load balancing condition is satisfied. Then, the statistical module 120 further counts the access score of each wireless AP access terminal within a preset time period, so that the determining module 110 determines the wireless AP which is released from the management relationship with the cloud AC according to the access score and releases the management relationship through the relationship releasing module 130, thereby ensuring normal operation of the entire system and reducing loss to the user to the maximum extent.
In the process of counting the number of the wireless AP access terminals, the average access value of the wireless AP access terminals in a plurality of preset time periods is counted while the number of the current access terminals of the wireless AP access points is obtained, and the access value of each wireless AP is calculated; meanwhile, the number of the terminals exceeding the preset threshold value is calculated, the management relation of the corresponding number of the wireless APs is released according to the access scores of the wireless APs, and the management service is stopped being provided for the APs. Specifically, the preset time periods may be set according to practical situations, such as the last 1 hour, the last 2 hours, the last 3 hours, the last 4 hours, and the like, and are not limited herein. More specifically, the wireless AP with the smaller access score is used as the wireless AP to be released from the management relationship until the cloud AC no longer has the overload condition.
In one example, in the process of calculating the access value of each wireless AP, the preset time periods are selected as the last 1 hour, the last 4 hours and the last 8 hours, and the access value of the current terminal is counted as Q1, the average access value of the terminal in the last 1 hour is counted as Q2, the average access value of the terminal in the last 4 hours is counted as Q3, and the average access value of the terminal in the last 8 hours is counted as Q4, so that the access value score is calculated according to the following formula:
score=d*Q4+e*Q3+f*Q2+g*Q1
wherein d, e, f and g are empirical parameters and satisfy d + e + f + g equal to 1.
The invention also provides a cloud AC, which comprises the cloud AC load balancing device. Specifically, the cloud AC load balancing device includes a processor for implementing each instruction; the processor further comprises a memory for storing instructions suitable for being loaded and executed by the processor, and the processor specifically comprises: judging whether a load balancing condition is met; if yes, counting the number of the access terminals of each wireless access point; judging the wireless access points needing to release the management relation according to the number of the access terminals of each wireless access point; and releasing the management relation of the corresponding wireless access point.
Further comprising: counting the average access value of each wireless access point access terminal in a preset time period; calculating an overload difference value between the number of the wireless access point access terminals currently managed by the cloud controller and a preset threshold value; and determining the wireless access point for releasing the management relationship according to the average access value and the overload difference value. And
counting the average access value of each wireless access point access terminal in a plurality of different time periods; calculating the access value of each wireless access point according to the average access value in different time periods; calculating an overload difference value between the number of the wireless access point access terminals currently managed by the cloud controller and a preset threshold value; and determining the wireless access point for releasing the management relationship according to the access point value and the overload difference value.
It should be noted that the above embodiments can be freely combined as necessary. The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.