CN108770068B - WIFI frequency band selection method and device, storage medium and electronic equipment - Google Patents

WIFI frequency band selection method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN108770068B
CN108770068B CN201810564835.8A CN201810564835A CN108770068B CN 108770068 B CN108770068 B CN 108770068B CN 201810564835 A CN201810564835 A CN 201810564835A CN 108770068 B CN108770068 B CN 108770068B
Authority
CN
China
Prior art keywords
wifi
frequency band
parameter
established
wifi connection
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
CN201810564835.8A
Other languages
Chinese (zh)
Other versions
CN108770068A (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 CN201810564835.8A priority Critical patent/CN108770068B/en
Publication of CN108770068A publication Critical patent/CN108770068A/en
Application granted granted Critical
Publication of CN108770068B publication Critical patent/CN108770068B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation
    • H04W72/044Wireless resource allocation based on the type of the allocated resource
    • H04W72/0453Resources in frequency domain, e.g. a carrier in FDMA
    • 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 WIFI frequency band selection method, a device, a storage medium and electronic equipment, wherein the method comprises the steps of detecting whether a WIFI connection establishment request of an opposite end of a WIFI connection to be established is received; if the WIFI connection establishment request is detected to be received, acquiring parameter information; selecting a working frequency band of the WIFI according to the parameter information, wherein the working frequency band of the WIFI comprises a 2.4G frequency band and a 5G frequency band; the WIFI connection is established between the selected WIFI-based working frequency band and the opposite end of the WIFI connection to be established, so that the working frequency band of the WIFI can be automatically selected according to the parameter information, the automatic selection of the WIFI frequency band is realized, and the flexibility of the selection of the WIFI frequency band is improved.

Description

WIFI frequency band selection method and device, storage medium and electronic equipment
Technical Field
The application belongs to the technical field of communication, and particularly relates to a WIFI frequency band selection method and device, a storage medium and an electronic device.
Background
At present, many intelligent terminal products provide a WIFI P2P function or a WIFI SoftAP function, and the functional scenes based on the WIFI P2P are as follows: the wireless display projection mobile phone screen is connected with a television, a WLAN or files are transmitted, and the wireless display projection mobile phone screen has the following functional scenes based on WIFI SoftAP: the functions of the mobile phone are realized based on WIFI (wireless fidelity) as a personal hotspot connection to surf the internet, a mobile phone to move, or QQ flash transmission.
The general WIFI of the terminal supports a 2.4G frequency band and a 5G frequency band. Wherein, the characteristics of 2.4G frequency channel are: the wall penetrating capability is strong, and connection distance is far away, and connection stability is better when terminal and other terminal distance are far away, and remote network is better, and the characteristics of 5G frequency channel are: compared with a 2.4G frequency band, the wall-through capability is poor, the supported farthest connection distance is shorter, the stability is poor when the connection is in a long distance, the speed bandwidth is larger, and the network is better when the connection is in a short distance.
In the process of researching the prior art, the inventor of the present invention finds that the default frequency band used by the WIFI P2P function or the WIFI SoftAP function usually sets a fixed frequency band, such as a fixed 5G frequency band or a fixed 2.4G frequency band, so that a suitable frequency band cannot be flexibly selected.
Disclosure of Invention
The embodiment of the application provides a WIFI frequency band selection method and device, a storage medium and electronic equipment, which can automatically select a working frequency band connected with WIFI.
The embodiment of the application provides a WIFI frequency band selection method, which comprises the following steps:
detecting whether a WIFI connection establishment request of a WIFI connection opposite end to be established is received;
if the WIFI connection establishment request is detected to be received, parameter information is acquired;
selecting a working frequency band of WIFI according to the parameter information, wherein the working frequency band of the WIFI comprises a 2.4G frequency band and a 5G frequency band;
and establishing WIFI connection with the WIFI connection opposite end to be established based on the selected working frequency band of the WIFI.
The embodiment of the present application further provides a WIFI frequency band selection device, including:
the device comprises a detection unit, a processing unit and a processing unit, wherein the detection unit is used for detecting whether a WIFI connection establishment request of a WIFI connection opposite end to be established is received;
the acquisition unit is used for acquiring parameter information if the WIFI connection establishment request is detected to be received;
the selection unit is used for selecting the working frequency band of the WIFI according to the parameter information, wherein the working frequency band of the WIFI comprises a 2.4G frequency band and a 5G frequency band;
and the establishing unit is used for establishing WIFI connection with the WIFI connection opposite end to be established based on the selected working frequency band of the WIFI.
The embodiment of the present application further provides a storage medium, where a computer program is stored, and when the computer program is executed on a computer, the computer is enabled to execute the steps in the WIFI frequency band selection method provided in the 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 steps in the WIFI frequency band selection method provided in the embodiment of the present application by calling the computer program stored in the memory.
The method comprises the steps of detecting whether a WIFI connection establishment request of a WIFI connection opposite end to be established is received; if the received WIFI connection establishment request is detected, acquiring parameter information; selecting a working frequency band of WIFI according to the parameter information; the WIFI connection is established between the selected WIFI-based working frequency band and the opposite end of the WIFI connection to be established, so that the working frequency band of the WIFI can be automatically selected according to the parameter information, the automatic selection of the WIFI frequency band is realized, and the flexibility of the selection of the WIFI frequency band is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can also be derived from them without inventive effort.
Fig. 1 is a scene schematic diagram of a WIFI frequency band selection method provided in an embodiment of the present application.
Fig. 2 to 6 are schematic flow diagrams of a WIFI frequency band selection method provided in an embodiment of the present application.
Fig. 7 is a schematic structural diagram of a WIFI frequency band selection device according to an embodiment of the present application.
Fig. 8a to 8e are schematic partial structural views of a WIFI frequency band selection device according to an embodiment of the present application.
Fig. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Fig. 10 is another schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present application.
It should be noted that the WIFI frequency band selection method in the embodiment of the present application is applicable to a scenario based on the WIFI P2P function and the WIFI SoftAP function, and specifically, the application will be specifically introduced in detail by taking an example of applying the WIFI frequency band selection method to the WIFI P2P function scenario and a certain function scenario, that is, a personal hotspot, in the WIFI SoftAP.
Particularly, when the method is applied to a scene based on a WIFI P2P function, for the WIFI P2P, as described in the method of the embodiment of the present application, the peer end to be connected with the WIFI sends a WIFI connection request to the terminal serving as the AP (not the AP, but only serving as the AP), or the terminal serving as the AP actively sends a WIFI connection request to the peer end to be connected with the WIFI, and if the peer end to be connected with the WIFI agrees to establish the WIFI connection, the WIFI connection between the terminal serving as the AP and the peer end to be connected with the WIIF can be directly established, so the WIFI frequency band selection method may further be:
sending a WIFI connection establishment request to a WIFI connection opposite end to be established, wherein the WIIF connection establishment request is used for requesting the WIFI connection opposite end to be established to allow the WIFI connection to be established;
detecting whether permission information sent by a WIFI connection opposite end to be established is received, wherein the permission information is information allowing the WIFI connection opposite end to be established to establish a WIFI connection request;
if the permission information sent by the WIFI connection opposite terminal to be established is received, acquiring parameter information;
selecting a working frequency band of WIFI according to the parameter information, wherein the working frequency band of the WIFI comprises a 2.4G frequency band and a 5G frequency band;
and establishing WIFI connection with the WIFI connection opposite end to be established based on the selected WIFI working frequency band.
Referring to fig. 1, fig. 1 is a schematic view of a scene of a WIFI frequency band selection method. The WIFI connection establishment request receiving terminal can detect whether a WIFI connection establishment request of a WIFI connection opposite terminal to be established is received or not; if the received WIFI connection establishment request is detected, acquiring parameter information; then selecting a working frequency band of the WIFI according to the parameter information, wherein the working frequency band of the WIFI comprises a 2.4G frequency band and a 5G frequency band; and finally, establishing WIFI connection with the WIFI connection opposite end to be established based on the selected working frequency band of the WIFI.
The embodiment of the application provides a WIFI frequency band selection method which can be applied to electronic equipment. The electronic equipment can be terminal equipment such as a smart phone and a tablet computer which support WIFI. Referring to fig. 2, the WIFI frequency band selection method may include the following steps:
110. and detecting whether a WIFI connection establishment request of a WIFI connection opposite end to be established is received.
The terminal supports personal hotspot and WIFI P2P functions, the WIFI P2P is a WIFI point-to-point connection technology, TCP/IP connection can be directly established between the two terminals supporting the WIFI, and an AP is not required to participate; the personal hotspot refers to converting GPRS, 3G or 4G signals received by the terminal into WIFI signals and sending the WIFI signals.
It should be noted that the terminal first starts a personal hotspot or a WIFI P2P function, and then detects whether a WIFI connection establishment request is received in a scene based on the function, where the WIFI connection establishment request is sent by a to-be-established WIFI connection opposite end.
The WIFI connection opposite end to be established firstly starts a WIFI searching function to search for the WIFI nearby, wherein the WIFI searching function can be started by clicking a WIFI icon on a touch screen with a finger, and after some WIFI nearby is searched by the WIFI connection opposite end to be established, one WIFI can be selected to send a WIFI connection establishment request. In this embodiment, it is assumed that the to-be-established WIFI connection opposite end sends a WIFI connection establishment request to the terminal, and the terminal detects that the WIFI connection establishment request is received.
In some embodiments, it is considered that a personal hotspot and the like may have authorization information, such as a password, and when a WIFI connection establishment request is sent to a terminal by a to-be-established WIFI connection opposite end, authorization information also needs to be sent to the terminal at the same time.
120. And if the received WIFI connection establishment request is detected, acquiring parameter information.
When the terminal detects that a WIFI connection establishment request sent by a WIFI connection opposite terminal to be established is received, parameter information can be obtained, wherein the parameter information can be a distance parameter or a signal intensity parameter.
In some embodiments, when the terminal detects that a WIFI connection establishment request is received, it may further detect whether authorization information sent by an opposite terminal to establish a WIFI connection is received, if it is detected that the authorization information sent by the opposite terminal to establish the WIFI connection is received, it is detected whether the authorization information is correct, if the authorization information is correct, parameter information is obtained, if the authorization information is incorrect, prompt information is generated, and the prompt information is sent to the opposite terminal to establish the WIFI connection, where the prompt is used to prompt that the authorization information of the opposite terminal to establish the WIFI connection is wrong.
130. And selecting the working frequency band of the WIFI according to the parameter information.
In this embodiment, the working frequency band of the WIFI includes a 2.4G frequency band and a 5G frequency band, or may be said, the terminal in this embodiment supports both the 2.4G frequency band and the 5G frequency band, the terminal may select the working frequency band of the WIFI established based on the terminal according to the distance parameter or the signal strength parameter, when the terminal opens the personal hotspot, the working frequency band of the personal hotspot is determined, when the terminal opens the WIFI P2P, the working frequency band of the WIFI P2P is determined, and then the terminal may select the 2.4G frequency band or the 5G frequency band as the personal hotspot or the working frequency band of the WIFI P2P according to the parameter information.
140. And establishing WIFI connection with the WIFI connection opposite end to be established based on the selected working frequency band of the WIFI.
When the 2.4G frequency band is selected, establishing WIFI connection with the opposite end to be established with the WIFI connection based on the 2.4G frequency band; and when the 5G frequency band is selected, establishing WIFI connection with the opposite end to be established based on the 5G frequency band.
As can be seen from the above, in the embodiment of the present application, whether a WIFI connection establishment request of a WIFI connection opposite end to be established is received is detected; if the WIFI connection establishment request is detected to be received, acquiring parameter information; selecting a working frequency band of WIFI according to the parameter information; the WIFI connection is established between the selected WIFI-based working frequency band and the opposite end of the WIFI connection to be established, so that the working frequency band of the WIFI can be automatically selected according to the parameter information, the automatic selection of the WIFI frequency band is realized, and the flexibility of the selection of the WIFI frequency band is improved.
The methods described in the above examples are further illustrated in detail by way of example. Referring to fig. 3 and fig. 4, a specific process of the WIFI frequency band selecting method of the present embodiment may be as follows:
110. and detecting whether a WIFI connection establishment request of a WIFI connection opposite end to be established is received.
The terminal supports personal hotspot and WIFI P2P functions, the WIFI P2P is a WIFI point-to-point connection technology, TCP/IP connection can be directly established between the two terminals supporting the WIFI, and an AP is not required to participate; the personal hotspot is to convert a GPRS, 3G or 4G signal received by the terminal into a WIFI signal and send the WIFI signal.
It should be noted that the terminal first starts a personal hotspot or a WIFI P2P function, and then detects whether a WIFI connection establishment request is received in a scene based on the function, where the WIFI connection establishment request is sent by a to-be-established WIFI connection opposite end.
The WIFI connection opposite end to be established firstly starts a WIFI searching function to search for the WIFI nearby, wherein the WIFI searching function can be started by clicking a WIFI icon on a touch screen with a finger, and after some WIFI nearby is searched by the WIFI connection opposite end to be established, one WIFI can be selected to send a WIFI connection establishment request. In this embodiment, assuming that the to-be-established WIFI connection peer sends a WIFI connection establishment request to the terminal, the terminal detects that the WIFI connection establishment request is received.
In some embodiments, considering that there may be authorization information, such as a password, set for a personal hotspot, and the like, when a WIFI connection establishment request is sent to a terminal by a peer end to which a WIFI connection is to be established, authorization information needs to be sent to the terminal at the same time.
1201. And if the received WIFI connection establishment request is detected, sending a data packet to the WIFI connection opposite end to be established, and recording the sending time.
1202. And receiving a data packet returned by the opposite end connected with the WIFI to be established, and recording the receiving time.
1203. And determining the time difference according to the sending time and the receiving time.
1204. And determining the distance between the WIFI connection terminal to be established and the opposite terminal to be established according to the time difference and the transmission rate of the electromagnetic waves, and obtaining the distance parameter.
In some embodiments, the distance parameter = (packet receive time-packet transmit time) electromagnetic wave transmission rate/2.
Therefore, after the WIFI connection establishment request is detected to be received, a data packet can be sent to the opposite end of the WIFI connection to be established, and meanwhile, the sending time is recorded; after the WIFI connection opposite terminal to be established receives the data packet, the data packet can be returned, the returned data packet can be received, the receiving time is recorded, the time difference can be determined according to the sending time and the receiving time, finally, the distance between the WIFI connection opposite terminal to be established and the electromagnetic wave transmission rate is combined according to the time difference, and the distance parameter is obtained. It can be understood that since the transmission packet and the reception packet pass through two transmission processes, when calculating the distance parameter, after multiplying the time difference by the electromagnetic wave transmission rate, it is necessary to further divide by 2.
In some embodiments, the data packet may be sent to the to-be-established WIFI connection opposite end first, sending time is recorded, then an instruction is sent to the to-be-established WIFI connection opposite end to obtain receiving time of the to-be-established WIFI connection opposite end for receiving the data packet, then a time difference may be determined according to the sending time and the receiving time, and then the time difference is multiplied by the transmission rate of the electromagnetic wave to obtain the distance parameter.
In some embodiments, when the terminal detects that a WIFI connection establishment request is received, whether authorization information sent by an opposite terminal to establish a WIFI connection is received or not can be detected, if the terminal detects that the authorization information sent by the opposite terminal to establish the WIFI connection is received, whether the authorization information is correct or not is detected, if the authorization information is correct, a data packet is sent to the opposite terminal to establish the WIFI connection, and sending time is recorded; receiving a data packet returned by the opposite end connected with the WIFI to be established, and recording the receiving time; determining a time difference according to the sending time and the receiving time; determining the distance between the WIFI connection opposite terminal to be established according to the time difference and the transmission rate of the electromagnetic waves to obtain distance parameters; and if the authorization information is incorrect, generating prompt information, and sending the prompt information to the WIFI connection opposite terminal to be established, wherein the prompt is used for prompting that the authorization information of the WIFI connection opposite terminal to be established is incorrect.
After the distance parameter is obtained, the working frequency band of the WIFI can be selected based on the distance parameter, and the working frequency band of the WIFI can be selected according to the following procedures:
1301. it is detected whether only one distance parameter is present.
1302. If only one distance parameter is detected, whether the distance parameter is lower than a preset threshold value is detected, if the distance parameter is detected to be lower than the preset threshold value, 1303 is executed, and if the distance parameter is detected to be not lower than the preset threshold value, 1304 is executed.
1303. The 5G band is selected.
1304. The 2.4G band is selected.
After obtaining the distance parameter, the operating frequency band of WIFI may also be selected according to the following procedure:
1311. it is detected whether only at least two distance parameters are present.
1312. And if the at least two distance parameters are detected to exist, selecting the maximum distance parameter from the at least two distance parameters to obtain the target distance parameter.
1313. Detecting whether the target distance parameter is lower than a preset threshold, if so, executing 1314, and if not, executing 1315.
1314. The 5G band is selected.
1315. The 2.4G band is selected.
1401. And establishing WIFI connection with the opposite end to be established with the WIFI connection based on the 5G frequency band.
1402. And establishing WIFI connection with the opposite end to be established in the WIFI connection based on the 2.4G frequency band.
It can be understood that there may be one or more than one WIFI connection counterpart to be established to send a WIFI connection establishment request, and therefore the obtained distance parameter may be one or more than one, however, the processing for one WIFI connection counterpart to be established and more than one WIFI connection counterpart to be established are different, and therefore it is necessary to detect whether there is only one distance parameter or whether there are at least two distance parameters.
When it is detected that only one distance parameter exists, it may be directly detected whether the distance parameter is lower than a preset threshold. It can be understood that, since the farthest connection distance supported by the 5G is shorter than that supported by the 2.4G, and the connection stability is poor in the case of long-distance connection, the 2.4G band may be selected in the case of long-distance connection, but the rate bandwidth of the 5G band is larger, and the network may be better than the 2.4G band in the case of short-distance connection, so that the 5G band may be selected in the case of short-distance connection. Therefore, a threshold value can be preset, when the distance parameter is lower than the threshold value, the 5G frequency band can be selected, and when the distance parameter is not lower than the threshold value, the 2.4G frequency band can be selected.
When at least two distance parameters are detected, in order to ensure that the WIFI connection can be established with each opposite end to be established with the WIFI connection, the working frequency band of the WIFI can be selected according to the distance between the opposite end to be established with the longest distance from the local end, the distance parameter with the largest distance parameter can be selected from the at least two distance parameters to obtain a target distance parameter, the working frequency band of the WIFI is selected according to the target distance parameter, when the target distance parameter is lower than the threshold value, the 5G frequency band can be selected, and when the target distance parameter is not lower than the threshold value, the 2.4G frequency band can be selected.
The threshold may be set according to an actual situation, that is, the threshold may be set to reach a distance limit of a 5G frequency band, or may still maintain relatively good network transmission when the threshold is maintained in a connection with the 5G frequency band, and so on, and here, no specific limitation is made, based on an actual requirement.
For example, the method of this embodiment may be implemented by the following procedure, where the WIFI frequency band selection method is applied to the terminal a as an example:
a user a opens a personal hotspot function on a terminal a, the terminal a can always detect whether a WIFI connection establishment request sent by a WIFI connection opposite end to be established is received, at the moment, a user b opens a WIFI search function to search for nearby WIFI, if the user b is within a certain range of the position of the user a, a WIFI signal based on a personal hotspot of the terminal a can be searched, then the user b can click and connect WIFI corresponding to the WIFI signal, the terminal b sends the WIFI connection establishment request to the terminal a, at the moment, the terminal a detects that the WIFI connection establishment request sent by the terminal b is received, and when the terminal a detects that the WIFI connection establishment request sent by the terminal b is received, a data packet can be sent to the terminal b, and sending time is recorded; after receiving the data packet, the terminal b returns a data packet to the terminal a, and then the terminal a receives the data packet returned by the terminal b and records the receiving time; determining a time difference according to the sending time and the receiving time; determining the distance from the terminal b according to the time difference and the transmission rate of the electromagnetic waves to obtain a distance parameter; then the terminal a detects whether only one distance parameter exists; only receiving a WIFI connection establishment request sent by the terminal b, so that the terminal a detects that only one distance parameter exists, and then detects whether the distance parameter is lower than a preset threshold value; if the distance parameter is detected to be lower than a preset threshold value, selecting a 5G frequency band; and if the detected distance parameter is not lower than the preset threshold, selecting the 2.4G frequency band. At this time, assuming that the distance parameter detected by the terminal a is lower than the preset threshold, the 5G frequency band is selected to establish the WIFI connection with the terminal b.
In some embodiments, if a plurality of terminals send WIFI connection establishment requests to the terminal a, the terminal a detects that at least two distance parameters exist, and at this time, the terminal a selects a working frequency band of WIFI by using the terminal with the largest distance parameter as a standard, so that each terminal sending the WIFI connection establishment request to the terminal a can establish WIFI connection with the terminal a. Therefore, if at least two distance parameters are detected to exist, the maximum distance parameter is selected from the at least two distance parameters to obtain a target distance parameter; detecting whether the target distance parameter is lower than a preset threshold value; if the target distance parameter is detected to be lower than a preset threshold value, selecting a 5G frequency band; and if the detected target distance parameter is not lower than the preset threshold, selecting the 2.4G frequency band.
As can be seen from the above, in the embodiment of the present application, whether a WIFI connection establishment request of an opposite end to establish a WIFI connection is received is detected; if the received WIFI connection establishment request is detected, acquiring parameter information; selecting a working frequency band of WIFI according to the parameter information; the WIFI connection is established between the selected WIFI-based working frequency band and the opposite end of the WIFI connection to be established, so that the working frequency band of the WIFI can be automatically selected according to the parameter information, the automatic selection of the WIFI frequency band is realized, and the flexibility of the selection of the WIFI frequency band is improved.
Please refer to fig. 5 and fig. 6 together, a specific process of the WIFI frequency band selection method of this embodiment may be as follows:
110. and detecting whether a WIFI connection establishment request of a WIFI connection opposite end to be established is received.
The terminal supports personal hotspot and WIFI P2P functions, the WIFI P2P is a WIFI point-to-point connection technology, TCP/IP connection can be directly established between the two terminals supporting the WIFI, and an AP is not required to participate; the personal hotspot is to convert a GPRS, 3G or 4G signal received by the terminal into a WIFI signal and send the WIFI signal.
It should be noted that the terminal first starts a personal hotspot or a WIFI P2P function, and then detects whether a WIFI connection establishment request is received in a scene based on the function, where the WIFI connection establishment request is sent by a to-be-established WIFI connection opposite end.
The method comprises the steps that a WIFI search function is firstly started by a WIFI connection opposite end to be established, WIFI nearby is searched, usually, a WIFI icon is clicked on a touch screen by a hand pointer to start WIFI search, and after some WIFI nearby WIFI are searched by the WIFI connection opposite end to be established, one WIFI can be selected to send a WIFI connection establishment request. In this embodiment, it is assumed that the to-be-established WIFI connection opposite end sends a WIFI connection establishment request to the terminal, and the terminal detects that the WIFI connection establishment request is received.
In some embodiments, it is considered that a personal hotspot and the like may have authorization information, such as a password, and when a WIFI connection establishment request is sent to a terminal by a to-be-established WIFI connection opposite end, authorization information also needs to be sent to the terminal at the same time.
1221. And if the received WIFI connection establishment request is detected, generating an instruction.
1222. And sending the instruction to the WIFI connection opposite terminal to be established.
1223. And receiving the signal intensity of the WIFI opposite terminal to be established returned by the WIFI opposite terminal to be established, and obtaining a signal intensity parameter.
After the received WIFI connection establishment request is detected, an instruction can be generated, the instruction is used for acquiring the signal intensity of the opposite end to be established in the WIFI connection, the instruction is sent to the opposite end to be established in the WIFI connection, the signal intensity of the opposite end to be established can be sent after the opposite end to be established receives the instruction, the local end can receive the returned signal intensity of the opposite end to be established in the WIFI connection, and signal intensity parameters are obtained.
In some embodiments, when the terminal detects that a WIFI connection establishment request is received, whether authorization information sent by an opposite terminal to be established with the WIFI connection is received or not can be detected, if the terminal detects that the authorization information sent by the opposite terminal to be established with the WIFI connection is received, whether the authorization information is correct or not is detected, if the authorization information is correct, an instruction is generated, and the instruction is sent to the opposite terminal to be established with the WIFI connection; receiving the signal intensity of the WIFI opposite terminal to be established returned by the WIFI opposite terminal to be established to obtain a signal intensity parameter; and if the authorization information is incorrect, generating prompt information, and sending the prompt information to the WIFI connection opposite terminal to be established, wherein the prompt is used for prompting that the authorization information of the WIFI connection opposite terminal to be established is incorrect.
After the signal intensity parameters are obtained, the working frequency band of the WIFI can be selected based on the signal intensity parameters, and the working frequency band of the WIFI can be selected according to the following procedures:
1321. it is detected whether only one signal strength parameter is present.
1322. If it is detected that only one signal strength parameter exists, it is detected whether the signal strength parameter is lower than a preset value, if it is detected that the signal strength parameter is lower than the preset value, 1323 is executed, and if it is detected that the signal strength parameter is not lower than the preset value, 1324 is executed.
1323. The 2.4G band is selected.
1324. The 5G band is selected.
After the signal strength parameter is obtained, the operating frequency band of WIFI may also be selected according to the following procedure:
1331. it is detected whether at least two signal strength parameters are present.
1332. And if the existence of at least two signal strength parameters is detected, selecting the lowest signal strength parameter from the at least two signal strength parameters to obtain the target signal strength parameter.
1333. And detecting whether the target signal strength parameter is lower than a preset value, if so, executing 1334, and if not, executing 1335.
1334. The 2.4G band is selected.
1335. The 5G band is selected.
1421. And establishing WIFI connection with the opposite end to be established in the WIFI connection based on the 2.4G frequency band.
1422. And establishing WIFI connection with the opposite end to be established with the WIFI connection based on the 5G frequency band.
It can be understood that there may be one or more to-be-established WIFI connection peers sending WIFI connection establishment requests, and therefore the obtained signal strength parameters may be one or more, however, the processing for one to-be-established WIFI connection peer and the one or more to-be-established WIFI connection peers is different, and therefore it is required to detect whether there is only one signal strength parameter or whether there are at least two signal strength parameters.
When it is detected that only one signal strength parameter exists, it can be directly detected whether the signal strength parameter is lower than a preset value. It can be understood that because 2.4G is for 5G, the wall-penetrating ability is strong, practice muscle distance is far away, and stability is higher, considers the complexity of actual connection environment, consequently can select the operating frequency channel of WIFI according to signal strength parameter, when signal strength parameter is less than the default, selects the 2.4G frequency channel, when signal strength parameter is not less than the default, selects the 5G frequency channel.
When at least two signal intensity parameters are detected to exist, in order to ensure that the WIFI connection can be established with each opposite end to be established with the WIFI connection, the working frequency band of the WIFI can be selected based on the signal intensity of the opposite end to be established with the lowest signal intensity, the signal intensity parameter with the lowest signal intensity can be selected from the at least two signal intensity parameters to obtain a target signal intensity parameter, the working frequency band of the WIFI is selected according to the target signal intensity parameter, when the target signal intensity parameter is lower than the preset value, the 2.4G frequency band can be selected, and when the target signal intensity parameter is not lower than the preset value, the 5G frequency band can be selected.
The preset value may be set according to actual conditions, and is not specifically limited herein, subject to actual requirements.
For example, the method of this embodiment may be implemented by the following procedure, where the WIFI frequency band selection method is applied to the terminal a as an example:
a user a opens a personal hotspot function on a terminal a, the terminal a can always detect whether a WIFI connection establishment request sent by a WIFI connection opposite end to be established is received, at the moment, a user b opens a WIFI search function to search for nearby WIFI, if the user b is within a certain range of the position of the user a, a WIFI signal based on a personal hotspot of the terminal a can be searched, then the user b can click and connect WIFI corresponding to the WIFI signal, the terminal b sends the WIFI connection establishment request to the terminal a, at the moment, the terminal a detects that the WIFI connection establishment request sent by the terminal b is received, when the terminal a detects that the WIFI connection establishment request sent by the terminal b is received, an instruction can be generated and sent to the terminal b, and the instruction is used for obtaining the signal intensity of the terminal b; after receiving the instruction, the terminal b can send the signal intensity of the terminal b to the terminal a, and then the terminal a can receive the signal intensity of the WIFI connection opposite terminal to be established, which is returned by the terminal b, to obtain a signal intensity parameter; then the terminal a detects whether only one signal intensity parameter exists; only receiving a WIFI connection establishment request sent by a terminal b, so that the terminal a detects that only one signal intensity parameter exists, then detects whether the signal intensity parameter is lower than a preset value, and selects a 2.4G frequency band if the signal intensity parameter is lower than the preset value; if the signal intensity parameter is not lower than the preset value, selecting a 5G frequency band; at this time, if the terminal a detects that the signal intensity parameter is lower than the preset value, the 2.4G frequency band is selected to establish the WIFI connection with the terminal b.
In some embodiments, if a plurality of terminals send WIFI connection establishment requests to the terminal a, the terminal a detects that at least two signal strength parameters exist, and at this time, the terminal a selects a working frequency band of WIFI by using the terminal with the lowest signal strength parameter as a standard, so that each terminal sending a WIFI connection establishment request to the terminal a can establish WIFI connection with the terminal a. Therefore, if at least two signal intensity parameters are detected to exist, the maximum signal intensity parameter is selected from the at least two signal intensity parameters to obtain a target signal intensity parameter; detecting whether the target signal intensity parameter is lower than a preset threshold value or not; if the target signal intensity parameter is detected to be lower than a preset threshold value, selecting a 5G frequency band; and if the detected target signal intensity parameter is not lower than the preset threshold, selecting the 2.4G frequency band.
As can be seen from the above, in the embodiment of the present application, whether a WIFI connection establishment request of an opposite end to establish a WIFI connection is received is detected; if the WIFI connection establishment request is detected to be received, acquiring parameter information; selecting a working frequency band of WIFI according to the parameter information; the WIFI connection is established between the selected WIFI-based working frequency band and the opposite end of the WIFI connection to be established, so that the working frequency band of the WIFI can be automatically selected according to the parameter information, the automatic selection of the WIFI frequency band is realized, and the flexibility of the selection of the WIFI frequency band is improved.
In specific implementation, the present application is not limited by the execution sequence of the described steps, and some steps may be performed in other sequences or simultaneously without conflict.
The embodiment of the application further provides a WIFI frequency band selection device, the WIFI frequency band selection device can be integrated in electronic equipment, and the electronic equipment can be equipment supporting WIFI, such as a smart phone and a tablet computer.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a WIFI frequency band selection apparatus according to an embodiment of the present disclosure. The WIFI frequency band selecting apparatus 200 may include: a detection unit 210, an acquisition unit 220, a selection unit 230 and a setup unit 240.
The detecting unit 210 is configured to detect whether a WIFI connection establishment request of a WIFI connection opposite end to be established is received.
An obtaining unit 220, configured to obtain parameter information if it is detected that the WIFI connection establishment request is received.
And a selecting unit 230, configured to select a working frequency band of WIFI according to the parameter information, where the working frequency band of WIFI includes a 2.4G frequency band and a 5G frequency band.
And the establishing unit 240 is configured to establish WIFI connection with the to-be-established WIFI connection opposite end based on the selected working frequency band of WIFI.
As shown in fig. 8a, in some embodiments, the obtaining unit 220 may include:
the first recording subunit 2201 is configured to send a data packet to the WIFI connection peer to be established, and record sending time.
And a second recording subunit 2202, configured to receive a data packet returned by the peer end to which the WIFI connection is to be established, and record reception time.
A first determining subunit 2203, configured to determine a time difference according to the sending time and the receiving time.
The second determining subunit 2204 is configured to determine, according to the time difference and in combination with the transmission rate of the electromagnetic waves, a distance from the WIFI connection end to be established to obtain a distance parameter.
As shown in fig. 8b, in some embodiments, the obtaining unit 220 may include:
a generation subunit 2211 for generating instructions.
The instruction is used for acquiring the signal intensity of the WIFI connection opposite terminal to be established.
And the sending subunit 2212 is configured to send the instruction to the peer end to be connected with the WIFI.
And the receiving subunit 2213 is configured to receive the signal strength of the to-be-established WIFI connection opposite end returned by the to-be-established WIFI connection opposite end, and obtain a signal strength parameter.
As shown in fig. 8c, in some embodiments, the selection unit 230 may include:
a first detection subunit 2301, configured to detect whether only one distance parameter is present.
A second detecting subunit 2302 is configured to detect whether the distance parameter is lower than a preset threshold value if it is detected that only one distance parameter exists.
A first selecting subunit 2303, configured to select a 5G frequency band if it is detected that the distance parameter is lower than the preset threshold.
A second selecting subunit 2304, configured to select the 2.4G frequency band if it is detected that the distance parameter is not lower than the preset threshold.
In some embodiments, the first detecting subunit 2301 may be further configured to: detecting whether only one signal strength parameter is present;
the second detection subunit 2302 may further be configured to: if only one signal intensity parameter is detected, whether the signal intensity parameter is lower than a preset value is detected;
the first selection subunit 2303 may also be configured to: if the signal intensity parameter is detected to be lower than the preset value, selecting a 2.4G frequency band;
the second selection subunit 2304 may also be configured to: and if the detected signal intensity parameter is not lower than the preset value, selecting a 5G frequency band.
As shown in fig. 8d, in some embodiments, the selection unit 230 may include:
a third detecting subunit 2311, configured to detect whether there are at least two distance parameters.
A selecting subunit 2312, configured to, if it is detected that there are at least two distance parameters, select a maximum distance parameter from the at least two distance parameters, to obtain a target distance parameter.
A fourth detecting subunit 2313, configured to detect whether the target distance parameter is lower than a preset threshold.
A third selecting subunit 2314, configured to select the 5G frequency band if it is detected that the target distance parameter is lower than the preset threshold.
A fourth selecting subunit 2315, configured to select the 2.4G frequency band if it is detected that the target distance parameter is not lower than the preset threshold.
In some embodiments, the third detecting subunit 2311 may be further configured to: detecting whether at least two signal strength parameters exist;
the selecting sub-unit 2312 may be further configured to: if the existence of at least two signal intensity parameters is detected, selecting the lowest signal intensity parameter from the at least two signal intensity parameters to obtain a target signal intensity parameter;
the fourth detecting subunit 2313 may further be configured to: detecting whether the target signal intensity parameter is lower than a preset value;
the third selecting subunit 2314 may be further configured to: if the target signal intensity parameter is detected to be lower than the preset value, selecting a 2.4G frequency band;
the fourth selecting subunit 2315 may be further configured to: and if the target signal intensity parameter is not lower than the preset value, selecting a 5G frequency band.
As shown in fig. 8e, in some embodiments, the establishing unit 240 may include:
a first establishing subunit 2401, configured to, if the 2.4G frequency band is selected, establish a WIFI connection with an opposite end to which a WIFI connection is to be established based on the 2.4G frequency band.
A second establishing subunit 2402, configured to, if the 5G frequency band is selected, establish a WIFI connection with the to-be-established WIFI connection peer end based on the 5G frequency band.
In specific implementation, the modules may be implemented as independent entities, or may be combined arbitrarily and implemented as one or several entities.
As can be seen from the above, in the embodiment of the present application, whether a WIFI connection establishment request of an opposite end to establish a WIFI connection is received is detected; if the received WIFI connection establishment request is detected, acquiring parameter information; selecting a working frequency band of WIFI according to the parameter information; the WIFI connection is established between the selected WIFI-based working frequency band and the opposite end of the WIFI connection to be established, so that the working frequency band of the WIFI can be automatically selected according to the parameter information, the automatic selection of the WIFI frequency band is realized, and the flexibility of the selection of the WIFI frequency band is improved.
The embodiment of the application further provides an electronic device, which includes a memory and a processor, and the processor is used for executing the steps in the WIFI frequency band selection method provided by the 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. 9, fig. 9 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
The mobile terminal 300 may include a display unit 301, a memory 302, a processor 303, and the like. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 9 is not intended to be limiting of mobile terminals and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The display unit 301 may include, for example, a display screen.
The memory 302 may be used to store applications and data. The memory 302 stores applications containing executable code. The application programs may constitute various functional modules. The processor 303 executes various functional applications and data processing by running an application program stored in the memory 302.
The processor 303 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing an application program stored in the memory 302 and calling data stored in the memory 302, thereby integrally monitoring the mobile terminal.
In this embodiment, the processor 303 in the mobile terminal loads the executable code corresponding to the process of one or more application programs into the memory 302 according to the following instructions, and the processor 303 runs the application programs stored in the memory 302, thereby implementing the steps:
detecting whether a WIFI connection establishment request of a WIFI connection opposite end to be established is received; if the WIFI connection establishment request is detected to be received, parameter information is obtained; selecting a working frequency band of WIFI according to the parameter information, wherein the working frequency band of the WIFI comprises a 2.4G frequency band and a 5G frequency band; and establishing WIFI connection with the WIFI connection opposite end to be established based on the selected WIFI working frequency band.
Referring to fig. 10, the mobile terminal 400 may include a display unit 401, a memory 402, a processor 403, an input unit 404, an output unit 405, and the like.
The display unit 401 may include, for example, a display screen.
The memory 402 may be used to store applications and data. The memory 402 stores applications containing executable code. The application programs may constitute various functional modules. The processor 403 executes various functional applications and data processing by running an application program stored in the memory 402.
The processor 403 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing an application program stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the mobile terminal.
The input unit 404 may be used to receive input numbers, character information, or user characteristic information, such as a fingerprint, and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The output unit 405 may be used to display information input by or provided to a user and various graphic user interfaces of the mobile terminal, which may be configured by graphics, text, icons, video, and any combination thereof. The output unit may include a display panel.
In this embodiment, the processor 403 in the mobile terminal loads the executable code corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 403 runs the application programs stored in the memory 402, thereby implementing the steps:
detecting whether a WIFI connection establishment request of a WIFI connection opposite end to be established is received; if the WIFI connection establishment request is detected to be received, parameter information is obtained; selecting a working frequency band of WIFI according to the parameter information, wherein the working frequency band of the WIFI comprises a 2.4G frequency band and a 5G frequency band; and establishing WIFI connection with the WIFI connection opposite end to be established based on the selected WIFI working frequency band.
In some embodiments, when the processor 403 executes the step of obtaining parameter information, it may perform: sending a data packet to a WIFI connection opposite terminal to be established, and recording sending time; receiving a data packet returned by the opposite end connected with the WIFI to be established, and recording the receiving time; determining a time difference according to the sending time and the receiving time; and determining the distance between the WIFI connection opposite terminal to be established according to the time difference and the transmission rate of the electromagnetic waves to obtain distance parameters.
In some embodiments, when the processor 403 executes the step of selecting an operating frequency band of WIFI according to the parameter information, it may perform: detecting whether only one distance parameter exists; if only one distance parameter is detected, detecting whether the distance parameter is lower than a preset threshold value; if the distance parameter is detected to be lower than a preset threshold value, selecting a 5G frequency band; and if the distance parameter is not lower than the preset threshold value, selecting a 2.4G frequency band.
In some embodiments, when the processor 403 executes the step of selecting the operating frequency band of WIFI according to the parameter information, it may further execute: detecting whether at least two distance parameters exist; if at least two distance parameters are detected to exist, selecting the largest distance parameter from the at least two distance parameters to obtain a target distance parameter; detecting whether the target distance parameter is lower than a preset threshold value; if the target distance parameter is detected to be lower than a preset threshold value, selecting a 5G frequency band; and if the target distance parameter is not lower than the preset threshold value, selecting a 2.4G frequency band.
In some embodiments, when the processor 403 executes the step of obtaining parameter information, it may further execute: generating an instruction, wherein the instruction is used for acquiring the signal intensity of an opposite terminal to be established with the WIFI connection; sending the instruction to a WIFI connection opposite terminal to be established; and receiving the signal intensity of the WIFI opposite terminal to be established returned by the WIFI opposite terminal to be established, and obtaining a signal intensity parameter.
In some embodiments, when the processor 403 executes the step of selecting the operating frequency band of WIFI according to the parameter information, it may further execute: detecting whether only one signal strength parameter is present; if only one signal strength parameter is detected to exist, detecting whether the signal strength parameter is lower than a preset value; if the signal intensity parameter is detected to be lower than a preset value, selecting a 2.4G frequency band; and if the signal intensity parameter is not lower than the preset value, selecting a 5G frequency band.
In some embodiments, when the processor 403 executes the step of selecting an operating frequency band of WIFI according to the parameter information, it may further execute: detecting whether at least two signal strength parameters exist; if at least two signal strength parameters are detected to exist, selecting the lowest signal strength parameter from the at least two signal strength parameters to obtain a target signal strength parameter; detecting whether the target signal intensity parameter is lower than a preset value; if the target signal intensity parameter is detected to be lower than a preset value, selecting a 2.4G frequency band; and if the target signal intensity parameter is not lower than the preset value, selecting a 5G frequency band.
In some embodiments, when the processor 403 executes the step of establishing the WIFI connection with the peer end to be established according to the selected working frequency band of the WIFI, it may execute: if the 2.4G frequency band is selected, establishing WIFI connection with the opposite end to be established with the WIFI connection based on the 2.4G frequency band; and if the 5G frequency band is selected, establishing WIFI connection with the opposite end to be established with the WIFI connection based on the 5G frequency band.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed description of the WIFI frequency band selection method, which is not described herein again.
An embodiment of the present application further provides a storage medium, where a computer program is stored in the storage medium, and when the computer program runs on a computer, the computer executes the WIFI frequency band selection method described in any of the embodiments.
It should be noted that, all or part of the steps in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, which may include, but is not limited to: a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic or optical disk, and the like.
The WIFI frequency band selection method, the WIFI frequency band selection device, the storage medium, and the electronic device provided in the embodiments of the present application are described in detail above. The principle and the embodiment of the present application are explained by applying specific examples, and the above description of the embodiments 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 (9)

1. A WIFI frequency band selection method is characterized by being applied to a mobile terminal, the mobile terminal starts a personal hotspot or a WIFI P2P function, and when at least more than two WIFI connection opposite terminals to be established send WIFI connection establishment requests to the mobile terminal, the method comprises the following steps:
detecting whether a WIFI connection establishment request of a WIFI connection opposite end to be established is received;
if the received WIFI connection establishment request is detected, acquiring parameter information, wherein the parameter information comprises a distance parameter or a signal intensity parameter;
selecting a working frequency band of WIFI according to the parameter information, wherein the working frequency band of the WIFI comprises a 2.4G frequency band and a 5G frequency band, and whether at least two distance parameters exist is detected; if at least two distance parameters are detected to exist, selecting the maximum distance parameter from the at least two distance parameters to obtain a target distance parameter; detecting whether the target distance parameter is lower than a preset threshold value; if the target distance parameter is detected to be lower than a preset threshold value, selecting a 5G frequency band; if the target distance parameter is not lower than a preset threshold value, selecting a 2.4G frequency band; or detecting whether at least two signal strength parameters are present; if at least two signal intensity parameters are detected to exist, selecting the lowest signal intensity parameter from the at least two signal intensity parameters to obtain a target signal intensity parameter; detecting whether the target signal intensity parameter is lower than a preset value; if the target signal intensity parameter is detected to be lower than a preset value, selecting a 2.4G frequency band; if the target signal intensity parameter is not lower than a preset value, selecting a 5G frequency band;
and establishing WIFI connection with the WIFI connection opposite end to be established based on the selected working frequency band of the WIFI.
2. The WIFI frequency band selection method according to claim 1, wherein the step of obtaining parameter information includes:
sending a data packet to a WIFI connection opposite terminal to be established, and recording sending time;
receiving a data packet returned by an opposite terminal to be connected with WIFI to be established, and recording receiving time;
determining a time difference according to the sending time and the receiving time;
and determining the distance between the WIFI connection opposite terminal to be established according to the time difference and the transmission rate of the electromagnetic waves to obtain distance parameters.
3. The WIFI frequency band selecting method according to claim 2, wherein the step of selecting the working frequency band of WIFI according to the parameter information includes:
detecting whether only one distance parameter exists;
if only one distance parameter is detected, detecting whether the distance parameter is lower than a preset threshold value;
if the distance parameter is detected to be lower than a preset threshold value, selecting a 5G frequency band;
and if the distance parameter is not lower than the preset threshold value, selecting a 2.4G frequency band.
4. The WIFI frequency band selection method of claim 1, wherein the step of obtaining parameter information includes:
generating an instruction, wherein the instruction is used for acquiring the signal intensity of an opposite terminal to be established with the WIFI connection;
sending the instruction to a WIFI connection opposite terminal to be established;
and receiving the signal intensity of the WIFI opposite terminal to be established returned by the WIFI opposite terminal to be established, and obtaining a signal intensity parameter.
5. The method of claim 4, wherein the step of selecting the operating frequency band for WIFI according to the parameter information includes:
detecting whether only one signal strength parameter is present;
if only one signal intensity parameter is detected, detecting whether the signal intensity parameter is lower than a preset value;
if the signal intensity parameter is detected to be lower than a preset value, selecting a 2.4G frequency band;
and if the signal intensity parameter is not lower than the preset value, selecting a 5G frequency band.
6. The WIFI frequency band selection method according to claim 1, 3 or 5, wherein the step of establishing the WIFI connection with the opposite end to be established according to the selected working frequency band of the WIFI comprises the following steps:
if the 2.4G frequency band is selected, establishing WIFI connection with the opposite end to be established with the WIFI connection based on the 2.4G frequency band;
and if the 5G frequency band is selected, establishing WIFI connection with the opposite end to be established with the WIFI connection based on the 5G frequency band.
7. The WIFI frequency band selection device is applied to a mobile terminal, the mobile terminal starts a personal hotspot or a WIFI P2P function, and when at least more than two WIFI connection opposite ends to be established send WIFI connection establishment requests to the mobile terminal, the device comprises:
the device comprises a detection unit, a processing unit and a processing unit, wherein the detection unit is used for detecting whether a WIFI connection establishment request of a WIFI connection opposite end to be established is received;
the acquisition unit is used for acquiring parameter information if the WIFI connection establishment request is detected to be received;
the selection unit is used for selecting a working frequency band of WIFI according to the parameter information, wherein the working frequency band of the WIFI comprises a 2.4G frequency band and a 5G frequency band, and whether at least two distance parameters exist is detected; if at least two distance parameters are detected to exist, selecting the largest distance parameter from the at least two distance parameters to obtain a target distance parameter; detecting whether the target distance parameter is lower than a preset threshold value; if the target distance parameter is detected to be lower than a preset threshold value, selecting a 5G frequency band; if the target distance parameter is not lower than a preset threshold value, selecting a 2.4G frequency band; or detecting whether at least two signal strength parameters are present; if at least two signal intensity parameters are detected to exist, selecting the lowest signal intensity parameter from the at least two signal intensity parameters to obtain a target signal intensity parameter; detecting whether the target signal intensity parameter is lower than a preset value; if the target signal intensity parameter is detected to be lower than a preset value, selecting a 2.4G frequency band; if the target signal intensity parameter is not lower than a preset value, selecting a 5G frequency band;
and the establishing unit is used for establishing WIFI connection with the WIFI connection opposite end to be established based on the selected working frequency band of the WIFI.
8. A storage medium having stored thereon a computer program, characterized in that the computer program, when executed on a computer, causes the computer to execute the method according to any of claims 1 to 6.
9. An electronic device comprising a memory, a processor, wherein the processor is configured to perform the method of any one of claims 1 to 6 by invoking a computer program stored in the memory.
CN201810564835.8A 2018-06-04 2018-06-04 WIFI frequency band selection method and device, storage medium and electronic equipment Active CN108770068B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810564835.8A CN108770068B (en) 2018-06-04 2018-06-04 WIFI frequency band selection method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810564835.8A CN108770068B (en) 2018-06-04 2018-06-04 WIFI frequency band selection method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN108770068A CN108770068A (en) 2018-11-06
CN108770068B true CN108770068B (en) 2022-10-21

Family

ID=64002457

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810564835.8A Active CN108770068B (en) 2018-06-04 2018-06-04 WIFI frequency band selection method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN108770068B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109982399A (en) * 2019-03-04 2019-07-05 成都小步创想慧联科技有限公司 Improve the method and router of router 5G frequency range utilization rate
CN110190860B (en) * 2019-06-14 2021-07-20 Oppo广东移动通信有限公司 Radio frequency circuit and electronic equipment
CN110166073A (en) * 2019-06-14 2019-08-23 Oppo广东移动通信有限公司 Radio circuit and electronic equipment
CN110266333B (en) * 2019-06-14 2021-08-24 Oppo广东移动通信有限公司 Radio frequency circuit and electronic equipment
CN110913450B (en) * 2019-11-28 2022-06-07 宇龙计算机通信科技(深圳)有限公司 Control method and device for mobile hotspot, mobile terminal and storage medium
CN111148182B (en) * 2019-12-30 2022-02-22 Oppo广东移动通信有限公司 Device control method, device, storage medium and electronic device
CN111123191B (en) * 2020-03-26 2020-08-21 芯海科技(深圳)股份有限公司 Electric energy meter, electric energy meter calibration device, meter calibration stand and electric energy meter calibration method
CN113543278A (en) * 2020-04-20 2021-10-22 中兴通讯股份有限公司 WiFi hotspot management method, electronic device and storage medium
CN114095920A (en) * 2020-07-29 2022-02-25 阿里巴巴集团控股有限公司 Communication method, system, apparatus, device and storage medium
CN113099422A (en) * 2021-03-10 2021-07-09 惠州Tcl移动通信有限公司 P2P connection compatibility method, intelligent terminal and computer readable storage medium
CN114286424A (en) * 2021-12-24 2022-04-05 西安闻泰信息技术有限公司 Method for switching connection, terminal equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105898813A (en) * 2016-03-31 2016-08-24 乐视控股(北京)有限公司 Frequency band switching method based on wireless device and wireless device
CN107708119A (en) * 2017-09-26 2018-02-16 广东欧珀移动通信有限公司 A kind of distribution method of communication equipment and its communications band, readable storage medium storing program for executing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015072903A1 (en) * 2013-11-13 2015-05-21 Telefonaktiebolaget L M Ericsson (Publ) Method and arrangement in a telecommunication system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105898813A (en) * 2016-03-31 2016-08-24 乐视控股(北京)有限公司 Frequency band switching method based on wireless device and wireless device
CN107708119A (en) * 2017-09-26 2018-02-16 广东欧珀移动通信有限公司 A kind of distribution method of communication equipment and its communications band, readable storage medium storing program for executing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
R4-1610076:CR on Bluetooth Wifi requirement for indoor positioning;Reno;《3GPP tsg_ran\WG4_Radio》;20161118;全文 *

Also Published As

Publication number Publication date
CN108770068A (en) 2018-11-06

Similar Documents

Publication Publication Date Title
CN108770068B (en) WIFI frequency band selection method and device, storage medium and electronic equipment
KR101156321B1 (en) Method, system and mobile device for prioritizing a discovered device list
CN109690959B (en) File sending method, file receiving method and terminal
EP2798779B1 (en) Transferring of communication event
KR102363559B1 (en) Information transmission method and device
CN110032512B (en) Debugging method of small program, related equipment and terminal
CN108040091B (en) Data processing method, device and storage medium
CN109068161B (en) Equipment connection establishing method and device
CN102710549B (en) To be established a communications link the method for relation, terminal and system by shooting
CN105898181A (en) Video conversation system and method and related equipment
CN111148182B (en) Device control method, device, storage medium and electronic device
CN113765930B9 (en) Control method for multiparty call, client and server
CN114390501A (en) Data transmission method and electronic equipment
CN112311753A (en) Information interaction method and device and electronic equipment
US10924529B2 (en) System and method of transmitting data by using widget window
CN110933772A (en) Connection method of wireless device, mobile terminal and computer readable storage medium
EP3805938B1 (en) Server node selection method and terminal device
CN104242998A (en) Method and system for fast sharing various types of information through magnetic sensor
RU2615759C2 (en) Method and device for video recording
RU2641245C2 (en) Method and device (versions) for transferring files
CN111093238A (en) Wireless network control method and device, storage medium and electronic equipment
CN107360634B (en) Data transmission method and device and mobile terminal
CN113220654A (en) Content sharing method, device and system and storage medium
US20150163841A1 (en) Method for processing information and electronic apparatus
CN105450264A (en) Data transmission method and device

Legal Events

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