CN107846723B - 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
CN107846723B
CN107846723B CN201711329809.9A CN201711329809A CN107846723B CN 107846723 B CN107846723 B CN 107846723B CN 201711329809 A CN201711329809 A CN 201711329809A CN 107846723 B CN107846723 B CN 107846723B
Authority
CN
China
Prior art keywords
local area
area network
wireless local
terminal
scanning
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
CN201711329809.9A
Other languages
Chinese (zh)
Other versions
CN107846723A (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 CN201711329809.9A priority Critical patent/CN107846723B/en
Publication of CN107846723A publication Critical patent/CN107846723A/en
Application granted granted Critical
Publication of CN107846723B publication Critical patent/CN107846723B/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/16Discovering, processing access restriction or access information
    • 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/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • 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 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: searching available wireless access points according to a preset scanning strategy when the WLAN function of the terminal is started; when the terminal accesses the available wireless access point, a wireless local area network communication link is formed, and network information of the wireless local area network communication link is obtained; and controlling the wireless local area network scanning function of the terminal according to the network information of the wireless local area network communication link. By the method, the wireless local area network scanning function of the terminal can be automatically switched on and off according to the network information of the wireless local area network communication link, 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. When the user leaves the range of the available AP, for example, going out for shopping, going to work, traveling, etc., if the user does not manually turn off the WLAN, the mobile terminal will always periodically transmit a signal for scanning, and the scanning process will cause the power consumption of the mobile terminal to increase, and shorten the standby time of the mobile terminal.
Disclosure of Invention
The embodiment of the application provides a wireless local area network scanning method and device, computer equipment and a storage medium, which can automatically switch on and off a wireless local area network scanning function of a terminal and reduce the power consumption of the terminal.
A wireless local area network scanning method is applied to a terminal with a mobile communication function, and the method comprises the following steps:
searching available wireless access points according to a preset scanning strategy when the WLAN function of the terminal is started;
when the terminal accesses the available wireless access point, a wireless local area network communication link is formed, and network information of the wireless local area network communication link is obtained;
and controlling the wireless local area network scanning function of the terminal according to the network information of the wireless local area network communication link.
A wireless local area network scanning apparatus, the apparatus comprising:
the terminal comprises a searching module, a searching module and a searching module, wherein the searching module is used for searching available wireless access points according to a preset scanning strategy when the WLAN function of the terminal is started;
an obtaining module, configured to form a wireless local area network communication link when the terminal accesses the available wireless access point, and obtain network information of the wireless local area network communication link;
and the scanning control module is used for controlling the wireless local area network scanning function of the terminal according to the network information of the wireless local area network communication link.
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, when the WLAN function of the terminal is started, the available wireless access points are searched according to the preset scanning strategy, when the terminal is accessed to the available wireless access points, the wireless local area network communication link is formed, the network information of the wireless local area network communication link is obtained, the wireless local area network scanning function of the terminal is controlled according to the network information of the wireless local area network communication link, the wireless local area network scanning function of the terminal can be automatically switched on and off according to the network information of the wireless local area network communication link, the power consumption of the terminal is reduced, the radiation brought by 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 diagram illustrating an exemplary embodiment of a wireless local area network scanning method for a mobile terminal;
FIG. 2 is a flow diagram of a WLAN scanning method in one 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 flowchart illustrating a wlan scanning method according to another embodiment;
FIG. 8 is a block diagram of an exemplary WLAN scanning device;
fig. 9 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.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another.
Fig. 1 is a schematic diagram of an operating environment of a wlan scanning method for a mobile terminal according to an embodiment. The working environment relates to various application scenarios, for example, including Universal Mobile Telecommunications System (UMTS), Long Term Evolution (LTE), Global System for Mobile communications (GSM), WLAN, and the like. By way of non-limiting example, the following description relates to a WLAN communication system, but such teachings are equally applicable to other types of systems. As shown in fig. 1, the operating environment thereof relates to a mobile terminal 100, a cloud server 101, a base station 102 and a wireless Access Point (AP) 103, the mobile terminal 100 and the base station 102 can communicate with each other, each base station 102 can communicate with the cloud server 101, the mobile terminal 100 can also communicate with the cloud server 101 through a related network other than the base station 102, and the mobile terminal 100 can also communicate with the wireless Access device 103 to establish a wireless network connection. Further, in a wireless communication system, the base station 102 receives reverse link signals from the mobile terminals 100. The mobile terminal 100 is generally engaged in conversations, messaging, and other types of communications. The base station 102 processes each received reverse link signal and transmits the processed signal to the mobile terminal 100 in the form of a forward link signal. Optionally, the communication channel division manner adopted in the communication process includes, but is not limited to, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), and Code Division Multiple Access (CDMA).
As shown in fig. 2, in an embodiment, a wlan scanning method is provided, which is applied to a mobile communication terminal, and this embodiment is exemplified by applying the wlan scanning method to the mobile terminal 100 in the operating environment of fig. 1. The wireless local area network scanning method specifically comprises the following steps:
step 202: and searching for available wireless access points according to a preset scanning strategy when the WLAN function of the terminal is started.
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. A wireless access point may be understood as a wireless local area network to which a mobile terminal has successfully accessed, for example, an available AP for home use, an available AP for work units, an available AP for frequent access or other available APs in public areas, and so on. The preset database of the mobile terminal stores device information of a plurality of available APs, wherein the device information may include Service Set Identifiers (SSIDs) of available wireless access points, MAC addresses, used channels, wireless frequencies, coverage areas of the available wireless access points, location information of the available wireless access points, and the like, and the device information of each available wireless access point is stored in the preset database in a one-to-one correspondence manner. And the mobile terminal searches for available wireless access points according to a preset scanning strategy after the WLAN is started.
For example, the WLAN scanning mode of the mobile terminal is switched according to the work and rest time of the user, when the mobile terminal is in a preset idle time period, 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. And when the mobile terminal is in the non-preset idle time period, switching the passive scanning into an active scanning mode, and scanning the nearby accessible network access equipment by adopting the active scanning mode. Optionally, the preset scanning switch policy may also be to automatically control a switch of the scanning function to scan a nearby accessible network access device according to a scene, such as a scanning request sent by an application program on the mobile terminal, a location where the mobile terminal is located, and a moving speed of the mobile terminal.
Step 204: and when the terminal accesses the available wireless access point, forming a wireless local area network communication link and acquiring the network information of the wireless local area network communication link.
Specifically, when the current location of the mobile terminal has an available wireless access point and the mobile terminal accesses any available wireless access point, a wireless local area network communication link is formed, and the mobile terminal can acquire the network information of the accessed available wireless access point and further acquire the network information of the wireless local area network communication link.
The network information at least includes a Received Signal Strength Indication (RSSI) of the wireless local area network provided by the mobile terminal receiving the available wireless access point, which may be referred to as a Received Signal Strength Indication, and is an optional part of the wireless transmission layer for determining link quality and broadcast transmission Strength. The received signal strength indication RSSI is typically negative, with larger values indicating better link quality and smaller values indicating worse link quality.
Optionally, the network information may also be a packet error rate of the communication link, where the packet error rate represents a ratio of the number of delayed data packets to the number of transmitted data packets, and the packet error rate reflects data stability of the current WLAN signal. For example, the packet error rate of different WLAN antennas may be 8%, 10%, 12%, etc., and the WLAN antenna with the smaller packet error rate is selected to ensure the data stability of the network signal.
Step 206: and controlling the wireless local area network scanning function of the terminal according to the network information of the wireless local area network communication link.
Specifically, the mobile terminal controls the WLAN scanning function according to the network information of the wireless local area network communication link, and since the received signal strength indication in the network information can be used for evaluating the communication quality of the communication link, when the communication quality is good, the user has low requirements for the real-time performance of other available wireless access points, and at this time, the mobile terminal can close the WLAN scanning function to save power consumption; when the communication quality is poor, a user urgently needs to quickly switch to other wireless access points with better communication quality, and at the moment, the mobile terminal starts a WLAN scanning function so as to meet the user requirements to the maximum extent and ensure the fluency of the network.
Optionally, the mobile terminal may further control the WLAN scanning function according to a packet error rate of the wireless local area network communication link, and if the packet error rate of the current communication link is lower than a preset ratio threshold, the mobile terminal may turn off the WLAN scanning function to save power consumption; if the packet error rate of the current communication link is higher than the preset rate threshold, the mobile terminal starts the WLAN scanning function at this moment, so as to maximally meet the user requirements and ensure the network fluency.
According to the wireless local area network scanning method, when the WLAN function of the terminal is started, the available wireless access points are searched according to the preset scanning strategy, when the terminal is accessed to the available wireless access points, the wireless local area network communication link is formed, the network information of the wireless local area network communication link is obtained, the wireless local area network scanning function of the terminal is controlled according to the network information of the wireless local area network communication link, the wireless local area network scanning function of the terminal can be automatically switched on and off according to the network information of the wireless local area network communication link, the power consumption of the terminal is reduced, the radiation brought by the terminal in the scanning process is reduced, and the user experience is improved.
As shown in fig. 3, in an embodiment, the searching for an available wireless access point according to a preset scanning policy includes the following steps:
step 302: and acquiring current time information.
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.
The WLAN scanning function of the mobile terminal includes active scanning and passive scanning.
It should be noted that, for the active scanning mode, the mobile terminal may actively transmit the detection signals in turn on the channels supported by the mobile terminal, so as to detect the wireless networks existing around the mobile terminal. 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.
For the passive scanning mode, the mobile terminal does not actively send a probe request frame, or passively receives a Beacon frame (Beacon) periodically sent by a 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.
Step 304: and when the terminal is in a preset idle time period, searching for the available wireless access point in a passive scanning mode.
When the mobile terminal is in the preset idle time period, the WLAN function utilization rate of the mobile terminal is low at the 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 equipment, such as a wireless access point and a wireless router. 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.
Step 306: and when the terminal is in a non-preset idle time period, searching for available wireless access points in an active scanning mode.
When the mobile terminal is in the non-preset idle time period, the WLAN function utilization rate of the mobile terminal is high at this time, and 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 adopted to scan nearby accessible network access devices, such as wireless access points, wireless routers and the like.
According to the wireless local area network scanning method provided by the embodiment, 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. 4, in an embodiment, the controlling the wlan scanning function of the terminal according to the network information of the wlan communication link includes the following steps:
step 402: detecting received signal strength of a wireless local area network provided by the available wireless access point.
When the mobile terminal is accessed to the target available wireless access point, the mobile terminal can detect the received signal strength indication RSSI in real time, namely, the signal strength of the wireless local area network provided by the target available wireless access point received by the mobile terminal, and can judge the communication quality of a wireless local area network communication link formed between the current mobile terminal and the target available wireless access point in real time according to the acquired signal strength.
Step 404: and judging the signal intensity and the preset signal intensity threshold value.
The preset signal strength threshold may be understood as a threshold for accessing an available wireless access point, and the size of the preset signal strength threshold may be set according to actual requirements, which is not further limited herein.
And comparing the acquired received signal strength indication RSSI with a preset signal strength threshold, and controlling the WLAN scanning function of the mobile terminal according to the comparison result.
Step 406: and when the signal intensity is greater than a preset signal intensity threshold value, controlling the wireless local area network scanning function to be closed.
When the mobile terminal is accessed to the target available wireless access point, and the received signal intensity of the wireless local area network is greater than or equal to the preset signal intensity threshold value, the communication quality of a communication link between the mobile terminal and the target available wireless access point is good, at the moment, the requirement of the mobile terminal on other available wireless access points is not high, and at the moment, the WLAN scanning function of the mobile terminal is controlled to be closed. Because the mobile terminal has low demand on the wireless local area network when the communication quality of the wireless local area network communication link is good, if the WLAN scanning function is still turned on, the mobile terminal periodically transmits a high-power radio-frequency signal to scan nearby accessible network access devices, such as wireless access points and wireless routers, so that the power consumption of the mobile terminal is invisibly increased, and the standby time of the whole machine is shortened. The radiation generated by the mobile terminal in the process of searching for available wireless access points through scanning can affect physical and psychological health of users using the mobile terminal in such environments for a long time. At this time, the WLAN scanning function is turned off, power consumption can be saved, endurance can be improved, and radiation can be reduced.
Step 408: and when the signal intensity is smaller than a preset signal intensity threshold value, controlling the wireless local area network scanning function to be started.
When the signal strength of the wireless local area network received by the mobile terminal is smaller than the preset signal strength threshold, it indicates that the communication quality of the communication link between the mobile terminal and the target available wireless access point is poor, and if the mobile terminal still accesses the target available wireless access point, the fluency of the user on the internet is affected, and the user experience is affected, so that the mobile terminal needs to be switched to access to the adjacent available wireless access equipment with higher signal strength. At this time, if the WLAN scanning function of the current mobile terminal is in the off state, the WLAN scanning function is turned on to scan nearby accessible network access devices, such as wireless access points, wireless routers, and the like. The network searching performance is maximized, and the user experience is improved.
As shown in fig. 5, in an embodiment, after determining the signal strength and the preset signal strength threshold, the method further includes:
step 502: and acquiring a first duration of the information intensity which is greater than or equal to the preset signal intensity threshold.
When the mobile terminal accesses the available wireless access point and the received signal intensity of the wireless local area network provided by the wireless access point is greater than the preset signal intensity threshold value, the mobile terminal starts timing and acquires a first duration of the received signal intensity of the wireless local area network provided by the wireless access point, which is greater than the preset signal intensity threshold value.
Step 504: and if the first duration is longer than a first preset duration, controlling the wireless local area network scanning function to be closed.
When the mobile terminal is accessed to the available wireless access point, when an object or a person is blocked between the mobile terminal and the accessed available wireless access point, the communication quality of a communication link formed between the mobile terminal and the available wireless access point is influenced, if the influence caused by the factors such as the blocking is only a moment, the first duration is less than the first preset duration, the WLAN scanning function of the mobile terminal is not required to be closed, only if the first duration is greater than the first preset duration, the communication quality of the wireless local area network communication link between the current mobile terminal and the available wireless access point is really considered to be improved, and at the moment, the WLAN scanning function of the mobile terminal is closed to reduce the power consumption of the terminal. In this way, a "ping-pong effect" can be avoided.
In one embodiment, after determining the signal strength and the magnitude of the preset signal threshold, the method further includes:
step 506: and acquiring a second duration of which the information intensity is smaller than the preset signal intensity threshold.
Step 508: and if the second duration is longer than a second preset duration, controlling the wireless local area network scanning function to be started.
When the mobile terminal accesses the available wireless access point, and the second duration of the received signal intensity of the available wireless local area network, which is smaller than the preset signal threshold, is longer than the second preset duration, the communication quality of the wireless local area network communication link between the current mobile terminal and the available wireless access point is considered to be poor, and the WLAN scanning function is controlled to be started, so that the available wireless access point is quickly searched.
Further, in order to ensure that the user can search for other available wireless access points in time, the first preset time duration is usually longer than the second preset time duration.
As shown in fig. 6, in one embodiment, the wlan scanning method further includes the following steps:
step 602: and detecting whether the display page of the terminal is in a setting page of the wireless local area network.
Step 604: and when the display page of the terminal is the setting page of the wireless local area network, controlling the scanning function of the wireless local area network to be started.
Specifically, when the mobile terminal accesses the available wireless access point, the signal quality of the wireless lan communication link is always high, and the RSSI value is greater than the preset signal strength threshold, if the mobile terminal detects that the user enters the WLAN setting page, the user can see all the APs that can be scanned around the page. In this page, the user may manually switch to other APs even if the currently available AP to which the connection is connected is of good signal quality. Therefore, in this scenario, no matter whether the RSSI is less than the preset signal strength threshold, as long as it is detected that the user enters the WLAN setting page, the mobile terminal immediately starts the WLAN scanning function.
As shown in fig. 7, in an embodiment, before the mobile terminal accesses the available wireless access point, the method further includes:
step 702: and when the current position of the mobile terminal has a plurality of available wireless access points, acquiring signal frames sent by the available wireless access points.
And acquiring available wireless access points matched with the current position information in a preset database according to the acquired current position of the mobile terminal. Wherein, the number of the available wireless access points can be 1, 2 or more. Meanwhile, the mobile terminal can acquire the signal frames sent by all the available wireless access points in real time.
Step 704: the received signal strength of the signal frames transmitted by the available wireless access points is detected.
Step 706: and selecting the available wireless access point with the highest received signal strength of the signal frame to access to a wireless local area network.
Specifically, the mobile terminal may use the available wireless access point with the highest received signal strength of the signal frame as the target available wireless access point; the available wireless access point with the strongest received signal stability of the signal frame can also be used as the target available wireless access point; and weighting factors of the strength information and the stability information can be set according to requirements, and the strength information and the stability information are comprehensively considered to determine the target available wireless access point.
In one embodiment, the method further comprises the step of determining the scanning frequency of the scanning mode according to the network information of the target available wireless access point.
Further, when the received signal strength of the wireless local area network communication link provided by the target available wireless access point is larger and larger, the scanning frequency of the mobile terminal WLAN scanning function is reduced, and until the signal strength of the wireless local area network communication link is larger than the preset signal threshold, the WLAN scanning function of the mobile terminal is closed, so that the power consumption is saved.
Further, when the received signal strength of the wireless local area network communication link provided by the target available wireless access point is smaller and smaller until the signal strength of the wireless local area network communication link is smaller than a preset signal threshold, the WLAN scanning function of the mobile terminal is started, and the scanning frequency of the WLAN scanning function of the mobile terminal is increased, so that the available wireless local area network is scanned more quickly, and the user experience is improved.
As shown in fig. 8, in one embodiment, there is provided a wireless local area network scanning apparatus, including: a search module 801, an acquisition module 802, and a scan control module 803.
The searching module 801 is configured to search for an available wireless access point according to a preset scanning policy when the WLAN function of the terminal is turned on.
The obtaining module 802 is configured to form a wireless local area network communication link when the terminal accesses the available wireless access point, and obtain network information of the wireless local area network communication link.
The scan control module 803 is configured to control a wlan scan function of the terminal according to network information of the wlan communication link.
According to the wireless local area network scanning device, when the WLAN function of the terminal is started, the search module 801 searches for available wireless access points according to a preset scanning strategy, the acquisition module 802 forms a wireless local area network communication link when the terminal is accessed to the available wireless access points to acquire the network information of the wireless local area network communication link, the scanning control module 803 controls the wireless local area network scanning function of the terminal according to the network information of the wireless local area network communication link, the wireless local area network scanning function of the terminal can be automatically switched on and off according to the network information of the wireless local area network communication link, the power consumption of the terminal is reduced, the radiation brought by the terminal in the scanning process is reduced, and the user experience is improved.
In one embodiment, the search module 801 is further configured to obtain current time information; when the terminal is in a preset idle time period, searching for an available wireless access point in a passive scanning mode; and when the terminal is in a non-preset idle time period, searching for available wireless access points in an active scanning mode.
In one embodiment, the scanning control module 803 is further configured to detect received signal strength of a wireless local area network provided by the available wireless access point; judging the signal intensity and the size of a preset signal intensity threshold; when the signal intensity is larger than a preset signal intensity threshold value, controlling the wireless local area network scanning function to be closed; and when the signal intensity is smaller than a preset signal intensity threshold value, controlling the wireless local area network scanning function to be started.
In one embodiment, the scan control module 803 is further configured to obtain a first duration that the signal strength is greater than the preset signal strength threshold; and if the first duration is longer than a first preset duration, controlling the wireless local area network scanning function to be closed.
In one embodiment, the scan control module 803 is further configured to obtain a second duration that the signal strength is less than the preset signal strength threshold; and if the second duration is longer than a second preset duration, controlling the wireless local area network scanning function to be started.
In one embodiment, the wlan scanning apparatus further includes a detection module, configured to detect whether a display page of the terminal is on a setting page of the wlan; and when the display page of the terminal is the setting page of the wireless local area network, controlling the scanning function of the wireless local area network to be started.
In one embodiment, the wlan scanning apparatus further includes a selecting module, configured to acquire signal frames sent by a plurality of available wireless access points when the current location of the mobile terminal has the plurality of available wireless access points; detecting the received signal strength of the signal frame transmitted by the available wireless access point; and selecting the available wireless access point with the highest received signal strength of the signal frame to access to a wireless local area network.
The division of each module in the wlan scanning apparatus is only for illustration, and in other embodiments, the wlan scanning apparatus may be divided into different modules as needed to complete all or part of the functions of the wlan scanning apparatus.
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. 9, 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. 9 is a block diagram of a partial structure of a mobile phone related to a terminal according to an embodiment of the present application. Referring to fig. 9, the handset includes: radio Frequency (RF) circuit 910, memory 920, input unit 930, display unit 940, sensor 950, audio circuit 960, wireless fidelity (WiFi) module 970, processor 980, and power supply 990. Those skilled in the art will appreciate that the handset configuration shown in fig. 9 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 910 may be used for receiving and transmitting signals during information transmission or communication, and may receive downlink information of a base station and then process the downlink information to the processor 980; 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 910 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 920 may be used to store software programs and modules, and the processor 980 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 920. The memory 920 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 920 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 930 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 900. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, which may also be referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 931 (e.g., a user operating the touch panel 931 or near the touch panel 931 by using a finger, a stylus, or any other suitable object or accessory), and drive the corresponding connection device according to a preset program. In one embodiment, the touch panel 931 may include two parts of 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 980, and can receive and execute commands sent by the processor 980. In addition, the touch panel 931 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 930 may include other input devices 932 in addition to the touch panel 931. In particular, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), and the like.
The display unit 940 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 940 may include a display panel 941. In one embodiment, the Display panel 941 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. In one embodiment, the touch panel 931 may overlay the display panel 941, and when the touch panel 931 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 980 to determine the type of touch event, and then the processor 980 provides a corresponding visual output on the display panel 941 according to the type of touch event. Although in fig. 9, the touch panel 931 and the display panel 941 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 931 and the display panel 941 may be integrated to implement the input and output functions of the mobile phone.
Cell phone 900 may also include at least one sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 941 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 941 and/or 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.
Audio circuitry 960, speaker 961 and microphone 962 may provide an audio interface between a user and a cell phone. The audio circuit 960 may transmit the electrical signal converted from the received audio data to the speaker 961, and convert the electrical signal into a sound signal for output by the speaker 961; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, converts the electrical signal into audio data after being received by the audio circuit 960, and then outputs the audio data to the processor 980 for processing, and then the audio data can be transmitted to another mobile phone through the RF circuit 910, or the audio data can be output to the memory 920 for subsequent processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 970, and provides wireless broadband Internet access for the user. Although fig. 9 shows WiFi module 970, it is to be understood that it does not belong to the essential components of cell phone 900 and may be omitted as desired.
The processor 980 is a control center of the mobile phone, connects various parts of the entire mobile phone by 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 920 and calling data stored in the memory 920, thereby integrally monitoring the mobile phone. In one embodiment, processor 980 may include one or more processing units. In one embodiment, the processor 980 may integrate an application processor and a modem, wherein the application processor primarily handles operating systems, user pages, applications, and the like; the modem handles primarily wireless communications. It is to be appreciated that the modem may not be integrated into the processor 980. For example, the processor 980 may integrate an application processor and a baseband processor, which may constitute a modem with other peripheral chips, etc. The handset 900 also includes a power supply 990 (e.g., a battery) for supplying power to various components, which may preferably be logically connected to the processor 980 via a power management system, such that the power management system may be used to manage charging, discharging, and power consumption.
In one embodiment, the cell phone 900 may also include a camera, a bluetooth module, and the like.
In the embodiment of the present application, when the processor included in the mobile phone 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 wireless local area network scanning function of the terminal can be automatically switched on and off according to the network information of the wireless local area network communication link, 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 (8)

