CN108924908B - WiFi scanning method and device and electronic device - Google Patents

WiFi scanning method and device and electronic device Download PDF

Info

Publication number
CN108924908B
CN108924908B CN201810602451.0A CN201810602451A CN108924908B CN 108924908 B CN108924908 B CN 108924908B CN 201810602451 A CN201810602451 A CN 201810602451A CN 108924908 B CN108924908 B CN 108924908B
Authority
CN
China
Prior art keywords
scanning
time length
channel
channels
wireless environment
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
CN201810602451.0A
Other languages
Chinese (zh)
Other versions
CN108924908A (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 CN201810602451.0A priority Critical patent/CN108924908B/en
Publication of CN108924908A publication Critical patent/CN108924908A/en
Application granted granted Critical
Publication of CN108924908B publication Critical patent/CN108924908B/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

Landscapes

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

Abstract

The embodiment of the application discloses a WiFi scanning method, a WiFi scanning device and an electronic device, and relates to the technical field of terminals. Wherein, the method comprises the following steps: acquiring wireless environment parameters in a plurality of channels; determining a scanning time length according to the wireless environment parameters in each channel; and scanning the channel according to the scanning duration, so that the channel scanning is more consistent with the current actual use environment, and a good scanning effect is obtained.

Description

WiFi scanning method and device and electronic device
Technical Field
The present application relates to the field of terminal technologies, and in particular, to a WiFi scanning method, apparatus, and electronic apparatus.
Background
Existing electronic devices can generally perform network data transmission through WiFi (Wireless Fidelity). When the electronic device enters a new area or needs to be reconnected after the WiFi network is disconnected, each channel is scanned to find an access point suitable for connection. However, in channel scanning, inappropriate scanning time does not achieve good scanning results.
Disclosure of Invention
In view of the above problems, the present application provides a WiFi scanning method, apparatus and electronic apparatus, which determine a scanning duration for each channel according to a wireless environment to determine a suitable scanning time, so as to obtain a good scanning effect.
In a first aspect, an embodiment of the present application provides a WiFi scanning method, where the method includes: acquiring wireless environment parameters in a plurality of channels; determining a scanning time length according to the wireless environment parameters in each channel; and scanning the channel according to the scanning duration.
In a second aspect, an embodiment of the present application provides a WiFi scanning apparatus, where the apparatus includes: the device comprises a parameter acquisition module, a parameter acquisition module and a parameter acquisition module, wherein the parameter acquisition module is used for acquiring wireless environment parameters in a plurality of channels; the time length determining module is used for determining scanning time length according to the wireless environment parameters in each channel; and the scanning module is used for scanning the channel according to the scanning duration.
In a third aspect, an embodiment of the present application provides an electronic device, including a WiFi module, a memory, and a processor, where the WiFi module and the memory are coupled to the processor, and the memory stores instructions, and when the instructions are executed by the processor, the processor performs the method described above.
In a fourth aspect, the present application provides a computer-readable storage medium having program code executable by a processor, the program code causing the processor to perform the above-mentioned method.
According to the WiFi scanning method, the WiFi scanning device and the electronic device, the wireless environment parameters determine the scanning duration of the channel, so that the channel scanning is more consistent with the current actual use environment, and a good scanning effect is obtained.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a flowchart of a WiFi scanning method proposed by an embodiment of the present application;
fig. 2 shows a preset correspondence table proposed in the embodiment of the present application;
fig. 3 is a flowchart illustrating a part of steps of a WiFi scanning method proposed by an embodiment of the present application;
fig. 4 is a functional block diagram of a WiFi scanning apparatus proposed in the embodiment of the present application;
fig. 5 is a block diagram illustrating a structure of an electronic device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 7 shows a block diagram of an electronic device for performing a WiFi scanning method according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Electronic devices such as mobile phones and tablet computers are usually connected to a network through a WiFi network. The electronic device can make a WiFi connection when entering a new environment or when returning to a certain WiFi coverage area that was left for a long time before. Generally, the WiFi rate detection mechanism of the electronic device will detect the surrounding environment again, scan the channels in order from low to high, or scan the channels where the previously connected wireless access points are located. After scanning all available channels, the wireless terminal knows the wireless access points existing in the surrounding environment and can know the access points in each channel.
The inventor finds that the scanning time of each channel is influenced by a specific wireless environment, and for the same channel, a better scanning effect can be obtained by scanning in different scanning time lengths under different environments. The better scanning effect may be that the hot spots that can be searched as far as possible on the congested channel, and on the idle channel, the channel is easier to search, so that the time consumed for scanning is shorter. If the channels are scanned at the same time, there may be some channels that are not scanned by the wireless access point, such as a congested channel, and some channels that have been scanned during the same time, such as an idle channel. Therefore, the embodiment of the application provides a WiFi scanning method, which can determine a suitable scanning time of each channel according to a wireless environment around an electronic device, so as to obtain a good scanning effect. The WiFi scanning method, apparatus and electronic apparatus provided in the embodiments of the present application are described below with reference to the accompanying drawings.
First embodiment
Referring to fig. 1, a first embodiment of the present application provides a WiFi scanning method, which is applied to an electronic device, where the electronic device may be a wireless device, and includes a WiFi module, and a wireless access point may be connected through the WiFi module, so as to access a network. The electronic device may be a mobile phone, a tablet computer, a notebook computer, a streaming media, an intelligent wearable device, a reader, and other devices capable of WiFi connection, which is not limited in the embodiment of the present application.
In the method, the appropriate scanning time of each channel can be determined according to the wireless environment parameters. In a specific embodiment, the WiFi scanning method is applied to the WiFi scanning apparatus shown in fig. 4 and the electronic apparatus 400 corresponding to the WiFi scanning apparatus 400 (fig. 5 and fig. 6). The WiFi scanning method may specifically include the following steps:
step S110: radio environment parameters in a plurality of channels are acquired.
And acquiring wireless environment parameters corresponding to each channel. The wireless environment parameter is wireless data related to WiFi connection, such as one or more of the number of access points in the channel, data transmission amount in the channel, EVM value of the channel, signal-to-noise ratio of the channel, and the like. The data transmission amount may be a data amount for performing data transmission within a preset time, such as a communication data amount within 1 second.
Of course, the radio environment parameters may also include other parameters, such as EVM value of the channel, congestion index of the channel, and the like. The method for acquiring various wireless environment parameters may refer to an existing acquisition method, and is not limited herein.
Step S120: and determining the scanning time length according to the wireless environment parameters in each channel.
And determining the scanning duration corresponding to each channel according to the wireless environment parameters of each channel.
Specifically, as an implementation manner, a functional relationship between the wireless environment parameter and the scanning duration may be preset, for example, the wireless environment parameter includes an access point and a data transmission amount, and the number of the access points and the functional relationship between the data transmission amount and the scanning duration may be preset. Under the condition of obtaining the wireless environment parameters of each channel, the scanning duration of each channel can be calculated according to the wireless environment parameters and a preset functional relation.
As an embodiment, a correspondence between the wireless environment parameter and the scanning duration may be preset, and the scanning duration of each channel may be determined according to the correspondence.
Step S130: and scanning the channel according to the scanning duration.
And scanning each channel with the determined scanning duration.
In the embodiment of the application, the actual scanning duration of each channel is determined by the current wireless environment, so that the scanning duration of a comparatively congested channel, such as too many access points, is not too short, and the scanning duration of a comparatively idle channel, such as less access points, is not too long.
Step 210: radio environment parameters in a plurality of channels are acquired.
In the embodiment of the present application, the channel for acquiring the wireless environment parameter is a channel available in the surrounding environment.
Step 220: and determining the scanning time length according to the wireless environment parameters in each channel.
In the embodiment of the present application, the scanning duration of each channel may be determined through a pre-stored preset correspondence table. The preset corresponding relation table includes the corresponding relation between the wireless environment parameters of each channel and a time length value.
As a specific implementation manner, the time length value in the preset correspondence table is the scanning duration required by the corresponding channel under the corresponding wireless environment parameter, and the preset correspondence table includes the correspondence between the wireless environment parameter and the duration of each channel.
The preset mapping table may be obtained by a pre-test, such as a factory test. Taking a mobile phone as an example, it can be specifically tested how long a certain mobile phone scans in different wireless environments in each channel to obtain a good scanning effect, and the scanning duration under the good scanning effect can be the time length required for just scanning all scannable wireless access points in the channel. Optionally, a critical value of scanning duration may also be set, and if a certain channel is in a wireless environment where the required scanning duration exceeds the critical value, the scanning duration of the channel is set as the critical value, so as to avoid that long-time scanning affects user experience.
In the preset corresponding relation table, for each channel, one or more wireless environment parameters which can be different values respectively correspond to different scanning durations. For example, as shown in fig. 2, for channel 1, in the wireless environment of the wireless environment parameter a with a parameter value of a1 and the wireless environment parameter B with a parameter value of B1, the value corresponding to the scanning duration T is T1. The parameter values a1 and a2 and the parameter values b1 and b2 may be specific values or may be value ranges. t1, t2, t3, and t4 respectively represent the same or different scan durations.
When the scanning time length is determined according to the wireless environment parameters in each channel, the time length corresponding to the wireless environment parameters can be searched from a preset corresponding relation table, and then the searched time length is used as the scanning time.
As an embodiment, the time length value in the preset correspondence table may be a time length increase value, that is, a time length that needs to be increased relative to a preset standard time length. The preset standard time length is a preset quantity value representing the time length, and the specific quantity value is not limited herein. That is, the preset correspondence table may include a correspondence between the radio environment parameter of each channel and the duration increment value.
In this embodiment, the preset correspondence table may also be obtained from a preliminary test. The scanning time length of each channel under different wireless environment parameters is tested, and the time length increment value of each channel under different wireless environment parameters is determined according to the required scanning time length and the preset standard time length to form the preset corresponding relation table.
Determining the scanning time length according to the wireless environment parameters in each channel, and searching the time length increment value corresponding to the wireless environment parameters from the preset corresponding relation table; and then adding the preset standard time length with the searched time length increasing value to obtain a result as scanning time length.
Step 230: and scanning the channel according to the scanning duration.
And scanning each channel according to the obtained scanning duration. For example, if the scanning duration of the channel 1 is determined to be t1 and the scanning duration of the channel 6 is determined to be t2, the scanning duration is t1 when the channel 1 is scanned and t2 when the channel 6 is scanned.
Specifically, because the determined scanning time lengths of the channels are different, the scanning sequence can be determined according to the scanning time lengths of the channels, so as to obtain more information of the wireless access point in a shorter time.
Specifically, as shown in fig. 3, the step may include:
step S231: and sequencing the plurality of channels from high to low according to the scanning duration from short to long.
And sequencing the channels according to the scanning time. If two or more channels have the same scanning duration, the channels can be sorted in any order, or the channels with less cross frequency bands with other channels are sorted more ahead.
Step S232: and determining a scanning strategy for the plurality of channels according to the sequencing result.
And determining a scanning strategy for the channels according to the scanning result, and scanning each channel according to the scanning strategy.
The specific scanning strategy may be to sequentially scan channels with scanning durations from high to low in the sequencing result.
In addition, in the scanning process, a preset number of channels can be selected from the available channels from the sequencing result from high to low for scanning. For the selected preset number of channels, random scanning can be performed, and scanning from high to low can also be performed according to the sorting result.
Optionally, in the scanning process, a connectable wireless access point of the wireless access points obtained by scanning may be connected; or the wireless access points obtained by scanning are connected with the connected access points. If the wireless access point with the signal quality meeting the preset standard is connected in the scanning process, the scanning can be stopped.
Optionally, the information of the wireless access point obtained by scanning may be displayed to the user. And if receiving the connection operation of the user to the wireless access point displayed in the wireless access point, connecting the wireless access point. If the connection with the wireless access point is successful in the scanning process, the scanning can be stopped. Or in the scanning process, after the wireless access point is successfully connected, the signal quality of the wireless access point meets a preset standard, and then the scanning can be stopped. The signal quality meeting the preset standard may be that the retransmission rate, the bit error rate, and the like meet the preset standard.
In the embodiment of the application, if the wireless access points which can be successfully connected are not obtained after all channels are scanned, the scanning time can be determined after the wireless environment parameters of the channels are continuously obtained. The acquisition of the wireless environment parameters may be performed after scanning all channels, and optionally, the acquisition may be performed at intervals of a preset time period in order to reduce power consumption of the system for detection.
After the wireless environment parameters are acquired again, whether the difference value between the wireless environment parameters acquired this time and the corresponding wireless environment parameters acquired last time in each channel is larger than a preset value can be judged. And if the judgment result shows that the difference value between the wireless environment parameter acquired this time and the corresponding wireless environment parameter acquired last time is larger than the preset value, determining the scanning time of the channel according to the acquired wireless environment parameter. If the judgment result shows that the difference value between the wireless environment parameter acquired this time and the corresponding wireless environment parameter acquired last time is larger than the preset value, the scanning time length determined last time is used as the scanning time length of the channel scanning this time, so that the scanning time length acquisition steps are reduced, and the power consumption is saved.
Specifically, for a certain channel, if the difference between the radio environment parameter detected this time and the radio environment parameter detected last time is not large, the radio environment detected this time is similar to the radio environment detected last time, and the scanning duration for the channel is the same as or similar to the scanning duration determined last time, so that the scanning duration may not be determined under the condition of the detection this time.
If the difference between the wireless environment parameter detected this time and the wireless environment parameter detected last time is large, the wireless environment change of the electronic device is large, the scanning duration of the channel may be greatly influenced, and the scanning duration may be determined for the channel again.
The difference between the detected wireless environment parameter and the detected wireless environment parameter at the previous time can be measured by the difference between the two detections. That is, it can be determined whether the difference between each of the currently detected wireless environment parameters and the corresponding wireless environment parameter detected last time is greater than a preset value. Each wireless environment parameter may be set with a preset value, and the preset values corresponding to the various wireless environment parameters are not necessarily the same, for example, the number of the preset values corresponding to the number of access points is 2, and the preset value corresponding to the data transmission amount is 5M.
If the wireless environment parameters comprise a plurality of types, comparing the detection data of each type of wireless environment parameter for two times in sequence. If the difference value between one of the wireless environment parameters and the last detected value is larger than the preset value, the difference value between the current detected wireless environment parameter and the last detected corresponding wireless environment parameter is judged to be larger than the preset value.
Of course, in this step, it may be determined that the difference between the currently detected wireless environment parameter and the previously detected corresponding wireless environment parameter is greater than the preset value only when the difference between more than one wireless parameter and the previously detected data is greater than the preset value.
In the embodiment of the present application, the scanning duration of each channel may be obtained according to the current wireless environment parameter. And sequencing all the channels according to the scanning duration, determining the scanning sequence of the channels according to the sequencing result, and scanning as many wireless access points as possible at the highest speed, thereby improving the scanning effect.
The embodiment of the present application further provides a WiFi scanning apparatus 300, please refer to fig. 4, where the apparatus 300 includes: a parameter obtaining module 310, configured to obtain radio environment parameters in multiple channels. A time duration determining module 320, configured to determine a scanning time duration according to the wireless environment parameter in each channel. A scanning module 330, configured to scan channels according to the scanning duration.
Optionally, the duration determining module 320 may include a searching unit, configured to search a duration corresponding to the wireless environment parameter from a preset correspondence table; and the determining unit is used for taking the searched time length as the scanning time length.
Optionally, the duration determining module 320 may include a searching unit, configured to search the duration increment value corresponding to the wireless environment parameter from the preset corresponding relationship table; and the determining unit is used for adding the result obtained by adding the preset standard time length to the searched time length increasing value as the scanning time length.
Optionally, the scanning module 330 may include: the sequencing unit is used for sequencing the plurality of channels from high to low according to the scanning duration from short to long; and the scanning unit determines the scanning strategies of the plurality of channels according to the sequencing result and scans according to the scanning strategies.
Wherein the scanning unit may scan the plurality of channels from high to low according to the scanning measurement.
The scanning unit may scan according to the scanning measurement, or select a preset number of channels from the plurality of channels from high to low for scanning.
In summary, in the embodiment of the present application, the scanning duration for each channel is determined according to the wireless environment, less scanning time can be allocated to a channel with a simple wireless environment, and more scanning time can be allocated to a channel with a complex wireless environment, so that a scanning effect as good as possible can be obtained in as little time as possible.
Referring to fig. 5 again, based on the WiFi scanning method and apparatus, an electronic apparatus 400 is also provided in the present embodiment. As shown in fig. 5, the electronic device 400 includes a WiFi module 401, a memory 104 and a processor 102, the WiFi module 401 and the memory 104 are coupled to the processor 102, the WiFi module 401 is configured to transmit data through a network, the memory 104 stores instructions, and the processor 102 executes the above method when the instructions are executed by the processor 102.
Specifically, as shown in fig. 6, a mobile phone will be used as the electronic device. The electronic device 400 may include an electronic body 10, where the electronic body 10 includes a housing 12 and a display 120 disposed on the housing 12. The housing 12 may be made of metal, such as steel or aluminum alloy. In this embodiment, the display screen 120 generally includes a display panel 111, and may also include a circuit and the like for responding to a touch operation performed on the display panel 111. The Display panel 111 may be a Liquid Crystal Display (LCD) panel, and in some embodiments, the Display panel 111 is a touch screen 109.
Referring to fig. 7, in an actual application scenario, the electronic device 400 may be used as a smartphone terminal, in which case the electronic body 10 generally further includes one or more processors 102 (only one is shown in the figure), a memory 104, an RF (Radio Frequency) module 106, an audio circuit 110, a sensor 114, an input module 118, a power module 122, a WiFi module 401, and the like. It will be understood by those skilled in the art that the structure shown in fig. 7 is merely illustrative and is not intended to limit the structure of the electronic body 10. For example, the electronics body section 10 may also include more or fewer components than shown in FIG. 7, or have a different correspondence than shown in FIG. 7.
Those skilled in the art will appreciate that all other components are peripheral devices with respect to the processor 102, and the processor 102 is coupled to the peripheral devices through a plurality of peripheral interfaces 124. The peripheral interface 124 may be implemented based on the following criteria: universal Asynchronous Receiver/Transmitter (UART), General Purpose Input/Output (GPIO), Serial Peripheral Interface (SPI), and Inter-Integrated Circuit (I2C), but the present invention is not limited to these standards. In some examples, the peripheral interface 124 may comprise only a bus; in other examples, the peripheral interface 124 may also include other elements, such as one or more controllers, for example, a display controller for interfacing with the display panel 111 or a memory controller for interfacing with a memory. These controllers may also be separate from the peripheral interface 124 and integrated within the processor 102 or a corresponding peripheral.
The memory 104 may be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 104. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory 104 may further include memory remotely located from the processor 102, which may be connected to the electronics body portion 10 or the display screen 120 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The RF module 106 is configured to receive and transmit electromagnetic waves, and achieve interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The RF module 106 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The RF module 106 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices via a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols, and technologies, including, but not limited to, Global System for Mobile Communication (GSM), Enhanced Mobile Communication (Enhanced Data GSM Environment, EDGE), wideband Code division multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (WiFi) (e.g., Institute of Electrical and Electronics Engineers (IEEE) standard IEEE 802.10A, IEEE802.11b, IEEE802.1 g, and/or IEEE802.11 n), Voice over internet protocol (VoIP), world wide mail Access (Microwave for Wireless communications, Wi-Max), and any other suitable protocols for instant messaging, and may even include those protocols that have not yet been developed.
The audio circuitry 110, speaker 101, microphone 103, microphone 105 collectively provide an audio interface between a user and the electronics body section 10 or the display screen 120.
The sensor 114 is disposed in the electronics body portion 10 or in the display screen 120, examples of the sensor 114 include, but are not limited to: acceleration sensor 114F, gyroscope 114G, magnetometer 114H, and other sensors.
In this embodiment, the input module 118 may include the touch screen 109 disposed on the display screen 120, and the touch screen 109 may collect a touch operation of the user (for example, an operation of the user on or near the touch screen 109 using any suitable object or accessory such as a finger, a stylus, etc.) on or near the touch screen 109, so that the touch gesture of the user may be obtained and the corresponding connection device may be driven according to a preset program, and thus, the user may select the target area through a touch operation on the display screen. Optionally, the touch screen 109 may include 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 detection device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 102, and can receive and execute commands sent by the processor 102. In addition, the touch detection function of the touch screen 109 may be implemented by various types, such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch screen 109, in other variations, the input module 118 may include other input devices, such as keys 107. The keys 107 may include, for example, character keys for inputting characters, and control keys for activating control functions. Examples of such control keys include a "back to home" key, a power on/off key, and the like.
The display screen 120 is used to display information input by the user, information provided to the user, and various graphical user interfaces of the electronic body section 10, which may be composed of graphics, text, icons, numbers, video, and any combination thereof. In one example, the touch screen 109 may be disposed on the display panel 111 so as to be integral with the display panel 111.
The power module 122 is used to provide power supply to the processor 102 and other components. Specifically, the power module 122 may include a power management system, one or more power sources (e.g., batteries or ac power), a charging circuit, a power failure detection circuit, an inverter, a power status indicator light, and any other components associated with the generation, management, and distribution of power within the electronics body portion 10 or the display screen 120.
The electronic device 400 further comprises a locator 119, the locator 119 being configured to determine an actual location of the electronic device 400. In this embodiment, the locator 119 uses a positioning service to locate the electronic device 400, and the positioning service is understood to be a technology or a service for obtaining the position information (e.g. longitude and latitude coordinates) of the electronic device 400 by a specific positioning technology and marking the position of the located object on the electronic map.
It should be understood that the electronic apparatus 400 described above is not limited to the smartphone terminal, and it should refer to a computer device that can be used in a mobile. Specifically, the electronic apparatus 400 refers to a mobile computer device equipped with a smart operating system, and the electronic apparatus 400 includes, but is not limited to, a smart phone, a smart watch, a tablet computer, and the like.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. For any processing manner described in the method embodiment, all the processing manners may be implemented by corresponding processing modules in the apparatus embodiment, and details in the apparatus embodiment are not described again.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments. In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A WiFi scanning method is applied to an electronic device, a preset corresponding relation table is prestored in the electronic device, and the preset corresponding relation table comprises the following steps: the corresponding relation between the wireless environment parameter of each channel and the time length increment value, wherein the time length increment value is the time length which needs to be increased relative to the preset standard time length, and the method comprises the following steps:
acquiring wireless environment parameters in a plurality of channels;
searching the time length increasing value corresponding to the wireless environment parameter from the preset corresponding relation table;
adding the preset standard time length to the searched time length added value to obtain a result, and using the result as the scanning time length of each channel;
and scanning the channel according to the scanning duration.
2. The method of claim 1, wherein the radio environment parameters comprise one or more of:
the number of access points in the channel, the size of the communication data volume in the channel, the EVM value of the channel and the signal-to-noise ratio of the channel.
3. The method of claim 1, wherein the determining a scanning duration according to the radio environment parameter in each channel comprises:
searching the time length corresponding to the wireless environment parameter from a preset corresponding relation table;
and taking the searched time length as the scanning time length.
4. The method of claim 3, wherein the preset mapping table includes a mapping relationship between the radio environment parameter and the duration of each channel.
5. The method of claim 1, wherein scanning channels according to the scanning duration comprises:
the plurality of channels are sorted from high to low according to the scanning duration from short to long,
and determining a scanning strategy for the plurality of channels according to the sequencing result.
6. The method of claim 5, wherein determining the scanning strategy for the plurality of channels according to the sorting result comprises:
the plurality of channels are scanned from high to low.
7. The method of claim 5, wherein determining the scanning strategy for the plurality of channels according to the sorting result comprises:
and selecting a preset number of channels from the plurality of channels from high to low for scanning.
8. The WiFi scanning device is operated on an electronic device, the electronic device is prestored with a preset corresponding relation table, and the preset corresponding relation table comprises: the corresponding relation between the wireless environment parameter of each channel and the time length increment value, wherein the time length increment value is the time length which needs to be increased relative to the preset standard time length, and the device comprises:
the device comprises a parameter acquisition module, a parameter acquisition module and a parameter acquisition module, wherein the parameter acquisition module is used for acquiring wireless environment parameters in a plurality of channels;
the time length determining module is used for searching a time length increasing value corresponding to the wireless environment parameter from the preset corresponding relation table; adding the preset standard time length to the searched time length added value to obtain a result, and using the result as the scanning time length of each channel;
and the scanning module is used for scanning the channel according to the scanning duration.
9. An electronic device comprising a WiFi module, a memory, and a processor, the WiFi module and the memory coupled to the processor, the memory storing instructions that when executed by the processor, the processor performs the method of any of claims 1-7.
10. A computer-readable storage medium storing program code executable by a processor, the program code causing the processor to perform the method of any one of claims 1 to 7.
CN201810602451.0A 2018-06-12 2018-06-12 WiFi scanning method and device and electronic device Active CN108924908B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810602451.0A CN108924908B (en) 2018-06-12 2018-06-12 WiFi scanning method and device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810602451.0A CN108924908B (en) 2018-06-12 2018-06-12 WiFi scanning method and device and electronic device

Publications (2)

Publication Number Publication Date
CN108924908A CN108924908A (en) 2018-11-30
CN108924908B true CN108924908B (en) 2021-02-02

Family

ID=64409884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810602451.0A Active CN108924908B (en) 2018-06-12 2018-06-12 WiFi scanning method and device and electronic device

Country Status (1)

Country Link
CN (1) CN108924908B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111294887A (en) * 2019-01-28 2020-06-16 紫光展讯通信(惠州)有限公司 Self-adaptive adjusting method and device for channel scanning time
CN110225573A (en) * 2019-06-03 2019-09-10 Oppo广东移动通信有限公司 WiFi channel scanning method and device, electronic equipment, computer readable storage medium
CN110337135B (en) * 2019-08-01 2021-08-17 Oppo广东移动通信有限公司 Adjusting method, terminal and computer storage medium
CN113225787B (en) * 2021-04-06 2023-02-28 Oppo广东移动通信有限公司 Wi-Fi scanning method, terminal equipment and storage medium

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5025585B2 (en) * 2008-07-10 2012-09-12 株式会社リコー COMMUNICATION DEVICE, COMMUNICATION PROGRAM, AND STORAGE MEDIUM
US8638702B2 (en) * 2008-12-12 2014-01-28 Broadcom Corporation Method and system for time based WLAN scanning
CN102752823B (en) * 2012-07-04 2014-08-20 西安电子科技大学 Method for switching user terminal between access joints in WLAN (Wireless Local Area Network) based on AP (Access Point) collaboration
CN104768156A (en) * 2015-04-30 2015-07-08 北京奇虎科技有限公司 WiFi connection method and device
CN105142203A (en) * 2015-08-20 2015-12-09 深圳市金立通信设备有限公司 Wireless fidelity (Wi-Fi) hotspot scanning method and terminal
CN105636170A (en) * 2015-12-25 2016-06-01 深圳Tcl数字技术有限公司 Wireless hotspot scanning and displaying method and device
CN106792984B (en) * 2016-11-29 2019-11-26 努比亚技术有限公司 A kind of WIFI hot spot scanning connection control method and terminal
CN106604362B (en) * 2016-12-07 2019-09-10 Oppo广东移动通信有限公司 A kind of Wireless Fidelity Wi-Fi scan method and mobile terminal
CN106792993A (en) * 2016-12-07 2017-05-31 广东欧珀移动通信有限公司 Channel scanning method and mobile terminal
CN106982459B (en) * 2017-03-14 2019-09-20 Oppo广东移动通信有限公司 Network scanning method and terminal device
CN106851719B (en) * 2017-04-18 2021-01-01 云熠信息科技有限公司 Wifi probe, data balanced acquisition system and method
CN107094315B (en) * 2017-04-24 2020-05-26 北京星网锐捷网络技术有限公司 Channel scanning configuration method and device
CN107969025B (en) * 2017-11-30 2019-12-27 Oppo广东移动通信有限公司 Mobile terminal wireless local area network scanning method and device and computer equipment
CN108111977B (en) * 2017-12-07 2021-03-02 Oppo广东移动通信有限公司 Network scanning method, device, storage medium and electronic equipment
CN108848547A (en) * 2018-06-12 2018-11-20 Oppo广东移动通信有限公司 WiFi scan method, device, mobile terminal and computer-readable medium
CN108811045B (en) * 2018-06-12 2021-03-02 Oppo广东移动通信有限公司 WiFi channel scanning method and device, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN108924908A (en) 2018-11-30

Similar Documents

Publication Publication Date Title
CN108924908B (en) WiFi scanning method and device and electronic device
CN108990105B (en) Wireless communication transmission method, device, mobile terminal and computer readable storage medium
CN108021642B (en) Application program recommendation method and device, mobile terminal and storage medium
CN108279408B (en) Proximity sensor calibration method and device, mobile terminal and computer readable medium
CN108710456B (en) Application icon processing method and device and mobile terminal
CN108770055B (en) Transmission power adjusting method and device and electronic device
CN108811045B (en) WiFi channel scanning method and device, mobile terminal and storage medium
CN108345422A (en) Application control method, apparatus, mobile terminal and computer-readable medium
CN111148182B (en) Device control method, device, storage medium and electronic device
CN111008090B (en) Battery electric quantity control method and device, storage medium and terminal equipment
CN108471622B (en) WiFi connection adjustment method and device, mobile terminal and storage medium
CN108471630B (en) Transmission rate adjusting method, device, mobile terminal and computer readable medium
CN108965042B (en) Network delay obtaining method and device, terminal equipment and storage medium
CN108934025B (en) Wireless communication transmission method, device, mobile terminal and computer readable storage medium
CN110602738B (en) Network connection method and device and electronic device
CN111045737B (en) Equipment identifier acquisition method, device, terminal equipment and storage medium
CN110958352B (en) Network signal display method, device, storage medium and mobile terminal
CN108848566B (en) Wireless communication transmission method, device, mobile terminal and computer readable storage medium
CN108901062B (en) Wireless communication transmission method, device, mobile terminal and computer readable storage medium
CN108848557B (en) Output power adjusting method, device, mobile terminal and computer readable medium
CN108924868B (en) WiFi disconnection adjusting method and device, mobile terminal and storage medium
CN108958578B (en) File control method and device and electronic device
CN108696917B (en) Communication connection method, device, electronic device and computer readable medium
CN107930126B (en) Game reservation data processing method and device and mobile terminal
CN108924902B (en) Wireless network disconnection method and device and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant