CN111970745A - WLAN (Wireless local area network) connection method of terminal and terminal - Google Patents

WLAN (Wireless local area network) connection method of terminal and terminal Download PDF

Info

Publication number
CN111970745A
CN111970745A CN201910417960.0A CN201910417960A CN111970745A CN 111970745 A CN111970745 A CN 111970745A CN 201910417960 A CN201910417960 A CN 201910417960A CN 111970745 A CN111970745 A CN 111970745A
Authority
CN
China
Prior art keywords
base station
terminal
hotspot
wlan connection
type
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.)
Granted
Application number
CN201910417960.0A
Other languages
Chinese (zh)
Other versions
CN111970745B (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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201910417960.0A priority Critical patent/CN111970745B/en
Publication of CN111970745A publication Critical patent/CN111970745A/en
Application granted granted Critical
Publication of CN111970745B publication Critical patent/CN111970745B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]
    • 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

Landscapes

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

Abstract

The invention relates to the technical field of wireless communication, in particular to a WLAN connection method of a terminal and the terminal, which are used for solving the problem that the consumption of cellular network data flow is caused due to the fact that the mode of accessing a WLAN hotspot by the terminal is not flexible enough. When the WLAN of the terminal is closed, judging whether a currently accessed base station is contained in a first type base station set, if so, starting hot spot scanning; and after the available hotspots contained in the first-type hotspot set are scanned, establishing WLAN connection with the available hotspots. The terminal WLAN connection method provided by the embodiment of the invention avoids the problem of cellular network data traffic consumption of the intelligent terminal caused by the fact that the intelligent terminal cannot access a WLAN hotspot in time because a user does not turn on a WLAM hotspot switch in time.

Description

WLAN (Wireless local area network) connection method of terminal and terminal
Technical Field
The present invention relates to the field of wireless communication technologies, and in particular, to a WLAN connection method for a terminal and a terminal.
Background
With the development of society and the progress of science and technology, intelligent terminals have a data service access mode of a Wireless Local Area Network (WLAN). The mode that the intelligent terminal accesses the WLAN hotspot has the characteristics of low cost, low expense and high data transmission speed.
At present, when the intelligent terminal accesses the WLAN hotspot, a user needs to manually turn on a WLAN switch, and after the WLAN switch is turned on, the intelligent terminal can access the WLAN hotspot. If the WLAN switch is in the off state, even if the intelligent terminal enters the saved hotspot range where the internet can be accessed, the intelligent terminal cannot establish the WLAN connection because the WLAN switch is in the off state. At present, the intelligent terminal needs to be manually operated by a user to establish a WLAN connection mode, and when the intelligent terminal enters an available hotspot range, if the user does not turn on a WLAM hotspot switch in time, the intelligent terminal cannot access a WLAN hotspot in time, so that the consumption of the cellular network data traffic of the intelligent terminal is caused.
In summary, the current access method of the terminal to the WLAN hotspot is not flexible enough, which may cause consumption of data traffic of the cellular network.
Disclosure of Invention
The invention provides a WLAN connection method of a terminal and the terminal, which are used for solving the problem that the current mode of accessing a terminal to a WLAN hotspot is not flexible enough and the consumption of data flow of a cellular network is caused.
Based on the foregoing problem, in a first aspect, an embodiment of the present invention provides a WLAN connection method for a terminal, including:
when the WLAN of a terminal is closed, the terminal judges whether a currently accessed base station is included in a first type base station set, wherein the base station included in the first type base station set is a base station for successfully establishing WLAN connection when the terminal accesses the base station for the last time;
if so, the terminal starts hotspot scanning;
after available hotspots contained in the first type hotspot set are scanned, the terminal establishes WLAN connection with the available hotspots; and the hot spots contained in the first-class hot spot set are hot spots which are accessed successfully by the terminal in history.
In a second aspect, an embodiment of the present invention provides a terminal, including at least one processing unit and at least one storage unit;
wherein the storage unit stores program code that, when executed by the processing unit, causes the processing unit to perform the following:
when the WLAN is closed, judging whether a currently accessed base station is contained in a first type base station set, wherein the base station contained in the first type base station set is the base station accessed when the terminal historically and successfully establishes WLAN connection;
if yes, starting hot spot scanning;
after available hotspots contained in the first type hotspot set are scanned, establishing WLAN connection with the available hotspots; and the hot spots contained in the first-class hot spot set are hot spots which are accessed successfully by the terminal in history.
In a third aspect, an embodiment of the present invention provides an apparatus for WLAN connection of a terminal, including:
the judging module is used for judging whether a currently accessed base station is contained in a first type base station set when the WLAN of the terminal is closed, wherein the base station contained in the first type base station set is the base station accessed when the terminal historically and successfully establishes the WLAN connection;
the scanning module is used for starting hotspot scanning when the currently accessed base station is contained in the first type base station set;
the processing module is used for establishing WLAN connection with the available hot spots after the available hot spots contained in the first type hot spot set are scanned; and the hot spots contained in the first-class hot spot set are hot spots which are accessed successfully by the terminal in history.
In a fourth aspect, embodiments of the present invention provide a computer-readable medium on which a computer program is stored, which when executed by a processor, performs the steps of the method according to the first aspect.
In the embodiment of the invention, when the WLAN of the terminal is in a closed state, if the base station which is currently accessed by the terminal is detected to be contained in the first type base station set, the terminal automatically starts hot spot scanning; after available hotspots in the first-type hotspot set are scanned, the available hotspots can be automatically accessed, and the WLAN connection can be successfully established. Therefore, the problem of cellular network data traffic consumption of the intelligent terminal caused by the fact that the intelligent terminal cannot access the WLAN hotspot in time due to the fact that the WLAM hotspot switch is not turned on in time by the user is solved.
Drawings
Fig. 1 is a schematic diagram illustrating a storage manner of base stations in a first type of base station set according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a storage manner of hot spots in a first-type hot spot set according to an embodiment of the present invention;
fig. 3 is a flowchart of a WLAN connection method of a terminal according to an embodiment of the present invention;
fig. 4 is an overall flowchart of a WLAN connection method of a terminal according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a first terminal according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a second terminal according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a WLAN connection device according to an embodiment of the present invention.
Detailed Description
The terminal of the embodiment of the present invention may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA), or the like. The terminal of the embodiment of the invention has the function of accessing the WLAN hotspot.
When the WLAN of the terminal is closed, the terminal judges whether the currently accessed base station is contained in the first type base station set; the base stations included in the first type base station set are base stations accessed when the terminal historically and successfully establishes WLAN connection; if so, the terminal starts hotspot scanning; according to the embodiment of the invention, when the WLAN of the terminal is in a closed state, if the base station which is accessed by the terminal currently is determined to be contained in the first type base station set, the terminal starts the hot spot scanning, so that the terminal can automatically start the hot spot scanning when the condition is met in the closed state of the WLAN of the terminal.
After starting hotspot scanning, a terminal scans available hotspots contained in a first type hotspot set, and then the terminal establishes WLAN connection with the available hotspots; the hot spots included in the first type of hot spot set are hot spots which are accessed successfully by the terminal in history; after the available hotspots in the first-class hotspot set are scanned, the embodiment of the invention can automatically access the available hotspots to successfully establish WLAN connection.
Therefore, according to the WLAN connection method for the terminal provided in the embodiment of the present invention, when the terminal is in a WLAN off state, the terminal determines that the currently accessed base station is included in the first class base station set, the terminal can automatically start WLAN scanning, and after an available hotspot is scanned, the terminal can establish WLAN connection with the available hotspot, so as to avoid a problem of cellular network data traffic consumption of the intelligent terminal due to the fact that the intelligent terminal cannot access the WLAN hotspot in time because a user does not turn on a WLAM hotspot switch in time.
It should be noted that, the terminal of the embodiment of the present invention stores a first type base station set and a first type hot spot set; the base stations in the first type of base station set are base stations accessed when the terminal historically and successfully establishes the WLAN connection, and the hotspots in the first type of hotspot set are hotspots accessed successfully by the terminal historically.
For example, the first type of base station set includes base station a, base station B, base station C, and base station D; the terminal successfully establishes a WLAN connection when accessing base station a, the terminal successfully establishes a WLAN connection when accessing base station B, the terminal successfully establishes a WLAN connection when accessing base station C, and the terminal successfully establishes a WLAN connection when accessing base station D.
The hot spots in the first type of hot spot set comprise a hot spot 1, a hot spot 2, a hot spot 3, a hot spot 4, a hot spot 5, a hot spot 6 and a hot spot 7; the hotspot 1, the hotspot 2, the hotspot 3, the hotspot 4, the hotspot 5, the hotspot 6 and the hotspot 7 are all hotspots to which the terminal has successfully accessed.
It should be noted here that, when the terminal stores the first type of base station set, each base station is uniquely identified by the identity of the base station; the identity of the base station includes Lac (location area code) and CellId (cell base station identity code). When the terminal stores the first type of hot spot set, each hot spot is uniquely identified through the identity identification of the hot spot; the identity of the hotspot includes SSID (hotspot name) and Security, the Security value is an integer, and the value is defined as: a 0-unencrypted hotspot, a 1-WEP encrypted hotspot, a 2-PSK encrypted hotspot, a 4-WAPI _ PSK encrypted hotspot, and a 5-WAPI _ CERT encrypted hotspot.
For example, the base station a in the first type base station set may be stored in the format shown in fig. 1; wherein, the Lac of the base station A is 21507, and the CellId of the base station A is 56667915. The hotspot 1 in the first type hotspot set can be stored in the format shown in fig. 2; wherein, SSID of X _2019 indicates that the name of the hot spot 1 is X _2019, and Security of 2 indicates that the hot spot 1 adopts PSK encryption.
The first type base station set and the first type hot spot set stored by the terminal are continuously updated, and the time for updating the first type base station set and the first type hot spot set by the terminal comprises the following steps: when the terminal successfully establishes the WLAN connection, and when the base station roams in the WLAN connection state. The following are described separately:
1. the terminal successfully establishes a WLAN connection.
It should be noted that the terminal establishes the WLAN connection by manually turning on the WLAN switch for the user, and successfully establishing the WLAN connection according to the user operation.
After the AutoWifi service receives the network connection state CHANGE broadcast (for example, the network connection state CHANGE broadcast is CONNECTIVITY _ CHANGE), if the network is determined to be in the connected state, the CONNECTIVITY detection is performed on the connected network. If the detection result is that the network can be accessed, obtaining the Lac and the CellId of the current access base station through a getCellLocation () interface; if the first type base station set does not have the base station which is accessed currently, the base station which is accessed currently is added into the first type base station set; and acquiring the SSID and the Security of the current access hotspot, and adding the current access hotspot into the first type hotspot set if the first type hotspot set does not have the current access hotspot. And if the first-class hotspot set comprises the currently accessed hotspot, deleting the currently accessed hotspot from the first-class hotspot set.
2. The terminal roams the base station in the WLAN connection state.
It should be noted that, at such an occasion, it needs to be satisfied that the terminal detects that the accessed base station changes, and the current terminal is in the WLAN connection state.
When the AutoWifiService receives the callback of the CHANGE of the base station (for example, the callback of the CHANGE of the base station is CELL _ LOCATION _ CHANGE), the terminal acquires the Lac and the CellId of the current access base station, then judges whether the current WLAN is in a connection state, and if the current WLAN is in the connection state, the terminal acquires the SSID and the Security of the current connection hotspot; and then updating the currently accessed base station and the currently connected hot spot into the first type base station set and the first type hot spot set respectively.
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a WLAN connection method for a terminal, and as shown in fig. 3, the method includes:
step 301, when the WLAN of the terminal is turned off, the terminal determines whether the currently accessed base station is included in the first class base station set; the base stations included in the first type base station set are base stations accessed when the terminal historically and successfully establishes WLAN connection;
step 302, if yes, the terminal starts hot spot scanning;
step 303, after scanning available hotspots contained in the first type of hotspot set, the terminal establishes a WLAN connection with the available hotspots; and the hot spots contained in the first-class hot spot set are hot spots which are accessed successfully by the terminal in history.
It should be noted that the first type base station set and the first type hotspot set in the embodiment of the present invention may be generated in the above manner.
In an optional manner, the terminal stores the first type base station set and the first type hotspot set in the following manner:
Figure BDA0002065036110000061
Figure BDA0002065036110000071
wherein, for example, X0、Y0Is the identity of base station A, M0、N0The terminal is the identity of the hotspot 1, and when the terminal accesses the base station A, the WLAN connection with the hotspot 1 is established; x1、Y1Is the identity of base station B, M1、N1The terminal is the identity of the hotspot 2 and establishes WLAN connection with the hotspot 2 when the terminal accesses the base station B; x2、Y2Is the identity of base station C, M2、N2The terminal is the identity of the hotspot 3 and establishes WLAN connection with the hotspot 3 when the terminal accesses the base station C; x3、Y3Is the identity of base station D, M3、N3The terminal is the identity of the hotspot 4 and establishes WLAN connection with the hotspot 4 when the terminal accesses the base station D; x4、Y4Is the identity of base station E, M4、N4The terminal is the identity of the hotspot 5 and establishes WLAN connection with the hotspot 5 when the terminal accesses the base station E; x5、Y5Is the identity of base station F, M5、N5The terminal is the identity of the hotspot 6 and establishes WLAN connection with the hotspot 6 when the terminal accesses the base station F; x6、Y6Is the identity of base station G, M6、N6Is the identity of the hotspot 7 and establishes a WLAN connection with the hotspot 7 when the terminal accesses the base station G.
In step 301, the terminal determines whether the currently accessed base station is in the first class base station set at an occasion including, but not limited to:
after determining that the accessed base station is changed, the terminal judges whether the currently accessed base station is contained in the first type base station set; and/or
The terminal periodically detects whether the base station accessed currently is contained in the first type base station set.
The terminal judges whether the currently accessed base station is contained in the first type base station set, if so, the terminal starts hot spot scanning; if not, the terminal receives a first operation instruction for establishing the WLAN connection triggered by the user and then establishes the WLAN connection with the hotspot.
It should be noted here that the first operation instruction triggered by the user to establish the WLAN connection includes, but is not limited to:
an operation instruction for starting the WLAN triggered by a user;
and the user triggers an operation instruction for establishing WLAN connection with the available hot spot.
After receiving a WLAN operation starting instruction triggered by a user, the terminal starts hotspot scanning, and after scanning available hotspots, the terminal automatically establishes connection with the available hotspots; or after the available hot spot is scanned, the terminal receives an operation instruction for establishing the WLAN connection with the hot spot, which is triggered by the user, and then establishes the connection with the available hot spot.
An optional implementation manner is that after the terminal establishes the WLAN connection with the hotspot according to a first operation instruction for establishing the WLAN connection triggered by the user, the currently accessed base station is updated to the first class base station set, and the currently connected hotspot is updated to the first class hotspot set.
When the currently accessed base station is not in the first-class base station set, but the terminal establishes the WLAN connection with the hotspot according to the operation of the user, the currently accessed base station is the first-class base station, and the terminal updates the currently accessed base station to the first-class base station set, so that the first-class base station in the first-class base station set can be ensured to be continuously updated.
It should be noted that, before updating the currently connected hotspot to the first-type hotspot set, an optional manner is that the terminal determines whether the currently connected hotspot is in the first-type hotspot set, if so, the first-type hotspot set is not updated, and if not, the currently connected hotspot is updated to the first-type hotspot set.
In addition, in the embodiment of the invention, when the terminal is in the WLAN connection state, if a second operation instruction of closing the WLAN connection by the user is received, the terminal disconnects the WLAN connection;
for example, if the terminal detects that the user manually turns off the WLAN switch, the terminal disconnects the WLAN connection.
And the terminal records the current position and takes the current position as an area which does not allow the terminal to establish the WLAN connection. And when the terminal moves to the current position next time, the terminal is prevented from automatically starting WLAN scanning and establishing WLAN connection.
After the terminal receives a second operation instruction of closing the WLAN connection by the user and disconnects the WLAN connection, the terminal represents the current position by recording the currently accessed base station and the currently scanned hot spot, and the current position is taken as an area where the terminal is not allowed to establish the WLAN connection.
And the terminal is used as a second type of base station when receiving a second operation instruction for closing the WLAN connection by the user in the WLAN connection state, and the terminal is used as a second type of hotspot when receiving the operation for closing the WLAN connection by the user in the WLAN connection state.
It should be noted here that the terminal uses the MAC address of the hotspot to identify the scanned hotspot of the second type.
The terminal may avoid automatically establishing a WLAN connection at the current location in the following way:
in the first mode, the terminal deletes the second type base station in the first type base station set and deletes the second type hotspot in the first type hotspot set.
In implementation, in a WLAN connection state of the terminal, if the terminal receives a second operation instruction for closing the WLAN connection of the user, the terminal determines a currently accessed base station, and the terminal starts hotspot scanning to determine a hotspot which can be scanned; the terminal judges whether the currently accessed base station is in the first type base station set or not, and if so, the currently accessed base station is deleted from the first type base station set; and the terminal judges whether the scanned hot spot is in the first-class hot spot set or not, and if so, deletes the scanned hot spot from the first-class hot spot set.
For example, after receiving a second operation instruction for closing WLAN connection by a user, the terminal determines that a currently accessed base station is a base station a, and hotspots which can be currently scanned include a hotspot 1, a hotspot 2 and a hotspot 3; when the first type base station set comprises the base station A, the terminal deletes the base station A from the first type base station set; and if the hotspot 1 is in the first-type hotspot set, deleting the hotspot 1 from the first-type hotspot set, or if the hotspot 1, the hotspot 2 and the hotspot 3 are in the first-type hotspot set, deleting the hotspot 1, the hotspot 2 and the hotspot 3 from the first-type hotspot set.
By adopting the mode, neither the base station in the first type base station set nor the hot spot in the first type hot spot set is in the area where the terminal is not allowed to establish the WLAN connection, so that the terminal can be ensured to accurately establish the WLAN connection.
In a second mode, the terminal stores the base stations accessed when a second operation instruction of closing WLAN connection of the user is received into a second type base station set, starts hotspot scanning and stores the scanned hotspots into the second type hotspot set; and the terminal determines that the accessed base station is not in the second-class base station set and the scanned hot spot is not in the second-class hot spot set before establishing the WLAN connection.
The base stations included in the second type of base station set are base stations accessed when receiving a second operation instruction of closing WLAN connection by a user; the hotspots included in the second type of hotspot set are hotspots which can be scanned when an operation instruction of closing the WLAN connection by the user is received.
In implementation, the terminal stores Lac and CellId of the base station in a second type hotspot set to identify a second type base station; and the terminal stores the MAC address of the hot spot in a second hot spot set to identify the second hot spot.
It should be noted that, when the base station accessed by the terminal is not in the second type base station set and the hot spot scanned by the terminal is not in the second type hot spot set, it is determined that the current location of the terminal does not belong to an area where the terminal is not allowed to establish the WLAN connection.
In this manner, an optional terminal WLAN connection method is:
when the WLAN of the terminal is closed, the terminal judges whether the currently accessed base station is contained in the first base station set, if so, the terminal determines that the currently accessed base station is not contained in the second base station set, and the terminal starts hotspot scanning; and after scanning available hotspots contained in the first type of hotspot set and determining that all the scanned hotspots are not contained in the second type of hotspot set by the terminal, the terminal establishes WLAN connection with the available hotspots.
For example, after the base station accessed by the terminal is changed from the base station a to the base station B, the terminal determines that the currently accessed base station B is included in the first type base station set. Assume that the second set of base stations includes: base station D, base station E; the terminal determines that the base station B is not included in the second type set of base stations, and then the terminal starts hotspot scanning. If the scanned hot spots comprise a hot spot 5, a hot spot 6 and a hot spot 7; assume that the second category of hotspot sets includes: the terminal determines that none of the scanned hotspots is in the second type hotspot set, and then the terminal establishes a WLAN connection with an available hotspot in the first type hotspot set. For another example, assume that the second category of hotspot sets includes: the terminal determines that the scanned hotspot 7 is included in the second type of hotspot set, and then determines that the terminal cannot establish a WLAN connection at the current position.
One optional mode is that after the terminal establishes a WLAN connection with an available hotspot, the terminal detects the network quality of the available hotspot; and when the network quality is lower than a preset threshold value, the terminal deletes the available hotspot from the first hotspot set.
After the terminal establishes the WLAN connection, the network quality of the accessed hot spot needs to be detected, and the available hot spot is deleted from the first hot spot set when the network quality is lower than the preset threshold value, so that the available hot spots in the first hot spot set are guaranteed to be the hot spots with better network quality, and the problem that the terminal accesses the available hot spots with poor network quality when the WLAN is established is avoided.
In implementation, the network quality of the available hotspot may be the network speed, the terminal detects the network speed of the available hotspot, and when the network speed is lower than a preset threshold, the terminal deletes the available hotspot from the first hotspot set.
As shown in fig. 4, a complete flow chart of WLAN connection of the terminal according to the embodiment of the present invention is shown.
Step 401, when the WLAN of the terminal is turned off, the terminal determines whether the currently accessed base station is included in the first class base station set; if yes, go to step 402, if no, go to step 407;
and the base stations included in the first type of base station set are the base stations accessed when the terminal successfully establishes the WLAN connection historically.
Step 402, the terminal judges whether the currently accessed base station is included in the second type base station set; if yes, go to step 407, otherwise go to step 403;
and the base stations included in the second type of base station set are base stations accessed when receiving an operation instruction of closing the WLAN connection by a user.
Step 403, the terminal starts hot spot scanning.
Step 404, the terminal determines whether all scanned hotspots are not included in the second type hotspot set, if yes, step 405 is executed, and if not, step 407 is executed;
the hotspots contained in the second type of hotspot set are hotspots which can be scanned when the terminal receives an operation instruction of closing the WLAN connection by the user.
Step 405, the terminal judges whether available hotspots contained in the first type hotspot set are scanned, if yes, step 406 is executed, and if not, step 407 is executed;
and the hot spots contained in the first type of hot spot set are hot spots which are successfully accessed by the terminal in history.
And step 406, the terminal establishes a WLAN connection with the available hotspot.
Step 407, the terminal stops establishing the WLAN connection.
Based on the same inventive concept, the embodiment of the present invention further provides a terminal, and since the principle of solving the problem of the terminal is similar to the method for determining the WLAN connection of the terminal in the embodiment of the present invention, the implementation of the terminal may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 5, a terminal according to an embodiment of the present invention includes at least one processing unit 500 and at least one storage unit 501;
wherein the storage unit 501 stores program code which, when executed by the processing unit 500, causes the processing unit 500 to perform the following process:
when the WLAN is closed, judging whether a currently accessed base station is contained in a first type base station set, wherein the base station contained in the first type base station set is the base station accessed when the terminal historically and successfully establishes WLAN connection;
if yes, starting hot spot scanning;
after available hotspots contained in the first type hotspot set are scanned, establishing WLAN connection with the available hotspots; and the hot spots contained in the first-class hot spot set are hot spots which are accessed successfully by the terminal in history.
Optionally, the processing unit 500 is specifically configured to:
after determining that the accessed base station is changed, judging whether the currently accessed base station is contained in the first type base station set; and/or
And periodically detecting whether the currently accessed base station is contained in the first type base station set.
Optionally, the processing unit 500 is further configured to:
determining that a currently accessed base station is not in the first type base station set;
if the WLAN connection is established with the hotspot according to a first operation instruction for establishing the WLAN connection triggered by the user;
and updating the currently accessed base station into the first type base station set, and updating the currently connected hotspot into the first type hotspot set.
Optionally, the processing unit 500 is further configured to:
receiving a second operation instruction of closing the WLAN connection by the user;
if the first base station set comprises the currently accessed base station, deleting the base station accessed when the second operation instruction is received from the first base station; and
and starting hot spot scanning, and if the first hot spot set comprises the scanned hot spots, deleting the scanned hot spots from the first hot spot set.
Optionally, the processing unit 500 is further configured to:
detecting a network quality of the available hotspot after establishing a WLAN connection with the available hotspot;
and when the network quality is lower than a preset threshold value, deleting the available hotspots from the first hotspot set.
As shown in fig. 6, another terminal 600 for performing WLAN connection according to an embodiment of the present invention includes: a Radio Frequency (RF) circuit 610, a power supply 620, a processor 630, a memory 640, an input unit 650, a display unit 660, a camera 670, a communication interface 680, and a Wireless Fidelity (WiFi) module 690. Those skilled in the art will appreciate that the configuration of the terminal shown in fig. 6 is not intended to be limiting, and that the terminal provided by the embodiments of the present application may include more or less components than those shown, or some components may be combined, or a different arrangement of components may be provided.
The following describes the various components of the terminal 600 in detail with reference to fig. 6:
the RF circuit 610 may be used for receiving and transmitting data during a communication or conversation. Specifically, the RF circuit 610 sends downlink data of the base station to the processor 630 for processing after receiving the downlink data; and in addition, sending the uplink data to be sent to the base station. Generally, the RF circuit 610 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
In addition, the RF circuit 610 may also communicate with networks and other terminals through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The WiFi technology belongs to a short-distance wireless transmission technology, and the terminal 600 can Access an Access Point (AP) through the WiFi module 690, thereby implementing Access to a data network. The WiFi module 690 may be used for receiving and transmitting data during communication.
The terminal 600 may be physically connected to other terminals through the communication interface 680. Optionally, the communication interface 680 is connected to the communication interfaces of the other terminals through a cable, so as to implement data transmission between the terminal 600 and the other terminals.
In the embodiment of the present application, the terminal 600 can implement a communication service and send information to other contacts, so the terminal 600 needs to have a data transmission function, that is, the terminal 600 needs to include a communication module inside. Although fig. 6 shows communication modules such as the RF circuit 610, the WiFi module 690, and the communication interface 680, it is understood that at least one of the above components or other communication modules (such as a bluetooth module) for implementing communication exists in the terminal 600 for data transmission.
For example, when the terminal 600 is a mobile phone, the terminal 600 may include the RF circuit 610 and may further include the WiFi module 690; when the terminal 600 is a computer, the terminal 600 may include the communication interface 680 and may further include the WiFi module 690; when the terminal 600 is a tablet computer, the terminal 600 may include the WiFi module.
The memory 640 may be used to store software programs and modules. The processor 630 executes various functional applications and data processing of the terminal 600 by executing the software programs and modules stored in the memory 640, and after the processor 630 executes the program codes in the memory 640, part or all of the processes in fig. 3 and 4 according to the embodiments of the present invention can be implemented.
Alternatively, the memory 640 may mainly include a program storage area and a data storage area. Wherein, the storage program area can store an operating system, various application programs (such as communication application), various modules for WLAN connection, and the like; the storage data area may store data created according to the use of the terminal, and the like.
Further, the memory 640 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 650 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the terminal 600.
Alternatively, the input unit 650 may include a touch panel 651 and other input terminals 652.
The touch panel 651, also called a touch screen, may collect touch operations of a user (for example, operations of a user on or near the touch panel 651 by using any suitable object or accessory such as a finger or a stylus pen) and drive a corresponding connection device according to a preset program. Alternatively, the touch panel 651 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 630, and can receive and execute commands sent by the processor 630. In addition, the touch panel 651 may be implemented in various types, such as resistive, capacitive, infrared, and surface acoustic wave.
Optionally, the other input terminals 652 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 660 may be used to display information input by a user or information provided to the user and various menus of the terminal 600. The display unit 660 is a display system of the terminal 600, and is used for presenting an interface and implementing human-computer interaction.
The display unit 660 may include a display panel 661. Alternatively, the Display panel 661 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Further, the touch panel 651 can cover the display panel 661, and when the touch panel 651 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 630 to determine the type of touch event, and then the processor 630 provides a corresponding visual output on the display panel 661 according to the type of touch event.
Although in fig. 6, the touch panel 651 and the display panel 661 are provided as two separate components to implement the input and output functions of the terminal 600, in some embodiments, the touch panel 651 and the display panel 661 may be integrated to implement the input and output functions of the terminal 600.
The processor 630 is a control center of the terminal 600, connects various components using various interfaces and lines, performs various functions of the terminal 600 and processes data by operating or executing software programs and/or modules stored in the memory 640 and calling data stored in the memory 640, thereby implementing various services based on the terminal.
Optionally, the processor 630 may include one or more processing units. Optionally, the processor 630 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, and the like, and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 630.
The camera 670 is configured to implement a shooting function of the terminal 600, and shoot pictures or videos.
The terminal 600 also includes a power source 620 (e.g., a battery) for powering the various components. Optionally, the power supply 620 may be logically connected to the processor 630 through a power management system, so as to implement functions of managing charging, discharging, power consumption, and the like through the power management system.
Although not shown, the terminal 600 may further include at least one sensor, an audio circuit, and the like, which will not be described herein.
As shown in fig. 7, an apparatus for WLAN connection of a terminal according to an embodiment of the present invention includes:
a determining module 701, configured to determine, when a WLAN of a terminal is turned off, whether a currently accessed base station is included in a first class base station set, where a base station included in the first class base station set is an access base station when the WLAN connection is successfully established in the history of the terminal;
a scanning module 702, configured to start hotspot scanning when a currently accessed base station is included in a first class base station set;
the processing module 703 is configured to establish a WLAN connection with an available hotspot after scanning the available hotspot included in the first type of hotspot set; and the hot spots contained in the first-class hot spot set are hot spots which are accessed successfully by the terminal in history.
Optionally, the determining module 701 is specifically configured to:
after determining that the accessed base station is changed, judging whether the currently accessed base station is contained in the first type base station set; and/or
And periodically detecting whether the currently accessed base station is contained in the first type base station set.
Optionally, the determining module 701 is further configured to:
determining that a currently accessed base station is not in the first type base station set;
if the WLAN connection is established with the hotspot according to a first operation instruction for establishing the WLAN connection triggered by the user;
and updating the currently accessed base station into the first type base station set, and updating the currently connected hotspot into the first type hotspot set.
Optionally, the processing module 703 is further configured to:
receiving a second operation instruction of closing the WLAN connection by the user;
if the first base station set comprises the currently accessed base station, deleting the base station accessed when the second operation instruction is received from the first base station; and
and starting hot spot scanning, and if the first hot spot set comprises the scanned hot spots, deleting the scanned hot spots from the first hot spot set.
Optionally, the processing module 703 is further configured to:
detecting a network quality of the available hotspot after establishing a WLAN connection with the available hotspot;
and when the network quality is lower than a preset threshold value, deleting the available hotspots from the first hotspot set.
An embodiment of the present invention further provides a computer-readable medium, on which a computer program is stored, where the computer program is executed by a processor to implement the steps of any one of the methods described above.
The present application is described above with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and/or computer program products according to embodiments of the application. It will be understood that one block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, and/or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer and/or other programmable data processing apparatus, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the subject application may also be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. In the context of this application, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A WLAN connection method of a terminal, the method comprising:
when a Wireless Local Area Network (WLAN) of a terminal is closed, the terminal judges whether a currently accessed base station is included in a first type base station set, wherein the base station included in the first type base station set is the base station accessed when the terminal historically and successfully establishes WLAN connection;
if so, the terminal starts hotspot scanning;
after available hotspots contained in the first type hotspot set are scanned, the terminal establishes WLAN connection with the available hotspots; and the hot spots contained in the first-class hot spot set are hot spots which are accessed successfully by the terminal in history.
2. The method of claim 1, wherein the determining, by the terminal, whether the currently accessed base station is included in the first set of base stations comprises:
after determining that the accessed base station is changed, the terminal judges whether the currently accessed base station is contained in the first type base station set; and/or
The terminal periodically detects whether the currently accessed base station is contained in the first type base station set.
3. The method of claim 1, further comprising:
determining that a currently accessed base station is not in the first type base station set;
if the terminal establishes WLAN connection with the hotspot according to a first operation instruction for establishing WLAN connection triggered by a user;
and updating the currently accessed base station into the first type base station set, and updating the currently connected hotspot into the first type hotspot set.
4. The method of claim 1, further comprising:
the terminal receives a second operation instruction of closing the WLAN connection by the user;
if the first base station set comprises the base station accessed when the second operation instruction is received, the terminal deletes the base station accessed when the second operation instruction is received from the first base station; and
and the terminal starts hotspot scanning, and if the first hotspot set comprises the scanned hotspots, the terminal deletes the scanned hotspots from the first hotspot set.
5. The method of claim 1, wherein after the terminal establishes the WLAN connection with the available hotspot, further comprising:
the terminal detects the network quality of the available hot spot;
and when the network quality is lower than a preset threshold value, the terminal deletes the available hotspot from the first hotspot set.
6. A terminal, comprising at least one processing unit and at least one memory unit;
wherein the storage unit stores program code that, when executed by the processing unit, causes the processing unit to perform the following:
when the WLAN is closed, judging whether a currently accessed base station is contained in a first type base station set, wherein the base station contained in the first type base station set is the base station accessed when the terminal historically and successfully establishes WLAN connection;
if yes, starting hot spot scanning;
after available hotspots contained in the first type hotspot set are scanned, establishing WLAN connection with the available hotspots; and the hot spots contained in the first-class hot spot set are hot spots which are accessed successfully by the terminal in history.
7. The terminal of claim 6, wherein the processing unit is specifically configured to:
after determining that the accessed base station is changed, judging whether the currently accessed base station is contained in the first type base station set; and/or
And periodically detecting whether the currently accessed base station is contained in the first type base station set.
8. The terminal of claim 6, wherein the processing unit is further to:
determining that a currently accessed base station is not in the first type base station set;
if the WLAN connection is established with the hotspot according to a first operation instruction for establishing the WLAN connection triggered by the user;
and updating the currently accessed base station into the first type base station set, and updating the currently connected hotspot into the first type hotspot set.
9. The terminal of claim 6, wherein the processing unit is further to:
receiving a second operation instruction of closing the WLAN connection by the user;
if the first base station set comprises the currently accessed base station, deleting the base station accessed when the second operation instruction is received from the first base station; and
and starting hot spot scanning, and if the first hot spot set comprises the scanned hot spots, deleting the scanned hot spots from the first hot spot set.
10. The terminal of claim 6, wherein the processing unit is further to:
detecting a network quality of the available hotspot after establishing a WLAN connection with the available hotspot;
and when the network quality is lower than a preset threshold value, deleting the available hotspots from the first hotspot set.
CN201910417960.0A 2019-05-20 2019-05-20 WLAN (Wireless local area network) connection method of terminal and terminal Active CN111970745B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910417960.0A CN111970745B (en) 2019-05-20 2019-05-20 WLAN (Wireless local area network) connection method of terminal and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910417960.0A CN111970745B (en) 2019-05-20 2019-05-20 WLAN (Wireless local area network) connection method of terminal and terminal