1. A wireless local area network scanning method is applied to a terminal with a mobile communication function, and the method comprises the following steps:
searching available wireless access points according to a preset scanning strategy when the WLAN function of the terminal is started;
when the terminal accesses the available wireless access point, forming a wireless local area network communication link, and acquiring network information of the wireless local area network communication link, wherein the network information comprises wireless local area network signal strength received by the terminal;
controlling a wireless local area network scanning function of the terminal according to the network information of the wireless local area network communication link;
the controlling the wireless local area network scanning function of the terminal according to the network information of the wireless local area network communication link includes:
detecting received wireless local area network signal strength provided by the available wireless access point;
judging the signal intensity and the size of a preset signal intensity threshold;
when the signal intensity is greater than a preset signal intensity threshold value, acquiring a first duration of which the signal intensity is greater than the preset signal intensity threshold value, and if the first duration is greater than a first preset duration, controlling the wireless local area network scanning function to be closed;
and when the signal intensity is smaller than a preset signal intensity threshold value, acquiring a second duration of which the signal intensity is smaller than the preset signal intensity threshold value, and if the second duration is larger than a second preset duration, controlling the wireless local area network scanning function to be started.
2. The method of claim 1, wherein the searching for available wireless access points according to a preset scanning strategy comprises:
acquiring current time information;
when the terminal is in a preset idle time period, searching for an available wireless access point in a passive scanning mode;
and when the terminal is in a non-preset idle time period, searching for available wireless access points in an active scanning mode.
3. The method of claim 1, further comprising:
detecting whether a display page of the terminal is in a setting page of a wireless local area network or not;
and when the display page of the terminal is the setting page of the wireless local area network, controlling the scanning function of the wireless local area network to be started.
4. The method of claim 1, further comprising, before the terminal accesses the available wireless access points:
when the current position of the mobile terminal has a plurality of available wireless access points, acquiring signal frames sent by the available wireless access points;
detecting the received signal strength of the signal frame transmitted by the available wireless access point;
and selecting the available wireless access point with the highest received signal strength of the signal frame to access to a wireless local area network.
5. The method of claim 1, further comprising:
and determining the scanning frequency of the wireless local area network scanning function according to the network information of the available wireless access points.
6. An apparatus for wireless local area network scanning, the apparatus comprising:
the terminal comprises a searching module, a searching module and a searching module, wherein the searching module is used for searching available wireless access points according to a preset scanning strategy when the WLAN function of the terminal is started;
an obtaining module, configured to form a wireless local area network communication link when the terminal accesses the available wireless access point, and obtain network information of the wireless local area network communication link, where the network information includes a wireless local area network signal strength received by the terminal;
the scanning control module is used for controlling the wireless local area network scanning function of the terminal according to the network information of the wireless local area network communication link;
the scanning control module is further configured to detect received signal strength of a wireless local area network provided by the available wireless access point; judging the signal intensity and the size of a preset signal intensity threshold; when the signal intensity is greater than a preset signal intensity threshold value, acquiring a first duration of which the signal intensity is greater than the preset signal intensity threshold value, and if the first duration is greater than a first preset duration, controlling the wireless local area network scanning function to be closed; and when the signal intensity is smaller than a preset signal intensity threshold value, acquiring a second duration of which the signal intensity is smaller than the preset signal intensity threshold value, and if the second duration is larger than a second preset duration, controlling the wireless local area network scanning function to be started.
7. 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 5.
8. 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 5.
CN201711329809.9A 2017-12-13 2017-12-13 Wireless local area network scanning method and device, computer equipment and storage medium Active CN107846723B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711329809.9A CN107846723B (en) 2017-12-13 2017-12-13 Wireless local area network scanning method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711329809.9A CN107846723B (en) 2017-12-13 2017-12-13 Wireless local area network scanning method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN107846723A CN107846723A (en) 2018-03-27
CN107846723B true CN107846723B (en) 2020-04-24

Family

ID=61663772

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711329809.9A Active CN107846723B (en) 2017-12-13 2017-12-13 Wireless local area network scanning method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN107846723B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740463A (en) * 2018-07-19 2020-01-31 中兴通讯股份有限公司 method and device for reducing signal interference
CN110418396A (en) * 2019-07-12 2019-11-05 宇龙计算机通信科技(深圳)有限公司 Control method, device, terminal and the storage medium of WIFI network
US20210136700A1 (en) * 2019-10-30 2021-05-06 International Business Machines Corporation Dynamic optimization of transmitter power output (tpo) in portable wireless devices
CN111885582A (en) * 2020-08-14 2020-11-03 深圳市当智科技有限公司 Wireless network connection method and device, electronic equipment and readable storage medium
CN116193552B (en) * 2023-04-24 2023-08-01 深圳市华卓智能科技有限公司 Energy consumption management method and system for terminal communication module

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2184892B1 (en) * 2007-07-31 2016-12-21 Lenovo Innovations Limited (Hong Kong) Wireless lan terminal and access point searching method
EP2364049B1 (en) * 2010-02-26 2012-06-06 Research In Motion Limited Reducing WLAN power consumption on a mobile device utilizing a cellular radio interface
CN101932054B (en) * 2010-08-06 2011-12-21 北京交大资产经营有限公司 Switching method of wireless local area network
CN103582076A (en) * 2012-08-07 2014-02-12 中兴通讯股份有限公司 WLAN WifiTrak control method and device
CN102917424A (en) * 2012-10-25 2013-02-06 陕西科技大学 AP (application process) switching method used in WiFi (wireless fidelity) communication
CN103813414B (en) * 2012-11-15 2017-09-19 中兴通讯股份有限公司 Mobile terminal Wi Fi application controls methods and mobile terminal
US9198121B2 (en) * 2013-05-17 2015-11-24 Intel Corporation Systems and methods for selective scanning based on range and movement
CN105813171B (en) * 2014-12-30 2019-06-25 展讯通信(上海)有限公司 A kind of intersection services set scan method and system and mobile terminal
CN105636169A (en) * 2015-07-31 2016-06-01 宇龙计算机通信科技(深圳)有限公司 Hot spot scanning method, hot spot scanning device and terminal
CN106255146B (en) * 2016-08-16 2018-01-19 广东欧珀移动通信有限公司 A kind of electricity-saving control method of terminal, device and terminal
CN107071806A (en) * 2017-06-16 2017-08-18 厦门美图移动科技有限公司 The method and mobile terminal of a kind of optimizing network speed

