CN107979863B - WiFi automatic connection method, system and terminal equipment - Google Patents

WiFi automatic connection method, system and terminal equipment Download PDF

Info

Publication number
CN107979863B
CN107979863B CN201711205710.8A CN201711205710A CN107979863B CN 107979863 B CN107979863 B CN 107979863B CN 201711205710 A CN201711205710 A CN 201711205710A CN 107979863 B CN107979863 B CN 107979863B
Authority
CN
China
Prior art keywords
stored
time
signal strength
connection request
aps
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711205710.8A
Other languages
Chinese (zh)
Other versions
CN107979863A (en
Inventor
蒋世民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711205710.8A priority Critical patent/CN107979863B/en
Publication of CN107979863A publication Critical patent/CN107979863A/en
Application granted granted Critical
Publication of CN107979863B publication Critical patent/CN107979863B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/02Access restriction performed under specific conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application is applicable to the technical field of wireless communication, and provides a WiFi automatic connection method, a system and terminal equipment, wherein the method comprises the following steps: scanning the AP to obtain all the scanned stored APs; sending a connection request to all the stored APs; when all the stored APs are forbidden, acquiring the forbidden reason of each stored AP; and setting a corresponding automatic connection rule according to the forbidden reason of each stored AP. In the embodiment of the application, when all the scanned stored APs are disabled, the disabled reason of each stored AP is obtained; and setting corresponding automatic connection rules according to the reason that the stored AP is forbidden, so that the intelligent terminal equipment can be automatically connected to the WiFi network in time, and the network connection efficiency is improved.

Description

WiFi automatic connection method, system and terminal equipment
Technical Field
The application belongs to the technical field of wireless communication, and particularly relates to a WiFi automatic connection method, a WiFi automatic connection system and terminal equipment.
Background
WiFi (Wireless Fidelity) is a Wireless communication technology that is used frequently at present, and has an extremely wide coverage rate, for example, public places such as business centers, stations, airports and the like all provide a free WiFi network. An AP (Wireless Access Point) is an Access Point of the intelligent communication device to the WiFi network, and is used to connect the intelligent communication devices together through the WiFi network, and then Access the WiFi network to the ethernet network. Generally, after accessing the WiFi network through the AP, the smart communication device stores the AP so as to automatically access the WiFi network through the AP when the AP is scanned next time.
However, when the existing intelligent communication device fails to connect to the network through a certain AP for many times, the AP is disabled within a certain time, the disabling time is usually fixed and unchanged, and only when the disabling time is overtime, the next automatic connection is performed, so that the intelligent terminal device cannot be automatically connected to the WiFi network in time.
Content of application
In view of this, embodiments of the present application provide a WiFi automatic connection method, system and terminal device, which can set a corresponding automatic connection rule according to a forbidden reason when an AP is forbidden, so that an intelligent terminal device can be automatically connected to a WiFi network in time, and network connection efficiency is improved.
A first aspect of an embodiment of the present application provides a WiFi automatic connection method, which includes:
scanning the AP to obtain all the scanned stored APs;
sending a connection request to all the stored APs;
when all the stored APs are forbidden, acquiring the forbidden reason of each stored AP;
and setting a corresponding automatic connection rule according to the forbidden reason of each stored AP.
A second aspect of an embodiment of the present application provides a WiFi automatic connection system, which includes:
the scanning module is used for scanning the AP and acquiring all the scanned stored APs;
a sending module, configured to send a connection request to all the stored APs;
an obtaining module, configured to obtain a disable reason for each stored AP when all the stored APs are disabled;
and the setting module is used for setting a corresponding automatic connection rule according to the forbidden reason of each stored AP.
A third aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of any one of the above methods when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, which, when executed by a processor, implements the steps of any of the methods described above.
In the embodiment of the application, when all the scanned stored APs are disabled, the disabled reason of each stored AP is obtained; and setting corresponding automatic connection rules according to the reason that the stored AP is forbidden, so that the intelligent terminal equipment can be automatically connected to the WiFi network in time, and the network connection efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a WiFi automatic connection method according to an embodiment of the present application;
FIG. 2 is a table of correspondence between reasons for being disabled and automatic connection rules according to an embodiment of the present application;
fig. 3 is a schematic flowchart of step S104 provided in the second embodiment of the present application;
fig. 4 is a schematic flowchart of step S104 provided in the third embodiment of the present application;
fig. 5 is a schematic flowchart of step S104 provided in the fourth embodiment of the present application;
fig. 6 is a schematic structural diagram of a WiFi automatic connection system provided in the fifth embodiment of the present application;
fig. 7 is a schematic structural diagram of a setting module according to a sixth embodiment of the present application;
fig. 8 is a schematic structural diagram of a setting module according to a seventh embodiment of the present application;
fig. 9 is a schematic structural diagram of a setting module according to an eighth embodiment of the present application;
fig. 10 is a schematic structural diagram of a terminal device according to a ninth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Example one
The embodiment provides an automatic WiFi connection method, which can be applied to any intelligent terminal device having a wireless communication function and capable of automatically connecting to a WiFi network, such as a mobile phone, a tablet computer, an intelligent bracelet, a personal digital assistant, and an intelligent household appliance such as an air conditioner, a refrigerator, and a television.
As shown in fig. 1, the WiFi automatic connection method provided in this embodiment includes:
step S101: and scanning the AP to acquire all the scanned stored APs.
In a specific application, after the terminal device connects to the corresponding WiFi network through the AP for the first time, the terminal device stores the AP so as to automatically connect to the corresponding WiFi network through the AP when the AP is scanned next time. Storing the AP specifically means storing a network address of the AP and a WiFi password of a WiFi network corresponding to the AP.
In addition, the network environment in which the terminal device is located usually includes more than one WiFi network, and more than one WiFi network is likely to be included, and the terminal device is also likely to store the AP of one or more than one WiFi network in the network environment in which the terminal device is located. Therefore, after scanning for APs, one or more APs may be scanned, and the scanned APs may also include one or more saved APs.
Step S102: and sending a connection request to all the stored APs.
In a specific application, since the terminal device already stores the network address of the AP and the corresponding WiFi password, when the stored AP is scanned, a connection request including the WiFi password may be automatically sent according to the network address of the AP, so as to automatically connect to the corresponding WiFi network through the stored AP. For the AP with the password which is not stored, manual connection is needed when the AP is connected for the first time, and the WiFi password is input; for unsaved privacy-free APs, manual connection is required at the first connection.
It should be noted that, for the stored AP, if the corresponding network address or WiFi password is changed or the storage time is expired, the AP needs to be manually connected according to the connection mode of the unsaved AP.
Step S103: and when all the stored APs are disabled, acquiring the disabled reason of each stored AP.
In a specific application, if an automatic connection to an AP fails, the AP may be disabled, and the reason for the automatic connection failure may be that the signal quality of the WiFi network corresponding to the AP is not good, the number of users (the number of terminal devices) connected to the AP at the same time is large, and a network Address (i.e., an IP Address) or a WiFi password is changed or a storage time is exceeded, where the network Address of the AP is changed or the storage time is exceeded, which may cause a failure in a DHCP (Dynamic Host Configuration Protocol) negotiation.
Step S104: and setting a corresponding automatic connection rule according to the forbidden reason of each stored AP.
In specific application, an automatic connection rule corresponding to the forbidden reason of each AP can be set according to the forbidden reason of each AP, so that the intelligent terminal equipment can be automatically connected to the WiFi network in time, and the network connection efficiency is improved.
As shown in fig. 2, an exemplary correspondence table showing the disabled reason and the automatic connection rule is shown, where reason 1, reason 2, … …, reason n-1 and reason n represent different disabled reasons, rule 1, rule 2, … …, rule n-1 and rule n represent different automatic connection rules, n is greater than 1 and n is a positive integer.
In one embodiment, the WiFi automatic connection method further comprises:
when the stored APs are not scanned, disabling all the stored APs, and returning to the step of scanning APs (i.e. returning to execute step S101);
and stopping scanning when the AP is successfully connected to any saved AP.
In a specific application, if the stored APs are not scanned, re-scanning is required, and when successfully connecting to any stored AP, the terminal device does not need to connect to other APs any more, and can stop scanning, so as to save power consumption unless the user manually inputs a corresponding instruction to trigger the terminal device to re-scan the APs.
In the embodiment, when all the scanned stored APs are disabled, the disabled reason of each stored AP is obtained, and the corresponding automatic connection rule is set according to the disabled reason of each stored AP, so that the intelligent terminal device can be automatically connected to the WiFi network in time, and the network connection efficiency is improved.
Example two
This embodiment is a further refinement of step S104 in the first embodiment on the basis of the first embodiment. As shown in fig. 3, in the present embodiment, step S104 includes:
step S201: and when the reason for forbidding the stored AP is a password error, sending a connection request to the stored AP by taking a preset time length as a period.
In a specific application, the preset time length may be set according to actual needs, for example, any integer or non-integer time length such as 3S (seconds), 5S, or 8S. Sending a connection request to the stored AP by using a preset time length as a period, specifically, sending a connection request once within each preset time length or once every preset time length, where a frequency of sending the connection request is sent once every preset time length, for example, when a duration of the preset time length is 5S, a frequency of sending the connection request is sent once every 5S.
Step S202: setting the saved AP to be permanently disabled while the saved AP remains disabled after a first preset number of cycles.
In a specific application, after a plurality of connection requests are continuously sent, if the saved AP is still disabled, the saved AP is set to be permanently disabled. The first preset number refers to the number of times of sending the connection request continuously, and the first preset number may be set according to actual needs, for example, any integer such as 3, 5, or 8. The fact that the saved AP is still disabled means that after the connection request is sent to the AP, the connection is still failed due to a password error, so that the AP is disabled.
Step S203: and when the password carried by the connection request sent to the stored AP is changed, setting the stored AP to be available.
In a specific application, if the user modifies the WiFi password carried in the connection request sent to the AP, the AP is temporarily set to be available, and step S201 is proceeded to.
Step S204: and when receiving an instruction of sending a connection request to the saved AP, which is input by a user, setting the saved AP to be available.
In a specific application, if the user manually inputs a corresponding instruction to resend the connection request to the AP, the AP is temporarily set to be available, if the connection still fails, the AP is set to be permanently disabled again, and the process proceeds to step S203 or S204.
In this embodiment, when the reason for disabling the AP is a password error, the AP is periodically sent to the AP with a preset time length as a period, and when a first preset number of connection requests are continuously sent to the AP and the AP is still disabled, the AP is set to be permanently disabled, and is not set to be available again until a user modifies a password or manually triggers connection, so that the terminal device can be prevented from continuously sending a connection request to the AP, thereby reducing power consumption.
EXAMPLE III
This embodiment is a further refinement of step S104 in the first embodiment on the basis of the first embodiment. As shown in fig. 4, in the present embodiment, step S104 includes:
step S301: and acquiring the current time point when the reason for forbidding the stored AP is that the number of users exceeds the standard.
In a specific application, the number of users specifically refers to the number of terminal devices connected to the same AP, and the number of users exceeding the standard refers to the number of users connected to the same AP exceeding the maximum user capacity that the AP can support. Theoretically, the user capacity of an AP is not limited, and it depends only on the capacity of the network address range allocated to the AP. However, from the practical network rate, the number of users that can be borne by an AP is limited, and generally the number of home APs is no more than 20-30, and the number of home APs is no more than 100 at the enterprise level. If the number of users is too large, the available bandwidth of each user is too small, thereby reducing the network communication rate.
In a specific application, the current time point is a specific time when the reason for disabling the stored AP is that the number of users exceeds the standard. For example, the current time point is twelve o 'clock at noon (i.e., 12: 00) or eight o' clock at night (i.e., 20: 00).
Step S302: and sending a connection request to the stored AP by taking the time length corresponding to the time period as a cycle according to the time period of the current time point.
In a specific application, the connection request may be periodically sent to the AP by taking the corresponding time length as a cycle according to a specific time period of the current time point. The number of users connected to the same AP in different time periods is different, and generally, for a WiFi network in an office, the number of users connected to the same AP is large in a peak time period during work, and at this time, the number of users connected to the AP is likely to exceed the standard, so that the AP is disabled; in the off-peak time period during work, the number of users connected to the same AP is small, and it is easier to successfully connect to the WiFi network corresponding to the AP. Therefore, a longer time length can be set in the peak period, and a shorter time length can be set in the low peak period.
In specific application, 24 hours a day can be divided into a plurality of different time periods, different time lengths are taken as periods according to different time periods of the current time point, and connection requests are sent to the forbidden APs due to the fact that the number of users exceeds the standard, so that connection power is improved, and power consumption is reduced. For example, a 24 hour day may be divided into 8: 00-18: peak period of 00, 18: 00-21: 00 middle peak and 21: 00-8: 00 the peak period, the connection request is sent in 30 minutes as a cycle in the peak period, the connection request is sent in 15 minutes as a cycle in the peak period, and the connection request is sent in 5 minutes as a cycle in the peak period. The specific time division manner and the setting of the time length of the period can be determined according to actual needs.
In one embodiment, the WiFi connection method further includes:
acquiring the number of users connected to the stored AP;
sending a connection request to the stored AP by taking the time length corresponding to the number of the users as a period; wherein the number of users is positively correlated with the length of time.
In a specific application, the more the number of users connected to the AP, the greater the probability of connection failure, the more the users are, the longer the time interval for sending connection requests should be, and the less the number of users, the shorter the time interval for sending connection requests should be, so as to increase the connection power and reduce the power consumption.
Example four
This embodiment is a further refinement of step S104 in the first embodiment on the basis of the first embodiment. As shown in fig. 5, in the present embodiment, step S104 includes:
step S401: and when the reason for disabling the stored AP is that the signal quality problem exists, detecting the signal strength of the stored AP.
In a particular application, when the signal quality of an AP is poor or unstable, a connection failure may result, such that the AP is disabled.
Step S402: according to the signal intensity, a connection request is sent to the stored AP by taking the time length corresponding to the signal intensity as a period; wherein the length of time is inversely related to the magnitude of the signal strength.
In a specific application, when the signal strength of the AP is strong, a relatively short time length may be set, so that the terminal device may send a connection request to the AP again after a short time length after failing to automatically connect to the AP, so as to connect to the AP in time, shorten the connection time, and improve the connection efficiency. When the signal strength of the AP is weak, a relatively long time duration may be set, so as to save electric energy consumed by the terminal device to frequently send a connection request when the signal quality is not good, and reduce power consumption. For example, when the signal strength is A, B, C, D, the corresponding time lengths are a, b, c, and d; wherein A is more than B and more than C and D, and a is more than B and less than C and less than D. By inversely correlating the magnitude of the signal strength with the length of the time period, the time period can be adaptively adjusted according to the magnitude of the signal strength.
In one embodiment, step S402 includes:
setting the time length to a first time when the signal strength is within a weak signal strength range;
setting the time length to a second time when the signal strength is within a strong signal strength range; wherein the lower limit value of the strong signal strength range is greater than the upper limit value of the weak signal strength range, and the length of the first time is greater than the length of the second time.
In a specific application, the weak signal strength range and the first time can be set according to actual needs, for example, the weak signal strength range can be set to [ -120db, -85db ], and the first time can be set to 30S.
In a specific application, the strong signal strength range and the second time can also be set according to actual needs, for example, the strong signal strength range can be set to (-85db, -30 db), and the second time can be set to 20S.
It should be understood that the weak signal strength range and the strong signal strength range need not be two continuous ranges of values, but may be two discontinuous ranges of values. For example, the weak signal strength range may be set to [ -120db, -80db ], and the strong signal strength range may be set to (-75db, -30db ].
In a specific application, the disabling time may also be set according to more than two different signal strength ranges, and there is no overlapping portion between the different signal strength ranges, and the number and the range size of the specific signal strength ranges may be set according to actual needs. For example, the disable time may be set based on four signal strength ranges, a weak signal strength range, a second strong signal strength range, and a strong signal strength range. Correspondingly, in one embodiment, step S104 includes:
setting the time length to a first time when the signal strength is within a weak signal strength range;
setting the time length to be a third time when the signal strength is within a second weak signal strength range;
setting the time length to be fourth time when the signal intensity is in a second strong signal intensity range;
setting the time length to a second time when the signal strength is within a strong signal strength range;
wherein, the lower limit value of the strong signal strength range is larger than the upper limit value of the second strong signal strength range, the lower limit value of the second strong signal strength range is larger than the upper limit value of the second weak signal strength range, the lower limit value of the second weak signal strength range is larger than the upper limit value of the weak signal strength range, and the first time is larger than the third time and larger than the fourth time and larger than the second time.
Specifically, in one example, the weak signal strength range, the next strong signal strength range, the strong signal strength range, and the corresponding disable times may be set to: [ -120db, -100db ], (-100db, -85db ], (-85db, -65db ], (-65db, -30db ], and 30S (seconds), 25S, 20S, 15S.
Similarly, the four signal strength ranges are not necessarily continuous ranges, but may be four discontinuous ranges. For example, the weak signal strength range, the next strong signal strength range, the strong signal strength range may be set to: [ -120db, -100db ], [ -95db, -85db ], [ -80db, -65db ], [ -60db, -30db ].
Based on the above principle of setting the signal strength range and the disable time, in one embodiment, step S402 may further include:
setting the time length to be a fifth time when the signal intensity is within a middle signal intensity range;
wherein the lower limit of the strong signal strength range is greater than the upper limit of the medium signal strength range, the lower limit of the medium signal strength range is greater than the upper limit of the weak signal strength range, and the first time is greater than the fifth time and is greater than the second time.
In one embodiment, step S402 includes:
extending the length of time when the signal strength decreases;
and when the signal intensity is increased, shortening the time length.
In a specific application, since the signal strength of an AP is not fixed, but changes with the change of the signal strength of the ethernet network to which the AP is connected, after the corresponding time length is set according to the saved signal strength of the AP, when the signal strength of the AP changes, the time length should be adaptively extended or shortened according to the change of the signal strength.
In one embodiment, after step S402, the method returns to step S401 to detect the saved signal strength of the AP again, so as to determine whether the current signal strength changes.
Likewise, in one embodiment, step S402 further includes:
when the signal strength is changed from being in a weak signal strength range to being in a strong signal strength range, the time length is changed from a first time to a second time;
and when the signal strength is changed from being in the strong signal strength range to being in the weak signal strength range, the time length is modified from the second time to the first time.
In this embodiment, when the reason for disabling the stored AP is a signal quality problem, the signal strength of the stored AP is detected, and the interval time length for sending the connection request is adaptively modified according to the change of the signal strength of the AP, so that the interval time length for sending the connection request can be dynamically adjusted according to the change of the signal strength of the AP, thereby maximally improving the automatic connection efficiency and saving power consumption.
EXAMPLE five
The present embodiment provides an automatic WiFi connection system, configured to execute the method steps in the first embodiment, where the system may be any software system that has a wireless communication function and is capable of automatically connecting to an intelligent terminal device in a WiFi network.
As shown in fig. 6, the WiFi automatic connection system 100 provided by this embodiment includes:
a scanning module 101, configured to scan APs and obtain all scanned stored APs;
a sending module 102, configured to send a connection request to all the stored APs;
an obtaining module 103, configured to obtain a disable reason of each stored AP when all the stored APs are disabled;
a setting module 104, configured to set a corresponding automatic connection rule according to the reason for disabling each of the stored APs.
In one embodiment, the WiFi automatic connection system further comprises:
a returning module, configured to disable all the stored APs when the stored APs are not scanned, and return to the step of scanning the APs;
and the stopping module is used for stopping scanning when the AP is successfully connected to any stored AP.
In the embodiment, when all the scanned stored APs are disabled, the disabled reason of each stored AP is obtained, and the corresponding automatic connection rule is set according to the disabled reason of each stored AP, so that the intelligent terminal device can be automatically connected to the WiFi network in time, and the network connection efficiency is improved.
EXAMPLE six
In this embodiment, the setup module in the fifth embodiment includes a structure for performing the method steps in the second embodiment. As shown in fig. 7, the setting module 104 includes:
a first sending unit 201, configured to send a connection request to the stored AP in a cycle of a preset time length when the disabled reason for connecting the stored AP is a password error;
a first setting unit 202, configured to set the saved AP to be permanently disabled when the saved AP is still disabled after a first preset number of cycles;
a second setting unit 203, configured to set the stored AP as available when a password carried in the connection request sent to the stored AP is changed;
a third setting unit 204, configured to set the saved AP as available when receiving an instruction, input by a user, to send a connection request to the saved AP.
In this embodiment, when the reason for disabling the AP is a password error, the AP is periodically sent to the AP with a preset time length as a period, and when a first preset number of connection requests are continuously sent to the AP and the AP is still disabled, the AP is set to be permanently disabled, and is not set to be available again until a user modifies a password or manually triggers connection, so that the terminal device can be prevented from continuously sending a connection request to the AP, thereby reducing power consumption.
EXAMPLE seven
In this embodiment, the setting module in the fifth embodiment includes a structure for executing the method steps in the third embodiment. As shown in fig. 8, the setting module 104 includes:
an obtaining unit 301, configured to obtain a current time point when the reason for disabling the stored AP is that the number of users exceeds the standard;
a second sending unit 302, configured to send a connection request to the stored AP according to a time period of a current time point, with a time length corresponding to the time period as a cycle.
In one embodiment, the obtaining unit is further configured to obtain a number of users connected to the saved AP;
the second sending unit is further configured to send a connection request to the stored AP with a time length corresponding to the number of users as a period; wherein the number of users is positively correlated with the length of time.
Example eight
In this embodiment, the setting module in the fifth embodiment includes a structure for executing the method steps in the fourth embodiment. As shown in fig. 9, the setting module 104 includes:
a detecting unit 401, configured to detect a signal strength of the stored AP when the reason for disabling the stored AP is that there is a signal quality problem;
a third sending unit 402, configured to send a connection request to the stored AP in a cycle of a time length corresponding to the signal strength according to the signal strength; wherein the length of time is inversely related to the magnitude of the signal strength.
In one embodiment, the third sending unit 402 includes:
the first setting unit is used for setting the time length as a first time when the signal strength is in a weak signal strength range;
the second setting unit is used for setting the time length as a second time when the signal intensity is in a strong signal intensity range; wherein the lower limit value of the strong signal strength range is greater than the upper limit value of the weak signal strength range, and the length of the first time is greater than the length of the second time.
In one embodiment, the third sending unit 402 includes:
the first setting unit is used for setting the time length as a first time when the signal strength is in a weak signal strength range;
a third setting unit, configured to set the time length to a third time when the signal strength is within a second weak signal strength range;
the fourth setting unit is used for setting the time length as fourth time when the signal intensity is in a second strong signal intensity range;
the second setting unit is used for setting the time length as a second time when the signal intensity is in a strong signal intensity range;
wherein, the lower limit value of the strong signal strength range is larger than the upper limit value of the second strong signal strength range, the lower limit value of the second strong signal strength range is larger than the upper limit value of the second weak signal strength range, the lower limit value of the second weak signal strength range is larger than the upper limit value of the weak signal strength range, and the first time is larger than the third time and larger than the fourth time and larger than the second time.
In one embodiment, the third sending unit 402 may further include:
a fifth setting unit, configured to set the time length to a fifth time when the signal strength is within a medium signal strength range;
wherein the lower limit of the strong signal strength range is greater than the upper limit of the medium signal strength range, the lower limit of the medium signal strength range is greater than the upper limit of the weak signal strength range, and the first time is greater than the fifth time and is greater than the second time.
In one embodiment, the third sending unit 402 includes:
a time extension unit for extending the time length when the signal intensity is decreased;
a time shortening unit configured to shorten the time length when the signal strength increases.
In one embodiment, the WiFi automatic connection system further comprises:
and the return module is used for returning to the detection unit to detect the signal strength again so as to judge whether the signal strength is changed.
Similarly, in one embodiment, the third sending unit 402 further includes:
the first time adjusting unit is used for changing the time length from the first time to the second time when the signal strength is changed from being in the weak signal strength range to being in the strong signal strength range;
and the second time adjusting unit is used for modifying the time length from the second time to the first time when the signal strength is changed from being in the strong signal strength range to being in the weak signal strength range.
In this embodiment, when the reason for disabling the stored AP is a signal quality problem, the signal strength of the stored AP is detected, and the interval time length for sending the connection request is adaptively modified according to the change of the signal strength of the AP, so that the interval time length for sending the connection request can be dynamically adjusted according to the change of the signal strength of the AP, thereby maximally improving the automatic connection efficiency and saving power consumption.
Example nine
Fig. 10 is a schematic diagram of a terminal device provided in an embodiment of the present application. As shown in fig. 10, the terminal device 5 of this embodiment includes: a processor 50, a memory 51 and a computer program 52 stored in said memory 51 and executable on said processor 50. The processor 50, when executing the computer program 52, implements the steps in the above-described WiFi automatic connection method embodiments, such as steps S101 to S104 shown in fig. 1. Alternatively, the processor 50, when executing the computer program 52, implements the functions of each module/unit in the above-mentioned device embodiments, for example, the functions of the modules 101 to 104 shown in fig. 6.
Illustratively, the computer program 52 may be partitioned into one or more modules/units, which are stored in the memory 51 and executed by the processor 50 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program 52 in the terminal device 5. For example, the computer program 52 may be divided into a scanning module, a sending module, an obtaining module, and a setting module, and the specific functions of each module are as follows:
the scanning module is used for scanning the AP and acquiring all the scanned stored APs;
a sending module, configured to send a connection request to all the stored APs;
an obtaining module, configured to obtain a disable reason for each stored AP when all the stored APs are disabled;
and the setting module is used for setting a corresponding automatic connection rule according to the forbidden reason of each stored AP.
The terminal device 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 10 is merely an example of a terminal device 5 and does not constitute a limitation of terminal device 5 and may include more or fewer components than shown, or some components may be combined, or different components, e.g., the terminal device may also include input-output devices, network access devices, buses, etc.
The Processor 50 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing the computer program and other programs and data required by the terminal device. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. . Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (6)

1. A WiFi automatic connection method is characterized by comprising the following steps:
scanning the AP to obtain all the scanned stored APs;
sending a connection request to all the stored APs;
when all the stored APs are forbidden, acquiring the forbidden reason of each stored AP;
setting a corresponding automatic connection rule according to the reason for forbidding each saved AP, wherein the automatic connection rule comprises the following steps:
1) when the forbidden reason of the stored AP is a password error, a connection request is sent to the stored AP by taking a preset time length as a period;
setting the saved AP to be permanently disabled while the saved AP remains disabled after a first preset number of cycles;
when the password carried by the connection request sent to the stored AP is changed, the stored AP is set to be available;
when receiving an instruction of sending a connection request to the stored AP, which is input by a user, setting the stored AP to be available;
2) the reason for forbidding the stored AP is that the number of users exceeds the standard, and the current time point is obtained;
according to the time period of the current time point, taking the time length corresponding to the time period as a cycle, and sending a connection request to the stored AP;
wherein, the period of time corresponding to the time period according to the time period of the current time point includes:
acquiring the number of users connected to the stored AP, and sending a connection request to the stored AP by taking the time length corresponding to the number of users as a period; wherein the number of users is positively correlated with the length of time;
3) when the forbidden reason of the stored AP is that a signal quality problem exists, detecting the signal strength of the stored AP;
according to the signal intensity, a connection request is sent to the stored AP by taking the time length corresponding to the signal intensity as a period; wherein the length of time is inversely related to the magnitude of the signal strength.
2. The WiFi automatic connection method of claim 1, the method further comprising:
when the stored AP is not scanned, forbidding all the stored APs, and returning to the step of scanning the AP;
and stopping scanning when the AP is successfully connected to any saved AP.
3. A WiFi automatic connection system, comprising:
the scanning module is used for scanning the AP and acquiring all the scanned stored APs;
a sending module, configured to send a connection request to all the stored APs;
an obtaining module, configured to obtain a disable reason for each stored AP when all the stored APs are disabled;
a setting module, configured to set a corresponding automatic connection rule according to the reason for disabling each stored AP; wherein the setting module includes:
a first sending unit, configured to send a connection request to the stored AP in a cycle of a preset time length when the disabled reason for connecting the stored AP is a password error;
a first setting unit, configured to set the saved AP to be permanently disabled when the saved AP is still disabled after a first preset number of cycles;
a second setting unit, configured to set the stored AP as available when a password carried in the connection request sent to the stored AP is changed;
a third setting unit, configured to set the stored AP to be available when receiving an instruction, input by a user, to send a connection request to the stored AP;
an obtaining unit, configured to obtain a current time point when the reason for the stored AP being disabled is that the number of users exceeds a standard;
a second sending unit, configured to send a connection request to the stored AP according to a time period in which a current time point is located, with a time length corresponding to the time period as a cycle;
wherein, the period of time corresponding to the time period according to the time period of the current time point includes:
acquiring the number of users connected to the stored AP, and sending a connection request to the stored AP by taking the time length corresponding to the number of users as a period; wherein the number of users is positively correlated with the length of time;
a detecting unit, which detects the signal strength of the stored AP when the forbidden reason of the stored AP is that the signal quality is problematic;
a third sending unit, configured to send a connection request to the stored AP in a cycle of a time length corresponding to the signal strength according to the signal strength; wherein the length of time is inversely related to the magnitude of the signal strength.
4. The WiFi automatic connection system of claim 3, said system further comprising:
a forbidding module, configured to forbid all the stored APs when the stored APs are not scanned, and return to the step of scanning the APs;
and the stopping module is used for stopping scanning when the AP is successfully connected to any stored AP.
5. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 2 when executing the computer program.
6. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 2.
CN201711205710.8A 2017-11-27 2017-11-27 WiFi automatic connection method, system and terminal equipment Active CN107979863B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711205710.8A CN107979863B (en) 2017-11-27 2017-11-27 WiFi automatic connection method, system and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711205710.8A CN107979863B (en) 2017-11-27 2017-11-27 WiFi automatic connection method, system and terminal equipment

Publications (2)

Publication Number Publication Date
CN107979863A CN107979863A (en) 2018-05-01
CN107979863B true CN107979863B (en) 2020-03-17

Family

ID=62011860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711205710.8A Active CN107979863B (en) 2017-11-27 2017-11-27 WiFi automatic connection method, system and terminal equipment

Country Status (1)

Country Link
CN (1) CN107979863B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110958665B (en) * 2018-09-27 2022-06-14 九阳股份有限公司 Method for accessing household appliance to router network and household appliance
CN109327915B (en) * 2018-09-29 2021-01-29 Oppo广东移动通信有限公司 Connection method, device and terminal
EP3876101B1 (en) * 2018-11-19 2022-12-28 Shenzhen Heytap Technology Co., Ltd. Abnormality processing method, terminal device and storage medium
CN114363831B (en) * 2021-12-02 2023-05-26 北京万集科技股份有限公司 Method, apparatus and computer readable storage medium for transmitting V2X message

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8520645B2 (en) * 2006-06-30 2013-08-27 Core Wireless Licensing S.A.R.L. Method of controlling a mobile terminal, and an associated mobile terminal
CN103997768B (en) * 2014-05-16 2018-01-16 广东欧珀移动通信有限公司 A kind of method and device for preventing from accessing invalid Wi Fi focuses
CN105120505B (en) * 2015-07-28 2019-04-16 小米科技有限责任公司 The method, apparatus and system of smart machine couple in router
CN105163370B (en) * 2015-08-05 2018-12-07 中国联合网络通信集团有限公司 Network insertion processing method and access point
CN105119776B (en) * 2015-09-08 2017-10-31 广东欧珀移动通信有限公司 A kind of WiFi connection failures reason detection method and system
CN105827598B (en) * 2016-03-11 2018-08-14 四川长虹电器股份有限公司 Reinforce the method and system of couple in router WiFi safety
CN106604314B (en) * 2016-12-07 2019-12-27 Oppo广东移动通信有限公司 WiFi roaming network access method and terminal equipment
CN106851780B (en) * 2016-12-07 2019-12-31 Oppo广东移动通信有限公司 Network connection method and terminal
CN107277896B (en) * 2017-08-08 2019-04-12 Oppo广东移动通信有限公司 Wifi hotspot management method, device and terminal device

Also Published As

Publication number Publication date
CN107979863A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
CN107979863B (en) WiFi automatic connection method, system and terminal equipment
CN104142862B (en) The overload protection method of server and device
KR102375644B1 (en) Information instruction method, information confirmation method, terminal and base station
CN108337707B (en) Wireless network switching method, mobile terminal and storage medium
CN108040358B (en) Wireless network connection method, terminal device and storage medium
CN105657719A (en) Sensor gateway
CN109041140B (en) Method for rapidly switching wireless network, intelligent hardware and terminal equipment
CN108834179B (en) Method, server and client for adjusting heartbeat cycle
US20230091129A1 (en) Signal receiving method, signal transmission method, user equipment, and network device
CN107708175B (en) WiFi automatic connection method, system and terminal equipment
US9025448B2 (en) Methods and apparatuses for accessing internet
CN104837042A (en) Digital multimedia data encoding method and apparatus
CN105306383A (en) Message push method, terminal and push server
CN109548104B (en) Wireless network optimization method and mobile terminal
CN106713522A (en) Wireless fidelity (Wi-Fi) connection method and mobile terminal
CN107040934B (en) WiFi device network distribution method and related device
CN107708141B (en) Wireless network scanning method, mobile terminal and storage medium
US10164701B2 (en) Antenna allocation method and terminal
US7792777B2 (en) Method, apparatus and computer program for registering a respective target network system state from each one of a plurality of programs
CN112351461B (en) WiFi network switching method, wiFi network switching device, terminal and storage medium
EP3751926A1 (en) Resource configuration method and device, and computer storage medium
US10939374B2 (en) Method and apparatus for remotely waking up a device connected to a network
CN113965915B (en) Data processing method and electronic equipment
CN115515168A (en) Radio frequency parameter adaptation method, device, equipment and computer readable storage medium
CN112433480B (en) Intelligent household system and control method and device thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant