CN109089327B - Wireless network connection method, device, terminal and storage medium - Google Patents

Wireless network connection method, device, terminal and storage medium Download PDF

Info

Publication number
CN109089327B
CN109089327B CN201811240355.2A CN201811240355A CN109089327B CN 109089327 B CN109089327 B CN 109089327B CN 201811240355 A CN201811240355 A CN 201811240355A CN 109089327 B CN109089327 B CN 109089327B
Authority
CN
China
Prior art keywords
connection
network
wifi network
terminal
target wifi
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
CN201811240355.2A
Other languages
Chinese (zh)
Other versions
CN109089327A (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.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN201811240355.2A priority Critical patent/CN109089327B/en
Publication of CN109089327A publication Critical patent/CN109089327A/en
Application granted granted Critical
Publication of CN109089327B publication Critical patent/CN109089327B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/318Received signal strength
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses a wireless network connection method, a wireless network connection device, a wireless network connection terminal and a storage medium, and belongs to the technical field of terminals. The method comprises the following steps: when a target Wifi network is scanned, acquiring the real-time signal intensity of the target Wifi network; and acquiring a connection threshold corresponding to the target Wifi network, and connecting the target Wifi network when the real-time signal intensity is greater than the connection threshold. According to the embodiment of the application, the connection threshold value is determined according to the historical maximum signal intensity of the target Wifi network, so that the terminal is connected with the target Wifi network when the real-time signal intensity is larger than the connection threshold value, the probability that the connection speed of the terminal is slow due to the fact that the signal intensity of the to-be-connected Wifi network is too low is reduced, and the connection effect of the Wifi network is guaranteed.

Description

Wireless network connection method, device, terminal and storage medium
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a wireless network connection method, a wireless network connection device, a wireless network connection terminal and a storage medium.
Background
With the rapid development of wireless network technology, the application of wireless access points is more and more extensive, and the network coverage of wireless access points is also more and more extensive.
Therefore, for a location area, the terminal may be covered by a wireless network of a plurality of wireless access points at the same time, when the terminal moves to the location area, the terminal may scan a plurality of wireless access point identifiers covering the location area, and select one wireless access point identifier from at least one wireless access point identifier based on a wireless access point sequence, which is generally obtained by sorting based on historical connection data of a plurality of wireless access points connected by the terminal before the current time; and performing wireless network connection based on the selected wireless access point identification.
Disclosure of Invention
The embodiment of the application provides a wireless network connection method, a wireless network connection device, a wireless network connection terminal and a wireless network connection storage medium, which can be used for solving the problem that in the related technology, the signal strength of a to-be-connected Wifi network is too low, so that the connection speed of the terminal is slow. The technical scheme is as follows:
according to a first aspect of embodiments of the present application, there is provided a wireless network connection method, including:
when a target Wireless Fidelity (WiFi) network is scanned, acquiring the real-time signal intensity of the target WiFi network, wherein the target WiFi network is a Wifi network which is historically connected with a terminal;
acquiring a connection threshold corresponding to the target Wifi network, wherein the connection threshold is a threshold determined according to the historical maximum signal intensity of the target Wifi network, and the historical maximum signal intensity is the maximum signal intensity acquired when the target Wifi network is scanned historically;
and when the real-time signal intensity is greater than the connection threshold value, connecting the target Wifi network.
According to a second aspect of embodiments of the present application, there is provided a wireless network connection apparatus, the apparatus including:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring the real-time signal intensity of a target Wifi network when the target Wifi network is scanned, and the target Wifi network is a Wifi network which is historically connected with a terminal;
the second acquisition module is used for acquiring a connection threshold corresponding to the target Wifi network, wherein the connection threshold is a threshold determined according to the historical maximum signal intensity of the target Wifi network, and the historical maximum signal intensity is the maximum signal intensity acquired when the target Wifi network is scanned historically;
and the connection module is used for connecting the target Wifi network when the real-time signal intensity is greater than the connection threshold value.
According to a third aspect of embodiments of the present application, there is provided a terminal, where the terminal includes a processor and a memory, where the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the wireless network connection method according to any one of the first aspect and the optional embodiments of the present application.
According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium having at least one instruction stored therein, where the instruction is loaded and executed by a processor to implement the wireless network connection method according to the first aspect and any one of the optional embodiments of the present application.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
the real-time signal intensity of the target Wifi network and the connection threshold corresponding to the target Wifi network are obtained when the terminal scans the target Wifi network, and the connection threshold is determined according to the historical maximum signal intensity of the target Wifi network, so that the terminal is connected with the target Wifi network when the real-time signal intensity is greater than the connection threshold, the probability that the connection speed of the terminal is slow due to the fact that the signal intensity of the Wifi network to be connected is too low is reduced, and the connection effect of the Wifi network is guaranteed.
Drawings
Fig. 1 is a schematic structural diagram of a terminal provided in an exemplary embodiment of the present application;
fig. 2 is a flowchart of a wireless network connection method provided by an exemplary embodiment of the present application;
fig. 3 is a flowchart of a wireless network connection method provided by another exemplary embodiment of the present application;
fig. 4 is a flowchart of a wireless network connection method provided by another exemplary embodiment of the present application;
fig. 5 is a schematic structural diagram of a wireless network connection device according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is to be noted that, unless otherwise explicitly specified or limited, the terms "connected" and "connected" are to be interpreted broadly, e.g., as being fixed or detachable or integrally connected; can be mechanically or electrically connected; may be directly connected or indirectly connected through an intermediate. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
First, some terms referred to in the embodiments of the present application are explained:
WiFi information: information for distinguishing between different WiFi networks. The WiFi information typically includes Service Set Identifier (SSID), Basic Service Set Identifier (BSSID), encryption type and signal strength, etc. The SSID is the name of the WiFi network, the name is not unique, and the SSID can be a default value or set by a user; the BSSID is a Media Access Control (MAC) address of a wireless Access Point (AP) device providing a WiFi network, and the wireless AP device may be a wireless routing device; the signal strength is used to characterize the signal quality of the WiFi network.
WiFi environment information: and the WiFi information set is composed of at least one piece of WiFi information and is used for describing the coverage condition of the WiFi network on the periphery of the specified place. For example, the WiFi environment information corresponding to the location a is { WiFi information B, WiFi information C, WiFi information D }, which indicates that the terminal can scan the WiFi network A, B, C at the location a.
It should be noted that, in this embodiment of the application, the first WiFi environment information is information of a WiFi network actually scanned by the terminal, and the second WiFi environment information is information of a WiFi network stored in advance.
In the related art, when a terminal moves to a location area, the terminal may scan a plurality of wireless access point identifiers covering the location area, and when the terminal performs wireless network connection based on the selected wireless access point identifier, the connection speed may be very slow due to too low signal strength of the wireless network, and even if the connection is successful, frequent network disconnection may occur during the use of the wireless network. A convenient and reliable wireless network connection method has not been provided.
The embodiment of the application provides a wireless network connection method, a wireless network connection device, a wireless network connection terminal and a storage medium, which can be used for solving the problems in the related art. According to the technical scheme, the connection threshold value is set to be the threshold value associated with the historical maximum signal intensity of the target Wifi network, the target Wifi network is connected when the real-time signal intensity of the target Wifi network scanned by the terminal is larger than the connection threshold value, the probability that the terminal is connected slowly due to the fact that the signal intensity of the Wifi network to be connected is too low is reduced, and the connection effect of the Wifi network is guaranteed.
Before explaining the embodiments of the present application, an application scenario of the embodiments of the present application is explained. Fig. 1 shows a schematic structural diagram of a terminal provided in an exemplary embodiment of the present application.
The terminal 100 is an electronic device having a WiFi function. The terminal 100 may be a smart phone, a tablet computer, a portable personal computer, or the like. With the WiFi function, when there is a WiFi network in the environment where the terminal 100 is located, the terminal 100 can acquire WiFi information of each WiFi network, where the WiFi information includes an SSID, a BSSID, and signal strength of the WiFi network. According to the entered key information, the terminal 100 can access the corresponding WiFi network and perform internet access.
The terminal 100 can be connected with the WiFi device through a wireless network. The WiFi device is a gateway device providing a WiFi network, for example, the WiFi device is a wireless router or an electronic device turning on a routing function. When the terminal enters the coverage of the WiFi network of the WiFi device and enters the key information corresponding to the WiFi device, the terminal 100 establishes wireless connection with the WiFi device.
Optionally, the terminal 100 includes: a processor 120 and a memory 140.
Processor 120 may include one or more processing cores. The processor 120 connects various parts within the overall terminal 100 using various interfaces and lines, and performs various functions of the terminal 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 140 and calling data stored in the memory 140. Optionally, the processor 120 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable gate Array (FPGA), and Programmable Logic Array (PLA). The processor 120 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 120, but may be implemented by a single chip.
The Memory 140 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 140 includes a non-transitory computer-readable medium. The memory 140 may be used to store instructions, programs, code sets, or instruction sets. The memory 140 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like; the storage data area may store data and the like referred to in the following respective method embodiments.
Referring to fig. 2, a flowchart of a wireless network connection method according to an exemplary embodiment of the present application is shown. The present embodiment is exemplified by applying the wireless network connection method to the terminal shown in fig. 1. The wireless network connection method comprises the following steps:
step 201, when a target Wifi network is scanned, obtaining real-time signal intensity of the target Wifi network, wherein the target Wifi network is a Wifi network which a terminal has historically connected.
Optionally, when the terminal detects that the Wifi function is turned on, first Wifi environment information of the peripheral side of the terminal is collected, and when the first Wifi environment information and the pre-stored second Wifi environment information have a common network identifier, the Wifi network indicated by the common network identifier is determined as the target Wifi network.
The first Wifi environment information comprises network identifications of a plurality of Wifi networks on the periphery of the scanned terminal. The second Wifi environment information includes network identifications of a plurality of Wifi networks to which the terminal has historically been connected. The following description will be given only by taking the network identifier of the Wifi network as the SSID of the Wifi network as an example.
Optionally, the first Wifi environment information further includes at least one of a signal strength, an acquisition time, and an encryption type of the Wifi network. The signal strength is the network signal strength of the WiFi network. The acquisition time is the time when the terminal acquires the WiFi network.
The network identifiers of the plurality of Wifi networks which have been connected to the terminal historically can be obtained by sorting based on historical connection data of the plurality of Wifi networks which have been connected to the terminal before the current time. The historical connection data includes at least one of a number of connections, a total connection duration, and a most recent connection time.
Optionally, when the common network identifier exists in the first Wifi environment information and the pre-stored second Wifi environment information, the Wifi network indicated by the common network identifier is determined as the target Wifi network, which includes but is not limited to the following two possible implementation manners.
In one possible implementation manner, when one common SSID exists in the first WiFi environment information and the second WiFi environment information, the WiFi network indicated by the common SSID is determined as the target WiFi network
In another possible implementation manner, when a plurality of common SSIDs exist in the first WiFi environment information and the second WiFi environment information, one common SSID is selected according to a selection policy, and a WiFi network indicated by the selected SSID is determined as a target WiFi network.
The selection strategy comprises selecting the common SSID with the largest signal strength, or selecting the first scanned common SSID, or selecting the common SSID positioned at the first according to the sequence of the stored network identifications, or receiving the common SSID selected by the user. The present embodiment does not limit the setting of the selection policy.
And when the terminal determines the target WiFi network, acquiring the real-time signal intensity of the target WiFi network. The real-time signal strength is the signal strength acquired by the terminal when the terminal scans the target WiFi network.
Step 202, a connection threshold corresponding to the target Wifi network is obtained, where the connection threshold is determined according to the historical maximum signal intensity of the target Wifi network, and the historical maximum signal intensity is the maximum signal intensity obtained when the target Wifi network is scanned historically.
The terminal obtains a connection threshold corresponding to the target Wifi network. For the same terminal, the connection thresholds corresponding to at least two Wifi networks are different. For the same Wifi network, the connection thresholds corresponding to at least two terminals are different.
Optionally, the connection threshold is a threshold associated with a historical maximum signal strength of the target Wifi network. The connection threshold value and the historical maximum signal intensity of the target Wifi network are in positive correlation.
Optionally, the connection threshold corresponding to the target Wifi network is a threshold determined according to the historical maximum signal strength of the target Wifi network. Wherein the connection threshold is less than the historical maximum signal strength.
Illustratively, the join threshold is less than the historical maximum signal strength and the absolute value of the difference between the join threshold and the historical maximum signal strength is less than the first difference threshold.
The first difference threshold is set by a user or a default setting of the terminal.
The historical maximum signal intensity of the target Wifi network is the maximum signal intensity obtained when the target Wifi network is scanned historically. The target Wifi network is one of a plurality of Wifi networks which have been connected to the terminal historically.
Optionally, the terminal stores second Wifi environment information, where the second Wifi environment information includes network identifiers of multiple Wifi networks that the terminal has historically connected, and also includes maximum signal strengths of multiple Wifi networks that the terminal has historically connected.
Optionally, when the terminal scans a Wifi network for the first time, the signal strength of the Wifi network is obtained, the signal strength is recorded as the maximum signal strength of the Wifi network, and the network identifier and the maximum signal strength of the Wifi network are stored in a key value pair form. After the storage is finished, when the terminal scans the Wifi network again, if the real-time signal intensity of the Wifi network acquired by the terminal is higher than the stored maximum signal intensity, the acquired real-time signal intensity is assigned to the maximum signal intensity, that is, the maximum signal intensity is updated to the acquired real-time signal intensity.
It should be noted that, the process of determining the connection threshold by the terminal according to the historical maximum signal strength of the target Wifi network may refer to relevant details in the following embodiments, which are not described herein first.
Optionally, the connection threshold is a threshold used to indicate that the terminal can be stably connected to the target Wifi network. The terminal can be stably connected with the target Wifi network, and the network switching connection times of the terminal in a specified time period after the terminal is connected with the target Wifi network are smaller than a switching threshold value.
The specified time period and the handover threshold may be user-defined or terminal default settings. This embodiment is not limited thereto.
And step 203, connecting the target Wifi network when the real-time signal intensity is greater than the connection threshold value.
The terminal judges whether the real-time signal intensity is greater than a connection threshold value, if so, the real-time signal intensity of the target Wifi network is enough to enable the time consumed when the terminal is connected with the target Wifi network to be short, and the terminal is connected with the target Wifi network; if the real-time signal strength of the target Wifi network is smaller than the real-time signal strength of the target Wifi network, the time consumed for the terminal to be connected with the target Wifi network is long, and the terminal is not connected with the target Wifi network.
In summary, in the embodiment, when the terminal scans the target Wifi network, the real-time signal intensity of the target Wifi network and the connection threshold corresponding to the target Wifi network are obtained, and since the connection threshold is a threshold associated with the historical maximum signal intensity of the target Wifi network, the terminal connects to the target Wifi network when the real-time signal intensity is greater than the connection threshold, the probability that the connection speed of the terminal is slow due to too low signal intensity of the Wifi network to be connected is reduced, and the connection effect of the Wifi network is ensured.
Referring to fig. 3, a flowchart of a wireless network connection method according to an exemplary embodiment of the present application is shown. The present embodiment is exemplified by applying the wireless network connection method to the terminal shown in fig. 1. The wireless network connection method comprises the following steps:
step 301, when the target Wifi network is scanned, obtaining the real-time signal intensity of the target Wifi network.
The implementation process of this step may refer to the above description of step 201, and is not described herein again.
Step 302, obtaining the historical maximum signal intensity of the target Wifi network.
And the terminal acquires the network identifier of the target Wifi network and acquires the historical maximum signal intensity corresponding to the network identifier of the Wifi network according to the second corresponding relation.
The terminal stores a second corresponding relation, and the second corresponding relation comprises corresponding relations between network identifications of a plurality of Wifi networks which are connected to the terminal in history and the maximum signal intensity in history. In one possible implementation, the second correspondence is shown in table one.
Watch 1
Serial number SSID Historical maximum signal strength
1 WiFi-001 -30dbm
2 WiFi-002 -50dbm
3 WiFi-003 -85dbm
Optionally, the second correspondence is stored in the form of a key-value pair.
Step 303, determine whether the real-time signal strength is greater than the historical maximum signal strength.
The terminal judges whether the real-time signal strength is greater than the historical maximum signal strength, if so, the step 304 is executed; if the real-time signal strength is less than the historical maximum signal strength then 305 is performed.
It should be noted that, if the real-time signal strength is equal to the historical maximum signal strength, step 304 may be executed, step 305 may also be executed, and the target Wifi network may also be directly connected to end the process.
And 304, when the real-time signal intensity is greater than the historical maximum signal intensity, connecting the target Wifi network, and updating the historical maximum signal intensity of the target Wifi network into the real-time signal intensity.
Optionally, because the connection threshold is smaller than the historical maximum signal strength, when the real-time signal strength is greater than the historical maximum signal strength, it means that the target Wifi network meets the condition that the real-time signal strength is greater than the connection threshold, and the step of obtaining the connection threshold is not required to be executed again, and the target Wifi network is connected.
Optionally, when the real-time signal strength of the target Wifi network acquired by the terminal is greater than the historical maximum signal strength, the real-time signal strength of the target Wifi network is assigned to the maximum signal strength, that is, the maximum signal strength is updated to the acquired real-time signal strength.
Step 305, when the real-time signal strength is less than the historical maximum signal strength, determining a connection threshold according to the historical maximum signal strength.
And when the real-time signal intensity of the target Wifi network is smaller than the historical maximum signal intensity, the terminal determines a connection threshold value according to the historical maximum signal intensity.
Optionally, the terminal determines the connection threshold according to the historical maximum signal strength and a first calculation rule, where the first calculation rule is used to indicate that the connection threshold is smaller than the historical maximum signal strength and that an absolute value of a difference between the connection threshold and the historical maximum signal strength is smaller than a first difference threshold.
Optionally, the determining, by the terminal, the connection threshold according to the historical maximum signal strength and the first calculation rule includes: acquiring a first pre-stored connection value; the ratio of the historical maximum signal strength to the first connection value is determined as the connection threshold. That is, the connection threshold is the ratio of the historical maximum signal strength to the first connection value, and the connection threshold is less than the historical maximum signal strength.
The first connection value is a positive number smaller than 1. Optionally, the first connection value is set by a user in a self-defined manner or is set by a default of the terminal.
Optionally, the first connection value is a value smaller than a threshold of the specified parameter. Illustratively, the specified parameter threshold is 0.9. For example, the first connection value is 0.8.
Step 306, determine whether the real-time signal strength is greater than the connection threshold.
The terminal judges whether the real-time signal strength is greater than the connection threshold, if so, the step 307 is executed; and if the real-time signal intensity is smaller than or equal to the connection threshold, the target Wifi network is not connected, and the process is ended.
And 307, connecting the target Wifi network when the real-time signal intensity is greater than the connection threshold value.
And when the real-time signal intensity of the target Wifi network is greater than the connection threshold value, the terminal is connected with the target Wifi network.
In one illustrative example, when the terminal scans to the target Wifi network, the SSID "Wifi-001" and the real-time signal strength "-35 dbm" of the target Wifi network are obtained. And the terminal acquires the historical maximum signal strength of the target Wifi network of-30 dbm according to the second corresponding relation shown in the table I, the real-time signal strength of-35 dbm is smaller than the historical maximum signal strength of-30 dbm, the terminal determines the ratio of the historical maximum signal strength of-30 dbm to the first connection numerical value of 0.8 as a connection threshold value of-37.5 dbm, and when the terminal judges that the real-time signal strength of-35 dbm is larger than the connection threshold value of-37.5 dbm, the target Wifi network is connected.
Optionally, when the real-time signal intensity of the target Wifi network is greater than the connection threshold, the terminal determines whether the target Wifi network meets other connection conditions, and if so, the terminal connects to the target Wifi network.
In a possible implementation manner, the terminal acquires respective corresponding real-time signal intensities of at least two scanned Wifi networks; and when the real-time signal intensity of the target Wifi network is greater than the connection threshold and meets the first connection condition, connecting the target Wifi network.
The first connection condition comprises that the real-time signal intensity of the target Wifi network is the maximum signal intensity in the real-time signal intensities corresponding to the at least two Wifi networks respectively, and/or the difference value between the real-time signal intensity and the minimum signal intensity of the target Wifi network is larger than a second difference threshold value.
Optionally, the maximum signal strength involved in the first connection condition is the maximum signal strength among the real-time signal strengths corresponding to the scanned at least two Wifi networks, and the minimum signal strength is the minimum signal strength among the real-time signal strengths corresponding to the scanned at least two Wifi networks.
Illustratively, the terminal judges whether the real-time signal intensity of the target Wifi network is the scanned maximum signal intensity, and if the real-time signal intensity of the target Wifi network is the scanned maximum signal intensity and is greater than the connection threshold, the terminal is connected with the target Wifi network.
Illustratively, the terminal judges whether the difference between the real-time signal intensity and the minimum signal intensity of the target Wifi network is greater than a second difference threshold, and if the difference is greater than the second difference threshold and the real-time signal intensity of the target Wifi network is greater than a connection threshold, the terminal is connected to the target Wifi network.
Illustratively, when the real-time signal intensity of the target Wifi network is the scanned maximum signal intensity, the difference between the maximum signal intensity and the minimum signal intensity is greater than the second difference threshold, and the real-time signal intensity of the target Wifi network is greater than the connection threshold, the target Wifi network is connected.
It should be noted that the second difference threshold is set by a user or by default in the terminal.
In another possible implementation manner, the terminal acquires the historical connection power and/or the historical connection time of the scanned at least two Wifi networks respectively corresponding to the Wifi networks; and when the real-time signal intensity of the target Wifi network is greater than the connection threshold and meets the second connection condition, connecting the target Wifi network.
The second connection condition comprises that the historical connection success rate of the target Wifi network is highest in the historical connection power corresponding to the at least two Wifi networks, and/or the historical connection time consumption of the target Wifi network is shortest in the historical connection time consumption corresponding to the at least two Wifi networks.
Optionally, the historical connection success rate of the target Wifi network is a ratio of the number of successful connections when the terminal historically connects to the target Wifi network to the total number of connections to the target Wifi network.
Optionally, the historical connection time consumption is an average connection time consumption from the beginning of connecting to the target Wifi network to the successful connection of the terminal in history. And the historical connection time is used for indicating the connection speed of the terminal connected with the Wifi network. The historical connection time consumption and the connection speed are in a negative correlation relationship.
Illustratively, the terminal judges whether the historical connection success rate of the target Wifi network is the highest in the historical connection success rates corresponding to the at least two Wifi networks, and if the historical connection success rate of the target Wifi network is the highest and the real-time signal intensity of the target Wifi network is greater than the connection threshold value, the target Wifi network is connected.
Illustratively, the terminal judges whether the historical connection time consumption of the target Wifi network is the shortest in the historical connection time consumption corresponding to each of the at least two Wifi networks, and if the historical connection time consumption of the target Wifi network is the shortest and the real-time signal intensity of the target Wifi network is greater than the connection threshold value, the target Wifi network is connected.
Illustratively, when the historical connection success rate of the target Wifi network is the highest among the historical connection success rates corresponding to the at least two Wifi networks, and the historical connection consumed time of the target Wifi network is the shortest among the historical connection consumed times corresponding to the at least two Wifi networks, and the real-time signal intensity of the target Wifi network is greater than the connection threshold value, the target Wifi network is connected.
To sum up, the embodiment of the application further determines whether the target Wifi network meets other connection conditions by the terminal when the real-time signal intensity of the target Wifi network is greater than the connection threshold, and if so, connects the target Wifi network, thereby further ensuring the speed of connecting the terminal and the target Wifi network and the stability of the subsequent target Wifi network in the using process.
In a possible implementation manner, after the terminal is connected to the target Wifi network, when the network switching connection times in a specified time period is greater than a switching threshold, the terminal modifies a pre-stored first connection numerical value into a second connection numerical value, that is, the terminal can dynamically adjust the first connection numerical value according to the service condition of the target Wifi network. After the step 307, the following steps are also included, as shown in fig. 4:
step 401, acquiring the number of times of network switching connection in a specified time period.
Optionally, after the terminal is successfully connected to the target Wifi network, the network switching connection times of the terminal are monitored in real time or at predetermined time intervals, where the predetermined time intervals are less than the specified time period.
And the terminal acquires the network switching connection times in a specified time period. The network switching connection times comprise switching connection between different Wifi networks and/or total times of switching connection between the Wifi networks and the mobile network.
Step 402, determining whether the number of network handover connections within a specified time period is greater than a handover threshold.
And the terminal judges whether the network switching connection frequency in the specified time period is greater than a switching threshold value. If the network switching connection times in the specified time period are greater than the switching threshold value, it indicates that the stability of the target Wifi network is poor in the using process, and step 403 is executed; if the network switching connection times in the specified time period are smaller than or equal to the switching threshold value, the stability of the target Wifi network in the using process is good, and the process is ended.
The specified time period and the switching threshold value are set by a user in a self-defined mode or are set by a terminal in a default mode. Illustratively, the specified time period is 5 minutes and the switching threshold is 1 time.
Step 403, when the network switching connection frequency is greater than the switching threshold, modifying the pre-stored first connection value into a second connection value, where the second connection value is a positive number greater than the first connection value and less than 1.
And when the network switching connection times in the specified time period are greater than the switching threshold value, the terminal modifies the prestored first connection numerical value into a second connection numerical value.
Optionally, the first connection value and the second connection value are both values smaller than a threshold of the specified parameter. Illustratively, the specified parameter threshold is 0.9.
In a possible implementation manner, the modifying, by the terminal, the pre-stored first connection value into the second connection value includes: and the terminal increases the first connection value by a specified increment to obtain a second connection value. Illustratively, the specified increment is 0.02.
In another possible implementation manner, modifying, by the terminal, the first connection value stored in advance to the second connection value includes: the terminal acquires an increment numerical value corresponding to the network switching connection times according to the first corresponding relation; and adding the increment value to the prestored first connection value to obtain a second connection value.
Optionally, the increment value is a positive number less than 0.1.
The terminal stores a first corresponding relation, wherein the first corresponding relation comprises a corresponding relation between the network switching connection times and the increment numerical value, namely the corresponding relation between the network switching connection times and the increment numerical value in a specified time period.
Illustratively, the first corresponding relationship includes that the corresponding increment value is 0.02 when the network switching connection frequency is more than 1 and less than 3 in 5 minutes; and when the network switching connection times are more than or equal to 3, the corresponding increment value is 0.04. The present embodiment does not limit the setting manner of the first correspondence relationship.
To sum up, in the embodiment of the present application, when the network switching connection frequency is greater than the switching threshold value in the specified time period, the terminal obtains an incremental value corresponding to the network switching connection frequency according to the first corresponding relationship; adding the increment value to the first pre-stored connection value to obtain a second connection value; after the terminal is connected with the target Wifi network, the first connection numerical value can be dynamically adjusted according to the service condition of the target Wifi network, and therefore the connection effect when the target Wifi network is scanned next time is guaranteed.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 5, a schematic structural diagram of a wireless network connection device according to an embodiment of the present application is shown. The wireless network connection device can be implemented by a dedicated hardware circuit, or a combination of hardware and software, as all or a part of the terminal in fig. 1, and includes: a first acquisition module 510, a second acquisition module 520, and a connection module 530.
The first obtaining module 510 is configured to obtain real-time signal intensity of a target Wifi network when the target Wifi network is scanned, where the target Wifi network is a Wifi network to which a terminal has historically connected;
a second obtaining module 520, configured to obtain a connection threshold corresponding to the target Wifi network, where the connection threshold is a threshold determined according to a historical maximum signal intensity of the target Wifi network, and the historical maximum signal intensity is a maximum signal intensity obtained when the target Wifi network is scanned historically;
a connection module 530, configured to connect to the target Wifi network when the real-time signal strength is greater than the connection threshold.
Optionally, the second obtaining module 520 is further configured to obtain a historical maximum signal strength of the target Wifi network; and determining a connection threshold according to the historical maximum signal strength and a first calculation rule, wherein the first calculation rule is used for indicating that the connection threshold is smaller than the historical maximum signal strength and the absolute value of the difference between the connection threshold and the historical maximum signal strength is smaller than a first difference threshold.
Optionally, the second obtaining module 520 is further configured to obtain a first pre-stored connection value, where the first connection value is a positive number smaller than 1; the ratio of the historical maximum signal strength to the first connection value is determined as the connection threshold.
Optionally, the apparatus further comprises: and modifying the module. And the modification module is used for modifying the prestored first connection numerical value into a second connection numerical value when the network switching connection frequency in the specified time period is greater than the switching threshold value, wherein the second connection numerical value is a positive number which is greater than the first connection numerical value and less than 1.
Optionally, the modification module is further configured to obtain the number of times of network switching connection in a specified time period; when the network switching connection times are larger than the switching threshold value, acquiring an increment numerical value corresponding to the network switching connection times according to a first corresponding relation, wherein the first corresponding relation comprises the corresponding relation between the network switching connection times and the increment numerical value; and adding the increment value to the prestored first connection value to obtain a second connection value.
Optionally, the second obtaining module 520 is further configured to perform the step of determining the connection threshold according to the historical maximum signal strength when the real-time signal strength is smaller than the historical maximum signal strength.
Optionally, the apparatus further comprises: and updating the module. And the updating module is used for connecting the target Wifi network when the real-time signal intensity is greater than the historical maximum signal intensity, and updating the historical maximum signal intensity of the target Wifi network into the real-time signal intensity.
Optionally, the connection module 530 is further configured to obtain respective real-time signal intensities of the at least two scanned Wifi networks;
when the real-time signal intensity of the target Wifi network is greater than the connection threshold and meets the first connection condition, connecting the target Wifi network;
the first connection condition comprises that the real-time signal intensity of the target Wifi network is the maximum signal intensity in the real-time signal intensities corresponding to the at least two Wifi networks respectively, and/or the difference value between the real-time signal intensity and the minimum signal intensity of the target Wifi network is larger than a second difference threshold value.
Optionally, the connection module 530 is further configured to obtain historical connection power and/or historical connection time consumption corresponding to each of the scanned at least two Wifi networks;
when the real-time signal intensity of the target Wifi network is greater than the connection threshold value and meets a second connection condition, connecting the target Wifi network;
the second connection condition comprises that the historical connection success rate of the target Wifi network is highest in the historical connection power corresponding to the at least two Wifi networks, and/or the historical connection time consumption of the target Wifi network is shortest in the historical connection time consumption corresponding to the at least two Wifi networks.
The relevant details may be combined with the method embodiments described with reference to fig. 2-4. The first obtaining module 510 and the second obtaining module 520 are further configured to implement any other implicit or public functions related to the obtaining step in the foregoing method embodiments; the connection module 530 is further configured to implement any other implicit or disclosed functionality related to the connection step in the above method embodiments.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
The present application also provides a computer readable medium, on which program instructions are stored, and the program instructions, when executed by a processor, implement the wireless network connection method provided by the above-mentioned method embodiments.
The present application also provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the wireless networking method described in the various embodiments above.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps in the wireless network connection method for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc. The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (12)

1. A method of wireless network connection, the method comprising:
determining a target wireless fidelity (Wifi) network, wherein the target Wifi network is a Wifi network indicated by common network identifiers existing in first Wifi environment information and second Wifi environment information, the first Wifi environment information comprises network identifiers of a plurality of Wifi networks scanned by a terminal, and the second Wifi environment information comprises network identifiers of a plurality of Wifi networks which have been connected to the terminal historically;
acquiring the real-time signal intensity of the target Wifi network, wherein the target Wifi network is a Wifi network which is historically connected with the terminal;
acquiring a connection threshold corresponding to the target Wifi network, wherein the connection threshold is a threshold determined according to the historical maximum signal intensity of the target Wifi network and the network connection switching times, the historical maximum signal intensity is the maximum signal intensity acquired when the target Wifi network is scanned historically, and the network connection switching times are the times of switching connection of the terminal in a specified time period;
when the real-time signal intensity is larger than the connection threshold value, connecting the target Wifi network;
the connection threshold values corresponding to at least two Wifi networks are different for the terminal, and the at least two Wifi networks comprise the target Wifi network.
2. The method of claim 1, wherein the obtaining of the connection threshold corresponding to the target Wifi network comprises:
acquiring the historical maximum signal intensity of the target Wifi network;
determining the connection threshold according to the historical maximum signal strength and a first calculation rule, wherein the first calculation rule is used for indicating that the connection threshold is smaller than the historical maximum signal strength and the absolute value of the difference between the connection threshold and the historical maximum signal strength is smaller than a first difference threshold.
3. The method of claim 2, wherein determining the connection threshold based on the historical maximum signal strength and a first calculation rule comprises:
acquiring a first pre-stored connection value, wherein the first connection value is a positive number smaller than 1;
determining a ratio of the historical maximum signal strength to the first connection value as the connection threshold.
4. The method as claimed in claim 3, wherein after connecting the target Wifi network when the real-time signal strength is greater than the connection threshold, further comprising:
and when the network switching connection times are greater than a switching threshold value in a specified time period, modifying the prestored first connection value into a second connection value, wherein the second connection value is a positive number which is greater than the first connection value and less than 1.
5. The method according to claim 4, wherein the modifying the pre-stored first connection value to a second connection value when the number of network handover connections within a specified time period is greater than a handover threshold value comprises:
acquiring the network switching connection times in the specified time period;
when the network switching connection times are larger than the switching threshold value, acquiring an increment numerical value corresponding to the network switching connection times according to a first corresponding relation, wherein the first corresponding relation comprises the corresponding relation between the network switching connection times and the increment numerical value;
and adding the increment value to the first connection value stored in advance to obtain the second connection value.
6. The method of claim 2, wherein prior to determining the connection threshold based on the historical maximum signal strength, further comprising:
when the real-time signal strength is less than the historical maximum signal strength, performing the step of determining the connection threshold based on the historical maximum signal strength.
7. The method of claim 6, further comprising:
and when the real-time signal intensity is greater than the historical maximum signal intensity, connecting the target Wifi network, and updating the historical maximum signal intensity of the target Wifi network to the real-time signal intensity.
8. The method according to any one of claims 1 to 7, wherein the connecting the target Wifi network when the real-time signal strength is greater than the connection threshold value comprises:
acquiring real-time signal intensity corresponding to the at least two scanned Wifi networks;
when the real-time signal intensity of the target Wifi network is greater than the connection threshold and meets a first connection condition, connecting the target Wifi network;
the first connection condition includes that the real-time signal strength of the target Wifi network is the maximum signal strength in the respective corresponding real-time signal strengths of the at least two Wifi networks, and/or the difference between the real-time signal strength and the minimum signal strength of the target Wifi network is greater than a second difference threshold.
9. The method according to any one of claims 1 to 7, wherein the connecting the target Wifi network when the real-time signal strength is greater than the connection threshold value comprises:
acquiring historical connection power and/or historical connection time consumption corresponding to the scanned at least two Wifi networks;
when the real-time signal intensity of the target Wifi network is greater than the connection threshold and meets a second connection condition, connecting the target Wifi network;
the second connection condition comprises that the historical connection success rate of the target Wifi network is highest in the historical connection power corresponding to the at least two Wifi networks, and/or the historical connection consumed time of the target Wifi network is shortest in the historical connection consumed time corresponding to the at least two Wifi networks.
10. An apparatus for wireless networking, the apparatus comprising:
the system comprises a determining module, a judging module and a judging module, wherein the determining module is used for determining a target wireless fidelity (Wifi) network, the target Wifi network is a Wifi network indicated by a common network identifier existing in first Wifi environment information and second Wifi environment information, the first Wifi environment information comprises network identifiers of a plurality of Wifi networks scanned by a terminal, and the second Wifi environment information comprises network identifiers of a plurality of Wifi networks which have been connected to the terminal historically;
the first acquisition module is used for acquiring the real-time signal intensity of the target Wifi network, wherein the target Wifi network is a Wifi network which is historically connected with the terminal;
a second obtaining module, configured to obtain a connection threshold corresponding to the target Wifi network, where the connection threshold is a threshold determined according to a historical maximum signal strength of the target Wifi network and a network connection switching frequency, the historical maximum signal strength is a maximum signal strength obtained when the target Wifi network is scanned historically, and the network connection switching frequency is a frequency of switching connection of the terminal within a specified time period;
the connection module is used for connecting the target Wifi network when the real-time signal intensity is larger than the connection threshold value;
the connection threshold values corresponding to at least two Wifi networks are different for the terminal, and the at least two Wifi networks comprise the target Wifi network.
11. A terminal, characterized in that the terminal comprises a processor, a memory connected to the processor, and program instructions stored on the memory, which when executed by the processor implement the wireless networking method according to any of claims 1 to 9.
12. A computer-readable storage medium, having stored thereon program instructions, which when executed by a processor, implement the wireless networking method of any of claims 1 to 9.
CN201811240355.2A 2018-10-23 2018-10-23 Wireless network connection method, device, terminal and storage medium Active CN109089327B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811240355.2A CN109089327B (en) 2018-10-23 2018-10-23 Wireless network connection method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811240355.2A CN109089327B (en) 2018-10-23 2018-10-23 Wireless network connection method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN109089327A CN109089327A (en) 2018-12-25
CN109089327B true CN109089327B (en) 2020-11-24

Family

ID=64843923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811240355.2A Active CN109089327B (en) 2018-10-23 2018-10-23 Wireless network connection method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN109089327B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109862606B (en) * 2019-02-26 2021-03-19 广州乐摇摇信息科技有限公司 Self-service equipment communication method, device and system
CN112351461B (en) * 2019-08-08 2023-08-22 Oppo广东移动通信有限公司 WiFi network switching method, wiFi network switching device, terminal and storage medium
CN112398702B (en) * 2019-08-12 2022-08-02 腾讯科技(深圳)有限公司 Speed measurement method and device, server and storage medium
CN112988180B (en) * 2019-11-30 2023-10-20 西安诺瓦星云科技股份有限公司 Control method and device of embedded equipment
CN111526515A (en) * 2020-04-29 2020-08-11 Oppo广东移动通信有限公司 Network connection method, device, terminal and storage medium
CN111835914B (en) * 2020-07-02 2021-11-12 西安闻泰电子科技有限公司 Call control method, device, computer equipment and storage medium
CN114095293B (en) * 2020-08-24 2023-07-14 无锡小天鹅电器有限公司 Distribution network method and device for household appliance and household appliance
CN113472611A (en) * 2021-07-26 2021-10-01 东莞市金锐显数码科技有限公司 Method and device for acquiring WiFi signal strength and readable storage medium
CN114501566A (en) * 2022-02-24 2022-05-13 维沃移动通信有限公司 Network switching method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107241782A (en) * 2017-06-16 2017-10-10 广东欧珀移动通信有限公司 Method for network access, mobile terminal and computer-readable recording medium
CN107969027A (en) * 2017-12-08 2018-04-27 广东欧珀移动通信有限公司 wireless network management method, wireless network management device and intelligent terminal
CN108449764A (en) * 2018-06-01 2018-08-24 南昌黑鲨科技有限公司 Network connection control method, computer readable storage medium and intelligent terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101616462B (en) * 2009-08-13 2011-11-16 杭州华三通信技术有限公司 Method and device for preventing wireless client from being switched in wireless local area network (WLAN)
US10129700B2 (en) * 2016-11-14 2018-11-13 WiSilica Inc. Prediction algorithm for location estimation
CN108012301A (en) * 2017-11-29 2018-05-08 广东欧珀移动通信有限公司 A kind of mobile terminal and its method for connecting network, computer-readable recording medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107241782A (en) * 2017-06-16 2017-10-10 广东欧珀移动通信有限公司 Method for network access, mobile terminal and computer-readable recording medium
CN107969027A (en) * 2017-12-08 2018-04-27 广东欧珀移动通信有限公司 wireless network management method, wireless network management device and intelligent terminal
CN108449764A (en) * 2018-06-01 2018-08-24 南昌黑鲨科技有限公司 Network connection control method, computer readable storage medium and intelligent terminal

Also Published As

Publication number Publication date
CN109089327A (en) 2018-12-25

Similar Documents

Publication Publication Date Title
CN109089327B (en) Wireless network connection method, device, terminal and storage medium
CN107333293B (en) Method and device for reporting measurement information
CN108282845B (en) Network access method and mobile communication terminal
CN109041140B (en) Method for rapidly switching wireless network, intelligent hardware and terminal equipment
CN109495875B (en) SIM card selection method and device, electronic equipment and storage medium
CN110856209B (en) Method, apparatus and storage medium for displaying network sign
WO2016173339A1 (en) Network access method and mobile communication terminal
CN111278036B (en) Method and device for acquiring MAC address
CN111918350A (en) Wireless roaming method, device, equipment and storage medium
CN110461023B (en) Cell residence method and device for voice service, storage medium and main base station
CN209949085U (en) User identity identification integrated card, data communication equipment and system
CN110708732A (en) Method and terminal for dynamically self-adapting network switching
CN112333794B (en) Network connection method and device
CN112566012B (en) Terminal feature acquisition method and device, server and storage medium
WO2020151622A1 (en) Assessment method and apparatus for position recommendation
CN112351461B (en) WiFi network switching method, wiFi network switching device, terminal and storage medium
CN111970750A (en) Multi-frequency WiFi identification method and device
CN103152801B (en) The method and apparatus being connected is set up with wireless access device
CN112433480B (en) Intelligent household system and control method and device thereof
CN114205378A (en) Network distribution method and device of Internet of things equipment, storage medium and electronic device
CN110139296B (en) Terminal information acquisition method and device
CN109951870B (en) Channel configuration method of WIFI router, storage medium and router
CN112235848A (en) Network searching method, device, terminal and storage medium
CN114071646A (en) Access control method, device, terminal and network equipment
CN113055969B (en) Node determination method and 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