Publications (2)

Publication Number Publication Date
CN111970745A true CN111970745A (en) 2020-11-20
CN111970745B CN111970745B (en) 2022-11-25

Family

ID=73357647

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910417960.0A Active CN111970745B (en) 2019-05-20 2019-05-20 WLAN (Wireless local area network) connection method of terminal and terminal

Country Status (1)

Country Link
CN (1) CN111970745B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102448187A (en) * 2011-10-29 2012-05-09 华为终端有限公司 Method and terminal capable of automatically accessing Wi-Fi (Wireless Fidelity) network
CN104093194A (en) * 2014-07-25 2014-10-08 Tcl通讯(宁波)有限公司 Method and system for intelligently opening and closing WLAN of mobile terminal
CN104754761A (en) * 2013-12-27 2015-07-01 中兴通讯股份有限公司 Wireless local area network connection processing method and wireless local area network connection processing device
CN105791586A (en) * 2016-04-25 2016-07-20 努比亚技术有限公司 WIFI automatic closing method and device and mobile terminal
CN106028286A (en) * 2016-07-12 2016-10-12 努比亚技术有限公司 Wireless local area network access device and method
CN107548030A (en) * 2017-08-25 2018-01-05 上海掌门科技有限公司 The control of WiFi switches, data query method of servicing, equipment and medium
US20180124669A1 (en) * 2015-03-24 2018-05-03 Huawei Technologies Co., Ltd. Method for Automatic Switching Between Access Points, and Wireless Routing Device
US20180206165A1 (en) * 2015-07-07 2018-07-19 Zte Corporation Wireless Hotspot Handover Method, Mobile Terminal and Storage Medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102448187A (en) * 2011-10-29 2012-05-09 华为终端有限公司 Method and terminal capable of automatically accessing Wi-Fi (Wireless Fidelity) network
CN104754761A (en) * 2013-12-27 2015-07-01 中兴通讯股份有限公司 Wireless local area network connection processing method and wireless local area network connection processing device
CN104093194A (en) * 2014-07-25 2014-10-08 Tcl通讯(宁波)有限公司 Method and system for intelligently opening and closing WLAN of mobile terminal
US20180124669A1 (en) * 2015-03-24 2018-05-03 Huawei Technologies Co., Ltd. Method for Automatic Switching Between Access Points, and Wireless Routing Device
US20180206165A1 (en) * 2015-07-07 2018-07-19 Zte Corporation Wireless Hotspot Handover Method, Mobile Terminal and Storage Medium
CN105791586A (en) * 2016-04-25 2016-07-20 努比亚技术有限公司 WIFI automatic closing method and device and mobile terminal
CN106028286A (en) * 2016-07-12 2016-10-12 努比亚技术有限公司 Wireless local area network access device and method
CN107548030A (en) * 2017-08-25 2018-01-05 上海掌门科技有限公司 The control of WiFi switches, data query method of servicing, equipment and medium

Also Published As

Publication number Publication date
CN111970745B (en) 2022-11-25

Similar Documents

Publication Publication Date Title
US10142845B2 (en) Network connection method and apparatus, and computer storage medium
KR102424190B1 (en) NSA and SA networking mode selection method and terminal equipment
CN109716826B (en) Access method, network equipment, terminal equipment and AMF (advanced metering framework) equipment
CN106851654B (en) Pseudo base station identification method, pseudo base station identification device and terminal
WO2018166234A1 (en) Network search method and apparatus
US10813058B2 (en) Method for processing information and terminal device
JP7477589B2 (en) Method and terminal device for establishing a hotspot connection - Patents.com
CN103458408A (en) Network connection method and network sharing method and device
CN103475996A (en) Network connecting method, network sharing method and devices
CN106961676B (en) Network searching method, device and medium
WO2015010591A1 (en) Method and terminal device for adding contacts
WO2017128538A1 (en) Network search control method and device
CN108476441B (en) Cell switching method and terminal equipment
CN114727367A (en) Wireless remote network distribution method, control center and equipment
WO2017000495A1 (en) Method and device for adding contacts
CN110140366B (en) Long short message sending method and terminal
CN111314900B (en) Wireless connection method, wireless connection device and mobile terminal
CN110602707A (en) Method and terminal for connecting wireless network
CN112543493A (en) Wifi connection method, terminal and computer storage medium
CN111970745B (en) WLAN (Wireless local area network) connection method of terminal and terminal
CN110418292A (en) A kind of method and apparatus adjusting WLAN sweep spacing
CN108770043B (en) Network marking method, device, readable storage medium and mobile terminal
CN111726798A (en) Method for determining hot IP address of terminal and terminal
CN111726452B (en) Wireless local area network WiFi list ordering method and electronic equipment
CN114827985B (en) Method for improving high-system cell residence network rate, terminal equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.