WO2021136039A1 - 设备控制方法、装置、存储介质及电子设备 - Google Patents

设备控制方法、装置、存储介质及电子设备 Download PDF

Info

Publication number
WO2021136039A1
WO2021136039A1 PCT/CN2020/138684 CN2020138684W WO2021136039A1 WO 2021136039 A1 WO2021136039 A1 WO 2021136039A1 CN 2020138684 W CN2020138684 W CN 2020138684W WO 2021136039 A1 WO2021136039 A1 WO 2021136039A1
Authority
WO
WIPO (PCT)
Prior art keywords
access point
electronic device
access points
accessible
frequency
Prior art date
Application number
PCT/CN2020/138684
Other languages
English (en)
French (fr)
Inventor
李雄
黄俊源
黄园
Original Assignee
Oppo广东移动通信有限公司
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广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Priority to EP20910204.5A priority Critical patent/EP4064760A4/en
Publication of WO2021136039A1 publication Critical patent/WO2021136039A1/zh
Priority to US17/855,308 priority patent/US20220338289A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/0009Transmission of position information to remote stations
    • G01S5/0018Transmission from mobile station to base station
    • G01S5/0036Transmission from mobile station to base station of measured values, i.e. measurement on mobile and position calculation on base station
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/309Measuring or estimating channel quality parameters
    • H04B17/318Received signal strength
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/20Selecting an access point
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • 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]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W88/00Devices specially adapted for wireless communication networks, e.g. terminals, base stations or access point devices
    • H04W88/02Terminal devices
    • H04W88/06Terminal devices adapted for operation in multiple networks or having at least two operational modes, e.g. multi-mode terminals

Definitions

  • This application belongs to the field of Wi-Fi technology, and in particular relates to a device control method, device, storage medium, and electronic equipment.
  • Wi-Fi technology is a widely used wireless network transmission technology.
  • electronic devices can use dual Wi-Fi technology to simultaneously connect to two Wi-Fi networks for Internet access.
  • dual Wi-Fi technology electronic devices can obtain higher network speeds and actual throughput.
  • the embodiments of the present application provide a device control method, device, storage medium, and electronic device, which can improve the flexibility of the electronic device in selecting a Wi-Fi network for the Wi-Fi module.
  • an embodiment of the present application provides a device control method, which is applied to an electronic device.
  • the electronic device includes a first Wi-Fi module and a second Wi-Fi module.
  • the electronic device passes through the first Wi-Fi module.
  • the Fi module is connected to the first Wi-Fi network, and the method includes:
  • the frequency band category includes at least 2.4 GHz frequency band and 5 GHz frequency band;
  • the accessible access points have different frequency band categories, acquiring the distance between each of the accessible access points and the electronic device;
  • an embodiment of the present application provides a device control device, which is applied to an electronic device.
  • the electronic device includes a first Wi-Fi module and a second Wi-Fi module.
  • the electronic device passes through the first Wi-Fi module.
  • the Fi module is connected to the first Wi-Fi network, and the device includes:
  • the first obtaining module is configured to obtain the working frequency of each accessible access point and its corresponding frequency band category, where the frequency band category includes at least 2.4 GHz frequency band and 5 GHz frequency band;
  • the second obtaining module is configured to obtain the distance between each of the accessible access points and the electronic device if the accessible access points have different frequency band categories;
  • a determining module configured to determine a target access point according to the distance between each of the accessible access points and the electronic device and the working frequency of each of the accessible access points;
  • the connection module is configured to connect to the target access point through the second Wi-Fi module.
  • an embodiment of the present application provides a storage medium on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute the process in the device control method provided by the embodiment of the present application.
  • an embodiment of the present application also provides an electronic device, including a memory and a processor, and the processor is configured to execute the device control method provided in the embodiment of the present application by calling a computer program stored in the memory. Process.
  • Fig. 1 is a schematic flowchart of a device control method provided by an embodiment of the present application.
  • FIG. 2 is another schematic flowchart of the device control method provided by an embodiment of the present application.
  • 3 to 4 are schematic diagrams of scenes of the device control method provided by the embodiments of the present application.
  • Fig. 5 is a schematic structural diagram of a device control device provided by an embodiment of the present application.
  • Fig. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another structure of an electronic device provided by an embodiment of the present application.
  • the embodiment of the present application provides a device control method, which is applied to an electronic device, wherein the electronic device includes a first Wi-Fi module and a second Wi-Fi module, and the electronic device passes through the first Wi-Fi module Connecting to the first Wi-Fi network, the method includes:
  • the frequency band category includes at least the 2.4 GHz frequency band and the 5 GHz frequency band;
  • the accessible access points have different frequency band categories, acquiring the distance between each of the accessible access points and the electronic device;
  • the target access point is determined according to the distance between each of the accessible access points and the electronic device and the working frequency of each of the accessible access points
  • the steps can include:
  • the target access point is determined from the accessible access points , Wherein the Wi-Fi network corresponding to the target access point works in the 2.4 GHz frequency band.
  • the distance between each of the accessible access points and the electronic device is greater than or equal to a preset first distance threshold, then access from the accessible access point
  • the target access point is determined from the points, where the step of the Wi-Fi network corresponding to the target access point working in the 2.4 GHz frequency band may include:
  • a target access point is determined from the accessible access points, where the Wi-Fi network corresponding to the target access point is operating at 2.4 GHz band.
  • the method may further include:
  • a target access point is determined from the accessible access points, where the Wi-Fi network corresponding to the target access point is working in 2.4GHz frequency band, and the target frequency interval is greater than the interval between the working frequency of the access points other than the target access point and the first working frequency among the accessible access points,
  • the target frequency interval is the interval between the second working frequency corresponding to the target access point and the first working frequency.
  • the target access point is determined according to the distance between each of the accessible access points and the electronic device and the working frequency of each of the accessible access points
  • the steps can include:
  • the third working frequency corresponding to the alternative access point is acquired, where the alternative access point is the same as the The distance of the electronic device is less than the preset first distance threshold;
  • the candidate access point is determined as the target access point.
  • the method may further include:
  • determining the candidate access point as a target access point includes:
  • the The alternate access point is determined as the target access point.
  • the step of obtaining the distance between each of the accessible access points and the electronic device may include:
  • the execution subject of the embodiments of the present application may be an electronic device such as a smart phone or a tablet computer.
  • FIG. 1 is a schematic flowchart of a device control method provided by an embodiment of the present application.
  • the device control method can be applied to an electronic device, and the electronic device can include a first Wi-Fi module and a second Wi-Fi module. Wherein, the electronic device has been connected to the first Wi-Fi network through the first Wi-Fi module.
  • the process of the device control method may include:
  • each accessible access point and its corresponding frequency band category, where the frequency band category includes at least a 2.4 GHz frequency band and a 5 GHz frequency band.
  • Wi-Fi technology is a widely used wireless network transmission technology.
  • electronic devices can use dual Wi-Fi technology to simultaneously connect to two Wi-Fi networks for Internet access.
  • dual Wi-Fi technology electronic devices can obtain higher network speeds and actual throughput.
  • the electronic device when dual Wi-Fi needs to be used, the electronic device has poor flexibility in selecting a Wi-Fi network for the Wi-Fi module. For example, when dual Wi-Fi needs to be used, the electronic device may randomly select a Wi-Fi network and so on.
  • the electronic device may first obtain the work of each accessible access point (AP) Frequency and its corresponding frequency band category.
  • the above-mentioned frequency band category includes at least 2.4 GHz frequency band and 5 GHz frequency band. That is, in the embodiment of the present application, the electronic device may first obtain the working frequency of each accessible access point, and determine whether each accessible access point works in the 2.4GHz frequency band or 5GHz. Frequency band.
  • the electronic device After obtaining the frequency band category corresponding to the working frequency of each accessible access point, the electronic device can detect whether these accessible access points have different frequency band categories. That is, the electronic device can detect whether some of these accessible access points work in the 2.4 GHz frequency band and some work in the 5 GHz frequency band.
  • the electronic device can perform other operations .
  • these accessible access points have different frequency band categories, for example, some of these accessible access points work in the 2.4GHz frequency band and some access points work in the 5GHz frequency band, Then you can enter the flow of 102.
  • the accessible access points have different frequency band categories, obtain the distance between each accessible access point and the electronic device.
  • the electronic device detects that some of the accessible access points work in the 2.4 GHz frequency band, and some access points work in the 5 GHz frequency band. In this case, the electronic device can obtain the distance between each accessible access point and the electronic device.
  • 103 and 104 can include:
  • the electronic device After obtaining the distance between each accessible access point and the electronic device, the electronic device can be based on the distance between each accessible access point and the electronic device, and the work of each accessible access point Frequency, determine a target access point, and connect to the target access point through the second Wi-Fi module, so as to realize the dual Wi-Fi function.
  • the electronic device has been connected to the first Wi-Fi network through the first Wi-Fi module.
  • the electronic device can first obtain the access points of each accessible access point.
  • Working frequency and its corresponding frequency band category That is, the electronic device can first determine whether each accessible access point works in the 2.4 GHz frequency band or the 5 GHz frequency band.
  • currently accessible access points include three access points A, B, and C.
  • the electronic device can detect whether these accessible access points work in different working frequency bands. For example, the electronic device detects that the access points A and B are working in the 2.4 GHz frequency band, and the access point C is working in the 5 GHz frequency band. That is, these accessible access points work in different working frequency bands.
  • the electronic device can obtain the distance between the access points A, B, and C and the electronic device, for example, the distance between the access point A and the electronic device is d 1 , and the access point B and the electronic device The distance between the access point C and the electronic device is d 2 , and the distance between the access point C and the electronic device is d 3 .
  • the electronic device can determine a target access point according to the distance between each access point and the electronic device (i.e. d 1 , d 2 , d 3 ) and the working frequency of each access point, and pass the second
  • the Wi-Fi module is connected to the target access point. For example, if the electronic device determines the access point A as the target access point, the electronic device can connect to the access point A through the second Wi-Fi module, so that the Wi-Fi corresponding to the access point A can be connected to the access point A.
  • the Fi network is determined as the second Wi-Fi to realize the dual Wi-Fi function.
  • the electronic device when the accessible access points have different frequency band categories, the electronic device can be based on the distance between each accessible access point and the electronic device and each accessible access point.
  • the working frequency of the access point is used to determine the target access point, and connect to the target access point through the second Wi-Fi module. Therefore, compared to technical solutions such as randomly selecting a Wi-Fi network, the embodiments of the present application can improve the flexibility of the electronic device in selecting a Wi-Fi network for the Wi-Fi module.
  • FIG. 2 is a schematic diagram of another flow of the device control method provided by an embodiment of the application.
  • the device control method can be applied to an electronic device, and the electronic device can include a first Wi-Fi module and a second Wi-Fi module. Wherein, the electronic device has been connected to the first Wi-Fi network through the first Wi-Fi module.
  • the process of the device control method may include:
  • the electronic device obtains the operating frequency of each accessible access point and its corresponding frequency band category, where the frequency band category includes at least a 2.4 GHz frequency band and a 5 GHz frequency band.
  • the electronic device may first obtain the working frequency of each accessible access point in the current environment and its corresponding frequency band category.
  • the above-mentioned frequency band category includes at least 2.4 GHz frequency band and 5 GHz frequency band. That is, in the embodiment of the present application, the electronic device may first obtain the working frequency of each accessible access point, and then determine whether each accessible access point works in the 2.4GHz frequency band or 5GHz frequency band.
  • the electronic device After obtaining the frequency band category corresponding to the working frequency of each accessible access point, the electronic device can detect whether these accessible access points have different frequency band categories. That is, the electronic device can detect whether some of these accessible access points work in the 2.4 GHz frequency band and some work in the 5 GHz frequency band.
  • the electronic device can perform other operations . For example, the electronic device can determine the access point that has the least interference with the working frequency band of the first Wi-Fi network among the accessible access points as the target access point, and connect to the access point through the second Wi-Fi module. The target access point. Alternatively, the electronic device may determine the access point with the strongest signal strength among the accessible access points as the target access point, and connect to the target access point through the second Wi-Fi module.
  • the electronic device obtains the distance between each accessible access point and the electronic device.
  • the electronic device detects that some of the currently accessible access points work in the 2.4 GHz frequency band, while some of the access points work in the 5 GHz frequency band. In this case, the electronic device can obtain the distance between each accessible access point and the electronic device.
  • the electronic device may obtain the distance between each accessible access point and the electronic device in the following manner:
  • the electronic device obtains the Wi-Fi signal strength of the Wi-Fi network corresponding to each accessible access point;
  • the electronic device determines the distance between each accessible access point and the electronic device.
  • the manufacturer of electronic equipment can pre-measure the distance (between the access point and the electronic device) corresponding to different Wi-Fi signal strengths in a laboratory environment, and form the relationship between the Wi-Fi signal strength and the distance. Mapping table. Then, after acquiring the Wi-Fi signal strength corresponding to each accessible access point, the electronic device can determine the Wi-Fi signal strength corresponding to each accessible access point according to the above-mentioned mapping relationship table and the corresponding Wi-Fi signal strength of each accessible access point. Determine the distance between each accessible access point and the electronic device.
  • the electronic device may also determine the distance between the accessible access point and the electronic device in the following manner: For example, the electronic device may send a detection data packet to the access point, and the detection data packet After reaching the access point, it needs to be sent back to the electronic device by the access point. Then, the electronic device can count the time difference from sending out the detection data packet to receiving it back, and calculate the distance between the access point and the electronic device according to the time difference. Then, when the time difference is longer, it can be considered that the access point is farther away from the electronic device.
  • the electronic device After determining the distance between each accessible access point and the electronic device, the electronic device can detect whether the distance between all accessible access points and the electronic device is greater than or equal to the preset first distance threshold.
  • step 203 If it is detected that the distance between each accessible access point and the electronic device is greater than or equal to the preset first distance threshold, then the step 203 can be entered.
  • step 206 may be entered.
  • the electronic device obtains the first working frequency corresponding to the first Wi-Fi network.
  • the electronic device detects that the distance between all accessible access points in the current environment and the electronic device is greater than or equal to the preset first distance threshold, it means that all currently accessible access points are The distance of electronic equipment is relatively long.
  • the electronic device can determine a target access point from the accessible access points, and the Wi-Fi network corresponding to the target access point works in the 2.4 GHz frequency band.
  • the electronic device may obtain the first working frequency corresponding to the first Wi-Fi network, and detect whether the first working frequency corresponding to the first Wi-Fi network belongs to the 2.4 GHz frequency band or the 5 GHz frequency band.
  • the first working frequency corresponding to the first Wi-Fi network belongs to the 5 GHz frequency band, then it can enter 204.
  • the first working frequency corresponding to the first Wi-Fi network belongs to the 2.4 GHz frequency band, then it can enter 205.
  • the electronic device determines the target access point from the accessible access points, where the Wi-Fi network corresponding to the target access point works at 2.4GHz Frequency band.
  • the electronic device can determine the access point working in the 2.4GHz frequency band among the accessible access points as the target access point, and connect through the second Wi-Fi module Go to the target to access the access point to realize the dual Wi-Fi function.
  • the electronic device can randomly determine any access point operating in the 2.4 GHz frequency band as the target access point.
  • the first Wi-Fi module is connected to an access point operating in the 5 GHz frequency band
  • the second Wi-Fi module is connected to an access point operating in the 2.4 GHz frequency band.
  • the embodiment of this application adopts the second Wi-Fi module Choosing an access point whose working channel belongs to the 2.4GHz frequency band can ensure the strength of the Wi-Fi signal corresponding to the second Wi-Fi network.
  • the electronic device determines a target access point from the accessible access points, where the Wi-Fi network corresponding to the target access point is working at 2.4 GHz.
  • GHz frequency band and the target frequency interval is greater than the interval between the working frequency of the accessible access points except the target access point and the first working frequency, and the target frequency interval is the target The interval between the second working frequency and the first working frequency corresponding to the access point.
  • the electronic device can determine the target access point from the accessible access points, where the Wi-Fi network corresponding to the target access point works in the 2.4GHz frequency band and the target frequency The interval is greater than the interval between the working frequency of the accessible access point except the target access point and the first working frequency, and the target frequency interval is corresponding to the target access point The interval between the second operating frequency and the first operating frequency.
  • the frequency interval between the second operating frequency and the first operating frequency corresponding to the target access point is greater than the frequency interval between the operating frequencies of other accessible access points and the first operating frequency.
  • the target access point is an access point that works in the 2.4 GHz frequency band and has the least interference with the first Wi-Fi network among the currently accessible access points.
  • the second Wi-Fi module connected to the second Wi-Fi module of the electronic device -Fi network is the Wi-Fi network corresponding to the access point working in the 2.4GHz frequency band. Due to the strong penetration capability of signals in the 2.4 GHz frequency band, the embodiment of the present application selects the access point whose working channel belongs to the 2.4 GHz frequency band for the second Wi-Fi module to ensure that the Wi-Fi network corresponding to the second Wi-Fi network -Fi signal strength.
  • the electronic device obtains the third working frequency corresponding to the alternative access point, where the alternative access point and the electronic device The distance of is less than the preset first distance threshold.
  • the electronic device obtains the first working frequency corresponding to the first Wi-Fi network.
  • the electronic device determines the candidate access point as the target access point.
  • 206, 207, and 208 may include:
  • the electronic device detects that not all the distances between currently accessible access points and the electronic device are greater than or equal to the preset first distance threshold. For example, the electronic device detects that there is a candidate access point among currently accessible access points, and the distance between the candidate access point and the electronic device is less than the preset first distance threshold. That is, among the currently accessible access points, there are access points that are closer to the electronic device. In this case, the electronic device can obtain the third operating frequency corresponding to the alternate access point.
  • the electronic device may also obtain the first working frequency of the first Wi-Fi network corresponding to the first Wi-Fi module, and detect whether the frequency interval between the third working frequency and the first working frequency is greater than or equal to a preset interval threshold.
  • the electronic device may determine the candidate access point as the target access point, and use the second Wi-Fi The module is connected to the target access point to realize dual Wi-Fi function.
  • the electronic device may also obtain the received signal strength of the candidate access point. Then, the electronic device may detect that the frequency interval between the third working frequency and the first working frequency is greater than or equal to the preset interval threshold, and the received signal strength of the candidate access point is greater than or equal to the preset strength threshold, The alternate access point is determined as the target access point. That is, the target access point selected by the electronic device for the second Wi-Fi module not only needs to be closer to the electronic device, but also the signal of the target access point is better.
  • the electronic device can select an access point whose working frequency and the first working frequency corresponding to the first Wi-Fi network interfere less than the preset value from other accessible access points as the target access point. Access Point.
  • the electronic device is connected to the target access point through the second Wi-Fi module.
  • the electronic device can be connected to the target access point through the second Wi-Fi module, thereby realizing the dual Wi-Fi function.
  • FIG. 3 to FIG. 4 are schematic diagrams of scenes of the device control method provided by the embodiments of the application.
  • the electronic device is currently connected to the first Wi-Fi network through the first Wi-Fi module.
  • the first Wi-Fi network may be referred to as the main Wi-Fi network.
  • the electronic device detects that the dual Wi-Fi function needs to be turned on, that is, the electronic device needs to connect to another Wi-Fi network through its second Wi-Fi module.
  • the electronic device may first obtain the working frequency of each accessible access point in the current environment and its corresponding frequency band category.
  • the above-mentioned frequency band category includes at least 2.4 GHz frequency band and 5 GHz frequency band. That is, in the embodiment of the present application, the electronic device may first obtain the working frequency of each accessible access point, and then determine whether each accessible access point works in the 2.4GHz frequency band or 5GHz. Frequency band. For example, the electronic device determines that the currently accessible access points include A, B, C, D, E, and F. Among them, the Wi-Fi network corresponding to the access points A, B, C, and D works in 2.4 In the GHz frequency band, the Wi-Fi networks corresponding to the access points E and F work in the 5 GHz frequency band.
  • the electronic device can determine each accessible access point according to the Wi-Fi signal strength of each accessible access point it receives The distance between the access point and the electronic device.
  • the electronic device can detect whether the distance between all accessible access points and the electronic device is greater than or equal to the preset first distance threshold.
  • the electronic device can Acquire the first working frequency corresponding to the first Wi-Fi network.
  • the electronic device can determine the access point with the strongest signal strength among the accessible access points that work in the 2.4GHz frequency band as the target access point, and pass the second The Wi-Fi module is connected to the target access point, thereby connecting to obtain a second Wi-Fi network, which may be called a secondary Wi-Fi network, for example.
  • a second Wi-Fi network which may be called a secondary Wi-Fi network, for example.
  • the Wi-Fi networks corresponding to access points A, B, C, and D work in the 2.4GHz frequency band, and the Wi-Fi signal of access point A received by the electronic device is the strongest, then the electronic device can access Access point A is determined as the target access point. That is, at this time, the dual Wi-Fi network of the electronic device is working in the 5 GHz frequency band for the main Wi-Fi network, and the secondary Wi-Fi network is working in the 2.4 GHz frequency band.
  • the electronic device can determine the access point with the least interference with the main Wi-Fi network in the Wi-Fi network corresponding to the currently accessible access point as the target access point , And connect to the target access point through the second Wi-Fi module, thereby connecting to the second Wi-Fi network, that is, at this time the primary Wi-Fi network and the secondary Wi-Fi network are working in the 2.4GHz frequency band. For example, if the Wi-Fi network corresponding to access point A, B, C, D works in the 2.4GHz frequency band, and the Wi-Fi network corresponding to access point B has the least interference to the main Wi-Fi network, then the electronic device The access point B can be determined as the target access point.
  • the electronic device can determine the access points D and E as candidate access points.
  • the electronic device can obtain the working frequency of the Wi-Fi network corresponding to the access point D and the working frequency of the Wi-Fi network corresponding to the access point E. In addition, the electronic device can also obtain the first operating frequency corresponding to the first Wi-Fi network.
  • the electronic device can detect whether the frequency interval between the first operating frequency and the operating frequency of the Wi-Fi network corresponding to the access point D is greater than or equal to the preset interval threshold, and detect the first operating frequency and the access point Whether the frequency interval between the working frequencies of the Wi-Fi network corresponding to E is greater than or equal to the preset interval threshold. For example, in this embodiment, the electronic device detects that the frequency interval between the first operating frequency and the operating frequency of the Wi-Fi network corresponding to the access point D is greater than the preset interval threshold, and the first operating frequency and the access interface The frequency interval between the working frequencies of the Wi-Fi network corresponding to the entry point E is less than the preset interval threshold. In this case, the electronic device may determine the access point D as the target access point, and connect to the target access point through the second Wi-Fi module.
  • the electronic device can connect to the target access point through the second Wi-Fi module, thereby connecting to the secondary Wi-Fi network, as shown in FIG. 4.
  • FIG. 5 is a schematic structural diagram of a device control apparatus provided by an embodiment of the application.
  • the device control device can be applied to an electronic device, the electronic device includes a first Wi-Fi module and a second Wi-Fi module, the electronic device is connected to a first Wi-Fi network through the first Wi-Fi module .
  • the device control apparatus 300 may include: a first acquisition module 301, a second acquisition module 302, a determination module 303, and a connection module 304.
  • the first obtaining module 301 is configured to obtain the working frequency of each accessible access point and its corresponding frequency band category, where the frequency band category includes at least a 2.4 GHz frequency band and a 5 GHz frequency band.
  • the second obtaining module 302 is configured to obtain the distance between each of the accessible access points and the electronic device if the accessible access points have different frequency band categories.
  • the determining module 303 is configured to determine the target access point according to the distance between each of the accessible access points and the electronic device and the working frequency of each of the accessible access points.
  • the connection module 304 is configured to connect to the target access point through the second Wi-Fi module.
  • the determining module 303 may be used to:
  • the target access point is determined from the accessible access points , Wherein the Wi-Fi network corresponding to the target access point works in the 2.4 GHz frequency band.
  • the determining module 303 may be used to:
  • a target access point is determined from the accessible access points, where the Wi-Fi network corresponding to the target access point is operating at 2.4 GHz band.
  • the determining module 303 may also be used for:
  • a target access point is determined from the accessible access points, where the Wi-Fi network corresponding to the target access point is working in 2.4GHz frequency band, and the target frequency interval is greater than the interval between the working frequency of the access points other than the target access point and the first working frequency among the accessible access points,
  • the target frequency interval is the interval between the second working frequency corresponding to the target access point and the first working frequency.
  • the determining module 303 may be used to:
  • the third working frequency corresponding to the alternative access point is acquired, where the alternative access point is the same as the The distance of the electronic device is less than the preset first distance threshold;
  • the candidate access point is determined as the target access point.
  • the determining module 303 may also be used for:
  • the The alternate access point is determined as the target access point.
  • the second acquisition module 302 may be used to:
  • the embodiment of the present application provides a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed on a computer, the computer is caused to execute the process in the device control method provided in this embodiment.
  • An embodiment of the present application also provides an electronic device, including a memory and a processor, and the processor is configured to execute a process in the device control method provided in this embodiment by calling a computer program stored in the memory.
  • the above-mentioned electronic device may be a mobile terminal such as a tablet computer or a smart phone.
  • FIG. 6 is a schematic structural diagram of an electronic device provided by an embodiment of the application.
  • the electronic device 400 may include components such as a Wi-Fi module 401, a memory 402, and a processor 403.
  • components such as a Wi-Fi module 401, a memory 402, and a processor 403.
  • FIG. 6 does not constitute a limitation on the electronic device, and may include more or fewer components than those shown in the figure, or a combination of certain components, or different component arrangements.
  • the Wi-Fi module 401 may be a first Wi-Fi module and a second Wi-Fi module.
  • the first Wi-Fi module may include a first MAC address and a first Wi-Fi antenna.
  • the second Wi-Fi module may include a second MAC address and a second Wi-Fi antenna.
  • the electronic device may establish a connection with the first access point AP through the first Wi-Fi antenna based on the first MAC address, thereby connecting to the first Wi-Fi network.
  • the electronic device may also establish a connection with the second access point AP through the second Wi-Fi antenna based on the second MAC address, thereby connecting to the second Wi-Fi network.
  • the memory 402 can be used to store application programs and data.
  • the application program stored in the memory 402 contains executable code.
  • Application programs can be composed of various functional modules.
  • the processor 403 executes various functional applications and data processing by running application programs stored in the memory 402.
  • the processor 403 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device. It executes the electronic device by running or executing the application program stored in the memory 402 and calling the data stored in the memory 402. The various functions and processing data of the electronic equipment can be used to monitor the electronic equipment as a whole.
  • the electronic device has been connected to the first Wi-Fi network through the first Wi-Fi module, and the processor 403 in the electronic device will execute the process of one or more applications according to the following instructions
  • the corresponding executable code is loaded into the memory 402, and the processor 403 runs the application program stored in the memory 402 to execute:
  • the frequency band category includes at least 2.4 GHz frequency band and 5 GHz frequency band;
  • the accessible access points have different frequency band categories, acquiring the distance between each of the accessible access points and the electronic device;
  • the electronic device 400 may include components such as a Wi-Fi module 401, a memory 402, a processor 403, an input unit 404, an output unit 405, and a battery 406.
  • the Wi-Fi module 401 may be a first Wi-Fi module and a second Wi-Fi module.
  • the first Wi-Fi module may include a first MAC address and a first Wi-Fi antenna.
  • the second Wi-Fi module may include a second MAC address and a second Wi-Fi antenna.
  • the electronic device may establish a connection with the first access point AP through the first Wi-Fi antenna based on the first MAC address, thereby connecting to the first Wi-Fi network.
  • the electronic device may also establish a connection with the second access point AP through the second Wi-Fi antenna based on the second MAC address, thereby connecting to the second Wi-Fi network.
  • the memory 402 can be used to store application programs and data.
  • the application program stored in the memory 402 contains executable code.
  • Application programs can be composed of various functional modules.
  • the processor 403 executes various functional applications and data processing by running application programs stored in the memory 402.
  • the processor 403 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device. It executes the electronic device by running or executing the application program stored in the memory 402 and calling the data stored in the memory 402. The various functions and processing data of the electronic equipment can be used to monitor the electronic equipment as a whole.
  • the input unit 404 can be used to receive input numbers, character information, or user characteristic information (such as fingerprints), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
  • user characteristic information such as fingerprints
  • the output unit 405 may be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device. These graphical user interfaces may be composed of graphics, text, icons, videos, and any combination thereof.
  • the output unit may include a display panel.
  • the battery 406 can provide power support for various components in the electronic device.
  • the electronic device has been connected to the first Wi-Fi network through the first Wi-Fi module, and the processor 403 in the electronic device will execute the process of one or more applications according to the following instructions
  • the corresponding executable code is loaded into the memory 402, and the processor 403 runs the application program stored in the memory 402 to execute:
  • the frequency band category includes at least 2.4 GHz frequency band and 5 GHz frequency band;
  • the accessible access points have different frequency band categories, acquiring the distance between each of the accessible access points and the electronic device;
  • the processor 403 executes the operation frequency according to the distance between each of the accessible access points and the electronic device and the operating frequency of each of the accessible access points, When determining the target access point, it may be executed: if the distance between each of the accessible access points and the electronic device is greater than or equal to the preset first distance threshold, then from the accessible access point The target access point is determined from the access points, where the Wi-Fi network corresponding to the target access point works in the 2.4 GHz frequency band.
  • the processor 403 executes, if the distance between each of the accessible access points and the electronic device is greater than or equal to a preset first distance threshold, then perform The target access point is determined from the accessed access points, and when the Wi-Fi network corresponding to the target access point is working in the 2.4GHz frequency band, it can be executed: if each of the accessible access points If the distance between the access point and the electronic device is greater than or equal to the preset first distance threshold, the first working frequency corresponding to the first Wi-Fi network is acquired; if the first working frequency belongs to the 5GHz frequency band, then The target access point is determined from the accessible access points, where the Wi-Fi network corresponding to the target access point works in the 2.4 GHz frequency band.
  • the processor 403 may further execute: if the first operating frequency belongs to the 2.4 GHz frequency band, determine a target access point from the accessible access points, where , The Wi-Fi network corresponding to the target access point works in the 2.4 GHz frequency band, and the target frequency interval is greater than that of the accessible access points except for the target access point.
  • the interval between the operating frequency of the point and the first operating frequency, and the target frequency interval is the interval between the second operating frequency corresponding to the target access point and the first operating frequency.
  • the processor 403 executes the operation frequency according to the distance between each of the accessible access points and the electronic device and the operating frequency of each of the accessible access points, When determining the target access point, it may be executed: if there is an alternative access point among the accessible access points, obtain the third working frequency corresponding to the alternative access point, where: The distance between the candidate access point and the electronic device is less than the preset first distance threshold; the first working frequency corresponding to the first Wi-Fi network is acquired; if the third working frequency is the same as the first If the frequency interval of a working frequency is greater than or equal to the preset interval threshold, the candidate access point is determined as the target access point.
  • the processor 403 may further execute: acquiring the received signal strength of the candidate access point.
  • the processor 403 executes that if the frequency interval between the third operating frequency and the first operating frequency is greater than or equal to a preset interval threshold, determine the candidate access point as the target access point If the frequency interval between the third working frequency and the first working frequency is greater than or equal to the preset interval threshold, and the received signal strength of the candidate access point is greater than or equal to the preset strength threshold , The candidate access point is determined as the target access point.
  • the processor 403 when the processor 403 executes the acquiring of the distance between each of the accessible access points and the electronic device, it may execute: acquiring each of the accessible access points Wi-Fi signal strength of the Wi-Fi network corresponding to each point; determine each of the accessible access points according to the Wi-Fi signal strength of the Wi-Fi network corresponding to each of the accessible access points The distance between the point and the electronic device.
  • the device control device provided in the embodiment of the application belongs to the same concept as the device control method in the above embodiment, and any method provided in the device control method embodiment can be run on the device control device.
  • any method provided in the device control method embodiment can be run on the device control device.
  • the computer program may be stored in a computer readable storage medium, such as stored in a memory, and executed by at least one processor.
  • the execution process may include the flow of the embodiment of the device control method.
  • the storage medium may be a magnetic disk, an optical disc, a read only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), etc.
  • the device control device of the embodiment of the present application its functional modules may be integrated into one processing chip, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium, such as a read-only memory, a magnetic disk or an optical disk, etc. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Electromagnetism (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请公开了一种设备控制方法、装置、存储介质及电子设备。获取各可接入的访问接入点的工作频率及对应的频段类别;若可接入的访问接入点具有不同的频段类别,则获取各可接入的访问接入点与电子设备的距离;根据各距离以及各可接入的访问接入点的工作频率,确定目标访问接入点;通过第二Wi-Fi模块连接到目标访问接入点。

Description

设备控制方法、装置、存储介质及电子设备
本申请要求于2019年12月30日提交中国专利局、申请号为201911396274.6、申请名称为“设备控制方法、装置、存储介质及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于Wi-Fi技术领域,尤其涉及一种设备控制方法、装置、存储介质及电子设备。
背景技术
Wi-Fi技术是目前使用非常广泛的一种无线网络传输技术。相关技术中,电子设备可以使用双Wi-Fi技术同时连接到两个Wi-Fi网络进行上网。利用双Wi-Fi技术,电子设备可以获取到更高的网速和实际吞吐量。
发明内容
本申请实施例提供一种设备控制方法、装置、存储介质及电子设备,可以提高电子设备为Wi-Fi模块选择Wi-Fi网络的灵活性。
第一方面,本申请实施例提供一种设备控制方法,应用于电子设备,所述电子设备包括第一Wi-Fi模块和第二Wi-Fi模块,所述电子设备通过所述第一Wi-Fi模块连接到第一Wi-Fi网络,所述方法包括:
获取各可接入的访问接入点的工作频率及其对应的频段类别,其中,所述频段类别至少包括2.4GHz频段和5GHz频段;
若所述可接入的访问接入点具有不同的频段类别,则获取各所述可接入的访问接入点与所述电子设备的距离;
根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点;
通过所述第二Wi-Fi模块连接到所述目标访问接入点。
第二方面,本申请实施例提供一种设备控制装置,应用于电子设备,所述电子设备包括第一Wi-Fi模块和第二Wi-Fi模块,所述电子设备通过所述第一Wi-Fi模块连接到第一Wi-Fi网络,所述装置包括:
第一获取模块,用于获取各可接入的访问接入点的工作频率及其对应的频段类别,其 中,所述频段类别至少包括2.4GHz频段和5GHz频段;
第二获取模块,用于若所述可接入的访问接入点具有不同的频段类别,则获取各所述可接入的访问接入点与所述电子设备的距离;
确定模块,用于根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点;
连接模块,用于通过所述第二Wi-Fi模块连接到所述目标访问接入点。
第三方面,本申请实施例提供一种存储介质,其上存储有计算机程序,当所述计算机程序在计算机上执行时,使得所述计算机执行本申请实施例提供的设备控制方法中的流程。
第四方面,本申请实施例还提供一种电子设备,包括存储器,处理器,所述处理器通过调用所述存储器中存储的计算机程序,用于执行本申请实施例提供的设备控制方法中的流程。
附图说明
下面结合附图,通过对本申请的具体实施方式详细描述,将使本申请的技术方案及其有益效果显而易见。
图1是本申请实施例提供的设备控制方法的流程示意图。
图2是本申请实施例提供的设备控制方法的另一流程示意图。
图3至图4是本申请实施例提供的设备控制方法的场景示意图。
图5是本申请实施例提供的设备控制装置的结构示意图。
图6是本申请实施例提供的电子设备的结构示意图。
图7是本申请实施例提供的电子设备的另一结构示意图。
具体实施方式
请参照图示,其中相同的组件符号代表相同的组件,本申请的原理是以实施在一适当的运算环境中来举例说明。以下的说明是基于所例示的本申请具体实施例,其不应被视为限制本申请未在此详述的其它具体实施例。
本申请实施例提供一种设备控制方法,应用于电子设备,其中,所述电子设备包括第一Wi-Fi模块和第二Wi-Fi模块,所述电子设备通过所述第一Wi-Fi模块连接到第一Wi-Fi网络,所述方法包括:
获取各可接入的访问接入点的工作频率及其对应的频段类别,其中,所述频段类别至 少包括2.4GHz频段和5GHz频段;
若所述可接入的访问接入点具有不同的频段类别,则获取各所述可接入的访问接入点与所述电子设备的距离;
根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点;
通过所述第二Wi-Fi模块连接到所述目标访问接入点。
在一种实施方式中,所述根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点的步骤,可以包括:
若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
在一种实施方式中,所述若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段的步骤,可以包括:
若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则获取所述第一Wi-Fi网络对应的第一工作频率;
若所述第一工作频率属于5GHz频段,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
在一种实施方式中,所述方法还可以包括:
若所述第一工作频率属于2.4GHz频段,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段,且目标频率间隔大于所述可接入的访问接入点中除所述目标访问接入点外的其它访问接入点的工作频率与所述第一工作频率的间隔,所述目标频率间隔为所述目标访问接入点对应的第二工作频率与所述第一工作频率的间隔。
在一种实施方式中,所述根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点的步骤,可以包括:
若所述可接入的访问接入点中存在备选访问接入点,则获取所述备选访问接入点对应的第三工作频率,其中,所述备选访问接入点与所述电子设备的距离小于预设第一距离阈值;
获取所述第一Wi-Fi网络对应的第一工作频率;
若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,则将所述备选访问接入点确定为目标访问接入点。
在一种实施方式中,所述方法还可以包括:
获取所述备选访问接入点的接收信号强度;
所述若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,则将所述备选访问接入点确定为目标访问接入点,包括:
若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,且所述备选访问接入点的接收信号强度大于或等于预设强度阈值,则将所述备选访问接入点确定为目标访问接入点。
在一种实施方式中,所述获取各所述可接入的访问接入点与所述电子设备的距离的步骤,可以包括:
获取各所述可接入的访问接入点对应的Wi-Fi网络的Wi-Fi信号强度;
根据各所述可接入的访问接入点对应的Wi-Fi网络的Wi-Fi信号强度,确定各所述可接入的访问接入点与所述电子设备的距离。
可以理解的是,本申请实施例的执行主体可以是诸如智能手机或平板电脑等的电子设备。
请参阅图1,图1是本申请实施例提供的设备控制方法的流程示意图。该设备控制方法可以应用于电子设备中,该电子设备可以包括第一Wi-Fi模块和第二Wi-Fi模块。其中,该电子设备已通过该第一Wi-Fi模块连接到第一Wi-Fi网络。该设备控制方法的流程可以包括:
101、获取各可接入的访问接入点的工作频率及其对应的频段类别,其中,频段类别至少包括2.4GHz频段和5GHz频段。
Wi-Fi技术是目前使用非常广泛的一种无线网络传输技术。相关技术中,电子设备可以使用双Wi-Fi技术同时连接到两个Wi-Fi网络进行上网。利用双Wi-Fi技术,电子设备可以获取到更高的网速和实际吞吐量。然而,相关技术中,当需要使用双Wi-Fi时,电子设备为Wi-Fi模块选择Wi-Fi网络的灵活性较差。例如,当需要使用双Wi-Fi时,电子设备可能是随机地选择一个Wi-Fi网络等等。
在本申请实施例中,比如,当需要通过第二Wi-Fi模块连接到另一个Wi-Fi网络时, 电子设备可以先获取各可接入的访问接入点(Access Point,AP)的工作频率及其对应的频段类别。其中,上述频段类别至少包括2.4GHz频段和5GHz频段。也即,在本申请实施例中,电子设备可以先获取各可接入的访问接入点的工作频率,并确定出各可接入的访问接入点是工作在2.4GHz频段还是工作在5GHz频段。
在获取到各可接入的访问接入点的工作频率对应的频段类别后,电子设备可以检测这些可接入的访问接入点是否具有不同的频段类别。即,电子设备可以检测这些可接入的访问接入点是否有些工作在2.4GHz频段,而有些工作在5GHz频段。
若检测到这些可接入的访问接入点都工作在相同的工作频段,例如这些可接入的访问接入点都工作在2.4GHz频段或者都工作在5GHz频段,那么电子设备可以执行其它操作。
若检测到这些可接入的访问接入点具有不同的频段类别,例如这些可接入的访问接入点中有些访问接入点工作在2.4GHz频段并且有些访问接入点工作在5GHz频段,那么可以进入102的流程中。
102、若可接入的访问接入点具有不同的频段类别,则获取各可接入的访问接入点与电子设备的距离。
比如,电子设备检测到可接入的访问接入点中有些访问接入点工作在2.4GHz频段,而有些访问接入点工作在5GHz频段。在这种情况下,电子设备可以获取各可接入的访问接入点与电子设备的距离。
103、根据各可接入的访问接入点与电子设备的距离以及各可接入的访问接入点的工作频率,确定目标访问接入点。
104、通过第二Wi-Fi模块连接到目标访问接入点。
比如,103和104可以包括:
在获取到各可接入的访问接入点与电子设备的距离后,电子设备可以根据各可接入的访问接入点与电子设备的距离,以及各可接入的访问接入点的工作频率,确定出一个目标访问接入点,并通过第二Wi-Fi模块连接到该目标访问接入点,从而实现双Wi-Fi功能。
例如,电子设备已经通过第一Wi-Fi模块连接到第一Wi-Fi网络,当该电子设备需要开启双Wi-Fi功能时,该电子设备可以先获取各可接入的访问接入点的工作频率及其对应的频段类别。即,电子设备可以先确定出各可接入的访问接入点是工作在2.4GHz频段还是工作在5GHz频段。例如,当前可接入的访问接入点包括A、B、C三个访问接入点。
之后,电子设备可以检测这些可接入的访问接入点是否工作在不同的工作频段。例如, 电子设备检测到访问接入点A和B工作在2.4GHz频段,访问接入点C工作在5GHz频段。即,这些可接入的访问接入点工作在不同的工作频段。在这种情况下,电子设备可以分别获取访问接入点A、B、C与该电子设备的距离,例如访问接入点A与电子设备的距离为d 1,访问接入点B与电子设备的距离为d 2,访问接入点C与电子设备的距离为d 3
之后,电子设备可以根据各访问接入点与电子设备的距离(即d 1、d 2、d 3)以及各访问接入点的工作频率,确定出一目标访问接入点,并通过第二Wi-Fi模块连接到该目标访问接入点。例如,电子设备将访问接入点A确定为目标访问接入点,那么电子设备可以通过第二Wi-Fi模块连接到该访问接入点A,从而将该访问接入点A对应的Wi-Fi网络确定为第二Wi-Fi,以实现双Wi-Fi功能。
可以理解的是,本申请实施例中,当可接入的访问接入点具有不同的频段类别时,电子设备可以根据各可接入的访问接入点与电子设备的距离以及各可接入的访问接入点的工作频率来确定目标访问接入点,并通过第二Wi-Fi模块连接到该目标访问接入点。因此,相比于随机地选择一个Wi-Fi网络等技术方案,本申请实施例可以提高电子设备为Wi-Fi模块选择Wi-Fi网络的灵活性。
请参阅图2,图2为本申请实施例提供的设备控制方法的另一流程示意图。该设备控制方法可以应用于电子设备中,该电子设备可以包括第一Wi-Fi模块和第二Wi-Fi模块。其中,该电子设备已通过该第一Wi-Fi模块连接到第一Wi-Fi网络。该设备控制方法的流程可以包括:
201、电子设备获取各可接入的访问接入点的工作频率及其对应的频段类别,其中,该频段类别至少包括2.4GHz频段和5GHz频段。
比如,当需要通过第二Wi-Fi模块连接到另一个Wi-Fi网络时,电子设备可以先获取当前环境中各可接入的访问接入点的工作频率及其对应的频段类别。其中,上述频段类别至少包括2.4GHz频段和5GHz频段。也即,在本申请实施例中,电子设备可以先获取各可接入的访问接入点的工作频率,并进而确定出各可接入的访问接入点是工作在2.4GHz频段还是工作在5GHz频段。
在获取到各可接入的访问接入点的工作频率对应的频段类别后,电子设备可以检测这些可接入的访问接入点是否具有不同的频段类别。即,电子设备可以检测这些可接入的访问接入点是否有些工作在2.4GHz频段,而有些工作在5GHz频段。
若检测到这些可接入的访问接入点都工作在相同的工作频段,例如这些可接入的访问 接入点都工作在2.4GHz频段或者都工作在5GHz频段,那么电子设备可以执行其它操作。比如,电子设备可以将可接入的访问接入点中与第一Wi-Fi网络的工作频段干扰最小的访问接入点确定为目标访问接入点,并通过第二Wi-Fi模块连接到该目标访问接入点。或者,电子设备可以将可接入的访问接入点中信号强度最强的访问接入点确定为目标访问接入点,并通过第二Wi-Fi模块连接到该目标访问接入点。
若检测到这些可接入的访问接入点具有不同的频段类别,例如这些可接入的访问接入点中有些访问接入点工作在2.4GHz频段并且有些访问接入点工作在5GHz频段,那么可以进入202的流程中。
202、若可接入的访问接入点具有不同的频段类别,则电子设备获取各可接入的访问接入点与该电子设备的距离。
比如,电子设备检测到其当前可接入的访问接入点中有些访问接入点工作在2.4GHz频段,而有些访问接入点工作在5GHz频段。在这种情况下,电子设备可以获取各可接入的访问接入点与电子设备的距离。
在一种实施方式中,电子设备可以通过如下方式来获取各可接入的访问接入点与该电子设备的距离:
电子设备获取各可接入的访问接入点对应的Wi-Fi网络的Wi-Fi信号强度;
根据各可接入的访问接入点对应的Wi-Fi网络的Wi-Fi信号强度,电子设备确定各可接入的访问接入点与该电子设备的距离。
比如,电子设备的厂商可以预先在实验室环境下测得不同的Wi-Fi信号强度所对应的(访问接入点与电子设备间)的距离,并形成Wi-Fi信号强度与距离之间的映射关系表。那么,当获取到各可接入的访问接入点对应的Wi-Fi信号强度后,电子设备可以根据上述映射关系表以及各可接入的访问接入点对应的Wi-Fi信号强度,来确定各可接入的访问接入点与该电子设备的距离。
在另一些实施方式中,电子设备还可以通过如下方式来确定可接入的访问接入点和电子设备的距离:比如,电子设备可以向访问接入点发送一个探测数据包,该探测数据包达到访问接入点后需由访问接入点再发送回该电子设备。那么,该电子设备可以通过统计该探测数据包从发送出去至接收回来的时间差,并根据该时间差计算访问接入点与该电子设备的距离。那么,当时间差越长时可以认为访问接入点距离电子设备越远。
在确定出各可接入的访问接入点与电子设备的距离后,电子设备可以检测是否所有可 接入的访问接入点与电子设备的距离均大于或等于预设第一距离阈值。
若检测到各可接入的访问接入点与电子设备的距离均大于或等于预设第一距离阈值,那么可以进入203中。
若检测到并非所有的可接入的访问接入点与电子设备的距离均大于或等于预设第一距离阈值,那么可以进入206中。
203、若各可接入的访问接入点与电子设备的距离均大于或等于预设第一距离阈值,则该电子设备获取第一Wi-Fi网络对应的第一工作频率。
比如,电子设备检测到当前环境中所有的可接入的访问接入点与该电子设备的距离均大于或等于预设第一距离阈值,那么表示当前所有的可接入的访问接入点与电子设备的距离都较远。在这种情况下,电子设备可以从可接入的访问加入点中确定出一个目标访问接入点,该目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
比如,电子设备可以获取第一Wi-Fi网络对应的第一工作频率,并检测该第一Wi-Fi网络对应的第一工作频率属于2.4GHz频段还是属于5GHz频段。
若第一Wi-Fi网络对应的第一工作频率属于5GHz频段,那么可以进入204中。
若第一Wi-Fi网络对应的第一工作频率属于2.4GHz频段,那么可以进入205中。
204、若第一工作频率属于5GHz频段,则电子设备从可接入的访问接入点中确定出目标访问接入点,其中,该目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
比如,在当前所有的可接入的访问接入点与电子设备的距离都较远的情况下,该电子设备通过第一Wi-Fi模块连接的第一Wi-Fi网络对应的第一工作频率属于5GHz频段,在这种情况下,电子设备可以将可接入的访问接入点中工作在2.4GHz频段的访问接入点确定为目标访问接入点,并通过第二Wi-Fi模块连接到该目标访问接入点,从而实现双Wi-Fi功能。比如,电子设备可以随机地将任一个工作在2.4GHz频段的访问接入点确定为目标访问接入点。
即,此时,第一Wi-Fi模块连接的是工作在5GHz频段的访问接入点,第二Wi-Fi模块连接的是工作在2.4GHz频段的访问接入点。
可以理解的是,由于2.4GHz频段的信号的穿透能力较强,因此当所有可接入的访问接入点与电子设备的距离都较远,本申请实施例通过为第二Wi-Fi模块选择工作信道属于2.4GHz频段的访问接入点,可以保证第二Wi-Fi网络对应的Wi-Fi信号的强度。
205、若第一工作频率属于2.4GHz频段,则电子设备从可接入的访问接入点中确定出 目标访问接入点,其中,该目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段,且目标频率间隔大于该可接入的访问接入点中除该目标访问接入点外的其它访问接入点的工作频率与第一工作频率的间隔,该目标频率间隔为该目标访问接入点对应的第二工作频率与第一工作频率的间隔。
比如,在当前所有的可接入的访问接入点与电子设备的距离都较远的情况下,该电子设备通过第一Wi-Fi模块连接的第一Wi-Fi网络对应的第一工作频率属于2.4GHz频段。在这种情况下,电子设备可以从可接入的访问接入点中确定出目标访问接入点,其中,该目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段,且目标频率间隔大于该可接入的访问接入点中除该目标访问接入点外的其它访问接入点的工作频率与第一工作频率的间隔,该目标频率间隔为该目标访问接入点对应的第二工作频率与第一工作频率的间隔。即,该目标访问接入点对应的第二工作频率与第一工作频率的频率间隔要大于其它可接入的访问接入点的工作频率与第一工作频率的频率间隔。或者,换句话说,该目标访接入点为当前可接入的访问接入点中工作在2.4GHz频段且与第一Wi-Fi网络的干扰最小的访问接入点。
可以理解的是,在本申请实施例中,在当前所有的可接入的访问接入点与电子设备的距离都较远的情况下,电子设备的第二Wi-Fi模块连接的第二Wi-Fi网络为工作在2.4GHz频段的访问接入点对应的Wi-Fi网络。由于2.4GHz频段的信号的穿透能力较强,因此本申请实施例通过为第二Wi-Fi模块选择工作信道属于2.4GHz频段的访问接入点,可以保证第二Wi-Fi网络对应的Wi-Fi信号的强度。
206、若可接入的访问接入点中存在备选访问接入点,则电子设备获取备选访问接入点对应的第三工作频率,其中,该备选访问接入点与该电子设备的距离小于预设第一距离阈值。
207、电子设备获取第一Wi-Fi网络对应的第一工作频率。
208、若第三工作频率与第一工作频率的频率间隔大于或等于预设间隔阈值,则电子设备将备选访问接入点确定为目标访问接入点。
比如,206、207、208可以包括:
电子设备检测到并非所有的当前可接入的访问接入点与电子设备的距离都大于或等于预设第一距离阈值。例如,电子设备检测到当前可接入的访问接入点中存在备选访问接入点,该备选访问接入点与该电子设备的距离小于预设第一距离阈值。即,当前可接入的访问接入点中有距离电子设备较近的访问接入点。在这种情况下,电子设备可以获取该备 选访问接入点对应的第三工作频率。
之后,电子设备还可以获取第一Wi-Fi模块对应的第一Wi-Fi网络的第一工作频率,并检测第三工作频率与第一工作频率的频率间隔是否大于或等于预设间隔阈值。
如果检测到第三工作频率与第一工作频率的频率间隔大于或等于预设间隔阈值,那么电子设备可以将该备选访问接入点确定为目标访问接入点,并通过第二Wi-Fi模块连接到该目标访问接入点,从而实现双Wi-Fi功能。
在一种实施方式中,电子设备还可以获取该备选访问接入点的接收信号强度。那么,电子设备可以在检测到第三工作频率与第一工作频率的频率间隔大于或等于预设间隔阈值,并且该备选访问接入点的接收信号强度大于或等于预设强度阈值时,将该备选访问接入点确定为目标访问接入点。即,电子设备为第二Wi-Fi模块选择的目标访问接入点不仅要距离该电子设备较近,而且该目标访问接入点的信号还要较好。
在另一些实施方式中,如果检测到备选访问接入点对应的第三工作频率与第一工作频率的频率间隔小于预设间隔阈值,即可接入的访问接入点中有一个备选访问接入点距离电子设备较近,但该备选访问接入点对应的第三工作频率和当前已连接的第一Wi-Fi网络对应的第一工作频率间的频率间隔较小,那么该备选访问接入点的工作频率和该第一Wi-Fi网络的工作检测之间的干扰较大。在这种情况下,电子设备可以从其它可接入的访问接入点中选择一个工作频率和第一Wi-Fi网络对应的第一工作频率干扰小于预设值的访问接入点作为目标访问接入点。
209、电子设备通过第二Wi-Fi模块连接到目标访问接入点。
比如,在确定出目标访问接入点后,电子设备可以通过第二Wi-Fi模块连接到该目标访问接入点,从而实现双Wi-Fi功能。
请参阅图3至图4,图3至图4为本申请实施例提供的设备控制方法的场景示意图。
比如,如图3所示,电子设备当前已通过第一Wi-Fi模块连接到第一Wi-Fi网络,例如第一Wi-Fi网络可以称之为主Wi-Fi网络。之后一段时间,电子设备检测到需要开启双Wi-Fi功能,即,电子设备需要通过其第二Wi-Fi模块连接另一Wi-Fi网络。
在这种情况下,电子设备可以先获取当前环境中各可接入的访问接入点的工作频率及其对应的频段类别。其中,上述频段类别至少包括2.4GHz频段和5GHz频段。也即,在本申请实施例中,电子设备可以先获取各可接入的访问接入点的工作频率,进而确定出各可接入的访问接入点是工作在2.4GHz频段还是工作在5GHz频段。例如,电子设备确定出当 前可接入的访问接入点包括A、B、C、D、E、F,其中,访问接入点A、B、C、D对应的Wi-Fi网络工作在2.4GHz频段,访问接入点E、F对应的Wi-Fi网络工作在5GHz频段。
在这些可接入的访问接入点具有不同的频段类别的情况下,电子设备可以根据其接收到的各可接入的访问接入点的Wi-Fi信号强度确定出各可接入的访问接入点与电子设备的距离。
之后,电子设备可以检测是否所有可接入的访问接入点与电子设备的距离均大于或等于预设第一距离阈值。
若所有可接入的访问接入点与电子设备的距离均大于或等于预设第一距离阈值,即所有可接入的访问接入点都距离该电子设备较远的情况下,电子设备可以获取第一Wi-Fi网络对应的第一工作频率。
如果第一工作频率属于5GHz频段,那么电子设备可以将可接入的访问接入点中工作在2.4GHz频段并且信号强度最强的访问接入点确定为目标访问接入点,并通过第二Wi-Fi模块连接到该目标访问接入点,从而连接得到第二Wi-Fi网络,例如可以称之为次Wi-Fi网络。例如,访问接入点A、B、C、D对应的Wi-Fi网络工作在2.4GHz频段,且电子设备接收到的访问接入点A的Wi-Fi信号最强,那么电子设备可以将访问接入点A确定为目标访问接入点。即,此时电子设备的双Wi-Fi网络为主Wi-Fi网络工作在5GHz频段,次Wi-Fi网络工作在2.4GHz频段。
如果第一工作频率属于2.4GHz频段,那么电子设备可以将当前可接入的访问接入点对应的Wi-Fi网络中与主Wi-Fi网络干扰最小访问接入点确定为目标访问接入点,并通过第二Wi-Fi模块连接到该目标访问接入点,从而连接得到第二Wi-Fi网络,即此时主Wi-Fi网络和次Wi-Fi网络均工作在2.4GHz频段。例如,访问接入点A、B、C、D对应的Wi-Fi网络工作在2.4GHz频段,且访问接入点B对应的Wi-Fi网络对主Wi-Fi网络的干扰最小,那么电子设备可以将访问接入点B确定为目标访问接入点。
若当前可接入的访问接入点中有一个或多个访问接入点与电子设备的距离小于预设第一距离阈值,例如访问接入点D、E和电子设备的距离均小于预设第一距离阈值。那么,电子设备可以将访问接入点D和E确定为备选访问接入点。
之后,电子设备可以获取访问接入点D对应的Wi-Fi网络的工作频率以及访问接入点E对应的Wi-Fi网络的工作频率。此外,电子设备还可以获取第一Wi-Fi网络对应的第一工作频率。
之后,电子设备可以检测第一工作频率和访问接入点D对应的Wi-Fi网络的工作频率之间的频率间隔是否大于或等于预设间隔阈值,以及检测第一工作频率和访问接入点E对应的Wi-Fi网络的工作频率之间的频率间隔是否大于或等于预设间隔阈值。例如,在本实施例中,电子设备检测到第一工作频率和访问接入点D对应的Wi-Fi网络的工作频率之间的频率间隔大于预设间隔阈值,而第一工作频率和访问接入点E对应的Wi-Fi网络的工作频率之间的频率间隔小于预设间隔阈值。在这种情况下,电子设备可以将访问接入点D确定为目标访问接入点,并通过第二Wi-Fi模块连接到该目标访问接入点。
在确定出目标访问接入点后,电子设备即可以通过第二Wi-Fi模块连接到该目标访问接入点,从而连接到次Wi-Fi网络,如图4所示。
请参阅图5,图5为本申请实施例提供的设备控制装置的结构示意图。该设备控制装置可以应用于电子设备,所述电子设备包括第一Wi-Fi模块和第二Wi-Fi模块,所述电子设备通过所述第一Wi-Fi模块连接到第一Wi-Fi网络。设备控制装置300可以包括:第一获取模块301,第二获取模块302,确定模块303,连接模块304。
第一获取模块301,用于获取各可接入的访问接入点的工作频率及其对应的频段类别,其中,所述频段类别至少包括2.4GHz频段和5GHz频段。
第二获取模块302,用于若所述可接入的访问接入点具有不同的频段类别,则获取各所述可接入的访问接入点与所述电子设备的距离。
确定模块303,用于根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点。
连接模块304,用于通过所述第二Wi-Fi模块连接到所述目标访问接入点。
在一种实施方式中,所述确定模块303可以用于:
若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
在一种实施方式中,所述确定模块303可以用于:
若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则获取所述第一Wi-Fi网络对应的第一工作频率;
若所述第一工作频率属于5GHz频段,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
在一种实施方式中,所述确定模块303还可以用于:
若所述第一工作频率属于2.4GHz频段,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段,且目标频率间隔大于所述可接入的访问接入点中除所述目标访问接入点外的其它访问接入点的工作频率与所述第一工作频率的间隔,所述目标频率间隔为所述目标访问接入点对应的第二工作频率与所述第一工作频率的间隔。
在一种实施方式中,所述确定模块303可以用于:
若所述可接入的访问接入点中存在备选访问接入点,则获取所述备选访问接入点对应的第三工作频率,其中,所述备选访问接入点与所述电子设备的距离小于预设第一距离阈值;
获取所述第一Wi-Fi网络对应的第一工作频率;
若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,则将所述备选访问接入点确定为目标访问接入点。
在一种实施方式中,所述确定模块303还可以用于:
获取所述备选访问接入点的接收信号强度;
若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,且所述备选访问接入点的接收信号强度大于或等于预设强度阈值,则将所述备选访问接入点确定为目标访问接入点。
在一种实施方式中,所述第二获取模块302可以用于:
获取各所述可接入的访问接入点对应的Wi-Fi网络的Wi-Fi信号强度;
根据各所述可接入的访问接入点对应的Wi-Fi网络的Wi-Fi信号强度,确定各所述可接入的访问接入点与所述电子设备的距离。
本申请实施例提供一种计算机可读的存储介质,其上存储有计算机程序,当所述计算机程序在计算机上执行时,使得所述计算机执行如本实施例提供的设备控制方法中的流程。
本申请实施例还提供一种电子设备,包括存储器,处理器,所述处理器通过调用所述存储器中存储的计算机程序,用于执行本实施例提供的设备控制方法中的流程。
例如,上述电子设备可以是诸如平板电脑或者智能手机等移动终端。请参阅图6,图6为本申请实施例提供的电子设备的结构示意图。
该电子设备400可以包括Wi-Fi模组401、存储器402、处理器403等部件。本领域 技术人员可以理解,图6中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
Wi-Fi模组401可以第一Wi-Fi模块和第二Wi-Fi模块。第一Wi-Fi模块可以包括第一MAC地址以及第一Wi-Fi天线。第二Wi-Fi模块可以包括第二MAC地址以及第二Wi-Fi天线。电子设备可以基于第一MAC地址通过第一Wi-Fi天线与第一访问接入点AP建立连接,从而连接到第一Wi-Fi网络。电子设备还可以基于第二MAC地址通过第二Wi-Fi天线与第二访问接入点AP建立连接,从而连接到第二Wi-Fi网络。
存储器402可用于存储应用程序和数据。存储器402存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器403通过运行存储在存储器402的应用程序,从而执行各种功能应用以及数据处理。
处理器403是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器402内的应用程序,以及调用存储在存储器402内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。
在本实施例中,电子设备已通过所述第一Wi-Fi模块连接到第一Wi-Fi网络,电子设备中的处理器403会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行代码加载到存储器402中,并由处理器403来运行存储在存储器402中的应用程序,从而执行:
获取各可接入的访问接入点的工作频率及其对应的频段类别,其中,所述频段类别至少包括2.4GHz频段和5GHz频段;
若所述可接入的访问接入点具有不同的频段类别,则获取各所述可接入的访问接入点与所述电子设备的距离;
根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点;
通过所述第二Wi-Fi模块连接到所述目标访问接入点。
请参阅图7,电子设备400可以包括Wi-Fi模组401、存储器402、处理器403、输入单元404、输出单元405、电池406等部件。
Wi-Fi模组401可以第一Wi-Fi模块和第二Wi-Fi模块。第一Wi-Fi模块可以包括第一MAC地址以及第一Wi-Fi天线。第二Wi-Fi模块可以包括第二MAC地址以及第二Wi-Fi天线。电子设备可以基于第一MAC地址通过第一Wi-Fi天线与第一访问接入点AP建立连 接,从而连接到第一Wi-Fi网络。电子设备还可以基于第二MAC地址通过第二Wi-Fi天线与第二访问接入点AP建立连接,从而连接到第二Wi-Fi网络。
存储器402可用于存储应用程序和数据。存储器402存储的应用程序中包含有可执行代码。应用程序可以组成各种功能模块。处理器403通过运行存储在存储器402的应用程序,从而执行各种功能应用以及数据处理。
处理器403是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器402内的应用程序,以及调用存储在存储器402内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。
输入单元404可用于接收输入的数字、字符信息或用户特征信息(比如指纹),以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。
输出单元405可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种图形用户接口,这些图形用户接口可以由图形、文本、图标、视频和其任意组合来构成。输出单元可包括显示面板。
电池406可以为电子设备中的各个部件提供电力支持。
在本实施例中,电子设备已通过所述第一Wi-Fi模块连接到第一Wi-Fi网络,电子设备中的处理器403会按照如下的指令,将一个或一个以上的应用程序的进程对应的可执行代码加载到存储器402中,并由处理器403来运行存储在存储器402中的应用程序,从而执行:
获取各可接入的访问接入点的工作频率及其对应的频段类别,其中,所述频段类别至少包括2.4GHz频段和5GHz频段;
若所述可接入的访问接入点具有不同的频段类别,则获取各所述可接入的访问接入点与所述电子设备的距离;
根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点;
通过所述第二Wi-Fi模块连接到所述目标访问接入点。
在一种实施方式中,所述处理器403执行所述根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点时,可以执行:若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入 点对应的Wi-Fi网络工作在2.4GHz频段。
在一种实施方式中,所述处理器403执行所述若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段时,可以执行:若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则获取所述第一Wi-Fi网络对应的第一工作频率;若所述第一工作频率属于5GHz频段,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
在一种实施方式中,所述处理器403还可以执行:若所述第一工作频率属于2.4GHz频段,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段,且目标频率间隔大于所述可接入的访问接入点中除所述目标访问接入点外的其它访问接入点的工作频率与所述第一工作频率的间隔,所述目标频率间隔为所述目标访问接入点对应的第二工作频率与所述第一工作频率的间隔。
在一种实施方式中,所述处理器403执行所述根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点时,可以执行:若所述可接入的访问接入点中存在备选访问接入点,则获取所述备选访问接入点对应的第三工作频率,其中,所述备选访问接入点与所述电子设备的距离小于预设第一距离阈值;获取所述第一Wi-Fi网络对应的第一工作频率;若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,则将所述备选访问接入点确定为目标访问接入点。
在一种实施方式中,所述处理器403还可以执行:获取所述备选访问接入点的接收信号强度。
那么,处理器403执行所述若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,则将所述备选访问接入点确定为目标访问接入点时,可以执行:若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,且所述备选访问接入点的接收信号强度大于或等于预设强度阈值,则将所述备选访问接入点确定为目标访问接入点。
在一种实施方式中,所述处理器403执行所述获取各所述可接入的访问接入点与所述电子设备的距离时,可以执行:获取各所述可接入的访问接入点对应的Wi-Fi网络的Wi-Fi 信号强度;根据各所述可接入的访问接入点对应的Wi-Fi网络的Wi-Fi信号强度,确定各所述可接入的访问接入点与所述电子设备的距离。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见上文针对设备控制方法的详细描述,此处不再赘述。
本申请实施例提供的所述设备控制装置与上文实施例中的设备控制方法属于同一构思,在所述设备控制装置上可以运行所述设备控制方法实施例中提供的任一方法,其具体实现过程详见所述设备控制方法实施例,此处不再赘述。
需要说明的是,对本申请实施例所述设备控制方法而言,本领域普通技术人员可以理解实现本申请实施例所述设备控制方法的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述计算机程序可存储于一计算机可读取存储介质中,如存储在存储器中,并被至少一个处理器执行,在执行过程中可包括如所述设备控制方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)等。
对本申请实施例的所述设备控制装置而言,其各功能模块可以集成在一个处理芯片中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中,所述存储介质譬如为只读存储器,磁盘或光盘等。
以上对本申请实施例所提供的一种设备控制方法、装置、存储介质以及电子设备进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。

Claims (20)

  1. 一种设备控制方法,应用于电子设备,其中,所述电子设备包括第一Wi-Fi模块和第二Wi-Fi模块,所述电子设备通过所述第一Wi-Fi模块连接到第一Wi-Fi网络,所述方法包括:
    获取各可接入的访问接入点的工作频率及其对应的频段类别,其中,所述频段类别至少包括2.4GHz频段和5GHz频段;
    若所述可接入的访问接入点具有不同的频段类别,则获取各所述可接入的访问接入点与所述电子设备的距离;
    根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点;
    通过所述第二Wi-Fi模块连接到所述目标访问接入点。
  2. 根据权利要求1所述的设备控制方法,其中,所述根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点,包括:
    若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
  3. 根据权利要求2所述的设备控制方法,其中,所述若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段,包括:
    若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则获取所述第一Wi-Fi网络对应的第一工作频率;
    若所述第一工作频率属于5GHz频段,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
  4. 根据权利要求3所述的设备控制方法,其中,所述方法还包括:
    若所述第一工作频率属于2.4GHz频段,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段,且目标频率间隔大于所述可接入的访问接入点中除所述目标访问接入点外的其它访问接入点的工作频 率与所述第一工作频率的间隔,所述目标频率间隔为所述目标访问接入点对应的第二工作频率与所述第一工作频率的间隔。
  5. 根据权利要求1所述的设备控制方法,其中,所述根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点,包括:
    若所述可接入的访问接入点中存在备选访问接入点,则获取所述备选访问接入点对应的第三工作频率,其中,所述备选访问接入点与所述电子设备的距离小于预设第一距离阈值;
    获取所述第一Wi-Fi网络对应的第一工作频率;
    若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,则将所述备选访问接入点确定为目标访问接入点。
  6. 根据权利要求5所述的设备控制方法,其中,所述方法还包括:
    获取所述备选访问接入点的接收信号强度;
    所述若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,则将所述备选访问接入点确定为目标访问接入点,包括:
    若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,且所述备选访问接入点的接收信号强度大于或等于预设强度阈值,则将所述备选访问接入点确定为目标访问接入点。
  7. 根据权利要求1所述的设备控制方法,其中,所述获取各所述可接入的访问接入点与所述电子设备的距离,包括:
    获取各所述可接入的访问接入点对应的Wi-Fi网络的Wi-Fi信号强度;
    根据各所述可接入的访问接入点对应的Wi-Fi网络的Wi-Fi信号强度,确定各所述可接入的访问接入点与所述电子设备的距离。
  8. 一种设备控制装置,应用于电子设备,其中,所述电子设备包括第一Wi-Fi模块和第二Wi-Fi模块,所述电子设备通过所述第一Wi-Fi模块连接到第一Wi-Fi网络,所述装置包括:
    第一获取模块,用于获取各可接入的访问接入点的工作频率及其对应的频段类别,其中,所述频段类别至少包括2.4GHz频段和5GHz频段;
    第二获取模块,用于若所述可接入的访问接入点具有不同的频段类别,则获取各所述 可接入的访问接入点与所述电子设备的距离;
    确定模块,用于根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点;
    连接模块,用于通过所述第二Wi-Fi模块连接到所述目标访问接入点。
  9. 根据权利要求8所述的设备控制装置,其中,所述确定模块用于:
    若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
  10. 根据权利要求9所述的设备控制装置,其中,所述确定模块用于:
    若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则获取所述第一Wi-Fi网络对应的第一工作频率;
    若所述第一工作频率属于5GHz频段,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
  11. 根据权利要求10所述的设备控制装置,其中,所述确定模块用于:
    若所述第一工作频率属于2.4GHz频段,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段,且目标频率间隔大于所述可接入的访问接入点中除所述目标访问接入点外的其它访问接入点的工作频率与所述第一工作频率的间隔,所述目标频率间隔为所述目标访问接入点对应的第二工作频率与所述第一工作频率的间隔。
  12. 根据权利要求8所述的设备控制装置,其中,所述确定模块用于:
    若所述可接入的访问接入点中存在备选访问接入点,则获取所述备选访问接入点对应的第三工作频率,其中,所述备选访问接入点与所述电子设备的距离小于预设第一距离阈值;
    获取所述第一Wi-Fi网络对应的第一工作频率;
    若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,则将所述备选访问接入点确定为目标访问接入点。
  13. 根据权利要求12所述的设备控制装置,其中,所述确定模块用于:
    获取所述备选访问接入点的接收信号强度;
    所述若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值, 则将所述备选访问接入点确定为目标访问接入点,包括:
    若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,且所述备选访问接入点的接收信号强度大于或等于预设强度阈值,则将所述备选访问接入点确定为目标访问接入点。
  14. 根据权利要求8所述的设备控制装置,其中,所述第二获取模块用于:
    获取各所述可接入的访问接入点对应的Wi-Fi网络的Wi-Fi信号强度;
    根据各所述可接入的访问接入点对应的Wi-Fi网络的Wi-Fi信号强度,确定各所述可接入的访问接入点与所述电子设备的距离。
  15. 一种计算机可读的存储介质,其上存储有计算机程序,其中,当所述计算机程序在计算机上执行时,使得所述计算机执行如权利要求1所述的方法。
  16. 一种电子设备,包括存储器,处理器,其中,所述处理器通过调用所述存储器中存储的计算机程序,用于执行:
    获取各可接入的访问接入点的工作频率及其对应的频段类别,其中,所述频段类别至少包括2.4GHz频段和5GHz频段;
    若所述可接入的访问接入点具有不同的频段类别,则获取各所述可接入的访问接入点与所述电子设备的距离;
    根据各所述可接入的访问接入点与所述电子设备的距离以及各所述可接入的访问接入点的工作频率,确定目标访问接入点;
    通过所述第二Wi-Fi模块连接到所述目标访问接入点。
  17. 根据权利要求16所述的电子设备,其中,所述处理器用于执行:
    若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
  18. 根据权利要求17所述的电子设备,其中,所述处理器用于执行:
    若各所述可接入的访问接入点与所述电子设备的距离均大于或等于预设第一距离阈值,则获取所述第一Wi-Fi网络对应的第一工作频率;
    若所述第一工作频率属于5GHz频段,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段。
  19. 根据权利要求18所述的电子设备,其中,所述处理器用于执行:
    若所述第一工作频率属于2.4GHz频段,则从所述可接入的访问接入点中确定出目标访问接入点,其中,所述目标访问接入点对应的Wi-Fi网络工作在2.4GHz频段,且目标频率间隔大于所述可接入的访问接入点中除所述目标访问接入点外的其它访问接入点的工作频率与所述第一工作频率的间隔,所述目标频率间隔为所述目标访问接入点对应的第二工作频率与所述第一工作频率的间隔。
  20. 根据权利要求16所述的电子设备,其中,所述处理器用于执行:
    若所述可接入的访问接入点中存在备选访问接入点,则获取所述备选访问接入点对应的第三工作频率,其中,所述备选访问接入点与所述电子设备的距离小于预设第一距离阈值;
    获取所述第一Wi-Fi网络对应的第一工作频率;
    若所述第三工作频率与所述第一工作频率的频率间隔大于或等于预设间隔阈值,则将所述备选访问接入点确定为目标访问接入点。
PCT/CN2020/138684 2019-12-30 2020-12-23 设备控制方法、装置、存储介质及电子设备 WO2021136039A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP20910204.5A EP4064760A4 (en) 2019-12-30 2020-12-23 DEVICE CONTROL METHOD AND DEVICE, STORAGE MEDIA AND ELECTRONIC DEVICE
US17/855,308 US20220338289A1 (en) 2019-12-30 2022-06-30 Device control method, apparatus, storage medium and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911396274.6A CN111148182B (zh) 2019-12-30 2019-12-30 设备控制方法、装置、存储介质及电子设备
CN201911396274.6 2019-12-30

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/855,308 Continuation US20220338289A1 (en) 2019-12-30 2022-06-30 Device control method, apparatus, storage medium and electronic device

Publications (1)

Publication Number Publication Date
WO2021136039A1 true WO2021136039A1 (zh) 2021-07-08

Family

ID=70522202

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/138684 WO2021136039A1 (zh) 2019-12-30 2020-12-23 设备控制方法、装置、存储介质及电子设备

Country Status (4)

Country Link
US (1) US20220338289A1 (zh)
EP (1) EP4064760A4 (zh)
CN (1) CN111148182B (zh)
WO (1) WO2021136039A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111148182B (zh) * 2019-12-30 2022-02-22 Oppo广东移动通信有限公司 设备控制方法、装置、存储介质及电子设备
CN112073995B (zh) * 2020-09-03 2023-09-12 Oppo广东移动通信有限公司 数据传输方法、装置、存储介质及电子设备
CN112911665B (zh) * 2021-03-19 2023-07-18 北京紫光展锐通信技术有限公司 一种接入点的连接方法及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102256336A (zh) * 2011-07-06 2011-11-23 华为终端有限公司 一种WiFi接入点组合使用的方法、装置和系统
CN107770841A (zh) * 2017-09-29 2018-03-06 努比亚技术有限公司 热点连接方法、移动终端和计算机可读存储介质
CN108770068A (zh) * 2018-06-04 2018-11-06 Oppo广东移动通信有限公司 一种wifi频段选择方法、装置、存储介质及电子设备
WO2019144383A1 (en) * 2018-01-26 2019-08-01 Tti (Macao Commercial Offshore) Limited Power tool cooperation control/feedback/sensor system
CN111148182A (zh) * 2019-12-30 2020-05-12 Oppo广东移动通信有限公司 设备控制方法、装置、存储介质及电子设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103731881A (zh) * 2013-12-17 2014-04-16 福建伊时代信息科技股份有限公司 WiFi接入点控制方法、控制装置及控制系统
CN105101330B (zh) * 2015-06-25 2020-02-28 小米科技有限责任公司 连接切换方法及装置
CN106332238B (zh) * 2016-08-19 2017-08-01 广东欧珀移动通信有限公司 一种无线局域网络信道扫描方法、装置及移动终端
CN108668378A (zh) * 2018-05-31 2018-10-16 北京橙鑫数据科技有限公司 信道选择方法、装置以及电子设备
CN109803325B (zh) * 2019-02-12 2020-12-22 Oppo广东移动通信有限公司 数据分流方法、装置、移动终端及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102256336A (zh) * 2011-07-06 2011-11-23 华为终端有限公司 一种WiFi接入点组合使用的方法、装置和系统
CN107770841A (zh) * 2017-09-29 2018-03-06 努比亚技术有限公司 热点连接方法、移动终端和计算机可读存储介质
WO2019144383A1 (en) * 2018-01-26 2019-08-01 Tti (Macao Commercial Offshore) Limited Power tool cooperation control/feedback/sensor system
CN108770068A (zh) * 2018-06-04 2018-11-06 Oppo广东移动通信有限公司 一种wifi频段选择方法、装置、存储介质及电子设备
CN111148182A (zh) * 2019-12-30 2020-05-12 Oppo广东移动通信有限公司 设备控制方法、装置、存储介质及电子设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4064760A4

Also Published As

Publication number Publication date
CN111148182B (zh) 2022-02-22
EP4064760A4 (en) 2023-01-04
EP4064760A1 (en) 2022-09-28
CN111148182A (zh) 2020-05-12
US20220338289A1 (en) 2022-10-20

Similar Documents

Publication Publication Date Title
WO2021136039A1 (zh) 设备控制方法、装置、存储介质及电子设备
CN108430101B (zh) 天线关闭方法、装置、存储介质和电子设备
US9215649B2 (en) Techniques for assisted network acquisition
CN106658652B (zh) 连接WiFi热点的方法及装置
CN106230492B (zh) 一种终端天线的切换方法、装置及移动终端
CN108093444B (zh) 无线网络传输速率控制方法、装置、终端设备及存储介质
US11012970B2 (en) Method for processing radio frequency interference and electronic device
JP6730611B2 (ja) 無線解析装置、無線解析方法、及びプログラム
US20140307574A1 (en) Communication connection control method and electronic apparatus supporting the same
CN111148137B (zh) 一种数据的传输方法、装置、存储介质及终端
US20220174643A1 (en) Ranging with a mobile cellular device
CN109379498A (zh) 电磁干扰控制方法及相关装置
CN108924908B (zh) WiFi扫描方法、装置及电子装置
CN108307485B (zh) 无线网络扫描方法、装置、终端设备及存储介质
CN108337719B (zh) 无线网络扫描方法、装置、终端设备及存储介质
WO2023088299A1 (zh) 感知信号传输处理方法、装置及相关设备
CN111148278A (zh) 数据传输方法、装置、存储介质及电子设备
CN111083764B (zh) 设备控制方法、装置、存储介质及电子设备
WO2021128015A1 (zh) 设备控制方法、装置、存储介质及电子设备
CN108337718B (zh) 无线网络扫描方法、装置、终端设备及存储介质
CN108924902B (zh) 无线网络断开方法、装置及电子装置
CN107205272B (zh) 通信方法、装置、计算机可读存储介质及电子设备
WO2020118497A1 (zh) 调整Wi-Fi增益的方法、装置、电子设备及存储介质
WO2023109759A1 (zh) Prach传输方法、装置及终端
WO2024012337A1 (zh) 定位参考信号prs的测量方法、终端及网络侧设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20910204

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020910204

Country of ref document: EP

Effective date: 20220621

NENP Non-entry into the national phase

Ref country code: DE