CN111093238B - Wireless network control method and device, storage medium and electronic equipment - Google Patents

Wireless network control method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111093238B
CN111093238B CN201911167154.9A CN201911167154A CN111093238B CN 111093238 B CN111093238 B CN 111093238B CN 201911167154 A CN201911167154 A CN 201911167154A CN 111093238 B CN111093238 B CN 111093238B
Authority
CN
China
Prior art keywords
network
electronic device
preset
network transmission
determining
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
CN201911167154.9A
Other languages
Chinese (zh)
Other versions
CN111093238A (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 CN201911167154.9A priority Critical patent/CN111093238B/en
Publication of CN111093238A publication Critical patent/CN111093238A/en
Application granted granted Critical
Publication of CN111093238B publication Critical patent/CN111093238B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • H04W36/00837Determination of triggering parameters for hand-off
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • H04W36/0085Hand-off measurements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/24Reselection being triggered by specific parameters
    • H04W36/30Reselection being triggered by specific parameters by measured or perceived connection quality data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup

Landscapes

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

Abstract

The application discloses a control method and device of a wireless network, a storage medium and electronic equipment. The method comprises the following steps: judging whether a network quality parameter of a first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value or not; if the network quality parameter of the first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value, acquiring connectable Wi-Fi to be selected; determining a second Wi-Fi from the Wi-Fi to be selected according to a preset database, wherein the preset database comprises a plurality of Wi-Fi identifications and network quality parameters of the Wi-Fi corresponding to each Wi-Fi identification within a first preset time period; establishing a connection with the second Wi-Fi when the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi. The method and the device can improve the flexibility of Wi-Fi selection.

Description

Wireless network control method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a method and an apparatus for controlling a wireless network, a storage medium, and an electronic device.
Background
With the development of wireless network technology, more and more people establish a wireless network environment by connecting Wi-Fi in daily life and work. Public Wi-Fi (e.g., free Wi-Fi provided by an operator, free Wi-Fi provided by public places such as a mall, an airport, etc.) is provided in each of large public places in most cities today. With the complication of wireless network environment, 2 or more than 2 public Wi-Fi devices are usually installed in each public place, and at this time, the electronic device is required to select one public Wi-Fi device from the public Wi-Fi devices for connection.
In the related art, the electronic device scans Wi-Fi according to the position of the electronic device, and then randomly selects one Wi-Fi from connectable Wi-Fi for connection, where the Wi-Fi is not always the best Wi-Fi, and a Wi-Fi signal generated by the electronic device is likely to be unstable, so that a user cannot surf the internet normally. It can be seen that in the related art, the flexibility of Wi-Fi selection is low.
Disclosure of Invention
The embodiment of the application provides a control method and device of a wireless network, a storage medium and electronic equipment, which can improve the flexibility of Wi-Fi selection.
The embodiment of the application provides a control method of a wireless network, which is applied to electronic equipment and comprises the following steps:
judging whether a network quality parameter of a first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value or not;
if the network quality parameter of the first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value, acquiring connectable Wi-Fi to be selected;
determining a second Wi-Fi from the Wi-Fi to be selected according to a preset database, wherein the preset database comprises a plurality of Wi-Fi identifications and network quality parameters of the Wi-Fi corresponding to each Wi-Fi identification within a first preset time period;
establishing a connection with the second Wi-Fi when the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi.
The embodiment of the application provides a control device of a wireless network, which is applied to electronic equipment and comprises:
the judging module is used for judging whether the network quality parameter of the first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value;
the acquisition module is used for acquiring connectable Wi-Fi to be selected if the network quality of the first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value;
the determining module is used for determining a second Wi-Fi from the Wi-Fi to be selected according to a preset database, wherein the preset database comprises a plurality of Wi-Fi identifications and network quality parameters of the Wi-Fi corresponding to each Wi-Fi identification within a first preset time period;
and the connection module is used for establishing connection with the second Wi-Fi when the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi.
An embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute a flow in a control method of a wireless network provided in an embodiment of the present application.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the procedure in the control method for a wireless network provided in the embodiment of the present application by calling the computer program stored in the memory.
In the embodiment of the application, when the network quality parameter of a first Wi-Fi connected to the electronic equipment is smaller than a preset threshold, the electronic equipment can determine a second Wi-Fi from connectable Wi-Fi to be selected according to a preset database, and then establish connection with the second Wi-Fi. The preset database comprises a plurality of Wi-Fi identifications and network quality parameters of Wi-Fi corresponding to each Wi-Fi identification in a first preset time period. That is, when the network quality parameter of the first Wi-Fi connected to the electronic device is smaller than the preset threshold, the electronic device may select a suitable second Wi-Fi according to the network quality parameter of each to-be-selected Wi-Fi within the first preset time period, and establish a connection with the second Wi-Fi when the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi, so that the flexibility of Wi-Fi selection may be improved.
Drawings
The technical solutions and advantages of the present application will become apparent from the following detailed description of specific embodiments of the present application when taken in conjunction with the accompanying drawings.
Fig. 1 is a first flowchart illustrating a method for controlling a wireless network according to an embodiment of the present application.
Fig. 2 is a second flowchart of a method for controlling a wireless network according to an embodiment of the present application.
Fig. 3 is a third flowchart illustrating a control method of a wireless network according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a control device of a wireless network according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a first electronic device according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a second electronic device according to an embodiment of the present application.
Detailed Description
Referring to the drawings, wherein like reference numbers refer to like elements, the principles of the present application are illustrated as being implemented in a suitable computing environment. The following description is based on illustrated embodiments of the application and should not be taken as limiting the application with respect to other embodiments that are not detailed herein.
It is understood that the execution subject of the embodiment of the present application may be an electronic device such as a smart phone or a tablet computer.
Referring to fig. 1, fig. 1 is a first flowchart illustrating a method for controlling a wireless network according to an embodiment of the present application, where the method for controlling a wireless network is applicable to an electronic device, and the process may include:
in 101, whether a network quality parameter of a first Wi-Fi connected to the electronic device is smaller than a preset threshold value is judged.
It should be noted that, in the embodiment of the present application, the electronic device may include a first Wi-Fi antenna and a second Wi-Fi antenna. The electronic device may connect with both Wi-Fi via the first Wi-Fi antenna and the second Wi-Fi antenna simultaneously. For example, after the electronic device establishes a connection with a first Wi-Fi operating in a first frequency band through a first Wi-Fi antenna, the electronic device may also establish a connection with a second Wi-Fi operating in a second frequency band through a second Wi-Fi antenna. The first Wi-Fi frequency band can be 2.4G, and the second Wi-Fi frequency band can be 5G; or the first Wi-Fi band may be 5G and the second Wi-Fi band may be 2.4G.
In some embodiments, the electronic device may connect two Wi-Fi devices operating in the 2.4G band and two Wi-Fi devices operating in the 5G band simultaneously via the first Wi-Fi antenna and the second Wi-Fi antenna.
In an embodiment of the application, the electronic device may establish a connection with a first Wi-Fi via a first Wi-Fi antenna. After establishing a connection with Wi-Fi, the electronic device may determine whether a network quality parameter of the first Wi-Fi is less than a preset threshold.
The network quality parameter may be network signal strength, network transmission delay, network transmission rate, or network packet loss rate. Based on this, the electronic device may determine whether the network quality parameter is less than a preset threshold value according to the following method;
(1) the electronic equipment monitors whether the network signal intensity of the current network is smaller than a preset signal intensity threshold value or not in real time, and when the network signal intensity is monitored to be smaller than the preset signal intensity threshold value, the current network quality parameter is determined to be smaller than the preset threshold value;
(2) the electronic equipment monitors whether the network transmission delay of the current network is larger than a preset network transmission delay threshold value or not in real time, and when the network transmission delay is detected to be larger than the preset network transmission delay threshold value, the current network quality parameter is determined to be smaller than the preset threshold value;
(3) the electronic equipment monitors whether the network transmission rate of the current network is smaller than a preset network transmission rate threshold value or not in real time, and when the network transmission rate is smaller than the preset network transmission rate threshold value, the electronic equipment determines that the current network quality parameter is smaller than the preset threshold value;
(4) the electronic equipment monitors whether the network packet loss rate of the current network is larger than a preset network packet loss rate threshold value or not in real time, and when the network packet loss rate is larger than the preset network packet loss rate threshold value, the current network quality parameter is determined to be smaller than the preset threshold value.
It should be noted that the preset signal strength threshold, the preset network transmission experiment threshold, the preset network transmission rate threshold, and the preset network packet loss rate threshold may be set according to an actual situation, and are not limited herein.
It should be further noted that the method for detecting whether the network quality parameter is smaller than the preset threshold is not limited to the above description.
In 102, if the network quality parameter of the first Wi-Fi connected to the electronic device is smaller than a preset threshold, a connectable Wi-Fi to be selected is obtained.
For example, if the network quality parameter of the first Wi-Fi connected to the electronic device is smaller than a preset threshold, the electronic device may perform Wi-Fi search to search for connectable Wi-Fi to be selected. After the connectable Wi-Fi to be selected is searched, the electronic equipment can acquire the Wi-Fi to be selected. The connectable Wi-Fi to be selected can comprise: Wi-Fi successfully connected by an electronic device before the electronic device performs a Wi-Fi search.
In 103, a second Wi-Fi is determined from the Wi-Fi to be selected according to a preset database, wherein the preset database comprises a plurality of Wi-Fi identifiers and network quality parameters of the Wi-Fi corresponding to each Wi-Fi identifier within a first preset time period.
It is understood that the electronic device may pre-establish a predetermined database. When the electronic equipment is connected with a certain Wi-Fi, the electronic equipment can collect a period of time from the connection of the Wi-Fi to the disconnection of the Wi-Fi, network quality parameters of the Wi-Fi, and store the network quality parameters in the preset database by combining with a Wi-Fi identifier corresponding to the Wi-Fi. When the electronic device is connected to the Wi-Fi again, the electronic device may again collect network quality parameters of the Wi-Fi for a period of time between connecting the Wi-Fi and disconnecting the Wi-Fi. Then, the electronic device can update the network quality parameters corresponding to the Wi-Fi identification corresponding to the Wi-Fi to the network quality parameters of the Wi-Fi collected again by the electronic device in a period of time from connection of the Wi-Fi to disconnection of the Wi-Fi. The first preset time period may be a period of time between the last time the electronic device connects to a certain Wi-Fi and the last time the electronic device disconnects from the Wi-Fi. The Wi-Fi identification can be a physical (MAC) address of Wi-Fi.
In some embodiments, the first preset time period corresponding to each Wi-Fi includes a sum of time between each connection of each Wi-Fi to each disconnection of each Wi-Fi by the electronic device.
For example, after acquiring connectable Wi-Fi to be selected, the electronic device may acquire the preset database. Subsequently, the electronic device can determine a second Wi-Fi from the Wi-Fi to be selected according to the preset database.
For example, the network quality parameter may be a network transmission rate. After obtaining the Wi-Fi to be selected, the electronic device can determine the identification of each Wi-Fi to be selected. Then, the electronic equipment can detect whether Wi-Fi identifications matched with the Wi-Fi identifications to be selected exist in a preset database or not. If the Wi-Fi identifier exists, the electronic equipment can acquire the network transmission rate of the Wi-Fi corresponding to the Wi-Fi identifier matched with each Wi-Fi to be selected in a first preset time period. The electronic equipment can use the network transmission rate of the Wi-Fi in the first preset time period corresponding to the Wi-Fi identification matched with each Wi-Fi to be selected as the network transmission rate of each Wi-Fi to be selected in the first preset time period. The electronic device may then determine a Wi-Fi with a highest corresponding network transmission rate among the Wi-Fi to be selected as a second Wi-Fi. The first preset time period corresponding to each Wi-Fi to be selected is a period of time between the last connection of the electronic equipment to each Wi-Fi to be selected and the disconnection of the electronic equipment to each Wi-Fi to be selected.
In some embodiments, connectable Wi-Fi to be selected may include: Wi-Fi without a password that is not connected to an electronic device before the electronic device performs a Wi-Fi search. For the case that the electronic device only searches Wi-Fi which is not connected with the electronic device and does not need a password, namely the Wi-Fi does not exist in the preset database, the electronic device can select the Wi-Fi with the strongest signal from the Wi-Fi as second Wi-Fi.
When the Wi-Fi searched by the electronic equipment exists in the preset database and also exists in the Wi-Fi which is not connected with the electronic equipment and does not need the password, the electronic equipment can only acquire the Wi-Fi in the preset database. The electronic device may then determine a second Wi-Fi from the Wi-Fi data present in the predetermined database based on the predetermined database.
At 104, a connection is established with the second Wi-Fi when the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi.
For example, after determining the second Wi-Fi, the electronic device can determine a current network quality of the first Wi-Fi and a current network quality of the second Wi-Fi. The electronic device may then detect whether the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi. If the current network quality of the first Wi-Fi is better than the current network quality of the second Wi-Fi, the electronic equipment can establish connection with the second Wi-Fi.
For example, the network quality of Wi-Fi can be characterized by the network transmission rate. If the network transmission rate of the second Wi-Fi is detected to be B1, and the network transmission rate of the first Wi-Fi is detected to be B2, the electronic device can determine that the network quality of the second Wi-Fi is better than that of the first Wi-Fi, and then the electronic device can establish connection with the second Wi-Fi through the second Wi-Fi antenna. Wherein B1 is greater than B2.
In the embodiment of the application, when the network quality parameter of a first Wi-Fi connected to the electronic equipment is smaller than a preset threshold, the electronic equipment can determine a second Wi-Fi from connectable Wi-Fi to be selected according to a preset database, and then establish connection with the second Wi-Fi. The preset database comprises a plurality of Wi-Fi identifications and network quality parameters of Wi-Fi corresponding to each Wi-Fi identification in a first preset time period. That is, when the network quality parameter of the first Wi-Fi connected to the electronic device is smaller than the preset threshold, the electronic device may select a suitable second Wi-Fi according to the network quality parameter of each to-be-selected Wi-Fi within the first preset time period, and establish a connection with the second Wi-Fi when the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi, so that the flexibility of Wi-Fi selection may be improved.
In some embodiments, the network quality parameter of the Wi-Fi corresponding to each Wi-Fi identifier in the first preset time period is a network packet loss ratio of the Wi-Fi corresponding to each Wi-Fi identifier in the first preset time period, and the process 103 may include:
and determining the Wi-Fi of which the network packet loss rate is smaller than the preset network packet loss rate in the Wi-Fi to be selected as a second Wi-Fi.
For example, after obtaining the Wi-Fi to be selected, the electronic device may obtain a Wi-Fi identifier of each Wi-Fi to be selected. The Wi-Fi identification can be a MAC address of Wi-Fi. Then, the electronic equipment can detect whether Wi-Fi identifications matched with the Wi-Fi identifications to be selected exist in the preset database or not. If the Wi-Fi identifier exists, the electronic equipment can acquire the network packet loss rate of the Wi-Fi corresponding to the Wi-Fi identifier matched with each to-be-selected Wi-Fi in a first preset time period. And the network packet loss rate of the Wi-Fi corresponding to the Wi-Fi identification matched with each Wi-Fi to be selected in the first preset time period can be used as the network packet loss rate corresponding to each Wi-Fi to be selected. Then, the electronic device may determine, as the second Wi-Fi, a Wi-Fi of which the corresponding network packet loss rate is smaller than a preset network packet loss rate among the Wi-Fi to be selected. The preset network packet loss rate may be set according to an actual situation, and is not limited herein.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a second flow of a method for controlling a wireless network according to an embodiment of the present application, where the method for controlling a wireless network is applicable to an electronic device, and the flow includes:
in 201, the electronic device determines whether a network quality parameter of a first Wi-Fi to which the electronic device is connected is smaller than a preset threshold.
It should be noted that, in the embodiment of the present application, the electronic device may include a first Wi-Fi antenna and a second Wi-Fi antenna. The electronic device may connect with both Wi-Fi via the first Wi-Fi antenna and the second Wi-Fi antenna simultaneously. For example, after the electronic device establishes a connection with a first Wi-Fi operating in a first frequency band through a first Wi-Fi antenna, the electronic device may also establish a connection with a second Wi-Fi operating in a second frequency band through a second Wi-Fi antenna. The first Wi-Fi frequency band can be 2.4G, and the second Wi-Fi frequency band can be 5G; or the first Wi-Fi band may be 5G and the second Wi-Fi band may be 2.4G.
In some embodiments, the electronic device may connect two Wi-Fi devices operating in the 2.4G band and two Wi-Fi devices operating in the 5G band simultaneously via the first Wi-Fi antenna and the second Wi-Fi antenna.
In an embodiment of the application, the electronic device may establish a connection with a first Wi-Fi via a first Wi-Fi antenna. After establishing a connection with the Wi-Fi, the electronic device may determine whether a network quality parameter of the first Wi-Fi is less than a preset threshold.
The network quality parameter may be network signal strength, network transmission delay, network transmission rate, or network packet loss rate. Based on this, the electronic device may determine whether the network quality parameter is less than a preset threshold value according to the following method;
(1) the electronic equipment monitors whether the network signal intensity of the current network is smaller than a preset signal intensity threshold value or not in real time, and when the network signal intensity is monitored to be smaller than the preset signal intensity threshold value, the current network quality parameter is determined to be smaller than the preset threshold value;
(2) the electronic equipment monitors whether the network transmission delay of the current network is larger than a preset network transmission delay threshold value or not in real time, and when the network transmission delay is detected to be larger than the preset network transmission delay threshold value, the current network quality parameter is determined to be smaller than the preset threshold value;
(3) the electronic equipment monitors whether the network transmission rate of the current network is smaller than a preset network transmission rate threshold value or not in real time, and when the network transmission rate is smaller than the preset network transmission rate threshold value, the electronic equipment determines that the current network quality parameter is smaller than the preset threshold value;
(4) the electronic equipment monitors whether the network packet loss rate of the current network is larger than a preset network packet loss rate threshold value or not in real time, and when the network packet loss rate is larger than the preset network packet loss rate threshold value, the current network quality parameter is determined to be smaller than the preset threshold value.
It should be noted that the preset signal strength threshold, the preset network transmission experiment threshold, the preset network transmission rate threshold, and the preset network packet loss rate threshold may be set according to an actual situation, and are not limited herein.
It should be further noted that the method for detecting whether the network quality parameter is smaller than the preset threshold is not limited to the above description.
In 202, if the network quality parameter of the first Wi-Fi connected to the electronic device is smaller than a preset threshold, the electronic device obtains connectable Wi-Fi to be selected.
For example, if the network quality parameter of the first Wi-Fi to which the electronic device is connected is smaller than a preset threshold, the electronic device may perform Wi-Fi search to search for connectable Wi-Fi to be selected. After the connectable Wi-Fi to be selected is searched, the electronic equipment can acquire the Wi-Fi to be selected. The connectable Wi-Fi to be selected can comprise: Wi-Fi that the electronic device successfully connects to before the electronic device performs a Wi-Fi search.
In 203, the electronic device obtains a target network transmission rate corresponding to each to-be-selected Wi-Fi according to the preset database, wherein the target network transmission rate corresponding to each to-be-selected Wi-Fi is a network transmission rate greater than a preset network transmission rate among a plurality of network transmission rates corresponding to each to-be-selected Wi-Fi.
It is understood that the electronic device may obtain a preset database, where the preset database includes a plurality of Wi-Fi identifiers and network quality parameters of Wi-Fi corresponding to each Wi-Fi identifier within a first preset time period. The first preset time period corresponding to each Wi-Fi can be a period of time between the last connection of the electronic device to the disconnection of each Wi-Fi and the connection of each Wi-Fi. The Wi-Fi identification can be a physical (MAC) address of Wi-Fi.
It is understood that the preset database may be pre-established by the electronic device. For example, when the electronic device is successfully connected to a certain Wi-Fi, the electronic device may collect a period of time from connection of the Wi-Fi to disconnection of the Wi-Fi, and store the network quality parameters of the Wi-Fi in the preset database in combination with the Wi-Fi identifier corresponding to the Wi-Fi. When the electronic device is connected to the Wi-Fi again, the electronic device may again collect network quality parameters of the Wi-Fi for a period of time between connecting the Wi-Fi and disconnecting the Wi-Fi. Then, the electronic device can update the network quality parameters corresponding to the Wi-Fi identification corresponding to the Wi-Fi to the network quality parameters of the Wi-Fi collected again by the electronic device in a period of time from connection of the Wi-Fi to disconnection of the Wi-Fi.
For example, when the electronic device successfully connects to the 1 st Wi-Fi, the electronic device may collect network quality parameters of the 1 st Wi-Fi for a period of time between connecting the 1 st Wi-Fi to disconnecting the 1 st Wi-Fi, as at time t 1. Then, the electronic device may obtain the Wi-Fi identifier of the 1 st Wi-Fi, and store the Wi-Fi identifier of the 1 st Wi-Fi and the network quality parameter of the 1 st Wi-Fi at time t1 in a preset database in a corresponding manner. When the electronic device connects to the 1 st Wi-Fi again, the electronic device may collect the network quality parameters of the 1 st Wi-Fi again for a period of time between connecting the 1 st Wi-Fi to disconnecting the 1 st Wi-Fi, as at time t 2. Then, the electronic device may update the network quality parameter corresponding to the Wi-Fi identifier corresponding to the 1 st Wi-Fi to the network quality parameter of the 1 st Wi-Fi at time t 2.
For another example, when the electronic device successfully connects to the 2 nd Wi-Fi, the electronic device may collect network quality parameters of the 2 nd Wi-Fi for a period of time between connecting the 2 nd Wi-Fi to disconnecting the 2 nd Wi-Fi, as at time t 3. Then, the electronic device may obtain the Wi-Fi identifier of the 2 nd Wi-Fi, and store the Wi-Fi identifier of the 2 nd Wi-Fi and the network quality parameter of the 2 nd Wi-Fi at time t3 in a preset database in a corresponding manner. When the electronic device connects to the 2 nd Wi-Fi again, the electronic device may collect the network quality parameters of the 2 nd Wi-Fi again for a period of time between connecting the 2 nd Wi-Fi to disconnecting the 2 nd Wi-Fi, as at time t 4. The electronic device may then update the network quality parameter corresponding to the Wi-Fi identification corresponding to the 2 nd Wi-Fi to the network quality parameter of the 2 nd Wi-Fi at time t 4.
In the embodiment of the application, the network quality parameters of the Wi-Fi corresponding to each Wi-Fi identifier in the first preset time period are a plurality of network rates corresponding to the Wi-Fi corresponding to each Wi-Fi identifier. And the network transmission rates corresponding to the Wi-Fi identifications are the same in number. For example, after the electronic device is connected to a certain Wi-Fi, the electronic device may calculate a network transmission rate corresponding to the Wi-Fi every preset time. For example, the electronic device may calculate the network transmission rate corresponding to the Wi-Fi every 1 minute or 5 minutes. Then, each time the electronic device calculates a network transmission rate corresponding to the Wi-Fi, the network transmission rate corresponding to the Wi-Fi and the Wi-Fi identifier corresponding to the Wi-Fi may be stored in a preset database in a corresponding manner. The electronic device may also set the number of network transmission rates corresponding to each Wi-Fi. For example, the number of network transmission rates corresponding to each Wi-Fi is set to 10, 12, or 15, and so on. Assuming that the number of network transmission rates corresponding to each Wi-Fi is 10, when the electronic device obtains an 11 th network transmission rate corresponding to a certain Wi-Fi, the electronic device may delete the 1 st network transmission rate corresponding to the Wi-Fi. That is, when the number exceeds, the electronic device may delete the earliest obtained network transmission rate.
In the embodiment of the application, after the connectable Wi-Fi to be selected is obtained by the electronic equipment, the electronic equipment can determine the identification of each Wi-Fi to be selected. Then, the electronic equipment can detect whether Wi-Fi identifications matched with the Wi-Fi identifications to be selected exist in the preset database or not. If the matching Wi-Fi identifications exist, the electronic equipment can acquire a plurality of network transmission rates corresponding to the matching Wi-Fi identifications. The electronic device can use the plurality of network transmission rates corresponding to the matching Wi-Fi identifications as the plurality of network transmission rates corresponding to the Wi-Fi to be selected.
And then, the electronic equipment can obtain the target network transmission rate corresponding to each Wi-Fi to be selected according to a preset database. The target network transmission rate corresponding to each Wi-Fi to be selected is a network transmission rate which is greater than a preset network transmission rate in a plurality of network transmission rates corresponding to each Wi-Fi to be selected.
In some embodiments, when the number of network transmission rates corresponding to a certain Wi-Fi is smaller than the number of network transmission rates corresponding to other Wi-Fi in the preset database due to the fact that the electronic device is connected to the certain Wi-Fi for a too short time, after the electronic device acquires connectable Wi-Fi to be selected, the electronic device may determine whether there is Wi-Fi to be selected matching the Wi-Fi in the Wi-Fi to be selected. If so, the electronic device may drop the to-be-selected Wi-Fi that matches the Wi-Fi. Namely, the electronic equipment obtains the target network transmission rate corresponding to each Wi-Fi to be selected in the Wi-Fi to be selected except the Wi-Fi to be selected which is matched with the Wi-Fi according to the preset database.
In other embodiments, each time the electronic device connects to a certain Wi-Fi, the network quality parameters of the Wi-Fi during each connection of the Wi-Fi may be collected and stored in the preset database in combination with the Wi-Fi identifier corresponding to the Wi-Fi. For example, after the electronic device is connected to a certain Wi-Fi, the network transmission rate corresponding to the Wi-Fi may be obtained at intervals, such as 1 minute or 5 minutes, and stored in the preset database in combination with the Wi-Fi identifier of the Wi-Fi.
For example, after obtaining the Wi-Fi to be selected, the electronic device may obtain an identifier of each Wi-Fi to be selected. The electronic equipment can detect whether Wi-Fi identifications matched with the Wi-Fi identifications to be selected exist in a preset database or not. If the Wi-Fi identifier exists, the electronic equipment can acquire the network transmission rate corresponding to the Wi-Fi identifier matched with each Wi-Fi identifier to be selected. Then, the electronic device may determine whether the number of network transmission rates corresponding to the Wi-Fi identifiers matched with each Wi-Fi identifier to be selected is the same. If the network transmission rates are different, the electronic equipment takes the Wi-Fi identifier with the minimum number of the corresponding network transmission rates as a reference, and reduces the number of the network transmission rates corresponding to other Wi-Fi identifiers, so that the number of the network transmission rates corresponding to other Wi-Fi identifiers is the same as the number of the network transmission rates corresponding to the Wi-Fi identifier with the minimum number of the corresponding network transmission rates.
For example, assume that the Wi-Fi identification corresponding to the lowest number of network transmission rates corresponds to 5 network transmission rates. For other Wi-Fi identities, the electronic device may obtain the last 5 network transmission rates from the network transmission rates corresponding to the other Wi-Fi identities. Wherein, the latest 5 network transmission rates means that the time for obtaining the 5 network transmission rates is closest to the current time.
After the number of the network transmission rates corresponding to the Wi-Fi identifiers matched with the to-be-selected Wi-Fi identifiers is the same through the above process, the electronic device may use the network transmission rate corresponding to the Wi-Fi identifier matched with the to-be-selected Wi-Fi identifier as a plurality of network transmission rates corresponding to the to-be-selected Wi-Fi identifiers. And then, the electronic equipment can obtain the target network transmission rate corresponding to each Wi-Fi to be selected, wherein the target network transmission rate corresponding to each Wi-Fi to be selected is the network transmission rate which is greater than the preset network transmission rate in the plurality of network transmission rates corresponding to each Wi-Fi to be selected.
It is understood that the preset network transmission rate can be set according to practical situations, and is not particularly limited herein.
In 204, the electronic device determines a first number corresponding to each to-be-selected Wi-Fi, where the first number is a number of a target network transmission rate.
After determining the target network transmission rate corresponding to each Wi-Fi to be selected, the electronic device may determine a first number corresponding to each Wi-Fi to be selected. And the first quantity corresponding to each Wi-Fi to be selected is the quantity of the transmission rate of the target network corresponding to each Wi-Fi to be selected.
In 205, the electronic device determines the Wi-Fi with the highest first number corresponding to the Wi-Fi to be selected as the second Wi-Fi.
After determining the first number corresponding to each Wi-Fi to be selected, the electronic device may determine, from the Wi-Fi to be selected, the Wi-Fi with the highest first number, and determine the Wi-Fi with the highest first number as the second Wi-Fi.
At 206, the electronic device establishes a connection with the second Wi-Fi when the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi.
For example, after determining the second Wi-Fi, the electronic device may detect whether the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi. If the current network quality of the first Wi-Fi is better than the current network quality of the second Wi-Fi, the electronic equipment can establish connection with the second Wi-Fi.
For example, the network quality of Wi-Fi can be characterized by the network transmission rate. If the network transmission rate of the second Wi-Fi is detected to be B1, and the network transmission rate of the first Wi-Fi is detected to be B2, the electronic device can determine that the network quality of the second Wi-Fi is better than that of the first Wi-Fi, and then the electronic device can establish connection with the second Wi-Fi through the second Wi-Fi antenna. Wherein B1 is greater than B2.
In some embodiments, the control method of the wireless network may further include:
when the first quantity corresponding to at least two third Wi-Fi in the Wi-Fi to be selected is the same, the electronic equipment determines the difference value between any two network transmission rates for a plurality of network transmission rates corresponding to each third Wi-Fi to obtain a plurality of difference values corresponding to each third Wi-Fi;
for a plurality of difference values corresponding to each third Wi-Fi, the electronic equipment determines the number of the difference values smaller than a difference value threshold value to obtain at least two second numbers, wherein each second number corresponds to one third Wi-Fi;
the electronic device determines a maximum number from the at least two second numbers;
the electronic device determines the third Wi-Fi corresponding to the maximum number as the second Wi-Fi.
It can be understood that, in practical applications, there may be a case where the first number corresponding to at least two third Wi-Fi in the Wi-Fi to be selected is the same. For the situation that the first number corresponding to at least two third Wi-Fi is the same in the Wi-Fi to be selected, the electronic device may determine, for a plurality of network transmission rates corresponding to each of the third Wi-Fi, a difference between any two network transmission rates to obtain a plurality of differences corresponding to each of the third Wi-Fi.
Then, for a plurality of difference values corresponding to each third Wi-Fi, the electronic device may determine a number of difference values smaller than a difference threshold value to obtain at least two second numbers, where each second number corresponds to a third Wi-Fi. The electronic device may then determine a maximum number from the at least two second numbers. The electronic device may then determine a maximum number of corresponding third Wi-Fi as the second Wi-Fi.
For example, assume that there are 3 third Wi-Fi in the Wi-Fi to be selected, each corresponding to 3 network transmission rates, and the first number is the same. The network transmission rates corresponding to the 1 st third Wi-Fi are respectively 10Mbps, 10.1Mbps and 10 Mbps. The network transmission rates corresponding to the 2 nd and third Wi-Fi are respectively 10Mbps, 8Mbps and 10.8 Mbps. The network transmission rates corresponding to the 3 rd and third Wi-Fi are 7Mbps, 10Mbps and 11Mbps respectively. The difference threshold is 1 Mbps. The plurality of differences corresponding to the 1 st third Wi-Fi are 0.1Mbps, 0Mbps, and 0.1Mbps, respectively. The difference values corresponding to the 2 nd and third Wi-Fi are 2Mbps, 0.8Mbps and 3Mbps respectively. The difference values corresponding to the 3 rd and third Wi-Fi are 3Mbps, 4Mbps and 1Mbps respectively.
As can be seen from the above, the difference values corresponding to the 1 st third Wi-Fi are all smaller than the difference threshold, and therefore, the electronic device may determine that the number of difference values smaller than the difference threshold among the difference values corresponding to the 1 st third Wi-Fi is 3. Only 1 difference value of the plurality of difference values corresponding to the 2 nd third Wi-Fi is smaller than the difference threshold value, so that the electronic device may determine that the number of difference values smaller than the difference threshold value among the plurality of difference values corresponding to the 2 nd third Wi-Fi is 1. The difference values corresponding to the 3 rd and third Wi-Fi are all greater than or equal to the difference threshold value, so that the electronic device may determine that the number of difference values smaller than the difference threshold value in the difference values corresponding to the 3 rd and third Wi-Fi is 0. Accordingly, the maximum number is 3, and the Wi-Fi corresponding to the maximum number is the 1 st third Wi-Fi, so that the electronic device may determine the 1 st third Wi-Fi as the second Wi-Fi.
In some embodiments, the control method of the wireless network may further include:
when the second numbers corresponding to at least two third Wi-Fi exist in the Wi-Fi to be selected are the same, the electronic equipment determines the times of connecting the electronic equipment with each third Wi-Fi to obtain at least two times, wherein each time corresponds to one third Wi-Fi;
the electronic equipment determines the maximum times from at least two times;
and the electronic equipment determines the third Wi-Fi corresponding to the maximum times as the second Wi-Fi.
It can be understood that, in practical applications, there may be a case where the first number corresponding to at least two third Wi-Fi in the Wi-Fi to be selected is the same. For the situation, namely when the first number corresponding to at least two third Wi-Fi exists in the Wi-Fi to be selected is the same, the electronic device can determine the times of connecting the electronic device with each third Wi-Fi to obtain at least two times, wherein each time corresponds to one third Wi-Fi. The electronic device may then determine a maximum number of times from the at least two numbers of times. Then, the electronic device may determine a third Wi-Fi corresponding to the maximum number as the second Wi-Fi.
For example, assume that there are 3 third Wi-Fi among the Wi-Fi to be selected corresponding to the same first number. The number of times that the electronic equipment is connected with the 1 st third Wi-Fi is 5. The number of times the electronic device connects to the 2 nd third Wi-Fi is 20. The number of times that the electronic equipment is connected with the 3 rd third Wi-Fi is 15. It can be seen that the maximum number of times is 20, and the Wi-Fi corresponding to the maximum number of times is the 2 nd third Wi-Fi. Then the electronic device may determine the 2 nd third Wi-Fi as the second Wi-Fi.
As shown in fig. 3, in some embodiments, the process 201 may include:
2011. the electronic equipment acquires a first application program which is currently running;
2012. the electronic equipment detects whether a second application program matched with the first application program exists in the application program set or not;
2013. if a second application program matched with the first application program exists in the application program set, the electronic equipment judges whether a network quality parameter of a first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value;
after the flow 206, the method may further include:
the electronic equipment migrates network traffic of a first application program borne by the first Wi-Fi to a second Wi-Fi.
It can be understood that, when the electronic device executes the process of determining whether the network quality parameter of the first Wi-Fi connected to the electronic device is smaller than the preset threshold, processing resources of some processors are consumed more or less. Therefore, in order to avoid wasting the processing resources of the processor as much as possible, the electronic device may set some trigger conditions for determining whether the network quality parameter of the first Wi-Fi connected to the electronic device is smaller than a preset threshold.
For example, the electronic device may collect some applications with high network quality requirements in advance and form an application set. I.e. the set of applications comprises a plurality of applications with high requirements on network quality. For example, the application program with high requirement on network quality may be a live application program, a video application program, a game application program, and the like.
Before judging whether the network quality parameter of the first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value, the electronic equipment can acquire a first application program which runs currently. The electronic device may then detect whether a second application matching the first application exists in the set of applications. If a second application program matched with the first application program exists in the application program set, the electronic device can judge whether the network quality parameter of the first Wi-Fi connected with the electronic device is smaller than a preset threshold value. The electronic device may then proceed to flow 202 through 206 to establish a connection with a second Wi-Fi. Because the current network quality of the second Wi-Fi is better than that of the first Wi-Fi, and the first application program is an application program with higher requirement on the network quality, after the electronic equipment establishes connection with the second Wi-Fi, the electronic equipment can transfer the network service of the first application program borne by the first Wi-Fi to the second Wi-Fi, so that the first application program can obtain better network service.
For example, the first application is live application a1, and the set of applications includes live application a1, live application a2, video application M1, video application M2, game application G1, game application G2, and game application G3. It can be seen that there is a second application in the set of applications that matches the first application, namely live application a 1. Then, the electronic device may determine whether a network quality parameter of a first Wi-Fi to which the electronic device is connected is less than a preset threshold.
In some embodiments, after the flow 206, it may further include:
and when the data volume required to be transmitted by the electronic equipment in the second preset time period is smaller than the preset data volume, the electronic equipment releases the second Wi-Fi.
It is understood that after establishing the connection with the second Wi-Fi, the electronic device may detect whether an amount of data that the electronic device needs to transmit within a second preset time period is less than a preset amount of data. And if the data volume required to be transmitted by the electronic equipment in the second preset time period is smaller than the preset data volume, the electronic equipment can release the second Wi-Fi. The second preset time period may be set according to actual conditions, for example, the second preset time period may be 30 minutes, 1 hour, or 2 hours. The predetermined amount of data may also be set according to the actual situation, for example, the predetermined amount of data may be 20KB, 50KB or 1 MB.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a control device of a wireless network according to an embodiment of the present application. The control device of the wireless network can be applied to electronic equipment. The control device 300 of the wireless network includes: a judging module 301, an obtaining module 302, a determining module 303 and a connecting module 304.
The determining module 301 is configured to determine whether a network quality parameter of a first Wi-Fi connected to the electronic device is smaller than a preset threshold.
An obtaining module 302, configured to obtain a connectable Wi-Fi to be selected if network quality of a first Wi-Fi connected to the electronic device is smaller than a preset threshold.
The determining module 303 is configured to determine a second Wi-Fi from the Wi-Fi to be selected according to a preset database, where the preset database includes a plurality of Wi-Fi identifiers and network quality parameters of Wi-Fi corresponding to each Wi-Fi identifier within a first preset time period.
A connection module 304, configured to establish a connection with the second Wi-Fi when the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi.
In some embodiments, the network quality parameter of the Wi-Fi corresponding to each Wi-Fi identifier in the first preset time period is a plurality of network transmission rates corresponding to the Wi-Fi corresponding to each Wi-Fi identifier, and the number of the network transmission rates corresponding to the Wi-Fi corresponding to each Wi-Fi identifier is the same, the determining module 303 may be configured to: obtaining a target network transmission rate corresponding to each Wi-Fi to be selected according to a preset database, wherein the target network transmission rate is a network transmission rate which is greater than a preset network transmission rate in a plurality of network transmission rates; determining a first quantity corresponding to each Wi-Fi to be selected, wherein the first quantity is the quantity of the transmission rate of a target network; and determining the Wi-Fi with the maximum first number in the Wi-Fi to be selected as a second Wi-Fi.
In some embodiments, the determining module 303 may be configured to: when the first quantity corresponding to at least two third Wi-Fi in the Wi-Fi to be selected is the same, determining the difference value between any two network transmission rates for a plurality of network transmission rates corresponding to each third Wi-Fi to obtain a plurality of difference values corresponding to each third Wi-Fi; determining the number of the difference values smaller than the difference value threshold value for a plurality of difference values corresponding to each third Wi-Fi to obtain at least two second numbers, wherein each second number corresponds to one third Wi-Fi; determining a maximum number from the at least two second numbers; and determining the third Wi-Fi corresponding to the maximum number as the second Wi-Fi.
In some embodiments, the determining module 303 may be configured to: when the second numbers corresponding to at least two third Wi-Fi exist in the Wi-Fi to be selected are the same, determining the times of connecting the electronic equipment with each third Wi-Fi to obtain at least two times, wherein each time corresponds to one third Wi-Fi; determining a maximum number of times from the at least two numbers of times; and determining the third Wi-Fi corresponding to the maximum times as the second Wi-Fi.
In some embodiments, the network quality parameter of the Wi-Fi corresponding to each Wi-Fi identifier in the first preset time period is a network packet loss ratio of the Wi-Fi corresponding to each Wi-Fi identifier in the first preset time period, and the determining module 303 may be configured to: and determining the Wi-Fi of which the network packet loss rate is smaller than the preset network packet loss rate in the Wi-Fi to be selected as a second Wi-Fi.
In some embodiments, the determining module 301 may be configured to: acquiring a first application program currently running; detecting whether a second application program matched with the first application program exists in the application program set; if a second application program matched with the first application program exists in the application program set, judging whether a network quality parameter of a first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value;
in some embodiments, the connection module 304 may be configured to: and migrating the network traffic of the first application program borne by the first Wi-Fi to the second Wi-Fi.
In some embodiments, the connection module 304 may be configured to: and when the data volume required to be transmitted by the electronic equipment in a second preset time period is smaller than the preset data volume, releasing the second Wi-Fi.
An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute a flow in a control method of a wireless network as provided in this embodiment.
The embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the procedure in the control method for a wireless network provided in this embodiment by calling the computer program stored in the memory.
For example, the electronic device may be a mobile terminal such as a tablet computer or a smart phone. Referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
The electronic device 400 may include memory 401, a processor 402, a first Wi-Fi antenna 403, and a second Wi-Fi antenna 404, among other components. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The memory 401 may be used to store applications and data. The memory 401 stores applications containing executable code. The application programs may constitute various functional modules. The processor 402 executes various functional applications and data processing by running an application program stored in the memory 401.
The processor 402 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 401 and calling data stored in the memory 401, thereby integrally monitoring the electronic device.
The first Wi-Fi antenna 403 may be used to establish a connection of the electronic device with either the first Wi-Fi or the second Wi-Fi.
The second Wi-Fi antenna 404 may be used to establish a connection of the electronic device with the first Wi-Fi or the second Wi-Fi.
In this embodiment, the processor 402 in the electronic device loads the executable code corresponding to the processes of one or more application programs into the memory 401 according to the following instructions, and the processor 402 runs the application programs stored in the memory 401, so as to implement the following processes:
judging whether a network quality parameter of a first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value or not;
if the network quality parameter of the first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value, acquiring connectable Wi-Fi to be selected;
determining a second Wi-Fi from the Wi-Fi to be selected according to a preset database, wherein the preset database comprises a plurality of Wi-Fi identifications and network quality parameters of the Wi-Fi corresponding to each Wi-Fi identification within a first preset time period;
establishing a connection with the second Wi-Fi when the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi.
Referring to fig. 6, the electronic device 400 may include components such as a memory 401, a processor 402, a first Wi-Fi antenna 403, a second Wi-Fi antenna 404, an input unit 405, an output unit 406, a display 407, and the like.
The memory 401 may be used to store applications and data. The memory 401 stores applications containing executable code. The application programs may constitute various functional modules. The processor 402 executes various functional applications and data processing by running an application program stored in the memory 401.
The processor 402 is a control center of the electronic device, connects various parts of the entire electronic device using various interfaces and lines, and performs various functions of the electronic device and processes data by running or executing an application program stored in the memory 401 and calling data stored in the memory 401, thereby integrally monitoring the electronic device.
The first Wi-Fi antenna 403 may be used to establish a connection of the electronic device with either the first Wi-Fi or the second Wi-Fi.
The second Wi-Fi antenna 404 may be used to establish a connection of the electronic device with the first Wi-Fi or the second Wi-Fi.
The input unit 405 may be used to receive input numbers, character information, or user characteristic information, such as a fingerprint, and generate a keyboard, mouse, joystick, optical, or trackball signal input related to user setting and function control.
The output unit 406 may be used to display information input by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
The display screen 407 may be used to display information such as text, pictures, etc.
In this embodiment, the processor 402 in the electronic device loads the executable code corresponding to the processes of one or more application programs into the memory 401 according to the following instructions, and the processor 402 runs the application programs stored in the memory 401, so as to implement the following processes:
judging whether a network quality parameter of a first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value or not;
if the network quality parameter of the first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value, acquiring connectable Wi-Fi to be selected;
determining a second Wi-Fi from the Wi-Fi to be selected according to a preset database, wherein the preset database comprises a plurality of Wi-Fi identifications and network quality parameters of the Wi-Fi corresponding to each Wi-Fi identification within a first preset time period;
establishing a connection with the second Wi-Fi when the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi.
In some embodiments, the network quality parameter of the Wi-Fi corresponding to each Wi-Fi identifier in the first preset time period is a plurality of network transmission rates corresponding to the Wi-Fi corresponding to each Wi-Fi identifier, and the number of the network transmission rates corresponding to the Wi-Fi corresponding to each Wi-Fi identifier is the same, and when the processor 402 determines a second Wi-Fi from the Wi-Fi to be selected according to the preset database, the processor may perform: obtaining a target network transmission rate corresponding to each Wi-Fi to be selected according to a preset database, wherein the target network transmission rate is a network transmission rate which is greater than a preset network transmission rate in a plurality of network transmission rates; determining a first quantity corresponding to each Wi-Fi to be selected, wherein the first quantity is the quantity of the transmission rate of a target network; and determining the Wi-Fi with the maximum first number in the Wi-Fi to be selected as a second Wi-Fi.
In some embodiments, processor 402 may also perform: when the first quantity corresponding to at least two third Wi-Fi in the Wi-Fi to be selected is the same, determining the difference value between any two network transmission rates for a plurality of network transmission rates corresponding to each third Wi-Fi to obtain a plurality of difference values corresponding to each third Wi-Fi; determining the number of the difference values smaller than the threshold value of the difference values to obtain at least two second numbers for a plurality of difference values corresponding to the third Wi-Fi, wherein each second number corresponds to one third Wi-Fi; determining a maximum number from the at least two second numbers; and determining the third Wi-Fi corresponding to the maximum number as the second Wi-Fi.
In some embodiments, processor 402 may also perform: when the second numbers corresponding to at least two third Wi-Fi exist in the Wi-Fi to be selected are the same, determining the times of connecting the electronic equipment with each third Wi-Fi to obtain at least two times, wherein each time corresponds to one third Wi-Fi; determining a maximum number of times from the at least two numbers of times; and determining the third Wi-Fi corresponding to the maximum times as the second Wi-Fi.
In some embodiments, the network quality parameter of the Wi-Fi corresponding to each Wi-Fi identifier in the first preset time period is a network packet loss rate of the Wi-Fi corresponding to each Wi-Fi identifier in the first preset time period, and when the processor 402 determines a second Wi-Fi from the Wi-Fi to be selected according to the preset database, the processor may perform: and determining the Wi-Fi of which the network packet loss rate is smaller than the preset network packet loss rate in the Wi-Fi to be selected as a second Wi-Fi.
In some embodiments, the processor 402, when performing the determining whether the network quality parameter of the first Wi-Fi to which the electronic device is connected is smaller than a preset threshold, may perform: acquiring a first application program currently running; detecting whether a second application program matched with the first application program exists in the application program set; if a second application program matched with the first application program exists in the application program set, judging whether a network quality parameter of a first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value; processor 402, after performing said establishing a connection with said second Wi-Fi, may further perform: and migrating the network traffic of the first application program borne by the first Wi-Fi to the second Wi-Fi.
In some embodiments, after processor 402 performs the establishing the connection with the second Wi-Fi, it may further perform: and when the data volume required to be transmitted by the electronic equipment in a second preset time period is smaller than the preset data volume, releasing the second Wi-Fi.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and a part which is not described in detail in a certain embodiment may refer to the above detailed description of the control method for the wireless network, and is not described herein again.
The control device of the wireless network provided in the embodiment of the present application and the control method of the wireless network in the above embodiments belong to the same concept, and any one of the methods provided in the control method embodiment of the wireless network may be operated on the control device of the wireless network, and a specific implementation process thereof is described in the control method embodiment of the wireless network in detail, and is not described herein again.
It should be noted that, for the method for controlling a wireless network according to the embodiment of the present application, it can be understood by those skilled in the art that all or part of the process of implementing the method for controlling a wireless network according to the embodiment of the present application can be completed by controlling the relevant hardware through a computer program, where the computer program can be stored in a computer-readable storage medium, such as a memory, and executed by at least one processor, and during the execution, the process of the embodiment of the method for controlling a wireless network can be included. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
In the control device of the wireless network according to the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules 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, such as a read-only memory, a magnetic or optical disk, or the like.
The foregoing detailed description is directed to a method, an apparatus, a storage medium, and an electronic device for controlling a wireless network provided in an embodiment of the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the foregoing embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (8)

1. A control method of a wireless network is applied to an electronic device, the electronic device comprises a first Wi-Fi antenna and a second Wi-Fi antenna, the electronic device can be connected with two Wi-Fi simultaneously through the first Wi-Fi antenna and the second Wi-Fi antenna, and the method comprises the following steps:
judging whether the network quality parameter of a first Wi-Fi connected with the electronic equipment through a first Wi-Fi antenna is smaller than a preset threshold value or not;
if the network quality parameter of the first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value, acquiring connectable Wi-Fi to be selected;
obtaining a target network transmission rate corresponding to each Wi-Fi to be selected according to a preset database, wherein the preset database comprises a plurality of Wi-Fi identifications and a plurality of network transmission rates of the Wi-Fi corresponding to each Wi-Fi identification in a first preset time period, the network transmission rates corresponding to the Wi-Fi corresponding to each Wi-Fi identification are the same in number, and the target network transmission rate is a network transmission rate which is greater than the preset network transmission rate in the plurality of network transmission rates; determining a first quantity corresponding to each Wi-Fi to be selected, wherein the first quantity is the quantity of the transmission rate of a target network; determining the Wi-Fi with the maximum first number in the Wi-Fi to be selected as a second Wi-Fi;
and when the current network quality of the second Wi-Fi is better than that of the first Wi-Fi, establishing connection with the second Wi-Fi through a second Wi-Fi antenna so as to realize simultaneous connection of the first Wi-Fi and the second Wi-Fi.
2. The method of controlling a wireless network according to claim 1, wherein the method further comprises:
when the first quantity corresponding to at least two third Wi-Fi in the Wi-Fi to be selected is the same, determining the difference value between any two network transmission rates for a plurality of network transmission rates corresponding to each third Wi-Fi to obtain a plurality of difference values corresponding to each third Wi-Fi;
determining the number of the difference values smaller than the difference value threshold value for a plurality of difference values corresponding to each third Wi-Fi to obtain at least two second numbers, wherein each second number corresponds to one third Wi-Fi;
determining a maximum number from the at least two second numbers;
and determining the third Wi-Fi corresponding to the maximum number as the second Wi-Fi.
3. The method of controlling a wireless network according to claim 1, wherein the method further comprises:
when the second numbers corresponding to at least two third Wi-Fi exist in the Wi-Fi to be selected are the same, determining the times of connecting the electronic equipment with each third Wi-Fi to obtain at least two times, wherein each time corresponds to one third Wi-Fi;
determining a maximum number of times from the at least two numbers of times;
and determining the third Wi-Fi corresponding to the maximum times as the second Wi-Fi.
4. The method for controlling a wireless network according to claim 1, wherein the determining whether the network quality parameter of the first Wi-Fi to which the electronic device is connected is smaller than a preset threshold value comprises:
acquiring a first application program currently running;
detecting whether a second application program matched with the first application program exists in the application program set;
if a second application program matched with the first application program exists in the application program set, judging whether a network quality parameter of a first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value;
after the establishing a connection with the second Wi-Fi, further comprising:
and migrating the network traffic of the first application program borne by the first Wi-Fi to the second Wi-Fi.
5. The method of claim 1, further comprising, after the establishing a connection with the second Wi-Fi:
and when the data volume required to be transmitted by the electronic equipment in a second preset time period is smaller than the preset data volume, releasing the second Wi-Fi.
6. A control device of a wireless network is applied to an electronic device, wherein the electronic device comprises a first Wi-Fi antenna and a second Wi-Fi antenna, and the electronic device can be simultaneously connected with two Wi-Fi through the first Wi-Fi antenna and the second Wi-Fi antenna, and the device comprises:
the judgment module is used for judging whether the network quality parameter of a first Wi-Fi connected with the electronic equipment through a first Wi-Fi antenna is smaller than a preset threshold value or not;
the acquisition module is used for acquiring connectable Wi-Fi to be selected if the network quality of the first Wi-Fi connected with the electronic equipment is smaller than a preset threshold value;
the device comprises a determining module and a selecting module, wherein the determining module is used for obtaining a target network transmission rate corresponding to each Wi-Fi to be selected according to a preset database, the preset database comprises a plurality of Wi-Fi identifications and a plurality of network transmission rates of the Wi-Fi corresponding to each Wi-Fi identification in a first preset time period, the network transmission rates corresponding to the Wi-Fi corresponding to each Wi-Fi identification are the same in number, and the target network transmission rate is a network transmission rate which is greater than the preset network transmission rate in the plurality of network transmission rates; determining a first quantity corresponding to each Wi-Fi to be selected, wherein the first quantity is the quantity of the transmission rate of a target network; determining the Wi-Fi with the maximum first number in the Wi-Fi to be selected as a second Wi-Fi;
and the connection module is used for establishing connection with the second Wi-Fi through a second Wi-Fi antenna when the current network quality of the second Wi-Fi is better than the current network quality of the first Wi-Fi so as to realize the simultaneous connection of the first Wi-Fi and the second Wi-Fi.
7. A storage medium having stored therein a computer program which, when run on a computer, causes the computer to execute the control method of a wireless network according to any one of claims 1 to 5.
8. An electronic device, characterized in that the electronic device comprises a processor and a memory, in which a computer program is stored, and the processor is configured to execute the control method of a wireless network according to any one of claims 1 to 5 by calling the computer program stored in the memory.
CN201911167154.9A 2019-11-25 2019-11-25 Wireless network control method and device, storage medium and electronic equipment Active CN111093238B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911167154.9A CN111093238B (en) 2019-11-25 2019-11-25 Wireless network control method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911167154.9A CN111093238B (en) 2019-11-25 2019-11-25 Wireless network control method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111093238A CN111093238A (en) 2020-05-01
CN111093238B true CN111093238B (en) 2022-06-14

Family

ID=70393738

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911167154.9A Active CN111093238B (en) 2019-11-25 2019-11-25 Wireless network control method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111093238B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111669799A (en) * 2020-05-21 2020-09-15 维沃移动通信有限公司 Network connection method and device and electronic equipment
CN114339869B (en) * 2022-02-25 2024-04-05 京东科技信息技术有限公司 Network management method, device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011135382A (en) * 2009-12-24 2011-07-07 Kyocera Corp Radio base station and method of controlling establishment of connection
CN104066134A (en) * 2014-05-26 2014-09-24 河南省尖端智能控制技术有限公司 Seamless switching method for multiple access points of WiFi network
CN107949024A (en) * 2018-01-08 2018-04-20 广东欧珀移动通信有限公司 AP method for handover control and device, electronic device and computer-readable recording medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140226620A1 (en) * 2013-02-14 2014-08-14 Qualcomm Incorporated Access terminal maintenance of handover parameter for source and target access point pairs
CN104981028A (en) * 2015-03-09 2015-10-14 深圳市腾讯计算机系统有限公司 Wireless network access method and related equipment
CN106131930A (en) * 2016-08-15 2016-11-16 广东欧珀移动通信有限公司 A kind of WiFi network connection control method, device and terminal
CN106714081B (en) * 2016-11-22 2020-10-30 北京小米移动软件有限公司 Network connection method and intelligent device
CN107071864B (en) * 2016-12-28 2019-11-08 上海掌门科技有限公司 It is a kind of for connecting the method, equipment and system of wireless access point
CN106954248A (en) * 2017-03-31 2017-07-14 宇龙计算机通信科技(深圳)有限公司 A kind of method for network access and device
CN107295559B (en) * 2017-08-17 2020-05-05 迈普通信技术股份有限公司 Terminal roaming management method and access control equipment
CN108770027A (en) * 2018-05-28 2018-11-06 深圳市零度智控科技有限公司 Switching method, mobile terminal and the computer readable storage medium of wireless access point
CN108882324A (en) * 2018-09-27 2018-11-23 北京安云世纪科技有限公司 Processing method, device, computer equipment and the storage medium of intelligence switching WiFi
CN109618320A (en) * 2019-01-15 2019-04-12 Oppo广东移动通信有限公司 The method and device of radio roaming

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011135382A (en) * 2009-12-24 2011-07-07 Kyocera Corp Radio base station and method of controlling establishment of connection
CN104066134A (en) * 2014-05-26 2014-09-24 河南省尖端智能控制技术有限公司 Seamless switching method for multiple access points of WiFi network
CN107949024A (en) * 2018-01-08 2018-04-20 广东欧珀移动通信有限公司 AP method for handover control and device, electronic device and computer-readable recording medium

Also Published As

Publication number Publication date
CN111093238A (en) 2020-05-01

Similar Documents

Publication Publication Date Title
CN106658652B (en) Method and device for connecting WiFi hotspot
US9736767B2 (en) Identification-assisted wireless network connections
CN109089261B (en) Method, apparatus, computer device and storage medium for wireless roaming triggering
CN111093238B (en) Wireless network control method and device, storage medium and electronic equipment
CN112469096B (en) Cell switching method and device
CN111866976B (en) Network switching method and device
CN106411627A (en) Network connection detection method and apparatus
US10149134B2 (en) Near field discovery method, user equipment, and storage medium
EP3598813A1 (en) Information processing method, apparatus, computer readable storage medium and electronic device
CN112383948B (en) Data transmission method, device, storage medium and electronic equipment
CN112346751B (en) Application program installation method and device, electronic equipment and storage medium
CN109041150B (en) Cell switching method, terminal and network equipment
CN113364682A (en) Data transmission method and device, storage medium and electronic device
CN111884875A (en) Offline device determination method and device
CN112566078A (en) Device connection method and apparatus, storage medium, and electronic apparatus
CN114867075A (en) Wireless network switching method, device, equipment, storage medium and product
CN113179509B (en) Ad hoc network method and device based on WiFi, storage medium and wireless node
EP2903344A1 (en) Server device capable of analyzing communication behavior, control method for mobile terminal, and computer program
CN114245430A (en) Voice access method and terminal equipment
CN103152801B (en) The method and apparatus being connected is set up with wireless access device
CN112399515B (en) Communication processing method and device
CN111148188B (en) Network connection method, device, storage medium and electronic equipment
CN111836322B (en) Communication method, device, equipment and medium for sharing equipment
CN113613310A (en) WIFI connection method and device, storage medium and mobile terminal
CN113068122A (en) Positioning information sharing method, positioning information sharing device, electronic equipment and medium

Legal Events

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