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

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

Info

Publication number
CN111787599B
CN111787599B CN202010784827.1A CN202010784827A CN111787599B CN 111787599 B CN111787599 B CN 111787599B CN 202010784827 A CN202010784827 A CN 202010784827A CN 111787599 B CN111787599 B CN 111787599B
Authority
CN
China
Prior art keywords
wifi network
signal strength
wifi
scanned
signal intensity
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
CN202010784827.1A
Other languages
Chinese (zh)
Other versions
CN111787599A (en
Inventor
候祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202010784827.1A priority Critical patent/CN111787599B/en
Publication of CN111787599A publication Critical patent/CN111787599A/en
Application granted granted Critical
Publication of CN111787599B publication Critical patent/CN111787599B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/18Selecting a network or a communication service
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/0005Control or signalling for completing the hand-off
    • H04W36/0083Determination of parameters used for hand-off, e.g. generation or modification of neighbour cell lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W36/00Hand-off or reselection arrangements
    • H04W36/14Reselecting a network or an air interface
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]

Landscapes

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

Abstract

The application discloses a WIFI frequency band selection method and device, electronic equipment and a storage medium, and relates to the technical field of electronic equipment. The method is applied to the electronic equipment, and comprises the following steps: when a 2.4G WIFI network is scanned and a 5G WIFI network is not scanned, the WIFI network is continuously scanned within a preset time period, when the 5G WIFI network is scanned within the preset time period, the signal intensity of the 2.4G WIFI network is obtained as a first signal intensity, the signal intensity of the 5G WIFI network is obtained as a second signal intensity, the difference value between the first signal intensity and the second signal intensity is obtained, and when the first signal intensity is greater than the second signal intensity and the difference value between the first signal intensity and the second signal intensity is smaller than a specified difference value, connection with the 5G WIFI network is established. According to the WIFI network access method and device, the WIFI network is continuously scanned within the preset time period when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, so that the 5G WIFI network is preferentially connected, and the WIFI access experience is improved.

Description