Also Published As

Publication number Publication date
CN107846723A (en) 2018-03-27

Similar Documents

Publication Publication Date Title
CN107846723B (en) Wireless local area network scanning method and device, computer equipment and storage medium
US10142845B2 (en) Network connection method and apparatus, and computer storage medium
EP3531737B1 (en) Method for setting wifi roaming and terminal device
CN111801967B (en) Electronic device using multiple subscriber identity modules and method for providing communication service thereof
CN107949040B (en) Wireless local area network scanning method and device, computer equipment and storage medium
CN107820303B (en) Mobile terminal wireless local area network scanning method and device and computer equipment
CN107820302B (en) Mobile terminal wireless local area network scanning method and device and computer equipment
US10813058B2 (en) Method for processing information and terminal device
CN111343699B (en) Icon display method and device, storage medium and electronic equipment
CN107820301B (en) Control method, device, terminal and storage medium of wireless local area network switch
CN106604314B (en) WiFi roaming network access method and terminal equipment
CN108040357B (en) Mobile terminal wireless local area network scan method and apparatus, computer equipment
WO2017076255A1 (en) Method for balancing load of wireless network, network equipment, and terminal equipment
CN107969025B (en) Mobile terminal wireless local area network scanning method and device and computer equipment
CN108471626B (en) Reporting method and detection method of UE (user equipment) capability, mobile terminal and server
CN110740454B (en) Non-independent networking residence method, equipment and computer readable storage medium
CN108012304B (en) Wireless local area network scanning method and device, computer equipment and storage medium
CN113412647A (en) Access control method and device
CN109756924A (en) A kind of wave beam history information transmittance method, terminal and the network equipment
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
CN107896381B (en) Mobile terminal wireless local area network scanning method and device and computer equipment
KR102305063B1 (en) Roaming handoff method, central control device, and station
CN112740827B (en) Network communication processing method, computer-readable storage medium, and electronic device
CN108322943B (en) Local area network allocation method, terminal 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
CB02 Change of applicant information

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

Applicant after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., Ltd.

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

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

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant