CN107682909B - Control method and device for connecting access point - Google Patents

Control method and device for connecting access point Download PDF

Info

Publication number
CN107682909B
CN107682909B CN201711173296.7A CN201711173296A CN107682909B CN 107682909 B CN107682909 B CN 107682909B CN 201711173296 A CN201711173296 A CN 201711173296A CN 107682909 B CN107682909 B CN 107682909B
Authority
CN
China
Prior art keywords
access point
connection
time
failure times
forbidden
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.)
Expired - Fee Related
Application number
CN201711173296.7A
Other languages
Chinese (zh)
Other versions
CN107682909A (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 CN201711173296.7A priority Critical patent/CN107682909B/en
Publication of CN107682909A publication Critical patent/CN107682909A/en
Application granted granted Critical
Publication of CN107682909B publication Critical patent/CN107682909B/en
Expired - Fee Related 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/20Selecting an access point
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application is applicable to the technical field of communication, and provides a control method and a device for connecting an access point, wherein the control method comprises the following steps: initiating a connection to an access point; if the connection initiated by the access point fails, determining forbidden time corresponding to the access point according to the connection failure times of the access point, wherein the connection failure times are positively correlated with the forbidden time; refraining from initiating a connection to the access point for the disabled time. Thereby avoiding power consumption of the mobile terminal caused by repeatedly initiating connection. The connection speed and the power consumption are balanced, and the automatic connection speed and the power consumption can be both guaranteed.

Description

Control method and device for connecting access point
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for controlling access points.
Background
Currently, when a mobile terminal needs to surf the internet or connect devices such as bluetooth, the mobile terminal generally connects an access point, such as a wireless AP, a WiFi hotspot, or a bluetooth device, automatically or manually. Due to the network problem, it cannot be guaranteed that the access point can be successfully connected with the mobile terminal once, so that connection to the access point may be repeatedly initiated, power consumption of the mobile terminal is increased due to repeated initiation of connection, and the endurance time of the mobile terminal is shortened.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for connecting an access point, so as to solve the problem of power consumption increase caused by repeatedly connecting access points in the prior art.
A first aspect of an embodiment of the present application provides a method for controlling connection to an access point, including:
initiating a connection to an access point;
if the connection initiated by the access point fails, determining forbidden time corresponding to the access point according to the connection failure times of the access point, wherein the connection failure times are positively correlated with the forbidden time;
refraining from initiating a connection to the access point for the disabled time.
A second aspect of the embodiments of the present application provides a control apparatus for connecting an access point, including:
a connection unit for initiating a connection to an access point;
a forbidden time determining unit, configured to determine forbidden time corresponding to an access point according to connection failure times of the access point if connection initiated by the access point fails, where the connection failure times are positively correlated with the forbidden time;
a disabling unit configured to disable initiation of connection to the access point for the disabling time.
A third aspect of 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, when executing the computer program, implements the method for controlling access point as mentioned in the above first aspect or any possible implementation manner of the above first aspect.
A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method for controlling a connection access point as set forth in the above first aspect or any of the possible implementations of the above first aspect.
A fifth aspect of embodiments of the present application provides a computer program product comprising a computer program which, when executed by one or more processors, implements the steps of the control method for connecting access points as provided in the first aspect of the present application.
Compared with the prior art, the embodiment of the application has the advantages that: the method comprises the steps of firstly initiating connection to an access point; if the connection initiated by the access point fails, determining forbidden time corresponding to the access point according to the connection failure times of the access point, wherein the connection failure times are positively correlated with the forbidden time; refraining from initiating a connection to the access point for the disabled time. Thereby avoiding power consumption of the mobile terminal caused by repeatedly initiating connection. The connection speed and the power consumption are balanced, and the automatic connection speed and the power consumption can be both guaranteed.
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 an embodiment of a control method for connecting an access point according to the present application;
fig. 2 is a schematic flowchart of another embodiment of a control method for connecting an access point according to the present application;
fig. 3 is a schematic flowchart of another embodiment of a control method for connecting an access point according to the present application;
fig. 4 is a schematic structural diagram of an embodiment of a control device connected to an access point according to the present application;
fig. 5 is a schematic structural diagram of an embodiment of an electronic terminal provided in 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 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.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
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
Fig. 1 is a schematic implementation flow diagram of a control method for connecting an access point according to an embodiment of the present application. As shown the method may comprise the steps of:
step S101, initiating connection to an access point;
in this embodiment, the device initiating the connection may be an electronic device with a communication function, such as a smart phone, a tablet computer, a wearable device (e.g., a smart watch, a smart bracelet), and the like. The access point may be a wireless ap (access point), a WiFi hotspot, or a bluetooth peripheral. The access point may also be an access point of a mobile cellular network, e.g. an access point for 3G, 4G internet access. A user initiates an automatic or manual connection to an access point through a mobile terminal, and when the connection is an automatic connection, the connection may be initiated continuously by a predetermined connection number, for example, the predetermined connection number is 5, a first connection is first performed, if the first connection fails, a second connection is automatically performed, if the second connection succeeds, the subsequent 3 connections are stopped, if the second connection still fails, the third connection is continuously performed, and if the fifth connection still fails, the initiated connection fails, where the predetermined connection number is not limited to 5, and may be any positive integer. I.e. to continue with the next connection after a connection failure. And within the preset connection times, as long as the connection to the access point can be realized once, the connection to the access point is successfully initiated, and the initiation of the connection is stopped. And if the access point is not connected after the preset connection times, indicating that the connection initiated by the access point fails.
Optionally, the access point may be an access point with login authority, for example, an access point that a user has successfully connected before and acquires the login authority through password authentication, so that when connection to the access point is initiated, the password does not need to be input again. The mobile terminal is provided with a file specially storing the access point information of the acquisition authority. The access point may be one or more. For example, in a home or office setting, there is often only one authorized wireless access point. In a public place, such as a large mall, there may be multiple wireless access points that have acquired privileges. And when the number of the access points is multiple, the mobile terminal automatically selects the access point with the maximum signal strength to connect according to the signal strengths of the access points. For example, when there are access point a and access point B that have acquired the right at the same time, the signal strength of access point a is greater than that of access point B when performing the first connection, at which time the first connection may automatically select the connection to access point a, and when performing the second connection, the signal strength of access point B may be greater than that of access point a, at which time the second connection may automatically select the connection to access point B. Therefore, if any one of the access point a and the access point B can be successfully connected within the predetermined connection count, the connection of the originating access point is considered to be successful, and if the access point a cannot be connected within the predetermined connection count, the access point B cannot be connected, the connection of the originating access point is considered to be failed.
Step S102, if the connection initiated by the access point fails, determining the forbidden time corresponding to the access point according to the connection failure times of the access point, wherein the connection failure times and the forbidden time are positively correlated.
Step S103, forbidding to initiate the connection to the access point in the forbidden time.
In this embodiment, when initiating connection to an access point fails, that is, when the access point is not successfully connected after continuously performing a predetermined number of times of connection, the access point is prohibited from initiating connection for a period of time, where the period of time is a disable time. The reason for the connection failure may be that the signal strength of the wireless AP is insufficient, or IP collision is caused by router failure, interference of other surrounding signals, and too many devices connected by the wireless AP. After waiting for the disable time, the mobile terminal may perform a new round of initiating a connection operation to the access point. The connection failure time is determined by the connection failure times of the access point, and the connection failure times and the connection failure time are positively correlated, for example, the connection failure times and the connection failure times are in direct proportion, for example, when the connection failure times are 5 times, the connection failure times are 5 seconds; when the connection failure times are 10 times, the forbidden time is 10 seconds; when the number of connection failures is 15, the disable time is 15 seconds. Of course, the disable time and the connection failure times of the access point in this embodiment are not limited to be proportional, and may also be in a non-linear positive correlation relationship. For example, when the connection failure times is 5, the disabling time is 5 seconds; when the connection failure times are 10 times, the forbidden time is 10 seconds; when the number of connection failures is 15, the disable time is 20 seconds. I.e. the magnitude of the increase in the disable time is proportional to the number of connection failures.
In this embodiment, by controlling the access point, when the number of connection failures is more, it indicates that the probability that the access point can be successfully connected in the current environment is lower, so the disable time is correspondingly prolonged, after the disable time, the factor that the connection may be abnormal is already solved, and the success probability of re-initiating the connection to the access point is higher at this time. Thereby unnecessary power consumption due to repeated connection can be avoided.
Optionally, as shown in fig. 2, the determining the disable time corresponding to the access point according to the connection failure times of the access point includes:
step S201, obtaining the cumulative connection failure times of the access point in the last preset time period.
Step S202, determining the forbidden time corresponding to the access point according to the accumulated connection failure times.
In this embodiment, the connection initiated to the access point may be performed automatically or manually, or may be performed manually by a user during the automatic connection, for example, during the connection waiting process, if the user thinks that the connection may not be successfully connected to the access point, the connection is cancelled manually, and the next connection is performed manually. Alternatively, in a continuous connection, there may be several short successful connections, which are then broken again soon. That is, the number of actual connection failures may be different within a predetermined time. The forbidden time corresponding to the access point can be determined by counting the number of cumulative connection failures in the last period of time. For example, the last preset time period may be, for example, 1 minute, starting from the end of the previous disable time period, and counting the number of cumulative connection failures in 1 minute, where the connection includes automatic connection and/or manual connection. And determines the next disabling time for which the connection needs to be disabled based on the accumulated number of connection failures. The more times of connection failures accumulated in the preset time period, the lower the possibility that the access point is successfully connected is, and therefore, the disabling time is correspondingly prolonged.
Preferably, the higher the number of times the disable time is performed, the lower the probability of successful connection to the access point is reflected. The number of executions of the disabled connection can also be acquired at the same time. And multiplying the execution times of the forbidden connection with the accumulated connection failure times to obtain the forbidden time for the forbidden connection. For example, when the connection failure times is 5, the disabling time is 5 seconds; when the connection failure times are 10 times, the forbidden time is 10 seconds; when the number of connection failures is 15, i.e., has been previously disabled twice, if the number of connection failures is not considered, then when the number of connection failures is 15, it will be disabled for 15 seconds. If the number of times of connection forbidding is considered, the next forbidding time is 30 seconds by multiplying the 15 seconds by 2.
Preferably, the acquiring the accumulated connection failure times of the access point in the last preset time includes:
if the connection of the initiated access point is successfully connected with the access point, calculating the connection maintaining duration after the access point is successfully connected;
and if the connection keeping duration exceeds a first time threshold, clearing the accumulated connection failure times.
In this embodiment, since some connections may be successfully connected to the access point in a plurality of connections, the connections may last for a short time and then be disconnected again. After successful connection to the access point, the connection cannot be considered as a valid connection if the time to maintain the connection is too short. Thus, a first time threshold may be set for determining whether the successful connection is valid. Specifically, when the connection maintaining duration exceeds a first time threshold, the connection is considered to be an effective connection, and then the cumulative connection failure times within the latest preset time period are cleared. And if the duration of the connection maintaining does not exceed the first time threshold, the connection is considered to be an invalid connection, and the accumulated connection failure times are not processed. The embodiment judges the validity of successful connection. If effective connection exists in the preset time, the probability of successfully connecting the access point is higher, so that the accumulated connection failure times are cleared, the accumulated connection failure times calculated in the preset time are less, and the next forbidden time is correspondingly reduced. The calculation of the disabling time is made more reasonable.
Optionally, as shown in fig. 3, the determining the disable time corresponding to the access point according to the connection failure times of the access point includes:
step S301, obtaining the current continuous connection failure times of the access point.
Step S302, determining the forbidden time corresponding to the access point according to the continuous connection failure times.
In this embodiment, the determination of the disable time may also be determined by calculating the number of consecutive connection failures to the access point. For example, a corresponding relationship between the number of consecutive connection failures and the forbidden time may be preset, and the corresponding relationship is stored in the mobile terminal, during the process of initiating a connection to an access point, according to the obtained number of consecutive connection failures, a corresponding forbidden time is searched in the corresponding relationship, and after the connection fails, according to the searched forbidden time, the initiation of the connection to the access point is prohibited within the forbidden time.
Optionally, if the connection initiated to the access point fails, determining the forbidden time corresponding to the access point according to the connection failure times of the access point includes:
and if the connection initiated to the access point fails and the connection failure times of the access point reach a preset threshold value, determining the forbidden time corresponding to the access point according to the connection failure times of the access point.
In the embodiment, in the actual process of connecting with the access point, there are many accidental factors of connection failure, and a small number of connection failures are acceptable, so that the connection does not need to be disabled after each connection failure. In the embodiment, the preset threshold is set, and the forbidden time is enabled only when the connection failure times reach the preset threshold, so that unnecessary forbidden time prolonging caused by connection failure due to accidental factors is avoided, and the efficiency of connecting the mobile terminal to the access point is improved.
Optionally, if the duration of the disable time exceeds a second time threshold, the automatic connection function of the access point is closed.
In this embodiment, if the disable time calculated based on the number of connection failures exceeds the second time threshold, that is, the disable time is too long, for example, 1 hour, then the disable time has no meaning of being counted. Thus closing the connection function to the access point. In this case, a password for restarting the connection function may be previously set, and if the user needs to restart the connection function after the connection function is turned off, password authentication for restarting the connection function must be performed. Or, the user must restart the mobile terminal to restart the connection function of the access point.
Optionally, the disable time may also be calculated in combination with the remaining battery capacity. Specifically, after the forbidden time is calculated through the connection failure times, the remaining battery capacity is obtained, if the remaining battery capacity is small, the forbidden time is correspondingly prolonged, if the remaining battery capacity is large, the forbidden time is correspondingly reduced, and a specific calculation formula can be determined according to actual requirements.
Optionally, the control method further includes:
detecting whether the mobile terminal moves within the forbidden time;
and if the mobile terminal is detected to be moving and the moving speed is in a preset range, suspending the forbidden time and initiating the connection to the access point.
In this embodiment, the reason for the connection failure may be that the access point is difficult to access successfully when the mobile terminal is far away from the access point due to insufficient signal strength of the access point, and therefore, the user may search for a location closer to the access point to connect. The predetermined range of the moving speed may be a speed range at which a normal person walks. And when the time is out of the preset range, the forbidden time is not paused so as to prevent the mobile terminal from moving caused by normal use of the mobile terminal by a user and to trigger the operation of pausing the forbidden time by mistake. And when the mobile terminal is detected to stop moving for more than a period of time and still not be connected to the access point, recovering the forbidden time, and forbidding the connection to the access point within the forbidden time. The embodiment judges whether the user is looking for a connection position with a stronger signal by detecting whether the mobile terminal moves within the forbidden time. Therefore, the connection initiation of the access point is kept in the moving process of the user, and the mobile terminal is favorably and quickly connected to the access point.
Example two
Fig. 4 shows a configuration of a control device connected to an access point according to a first embodiment of the present application, and only a part related to the first embodiment of the present application is shown for convenience of description.
In this embodiment of the present application, the apparatus is used to implement the control method for connecting to an access point in the embodiment of fig. 1, and may be a software unit, a hardware unit or a unit combining software and hardware that is built in a mobile terminal. The mobile terminal is provided with a wireless connection module, such as a WiFi module, a bluetooth module, a mobile data network module, including but not limited to a smart phone, a tablet computer, a learning machine, or an intelligent wearable device.
As shown in fig. 4, the apparatus includes:
a connection unit 401, configured to initiate a connection to an access point;
a forbidden time determining unit 402, configured to determine a forbidden time corresponding to an access point according to a connection failure frequency of the access point if a connection initiated by the access point fails, where the connection failure frequency is positively correlated with the forbidden time;
a disabling unit 403, configured to disable initiation of connection to the access point within the disabling time.
In this embodiment, by controlling the access point, when the number of connection failures is more, it indicates that the probability that the access point can be successfully connected in the current environment is lower, so the disable time is correspondingly prolonged, after the disable time, the factor that the connection may be abnormal is already solved, and the success probability of re-initiating the connection to the access point is higher at this time. Thereby unnecessary power consumption due to repeated connection can be avoided.
Optionally, the obtaining the cumulative connection failure times of the access point in the last preset time includes:
if the connection of the initiated access point is successfully connected with the access point, calculating the connection maintaining duration after the access point is successfully connected;
and if the connection keeping duration exceeds a first time threshold, clearing the accumulated connection failure times.
Optionally, the determining the disable time corresponding to the access point according to the connection failure times of the access point includes:
acquiring the current continuous connection failure times of the access point;
and determining the forbidden time corresponding to the access point according to the continuous connection failure times.
Optionally, the determining the disable time corresponding to the access point according to the connection failure times of the access point includes:
acquiring the current continuous connection failure times of the access point;
and determining the forbidden time corresponding to the access point according to the continuous connection failure times.
Optionally, the disabling unit is further configured to:
and if the connection initiated to the access point fails and the connection failure times of the access point reach a preset threshold value, determining the forbidden time corresponding to the access point according to the connection failure times of the access point.
In the embodiment, in the actual process of connecting with the access point, there are many accidental factors of connection failure, and a small number of connection failures are acceptable, so that the connection does not need to be disabled after each connection failure. In the embodiment, the preset threshold is set, and the forbidden time is enabled only when the connection failure times reach the preset threshold, so that unnecessary forbidden time prolonging caused by connection failure due to accidental factors is avoided, and the efficiency of connecting the mobile terminal to the access point is improved.
Optionally, the apparatus further comprises:
a connection closing unit, configured to close the connection function to the access point if the duration of the disabled time exceeds a second time threshold
Optionally, the apparatus further comprises:
a movement detection unit for detecting whether the mobile terminal moves within the disable time;
and the mobile connection unit is used for pausing the forbidden time and initiating connection to the access point if the mobile terminal is detected to move and the moving speed is within a preset range.
The embodiment judges whether the user is looking for a connection position with a stronger signal by detecting whether the mobile terminal moves within the forbidden time. Therefore, the connection initiation of the access point is kept in the moving process of the user, and the mobile terminal is favorably and quickly connected to the access point.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
EXAMPLE III
An embodiment of the present application provides an electronic terminal, please refer to fig. 5, where the electronic terminal in the embodiment of the present application includes: a memory 501, one or more processors 502 (only one shown in fig. 5), and a computer program stored on the memory 501 and executable on the processors. Wherein: the memory 501 is used to store software programs and modules, and the processor 502 executes various functional applications and data processing by operating the software programs and units stored in the memory 501. Specifically, the processor 502 realizes the following steps by running the above-mentioned computer program stored in the memory 501:
initiating a connection to an access point;
if the connection initiated by the access point fails, determining forbidden time corresponding to the access point according to the connection failure times of the access point, wherein the connection failure times are positively correlated with the forbidden time;
refraining from initiating a connection to the access point for the disabled time.
Assuming that the foregoing is the first possible implementation manner, in a second possible implementation manner provided on the basis of the first possible implementation manner, the determining the disable time corresponding to the access point according to the connection failure times of the access point includes:
acquiring the accumulated connection failure times of the access point in the last preset period of time;
and determining the forbidden time corresponding to the access point according to the accumulated connection failure times.
In a third possible implementation manner provided on the basis of the second possible implementation manner, the acquiring a cumulative connection failure number of the access point in a last preset time includes:
if the connection of the initiated access point is successfully connected with the access point, calculating the connection maintaining duration after the access point is successfully connected;
and if the connection keeping duration exceeds a first time threshold, clearing the accumulated connection failure times.
In a fourth possible implementation manner provided on the basis of the first possible implementation manner, the determining, according to the connection failure times of the access point, the disabling time corresponding to the access point includes:
acquiring the current continuous connection failure times of the access point;
and determining the forbidden time corresponding to the access point according to the continuous connection failure times.
In a fifth possible implementation manner provided on the basis of the first to the fourth possible implementation manners, the determining, if a connection initiated to an access point fails, a disable time corresponding to the access point according to a connection failure number of the access point includes:
and if the connection initiated to the access point fails and the connection failure times of the access point reach a preset threshold value, determining the forbidden time corresponding to the access point according to the connection failure times of the access point.
In a sixth possible implementation manner provided on the basis of the first to fifth possible implementation manners, the method includes: and if the duration of the forbidden time exceeds a second time threshold, closing the connection function of the access point.
Optionally, as shown in fig. 5, the electronic terminal may further include: one or more input devices 503 (only one shown in fig. 5) and one or more output devices 504 (only one shown in fig. 5). The memory 501, processor 502, input device 503, and output device 504 are connected by a bus 505.
It should be understood that, in the embodiment of the present Application, the Processor 302 may be a Central Processing Unit (CPU), and the Processor may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 503 may include a keyboard, a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, etc., and the output device 504 may include a display, a speaker, etc.
Memory 504 may include both read-only memory and random-access memory, and provides instructions and data to processor 501. Some or all of the memory 504 may also include non-volatile random access memory. For example, the memory 504 may also store device type information.
As can be seen from the above, the present application first initiates a connection to an access point; if the connection initiated by the access point fails, determining forbidden time corresponding to the access point according to the connection failure times of the access point, wherein the connection failure times are positively correlated with the forbidden time; refraining from initiating a connection to the access point for the disabled time. Thereby avoiding power consumption of the mobile terminal caused by repeatedly initiating connection. The connection speed and the power consumption are balanced, and the automatic connection speed and the power consumption can be both guaranteed.
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 functions may be distributed as different functional units and modules according to needs, that is, the internal structure of the apparatus may be divided into different functional units or modules to implement 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 and method may be implemented in other ways. For example, the above-described system embodiments are merely illustrative, and for example, the division of the above-described modules or units is only one logical functional division, and in actual implementation, there may be another division, for example, multiple 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.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the flow in the method of the embodiments described above may be implemented by a computer program, which may be stored in a computer readable storage medium and used by a processor to implement the steps of the embodiments of the methods described above. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer readable medium may include: any entity or device capable of carrying the above-mentioned 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 signal, telecommunication signal, software distribution medium, etc. It should be noted that the computer readable medium described above may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media excludes electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above 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 (10)

1. A method for controlling access point connection, comprising:
initiating connection to an access point, wherein the access point is an access point with login authority and comprises a wireless AP, a WiFi hotspot or a Bluetooth peripheral;
if the connection initiated by the access point fails, determining the forbidden time corresponding to the access point according to the connection failure times of the access point, wherein the connection failure times are positively correlated with the forbidden time, and the forbidden time is inversely correlated with the battery capacity of the mobile terminal;
refraining from initiating a connection to the access point for the disable time;
the control method further comprises the following steps: detecting whether the mobile terminal moves within the forbidden time;
if the mobile terminal is detected to be moving and the moving speed is within a preset range, suspending the forbidden time and initiating connection to the access point; and when the mobile terminal is detected to stop moving for more than the preset time and still fail to be connected to the access point, recovering the forbidden time, and forbidding the connection to the access point within the forbidden time.
2. The method of claim 1, wherein the determining the disable time corresponding to the access point according to the number of connection failures of the access point comprises:
acquiring the accumulated connection failure times of the access point in the last preset period of time;
and determining the forbidden time corresponding to the access point according to the accumulated connection failure times.
3. The method as claimed in claim 2, wherein said obtaining the accumulated connection failure times of the access point in the last preset time period comprises:
if the connection of the initiated access point is successfully connected with the access point, calculating the connection maintaining duration after the access point is successfully connected;
and if the connection keeping duration exceeds a first time threshold, clearing the accumulated connection failure times.
4. The method of claim 1, wherein the determining the disable time corresponding to the access point according to the number of connection failures of the access point comprises:
acquiring the current continuous connection failure times of the access point;
and determining the forbidden time corresponding to the access point according to the continuous connection failure times.
5. The method as claimed in any one of claims 1 to 4, wherein the determining the disable time corresponding to the access point according to the connection failure times of the access point if the connection initiated to the access point fails comprises:
and if the connection initiated to the access point fails and the connection failure times of the access point reach a preset threshold value, determining the forbidden time corresponding to the access point according to the connection failure times of the access point.
6. The control method according to any one of claims 1 to 4,
and if the duration of the forbidden time exceeds a second time threshold, closing the connection function of the access point.
7. A control apparatus for connecting to an access point, comprising:
the access point is an access point with login authority and comprises a wireless AP, a WiFi hotspot or a Bluetooth peripheral;
a forbidden time determining unit, configured to determine a forbidden time corresponding to an access point according to connection failure times of the access point if connection initiated to the access point fails, where the connection failure times are positively correlated with the forbidden time, and the forbidden time is inversely correlated with a battery power of a mobile terminal;
a disabling unit configured to disable initiation of connection to the access point for the disabling time;
a movement detection unit for detecting whether the mobile terminal moves within a disable time;
a mobile connection unit, configured to suspend the forbidden time and initiate a connection to the access point if it is detected that the mobile terminal is moving and the moving speed is within a predetermined range; and when the mobile terminal is detected to stop moving for more than the preset time and still fail to be connected to the access point, recovering the forbidden time, and forbidding the connection to the access point within the forbidden time.
8. The control apparatus of claim 7, wherein the determining the disable time corresponding to the access point according to the connection failure times of the access point comprises:
acquiring the accumulated connection failure times of the access point in the last preset period of time;
and determining the forbidden time corresponding to the access point according to the accumulated connection failure times.
9. 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 6 when executing the computer program.
10. 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 6.
CN201711173296.7A 2017-11-22 2017-11-22 Control method and device for connecting access point Expired - Fee Related CN107682909B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711173296.7A CN107682909B (en) 2017-11-22 2017-11-22 Control method and device for connecting access point

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711173296.7A CN107682909B (en) 2017-11-22 2017-11-22 Control method and device for connecting access point

Publications (2)

Publication Number Publication Date
CN107682909A CN107682909A (en) 2018-02-09
CN107682909B true CN107682909B (en) 2020-06-26

Family

ID=61149270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711173296.7A Expired - Fee Related CN107682909B (en) 2017-11-22 2017-11-22 Control method and device for connecting access point

Country Status (1)

Country Link
CN (1) CN107682909B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112243211A (en) * 2020-10-13 2021-01-19 安徽江淮汽车集团股份有限公司 Vehicle-mounted terminal networking method, device, equipment and storage medium
CN113038513A (en) * 2021-03-15 2021-06-25 Oppo广东移动通信有限公司 Method, terminal device and storage medium for independent networking weak coverage

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2472958A1 (en) * 2010-12-30 2012-07-04 HTC Corporation Methods for access control with a back-off timer maintained for low priority devices or machine type communication (MTC) devices, and apparatuses using the same
WO2012148257A1 (en) * 2011-04-26 2012-11-01 Mimos Berhad Method for use in multi hop wireless sensor network
CN104066151A (en) * 2013-03-22 2014-09-24 株式会社日立制作所 Base station device and access control method thereof
CN105357146A (en) * 2015-10-21 2016-02-24 北京交通大学 Saturation attack defending method, device and system of buffer queue in outlet gateway

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101030095B1 (en) * 2009-02-03 2011-04-20 주식회사 웰게이트 Method of distributed peer-discovery in wireless peer to peer network
CN101841831B (en) * 2010-04-27 2013-03-27 展讯通信(上海)有限公司 Method for detecting base station identification code in GSM (Global System for Mobile communications) neighbouring cell, and terminal device
CN102256323A (en) * 2011-07-29 2011-11-23 华为终端有限公司 Network registration method and device
CN103981919B (en) * 2014-04-30 2016-10-05 华侨大学 A kind of devices and methods therefor extending excavator airborne communication terminal standby time
US9210627B1 (en) * 2014-05-28 2015-12-08 Apple Inc. User context aware throttling of transition attempts to connected mode
CN107332741B (en) * 2017-08-25 2019-03-29 Oppo广东移动通信有限公司 A kind of network detecting method, network detection device and intelligent terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2472958A1 (en) * 2010-12-30 2012-07-04 HTC Corporation Methods for access control with a back-off timer maintained for low priority devices or machine type communication (MTC) devices, and apparatuses using the same
WO2012148257A1 (en) * 2011-04-26 2012-11-01 Mimos Berhad Method for use in multi hop wireless sensor network
CN104066151A (en) * 2013-03-22 2014-09-24 株式会社日立制作所 Base station device and access control method thereof
CN105357146A (en) * 2015-10-21 2016-02-24 北京交通大学 Saturation attack defending method, device and system of buffer queue in outlet gateway

Also Published As

Publication number Publication date
CN107682909A (en) 2018-02-09

Similar Documents

Publication Publication Date Title
EP2941064B1 (en) Proximity communication method and apparatus
US20190372971A1 (en) Identity Authentication Method and Apparatus, and User Equipment
CN106602654B (en) Charging authentication method, related equipment and system
CN108712561B (en) Authority management method, device, mobile terminal and storage medium
WO2015101018A1 (en) Identity verification method and device
EP3206428B1 (en) Data traffic management method and device
US9569607B2 (en) Security verification method and apparatus
CN112560001B (en) Method for managing application program use time offline and terminal equipment
US9491690B2 (en) Efficient searching for communications networks
CN108966317B (en) Network searching method based on mobile terminal and mobile terminal
CA3026587A1 (en) Mobile payment method and device
CN107666583B (en) Call processing method and terminal
CN107682909B (en) Control method and device for connecting access point
CN108572866B (en) Application program management method, application program management device and mobile terminal
CN108156635B (en) Mobile terminal, WIFI access point detection processing method and storage medium
CN110730459B (en) Method and related device for initiating near field communication authentication
US9740539B2 (en) Information processing device, action switching method and recording medium storing switching program
CN112260366A (en) Charging method, charging device and charger
US20160330307A1 (en) Blacklist Management Method and Device
CN109586951B (en) Method, device, electronic equipment and readable storage medium for implementing fault transfer
CN112989323B (en) Process detection method, device, terminal and storage medium
CN106105365B (en) Network switching method, device and terminal
WO2019134638A1 (en) Information processing method and device, terminal, and storage medium
CN111726451A (en) Wearable device, mobile terminal, mode entering method of wearable device and mobile terminal, and storage medium
CN111770522B (en) Method, device, terminal and storage medium for identifying data dialing abnormality

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: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

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

Applicant before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20200626

CF01 Termination of patent right due to non-payment of annual fee