CN108012304B - Wireless local area network scanning method and device, computer equipment and storage medium - Google Patents

Wireless local area network scanning method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN108012304B
CN108012304B CN201711261808.5A CN201711261808A CN108012304B CN 108012304 B CN108012304 B CN 108012304B CN 201711261808 A CN201711261808 A CN 201711261808A CN 108012304 B CN108012304 B CN 108012304B
Authority
CN
China
Prior art keywords
scanning
preset
wireless access
terminal
scanning mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711261808.5A
Other languages
Chinese (zh)
Other versions
CN108012304A (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 CN201711261808.5A priority Critical patent/CN108012304B/en
Publication of CN108012304A publication Critical patent/CN108012304A/en
Application granted granted Critical
Publication of CN108012304B publication Critical patent/CN108012304B/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/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/20Selecting an access point
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0212Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave
    • H04W52/0216Power saving arrangements in terminal devices managed by the network, e.g. network or access point is master and terminal is slave using a pre-established activity schedule, e.g. traffic indication frame
    • 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)
  • Telephone Function (AREA)

Abstract

The application relates to a wireless local area network scanning method, a wireless local area network scanning device, computer equipment and a storage medium. The method comprises the following steps: acquiring current time information; judging whether the time information is in a preset idle time period or not according to the time information; if yes, searching for an available wireless access point in a passive scanning mode; if not, searching the available wireless access points according to a preset scanning strategy. By the method, the scanning mode of the terminal can be automatically switched according to the work and rest time of the user, the power consumption of the terminal is reduced, the radiation of the terminal in the scanning process is reduced, and the user experience is improved.

Description

Wireless local area network scanning method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for scanning a wireless local area network, a computer device, and a storage medium.
Background
With the development of mobile communication Networks, WLANs (Wireless Local Area Networks) have been widely deployed and used as Local Area communication Networks with convenient access, fast speed and relatively low price. A mobile terminal (STA) establishes a connection with an AP (Wireless access point) by using a WiFi (Wireless Fidelity) technology to access a Wireless local area network. Specifically, a Wi-Fi module is built in the mobile terminal, and in order to access the wireless local area network, the mobile terminal first needs to scan to find whether an available AP exists nearby. The scanning mode includes active scanning and passive scanning, and the mobile terminal generally acquires an available access point by using the active scanning mode after the WLAN is turned on, and the scanning process may cause the power consumption of the terminal to increase and the standby time to shorten.
Disclosure of Invention
The embodiment of the application provides a wireless local area network scanning method, a wireless local area network scanning device, a computer device and a storage medium, which can automatically switch a WLAN scanning mode of a terminal and reduce power consumption of the terminal.
A wireless local area network scanning method is applied to a terminal with a mobile communication function to control a wireless local area network scanning mode of the terminal, and comprises the following steps:
acquiring current time information;
judging whether the time information is in a preset idle time period or not according to the time information;
if yes, searching for an available wireless access point in a passive scanning mode;
if not, searching the available wireless access points according to a preset scanning strategy.
An apparatus for wireless local area network scanning, the apparatus comprising:
the acquisition module is used for acquiring current time information;
the judging module is used for judging whether the time information is in a preset idle time period or not according to the time information;
the scanning module is used for searching for available wireless access points in a passive scanning mode;
and the scanning switching module is used for searching the available wireless access points according to a preset scanning strategy.
A computer device comprising a memory and a processor, the memory having stored therein computer-readable instructions that, when executed by the processor, cause the processor to perform the steps of the method.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method.
According to the wireless local area network scanning method, the wireless local area network scanning device, the computer equipment and the storage medium, the current time information is obtained, whether the current time information is in the preset idle time period or not is judged according to the time information, if yes, the available wireless access points are searched in a passive scanning mode, otherwise, the available wireless access points are searched according to the preset scanning strategy, the scanning mode of the terminal can be automatically switched according to the work and rest time of a user, the power consumption of the terminal is reduced, the radiation of the terminal in the scanning process is reduced, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flow diagram illustrating a wlan scanning method according to an embodiment;
fig. 2 is a flowchart illustrating a wlan scanning method according to another embodiment;
fig. 3 is a flowchart illustrating a wlan scanning method according to another embodiment;
fig. 4 is a flowchart illustrating a wlan scanning method according to another embodiment;
fig. 5 is a flowchart illustrating a wlan scanning method according to another embodiment;
fig. 6 is a flowchart illustrating a wlan scanning method according to another embodiment;
FIG. 7 is a block diagram of an exemplary WLAN scanning device;
fig. 8 is a block diagram of a partial structure of a mobile phone related to a terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As shown in fig. 1, in an embodiment, a wlan scanning method is provided, which is applied to a terminal with a mobile communication function to control a wlan scanning manner of the terminal, and the wlan scanning method specifically includes the following steps:
step 102: and acquiring current time information.
Specifically, when the WLAN function of the mobile terminal is turned on, if the mobile terminal needs to Access the WLAN network, it needs to discover a nearby accessible network Access device, such as an Access Point (AP), and scan, authenticate, and associate with the network Access device, so as to Access the WLAN network. The mobile terminal acquires the current time information in real time and judges the state of the mobile terminal according to the current time information. Wherein, the time information includes, but is not limited to, date, week, hour, minute, and second.
Step 104: and judging whether the time information is in a preset idle time period or not according to the time information.
The idle time period refers to that when the WLAN function of the mobile terminal is in an on state, the WLAN is not connected with the wireless access point for a long time, and the mobile terminal continuously scans available wireless access points around, and at this time, the WLAN of the mobile terminal is in the on state but is not actually connected with the wireless access point to form a WLAN network, so that the WLAN function of the mobile terminal is considered to be in an idle time state.
The mobile terminal may obtain an idle time period set by a user, specifically, display a scan setting page on the mobile terminal, detect a setting operation of the user, where the setting operation includes but is not limited to a touch operation, a gesture operation, and a voice control operation, for example, the mobile terminal may detect that the user triggers a setting switch of the scan setting page through a key, a touch screen, and the like, and detect time setting information input by the user; or the mobile terminal detects the gesture operation of the user, and recognizes the gesture operation as a request for triggering the setting switch; or the mobile terminal receives the voice signal and recognizes the voice signal as a request for triggering the setting switch and the input time setting information. The scan setup function can be turned on or off by triggering a setup switch of the scan setup page. Optionally, the mobile terminal may further record the work and rest time of the user in a self-learning manner, and determine the idle time period of the WLAN connection of the mobile terminal according to the work and rest time of the user.
The mobile terminal compares the acquired current time information with a preset idle period, judges whether the current time is in the preset idle period, if so, executes step 106, and if not, executes step 108, which indicates that the WLAN function of the mobile terminal is in a common connection period at this time.
Step 106: and searching for available wireless access points in a passive scanning mode.
When the mobile terminal is in the preset idle time period, which indicates that the WLAN function utilization rate of the mobile terminal is low at this time, the default active scanning mode of the mobile terminal is switched to the passive scanning mode, and the passive scanning mode is adopted to scan nearby accessible network access devices, such as wireless access points and wireless routers. That is, when the mobile terminal is in the idle period, no matter whether the mobile terminal is connected to the network access device, such as an AP or a wireless router, the scanning is performed in a passive scanning manner. Because the user has low use demand on the wireless local area network in the idle state, if the default active scanning mode is still maintained at the time, and a high-power radio frequency signal is periodically transmitted to scan nearby accessible network access equipment, the power consumption of the mobile terminal is invisibly increased, the standby time of the whole machine is shortened, the radiation intensity of the mobile terminal is increased by searching for available wireless access points in the active scanning mode, and the physical and psychological health of the user can be influenced by using the mobile terminal in the environment for a long time. After the active scanning mode is switched to the passive scanning mode, the power consumption can be saved, the cruising ability can be improved, and the radiation can be reduced.
It should be noted that, for the passive scanning mode, the mobile terminal does not actively transmit a probe request frame, but passively receives a Beacon frame (Beacon) periodically transmitted by the wireless access point to discover the network. The beacon frame includes information such as a service set identifier of the wireless access point AP, a support rate, an MAC address of the wireless access point, a supported authentication method, an encryption algorithm, a beacon frame transmission interval, and a used channel. For example, the default period for the wireless access point to transmit the beacon frame is 100ms, i.e., the wireless access point broadcasts and transmits the beacon frame every 100 ms. STAs learn about the presence of a wireless network by listening to beacon frames on each of the channels they support.
For the active scanning mode, the mobile terminal actively sends detection signals on channels supported by the mobile terminal in sequence, so as to detect the wireless networks existing around. The Probe signal transmitted by the mobile terminal is called a Probe Request frame (Probe Request), and the network signal is acquired by receiving a Probe Response frame (Probe Response). The probe request frame may be divided into two types, one type is an unspecified Service Set Identifier (SSID), and the other type is an assigned SSID. If the service set identifier is not specified in the probe request frame, it means that the probe request wants to acquire all the surrounding wireless network signals that can be acquired, and all the wireless access points that receive the broadcast probe request frame respond to the mobile terminal. If the service set identifier is specified in the probe request frame, it means that the mobile terminal only wants to find the specific service set identifier, and does not need other wireless networks except the specified service set identifier. After receiving the probe request frame, the wireless access point will respond to the mobile terminal only when finding that the service set identifier in the probe request frame is the same as the service set identifier of the wireless access point.
Step 108: and searching for available wireless access points according to a preset scanning strategy.
Specifically, when the mobile terminal is not in the preset idle time period, it indicates that the WLAN function usage rate of the mobile terminal is high at this time, in order to quickly scan an available wireless access point to connect to a wireless network, if the current scanning mode of the mobile terminal is passive scanning, the passive scanning is switched to an active scanning mode, and the active scanning mode is used to scan nearby accessible network access devices, such as a wireless access point, a wireless router, and the like. Optionally, the preset scanning policy may also be that a corresponding scanning mode is automatically matched according to a scanning request sent by an application program on the mobile terminal, a location where the mobile terminal is located, a moving speed of the mobile terminal, and other scenes, to scan the nearby accessible network access device.
According to the wireless local area network scanning method, the current time information is obtained, whether the current time information is in the preset idle time period or not is judged according to the time information, if yes, the available wireless access points are searched in a passive scanning mode, otherwise, the available wireless access points are searched according to the preset scanning strategy, the scanning mode of the terminal can be automatically switched according to the work and rest time of the user, the power consumption of the terminal is reduced, the radiation of the terminal in the scanning process is reduced, and the user experience is improved.
As shown in fig. 2, in an embodiment, the determining whether the preset idle time period is within the preset idle time period according to the time information includes:
step 202: and acquiring preset time points for switching the scanning modes, wherein each preset time point corresponds to a scanning switching strategy.
The mobile terminal obtains a time point parameter set by a user, wherein the time point parameter can be date, week, time, minute and second. The scanning switching strategy can be switched from active scanning to passive scanning, or from passive scanning to active scanning, and the setting of the scanning switching strategy can be different according to different scenes.
Specifically, the user sets a time point for switching the WLAN scanning mode of the mobile terminal according to the work and rest time of the user, for example, the user who goes to work or learns on monday to friday, the usage rate of the WLA is low in most of the time in this time period, and the WLAN scanning mode for switching the mobile terminal can reduce power consumption without affecting the use of the user, that is, monday to friday is set as an effective time period for switching the WLAN scanning mode, and the function is invalid in saturday, wherein a period of seven days is one period. Further, the mobile terminal acquires the calendar information, determines an effective time period according to the legal holiday on the calendar information, and the switching of the WLAN scanning mode is invalid in the legal holiday, namely the switching of the WLAN scanning mode is not carried out in the legal holiday. Meanwhile, the user needs to set the time point for switching the WLAN scanning mode according to the work and rest time from monday to friday, for example, 8 am is switched from the active scanning mode to the passive scanning mode, and 6 pm is switched from the passive scanning mode back to the active scanning mode. Therefore, the AP is searched by passive scanning under the condition that the use rate of the WLAN of the user is not high, the AP is searched by active scanning in the time period when the WLAN function is frequently used by the user, the power consumption and radiation of the mobile terminal can be reduced under the condition that the use of the user is not influenced, and the available AP is quickly searched to form a WLAN network when the user needs to connect the WLAN.
Step 204: and when the preset time point is reached, judging whether the scanning switching strategy mapped by the preset time point is active scanning switching to passive scanning.
As shown in fig. 4, the mobile terminal operates according to a preset time point, when the mobile terminal detects that a time point set by a user and switched from an active scanning mode to a passive scanning mode arrives, the mobile terminal first determines whether the current time point is within an effective time period, such as monday to friday, if the current time point is within the effective time period, the scanning mode is automatically switched to the passive scanning mode so as to save power consumption, and if the current time point is not within the effective time period, such as saturday and legal holiday, the mobile terminal does not perform any operation. When the mobile terminal detects that the time point set by the user and switched from the passive scanning mode to the active scanning mode arrives, the mobile terminal judges whether the current scanning mode is the passive scanning mode, if so, the scanning mode is switched to the active scanning mode, so that the capability of the mobile terminal for searching the AP is improved, the network searching performance is maximized, and the user experience is improved.
As shown in fig. 3, in an embodiment, the determining whether the idle time period is within a preset idle time period according to the time information further includes:
step 302: and when the terminal is connected with the wireless access point, recording the connection time of the terminal and the wireless access point.
In practical application, after a user starts a WLAN function, the user scans available hotspots nearby, connects the hotspots and inputs a password, after successful connection, the mobile terminal records the time of WLAN connection, and when the user closes the WLAN or leaves the current area, and the WLAN is disconnected, the mobile terminal records the time of WLAN disconnection.
Optionally, the mobile terminal may further record location information of the terminal when the WLAN is connected or disconnected, determine an area where the user has a high requirement for WLAN connection according to the location information of the terminal, and further switch a WLAN scanning mode according to the location information of the mobile terminal.
Step 304: and periodically acquiring the connection frequency of the connection time through machine self-learning.
The mobile terminal performs statistical analysis on the recorded data at fixed period, periodically counts the frequency of WLAN connection time, and determines the switching strategy of the scanning mode according to the frequency of the WLAN connection time.
Step 306: and determining the connection state of the wireless local area network corresponding to the terminal in different time periods according to the connection frequency.
Specifically, a period in which the WLAN is repeatedly in a connected state for a long time in each cycle is regarded as a "common period", a period in which the WLAN is not connected in each cycle is regarded as an "idle period", and a period in which the WLAN is less repeatedly or occasionally connected in each cycle is regarded as an "occasional period". When the mobile terminal is in a common time period, searching available APs in an active scanning mode to quickly connect a network; when the mobile terminal is in an idle time period, searching available APs in a passive scanning mode to reduce the power consumption of the mobile terminal; when the mobile terminal is in the occasional time period, the scanning mode can be switched according to a wireless scanning request sent by an application program on the detection terminal.
In one embodiment, the mobile terminal periodically acquires user location information, records the location information when the terminal accesses the AP, and determines area information according to the frequency and duration of connection time, for example, an area repeatedly connected to the WLAN for a long time in each period is identified as a home or work area; other areas are identified as not connected or occasionally connected to the WLAN in each cycle. When the mobile terminal is in a home or a working area, searching available APs in an active scanning mode to quickly connect a network; when the mobile terminal is in other areas, the available APs are searched in a passive scanning mode so as to reduce the power consumption of the mobile terminal.
Optionally, in an embodiment, when the wireless lan is accessed by using an active scanning mode, the active scanning mode is switched to a passive scanning mode.
As shown in fig. 5, in an embodiment, the searching for an available wireless access point according to a preset scanning policy further includes:
step 502: detecting whether the terminal receives a wireless scanning request sent by an application program, wherein the wireless scanning request carries the historical attribute of the application program; if yes, go to step 504.
When the mobile terminal is in a non-idle period, which may be a regular period or an occasional period, the scanning mode of the mobile terminal may be determined by detecting whether the terminal receives a wireless scanning request sent by an application program. When a foreground or background application program of the mobile terminal needs to access the wireless local area network, a wireless scanning request needs to be sent to an operating system of the mobile terminal, and the application program is allowed to access the wireless local area network after the operating system responds to the wireless scanning request.
Specifically, the wireless scanning request carries a history attribute of the application program, where the history attribute of the application program includes a history duration, a history access frequency, and the like of the application program accessing to the wireless local area network within a preset period. The preset period may be 24 hours, that is, from morning 00: -24: 00:00 at night, with a daily cycle.
Step 504: and determining the scanning mode of the terminal according to the mapping relation between the preset historical attribute and the scanning mode, wherein the scanning mode comprises active scanning and passive scanning.
When the historical duration of the application program accessing the wireless local area network in the preset period is longer than the preset duration, setting the scanning mode corresponding to the historical attribute as an active scanning mode in a mapping relation table; on the contrary, in the mapping relation table, the scanning mode corresponding to the history attribute is set as the passive scanning mode.
Correspondingly, when the historical frequency of the application program accessing the wireless local area network in the preset period is greater than the preset frequency, setting the scanning mode corresponding to the historical attribute as an active scanning mode in a mapping relation table; on the contrary, in the mapping relation table, the scanning mode corresponding to the history attribute is set as the passive scanning mode.
Table 1 is a mapping relationship correspondence table of history attribute and scanning mode
Historical attributes Scanning mode
The history duration is greater than the preset duration Active scanning
The historical duration is less than the preset duration Passive scanning
The historical frequency is greater than the preset frequency Active scanning
The historical frequency is less than the preset frequency Passive scanning
According to the history attribute carried in the wireless scanning request, the scanning mode (active scanning or passive scanning) corresponding to the history attribute can be obtained according to the mapping relationship between the history attribute and the scanning mode shown in table 1.
Step 506: and scanning wireless access points according to the determined scanning mode.
For example, if the application is a chat interactive program with the highest frequency of use by the user, it may be determined that the scanning mode corresponding to the history attribute of the application is the active scanning mode, and at this time, the mobile terminal switches to the active scanning mode, so that the available wireless local area network can be quickly scanned, and the timeliness is good and the response is fast. Correspondingly, if the scanning mode corresponding to the history attribute of the application program is the passive scanning mode, the passive scanning mode is adopted to scan the wireless local area network, so that the power consumption is saved, the standby time is prolonged, and the radiation is reduced.
In the embodiment, the corresponding scanning mode can be determined in the mapping relation in real time according to the historical attributes of the application program, the wireless network is scanned by adopting a scanning mode matched with the historical attributes according to different historical attributes, and if the active scanning mode is adopted, the scanning efficiency can be improved, the timeliness is good, and the response is fast; if the passive scanning mode is adopted, the power consumption can be saved, the standby time is prolonged, and the radiation is reduced.
As shown in fig. 6, in one embodiment, the searching for available wireless access points includes:
step 602: and acquiring the position information of the terminal.
The position information of the mobile terminal can be detected through a GPS positioning technology, a Beidou positioning technology or a base station positioning technology. In the embodiment, the base station positioning technology is adopted to obtain the position information of the current mobile terminal, and the GPS positioning does not need to be actively started, so that the power consumption of the GPS positioning is reduced.
Step 604: acquiring a preset hotspot database matched with the position information; and a plurality of wireless access points capable of covering the current position area are stored in the preset hotspot database.
The preset hotspot database stores a plurality of hotspots which can cover the current position area. That is, the coverage area of the hotspot stored in the preset hotspot database includes the current location area where the mobile terminal is located.
It should be noted that the hot spot in the preset hot spot database may be a common hot spot, or a secure hot spot to which the mobile terminal connects once.
Step 606: and selecting a corresponding wireless access point from the preset hotspot database for searching.
The database stores stability information of connection between each hotspot and the mobile terminal. The number of hot spots in the preset database may be any, for example, 1, 2 or more, and when the number of hot spots is one, the hot spots may be directly scanned preferentially. When the number of the hotspots is multiple, scanning can be performed according to the stability information of the connection between each hotspot and the mobile terminal, and the higher the stability is, the higher the scanning priority is, that is, the scanning of the hotspots with high priority is preferentially performed.
In the embodiment, the mobile terminal can preferentially scan the WiFi hotspots with high stability in the preset hotspot database as far as possible, the scanning accuracy can be improved, the mobile terminal is prevented from blindly scanning and connecting all the WiFi hotspots, extra power consumption is reduced, and the user experience is improved.
As shown in fig. 7, in one embodiment, there is provided a wireless local area network scanning apparatus, including: an obtaining module 701, a judging module 702, a scanning module 703 and a scanning switching module 704.
The obtaining module 701 is configured to obtain current time information.
The determining module 702 is configured to determine whether the time period is within a preset idle time period according to the time information.
The scanning module 703 is configured to search for available wireless access points in a passive scanning manner.
The scanning switching module 704 is configured to search for an available wireless access point according to a preset scanning policy.
In an embodiment, the determining module 702 is further configured to determine, after obtaining a preset time point for switching the scanning mode, whether the scanning switching policy mapped by the preset time point is active scanning to passive scanning when the preset time point is reached.
In one embodiment, the determining module 702 is further configured to record connection time of the wireless local area network when the terminal is connected to the wireless access point, periodically obtain connection frequency of the connection time through machine self-learning, and determine connection states of the wireless local area network corresponding to the terminal at different time periods according to the connection frequency.
In one embodiment, the scan switching module 704 is further configured to switch to active scanning to search for available wireless access points if the current scanning mode of the terminal is detected and the current scanning mode is passive scanning.
In an embodiment, the scanning switching module 704 is further configured to determine a scanning mode of the terminal according to a mapping relationship between a preset historical attribute and the scanning mode if it is detected that the terminal receives a wireless scanning request sent by an application program, and scan a wireless access point according to the determined scanning mode.
In an embodiment, the scanning module 703 is further configured to obtain location information of the terminal, obtain a preset hotspot database matched with the location information, and select a corresponding wireless access point from the preset hotspot database for searching.
In an embodiment, after the available wireless access points are searched according to the preset scanning strategy, when the wireless local area network is accessed by adopting an active scanning mode, the active scanning mode is switched to a passive scanning mode.
According to the wireless local area network scanning device, the current time information is obtained, whether the current time information is in the preset idle time period or not is judged according to the time information, if yes, the available wireless access points are searched in a passive scanning mode, otherwise, the available wireless access points are searched according to the preset scanning strategy, the scanning mode of the terminal can be automatically switched according to the work and rest time of the user, the power consumption of the terminal is reduced, the radiation of the terminal in the scanning process is reduced, and the user experience is improved.
The division of each module in the control device of the wireless lan switch is only for illustration, and in other embodiments, the control device of the wireless lan switch may be divided into different modules as needed to complete all or part of the functions of the control device of the wireless lan switch.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media embodying computer-executable instructions that, when executed by one or more processors, cause the processors to perform wireless local area network scanning methods as described in the embodiments above.
The embodiment of the application also provides a computer program product. A computer program product comprising instructions which, when run on a computer, cause the computer to perform the wireless local area network scanning method described in the embodiments above.
The embodiment of the application also provides a terminal. As shown in fig. 8, for convenience of explanation, only the parts related to the embodiments of the present application are shown, and details of the technology are not disclosed, please refer to the method part of the embodiments of the present application. The terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of sales), a vehicle-mounted computer, a wearable device, and so on, taking the terminal as the mobile phone as an example:
fig. 8 is a block diagram of a partial structure of a mobile phone related to a computer device provided in an embodiment of the present application. Referring to fig. 8, the handset includes: radio Frequency (RF) circuitry 810, memory 820, input unit 830, display unit 840, sensor 850, audio circuitry 860, wireless fidelity (WiFi) module 870, processor 880, and power supply 890. Those skilled in the art will appreciate that the handset configuration shown in fig. 8 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The RF circuit 810 may be used for receiving and transmitting signals during information transmission and reception or during a call, and may receive downlink information of a base station and then process the downlink information to the processor 880; the uplink data may also be transmitted to the base station. Typically, the RF circuitry 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 810 may also communicate with networks and other devices via 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)), e-mail, Short Messaging Service (SMS), and the like.
The memory 820 may be used to store software programs and modules, and the processor 880 executes various functional applications and data processing of the cellular phone by operating the software programs and modules stored in the memory 820. The memory 820 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function (such as an application program for a sound playing function, an application program for an image playing function, and the like), and the like; the data storage area may store data (such as audio data, an address book, etc.) created according to the use of the mobile phone, and the like. Further, the memory 820 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 830 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone 800. Specifically, the input unit 830 may include a touch panel 831 and other input devices 832. The touch panel 831, which may also be referred to as a touch screen, may collect touch operations performed by a user on or near the touch panel 831 (e.g., operations performed by the user on the touch panel 831 or near the touch panel 831 using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 831 can include two portions, 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 it to touch point coordinates, and sends the touch point coordinates to the processor 880, and can receive and execute commands from the processor 880. In addition, the touch panel 831 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 830 may include other input devices 832 in addition to the touch panel 831. In particular, other input devices 832 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), and the like.
The display unit 840 may be used to display information input by the user or information provided to the user and various menus of the cellular phone. The display unit 840 may include a display panel 841. In one embodiment, the Display panel 841 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. In one embodiment, touch panel 831 can overlay display panel 841, and when touch panel 831 detects a touch operation thereon or nearby, communicate to processor 880 to determine the type of touch event, and processor 880 can then provide a corresponding visual output on display panel 841 based on the type of touch event. Although in fig. 8, the touch panel 831 and the display panel 841 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 831 and the display panel 841 may be integrated to implement the input and output functions of the mobile phone.
The cell phone 800 may also include at least one sensor 850, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 841 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 841 and/or the backlight when the mobile phone is moved to the ear. The motion sensor can comprise an acceleration sensor, the acceleration sensor can detect the magnitude of acceleration in each direction, the magnitude and the direction of gravity can be detected when the mobile phone is static, and the motion sensor can be used for identifying the application of the gesture of the mobile phone (such as horizontal and vertical screen switching), the vibration identification related functions (such as pedometer and knocking) and the like; the mobile phone may be provided with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor.
The audio circuitry 860, speaker 861 and microphone 862 may provide an audio interface between the user and the handset. The audio circuit 860 can transmit the electrical signal converted from the received audio data to the speaker 861, and the electrical signal is converted into a sound signal by the speaker 861 and output; on the other hand, the microphone 862 converts the collected sound signal into an electrical signal, which is received by the audio circuit 860 and converted into audio data, and then the audio data is output to the processor 880 for processing, and then the audio data may be transmitted to another mobile phone through the RF circuit 810, or the audio data may be output to the memory 820 for subsequent processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to send and receive e-mails, browse webpages, access streaming media and the like through the WiFi module 870, and provides wireless broadband Internet access for the user. Although fig. 8 shows WiFi module 870, it is understood that it is not an essential component of cell phone 800 and may be omitted as desired.
The processor 880 is a control center of the mobile phone, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 820 and calling data stored in the memory 820, thereby integrally monitoring the mobile phone. In one embodiment, processor 880 may include one or more processing units. In one embodiment, the processor 880 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, and the like; the modem processor handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 880.
The cell phone 800 also includes a power supply 890 (e.g., a battery) for powering the various components, which may be logically coupled to the processor 880 via a power management system that may be used to manage charging, discharging, and power consumption.
In one embodiment, the cell phone 800 may also include a camera, a bluetooth module, and the like.
In the embodiment of the present application, when the processor 880 included in the mobile terminal executes the computer program stored in the memory, the wireless local area network scanning method described in the above embodiments is implemented.
When the computer program running on the processor is executed, the scanning mode of the terminal can be automatically switched according to the work and rest time of the user, the power consumption of the terminal is reduced, the radiation of the terminal in the scanning process is reduced, and the user experience is improved.
Any reference to memory, storage, database, or other medium used herein may include non-volatile and/or volatile memory. Suitable non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (14)

1. A wireless local area network scanning method is applied to a terminal with a mobile communication function to control a wireless local area network scanning mode of the terminal, and comprises the following steps:
acquiring current time information;
acquiring preset time points for switching scanning modes, wherein each preset time point corresponds to a scanning switching strategy;
when the current time information reaches the preset time point, judging whether a scanning switching strategy mapped by the preset time point is active scanning switching to passive scanning or not;
if yes, searching for an available wireless access point in a passive scanning mode;
if not, searching the available wireless access points according to a preset scanning strategy.
2. The method of claim 1, further comprising:
when the terminal is connected with the wireless access point, recording the connection time of the terminal and the wireless access point;
periodically acquiring the connection frequency of the connection time through machine self-learning;
and determining the connection state of the wireless local area network corresponding to the terminal in different time periods according to the connection frequency.
3. The method of claim 1, wherein the searching for available wireless access points according to a preset scanning strategy comprises:
detecting a current scanning mode of the terminal;
if the current scanning is passive scanning, switching to active scanning to search for available wireless access points.
4. The method of claim 3, wherein the searching for available wireless access points according to a preset scanning strategy further comprises:
detecting whether the terminal receives a wireless scanning request sent by an application program, wherein the wireless scanning request carries the historical attribute of the application program;
if so, determining a scanning mode of the terminal according to a mapping relation between preset historical attributes and the scanning mode, wherein the scanning mode comprises active scanning and passive scanning;
and scanning wireless access points according to the determined scanning mode.
5. The method according to claim 1, further comprising, after the searching for available wireless access points according to the preset scanning strategy:
and when the wireless local area network is accessed by adopting an active scanning mode, switching the active scanning mode into a passive scanning mode.
6. The method of claim 1, wherein searching for available wireless access points comprises:
acquiring the position information of the terminal;
acquiring a preset hotspot database matched with the position information; a plurality of wireless access points capable of covering the current position area are stored in the preset hotspot database;
and selecting a corresponding wireless access point from the preset hotspot database for searching.
7. An apparatus for wireless local area network scanning, the apparatus comprising:
the acquisition module is used for acquiring current time information;
the judging module is used for acquiring preset time points for switching scanning modes, wherein each preset time point corresponds to one scanning switching strategy; when the current time information reaches the preset time point, judging whether a scanning switching strategy mapped by the preset time point is active scanning switching to passive scanning or not;
the scanning module is used for searching for available wireless access points in a passive scanning mode;
and the scanning switching module is used for searching the available wireless access points according to a preset scanning strategy.
8. The apparatus of claim 7,
the judging module is also used for recording the connection time of the terminal and the wireless access point when the terminal is connected with the wireless access point; periodically acquiring the connection frequency of the connection time through machine self-learning; and determining the connection state of the wireless local area network corresponding to the terminal in different time periods according to the connection frequency.
9. The apparatus of claim 7,
the scanning switching module is further configured to detect a current scanning mode of the terminal, and switch to active scanning to search for an available wireless access point if the current scanning mode is passive scanning.
10. The apparatus of claim 9,
the scanning switching module is further configured to determine a scanning mode of the terminal according to a mapping relationship between a preset history attribute and the scanning mode if it is detected that the terminal receives a wireless scanning request sent by an application program, and scan a wireless access point according to the determined scanning mode, where the wireless scanning request carries the history attribute of the application program, and the scanning mode includes active scanning and passive scanning.
11. The apparatus of claim 7,
and after searching for the available wireless access points according to the preset scanning strategy, switching the active scanning mode into a passive scanning mode when accessing the wireless local area network by adopting the active scanning mode.
12. The apparatus of claim 7,
the scanning module is further configured to acquire location information of a terminal, acquire a preset hotspot database matched with the location information, store a plurality of wireless access points capable of covering a current location area in the preset hotspot database, and select a corresponding wireless access point from the preset hotspot database for searching.
13. A computer device comprising a memory and a processor, the memory having stored therein computer readable instructions which, when executed by the processor, cause the processor to perform the steps of the method of any one of claims 1 to 6.
14. A computer-readable storage medium, on 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.
CN201711261808.5A 2017-12-04 2017-12-04 Wireless local area network scanning method and device, computer equipment and storage medium Active CN108012304B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711261808.5A CN108012304B (en) 2017-12-04 2017-12-04 Wireless local area network scanning method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711261808.5A CN108012304B (en) 2017-12-04 2017-12-04 Wireless local area network scanning method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108012304A CN108012304A (en) 2018-05-08
CN108012304B true CN108012304B (en) 2020-09-11

