Disclosure of Invention
In order to solve the technical problem, the invention provides a method and a device for adjusting an antenna of a router, which dynamically adjust the position of the antenna of the router through signal strength data of an intelligent terminal, and achieve the purpose of signal coverage and achieving the best user experience.
The technical scheme provided by the invention is as follows:
the invention discloses a router antenna adjusting method, which comprises the following steps: driving an antenna of the router to rotate within a preset range; recording signal intensity data of intelligent equipment connected with the router when the antenna rotates; calculating the optimal position of the antenna according to the recorded signal intensity data; and adjusting the router antenna to the optimal position.
Further, the step records signal intensity data of intelligent equipment connected with the router when the antenna rotates; the step of calculating the optimal position of the antenna according to the recorded signal strength data specifically includes: respectively recording signal intensity data of intelligent equipment connected with the router at each position when the antenna rotates, wherein the signal intensity data comprises a plurality of signal intensity values; screening out the maximum signal intensity value according to the recorded signal intensity values; and acquiring an initial position corresponding to the maximum signal intensity value, and taking the initial position as an optimal position.
Further, the method also comprises the following steps: when a new intelligent device is accessed to the router, recording first signal intensity data of the new intelligent device when the antenna rotates respectively; the first signal strength data comprises a plurality of first signal strength values; screening out a first maximum signal intensity value according to the recorded first signal intensity values, and acquiring an updated position corresponding to the first maximum signal intensity value; and calculating according to the obtained updated position and the initial position to obtain the optimal position of the antenna.
Further, the method also comprises the following steps: detecting whether state change occurs in intelligent equipment connected with a router; if so, screening the intelligent equipment except the intelligent equipment with the state change; re-driving the antenna of the router to rotate within a preset range; acquiring second signal intensity data of each intelligent device screened when the antenna rotates; the second signal strength data comprises a plurality of second signal strength values; respectively screening out the maximum signal intensity value of the multiple signal intensity values of each intelligent device, and acquiring alternative positions corresponding to the maximum signal intensity values; and calculating the optimal position of the antenna according to the plurality of candidate positions. .
Further, the step of detecting whether the state of the intelligent device connected to the router changes further includes: detecting whether the network flow of the intelligent equipment is lower than a preset threshold value or not; or, detecting whether the intelligent equipment is disconnected with the router; or whether the intelligent equipment has position change is detected.
The invention also discloses a router antenna adjusting device, which comprises: the driving module is used for driving the antenna of the router to rotate within a preset range; the recording module is used for recording signal intensity data of intelligent equipment connected with the router when the antenna rotates; the computing module is used for computing the optimal position of the antenna according to the recorded signal intensity data; and the antenna adjusting module is used for adjusting the router antenna to the optimal position.
Further, the recording module is specifically configured to record signal strength data of the intelligent device connected to the router, which is received at each position when the antenna rotates, where the signal strength data includes a plurality of signal strength values; the calculation module is specifically configured to screen out a maximum signal intensity value according to the recorded multiple signal intensity values, obtain an initial position corresponding to the maximum signal intensity value, and use the initial position as an optimal position.
Further, the recording module is specifically configured to record first signal strength data of the new intelligent device when the new intelligent device is accessed to the router, respectively, when the antenna rotates; the first signal strength data comprises a plurality of first signal strength values; the calculation module is specifically further configured to screen out a first maximum signal strength value according to the recorded multiple first signal strength values, and obtain an updated position corresponding to the first maximum signal strength value; and calculating according to the obtained updated position and the initial position to obtain the optimal position of the antenna.
Further, still include: the detection module is used for detecting whether the state of the intelligent equipment connected with the router changes or not; the screening module is used for screening the intelligent equipment except the intelligent equipment disconnected with the router or the intelligent equipment with the network flow exceeding a preset threshold value when the network flow of the intelligent equipment is judged to be lower than the preset threshold value or the intelligent equipment is disconnected with the router; the recording module is further used for acquiring second signal intensity data of each intelligent device screened out when the antenna rotates; the second signal strength data comprises a plurality of second signal strength values; the computing module is further used for respectively screening out the maximum signal intensity value of the multiple signal intensity values of each intelligent device and acquiring the alternative position corresponding to each maximum signal intensity value; and calculating the optimal position of the antenna according to the plurality of candidate positions.
Further, the detection module further comprises: the first detection submodule is used for detecting whether the network flow of the intelligent equipment is lower than a preset threshold value or not; the second detection submodule is used for detecting whether the intelligent equipment is disconnected with the router or not; and the third detection submodule is used for detecting whether the intelligent equipment has position change.
Compared with the prior art, the method and the device have the advantages that the signal intensity data of the intelligent device connected with the router is obtained, the antenna position of the router is dynamically adjusted according to the signal intensity data, the purpose of achieving the best user experience through signal coverage is achieved, and the connected intelligent device can obtain better use experience under limited resources.
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. In addition, in order to make the drawings concise and understandable, components having the same structure or function in some of the drawings are only schematically illustrated or only labeled. In this document, "one" means not only "only one" but also a case of "more than one".
Fig. 1 is a schematic diagram illustrating steps of an antenna adjusting method of a router according to an embodiment of the present invention. As shown in fig. 1, a method for adjusting a router antenna includes the steps of: s110, driving an antenna of the router to rotate within a preset range; s120, recording signal intensity data of intelligent equipment connected with the router when the antenna rotates; s130, calculating the optimal position of the antenna according to the recorded signal intensity data; and adjusting the router antenna to the optimal position.
Specifically, the step S110 of driving the antenna of the router to rotate within the preset range is implemented by using a motor connected to the antenna of the router, the antenna is driven by the motor to rotate within the preset range, and the preset range can be customized according to routers of different models, which is not limited herein. The preset range of the rotation of the single-antenna router is similar to a hemisphere, namely 180 degrees, and the multiple antennas are arranged into a 120-degree sector sphere in order to avoid antenna crossing.
Specifically, the step S120 of recording signal strength data of the smart device connected to the router when the antenna rotates and the step S130 of calculating the optimal position of the antenna according to the recorded signal strength data specifically include: respectively recording signal intensity data of intelligent equipment connected with the router at each position when the antenna rotates, wherein the signal intensity data comprises a plurality of signal intensity values; screening out the maximum signal intensity value according to the recorded signal intensity values; and acquiring an initial position corresponding to the maximum signal intensity value, and taking the initial position as an optimal position.
Since the signal strength of the intelligent device is related to the position of the router antenna, when only one intelligent device is connected to the router, the position with the maximum signal strength value is selected as the optimal position.
When the intelligent terminal is connected with the router, the signal intensity data of the intelligent terminal at each position in the rotation process of the antenna is recorded, and the signal intensity data comprises a plurality of signal intensity values. The optimal position of the antenna is calculated according to the signal strength data, the optimal experience of signal coverage can be realized by calculating the maximum signal strength value in a group of signal strength data, taking the initial position corresponding to the maximum signal strength value as the optimal position and adjusting the antenna to the optimal position.
Preferably, fig. 2 is a schematic diagram of steps of another embodiment of the method for adjusting an antenna of a router of the present invention, as shown in fig. 2, further including the steps of: s210, when a new intelligent device is accessed to the router, respectively recording first signal intensity data of the new intelligent device when the antenna rotates; the first signal strength data comprises a plurality of first signal strength values; s220, screening out a first maximum signal intensity value according to the recorded first signal intensity values, and acquiring an updated position corresponding to the first maximum signal intensity value; and S230, calculating according to the obtained updated position and the initial position to obtain the optimal position of the antenna.
Specifically, when a new intelligent device is connected to the router, the optimal position of the antenna is updated according to the first signal strength data of the newly-added intelligent device, the first signal strength values of the new intelligent terminal at different positions of the antenna rotation are respectively recorded according to the above steps, a group of first signal strength data is formed for the new intelligent terminal, the maximum signal strength values in the first signal strength data of the new intelligent terminal are respectively screened, the corresponding updated position is obtained according to the obtained maximum signal strength values, and the updated position and the initial position are calculated to obtain the optimal position of the antenna. Here, the average of the updated position and the initial position may be taken as the optimum position.
Fig. 3 is a schematic diagram illustrating steps of a router antenna adjusting method according to still another embodiment of the present invention. As shown in fig. 3, further comprising the steps of: s310, detecting whether state change occurs to intelligent equipment connected with the router; if yes, executing the next step; s320, screening intelligent equipment except for the state change; s330, re-driving the antenna of the router to rotate within a preset range; s340, obtaining second signal intensity data of each intelligent device screened when the antenna rotates; the second signal strength data comprises a plurality of second signal strength values; s350, respectively screening out the maximum signal intensity value of the multiple signal intensity values of each intelligent device, and acquiring alternative positions corresponding to the maximum signal intensity values; and S360, calculating the optimal position of the antenna according to the plurality of candidate positions.
Specifically, the step of "detecting whether a state change occurs in the smart device connected to the router" further includes: detecting whether the network flow of the intelligent equipment is lower than a preset threshold value or not; or, detecting whether the intelligent equipment is disconnected with the router; or whether the intelligent equipment has position change is detected.
Specifically, whether the intelligent device is not in use of the network or in standby under the routing environment can be obtained through the router, that is, by judging that the network traffic of the intelligent device is lower than a preset threshold, the preset threshold in this embodiment can be defined by itself according to actual needs. And when the intelligent equipment is judged to be temporarily not using the network or in standby, starting the motor, rescanning all the intelligent equipment, recording and processing second signal intensity data of each intelligent equipment, and reacquiring the optimal position of the antenna.
Specifically, whether a certain intelligent device is disconnected currently can be judged through the router, if the disconnected intelligent device exists, the motor is started, the connected intelligent device is rescanned, second signal intensity data of each intelligent device are recorded and processed, and the optimal position of the antenna is obtained again.
Specifically, when the intelligent device changes in position under the routing environment, a barrier is added between the intelligent device and the route, and the signal strength is weakened, and when the change of the set weakened value is greater than or equal to a preset change threshold (in this embodiment, 5db is taken as an example), the motor is started, the intelligent device performs rescanning, the second signal strength data of each intelligent device is recorded and processed, and the optimal position of the antenna is obtained again.
The position of the antenna is optimized by judging whether the state of the intelligent equipment changes or not, the state of the intelligent equipment can be acquired through the existing router, the antenna of the router can be adjusted more flexibly, better network coverage can be obtained, optimal network experience can be provided in real time, and too much cost does not need to be additionally increased.
The invention adopts a preset algorithm to calculate a plurality of alternative positions to obtain an optimal position, wherein the preset algorithm is specifically determined according to actual needs, the average value of the alternative positions can be taken as the optimal position, and the position with the maximum corresponding signal intensity value in the alternative positions as the maximum can also be selected as the optimal position.
Fig. 4 is a schematic diagram of the main components of an antenna adjustment apparatus of a router according to the present invention. As shown in fig. 4, a router antenna adjusting apparatus includes: the driving module 100 is configured to drive an antenna of the router to rotate within a preset range; the recording module 200 is configured to record signal strength data of the intelligent device connected to the router, which is received at each position when the antenna rotates, respectively; a calculating module 300, configured to calculate an optimal position of the antenna according to the recorded signal strength data; and an antenna adjusting module 400, configured to adjust the router antenna to an optimal position.
Specifically, the antenna of the router driven by the driving module 100 to rotate within the preset range is realized by the motor connected with the antenna of the router, the antenna is driven by the motor to rotate within the preset range, and the preset range can be customized according to routers of different models, which is not limited herein. The preset range of the rotation of the single-antenna router is similar to a hemisphere, namely 180 degrees, and the multiple antennas are arranged into a 120-degree sector sphere in order to avoid antenna crossing.
When the intelligent terminal is connected with the router, the signal intensity data of the intelligent terminal at each position in the rotation process of the antenna is recorded, and the signal intensity data comprises a plurality of signal intensity values. The optimal position of the antenna is calculated according to the signal strength data, the optimal experience of signal coverage can be realized by calculating the maximum signal strength value in a group of signal strength data, taking the initial position corresponding to the maximum signal strength value as the optimal position and adjusting the antenna to the optimal position.
Preferably, the recording module 200 is further configured to, when a new intelligent device accesses the router, respectively record first signal strength data of the new intelligent device when the antenna rotates; the first signal strength data comprises a plurality of first signal strength values; the calculating module 300 is further specifically configured to filter out a first maximum signal strength value according to the recorded multiple first signal strength values, and obtain an updated position corresponding to the first maximum signal strength value; and calculating according to the obtained updated position and the initial position to obtain the optimal position of the antenna.
Specifically, when a new intelligent device is connected to the router, the optimal position of the antenna is updated according to the first signal strength data of the newly-added intelligent device, the first signal strength values of the new intelligent terminal at different positions of the antenna rotation are respectively recorded according to the above steps, a group of first signal strength data is formed for the new intelligent terminal, the maximum signal strength values in the first signal strength data of the new intelligent terminal are respectively screened, the corresponding updated position is obtained according to the obtained maximum signal strength values, and the updated position and the initial position are calculated to obtain the optimal position of the antenna. Here, the average of the updated position and the initial position may be taken as the optimum position.
Fig. 5 is a complete composition diagram of a router antenna adjusting apparatus according to the present invention. As shown in fig. 5, it preferably further includes: the detection module 500 detects whether the state of the intelligent device connected with the router changes; the screening module 600 is configured to screen the intelligent devices except for the intelligent devices disconnected from the router or the intelligent devices with network traffic exceeding a preset threshold when it is determined that the network traffic of the intelligent devices is lower than the preset threshold or the intelligent devices are disconnected from the router; the recording module 200 is further configured to obtain second signal strength data of each smart device screened when the antenna rotates; the second signal strength data comprises a plurality of second signal strength values; the calculation module 300 is further configured to respectively screen out a maximum signal strength value of the multiple signal strength values of each intelligent device, and obtain an alternative location corresponding to each maximum signal strength value; and calculating the optimal position of the antenna according to the plurality of candidate positions.
Preferably, the detection module 500 further comprises: the first detection sub-module 510 is configured to detect whether a network traffic of the smart device is lower than a preset threshold; a second detection submodule 520, configured to detect whether the smart device is disconnected from the router; and a third detection submodule 530, configured to detect whether a location of the smart device changes.
Specifically, whether the intelligent device is not in use of the network or in standby under the routing environment can be obtained through the router, that is, by judging that the network traffic of the intelligent device is lower than a preset threshold, the preset threshold in this embodiment can be defined by itself according to actual needs. And when the intelligent equipment is judged to be temporarily not using the network or in standby, starting the motor, rescanning all the intelligent equipment, recording and processing second signal intensity data of each intelligent equipment, and reacquiring the optimal position of the antenna.
Specifically, whether a certain intelligent device is disconnected currently can be judged through the router, if the disconnected intelligent device exists, the motor is started, the connected intelligent device is rescanned, second signal intensity data of each intelligent device are recorded and processed, and the optimal position of the antenna is obtained again.
Specifically, when the intelligent device changes in position under the routing environment, a barrier is added between the intelligent device and the route, and the signal strength is weakened, and when the change of the set weakened value is greater than or equal to a preset change threshold (in this embodiment, 5db is taken as an example), the motor is started, the intelligent device performs rescanning, the second signal strength data of each intelligent device is recorded and processed, and the optimal position of the antenna is obtained again.
The position of the antenna is optimized by judging whether the state of the intelligent equipment changes or not, the state of the intelligent equipment can be acquired through the existing router, the antenna of the router can be adjusted more flexibly, better network coverage can be obtained, optimal network experience can be provided in real time, and too much cost does not need to be additionally increased.
According to the method and the device, the signal intensity data of the intelligent device connected with the router are obtained, and the antenna position of the router is dynamically adjusted according to the signal intensity data, so that the purpose of achieving the best user experience through signal coverage is achieved, and the connected intelligent device can obtain better use experience under the limited resources.
It should be noted that the information interaction, execution process, and other contents between the modules in the apparatus are based on the same concept as the method embodiment, and specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
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.