WIFI frequency band selection method and device, electronic equipment and storage medium
Technical Field
The present application relates to the technical field of electronic devices, and in particular, to a method and an apparatus for selecting a WIFI frequency band, an electronic device, and a storage medium.
Background
At present, a router generally supports a 5G WIFI network and a 2.4G WIFI network, and when an electronic device moves from a WIFI-free signal coverage area to a WIFI-covered area, because the WIFI signal intensity of 2.4G is stronger than that of 5G, the electronic device can preferentially scan the 2.4G WIFI network and connect the 2.4G WIFI network, and then the 5G WIFI network cannot be reconnected even if the 5G WIFI network is scanned, so that the internet surfing experience of a user is poor.
Disclosure of Invention
In view of the above problems, the present application provides a method and an apparatus for selecting a WIFI frequency band, an electronic device, and a storage medium, so as to solve the above problems.
In a first aspect, an embodiment of the present application provides a method for selecting a WIFI frequency band, which is applied to an electronic device, and the method includes: when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, the WIFI network is continuously scanned within a preset time period; when a 5G WIFI network is scanned within a preset time period, acquiring the signal intensity of the 2.4G WIFI network as a first signal intensity, and acquiring the signal intensity of the 5G WIFI network as a second signal intensity; obtaining a difference between the first signal strength and the second signal strength; and when the first signal strength is greater than the second signal strength and the difference between the first signal strength and the second signal strength is smaller than a specified difference, establishing connection with the 5G WIFI network.
In a second aspect, an embodiment of the present application provides a device for selecting a WIFI frequency band, which is applied to an electronic device, and the device includes: the WIFI network scanning module is used for continuing scanning the WIFI network within a preset time period when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned; the signal intensity acquisition module is used for acquiring the signal intensity of the 2.4G WIFI network as a first signal intensity and acquiring the signal intensity of the 5G WIFI network as a second signal intensity when the 5G WIFI network is scanned within a preset time period; a difference obtaining module, configured to obtain a difference between the first signal strength and the second signal strength; and the WIFI network selection module is used for establishing connection with the 5G WIFI network when the first signal strength is greater than the second signal strength and the difference value between the first signal strength and the second signal strength is less than a specified difference value.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, the memory being coupled to the processor, the memory storing instructions, and the processor performing the above method when the instructions are executed by the processor.
In a fourth aspect, the present application provides a computer-readable storage medium, in which a program code is stored, and the program code can be called by a processor to execute the above method.
The WIFI frequency band selection method, the WIFI frequency band selection device, the electronic equipment and the storage medium provided by the embodiment of the application, when a 2.4G WIFI network is scanned and a 5G WIFI network is not scanned, the WIFI network is continuously scanned within a preset time period, when the 5G WIFI network is scanned within the preset time period, the signal intensity of the 2.4G WIFI network is acquired as a first signal intensity, the signal intensity of the 5G WIFI network is acquired as a second signal intensity, the difference value between the first signal intensity and the second signal intensity is acquired, when the first signal intensity is greater than the second signal intensity and the difference value between the first signal intensity and the second signal intensity is smaller than a specified difference value, the connection with the 5G WIFI network is established, so that the 5G WIFI network is preferentially connected by continuously scanning the WIFI network within the preset time period when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, and WIFI internet experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart illustrating a method for selecting a WIFI frequency band according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart illustrating a method for selecting a WIFI frequency band according to another embodiment of the present application;
fig. 3 is a schematic flowchart illustrating a method for selecting a WIFI frequency band according to still another embodiment of the present application;
fig. 4 is a schematic flowchart illustrating a method for selecting a WIFI frequency band according to another embodiment of the present application;
fig. 5 is a schematic flowchart illustrating a method for selecting a WIFI frequency band according to yet another embodiment of the present application;
FIG. 6 is a schematic interface diagram of an electronic device provided by an embodiment of the present application;
fig. 7 is a schematic flowchart illustrating a method for selecting a WIFI frequency band according to yet another embodiment of the present application;
fig. 8 is a block diagram illustrating a device for selecting a WIFI frequency band according to an embodiment of the present disclosure;
fig. 9 is a block diagram illustrating an electronic device according to an embodiment of the present application, configured to perform a method for selecting a WIFI frequency band according to an embodiment of the present application;
fig. 10 shows a storage unit, according to an embodiment of the present application, for storing or carrying program codes for implementing a selection method of a WIFI frequency band according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the embodiments of the present application better understood, the technical solutions of the embodiments of the present application will be described below clearly and completely with reference to the drawings in the embodiments of the present application
With the development of science and technology, electronic equipment is more and more widely used and has more and more functions, and the electronic equipment becomes one of the necessary things in daily life of people. At present, more and more electronic devices support 5G WIFI networks and 2.4G WIFI networks at the same time, and more routers support 5G WIFI networks and 2.4G WIFI networks at the same time, so that more and more routers are provided with two WIFI networks, that is, one 2.4G WIFI network and one 5G WIFI network are set. The 2.4G WIFI network supports a relatively narrow bandwidth, but the 2.4G frequency is relatively small, so the attenuation is small, and the coverage range is wide, while the 5G WIFI network supports a wide bandwidth, and the corresponding WIFI network is fast, but the frequency is relatively high, so the attenuation is large, and the coverage range is relatively small. Therefore, the electronic device generally preferentially scans the 2.4G WIFI network and connects the 2.4G WIFI network, and then the 5G WIFI network cannot be reconnected even if the 5G WIFI network is scanned, but if the electronic device keeps being connected to the 2.4G WIFI network, the internet surfing experience of the user is not good because the WIFI network speed of the 2.4G WIFI network is not as high as that of the 5G WIFI network.
In order to solve the above problems, the inventor finds and provides a method, an apparatus, an electronic device and a storage medium for selecting a WIFI frequency band, which are provided by the embodiment of the present application, and continues to scan a WIFI network within a preset time period when a 2.4G WIFI network is scanned and a 5G WIFI network is not scanned, so as to preferentially connect the 5G WIFI network, thereby improving WIFI internet experience. The specific method for selecting the WIFI frequency band is described in detail in the following embodiments.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a method for selecting a WIFI frequency band according to an embodiment of the present application. The WIFI frequency band selection method is used for continuing to scan the WIFI network within the preset time period when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, so that the 5G WIFI network is preferentially connected, and the WIFI internet surfing experience is improved. In a specific embodiment, the method for selecting the WIFI frequency band is applied to the selection device 200 of the WIFI frequency band shown in fig. 8 and the electronic device 100 (fig. 9) configured with the selection device 200 of the WIFI frequency band. The specific process of the present embodiment will be described below by taking an electronic device as an example, and it is understood that the electronic device applied in the present embodiment may be a smart phone, a tablet computer, a wearable electronic device, and the like, which is not limited herein. As will be explained in detail below with respect to the process shown in fig. 1, the method for selecting the WIFI frequency band specifically may include the following steps:
step S101: and when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, continuously scanning the WIFI network within a preset time period.
In this embodiment, the electronic device may store a configuration file of the 2.4G WIFI network and a configuration file of the 5G WIFI network, so that when the electronic device scans the 2.4G WIFI network, the electronic device may directly establish a connection with the 2.4G WIFI network based on the stored configuration file of the 2.4G WIFI network, and when the electronic device scans the 5G WIFI network, the electronic device may directly establish a connection with the 5G WIFI network based on the stored configuration file of the 5G WIFI network. As one way, the electronic device may pre-establish a connection with the 2.4G WIFI network and store a configuration file of the 2.4G WIFI network, and pre-establish a connection with the 5G WIFI network and store a configuration file of the 5G WIFI network. As another mode, the electronic device may obtain and store the configuration file of the 2.4G WIFI network from the server in advance, and obtain and store the configuration file of the 5G WIFI network from the server in advance. As another way, the electronic device may obtain and store a configuration file of the 2.4G WIFI network input by the user in advance, and obtain and store a configuration file of the 5G WIFI network input by the user in advance.
In some embodiments, when the electronic device scans a 2.4G WIFI network and does not scan a 5G WIFI network, it may be detected whether the electronic device stores a configuration file of the 5G WIFI network, wherein when the detection result indicates that the electronic device stores the configuration file of the 5G WIFI network, the electronic device may continue to scan the WIFI network within a preset time period, and when the detection result indicates that the electronic device does not store the configuration file of the 5G WIFI network, the electronic device may be directly connected to the 2.4G WIFI network.
In some embodiments, when the electronic device desires to be networked through a 2.4G WIFI network or a 5G WIFI network, a connection to the 2.4G WIFI network or the 5G WIFI network needs to be established first, and therefore, the electronic device needs to start a WIFI scanning function and establish a connection to the 2.4G WIFI network or the 5G WIFI network. When the WIFI scanning function of the electronic equipment is in a starting state, if the electronic equipment moves from a coverage area of a non-2.4G WIFI network to a coverage area of a 2.4G WIFI network, the electronic equipment can scan the 2.4G WIFI network; if the electronic device moves from the coverage area of the non-5G WIFI network to the coverage area of the 5G WIFI network, the electronic device can scan the 5G WIFI network; if the electronic device moves from the coverage area of the non-2.4G WIFI network and the coverage area of the non-5G WIFI network to the coverage area of the 2.4G WIFI network and the coverage area of the 5G WIFI network, the electronic device may scan the 2.4G WIFI network and the 5G WIFI network, in addition, because the coverage area of the 2.4G WIFI network is generally larger than the coverage area of the 5G WIFI network, and the signal of the 2.4G WIFI network is generally stronger than the signal of the 5G WIFI network, the electronic device generally scans the 2.4G WIFI network first, and then scans the 5G WIFI network after a certain time.
In this embodiment, when the electronic device scans a 2.4G WIFI network and does not scan a 5G WIFI network, the electronic device may continue to scan the WIFI network within a preset time period. Wherein, the situation that the electronic device scans to the 2.4G WIFI network and does not scan to the 5G WIFI network may include: the electronic equipment enters a coverage area of the 2.4G WIFI network and does not enter a coverage area of the 5G WIFI network; the electronic device enters a coverage area of the 2.4G WIFI network and enters a coverage area of the 5G WIFI network, so that when the electronic device scans the 2.4G WIFI network and does not scan the 5G WIFI network, the possibility of scanning the 5G WIFI network exists, and the WIFI network can be continuously scanned within a preset time period. In some embodiments, the specified time period may be stored locally at the electronic device after being set in advance, where the specified time period may be stored locally at the electronic device after being set manually by a user in advance, or may be stored locally at the electronic device after being set automatically by the electronic device in advance, for example, the specified time period may be 10S, 30S, and the like, and is not limited herein.
Step S102: when a 5G WIFI network is scanned within a preset time period, acquiring the signal intensity of the 2.4G WIFI network as a first signal intensity, and acquiring the signal intensity of the 5G WIFI network as a second signal intensity.
In this embodiment, in the process that the electronic device continuously scans the WIFI network within the preset time period, the scanning condition of the WIFI network may be monitored, wherein when the monitoring result represents that the 5G network is scanned within the preset time period, the signal intensity of the 2.4G WIFI network may be acquired as the first signal intensity, and the signal intensity of the 5G WIFI network may be acquired as the second signal intensity.
In some embodiments, the electronic device may receive a WIFI signal and obtain a signal strength of the WIFI based on the WIFI signal. Therefore, the electronic device may receive the WIFI signal sent by the 2.4G WIFI network, and obtain the signal strength of the 2.4G WIFI network as the first signal strength based on the WIFI signal sent by the 2.4G WIFI network, and may receive the WIFI signal sent by the 5G WIFI network, and obtain the signal strength of the 5G WIFI network as the second signal strength based on the WIFI signal sent by the 5G WIFI network. Wherein the signal strength may indicate a Received Signal Strength (RSSI).
Step S103: obtaining a difference between the first signal strength and the second signal strength.
In this embodiment, after acquiring the first signal strength and the second signal strength, the electronic device may compare the first signal strength and the second signal strength and perform a difference operation to acquire a difference between the first signal strength and the second signal strength. In some embodiments, after acquiring the first signal strength and the second signal strength, the electronic device may compare the first signal strength and the second signal strength to determine a magnitude relationship between the first signal strength and the second signal strength, wherein when the comparison result indicates that the first signal strength is greater than the second signal strength, a difference between the first signal strength and the second signal strength may be obtained in a manner that the first signal strength subtracts the second signal strength, that is, when the comparison result indicates that the signal strength of the 2.4G WIFI network is greater than the signal strength of the 5G WIFI network, a difference between the signal strength of the 2.4G WIFI network and the signal strength of the 5G WIFI network may be obtained in a manner that the signal strength of the 2.4G WIFI network subtracts the signal strength of the 5G WIFI network.
Step S104: and when the first signal strength is greater than the second signal strength and the difference value between the first signal strength and the second signal strength is less than a specified difference value, establishing connection with the 5G WIFI network.
In this embodiment, after determining that the first signal strength is greater than the second signal strength and obtaining the difference between the first signal strength and the second signal strength, the difference between the first signal strength and the second signal strength may be compared with a specified difference to determine whether the difference between the first signal strength and the second signal strength is smaller than the specified difference, where when the determination result indicates that the difference between the first signal strength and the second signal strength is smaller than the specified difference, the signal strength indicating the 5G WIFI network is stronger, the internet access effect of the electronic device using the 5G WIFI network is better than the internet access effect using the 2.4G WIFI network, a connection with the 5G WIFI network may be established, and when the determination result indicates that the difference between the first signal strength and the second signal strength is not smaller than the specified difference, the signal strength indicating the 5G WIFI network is weaker, the internet access effect of the electronic device using the 2.4G WIFI network is better than the internet access effect using the 5G WIFI network, a connection may be established with the 2.4G WIFI network. Based on this, can make electronic equipment can establish the connection with the better WIFI network of online effect all the time, promote electronic equipment's online effect.
In some embodiments, the specified difference may be preset and stored locally in the electronic device, may be preset and stored in a server communicatively connected to the electronic device, or may be temporarily obtained after determining that the signal strength is greater than the second signal strength and obtaining the difference between the first signal strength and the second signal strength, which is not limited herein. As one approach, the specified difference may be 4dbm, the signal strength of the 2.4GG WIFI network is-50 dbm, and then, when the signal strength of the 5G WIFI network is higher than-50 dbm-4dbm ═ 54dbm, then a connection is established with the 5G WIFI network.
According to the selection method of the WIFI frequency band, when a 2.4G WIFI network is scanned and a 5G WIFI network is not scanned, the WIFI network is continuously scanned within the preset time period, when the 5G WIFI network is scanned within the preset time period, the signal intensity of the 2.4G WIFI network is obtained as the first signal intensity, the signal intensity of the 5G WIFI network is obtained as the second signal intensity, the difference value between the first signal intensity and the second signal intensity is obtained, when the first signal intensity is larger than the second signal intensity and the difference value between the first signal intensity and the second signal intensity is smaller than the specified difference value, connection with the 5G WIFI network is established, so that the WIFI network is continuously scanned within the preset time period when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, the 5G WIFI network is preferentially connected, and the WIFI internet surfing experience is improved.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a method for selecting a WIFI frequency band according to another embodiment of the present application. The method is applied to the electronic device, and will be described in detail with reference to the flow shown in fig. 2, where the method for selecting the WIFI frequency band specifically includes the following steps:
step S201: and when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, continuing to scan the WIFI network within a preset time period.
Step S202: when a 5G WIFI network is scanned within a preset time period, acquiring the signal intensity of the 2.4G WIFI network as a first signal intensity, and acquiring the signal intensity of the 5G WIFI network as a second signal intensity.
Step S203: obtaining a difference between the first signal strength and the second signal strength.
Step S204: and when the first signal strength is greater than the second signal strength and the difference value between the first signal strength and the second signal strength is less than a specified difference value, establishing connection with the 5G WIFI network.
For detailed description of steps S201 to S204, please refer to steps S101 to S104, which are not described herein again.
Step S205: and when the 5G WIFI network is not scanned within a preset time period, establishing connection with the 2.4G WIFI network.
In this embodiment, the electronic device may monitor a scanning situation of the WIFI network during a process of continuously scanning the WIFI network within a preset time period, wherein when the monitoring result indicates that the 5G WIFI network is not scanned within the preset time period, the electronic device does not cover the 5G WIFI network, and then a connection with the 2.4G WIFI network may be established to ensure that the electronic device surfs the internet normally.
In some embodiments, the electronic device may monitor a scanning situation of the WIFI network during a process of continuously scanning the WIFI network within a preset time period, wherein when a monitoring result indicates that the 5G WIFI network is not scanned within the preset time period, the electronic device does not exist within a coverage range of the 5G WIFI network, a first prompt message may be output, where the first prompt message is used to prompt that the electronic device is not in the coverage range of the 5G WIFI network and is located in a coverage range of the 2.4G WIFI network, and prompt a user to select whether to establish a connection with the 2.4G WIFI network. As one mode, when an operation of "yes" is detected by the user for the prompt information input instruction, connection with the 2.4G WIFI network is established, and when an operation of "no" is detected by the user for the prompt information input instruction, connection with the 2.4G WIFI network is abandoned.
In some embodiments, the electronic device may monitor a scanning situation of the WIFI network during a process of continuously scanning the WIFI network within a preset time period, wherein when a monitoring result indicates that the 5G WIFI network is not scanned within the preset time period, the electronic device does not exist within a coverage range of the 5G WIFI network, a second prompt message may be output, where the second prompt message is used to prompt that the electronic device does not exist within the coverage range of the 5G WIFI network, and prompt a user to move the electronic device to change an area where the electronic device is located to be within the coverage range of the 5GG WIFI network.
Compared with the method for selecting the WIFI frequency band shown in fig. 1, the method for selecting the WIFI frequency band provided in another embodiment of the present application directly establishes a connection with the 2.4G WIFI network when the 5G WIFI network is not scanned within a preset time period, so as to ensure normal use of the WIFI network.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a method for selecting a WIFI frequency band according to still another embodiment of the present application. The method is applied to the electronic device, and will be described in detail with reference to the flow shown in fig. 3, where the method for selecting the WIFI frequency band specifically includes the following steps:
step S301: and when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, continuing to scan the WIFI network within a preset time period.
Step S302: when a 5G WIFI network is scanned within a preset time period, acquiring the signal intensity of the 2.4G WIFI network as a first signal intensity, and acquiring the signal intensity of the 5G WIFI network as a second signal intensity.
Step S303: obtaining a difference between the first signal strength and the second signal strength.
Step S304: and when the first signal strength is greater than the second signal strength and the difference between the first signal strength and the second signal strength is smaller than a specified difference, establishing connection with the 5G WIFI network.
Step S305: and when the 5G WIFI network is not scanned within a preset time period, establishing connection with the 2.4G WIFI network.
For detailed description of steps S301 to S305, please refer to steps S201 to S205, which are not described herein again.
Step S306: and continuing to scan the WIFI network.
In this embodiment, when the electronic device establishes a connection with the 2.4G WIFI network and goes online through the 2.4G WIFI network, the electronic device may continue to scan the WIFI network. In some embodiments, when the electronic device establishes a connection with the 2.4G WIFI network and is connected to the internet through the 2.4G WIFI network, it may be detected whether the electronic device stores a configuration file of the 5G WIFI network, where when the detection result indicates that the electronic device stores the configuration file of the 5G WIFI network, the electronic device may continue to scan the WIFI network, and when the detection result indicates that the electronic device does not store the configuration file of the 5G WIFI network, the electronic device may not continue to scan the WIFI network, so as to reduce power consumption of the electronic device.
Step S307: and when the 5G WIFI network is scanned, acquiring the signal intensity of the 2.4G WIFI network as a third signal intensity, and acquiring the signal intensity of the 5G WIFI network as a fourth signal intensity.
In this embodiment, in the process that the electronic device continues to scan the WIFI network, the scanning condition of the WIFI network may be monitored, wherein when the monitoring result represents that the 5G WIFI network is scanned, the signal strength of the 2.4G WIFI network may be acquired as the third signal strength, and the signal strength of the 5G WIFI network may be acquired as the fourth signal strength.
In some embodiments, the electronic device may receive a WIFI signal sent by a 2.4G WIFI network, and obtain a signal strength of the 2.4G WIFI network as a third signal strength based on the WIFI signal sent by the 2.4G WIFI network, and may receive a WIFI signal sent by a 5G WIFI network, and obtain a signal strength of the 5G WIFI network as a fourth signal strength based on the WIFI signal sent by the 5G WIFI network.
Step S308: obtaining a difference between the third signal strength and the fourth signal strength.
In this embodiment, after acquiring the third signal strength and the fourth signal strength, the electronic device may compare the third signal strength and the fourth signal strength and perform a difference operation to acquire a difference between the third signal strength and the fourth signal strength. In some embodiments, after obtaining the third signal strength and the fourth signal strength, the electronic device may compare the third signal strength and the fourth signal strength in magnitude to determine a magnitude relationship between the third signal strength and the fourth signal strength, wherein when the comparison result indicates that the third signal strength is greater than the fourth signal strength, a difference between the third signal strength and the fourth signal strength may be obtained in a manner of subtracting the fourth signal strength from the third signal strength, that is, when the comparison result indicates that the signal strength of the 2.4G WIFI network is greater than the signal strength of the 5G WIFI network, a difference between the signal strength of the 2.4G WIFI network and the signal strength of the 5G WIFI network may be obtained in a manner of subtracting the signal strength of the 5G WIFI network from the signal strength of the 2.4G WIFI network.
Step S309: and when the third signal strength is greater than the fourth signal strength and the difference between the third signal strength and the fourth signal strength is less than the specified difference, acquiring the state information of the electronic equipment.
In this embodiment, after determining that the third signal strength is greater than the fourth signal strength and obtaining the difference between the third signal strength and the fourth signal strength, the difference between the third signal strength and the fourth signal strength may be compared with a specified difference to determine whether the difference between the third signal strength and the fourth signal strength is less than the specified difference, and when the determination result indicates that the difference between the third signal strength and the fourth signal strength is less than the specified difference, the status information of the electronic device may be obtained. In some embodiments, the state information of the electronic device may include: the screen state, the WIFI network speed, the remaining power information, the charging state, and the like, which are not limited herein.
Step S310: and processing the 2.4G WIFI network and the 5G WIFI network based on the state information.
In this embodiment, after the status information of the electronic device is acquired, the 2.4G WIFI network and the 5G WIFI network may be processed based on the status information. As one mode, after the state information of the electronic device is acquired, the connection with the 2.4G WIFI network may be maintained based on the state information, the connection with the 2.4G WIFI network may be disconnected and the connection with the 5G WIFI network may be established based on the state information, and the selection information and the like may be output based on the state information, which is not limited herein.
In some embodiments, when the state information is a screen state, the 2.4G WIFI network and the 5G WIFI network may be processed based on the screen state, when the state information is a WIFI network speed, the 2.4G WIFI network and the 5G WIFI network may be processed based on the WIFI network speed, when the state information is remaining power information, the 2.4G WIFI network and the 5G WIFI network may be processed based on the remaining power information, when the state information is a charging state, the 2.4G WIFI network and the 5G WIFI network may be processed based on the charging state, when the state information is a screen state and a WIFI network speed, the 2.4G WIFI network and the 5G WIFI network may be processed based on the screen state and the WIFI network speed, and the like, which are not limited herein.
Compared with the method for selecting the WIFI frequency band shown in fig. 1, the method for selecting the WIFI frequency band provided in another embodiment of the present application further processes the 2.4G WIFI network and the 5G WIFI network based on the state information of the electronic device after establishing the connection with the 2.4G WIFI network and when scanning that the signal intensity of the 2.4G WIFI network and the signal intensity of the 5G WIFI network meet the conditions, so as to improve the WIFI internet experience.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating a method for selecting a WIFI frequency band according to another embodiment of the present application. The method is applied to the electronic device, and will be explained in detail with reference to a flow shown in fig. 4, in this embodiment, the state information includes a screen state and a WIFI network speed, and the method for selecting the WIFI frequency band may specifically include the following steps:
step S401: and when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, continuing to scan the WIFI network within a preset time period.
Step S402: when a 5G WIFI network is scanned within a preset time period, acquiring the signal intensity of the 2.4G WIFI network as a first signal intensity, and acquiring the signal intensity of the 5G WIFI network as a second signal intensity.
Step S403: obtaining a difference between the first signal strength and the second signal strength.
Step S404: and when the first signal strength is greater than the second signal strength and the difference value between the first signal strength and the second signal strength is less than a specified difference value, establishing connection with the 5G WIFI network.
Step S405: and when the 5G WIFI network is not scanned within a preset time period, establishing connection with the 2.4G WIFI network.
Step S406: and continuing to scan the WIFI network.
Step S407: and when the 5G WIFI network is scanned, acquiring the signal intensity of the 2.4G WIFI network as a third signal intensity, and acquiring the signal intensity of the 5G WIFI network as a fourth signal intensity.
Step S408: obtaining a difference between the third signal strength and the fourth signal strength.
For detailed description of steps S401 to S408, please refer to steps S301 to S308, which are not described herein again.
Step S409: and when the third signal intensity is greater than the fourth signal intensity and the difference value between the third signal intensity and the fourth signal intensity is smaller than the specified difference value, acquiring the screen state and the WIFI network speed of the electronic equipment.
In this embodiment, after it is determined that the third signal strength is greater than the fourth signal strength and the difference between the third signal strength and the fourth signal strength is obtained, the difference between the third signal strength and the fourth signal strength may be compared with a specified difference to determine whether the difference between the third signal strength and the fourth signal strength is smaller than the specified difference, where when the determination result represents that the difference between the third signal strength and the fourth signal strength is smaller than the specified difference, the screen status and the WIFI network speed of the electronic device may be obtained.
Step S410: and when the screen state is a screen-on state and the speed of the WIFI network is less than the designated speed, disconnecting the 2.4G WIFI network and establishing the connection with the 5G WIFI network.
In some embodiments, after the screen state of the electronic device is acquired, whether the screen state of the electronic device is a screen resting state or not may be determined. When the screen brightness of the electronic device is judged to be 0, the screen state of the electronic device can be determined to be a screen-on state, and when the screen brightness of the electronic device is judged to be greater than 0, the screen state of the electronic device can be determined to be a screen-on state.
In some embodiments, the electronic device may preset and store a designated speed, and may also temporarily acquire the designated speed when acquiring the speed of the WIFI network, where the designated speed is used as a criterion for the speed of the WIFI network. Therefore, in this embodiment, when the WIFI network speed is obtained, the WIFI network speed may be compared with the designated speed to determine whether the WIFI network speed is less than the designated speed. For example, the specified speed may be 30 KB/s.
In some embodiments, when the screen state is the screen state and the speed of the WIFI network is less than the designated speed, the electronic device is characterized that the big data is not downloaded in the screen state, and then the connection with the 2.4G WIFI network can be disconnected and the connection with the 5G WIFI network can be disconnected, so that the 2.4G WIFI network can be switched to the 5G WIFI network, and the WIFI internet experience is improved on the premise that the use experience of a user is not affected.
Compared with the method for selecting the WIFI frequency band shown in fig. 1, in the method for selecting the WIFI frequency band provided in another embodiment of the present application, after the connection with the 2.4G WIFI network is established, when the signal intensity of the 2.4G WIFI network and the signal intensity of the 5G WIFI network meet the conditions, if the screen state of the electronic device is the information screen state and the speed of the WIFI network is less than the specified speed, the connection with the 2.4G WIFI network is disconnected and the connection with the 5G WIFI network is established, so as to improve the WIFI internet access experience.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating a method for selecting a WIFI frequency band according to yet another embodiment of the present application. The method is applied to the electronic device, and will be explained in detail with reference to a flow shown in fig. 5, in this embodiment, the state information includes a screen state and a WIFI network speed, and the method for selecting the WIFI frequency band may specifically include the following steps:
step S501: and when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, continuing to scan the WIFI network within a preset time period.
Step S502: when a 5G WIFI network is scanned within a preset time period, acquiring the signal intensity of the 2.4G WIFI network as a first signal intensity, and acquiring the signal intensity of the 5G WIFI network as a second signal intensity.
Step S503: obtaining a difference between the first signal strength and the second signal strength.
Step S504: and when the first signal strength is greater than the second signal strength and the difference value between the first signal strength and the second signal strength is less than a specified difference value, establishing connection with the 5G WIFI network.
Step S505: and when the 5G WIFI network is not scanned within a preset time period, establishing connection with the 2.4G WIFI network.
Step S506: and continuing to scan the WIFI network.
Step S507: and when a 5G WIFI network is scanned, acquiring the signal intensity of the 2.4G WIFI network as a third signal intensity, and acquiring the signal intensity of the 5G WIFI network as a fourth signal intensity.
Step S508: obtaining a difference between the third signal strength and the fourth signal strength.
For the detailed description of step S501 to step S508, refer to step S301 to step S308, which are not described herein again.
Step S509: and when the third signal intensity is greater than the fourth signal intensity and the difference value between the third signal intensity and the fourth signal intensity is smaller than the specified difference value, acquiring the screen state and the WIFI network speed of the electronic equipment.
In this embodiment, after it is determined that the third signal strength is greater than the fourth signal strength and the difference between the third signal strength and the fourth signal strength is obtained, the difference between the third signal strength and the fourth signal strength may be compared with a specified difference to determine whether the difference between the third signal strength and the fourth signal strength is smaller than the specified difference, where when the determination result represents that the difference between the third signal strength and the fourth signal strength is smaller than the specified difference, the screen status and the WIFI network speed of the electronic device may be obtained.
Step S510: and when the screen state is a screen state and the speed of the WIFI network is not less than the designated speed, the connection with the 2.4G WIFI network is kept.
In some embodiments, after the screen state of the electronic device is acquired, it may be determined whether the screen state of the electronic device is a screen saver state. When the screen brightness of the electronic device is judged to be 0, the screen state of the electronic device can be determined to be a screen-on state, and when the screen brightness of the electronic device is judged to be greater than 0, the screen state of the electronic device can be determined to be a screen-on state.
In some embodiments, the electronic device may preset and store a designated speed, and may also temporarily acquire the designated speed when acquiring the speed of the WIFI network, where the designated speed is used as a criterion for the speed of the WIFI network. Therefore, in this embodiment, when the WIFI network speed is obtained, the WIFI network speed may be compared with the designated speed to determine whether the WIFI network speed is less than the designated speed. For example, the specified speed may be 30 KB/s.
In some embodiments, when the screen state is the screen state and the speed of the WIFI network is not less than the designated speed, the characterization electronic device may download big data in the screen state, and then may maintain the connection with the 2.4G WIFI network to avoid affecting data downloading of the user.
Step S511: and outputting first selection information when the screen state is switched from the screen-on state to the screen-on state.
In some embodiments, while maintaining the connection with the 2.4G WIFI network, a change in the screen status may be monitored, wherein when it is monitored that the screen status is always maintained in the screen-off status, the connection with the 2.4G WIFI network may be continuously maintained, and when it is monitored that the screen status is switched from the screen-off status to the screen-on status, for example, when it is monitored that the screen brightness is switched from equal to 0 to greater than 0, the first selection information may be output.
In some embodiments, the electronic device may output the first selection information in a manner of ringing, may output the first selection information in a manner of voice, may output the first selection information in a manner of flashing a light, may output the first selection information in a manner of text display, and the like, which is not limited herein.
Referring to fig. 6, fig. 6 is a schematic interface diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 6, the electronic device may output, in a text display manner, first selection information "whether a better 5G WIFI network currently exists and switching is performed", and output, in a text display manner, two selection controls "yes" and "no", where the control "yes" is used to indicate that the WIFI network is switched, and the control "no" is used to indicate that the WIFI network is not switched.
Step S512: and responding to a first selection operation input based on the first selection information, and keeping the connection with the 2.4G WIFI network, or disconnecting the connection with the 2.4G WIFI network and establishing the connection with the 5G WIFI network.
In this embodiment, after outputting the first selection information, a selection operation input based on the first selection information may be detected, where when the first selection operation input based on the first selection information is detected, a connection with the 2.4G WIFI network may be maintained or a connection with the 2.4G WIFI network may be disconnected and a connection with the 5G WIFI network may be established in response to the first selection operation input based on the first selection information.
In some embodiments, when the first selection operation indicates to perform WIFI network handover, the connection with the 2.4G WIFI network may be disconnected and the connection with the 5G WIFI network may be established, and when the first selection operation indicates not to perform WIFI network handover, the connection with the 2.4G WIFI network may be maintained. For example, when the first selection operation is a click operation on the control "yes", the connection with the 2.4G WIFI network may be disconnected and the connection with the 5G WIFI network may be established, and when the first selection operation is a click operation on the control "no", the connection with the 2.4G WIFI network may be maintained.
Compared with the method for selecting the WIFI frequency band shown in fig. 1, in the method for selecting the WIFI frequency band provided in another embodiment of the present application, after the connection with the 2.4G WIFI network is established, when the signal intensity of the 2.4G WIFI network and the signal intensity of the 5G WIFI network are scanned to meet the conditions, if the screen state of the electronic device is the screen saver state and the speed of the WIFI network is not less than the specified speed, the connection with the 2.4G WIFI network is maintained, and in addition, when the screen state is switched from the screen saver state to the screen saver state, the connection with the 2.4G WIFI network is disconnected and the connection with the 5G WIFI network is established, so as to improve the WIFI internet surfing experience.
Referring to fig. 7, fig. 7 is a schematic flowchart illustrating a method for selecting a WIFI frequency band according to yet another embodiment of the present application. The method is applied to the electronic device, and will be explained in detail with reference to a flow shown in fig. 7, in this embodiment, the state information includes a screen state and a WIFI network speed, and the method for selecting the WIFI frequency band may specifically include the following steps:
step S601: and when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, continuing to scan the WIFI network within a preset time period.
Step S602: when a 5G WIFI network is scanned within a preset time period, acquiring the signal intensity of the 2.4G WIFI network as a first signal intensity, and acquiring the signal intensity of the 5G WIFI network as a second signal intensity.
Step S603: obtaining a difference between the first signal strength and the second signal strength.
Step S604: and when the first signal strength is greater than the second signal strength and the difference value between the first signal strength and the second signal strength is less than a specified difference value, establishing connection with the 5G WIFI network.
Step S605: and when the 5G WIFI network is not scanned within a preset time period, establishing connection with the 2.4G WIFI network.
Step S606: and continuing to scan the WIFI network.
Step S607: and when the 5G WIFI network is scanned, acquiring the signal intensity of the 2.4G WIFI network as a third signal intensity, and acquiring the signal intensity of the 5G WIFI network as a fourth signal intensity.
Step S608: obtaining a difference between the third signal strength and the fourth signal strength.
For the detailed description of steps S601 to S608, refer to steps S301 to S308, which are not described herein again.
Step S609: and when the third signal intensity is greater than the fourth signal intensity and the difference value between the third signal intensity and the fourth signal intensity is smaller than the specified difference value, acquiring the screen state and the WIFI network speed of the electronic equipment.
In this embodiment, after it is determined that the third signal strength is greater than the fourth signal strength and the difference between the third signal strength and the fourth signal strength is obtained, the difference between the third signal strength and the fourth signal strength may be compared with a specified difference to determine whether the difference between the third signal strength and the fourth signal strength is smaller than the specified difference, where when the determination result represents that the difference between the third signal strength and the fourth signal strength is smaller than the specified difference, the screen status and the WIFI network speed of the electronic device may be obtained.
Step S610: and outputting second selection information when the screen state is a bright screen state.
In some embodiments, after the screen state of the electronic device is acquired, whether the screen state of the electronic device is a screen resting state or not may be determined. When the screen brightness of the electronic device is judged to be 0, the screen state of the electronic device can be determined to be a breath screen state, and when the screen brightness of the electronic device is judged to be greater than 0, the screen state of the electronic device can be determined to be a bright screen state.
In some embodiments, when the screen state is a bright screen state, the second selection information may be output. The electronic device may output the first selection information in a ring mode, may output the first selection information in a voice mode, may output the first selection information in a flashing light mode, may output the first selection information in a text display mode, and the like, which is not limited herein. Referring to fig. 6 again, the electronic device may output second selection information "whether a better 5G WIFI network currently exists and switching occurs" in a text display manner, and output two selection controls "yes" and "no" in a text display manner, where the control "yes" is used to indicate switching of the WIFI network, and the control "no" is used to indicate not switching of the WIFI network.
Step S611: and responding to a second selection operation input based on the second selection information, and keeping the connection with the 2.4G WIFI network, or disconnecting the connection with the 2.4G WIFI network and establishing the connection with the 5G WIFI network.
In this embodiment, after outputting the second selection information, a selection operation input based on the second selection information may be detected, where when the second selection operation input based on the second selection information is detected, a connection with the 2.4G WIFI network may be maintained or a connection with the 2.4G WIFI network may be disconnected and a connection with the 5G WIFI network may be established in response to the second selection operation input based on the second selection information.
In some embodiments, when the second selection operation indicates to perform WIFI network handover, the connection with the 2.4G WIFI network may be disconnected and the connection with the 5G WIFI network may be established, and when the second selection operation indicates not to perform WIFI network handover, the connection with the 2.4G WIFI network may be maintained. For example, when the second selection operation is a click operation on the control "yes", the connection with the 2.4G WIFI network may be disconnected and the connection with the 5G WIFI network may be established, and when the second selection operation is a click operation on the control "no", the connection with the 2.4G WIFI network may be maintained.
Compared with the method for selecting the WIFI frequency band shown in fig. 1, in the method for selecting the WIFI frequency band provided in another embodiment of the present application, after the connection with the 2.4G WIFI network is established, when the signal intensity of the 2.4G WIFI network and the signal intensity of the 5G WIFI network are scanned to meet the conditions, if the screen state of the electronic device is in the screen-on state, the second selection information is input and the connection with the 2.4G WIFI network is maintained based on the second selection operation, or the connection with the 2.4G WIFI network is disconnected and the connection with the 5G WIFI network is established, so as to improve the internet surfing experience of the WIFI.
Referring to fig. 8, fig. 8 is a block diagram illustrating a device 200 for selecting a WIFI frequency band according to an embodiment of the present disclosure. The selection apparatus 200 for the WIFI frequency band is applied to the electronic device, and will be explained with reference to the block diagram shown in fig. 8, where the selection apparatus 200 for the WIFI frequency band includes: WIFI network scanning module 210, signal strength acquisition module 220, difference acquisition module 230 and WIFI network selection module 240, wherein:
the WIFI network scanning module 210 is configured to continue scanning the WIFI network within a preset time period when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned.
The signal strength acquisition module 220 is configured to acquire the signal strength of the 2.4G WIFI network as a first signal strength and acquire the signal strength of the 5G WIFI network as a second signal strength when the 5G WIFI network is scanned within a preset time period.
A difference obtaining module 230, configured to obtain a difference between the first signal strength and the second signal strength.
And a WIFI network selection module 240, configured to establish a connection with the 5G WIFI network when the first signal strength is greater than the second signal strength and a difference between the first signal strength and the second signal strength is less than a specified difference.
Further, the device 200 for selecting a WIFI frequency band further includes: WIFI frequency channel selection module, wherein:
and the WIFI frequency band selection module is used for establishing connection with the 2.4G WIFI network when the 5G WIFI network is not scanned within a preset time period.
Further, the device 200 for selecting a WIFI frequency band further includes: second WIFI network scanning module, second signal strength acquisition module, second difference acquisition module, status information acquisition module and WIFI network processing module, wherein:
and the second WIFI network scanning module is used for continuously scanning the WIFI network.
And the second signal strength acquisition module is used for acquiring the signal strength of the 2.4G WIFI network as third signal strength and acquiring the signal strength of the 5G WIFI network as fourth signal strength when a 5G WIFI network is scanned.
A second difference obtaining module, configured to obtain a difference between the third signal strength and the fourth signal strength.
And the state information acquisition module is used for acquiring the state information of the electronic equipment when the third signal strength is greater than the fourth signal strength and the difference value between the third signal strength and the fourth signal strength is less than the specified difference value.
And the WIFI network processing module is used for processing the 2.4G WIFI network and the 5G WIFI network based on the state information.
Further, the state information includes a screen state and a WIFI network speed, and the WIFI network processing module includes: WIFI network processing submodule, wherein:
and the WIFI network processing submodule is used for processing the 2.4G WIFI network and the 5G WIFI network based on the screen state and the WIFI network speed.
Further, the WIFI network processing sub-module includes: a first WIFI network processing unit, wherein:
and the first WIFI network processing unit is used for disconnecting the connection with the 2.4G WIFI network and establishing the connection with the 5G WIFI network when the screen state is a screen-on state and the speed of the WIFI network is less than a specified speed.
Further, the WIFI network processing sub-module includes: a second WIFI network processing unit, wherein:
and the second WIFI network processing unit is used for keeping connection with the 2.4G WIFI network when the screen state is a screen-on state and the speed of the WIFI network is not less than a specified speed.
Further, the WIFI network processing sub-module further includes: first selection information output unit and third WIFI network processing unit, wherein:
and the first selection information output unit is used for outputting first selection information when the screen state is switched from the screen-on state to the screen-on state.
And the third WIFI network processing unit is used for responding to a first selection operation input based on the first selection information, maintaining the connection with the 2.4G WIFI network, or disconnecting the connection with the 2.4G WIFI network and establishing the connection with the 5G WIFI network.
Further, the WIFI network processing sub-module includes: a second selection information output unit and a fourth WIFI network processing unit, wherein:
and the second selection information output unit is used for outputting second selection information when the screen state is a bright screen state.
And the fourth WIFI network processing unit is used for responding to a second selection operation input based on the second selection information, keeping connection with the 2.4G WIFI network, or disconnecting the connection with the 2.4G WIFI network and establishing connection with the 5G WIFI network.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 9, a block diagram of an electronic device 100 according to an embodiment of the present disclosure is shown. The electronic device 100 may be a smart phone, a tablet computer, an electronic book, or other electronic devices capable of running an application. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 110 may include one or more processing cores, among others. The processor 110 interfaces with various components throughout the electronic device 100 using various interfaces and lines to perform various functions of the electronic device 100 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content to be displayed; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The data storage area may also store data created by the electronic device 100 during use (e.g., phone book, audio-video data, chat log data), and the like.
Referring to fig. 10, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 300 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 300 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 300 includes a non-volatile computer-readable storage medium. The computer readable storage medium 300 has storage space for program code 310 for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 310 may be compressed, for example, in a suitable form.
In summary, according to the selection method, the apparatus, the electronic device, and the storage medium for the WIFI frequency band provided in the embodiments of the present application, when a 2.4G WIFI network is scanned and a 5G WIFI network is not scanned, the WIFI network is continuously scanned within a preset time period, when a 5G WIFI network is scanned within a preset time period, a signal strength of the 2.4G WIFI network is obtained as a first signal strength, a signal strength of the 5G WIFI network is obtained as a second signal strength, a difference between the first signal strength and the second signal strength is obtained, when the first signal strength is greater than the second signal strength and the difference between the first signal strength and the second signal strength is less than a specified difference, a connection with the 5G WIFI network is established, so that the 5G WIFI network is preferentially connected by continuously scanning the WIFI network within the preset time period when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, and WIFI internet experience is improved.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (8)

1. A WIFI frequency band selection method is applied to electronic equipment and comprises the following steps:
when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned, the WIFI network is continuously scanned within a preset time period;
when a 5G WIFI network is scanned within a preset time period, acquiring the signal intensity of the 2.4G WIFI network as a first signal intensity, and acquiring the signal intensity of the 5G WIFI network as a second signal intensity;
obtaining a difference between the first signal strength and the second signal strength;
when the first signal strength is greater than the second signal strength and the difference between the first signal strength and the second signal strength is less than a specified difference, establishing connection with the 5G WIFI network;
when a 5G WIFI network is not scanned within a preset time period, establishing connection with the 2.4G WIFI network;
continuing to scan the WIFI network;
when a 5G WIFI network is scanned, acquiring the signal intensity of the 2.4G WIFI network as a third signal intensity, and acquiring the signal intensity of the 5G WIFI network as a fourth signal intensity;
obtaining a difference between the third signal strength and the fourth signal strength;
when the third signal strength is greater than the fourth signal strength and the difference between the third signal strength and the fourth signal strength is less than the specified difference, acquiring state information of the electronic equipment, wherein the state information comprises a screen state and a WIFI network speed;
and processing the 2.4G WIFI network and the 5G WIFI network based on the screen state and the WIFI network speed.
2. The method of claim 1, wherein processing the 2.4G WIFI network and the 5G WIFI network based on the screen status and the WIFI network speed comprises:
and when the screen state is a screen-on state and the speed of the WIFI network is less than the designated speed, disconnecting the 2.4G WIFI network and establishing the connection with the 5G WIFI network.
3. The method of claim 1, wherein processing the 2.4G WIFI network and the 5G WIFI network based on the screen status and the WIFI network speed comprises:
and when the screen state is a screen state and the speed of the WIFI network is not less than the designated speed, the connection with the 2.4G WIFI network is kept.
4. The method of claim 3, wherein after maintaining the connection to the 2.4G WIFI network when the screen state is a breath screen state and the WIFI network speed is not less than a specified speed, further comprising:
when the screen state is switched from the screen-on state to the screen-on state, outputting first selection information;
and responding to a first selection operation input based on the first selection information, and keeping the connection with the 2.4G WIFI network, or disconnecting the connection with the 2.4G WIFI network and establishing the connection with the 5G WIFI network.
5. The method of claim 1, wherein processing the 2.4G WIFI network and the 5G WIFI network based on the screen status and the WIFI network speed comprises:
when the screen state is a bright screen state, outputting second selection information;
and responding to a second selection operation input based on the second selection information, and keeping the connection with the 2.4G WIFI network, or disconnecting the connection with the 2.4G WIFI network and establishing the connection with the 5G WIFI network.
6. A WIFI frequency band selection device is applied to electronic equipment and comprises:
the WIFI network scanning module is used for continuing scanning the WIFI network within a preset time period when the 2.4G WIFI network is scanned and the 5G WIFI network is not scanned;
the signal intensity acquisition module is used for acquiring the signal intensity of the 2.4G WIFI network as a first signal intensity and acquiring the signal intensity of the 5G WIFI network as a second signal intensity when the 5G WIFI network is scanned within a preset time period;
a difference obtaining module, configured to obtain a difference between the first signal strength and the second signal strength;
the WIFI network selection module is used for establishing connection with the 5G WIFI network when the first signal strength is greater than the second signal strength and the difference value between the first signal strength and the second signal strength is smaller than a specified difference value;
the WIFI frequency band selection module is used for establishing connection with the 2.4G WIFI network when the 5G WIFI network is not scanned within a preset time period;
the second WIFI network scanning module is used for continuously scanning the WIFI network;
the second signal strength acquisition module is used for acquiring the signal strength of the 2.4G WIFI network as third signal strength and acquiring the signal strength of the 5G WIFI network as fourth signal strength when the 5G WIFI network is scanned;
a second difference obtaining module, configured to obtain a difference between the third signal strength and the fourth signal strength;
the state information acquiring module is used for acquiring state information of the electronic equipment when the third signal strength is greater than the fourth signal strength and the difference value between the third signal strength and the fourth signal strength is smaller than the specified difference value, wherein the state information comprises a screen state and a WIFI network speed;
and the WIFI network processing submodule is used for processing the 2.4G WIFI network and the 5G WIFI network based on the screen state and the WIFI network speed.
7. An electronic device comprising a memory and a processor, the memory coupled to the processor, the memory storing instructions that, when executed by the processor, the processor performs the method of any of claims 1-5.
8. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 5.
CN202010784827.1A 2020-08-06 2020-08-06 WIFI frequency band selection method and device, electronic equipment and storage medium Active CN111787599B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010784827.1A CN111787599B (en) 2020-08-06 2020-08-06 WIFI frequency band selection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010784827.1A CN111787599B (en) 2020-08-06 2020-08-06 WIFI frequency band selection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111787599A CN111787599A (en) 2020-10-16
CN111787599B true CN111787599B (en) 2022-09-16

Family

ID=72766188

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010784827.1A Active CN111787599B (en) 2020-08-06 2020-08-06 WIFI frequency band selection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111787599B (en)

Citations (11)

* Cited by examiner, † Cited by third party
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
CN104185218A (en) * 2014-09-22 2014-12-03 联想(北京)有限公司 Control method, controller and electronic device
CN105323816A (en) * 2015-09-29 2016-02-10 联想(北京)有限公司 Information processing method and electronic device
CN105517112A (en) * 2015-12-31 2016-04-20 小米科技有限责任公司 Method and device for displaying WiFi network information
WO2016112587A1 (en) * 2015-01-14 2016-07-21 中兴通讯股份有限公司 Wifi device, and operating method and device of wifi chip therein
CN106658623A (en) * 2016-09-14 2017-05-10 广东欧珀移动通信有限公司 Hotspot network switching method and terminal equipment
CN107820289A (en) * 2017-11-20 2018-03-20 珠海市魅族科技有限公司 A kind of WIFI network switching method, device, terminal and medium
CN108834223A (en) * 2018-06-22 2018-11-16 中国联合网络通信集团有限公司 A kind of method and electronic equipment switching WiFi frequency range
CN109788519A (en) * 2019-03-12 2019-05-21 深圳市网是科技有限公司 A kind of double frequency WiFi intelligent handover algorithms based on 2.4G adaptive threshold
CN110166102A (en) * 2019-05-28 2019-08-23 Oppo广东移动通信有限公司 The switching method and device of WiFi antenna
CN110225562A (en) * 2019-07-09 2019-09-10 杭州叙简安智信息技术有限公司 A method of it is automatically adjusted and is surfed the Internet according to actual scene

Patent Citations (11)

* Cited by examiner, † Cited by third party
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
CN104185218A (en) * 2014-09-22 2014-12-03 联想(北京)有限公司 Control method, controller and electronic device
WO2016112587A1 (en) * 2015-01-14 2016-07-21 中兴通讯股份有限公司 Wifi device, and operating method and device of wifi chip therein
CN105323816A (en) * 2015-09-29 2016-02-10 联想(北京)有限公司 Information processing method and electronic device
CN105517112A (en) * 2015-12-31 2016-04-20 小米科技有限责任公司 Method and device for displaying WiFi network information
CN106658623A (en) * 2016-09-14 2017-05-10 广东欧珀移动通信有限公司 Hotspot network switching method and terminal equipment
CN107820289A (en) * 2017-11-20 2018-03-20 珠海市魅族科技有限公司 A kind of WIFI network switching method, device, terminal and medium
CN108834223A (en) * 2018-06-22 2018-11-16 中国联合网络通信集团有限公司 A kind of method and electronic equipment switching WiFi frequency range
CN109788519A (en) * 2019-03-12 2019-05-21 深圳市网是科技有限公司 A kind of double frequency WiFi intelligent handover algorithms based on 2.4G adaptive threshold
CN110166102A (en) * 2019-05-28 2019-08-23 Oppo广东移动通信有限公司 The switching method and device of WiFi antenna
CN110225562A (en) * 2019-07-09 2019-09-10 杭州叙简安智信息技术有限公司 A method of it is automatically adjusted and is surfed the Internet according to actual scene

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于ARM和WiFi的互联网多终端病房监护***设计;王玉荣等;《南通职业大学学报》;20180315(第01期);全文 *
手机***打通汽车数据的应用场景案例;韦勇等;《电子元器件与信息技术》;20191220(第12期);全文 *

Also Published As

Publication number Publication date
CN111787599A (en) 2020-10-16

Similar Documents

Publication Publication Date Title
CN110168942B (en) Method, terminal, system and storage medium for selecting Bluetooth device
CN104980411B (en) Video call control method, server, terminal and video call system
CN106792120B (en) Video picture display method and device and terminal
CN109274407B (en) Data transmission method, device, electronic equipment and storage medium
CN111124351B (en) Audio output method, audio output device, electronic equipment and storage medium
CN112672388A (en) Call method, device, storage medium and user terminal
KR20130102323A (en) Device and method for connecting network in wireless terminal
CN104363634A (en) Method for acquiring Bluetooth broadcasting information
CN114175748B (en) Communication frequency adjusting method, device, electronic equipment and storage medium
CN112135081B (en) Mode control method and device, frame insertion chip and electronic equipment
EP3783957A1 (en) Transmission path switching method and device
CN105338403B (en) Filter processing method and device and electronic equipment
CN111866976A (en) Network switching method and device
US8670556B2 (en) Multi-participant communication system with audio manager responsive to mode change requests
CN110602683B (en) Bluetooth control method, device, mobile terminal and storage medium
CN104333666A (en) A method and apparatus for processing simultaneous mutual call
CN111131612B (en) Screen color temperature control method and device, storage medium and mobile terminal
CN104363636A (en) Terminal
CN111787599B (en) WIFI frequency band selection method and device, electronic equipment and storage medium
CN112738861A (en) Terminal signal reselection method, related device and computer storage medium
US20230115955A1 (en) Voice call method and apparatus and electronic device
CN110855838A (en) Positioning service control method, positioning service control device, mobile terminal and storage medium
CN111343703B (en) Transmission power control method, device, mobile terminal and storage medium
CN116744264A (en) Communication method of Bluetooth protocol, electronic equipment, device, storage medium and product
KR100626949B1 (en) Data communication method using Wireless LAN network in mobile phone

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