Disclosure of Invention
In view of the shortcomings of the prior art, the application aims to provide a mobile terminal WIFI connection processing method, a mobile terminal and a storage medium, and aims to quickly find a corresponding access point to perform operations such as access and subsequent connection when the mobile terminal uses WIFI to find the access point, reduce the time of access point search, improve the WIFI access efficiency and bring convenience to users.
In order to achieve the above purpose, the application adopts the following technical scheme:
a WIFI connection processing method of a mobile terminal comprises the following steps:
a counter is allocated for each WIFI access point type in advance;
the central processing unit of the mobile terminal opens a preset first WIFI module and a preset second WIFI module, and sets the first WIFI module and the second WIFI module as access point searching modules;
when the central processor acquires a WIFI access point from the first WIFI module or acquires a WIFI access point from the second WIFI module, the type counter corresponding to the WIFI access point is increased by 1;
according to counters corresponding to various WIFI access point types, setting a second WIFI module to detect only three types of WIFI access points with the largest count values; and setting the first WIFI module to only detect other types of WIFI access points.
The method for processing the WIFI connection of the mobile terminal, before the step of allocating a counter for each WIFI access point type in advance, comprises the following steps: a first WIFI module and a second WIFI module for searching a WIFI access point are preset on the mobile terminal.
The step of allocating a counter for each WIFI access point type in advance includes:
distributing a corresponding counter for the supported various WIFI access point types, and resetting each counter value;
among the various WIFI access point types that have been supported are the following: 802.11a operates in the 5.4G band with a maximum rate of 54 megabits; 802.11b operates in the 2.4G band, 11 megabits at highest rate; 802.11G operates in the 2.4G band with a maximum rate of 54 megabits; the 802.11n highest rate can be up to 300 megabits.
According to the WIFI connection processing method of the mobile terminal, a central processor of the mobile terminal opens a preset first WIFI module and a preset second WIFI module, and the steps of setting the first WIFI module and the second WIFI module as access point searching modules comprise the following steps:
simultaneously opening a first WIFI module and a second WIFI module, and setting the first WIFI module and the second WIFI module as access point searching modules;
or firstly opening a second WIFI module, setting the second WIFI module as an access point searching module, and waiting for preset first searching time; and opening the first WIFI module, and setting the first WIFI module as an access point searching module.
According to the WIFI connection processing method of the mobile terminal, when the central processor acquires a WIFI access point from the first WIFI module or acquires a WIFI access point from the second WIFI module, the step of adding 1 to a type counter corresponding to the WIFI access point comprises the following steps:
when the central processor acquires a WIFI access point from the first WIFI module or acquires a WIFI access point from the second WIFI module;
acquiring a type corresponding to the WIFI access point;
and adding 1 to a type counter corresponding to the WIFI access point.
According to the WIFI connection processing method of the mobile terminal, the second WIFI module is set to detect only three types of WIFI access points with the largest count value according to the counters corresponding to the types of the various WIFI access points; the step of setting the first WIFI module to detect only other types of WIFI access points includes:
setting a query timer, and checking the values of the counters corresponding to the various WIFI access point types at intervals of set query time;
setting a second WIFI module to detect only three types of WIFI access points with maximum count values;
and setting the first WIFI module to only detect other types of WIFI access points.
A mobile terminal, comprising: a processor, a memory, and a communication bus;
the memory stores a mobile terminal WIFI connection processing program which can be executed by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor executes the WIFI connection processing program of the mobile terminal, and then the following steps are realized:
a counter is allocated for each WIFI access point type in advance;
the central processing unit of the mobile terminal opens a preset first WIFI module and a preset second WIFI module, and sets the first WIFI module and the second WIFI module as access point searching modules;
when the central processor acquires a WIFI access point from the first WIFI module or acquires a WIFI access point from the second WIFI module, the type counter corresponding to the WIFI access point is increased by 1;
according to counters corresponding to various WIFI access point types, setting a second WIFI module to detect only three types of WIFI access points with the largest count values; and setting the first WIFI module to only detect other types of WIFI access points.
The mobile terminal, wherein the processor executes the mobile terminal WIFI connection processing program to further implement the following steps:
a first WIFI module and a second WIFI module for searching a WIFI access point are preset on the mobile terminal.
The mobile terminal, wherein the processor executes the mobile terminal WIFI connection processing program to further implement the following steps:
distributing a corresponding counter for the supported various WIFI access point types, and resetting each counter value;
among the various WIFI access point types that have been supported are the following: 802.11a operates in the 5.4G band with a maximum rate of 54 megabits; 802.11b operates in the 2.4G band, 11 megabits at highest rate; 802.11G operates in the 2.4G band with a maximum rate of 54 megabits; the highest rate of 802.11n can be up to 300 megabits;
simultaneously opening a first WIFI module and a second WIFI module, and setting the first WIFI module and the second WIFI module as access point searching modules;
or firstly opening a second WIFI module, setting the second WIFI module as an access point searching module, and waiting for preset first searching time; opening the first WIFI module, and setting the first WIFI module as an access point searching module;
when the central processor acquires a WIFI access point from the first WIFI module or acquires a WIFI access point from the second WIFI module;
acquiring a type corresponding to the WIFI access point;
adding 1 to a type counter corresponding to the WIFI access point;
setting a query timer, and checking the values of the counters corresponding to the various WIFI access point types at intervals of set query time;
setting a second WIFI module to detect only three types of WIFI access points with maximum count values;
and setting the first WIFI module to only detect other types of WIFI access points.
A computer readable storage medium, wherein the computer readable storage medium stores one or more programs executable by one or more processors to implement steps in the mobile terminal WIFI connection processing method of any one of the claims.
Compared with the prior art, the WIFI connection processing method for the mobile terminal, the mobile terminal and the storage medium provided by the application have the advantages that a counter is allocated to each WIFI access point type in advance; the central processing unit opens the first WIFI module and the second WIFI module, and sets the first WIFI module and the second WIFI module as access point searching modules; when the central processor acquires a WIFI access point from the first WIFI module or acquires a WIFI access point from the second WIFI module, the type counter corresponding to the WIFI access point is increased by 1; according to counters corresponding to various WIFI access point types, setting a second WIFI module to detect only three types of WIFI access points with the largest count values; and setting the first WIFI module to only detect other types of WIFI access points. When the mobile terminal uses WIFI to find the access point, the mobile terminal can quickly find the corresponding access point to perform access, subsequent connection and other operations, so that the access point searching time is shortened, the WIFI access efficiency is improved, and convenience is brought to users.
Detailed Description
In order to make the objects, technical solutions and effects of the present application clearer and more specific, the present application will be described in further detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Referring to fig. 1, the method for processing WIFI connection of a mobile terminal provided by the present application includes the following steps:
s100, a counter is allocated to each WIFI access point type in advance.
S200, a central processor of the mobile terminal opens a preset first WIFI module and a preset second WIFI module, and the first WIFI module and the second WIFI module are set to be access point searching modules.
S300, when the central processor acquires a WIFI access point from the first WIFI module or acquires a WIFI access point from the second WIFI module, adding 1 to a type counter corresponding to the WIFI access point.
S400, setting a second WIFI module to only detect three types of WIFI access points with the largest count value according to counters corresponding to various types of WIFI access points; and setting the first WIFI module to only detect other types of WIFI access points.
In the embodiment of the application, before implementation, a first WIFI module and a second WIFI module for searching the WIFI access point are required to be preset on the mobile terminal.
The step of pre-allocating a counter for each WIFI access point type includes:
distributing a corresponding counter for the supported various WIFI access point types, and resetting each counter value;
among the various WIFI access point types that have been supported are the following: 802.11a operates in the 5.4G band with a maximum rate of 54 megabits; 802.11b operates in the 2.4G band, 11 megabits at highest rate; 802.11G operates in the 2.4G band with a maximum rate of 54 megabits; the 802.11n highest rate can be up to 300 megabits. For example, a counter 1 is allocated for counting the number of connections of the access point 802.11 a; a counter 2 is allocated for counting the number of connections of 802.11b access points, etc.;
the method for setting the access point search module comprises the following steps that a central processor of the mobile terminal opens a preset first WIFI module and a preset second WIFI module, and the first WIFI module and the second WIFI module are set as the access point search module, wherein the steps comprise:
simultaneously opening a first WIFI module and a second WIFI module, and setting the first WIFI module and the second WIFI module as access point searching modules;
or firstly opening a second WIFI module, setting the second WIFI module as an access point searching module, and waiting for preset first searching time; and opening the first WIFI module, and setting the first WIFI module as an access point searching module. Wherein the preset searching time is less than 0.5 seconds.
When the central processor acquires a WIFI access point from the first WIFI module, or when the central processor acquires a WIFI access point from the second WIFI module, the step of adding 1 to the type counter corresponding to the WIFI access point includes:
when the central processor acquires a WIFI access point from the first WIFI module or acquires a WIFI access point from the second WIFI module;
acquiring a type corresponding to the WIFI access point;
and adding 1 to a type counter corresponding to the WIFI access point.
The second WIFI module is set to only detect three types of WIFI access points with the largest count value according to the counters corresponding to the types of the various WIFI access points; the step of setting the first WIFI module to detect only other types of WIFI access points includes:
for example, a query timer is set, and the values of the counters corresponding to the various WIFI access point types are checked every set query time;
setting a second WIFI module to detect only three types of WIFI access points with maximum count values; in this embodiment, the three types of WIFI access points with the largest count value, that is, the first three types of WIFI access points with the largest count value, where the mobile terminal uses the largest frequency, are typically households, companies, dining halls with work, and the like, and when the mobile terminal uses WIFI to find an access point, the mobile terminal can quickly find the corresponding access point to perform operations such as access, subsequent connection, and the like, so that the time of access point search is reduced, the WIFI access efficiency is improved, and convenience is brought to users.
And setting the first WIFI module to only detect other types of WIFI access points.
From the above, the application provides a WIFI connection processing method of a mobile terminal, which comprises the steps of distributing a counter for each WIFI access point type in advance; the central processing unit opens the first WIFI module and the second WIFI module, and sets the first WIFI module and the second WIFI module as access point searching modules; when the central processor acquires a WIFI access point from the first WIFI module or acquires a WIFI access point from the second WIFI module, the type counter corresponding to the WIFI access point is increased by 1; according to counters corresponding to various WIFI access point types, setting a second WIFI module to detect only three types of WIFI access points with the largest count values; and setting the first WIFI module to only detect other types of WIFI access points. When the mobile terminal uses WIFI to find the access point, the mobile terminal can quickly find the corresponding access point to perform access, subsequent connection and other operations, so that the access point searching time is shortened, the WIFI access efficiency is improved, and convenience is brought to users.
As shown in fig. 2, based on the above-mentioned WIFI connection processing method for a mobile terminal, the present application further provides a mobile terminal, where the mobile terminal may be a mobile phone, a desktop computer, a notebook computer, a palm computer, a server, and other computing devices. The mobile terminal comprises a processor 10, a memory 20 and a display screen 30, wherein the processor 10 is connected with the memory 20 through a communication bus 50, and the display screen 30 is connected with the processor 10 through the communication bus 50. Fig. 2 shows only some of the components of the mobile terminal, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may alternatively be implemented.
The memory 20 may in some embodiments be an internal storage unit of the mobile terminal, such as a memory of the mobile terminal. The memory 20 may also be an external storage device of the mobile terminal in other embodiments, such as a plug-in type usb Flash drive, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like. Further, the memory 20 may also include both an internal storage unit and an external storage device of the mobile terminal. The memory 20 is used for storing application software installed in the mobile terminal and various data, such as program codes for installing the mobile terminal. The memory 20 may also be used to temporarily store data that has been output or is to be output. In an embodiment, the memory 20 stores a mobile terminal WIFI connection processing method program 40, and the mobile terminal WIFI connection processing method program 40 can be executed by the processor 10, so as to implement the mobile terminal WIFI connection processing method of the present application.
The processor 10 may be a central processing unit (Central Processing Unit, CPU), microprocessor, mobile phone baseband processor or other data processing chip in some embodiments, for running the program code or processing data stored in the memory 20, for example, performing the mobile terminal WIFI connection processing method, etc.
The display screen 30 may be an LED display screen, a liquid crystal display screen, a touch-control type liquid crystal display screen, an OLED (Organic Light-Emitting Diode) touch device, or the like in some embodiments. The display screen 30 is used for displaying information on the mobile terminal and for displaying a visual user interface. The components 10-30 of the mobile terminal communicate with each other via a system bus.
In one embodiment, the following steps are implemented when the processor 10 executes the mobile terminal WIFI connection processing method program 40 in the memory 20:
a counter is allocated for each WIFI access point type in advance;
the central processing unit of the mobile terminal opens a preset first WIFI module and a preset second WIFI module, and sets the first WIFI module and the second WIFI module as access point searching modules;
when the central processor acquires a WIFI access point from the first WIFI module or acquires a WIFI access point from the second WIFI module, the type counter corresponding to the WIFI access point is increased by 1;
according to counters corresponding to various WIFI access point types, setting a second WIFI module to detect only three types of WIFI access points with the largest count values; and setting the first WIFI module to only detect other types of WIFI access points.
The processor performs the following steps when executing the WIFI connection processing program of the mobile terminal:
a first WIFI module and a second WIFI module for searching a WIFI access point are preset on the mobile terminal.
The processor performs the following steps when executing the WIFI connection processing program of the mobile terminal:
distributing a corresponding counter for the supported various WIFI access point types, and resetting each counter value;
among the various WIFI access point types that have been supported are the following: 802.11a operates in the 5.4G band with a maximum rate of 54 megabits; 802.11b operates in the 2.4G band, 11 megabits at highest rate; 802.11G operates in the 2.4G band with a maximum rate of 54 megabits; the highest rate of 802.11n can be up to 300 megabits;
simultaneously opening a first WIFI module and a second WIFI module, and setting the first WIFI module and the second WIFI module as access point searching modules;
or firstly opening a second WIFI module, setting the second WIFI module as an access point searching module, and waiting for preset first searching time; opening the first WIFI module, and setting the first WIFI module as an access point searching module;
when the central processor acquires a WIFI access point from the first WIFI module or acquires a WIFI access point from the second WIFI module;
acquiring a type corresponding to the WIFI access point;
adding 1 to a type counter corresponding to the WIFI access point;
setting a query timer, and checking the values of the counters corresponding to the various WIFI access point types at intervals of set query time;
setting a second WIFI module to detect only three types of WIFI access points with maximum count values;
the first WIFI module is configured to detect only the remaining types of WIFI access points, as described above.
Fig. 3 is a functional block diagram of a preferred embodiment of a mobile terminal according to the present application for installing a WIFI connection processing method for a mobile terminal. In this embodiment, the system for installing the WIFI connection processing method program of the mobile terminal may be divided into one or more modules, and the one or more modules are stored in the memory 20 and executed by one or more processors (the processor 10 in this embodiment) to complete the present application. For example, in fig. 3, a mobile terminal in which a mobile terminal WIFI connection processing method computer program is installed may be divided into a counter module 21, a setup search module 22, a detection and counting module 23, and a type setup module 24. The module refers to a series of computer program instruction sections capable of completing specific functions, and is more suitable for describing the execution process of the mobile terminal WIFI connection processing method program in the mobile terminal than a program. The following description will specifically introduce the functionality of the modules 21-24.
A counter module 21, configured to assign a counter to each WIFI access point type;
the searching module 22 is configured to enable the central processor to open the first WIFI module and the second WIFI module, and set the first WIFI module and the second WIFI module as access point searching modules;
the detecting and counting module 23 is configured to increment a type counter corresponding to a WIFI access point by 1 when the central processor acquires the WIFI access point from the first WIFI module or when the central processor acquires the WIFI access point from the second WIFI module;
the type setting module 24 is configured to set the second WIFI module to detect only three types of WIFI access points with the largest count value according to counters corresponding to various WIFI access point types; the first WIFI module is configured to detect only the remaining types of WIFI access points, as described above.
Based on the above embodiments, the present application further provides a computer readable storage medium, where one or more programs are stored, where the one or more programs may be executed by one or more processors, so as to implement the steps in the method for WIFI connection processing of a mobile terminal according to any one of the foregoing embodiments, specifically as described above.
In summary, in the method for processing the WIFI connection of the mobile terminal, the mobile terminal and the storage medium provided by the application, a counter is allocated to each WIFI access point type in advance; the central processing unit opens the first WIFI module and the second WIFI module, and sets the first WIFI module and the second WIFI module as access point searching modules; when the central processor acquires a WIFI access point from the first WIFI module or acquires a WIFI access point from the second WIFI module, the type counter corresponding to the WIFI access point is increased by 1; according to counters corresponding to various WIFI access point types, setting a second WIFI module to detect only three types of WIFI access points with the largest count values; and setting the first WIFI module to only detect other types of WIFI access points. When the mobile terminal uses WIFI to find the access point, the mobile terminal can quickly find the corresponding access point to perform access, subsequent connection and other operations, so that the access point searching time is shortened, the WIFI access efficiency is improved, and convenience is brought to users.
Of course, those skilled in the art will appreciate that implementing all or part of the above-described methods may be implemented by a computer program for instructing relevant hardware (e.g., a processor, a controller, etc.), where the program may be stored in a computer-readable storage medium, and where the program may include the steps of the above-described method embodiments when executed. The storage medium may be a memory, a magnetic disk, an optical disk, or the like.
It is to be understood that the application is not limited in its application to the examples described above, but is capable of modification and variation in light of the above teachings by those skilled in the art, and that all such modifications and variations are intended to be included within the scope of the appended claims.