CN112351464A - WiFi connection method, terminal and storage medium - Google Patents
WiFi connection method, terminal and storage medium Download PDFInfo
- Publication number
- CN112351464A CN112351464A CN201910720804.1A CN201910720804A CN112351464A CN 112351464 A CN112351464 A CN 112351464A CN 201910720804 A CN201910720804 A CN 201910720804A CN 112351464 A CN112351464 A CN 112351464A
- Authority
- CN
- China
- Prior art keywords
- frequency
- terminal
- frequency band
- wifi dual
- band
- 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.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/06—Reselecting a communication resource in the serving access point
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/0005—Control or signalling for completing the hand-off
- H04W36/0083—Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
- H04W36/0085—Hand-off measurements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/24—Reselection being triggered by specific parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W36/00—Hand-off or reselection arrangements
- H04W36/24—Reselection being triggered by specific parameters
- H04W36/30—Reselection being triggered by specific parameters by measured or perceived connection quality data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W88/00—Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
- H04W88/02—Terminal devices
- H04W88/06—Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W88/00—Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
- H04W88/08—Access point devices
- H04W88/10—Access point devices adapted for operation in multiple networks, e.g. multi-mode access points
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a WiFi connection method, a terminal and a storage medium, and relates to the technical field of wireless communication. According to the WiFi connection method, the terminal and the storage medium, the terminal determines the terminal connection number of the WiFi dual-frequency equipment which is currently connected after the terminal meets the connection selection condition, determines the current network scene according to the terminal connection number, and selects the frequency band connected with the WiFi dual-frequency equipment according to the current network scene, so that the situation that the number of the terminals connected to the same frequency band is too large in a specific network scene, the terminals compete for bandwidth resources with other too large terminals, and the network speed of the terminal is influenced due to the fact that the obtained bandwidth resources are less can be avoided. Meanwhile, the bandwidth resources of each frequency band provided by the WiFi dual-frequency equipment can be utilized more uniformly.
Description
Technical Field
The present invention relates to the field of wireless communication technologies, and in particular, to a WiFi connection method, a terminal, and a storage medium.
Background
A WiFi (Wireless Fidelity) network provides convenience for mobile terminals such as smart phones and tablet computers to access the internet. The frequencies of WiFi devices currently in mainstream use include a 2.4GHz band and a 5GHz band, and a WiFi device providing an access point of the 2.4GHz band and the 5GHz band is called a WiFi dual-band device.
At present, most terminals can simultaneously support and connect the 2.4GHz frequency band and the 5GHz frequency band. For a terminal supporting connection of a 2.4GHz frequency band and a 5GHz frequency band at the same time, after the terminal is connected with a WiFi dual-frequency device, switching can be generally performed between the two frequency bands according to the change of the signal intensity of the 2.4GHz frequency band or the 5GHz frequency band.
The method only switches the working frequency band according to the signal intensity, and in some working scenes, the network speed of the terminal may be affected due to the fact that the number of the terminals connected to the same frequency band is too large. For example, in an office scenario, a large number of terminals currently support only the 2.4GHz band, that is, the number of terminals connected to the 2.4GHz band may be much larger than the number of terminals connected to the 5GHz band. If the smart phone connected with the 2.4GHz band and the 5GHz band can be supported simultaneously, and the smart phone is detected to be slightly better than the 5GHz band in signal intensity of the 2.4GHz band provided by the WiFi dual-frequency device, the smart phone also selects to be connected with the 2.4GHz band, and probably because the number of terminals connected with the 2.4GHz band is too large, the smart phone needs to compete for bandwidth resources of the 2.4GHz band with other multiple terminals, and therefore the network speed of the smart phone is influenced.
Disclosure of Invention
Embodiments of the present invention provide a WiFi connection method, a terminal and a storage medium, so as to alleviate a problem that network speed of a terminal is affected due to an excessive number of terminals connected to the same frequency band.
The embodiment of the invention provides the following specific technical scheme:
in a first aspect, an embodiment of the present invention provides a WiFi connection method, including:
after the terminal meets the connection selection condition, determining the terminal connection number of the WiFi dual-frequency equipment which is currently connected;
the terminal determines the current network scene according to the terminal connection quantity;
the terminal selects a frequency band connected with the WiFi dual-frequency equipment according to the current network scene;
and if the selected frequency band is different from the frequency band currently connected to the WiFi dual-frequency equipment, the terminal establishes connection with the WiFi dual-frequency equipment according to the selected frequency band.
According to the WiFi connection method provided by the embodiment of the invention, after the terminal meets the connection selection condition, the terminal connection number of the WiFi dual-frequency equipment which is currently connected is determined, the current network scene is determined according to the terminal connection number, and the frequency band which is connected with the WiFi dual-frequency equipment is selected according to the current network scene, so that the situation that the number of the terminals which are connected to the same frequency band is too large in a specific network scene, the terminals compete for bandwidth resources with other too large terminals, and the network speed of the terminal is influenced due to the fact that the obtained bandwidth resources are less can be avoided. Meanwhile, the bandwidth resources of each frequency band provided by the WiFi dual-frequency equipment can be utilized more uniformly.
In one possible implementation, the connection selection condition includes at least one of:
the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is the same;
the difference between the signal intensities of the two frequency bands of the WiFi dual-frequency equipment is smaller than a set intensity difference threshold value;
the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is larger than or equal to the corresponding connection intensity threshold value.
In the method, the terminal determines the frequency band connected with the WiFi dual-frequency device through the signal intensity of the two frequency bands of the WiFi dual-frequency device, determines the current network scene according to the terminal connection number of the WiFi dual-frequency device connected at present when the frequency band to be connected cannot be determined through the signal intensity of the two frequency bands of the WiFi dual-frequency device, and selects the frequency band connected with the WiFi dual-frequency device according to the current network scene. If the frequency band to be connected can be definitely determined through the signal strength of the two frequency bands of the WiFi dual-frequency device, the frequency band to be connected can be quickly determined without executing subsequent steps, and programs are saved.
In a possible implementation manner, the terminal connection number is the maximum terminal connection number accommodated in a frequency band where the terminal is currently connected with the WiFi dual-frequency device;
the terminal determining the terminal connection number of the WiFi dual-frequency equipment connected currently comprises the following steps:
and the terminal determines the terminal connection quantity of the WiFi dual-frequency equipment according to the subnet mask of the frequency band currently connected with the WiFi dual-frequency equipment.
In the method, the terminal connection number is the maximum terminal connection number contained in the frequency band where the terminal is currently connected with the WiFi dual-frequency device. The terminal can determine the maximum terminal connection number contained in the frequency band currently connected with the WiFi dual-frequency device according to the subnet mask of the frequency band currently connected with the WiFi dual-frequency device. Generally, each frequency band of WiFi dual-frequency equipment in a home scene can accommodate 256 terminals at most, and a subnet mask is 255.255.255.0; each frequency band of the WiFi dual frequency device in the working scenario can accommodate more terminals, and the subnet mask is 255.255.xxx.0, where xxx is less than 255. Therefore, according to the subnet mask of the frequency band currently connected with the WiFi dual-frequency device, the maximum terminal connection number accommodated by the currently connected frequency band can be determined. The method can quickly determine the terminal connection number of the WiFi dual-frequency equipment, and further determine the network scene.
In a possible implementation manner, the frequency bands of the WiFi dual-frequency device include a 2.4GHz frequency band, and the number of terminal connections is the number of terminals connected to the 2.4GHz frequency band of the WiFi dual-frequency device;
the terminal determining the terminal connection number of the WiFi dual-frequency equipment connected currently comprises the following steps:
if the current frequency band connected with the WiFi dual-frequency equipment is a 2.4GHz frequency band, the terminal takes each IP address included in the 2.4GHz frequency band as a target IP address of an ARP request respectively and broadcasts the ARP request;
and the terminal determines the terminal connection number of the WiFi dual-frequency equipment according to the number of the received reply messages.
In the method, considering that the number of terminals generally connected to the 2.4GHz band is large in a working scene, a network scene can be determined according to the number of terminals connected to the 2.4GHz band of the WiFi dual-band device. Specifically, the terminal may use each IP address included in the 2.4GHz band as a target IP address of the ARP request, broadcast the ARP request, and determine the number of terminals connected to the 2.4GHz band of the WiFi dual-band device according to the number of received reply messages. The method can accurately determine the terminal connection number of the WiFi dual-frequency equipment, and further determine the network scene.
In a possible implementation manner, the determining, by the terminal, a current network scenario according to the terminal connection number includes:
the terminal judges whether the terminal connection number is larger than a set connection number threshold value or not;
if so, determining that the current network scene is a working scene;
if not, determining that the current network scene is a family scene.
In the method, since the number of terminals that can be accommodated by each frequency band of the WiFi dual-frequency device in the working scene is greater than the number of terminals that can be accommodated by each frequency band of the WiFi dual-frequency device in the home scene, if the terminal connection number is the maximum terminal connection number that is accommodated by the frequency band where the terminal is currently connected to the WiFi dual-frequency device, the working scene can be considered when the maximum terminal connection number that is accommodated by the currently connected frequency band is greater than the set connection number threshold. Because the number of terminals generally connected to the 2.4GHz band in the working scene is large, if the number of terminal connections is the number of terminals connected to the 2.4GHz band of the WiFi dual-band device, the working scene can be considered when the number of terminals connected to the 2.4GHz band is greater than the set connection number threshold. In the two schemes, the set threshold of the number of connections may be different or the same. The current network scene can be determined by the two schemes, and a user can flexibly select any one scheme according to actual conditions.
In one possible implementation, the method further includes:
the terminal periodically determines whether a connection selection condition is satisfied.
In the method, after the terminal is connected with the WiFi dual-frequency device, whether the two frequency bands need to be switched or not can be periodically judged so as to be connected to the frequency band with better current performance, and the terminal is guaranteed to have a stable network connection state and a stable data transmission rate.
In a second aspect, an embodiment of the present invention provides a terminal, including a memory and a processor, where the memory stores a computer program executable on the processor, and when the computer program is executed by the processor, the processor is caused to execute the following steps:
after the connection selection condition is met, determining the terminal connection number of the WiFi dual-frequency equipment which is currently connected;
determining the current network scene according to the terminal connection quantity;
selecting a frequency band connected with the WiFi dual-frequency equipment according to the current network scene;
and if the selected frequency band is different from the frequency band currently connected to the WiFi dual-frequency equipment, establishing connection with the WiFi dual-frequency equipment according to the selected frequency band.
In one possible implementation, the connection selection condition includes at least one of:
the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is the same;
the difference between the signal intensities of the two frequency bands of the WiFi dual-frequency equipment is smaller than a set intensity difference threshold value;
the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is larger than or equal to the corresponding connection intensity threshold value.
In a possible implementation manner, the terminal connection number is the maximum terminal connection number accommodated in a frequency band where the terminal is currently connected with the WiFi dual-frequency device;
the processor specifically performs:
and determining the terminal connection number of the WiFi dual-frequency equipment according to the subnet mask of the frequency band currently connected with the WiFi dual-frequency equipment.
In a possible implementation manner, the frequency bands of the WiFi dual-frequency device include a 2.4GHz frequency band, and the number of terminal connections is the number of terminals connected to the 2.4GHz frequency band of the WiFi dual-frequency device;
the processor specifically performs:
if the current frequency band connected with the WiFi dual-frequency device is a 2.4GHz frequency band, each IP address included in the 2.4GHz frequency band is respectively used as a target IP address of an ARP request, and the ARP request is broadcasted;
and determining the terminal connection number of the WiFi dual-frequency equipment according to the number of the received reply messages.
In one possible implementation, the processor specifically performs:
judging whether the terminal connection number is larger than a set connection number threshold value or not;
if so, determining that the current network scene is a working scene;
if not, determining that the current network scene is a family scene.
In one possible implementation, the processor further performs:
it is periodically determined whether a connection selection condition is satisfied.
In a third aspect, an embodiment of the present invention provides a terminal, including:
the scene determining unit is used for determining the terminal connection number of the WiFi dual-frequency equipment which is currently connected after the connection selection condition is met; determining the current network scene according to the terminal connection quantity;
the frequency band selection unit is used for selecting a frequency band connected with the WiFi dual-frequency equipment according to the current network scene;
and the frequency band switching unit is used for establishing connection with the WiFi dual-frequency equipment according to the selected frequency band if the selected frequency band is different from the frequency band currently connected to the WiFi dual-frequency equipment.
In one possible implementation, the connection selection condition includes at least one of:
the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is the same;
the difference between the signal intensities of the two frequency bands of the WiFi dual-frequency equipment is smaller than a set intensity difference threshold value;
the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is larger than or equal to the corresponding connection intensity threshold value.
In a possible implementation manner, the terminal connection number is the maximum terminal connection number accommodated in a frequency band where the terminal is currently connected with the WiFi dual-frequency device;
the scene determination unit is further configured to:
and the terminal determines the terminal connection quantity of the WiFi dual-frequency equipment according to the subnet mask of the frequency band currently connected with the WiFi dual-frequency equipment.
In a possible implementation manner, the frequency bands of the WiFi dual-frequency device include a 2.4GHz frequency band, and the number of terminal connections is the number of terminals connected to the 2.4GHz frequency band of the WiFi dual-frequency device;
the scene determination unit is further configured to:
if the current frequency band connected with the WiFi dual-frequency equipment is a 2.4GHz frequency band, the terminal takes each IP address included in the 2.4GHz frequency band as a target IP address of an ARP request respectively and broadcasts the ARP request;
and the terminal determines the terminal connection number of the WiFi dual-frequency equipment according to the number of the received reply messages.
In a possible implementation manner, the scene determining unit is further configured to:
the terminal judges whether the terminal connection number is larger than a set connection number threshold value or not;
if so, determining that the current network scene is a working scene;
if not, determining that the current network scene is a family scene.
In a possible implementation manner, the scene determining unit is further configured to:
it is periodically determined whether a connection selection condition is satisfied.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any one of the WiFi connection methods in the first aspect are implemented.
For technical effects brought by any one implementation manner in the second aspect to the fourth aspect, reference may be made to technical effects brought by a corresponding implementation manner in the first aspect, and details are not described here.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is an application scenario diagram of a WiFi connection method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a WiFi connection method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating another WiFi connection method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating another WiFi connection method according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating another WiFi connection method according to an embodiment of the present invention;
fig. 6 is a block diagram of a terminal according to an embodiment of the present invention;
fig. 7 is a block diagram of another terminal according to an embodiment of the present invention;
fig. 8 is a block diagram of another terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the following application scenarios described in the embodiments of the present invention are for more clearly illustrating the technical solutions of the embodiments of the present invention, and do not constitute limitations on the technical solutions provided in the embodiments of the present invention, and it is known by those skilled in the art that with the occurrence of new application scenarios, the technical solutions provided in the embodiments of the present invention are also applicable to similar technical problems.
In recent years, smart phones and tablet computers are used more and more frequently, and users can move the terminals to any position on hands compared with desktop computers which are difficult to move, so that the use is more flexible and convenient. One of the popular factors for smartphones and tablets is the support of wireless networks, which can ensure that users can still access the network while moving tablets and smartphones. Existing wireless networks include cellular networks and WiFi networks, wherein the cellular networks are provided by mobile operators, basically charge per flow, and therefore are relatively expensive to use. More users can select a WiFi network more, only one wireless router is needed, the users can expand the WiFi network on the basis of the wired network, and the use cost of the wired network is far lower than that of a cellular network, so that many users can use the WiFi network in the place covered by the WiFi network, and the use cost of the network is reduced.
Fig. 1 shows a network architecture diagram of a WiFi network, in the network scenario shown in fig. 1, a plurality of terminals commonly access a WiFi dual-band device 100. The WiFi dual band device 100 can provide access points of 2.4GHz band and 5GHz band at the same time, wherein the frequency of the 2.4GHz band is between 2.400GHz and 2.4835GHz, and the frequency of the 5GHz band is about 5.8 GHz. The WiFi dual-band device 100 may be a wireless router, or may also be other dual-band access points, such as a dual-band hotspot provided by an intelligent terminal.
The terminals 201 to 206 connected to the WiFi dual-band device 100 may be terminals only supporting 2.4GHz band, terminals only supporting 5GHz band, or terminals simultaneously supporting 2.4GHz band and 5GHz band. For example, the terminal 201 in fig. 1 may be a smart phone supporting both a 2.4GHz band and a 5GHz band, the terminal 202 may be a desktop computer supporting only the 2.4GHz band, the terminal 203 may be a tablet computer supporting both the 2.4GHz band and the 5GHz band, the terminal 204 may be a television supporting only the 2.4GHz band, the terminal 205 may be a portable computer supporting only the 5GHz band, and the terminal 206 may be a smart phone supporting only the 5GHz band.
In practical use, the 2.4GHz band and the 5GHz band have respective advantages and disadvantages: the bandwidth supported by the 2.4GHz frequency band is relatively narrow, the transmission speed is relatively slow, but the frequency is relatively small, so that the attenuation is small, the penetration capability is strong, and the coverage range is wide. The 5GHz frequency band supports wide bandwidth and high transmission speed, but the frequency is relatively high, the attenuation is large, the penetration capability is weak, and the coverage range is relatively small.
The terminal supporting both the 2.4GHz band and the 5GHz band can establish connection with the WiFi dual-band device 100 on the 2.4GHz band, can also establish connection with the WiFi dual-band device 100 on the 5GHz band, and can switch between the two bands. Existing terminals typically switch between the two frequency bands according to changes in signal strength in the 2.4GHz band or the 5GHz band.
In the using process, the inventor finds that in some working scenarios, the network speed of the terminal may be affected due to the fact that the number of terminals connected on the same frequency band is too large. Taking the terminal 201 that supports both the 2.4GHz band and the 5GHz band as an example for explanation, in an office scenario, there may be many terminals that only support the 2.4GHz band, that is, the number of terminals connected to the 2.4GHz band may be much larger than the number of terminals connected to the 5GHz band. In this case, if the terminal 201 detects that the signal strength of the 2.4GHz band provided by the WiFi dual-band device is slightly better than the signal strength of the 5GHz band, and the terminal 201 also selects to connect the 2.4GHz band, it is likely that the terminal 201 needs to compete with other multiple terminals for bandwidth resources of the 2.4GHz band due to the excessive number of terminals connected to the 2.4GHz band, and therefore the network speed of the terminal 201 is affected.
Based on this, the embodiment of the invention provides a WiFi connection method, a terminal and a storage medium. By adopting the WiFi connection method provided by the embodiment of the invention, after the terminal meets the connection selection condition, the terminal connection number of the WiFi dual-frequency equipment which is currently connected is determined, the current network scene is determined according to the terminal connection number, and the frequency band which is connected with the WiFi dual-frequency equipment is selected according to the current network scene, so that the situation that the number of the terminals which are connected to the same frequency band is too large in a specific network scene, the terminals compete for bandwidth resources with other too large terminals, and the network speed of the terminal is influenced due to the fact that the obtained bandwidth resources are less can be avoided. Meanwhile, the bandwidth resources of each frequency band provided by the WiFi dual-frequency equipment can be utilized more uniformly.
In one embodiment, a WiFi connection method is provided, which may be applied to a terminal that can support both a 2.4GHz band and a 5GHz band, such as a smart phone, a tablet computer, and a portable computer. As shown in fig. 2, the method comprises the steps of:
step S201, after meeting the connection selection condition, determining the terminal connection number of the WiFi dual-frequency equipment which is currently connected;
the terminal can establish connection with the WiFi dual-frequency device on the 2.4GHz frequency band or the 5GHz frequency band, and can also switch between the two frequency bands after the connection is established.
When determining whether the handover is required, the terminal may determine whether the connection selection condition is satisfied according to the signal strengths of the two frequency bands of the WiFi dual-band device. If the terminal cannot determine the frequency bands to be connected according to the signal intensity of the two frequency bands of the WiFi dual-frequency device, the terminal considers that the connection selection condition is met, and then the terminal connection number of the WiFi dual-frequency device which is currently connected is determined.
Illustratively, the connection selection condition may include at least one of: the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is the same; the difference between the signal intensities of the two frequency bands of the WiFi dual-frequency equipment is smaller than a set intensity difference threshold value; the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is larger than or equal to the corresponding connection intensity threshold value.
Specifically, in some embodiments, the terminal may first compare the signal strengths of the two frequency bands of the WiFi dual-frequency device, and establish a connection with the WiFi dual-frequency device through the frequency band with the stronger signal strength. If the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is the same, the frequency band to be connected cannot be determined, and then the terminal connection number of the WiFi dual-frequency equipment which is currently connected is determined.
In other embodiments, if the signal strength of the frequency band to which the terminal is currently connected is significantly weaker than the signal strength of the other frequency band, and the difference between the signal strengths of the two frequency bands exceeds a set strength difference threshold, the terminal determines to switch to the other frequency band. And if the signal intensity of the frequency band currently connected with the terminal is obviously stronger than that of the other frequency band, and the difference of the signal intensities of the two frequency bands exceeds a set intensity difference threshold, the terminal determines to continue to be connected with the current frequency band. If the difference between the signal strengths of the two frequency bands of the WiFi dual-frequency device is smaller than the set strength difference threshold, the frequency band to be connected cannot be determined, and then the terminal connection number of the WiFi dual-frequency device connected at present is determined.
In other embodiments, the 2.4GHz band and the 5GHz band are respectively and correspondingly provided with a connection strength threshold, and if the signal strength of a certain band reaches the corresponding connection strength threshold, it is indicated that the band can be connected to the certain band. When the signal strength of the two frequency bands of the WiFi dual-frequency device is greater than or equal to the respective corresponding connection strength threshold, the WiFi dual-frequency device may be connected to any one of the two frequency bands. The terminal cannot determine the frequency band to be connected, and at this time, the terminal connection number of the WiFi dual-frequency device currently connected can be determined.
The terminal connection number can be the maximum terminal connection number contained in the frequency band of the terminal currently connected with the WiFi dual-frequency device, and can also be the terminal number connected on the 2.4GHz frequency band of the WiFi dual-frequency device.
And step S202, determining the current network scene according to the terminal connection number.
Network scenarios may include, but are not limited to, work scenarios and home scenarios, among others.
In an optional embodiment, considering that the number of terminals that can be accommodated by each frequency band of the WiFi dual-frequency device in a working scene is greater than the number of terminals that can be accommodated by each frequency band of the WiFi dual-frequency device in a home scene, it may be distinguished whether the working scene or the home scene is according to the maximum terminal connection number that is accommodated by the frequency band where the terminal is currently connected to the WiFi dual-frequency device. If a connection number threshold can be preset, if the maximum terminal connection number contained in the current frequency band is greater than the set connection number threshold; it is considered as a work scene, otherwise it is considered as a home scene.
In another alternative embodiment, considering that there are more terminals only supporting the 2.4GHz band in the working scenario, the number of terminals connected to the 2.4GHz band is greater. In a home scene, more terminals only supporting the 5GHz band are provided, or the number of terminals capable of supporting the 2.4GHz band is equivalent to that of terminals capable of supporting the 5GHz band. Therefore, whether the terminal is a work scene or a family scene can be distinguished according to the number of the terminals connected to the 2.4GHz frequency band of the WiFi dual-frequency device. If a connection number threshold value can be preset, if the number of the terminals connected to the 2.4GHz frequency band is larger than the set connection number threshold value; it is considered as a work scene, otherwise it is considered as a home scene.
And step S203, selecting a frequency band connected with the WiFi dual-frequency equipment according to the current network scene.
In different network scenarios, the frequency band to which the WiFi dual-frequency device is connected may be selected based on different selection criteria.
For example, in a working scene, the number of terminals generally connected to the 2.4GHz band is large, and thus the network bandwidth competition is severe; meanwhile, in a working scene, obstacles in a certain space are fewer, the signal attenuation of the 5GHz frequency band is smaller, and the signal quality is better, so that in the working scene, the 5GHz frequency band can be preferentially selected and connected to obtain a faster data transmission speed.
In a home scene, the number of terminals connected to the 2.4GHz band is equal to that of terminals connected to the 5GHz band, even the number of terminals connected to the 5GHz band is greater than that of terminals connected to the 2.4GHz band, but in the home scene, there are more obstacles (such as bearing walls) in a certain space, and the signal attenuation of the 5GHz band is large, so that in the home scene, the 2.4GHz band can be preferentially selected for connection. For example, a wireless router is generally used as a WiFi dual-band device in a home scene, and if the wireless router is arranged in a living room, and when a terminal in a bedroom establishes a connection with the wireless router on a 5GHz frequency band, since a signal of the 5GHz frequency band is weak in wall-penetrating capability, signal attenuation in the bedroom is large, and at this time, if the terminal switches the connection with the wireless router to a 2.4GHz frequency band, better connection experience can be obtained.
Step S204, judging whether the selected frequency band is the same as the frequency band currently connected to the WiFi dual-frequency equipment; if yes, ending; if not, step S205 is performed.
And step S205, establishing connection with the WiFi dual-frequency equipment according to the selected frequency band.
If the selected frequency band is the same as the frequency band currently connected to the WiFi dual-frequency equipment, the frequency band does not need to be switched, if the selected frequency band is different from the frequency band currently connected to the WiFi dual-frequency equipment, the selected frequency band is switched, and connection is established with the WiFi dual-frequency equipment according to the selected frequency band.
According to the WiFi connection method provided by the embodiment of the invention, after the terminal meets the connection selection condition, the terminal connection number of the WiFi dual-frequency equipment which is currently connected is determined, the current network scene is determined according to the terminal connection number, and the frequency band which is connected with the WiFi dual-frequency equipment is selected according to the current network scene, so that the situation that the number of the terminals which are connected to the same frequency band is too large in a specific network scene, the terminals compete for bandwidth resources with other too large terminals, and the network speed of the terminal is influenced due to the fact that the obtained bandwidth resources are less can be avoided. Meanwhile, the bandwidth resources of each frequency band provided by the WiFi dual-frequency equipment can be utilized more uniformly.
Fig. 2 only shows a specific process of completing one frequency band switching by the terminal, and during the period that the terminal is connected with the WiFi dual-frequency device, the terminal may periodically determine whether the frequency band switching is needed.
For better understanding, the following describes specific implementations of two WiFi connection methods by taking the terminal 201 in fig. 1 as an example. One specific implementation is shown in fig. 3, and includes the following steps:
step S301, after connecting the WiFi dual-band device, acquiring signal strengths of two frequency bands of the WiFi dual-band device according to a set time interval.
Step S302, judging whether the difference between the signal intensities of the two frequency bands is smaller than a set intensity difference threshold value; if yes, go to step S304; if not, step S303 is performed.
After the terminal 201 is connected to the WiFi dual-band device, the signal intensities of the two frequency bands of the WiFi dual-band device are periodically monitored, the difference between the signal intensities of the two frequency bands is calculated, and whether the difference is smaller than a set intensity difference threshold is determined. Illustratively, the intensity difference threshold may be 10 dB.
Step S303, select a frequency band with stronger signal strength from the two frequency bands.
And if the difference value of the signal intensities of the two frequency bands is not less than the set intensity difference threshold value, selecting the frequency band with stronger signal intensity in the two frequency bands.
Step S304, judging whether the frequency band currently connected with the WiFi dual-frequency equipment is a 2.4GHz frequency band; if yes, go to step S305; if not, the process is ended.
If the frequency band connected with the WiFi dual-frequency device is the 5GHz frequency band and the difference between the signal intensity of the 5GHz frequency band and the signal intensity of the 2.4GHz frequency band is not large, the device can be continuously connected to the 5GHz frequency band without switching the frequency bands. If the frequency band currently connected with the WiFi dual-frequency device is the 2.4GHz frequency band, step S305 is executed.
Step S305, determining the number of the terminals connected to the 2.4GHz frequency band of the WiFi dual-frequency device.
If the current frequency band connected to the WiFi dual-frequency device is the 2.4GHz frequency band, the terminal 201 uses each IP (Internet Protocol) Address included in the 2.4GHz frequency band as a target IP Address of an ARP (Address Resolution Protocol) request, broadcasts the ARP request, and determines the number of terminals connected to the 2.4GHz frequency band of the WiFi dual-frequency device according to the number of received reply messages.
For example, if the subnet mask of the 2.4GHz band is 255.255.255.0, the 2.4GHz band includes 256 IP addresses of 255.255.255.0 to 255.255.255.255.255, and each IP address is used as a target IP address of the ARP request to broadcast the ARP request. For example, the terminal 201 broadcasts an ARP request with the IP address 255.255.255.1 as the target IP address of the ARP request, and all terminals connected to the 2.4GHz band can receive the ARP request. If there is a terminal with IP address 255.255.255.1, the terminal will return a reply message to terminal 201, and if there is no terminal with IP address 255.255.255.1, terminal 201 will not receive the reply message. Therefore, the terminal 201 may determine the number of terminals connected to the 2.4GHz band of the WiFi dual-band device according to the number of received reply messages. Specifically, the terminal 201 may update the ARP table according to the received reply message, and if the terminal 201 does not receive the reply message for a certain target IP address, the target IP address is not added to the ARP table or the original target IP address in the ARP table is deleted. After the ARP requests are all broadcast by respectively taking each IP address as a target IP address of the ARP request, the terminal may determine the number of the received reply messages according to the ARP table, and take the number of the received reply messages as the number of terminals connected to the 2.4GHz band of the WiFi dual-band device, which may accurately determine the number of terminals connected to the 2.4GHz band of the WiFi dual-band device.
And S306, determining the current network scene according to the number of the terminals connected to the 2.4GHz frequency band.
Because more terminals only supporting the 2.4GHz frequency band exist in the working scene, the number of terminals connected to the 2.4GHz frequency band is larger. In a home scene, more terminals only supporting the 5GHz band are provided, or the number of terminals capable of supporting the 2.4GHz band is equivalent to that of terminals capable of supporting the 5GHz band. Therefore, whether the terminal is a work scene or a family scene can be distinguished according to the number of the terminals connected to the 2.4GHz frequency band of the WiFi dual-frequency device. If a first connection number threshold value can be preset, judging whether the number of the terminals connected to the 2.4GHz frequency band is greater than the first connection number threshold value; if so, the operation scene is considered; if not, the scene is considered as a family scene.
And step S307, selecting a frequency band connected with the WiFi dual-frequency equipment according to the current network scene.
If the current network scene is a working scene, the 5GHz frequency band can be preferentially selected for connection so as to obtain a faster data transmission speed. If the current network scene is a home scene, the 2.4GHz frequency band can be preferentially selected for connection so as to obtain better connection experience.
Step S308, judging whether the selected frequency band is the same as the frequency band currently connected to the WiFi dual-frequency equipment; if yes, ending; if not, step S309 is performed.
And step S309, establishing connection with the WiFi dual-frequency equipment according to the selected frequency band.
If the selected frequency band is the same as the frequency band currently connected to the WiFi dual-frequency device, frequency band switching is not needed. And if the selected frequency band is different from the frequency band currently connected to the WiFi dual-frequency equipment, switching the frequency band, and establishing connection with the WiFi dual-frequency equipment according to the selected frequency band.
Another specific implementation is shown in fig. 4, and includes the following steps:
step S401, after connecting the WiFi dual-frequency device, acquiring signal strengths of two frequency bands of the WiFi dual-frequency device according to a set time interval.
Step S402, judging whether the signal intensities of the two frequency bands are the same; if yes, go to step S404; if not, step S403 is performed.
After the terminal 201 is connected to the WiFi dual-band device, the signal intensities of the two frequency bands of the WiFi dual-band device are periodically monitored, and whether the signal intensities of the two frequency bands are the same is determined.
Step S403, select a frequency band with stronger signal strength from the two frequency bands.
Step S404, determining the maximum terminal connection number accommodated in the frequency band currently connected to the WiFi dual-frequency device.
Step S405, determining the current network scene according to the maximum terminal connection number contained in the current frequency band.
Generally, each frequency band of WiFi dual-frequency equipment in a home scene can accommodate 256 terminals at most, and a subnet mask is 255.255.255.0; each frequency band of the WiFi dual frequency device in the working scenario can accommodate more terminals, and the subnet mask is 255.255.xxx.0, where xxx is less than 255. Therefore, the terminal can determine the maximum terminal connection number contained in the currently connected frequency band according to the subnet mask of the frequency band currently connected with the WiFi dual-frequency device, and distinguish a working scene or a family scene according to the maximum terminal connection number contained in the currently connected frequency band. If a second connection number threshold value can be preset, judging whether the maximum terminal connection number contained in the current connected frequency band is larger than the second connection number threshold value; if so, the operation scene is considered; if not, the scene is considered as a family scene. The second connection number threshold may be the same as or different from the first connection number threshold. This approach may allow for a fast determination of the network scenario.
Step S406, selecting a frequency band connected with the WiFi dual-frequency device according to the current network scene.
If the current network scene is a working scene, the 5GHz frequency band can be preferentially selected for connection so as to obtain a faster data transmission speed. If the current network scene is a home scene, the 2.4GHz frequency band can be preferentially selected for connection so as to obtain better connection experience.
Step S407, judging whether the selected frequency band is the same as the frequency band currently connected to the WiFi dual-frequency equipment; if yes, ending; if not, step S408 is performed.
And step S408, establishing connection with the WiFi dual-frequency equipment according to the selected frequency band.
If the selected frequency band is the same as the frequency band currently connected to the WiFi dual-frequency device, frequency band switching is not needed. And if the selected frequency band is different from the frequency band currently connected to the WiFi dual-frequency equipment, switching the frequency band, and establishing connection with the WiFi dual-frequency equipment according to the selected frequency band.
Based on the foregoing embodiments, an embodiment of the present invention further provides a WiFi connection method, as shown in fig. 5, where the method includes the following steps:
step S501, after connecting the WiFi dual-frequency device, acquiring signal strengths of two frequency bands of the WiFi dual-frequency device according to a set time interval.
Step S502, judging whether the signal intensities of the two frequency bands of the WiFi dual-frequency equipment are both larger than or equal to the corresponding connection intensity threshold value; if yes, go to step S504; if not, step S503 is executed.
In this embodiment, the 2.4GHz band and the 5GHz band are respectively and correspondingly provided with a connection strength threshold, and if the signal strength of the 2.4GHz band reaches the corresponding connection strength threshold, it is indicated that the 2.4GHz band can be connected. If the signal strength of the 5GHz band reaches the corresponding connection strength threshold value, the connection to the 5GHz band is indicated.
When the signal strengths of the two frequency bands of the WiFi dual-band device are both greater than or equal to the respective corresponding connection strength thresholds, the terminal cannot determine the frequency band to be connected, and then step S504 is executed.
In step S503, the frequency band with the signal strength greater than or equal to the corresponding connection strength threshold is selected.
And step S504, determining the terminal connection number of the WiFi dual-frequency equipment which is currently connected.
Alternatively, the terminal connection number may be the maximum terminal connection number accommodated in the frequency band to which the terminal is currently connected to the WiFi dual-frequency device. The terminal can determine the terminal connection number of the WiFi dual-frequency device according to the subnet mask of the frequency band currently connected with the WiFi dual-frequency device.
The terminal connection number can also be the number of terminals connected on the 2.4GHz band of the WiFi dual-band device. If the current frequency band connected with the WiFi dual-frequency device is the 2.4GHz frequency band, the terminal may use each IP address included in the 2.4GHz frequency band as a target IP address of the ARP request, and broadcast the ARP request, and determine the terminal connection number of the WiFi dual-frequency device according to the number of the received reply messages.
Step S505, judging whether the terminal connection number is larger than a set connection number threshold value; if yes, go to step S506; if not, step S507 is executed.
If the terminal connection number may be the maximum terminal connection number accommodated by the frequency band in which the terminal is currently connected to the WiFi dual-frequency device, when the maximum terminal connection number accommodated by the current frequency band in which the terminal is connected is greater than the set connection number threshold, it is considered as a working scene, and step S506 is executed. When the maximum terminal connection number accommodated in the current frequency band to which the terminal is connected is not greater than the set connection number threshold, it is considered as a home scene, and step S507 is executed.
If the number of the connected terminals is the number of the terminals connected to the 2.4GHz band of the WiFi dual-band device, when the number of the terminals connected to the 2.4GHz band is greater than the set connection number threshold, it is considered as a working scene, and step S506 is executed. And when the number of the terminals connected to the 2.4GHz frequency band is not more than the set connection number threshold, the scene is regarded as a family scene, and step S507 is executed.
And step S506, selecting a frequency band connected with the WiFi dual-frequency equipment according to a grading rule in a working scene.
And under the working scene, respectively counting the network score of the 2.4GHz frequency band and the network score of the 5GHz frequency band according to the scoring rule under the working scene. For example, in the scoring rule in the working scenario, a fixed subtraction value may be set for the 2.4GHz band, and a fixed subtraction value may be set for the 5GHz band. The fixed derating value is a negative value and the fixed adding value is a positive value.
When the network scores of the two frequency bands are counted, a first score of the 2.4GHz frequency band is determined according to the signal strength of the 2.4GHz frequency band, a second score of the 2.4GHz frequency band is determined according to the time length of the last connection on the 2.4GHz frequency band, and the sum or the weighted sum of the first score, the second score and the fixed subtraction value is used as the network score of the 2.4GHz frequency band. And determining a third score of the 5GHz frequency band according to the signal strength of the 5GHz frequency band, determining a fourth score of the 5GHz frequency band according to the time length of the last connection on the 5GHz frequency band, and taking the sum or the weighted sum of the third score, the fourth score and the fixed sum value as the network score of the 5GHz frequency band.
And comparing the network score of the 2.4GHz frequency band with the network score of the 5GHz frequency band, and taking the frequency band with higher network score as the frequency band connected with the WiFi dual-frequency equipment.
And step S507, selecting a frequency band connected with the WiFi dual-frequency equipment according to a grading rule in a family scene.
And in the family scene, respectively counting the network score of the 2.4GHz frequency band and the network score of the 5GHz frequency band according to the scoring rule in the family scene. For example, in the scoring rule in the home scenario, a fixed subtraction value may not be set for the 2.4GHz band, and a fixed subtraction value may not be set for the 5GHz band.
When the network scores of the two frequency bands are counted, a first score of the 2.4GHz frequency band is determined according to the signal strength of the 2.4GHz frequency band, a second score of the 2.4GHz frequency band is determined according to the time length of the latest connection on the 2.4GHz frequency band, and the sum or the weighted sum of the first score and the second score is used as the network score of the 2.4GHz frequency band. In an optional embodiment, a fixed bonus value may also be set for the 2.4GHz band, and the sum or the weighted sum of the first score, the second score and the fixed bonus value is taken as the network score of the 2.4GHz band.
And determining a third score of the 5GHz frequency band according to the signal strength of the 5GHz frequency band, determining a fourth score of the 5GHz frequency band according to the time length of the last connection on the 5GHz frequency band, and taking the sum or weighted sum of the third score and the fourth score as the network score of the 5GHz frequency band.
And comparing the network score of the 2.4GHz frequency band with the network score of the 5GHz frequency band, and taking the frequency band with higher network score as the frequency band connected with the WiFi dual-frequency equipment.
Step S508, judge whether the frequency band selected is the same as frequency band connected to WiFi dual-band apparatus at present; if yes, ending; if not, step S509 is performed.
Step S509, establishing a connection with the WiFi dual-band device according to the selected frequency band.
According to the WiFi connection method, the frequency band to be connected can be selected according to a network scene, the 5GHz frequency band is preferentially selected in a working scene, and the 2.4GHz frequency band is preferentially selected in a home scene.
Based on the same inventive concept, the embodiment of the invention also provides a terminal. As shown in fig. 6, the terminal includes:
a scene determining unit 601, configured to determine the terminal connection number of a WiFi dual-band device currently connected after a connection selection condition is satisfied; determining the current network scene according to the terminal connection quantity;
a frequency band selecting unit 602, configured to select a frequency band connected to the WiFi dual-frequency device according to a current network scenario;
a frequency band switching unit 603, configured to establish a connection with the WiFi dual-frequency device according to the selected frequency band if the selected frequency band is different from the frequency band currently connected to the WiFi dual-frequency device.
In one possible implementation, the connection selection condition includes at least one of:
the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is the same;
the difference between the signal intensities of the two frequency bands of the WiFi dual-frequency equipment is smaller than a set intensity difference threshold value;
the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is larger than or equal to the corresponding connection intensity threshold value.
In a possible implementation manner, the terminal connection number is the maximum terminal connection number accommodated in a frequency band where the terminal is currently connected with the WiFi dual-frequency device;
the scene determining unit 601 is further configured to:
and the terminal determines the terminal connection quantity of the WiFi dual-frequency equipment according to the subnet mask of the frequency band currently connected with the WiFi dual-frequency equipment.
In a possible implementation manner, the frequency bands of the WiFi dual-frequency device include a 2.4GHz frequency band, and the number of terminal connections is the number of terminals connected to the 2.4GHz frequency band of the WiFi dual-frequency device;
the scene determining unit 601 is further configured to:
if the current frequency band connected with the WiFi dual-frequency equipment is a 2.4GHz frequency band, the terminal takes each IP address included in the 2.4GHz frequency band as a target IP address of an ARP request respectively and broadcasts the ARP request;
and the terminal determines the terminal connection number of the WiFi dual-frequency equipment according to the number of the received reply messages.
In a possible implementation manner, the scene determining unit 601 is further configured to:
the terminal judges whether the terminal connection number is larger than a set connection number threshold value or not;
if so, determining that the current network scene is a working scene;
if not, determining that the current network scene is a family scene.
In a possible implementation manner, the scene determining unit 601 is further configured to:
it is periodically determined whether a connection selection condition is satisfied.
After the terminal meets the connection selection condition, the terminal connection number of the WiFi dual-frequency equipment which is currently connected is determined, the current network scene is determined according to the terminal connection number, and the frequency band which is connected with the WiFi dual-frequency equipment is selected according to the current network scene, so that the situation that the number of the terminals which are connected to the same frequency band is too large in the specific network scene, the terminals compete for bandwidth resources with other too large terminals, and the network speed of the terminal is influenced due to the fact that the obtained bandwidth resources are few can be avoided. Meanwhile, the bandwidth resources of each frequency band provided by the WiFi dual-frequency equipment can be utilized more uniformly.
Based on the same inventive concept, the embodiment of the present invention also provides a terminal, as shown in fig. 7, which may include a memory 701 and a processor 702. Illustratively, the terminal may be a mobile phone, a computer, a tablet computer, a television, and the like.
A memory 701 for storing a computer program executed by the processor 702. The memory 701 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, such as an application program of a WiFi connection method, and the like; the storage data area may store data created according to the use of the terminal, such as various pictures, animation materials, and the like.
The memory 701 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 701 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or any other medium which can be used to carry or store desired program code in the form of instructions or data structures and which can be accessed by a computer. Memory 701 may be a combination of the above.
The processor 702 may include one or more Central Processing Units (CPUs), Graphics Processing Units (GPUs), or digital Processing units (dsps), among others. A processor 702, configured to implement the above-mentioned WiFi connection method when invoking the computer program stored in the memory 701.
The embodiment of the present invention does not limit the specific connection medium between the memory 701 and the processor 702. In fig. 7, the memory 701 and the processor 702 are connected by a bus 703, the bus 703 is represented by a thick line in fig. 7, and the connection manner between other components is merely illustrative and not limited. The bus 703 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
In an alternative embodiment, the terminal may further include other peripheral components. As shown in fig. 8, the terminal may further include: a Radio Frequency (RF) circuit 801, a power supply 802, an input unit 805, a display unit 806, a camera 807, a communication interface 808, and a Wireless Fidelity (WiFi) module 809. Those skilled in the art will appreciate that the structure of the terminal device shown in fig. 8 does not constitute a limitation of the terminal device, and the terminal device provided in the embodiments of the present application may include more or less components than those shown, or may combine some components, or may be arranged in different components.
The following describes each constituent element of the terminal in detail with reference to fig. 8:
the RF circuit 801 may be used for receiving and transmitting data during a communication or conversation. In particular, the RF circuit 801 sends data sent by a server to the processor 702 for processing; and in addition, sending the uplink data to be sent to the base station. Generally, the RF circuit 801 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
In addition, the RF circuitry 801 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The WiFi technology belongs to a short-distance wireless transmission technology, and the terminal can be connected to an Access Point (AP) through a WiFi module 809, thereby implementing Access to a data network. In the embodiment of the present invention, the WiFi module 809 can simultaneously support a 2.4GHz frequency band and a 5GHz frequency band, and is used for connecting with a WiFi dual-frequency device and receiving and sending data in a communication process.
The terminal may be physically connected to other devices via the communication interface 808. Optionally, the communication interface 808 is connected to the communication interface of the other device through a cable, so as to implement data transmission between the terminal and the other device.
In the embodiment of the present application, the terminal can implement a communication service and send information to other contacts, so the terminal needs to have a data transmission function, that is, the terminal needs to include a communication module inside. Although fig. 8 shows communication modules such as the RF circuit 801, the WiFi module 809, and the communication interface 808, it is understood that at least one of the above components or other communication modules (such as bluetooth module) for realizing communication exists in the terminal for data transmission.
For example, when the terminal is a mobile phone, the terminal may include the RF circuit 801 and may further include the WiFi module 809; when the terminal is a computer, the terminal may include the communication interface 808 and may further include the WiFi module 809; when the terminal is a tablet computer, the terminal may include the WiFi module.
The input unit 805 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the terminal.
Alternatively, the input unit 805 may include a touch panel 853 and other input devices 854.
The touch panel 853, also referred to as a touch screen, may collect touch operations performed by a user on or near the touch panel 853 (for example, operations performed by the user on or near the touch panel 853 using any suitable object or accessory such as a finger or a stylus), and implement corresponding operations according to a preset program, such as a gift selection by the user. Alternatively, the touch panel 853 may include two parts, i.e., a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 702, and can receive and execute commands sent by the processor 702. In addition, the touch panel 853 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave.
Optionally, the other input devices 854 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 806 may be used to display information input by a user or information provided to the user and various menus of the terminal. The display unit 806 is a display system of the terminal, and is configured to present an interface, such as a live view, to implement human-computer interaction.
The display unit 806 may include a display panel 861. Alternatively, the Display panel 861 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Further, the touch panel 853 may cover the display panel 861, and when the touch panel 853 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 702 to determine the type of the touch event, and then the processor 702 provides a corresponding visual output on the display panel 861 according to the type of the touch event.
Although in fig. 8, the touch panel 853 and the display panel 861 are two separate components to implement the input and output functions of the terminal, in some embodiments, the touch panel 853 and the display panel 861 may be integrated to implement the input and output functions of the terminal.
The camera 807 is used to implement the shooting function of the terminal, and to shoot pictures or videos. The camera 807 can also be used to implement a scanning function of the terminal, and scan a scanning object (two-dimensional code/barcode).
The terminal also includes a power supply 802 (such as a battery) for powering the various components. Optionally, the power supply 802 may be logically connected to the processor 702 through a power management system, so as to implement functions of managing charging, discharging, power consumption, and the like through the power management system.
Although not shown, the terminal may further include at least one sensor, an audio circuit, and the like, which will not be described herein.
The embodiment of the disclosure also provides a computer storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are used for implementing the data processing method described in the embodiment of the disclosure.
In some possible embodiments, various aspects of the methods provided by the present disclosure may also be implemented in the form of a program product including program code for causing a computer device to perform the steps of the methods according to various exemplary embodiments of the present disclosure described above in this specification when the program product is run on the computer device, for example, the computer device may perform the data processing methods described in the embodiments of the present disclosure.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (10)
1. A WiFi connection method, comprising:
after the terminal meets the connection selection condition, determining the terminal connection number of the currently connected wireless fidelity WiFi dual-frequency equipment;
the terminal determines the current network scene according to the terminal connection quantity;
the terminal selects a frequency band connected with the WiFi dual-frequency equipment according to the current network scene;
and if the selected frequency band is different from the frequency band currently connected to the WiFi dual-frequency equipment, the terminal establishes connection with the WiFi dual-frequency equipment according to the selected frequency band.
2. The method of claim 1, wherein the connection selection condition comprises at least one of:
the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is the same;
the difference between the signal intensities of the two frequency bands of the WiFi dual-frequency equipment is smaller than a set intensity difference threshold value;
the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is larger than or equal to the corresponding connection intensity threshold value.
3. The method of claim 1, wherein the terminal connection number is a maximum terminal connection number accommodated in a frequency band to which the terminal is currently connected with the WiFi dual-frequency device;
the terminal determining the terminal connection number of the WiFi dual-frequency equipment connected currently comprises the following steps:
and the terminal determines the terminal connection quantity of the WiFi dual-frequency equipment according to the subnet mask of the frequency band currently connected with the WiFi dual-frequency equipment.
4. The method of claim 1, wherein the frequency bands of the WiFi dual-frequency device comprise 2.4GHz frequency bands, and the number of terminal connections is the number of terminals connected on the 2.4GHz frequency band of the WiFi dual-frequency device;
the terminal determining the terminal connection number of the WiFi dual-frequency equipment connected currently comprises the following steps:
if the current frequency band connected with the WiFi dual-frequency equipment is a 2.4GHz frequency band, the terminal takes each Internet protocol IP address included in the 2.4GHz frequency band as a target IP address of an Address Resolution Protocol (ARP) request respectively and broadcasts the ARP request;
and the terminal determines the terminal connection number of the WiFi dual-frequency equipment according to the number of the received reply messages.
5. The method of claim 1, wherein the terminal determining a current network scenario from the number of terminal connections comprises:
the terminal judges whether the terminal connection number is larger than a set connection number threshold value or not;
if so, determining that the current network scene is a working scene;
if not, determining that the current network scene is a family scene.
6. The method of any one of claims 1 to 5, further comprising:
the terminal periodically determines whether a connection selection condition is satisfied.
7. A terminal comprising a memory and a processor, the memory having stored thereon a computer program operable on the processor, the computer program, when executed by the processor, causing the processor to perform the steps of:
after the connection selection condition is met, determining the terminal connection number of the currently connected wireless fidelity WiFi dual-frequency equipment;
determining the current network scene according to the terminal connection quantity;
selecting a frequency band connected with the WiFi dual-frequency equipment according to the current network scene;
and if the selected frequency band is different from the frequency band currently connected to the WiFi dual-frequency equipment, establishing connection with the WiFi dual-frequency equipment according to the selected frequency band.
8. The terminal of claim 7, wherein the connection selection condition comprises at least one of:
the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is the same;
the difference between the signal intensities of the two frequency bands of the WiFi dual-frequency equipment is smaller than a set intensity difference threshold value;
the signal intensity of the two frequency bands of the WiFi dual-frequency equipment is larger than or equal to the corresponding connection intensity threshold value.
9. A terminal, comprising:
the scene determining unit is used for determining the terminal connection number of the currently connected wireless fidelity WiFi dual-frequency equipment after the connection selection condition is met; determining the current network scene according to the terminal connection quantity;
the frequency band selection unit is used for selecting a frequency band connected with the WiFi dual-frequency equipment according to the current network scene;
and the frequency band switching unit is used for establishing connection with the WiFi dual-frequency equipment according to the selected frequency band if the selected frequency band is different from the frequency band currently connected to the WiFi dual-frequency equipment.
10. A computer-readable storage medium having a computer program stored therein, the computer program characterized by: the computer program, when executed by a processor, implements the method of any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910720804.1A CN112351464B (en) | 2019-08-06 | 2019-08-06 | WiFi connection method, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910720804.1A CN112351464B (en) | 2019-08-06 | 2019-08-06 | WiFi connection method, terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112351464A true CN112351464A (en) | 2021-02-09 |
CN112351464B CN112351464B (en) | 2022-08-19 |
Family
ID=74366402
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910720804.1A Active CN112351464B (en) | 2019-08-06 | 2019-08-06 | WiFi connection method, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112351464B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115065958A (en) * | 2022-04-20 | 2022-09-16 | Oppo广东移动通信有限公司 | Device connection method, device, first device and computer readable storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103731881A (en) * | 2013-12-17 | 2014-04-16 | 福建伊时代信息科技股份有限公司 | Control method, device and system for WiFi access point |
CN106102131A (en) * | 2016-06-08 | 2016-11-09 | 上海斐讯数据通信技术有限公司 | A kind of wireless channel equalization method and system |
CN108235396A (en) * | 2018-01-02 | 2018-06-29 | 联想(北京)有限公司 | Wireless network access method and its electronic equipment |
CN108541024A (en) * | 2018-03-01 | 2018-09-14 | 深圳市共进电子股份有限公司 | A kind of frequency band control method, device, equipment and the storage medium of connection wireless aps |
-
2019
- 2019-08-06 CN CN201910720804.1A patent/CN112351464B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103731881A (en) * | 2013-12-17 | 2014-04-16 | 福建伊时代信息科技股份有限公司 | Control method, device and system for WiFi access point |
CN106102131A (en) * | 2016-06-08 | 2016-11-09 | 上海斐讯数据通信技术有限公司 | A kind of wireless channel equalization method and system |
CN108235396A (en) * | 2018-01-02 | 2018-06-29 | 联想(北京)有限公司 | Wireless network access method and its electronic equipment |
CN108541024A (en) * | 2018-03-01 | 2018-09-14 | 深圳市共进电子股份有限公司 | A kind of frequency band control method, device, equipment and the storage medium of connection wireless aps |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115065958A (en) * | 2022-04-20 | 2022-09-16 | Oppo广东移动通信有限公司 | Device connection method, device, first device and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN112351464B (en) | 2022-08-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109548075B (en) | Measurement report reporting method, device, storage medium and mobile terminal | |
US10285106B2 (en) | User equipment and method for ensuring continuous service reception in wireless network | |
EP3389300B1 (en) | Method and apparatus for identifying pseudo base-station, and terminal | |
CN106604314B (en) | WiFi roaming network access method and terminal equipment | |
CN108055687B (en) | Wireless network connection method and device and terminal equipment | |
EP2770701B1 (en) | Apparatus and method for providing a wireless communication in a portable terminal | |
CN110933704B (en) | Network communication method, device, storage medium and electronic equipment | |
CN106961710B (en) | Network access method and terminal | |
CN109565735A (en) | The methods, devices and systems of network connection management | |
CN108200618B (en) | Cell switching control method, device, storage medium and mobile terminal | |
CN109600791B (en) | Signal strength reporting method and device, storage medium and mobile terminal | |
CN111527767A (en) | Method and equipment for improving network performance | |
CN110602738B (en) | Network connection method and device and electronic device | |
CN110602707A (en) | Method and terminal for connecting wireless network | |
CN112351464B (en) | WiFi connection method, terminal and storage medium | |
CN112543493A (en) | Wifi connection method, terminal and computer storage medium | |
CN108307485B (en) | Wireless network scanning method and device, terminal equipment and storage medium | |
CN108337719B (en) | Wireless network scanning method and device, terminal equipment and storage medium | |
JP2023554356A (en) | Relay communication method and device | |
CN111314900B (en) | Wireless connection method, wireless connection device and mobile terminal | |
CN111988867A (en) | Communication method with limited radio resource control and terminal equipment | |
CN108337715B (en) | Wireless network connection method, device, terminal equipment and storage medium | |
CN108337718B (en) | Wireless network scanning method and device, terminal equipment and storage medium | |
CN110418326B (en) | Roaming switching method, central control equipment and client | |
CN108601063B (en) | Personal hotspot realization method and related product |
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 | ||
CP01 | Change in the name or title of a patent holder |
Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11 Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd. Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11 Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd. |
|
CP01 | Change in the name or title of a patent holder |