Family

ID=62056404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711261808.5A Active CN108012304B (en) 2017-12-04 2017-12-04 Wireless local area network scanning method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108012304B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI739063B (en) * 2019-01-31 2021-09-11 和碩聯合科技股份有限公司 Modem and communication method
CN109905911B (en) * 2019-03-18 2023-09-19 努比亚技术有限公司 WiFi control method and device, wearable intelligent equipment and storage medium
CN110337134B (en) * 2019-07-09 2021-05-14 翱捷科技股份有限公司 Mobile terminal and method for realizing WiFi active scanning
CN112135274B (en) * 2020-09-24 2023-08-29 Oppo广东移动通信有限公司 Bluetooth scanning method, device, electronic equipment and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101491144A (en) * 2006-07-14 2009-07-22 高通股份有限公司 WLAN system scanning and selection
CN101932054A (en) * 2010-08-06 2010-12-29 北京交通大学 Switching method of wireless local area network
CN103476004A (en) * 2013-09-26 2013-12-25 东莞宇龙通信科技有限公司 Network access auxiliary method and network access auxiliary system
WO2014048227A1 (en) * 2012-09-28 2014-04-03 华为技术有限公司 Scanning method, scanning control method, user equipment, base station, and system
CN104125623A (en) * 2013-04-28 2014-10-29 华为技术有限公司 Wireless local area network discovery method, controller, user equipment and network access equipment
CN105407473A (en) * 2015-10-22 2016-03-16 小米科技有限责任公司 Wireless local area network discovery method and apparatus
CN106171012A (en) * 2013-12-20 2016-11-30 英特尔公司 Wi Fi scan schedule and power for low-power indoor positioning adapt to
CN106375533A (en) * 2016-11-29 2017-02-01 惠州Tcl移动通信有限公司 Unlocking method and system of mobile terminal
CN106507289A (en) * 2016-12-07 2017-03-15 广东欧珀移动通信有限公司 A kind of cut-in method of wireless network and mobile terminal
CN106535249A (en) * 2016-10-25 2017-03-22 广东欧珀移动通信有限公司 Control method and control device for wireless local area networks, and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3066871A1 (en) * 2013-11-08 2016-09-14 Interdigital Patent Holdings, Inc. Wi-fi contention reduction

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101491144A (en) * 2006-07-14 2009-07-22 高通股份有限公司 WLAN system scanning and selection
CN101932054A (en) * 2010-08-06 2010-12-29 北京交通大学 Switching method of wireless local area network
WO2014048227A1 (en) * 2012-09-28 2014-04-03 华为技术有限公司 Scanning method, scanning control method, user equipment, base station, and system
CN104125623A (en) * 2013-04-28 2014-10-29 华为技术有限公司 Wireless local area network discovery method, controller, user equipment and network access equipment
CN103476004A (en) * 2013-09-26 2013-12-25 东莞宇龙通信科技有限公司 Network access auxiliary method and network access auxiliary system
CN106171012A (en) * 2013-12-20 2016-11-30 英特尔公司 Wi Fi scan schedule and power for low-power indoor positioning adapt to
CN105407473A (en) * 2015-10-22 2016-03-16 小米科技有限责任公司 Wireless local area network discovery method and apparatus
CN106535249A (en) * 2016-10-25 2017-03-22 广东欧珀移动通信有限公司 Control method and control device for wireless local area networks, and terminal
CN106375533A (en) * 2016-11-29 2017-02-01 惠州Tcl移动通信有限公司 Unlocking method and system of mobile terminal
CN106507289A (en) * 2016-12-07 2017-03-15 广东欧珀移动通信有限公司 A kind of cut-in method of wireless network and mobile terminal

Also Published As

Publication number Publication date
CN108012304A (en) 2018-05-08

Similar Documents

Publication Publication Date Title
CN107949040B (en) Wireless local area network scanning method and device, computer equipment and storage medium
CN107820331B (en) Call method, device, computer equipment and readable storage medium
US10142845B2 (en) Network connection method and apparatus, and computer storage medium
CN107820302B (en) Mobile terminal wireless local area network scanning method and device and computer equipment
CN108012304B (en) Wireless local area network scanning method and device, computer equipment and storage medium
CN107846723B (en) Wireless local area network scanning method and device, computer equipment and storage medium
CN108040357B (en) Mobile terminal wireless local area network scan method and apparatus, computer equipment
KR101645461B1 (en) Apparatus and method for auto conntecting wlan in portable terminal
EP3852440A1 (en) Method for quickly searching for high-standard network, and terminal device
CN107820301B (en) Control method, device, terminal and storage medium of wireless local area network switch
CN107820303B (en) Mobile terminal wireless local area network scanning method and device and computer equipment
WO2020140725A1 (en) Positioning method and terminal
US20050181734A1 (en) Automatic connection of a mobile device to a wireless network
US10813057B2 (en) Method for processing information and terminal device
CN103475996A (en) Network connecting method, network sharing method and devices
CN107969025B (en) Mobile terminal wireless local area network scanning method and device and computer equipment
CN108471632B (en) Information processing method and device, mobile terminal and computer readable storage medium
US11711783B2 (en) Method for monitoring paging message, mobile terminal and server
CN108471626B (en) Reporting method and detection method of UE (user equipment) capability, mobile terminal and server
CN113412647A (en) Access control method and device
CN106604277B (en) Wireless network access method and mobile terminal
CN107896385B (en) Mobile terminal wireless local area network scan method and apparatus, computer equipment
CN108601068B (en) UE capability detection method, reporting method, mobile terminal and server
CN111818593A (en) Network switching method and terminal
CN107896381B (en) Mobile terminal wireless local area network scanning method and device and computer equipment

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
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.

GR01 Patent grant
GR01 Patent grant