Disclosure of Invention
The invention aims to provide an agent AP automatic discovery device and system, which can realize the automatic discovery of the agent AP in a local area network and improve the system performance.
The technical scheme provided by the invention is as follows:
a proxy AP automatic discovery device is applied to a wireless AP, and comprises the following components:
a processor for processing instructions; and
a memory for storing a plurality of instructions, the instructions adapted to be loaded and executed by the processor; the plurality of instructions includes:
receiving multicast messages sent by other wireless APs in the local area network;
and judging the wireless AP with the strongest proxy capability according to the received multicast message in a preset time period, and using the wireless AP as a proxy AP.
In the technical scheme, the wireless AP with the strongest proxy capability is judged as the proxy AP in the wireless APs according to the received multicast message, so that data communication between the proxy AP and the cloud AC is realized, simplicity and convenience are realized, resources are saved, more wireless APs in the local area network can be ensured to be capable of accessing the cloud AC for communication, and the stability of the system is improved.
Further preferably, the multicast packet includes: identification information of the wireless AP, performance parameters for evaluating the wireless AP proxy capability, and a proxy flag for marking whether the wireless AP is a proxy AP.
Further preferably, the step of determining the wireless AP with the strongest proxy capability according to the received multicast packet within the preset time period in the instruction includes:
judging whether the AP can be used as an agent AP or not according to an agent mark stored inside; if so, the first and second sensors are capable of,
counting multicast messages received in a preset time period;
counting wireless APs which can be used as proxy APs according to proxy marks in the multicast messages;
and comparing the performance parameters of the wireless AP with the performance parameters of other wireless APs which can be used as proxy APs, judging the wireless AP with the strongest proxy capability, and using the wireless AP as the proxy AP.
In the technical scheme, the wireless AP with the strongest proxy capability is selected as the proxy AP from the wireless APs of the received multicast message and the wireless APs with the strongest proxy capability, so that the wireless APs needing to be communicated with the cloud AC in the local area network can be realized through the proxy AP without connecting each wireless AP with the cloud AC, and resources in the cloud AC are effectively saved.
Further preferably, in the instruction, whether or not the own can be regarded as the proxy AP is judged based on the internally stored proxy flag, and if the own can be regarded as the proxy AP, the own can be regarded as the proxy AP
And sending the multicast message periodically.
Further preferably, in the wireless AP with the strongest proxy capability determined by the instruction according to the received multicast packet within the preset time period, if it is determined that the wireless AP cannot be used as a proxy AP, the wireless AP is determined to be unable to serve as the proxy AP
Counting multicast messages received in a preset time period;
counting wireless APs which can be used as proxy APs according to proxy marks in the multicast messages;
and comparing the performance parameters of the wireless APs capable of being used as the proxy APs with each other to judge the wireless AP with the strongest proxy capability, and using the wireless AP as the proxy AP.
In the technical scheme, the wireless AP with the strongest proxy capability is selected from the wireless APs receiving the multicast message as the proxy AP, so that the wireless APs needing to be communicated with the cloud AC in the local area network can be realized through the proxy AP without connecting each wireless AP with the cloud AC, and resources in the cloud AC are effectively saved.
In the technical scheme, before the agent AP is automatically discovered, whether each wireless AP in the local area network is used as the agent AP or not is marked, so that in the process that a certain wireless AP selects the agent AP according to the received multicast message, the wireless AP marked as the agent AP can be selected, and the aim is achieved.
Further preferably, a proxy performance threshold is stored in the memory;
the multicast message comprises: identification information of the wireless AP and performance parameters for evaluating the wireless AP proxy capability.
Further preferably, the step of determining the wireless AP with the strongest proxy capability according to the received multicast packet within the preset time period in the instruction includes:
comparing the performance parameters stored in the device with an agent performance threshold value, and judging whether the device can be used as an agent AP or not; if so, the first and second sensors are capable of,
counting multicast messages received in a preset time period;
comparing the performance parameters in the multicast message with an agent performance threshold value, and counting wireless APs which can be used as agent APs;
and comparing the performance parameters of the wireless AP with the performance parameters of other wireless APs which can be used as proxy APs, judging the wireless AP with the strongest proxy capability, and using the wireless AP as the proxy AP.
In the technical scheme, the wireless AP with the strongest proxy capability is selected as the proxy AP from the wireless APs of the received multicast message and the wireless APs with the strongest proxy capability, so that the wireless APs needing to be communicated with the cloud AC in the local area network can be realized through the proxy AP without connecting each wireless AP with the cloud AC, and resources in the cloud AC are effectively saved.
Further preferably, the instruction compares the performance parameter stored in the instruction with the proxy performance threshold value to determine whether the instruction can be used as the proxy AP, and if the instruction can be used as the proxy AP, the instruction is executed
And sending the multicast message periodically.
Further preferably, in the wireless AP with the strongest proxy capability determined by the instruction according to the received multicast packet within the preset time period, if it is determined that the wireless AP cannot be used as a proxy AP, the wireless AP is determined to be unable to serve as the proxy AP
Counting multicast messages received in a preset time period;
comparing the performance parameters in the multicast message with an agent performance threshold value, and counting wireless APs which can be used as agent APs;
and comparing the performance parameters of the wireless APs capable of being used as the proxy APs with each other to judge the wireless AP with the strongest proxy capability, and using the wireless AP as the proxy AP.
In the technical scheme, the wireless AP with the strongest proxy capability is selected from the wireless APs receiving the multicast message as the proxy AP, so that the wireless APs needing to be communicated with the cloud AC in the local area network can be realized through the proxy AP without connecting each wireless AP with the cloud AC, and resources in the cloud AC are effectively saved.
The invention also provides an agent AP automatic discovery system, which comprises a plurality of wireless APs, wherein each wireless AP comprises the agent AP automatic discovery device and a cloud AC;
after discovering the proxy AP through the proxy AP automatic discovery device, the wireless AP performs data communication with the cloud AC through the proxy AP.
In the technical scheme, the wireless AP with the strongest proxy capability is judged as the proxy AP in the wireless APs according to the received multicast message, so that data communication between the proxy AP and the cloud AC is realized, simplicity and convenience are realized, resources are saved, more wireless APs in the local area network can be ensured to be capable of accessing the cloud AC for communication, and the stability of the system is improved.
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, the proxy AP auto-discovery apparatus provided in the present invention is specifically applied to a wireless AP, a local area network includes a plurality of wireless APs, and as can be seen from the figure, the proxy AP auto-discovery apparatus 100 includes: a processor 120 for processing instructions; and a memory 110 for storing a plurality of instructions, the instructions adapted to be loaded and executed by the processor.
As shown in FIG. 2, in one embodiment, the plurality of instructions includes:
s10 receiving multicast messages sent by other wireless APs in the local area network;
s20 judges the wireless AP with the strongest proxy ability according to the received multicast message in the preset time period, and takes the wireless AP as the proxy AP.
In this embodiment, during operation, each wireless AP in the local area network transmits a multicast packet at intervals of a period T (e.g., every 5 minutes, every 10 minutes, etc.). After a certain wireless AP including the proxy AP automatic discovery device is started, the multicast message sent by other wireless APs in the local area network is received and stored. And then, checking and analyzing all multicast messages received within a preset time period T (such as within 20 minutes, within 30 minutes and the like) to obtain performance parameters of each wireless AP, further judging the wireless AP with the strongest proxy capability according to the performance parameters of each wireless AP, and using the wireless AP as a proxy AP to realize automatic discovery of the proxy AP.
Specifically, in the process of selecting the wireless AP with the strongest proxy capability according to the performance parameters, the judgment is performed according to the preset rule. For example, in an example, the performance parameter is a preset performance score, which is also set by a user according to the performance of the wireless AP during configuration, so that the wireless AP with the highest performance score is used as the proxy AP in the process of selecting the proxy AP by the proxy AP auto-discovery device; and if the performance scores of the plurality of wireless APs are found to be the same, randomly selecting the AP. For another example, in another example, the performance parameter includes, in addition to the preset performance score, the number of current access terminals of the wireless AP, and the proxy AP auto-discovery apparatus takes the wireless AP with the highest performance score as the proxy AP in the process of selecting the proxy AP; and if the performance scores of the plurality of wireless APs are the same, selecting the wireless AP with less current access terminals as the proxy AP. For another example, the performance score included in the performance parameter is not set by the user, but is calculated by the wireless AP according to the performance parameter and the rule set by the user, for example, the performance score is obtained by the wireless AP through comprehensive calculation according to the CPU performance and the memory size, where the CPU performance and the memory size each account for a certain proportion, the CPU performance accounts for 70%, the memory size accounts for 30%, and the like.
In another embodiment, as shown in FIG. 3, the plurality of instructions includes:
s10 receiving multicast messages sent by other wireless APs in the local area network;
s21 judging whether it can be used as proxy AP according to the stored proxy mark; if yes, go to step S22;
s22 counting the multicast messages received in the preset time period;
s23, according to the proxy mark statistics in the multicast message, the wireless AP which can be used as the proxy AP is counted;
s24 compares the performance parameters of its own AP with those of other APs that can serve as proxy APs, determines the wireless AP with the strongest proxy capability, and uses it as a proxy AP.
In this embodiment, before the proxy AP auto-discovery apparatus operates, the administrator marks whether each wireless AP is a proxy AP according to the performance and location of the wireless AP in the local area network. In the classification process, each wireless AP in the local area network is divided into a wireless AP capable of being used as a proxy AP and a wireless AP incapable of being used as a proxy AP, and the two types of wireless APs are respectively marked, for example, the wireless AP capable of being used as a proxy AP is marked as 1, the wireless AP incapable of being used as a proxy AP is marked as 0, and the like, so that the subsequent proxy AP automatic discovery device finds out the wireless AP capable of being used as a proxy AP according to the proxy mark in the judgment process, and further judges.
In the working process, each wireless AP in the local area network sends a multicast message at intervals of T, where the multicast message includes identification information (e.g., MAC address) of the wireless AP, performance parameters for evaluating the proxy capability of the wireless AP, and a proxy flag for marking whether the wireless AP is a proxy AP. The performance parameters include: the CPU performance, the memory size, the AP access number, the maximum concurrent number and the like are set according to actual conditions.
After a certain wireless AP including the proxy AP automatic discovery device is started, the multicast message sent by other wireless APs in the local area network is received and stored. Then, checking the self agent mark, judging whether the self can be used as an agent AP or not according to the agent mark, and if the self can be used as the agent AP; and then, checking and analyzing all multicast messages received within a preset time period T × N (such as within 20 minutes, within 30 minutes and the like) to obtain the proxy mark and the performance parameters of each wireless AP, comparing the performance parameters of the wireless AP with the performance parameters of other wireless APs capable of being used as proxy APs to obtain the wireless AP with the strongest performance, and using the wireless AP as the proxy AP to realize the automatic discovery of the proxy AP. And if no wireless AP can be used as the proxy AP, directly using the wireless AP as the proxy AP.
If the user can not be used as the proxy AP, receiving messages sent by other wireless APs in the local area network in real time and counting; and after the preset time is up, checking and analyzing all received multicast messages to obtain the agent marks and performance parameters of all the wireless APs, comparing the performance parameters of the wireless APs which can be used as the agent APs with each other to judge the wireless AP with the strongest agent capability, and using the wireless AP as the agent AP.
In another embodiment, only wireless APs that can act as proxy APs send multicast messages. After each wireless AP in the local area network is powered on, firstly, whether the wireless AP can be used as a proxy AP or not is judged, and if the wireless AP can be used as the proxy AP, multicast is sent periodically; if not, the multicast is not sent. Therefore, in this embodiment, after receiving the multicast packet transmitted by another wireless AP in real time in the local area network, the wireless AP only needs to determine whether it can be used as a proxy AP, and then selects a proxy AP from among the wireless APs transmitting the multicast packet and itself, thereby reducing the burden of the wireless AP.
In the above embodiment, in the process of selecting the wireless AP with the strongest proxy capability according to the performance parameter, the determination is performed according to the preset rule. For example, in an example, comprehensive judgment is performed according to the performance of the CPU and the size of the memory, and the performance of the CPU is used as a first judgment criterion, specifically, in the judgment process, the performance of the CPU of the wireless AP that can be used as the proxy AP is compared first, and the wireless AP with the best performance of the CPU is used as the proxy AP; if the wireless AP with the same CPU performance appears, the wireless AP with a larger memory is used as a proxy AP; and if the wireless AP with the same CPU performance and memory size exists, randomly selecting the wireless AP. For another example, in addition to considering the CPU performance and the memory size of the wireless AP, the number of the current wireless AP access terminals is also considered, specifically, the CPU performance of the wireless AP that can serve as the proxy AP is compared first, and the wireless AP with the best CPU performance is taken as the proxy AP; if the wireless AP with the same CPU performance appears, the wireless AP with a larger memory is used as a proxy AP; and if the wireless AP with the same CPU performance and memory size exists, taking the wireless AP with the least number of the current access terminals as the proxy AP. It should be noted that, the above only shows two judgment rules for selecting the proxy AP, and in practical application, the judgment rules may be set according to practical situations, for example, in the selection process, the wireless APs with the number of access terminals greater than a certain threshold are excluded first, and then the wireless APs are selected from the remaining wireless APs; for another example, the comprehensive judgment is performed according to the CPU performance and the memory size of the wireless AP, and the CPU performance and the memory size each account for a certain proportion to judge the proxy performance of the wireless AP, for example, the CPU performance accounts for 60%, the memory size accounts for 40%, and the like. Therefore, in the local area network, the wireless APs needing to be communicated with the cloud AC can be realized through the proxy AP without connecting each wireless AP with the cloud AC, and resources in the cloud AC are effectively saved.
In another embodiment, as shown in fig. 4, the instructions include:
s10 receiving multicast messages sent by other wireless APs in the local area network;
s31, according to the comparison between the internal stored performance parameter and the agent performance threshold, judging whether the AP can be used as the agent AP; if yes, go to step S32;
s32 counting the multicast messages received in the preset time period;
s33, comparing the performance parameters in the multicast message with the agent performance threshold value, and counting the wireless APs capable of serving as agent APs;
s34 compares the performance parameters of its own AP with those of other APs that can serve as proxy APs, determines the wireless AP with the strongest proxy capability, and uses it as a proxy AP.
In the present embodiment, before the proxy AP auto-discovery device operates, the administrator sets and stores proxy performance thresholds in the memory according to the performance of each wireless AP in the local area network. Therefore, the proxy AP automatic discovery device classifies the wireless AP sending the multicast according to the proxy performance threshold in the process of selecting the proxy AP, compares the performance parameters of each wireless AP in the local area network with the proxy performance threshold in the classifying process, if the performance parameters can meet the proxy performance threshold, the wireless AP can be used as the proxy AP, otherwise, the wireless AP can not be used as the proxy AP is divided, and then the proxy AP is selected from the wireless APs which can be used as the proxy AP.
In the working process, each wireless AP in the local area network sends a multicast message every period T, where the multicast message includes identification information (e.g., MAC address) of the wireless AP and performance parameters for evaluating the proxy capability of the wireless AP. The performance parameters include: the CPU performance, the memory size, the AP access number, the maximum concurrent number and the like are set according to actual conditions.
After a certain wireless AP including the agent AP automatic discovery device is started, firstly, comparing the performance parameter of the wireless AP with an agent performance threshold value, and judging whether the wireless AP can be used as an agent AP or not; if yes, periodically sending multicast, receiving multicast messages sent by other wireless APs in the local area network in real time, and storing the multicast messages; then, checking and analyzing all multicast messages received within a preset time period T × N (such as within 10 minutes, within 20 minutes and the like) to obtain performance parameters of each wireless AP, and then comparing the performance parameters with a proxy performance threshold value to judge the wireless AP capable of serving as the proxy AP; and finally, comparing the performance parameters of the wireless AP with the performance parameters of other wireless APs capable of being used as proxy APs, judging the wireless AP with the strongest proxy capability, and using the wireless AP as the proxy AP.
If judging that the wireless AP can not be used as a proxy AP, receiving messages sent by other wireless APs in the local area network in real time and counting; after the preset time is up, checking and analyzing all received multicast messages to obtain the performance parameters of each wireless AP, comparing the performance parameters of each wireless AP with an agent performance threshold value, and judging the wireless AP which can be used as an agent AP; and finally, comparing the performance parameters of other wireless APs which can be used as proxy APs with each other, judging the wireless AP with the strongest proxy capability, and using the wireless AP as the proxy AP.
In another embodiment, only wireless APs that can act as proxy APs send multicast messages. After each wireless AP in the local area network is powered on, firstly, comparing the performance parameter of the wireless AP with an agent performance threshold value to judge whether the wireless AP can be used as an agent AP or not, and if the wireless AP can be used as the agent AP, periodically sending multicast; if not, the multicast is not sent. Therefore, in this embodiment, after receiving the multicast packet transmitted by another wireless AP in real time in the local area network, the wireless AP only needs to determine whether it can be used as a proxy AP, and then selects a proxy AP from among the wireless APs transmitting the multicast packet and itself, thereby reducing the burden of the wireless AP.
In the above embodiment, in the process of selecting the wireless AP with the strongest proxy capability according to the performance parameter, the determination is performed according to the preset rule. For example, in an example, comprehensive judgment is performed according to the performance of the CPU and the memory size, a first threshold is set according to the performance of the CPU, and a second threshold is set according to the memory size, so that in the judgment process, firstly, the performance of the CPU and the memory size of the user are respectively compared with the first threshold and the second threshold, and if two conditions can be met, the user can be judged to be able to serve as the proxy AP; and then, judging whether other wireless APs can be used as proxy APs or not by adopting the same method. And if no wireless AP can be used as the proxy AP, directly using the wireless AP as the proxy AP. If a plurality of wireless APs are judged to meet the proxy condition, the performance of each wireless AP is further compared. In other examples, the agent performance threshold may also be set according to other parameters, such as setting the threshold of the number of access terminals, or setting the threshold of the number of concurrency, which is not limited herein and is determined according to the actual situation.
In the process of selecting the proxy AP from the wireless APs capable of serving as the proxy AP, the selection is also performed according to a preset rule, for example, in one example, the wireless AP with the best CPU performance is taken as the proxy AP; if the wireless AP with the same CPU performance appears, the wireless AP with a larger memory is used as a proxy AP; and if the wireless AP with the same CPU performance and memory size exists, randomly selecting the wireless AP. For another example, in addition to considering the CPU performance and the memory size of the wireless AP, the number of the current wireless AP access terminals is also considered, specifically, the CPU performance of the wireless AP that can serve as the proxy AP is compared first, and the wireless AP with the best CPU performance is taken as the proxy AP; if the wireless AP with the same CPU performance appears, the wireless AP with a larger memory is used as a proxy AP; and if the wireless AP with the same CPU performance and memory size exists, taking the wireless AP with the least number of the current access terminals as the proxy AP. It should be noted that, the above only shows two judgment rules for selecting the proxy AP, and in practical application, the judgment rules may be set according to practical situations, for example, in the selection process, the wireless APs with the number of access terminals greater than a certain threshold are excluded first, and then the wireless APs are selected from the remaining wireless APs; for another example, the comprehensive judgment is performed according to the CPU performance and the memory size of the wireless AP, and the CPU performance and the memory size each account for a certain proportion to judge the proxy performance of the wireless AP, for example, the CPU performance accounts for 70%, the memory size accounts for 30%, and the like.
Based on the proxy AP automatic discovery device, the invention further provides a proxy AP automatic discovery system, and specifically, the proxy AP automatic discovery system includes a cloud AC and a plurality of wireless APs, and each wireless AP includes the proxy AP automatic discovery device.
In the working process, the wireless AP regularly discovers the proxy AP through the proxy AP automatic discovery device, the data needing to be sent to the cloud AC by the wireless AP is forwarded, the communication connection with the cloud AC is realized through the proxy AP, therefore, in the local area network, the wireless AP needing to be communicated with the cloud AC can be realized through the proxy AP without connecting each wireless AP with the cloud AC, the resources in the cloud AC are effectively saved, the fact that each wireless AP can access the cloud AC to communicate in more local area networks is guaranteed, and the stability of the system is improved.
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.