A control method for a mobile hotspot and an electronic device

By using the site roaming mechanism to connect the device to the highest frequency band or the best frequency band hotspot when the mobile phone is turned on, and turning off the unconnected hotspot, the connection problems and power waste caused by inaccurate default frequency bands are solved, and the hotspot function with lower power consumption is achieved.

CN118714549BActive Publication Date: 2025-07-04HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410711928.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2025-07-04
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

In the prior art, when a mobile phone turns on a mobile hotspot, some devices may not be able to connect to or use better quality networks due to inaccurate default frequency bands, and opening multiple frequency band hotspots for a long time will cause successful waste.

Method used

When the mobile hotspot is turned on on the mobile hotspots, first turn on at least two different working frequency bands of hotspots, and trigger the site to roam to the hotspots of the highest or optimal frequency bands according to the site connection, and turn off the hotspots of the unconnected site to reduce power consumption.

Benefits of technology

It enables more devices to connect to mobile phone hotspots, and reduces mobile phone power consumption while ensuring network quality, avoiding unnecessary energy consumption and waste of hotspot functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118714549B_ABST
    Figure CN118714549B_ABST
Patent Text Reader

Abstract

The present application provides a method for controlling a mobile hotspot and an electronic device, which relates to the field of communication technologies and is used to ensure that the mobile hotspot enabled by a mobile phone can be scanned and connected by more devices. This method is applied to an electronic device that supports enabling at least two mobile hotspots with different operating frequency bands simultaneously; it includes: enabling at least two mobile hotspots, where the operating frequency bands of different mobile hotspots among the enabled mobile hotspots are different, and the at least two mobile hotspots include a first mobile hotspot and a second mobile hotspot; when stations are connected to both the first mobile hotspot and the second mobile hotspot, triggering the stations connected to the second mobile hotspot to roam to the first mobile hotspot and turning off the second mobile hotspot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of communication technologies, and in particular, to a method for controlling a mobile hotspot and an electronic device. Background Art

[0002] The mobile hotspot of a mobile phone is a technology that converts the general packet radio service (GPRS) and mobile communication signals received by the mobile phone into Wi-Fi (wireless fidelity) signals and sends them out. The network hotspot technology enables portable devices such as mobile phones, tablets, or laptops to access the Internet through a wireless network card or a wireless local area network (WLAN) module, even outdoors or in places without a network, realizing network resource sharing.

[0003] In related technologies, usually when a mobile phone turns on the mobile hotspot function, the mobile hotspot of the default frequency band is turned on. The default frequency band can be set by the user. And the frequency bands supported by different devices for the mobile hotspot may be different. If the default frequency band of the mobile phone is frequency band 1, after the mobile hotspot function is turned on, some devices cannot connect to the mobile hotspot of frequency band 1 due to hardware specifications. That is, the setting of the default frequency band may be inaccurate, resulting in the problem that some devices cannot connect to the mobile hotspot turned on by the mobile phone. Summary of the Invention

[0004] Embodiments of the present application provide a method for controlling a mobile hotspot and an electronic device, which are used to ensure that the mobile hotspot turned on by the mobile phone can be scanned and connected by more devices.

[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a method for controlling a mobile hotspot is provided. The method is applied to an electronic device, and the electronic device supports turning on at least two mobile hotspots of different operating frequency bands simultaneously. The method includes:

[0007] Turn on at least two mobile hotspots, where the operating frequency bands of different mobile hotspots among the turned-on mobile hotspots are different; the at least two mobile hotspots include a first mobile hotspot and a second mobile hotspot. In this way, it is ensured that the mobile hotspots turned on by the electronic device can be discovered and connected by more devices. Subsequently, some mobile hotspots can be turned off in combination with the connection situation of the at least two mobile hotspots to stations. When both the first mobile hotspot and the second mobile hotspot are connected to stations, trigger the stations connected to the second mobile hotspot to roam to the first mobile hotspot, and turn off the second mobile hotspot. In this way, it is possible to turn off some mobile hotspots to reduce the power consumption of the mobile phone. It can also ensure that each station connected to the mobile hotspot of the electronic device can still be connected to the mobile hotspot turned on by the electronic device, so that the mobile hotspot service provided by the electronic device can continue to be used.

[0008] In a possible implementation manner of the first aspect, the above-mentioned at least two mobile hotspots are mobile hotspots of all operating frequency bands supported by the electronic device. That is, when the electronic device turns on a mobile hotspot, it turns on mobile hotspots of all supported operating frequency bands, which can ensure that the turned-on mobile hotspots can be discovered and connected by more devices and provide a better mobile hotspot network as much as possible.

[0009] In a possible implementation manner of the first aspect, after triggering the stations connected to the second mobile hotspot to roam to the first mobile hotspot, the electronic device also turns off a third mobile hotspot that is not connected to a station. The third mobile hotspot is part or all of the mobile hotspots among the above-mentioned at least two mobile hotspots except the first mobile hotspot and the second mobile hotspot.

[0010] In a possible implementation manner of the first aspect, the first mobile hotspot is any one of the at least two mobile hotspots. The second mobile hotspot is part of the at least two mobile hotspots except the first mobile hotspot. In this way, when multiple mobile hotspots are all connected to stations, it is possible to trigger the stations connected to some mobile hotspots to roam to other mobile hotspots, and then turn off the mobile hotspots without station connections. In this way, some of the mobile hotspots turned on by the electronic device can be turned off, and some mobile hotspots can be kept turned on to reduce the power consumption of the mobile phone.

[0011] In a possible implementation manner of the first aspect, the first mobile hotspot is any one of the at least two mobile hotspots. The second mobile hotspot is all of the at least two mobile hotspots except the first mobile hotspot. In this solution, some of the mobile hotspots turned on by the electronic device can be turned off, and only one mobile hotspot is kept turned on to reduce the power consumption of the mobile phone.

[0012] In a possible implementation of the first aspect, at least two mobile hotspots are two mobile hotspots. The first mobile hotspot and the second mobile hotspot each include one mobile hotspot. In this solution, one of the mobile hotspots enabled by the electronic device can be turned off, and only one mobile hotspot is kept enabled to reduce the power consumption of the mobile phone.

[0013] In a possible implementation of the first aspect, the above-mentioned at least two mobile hotspots are three or more mobile hotspots. The first mobile hotspot and the second mobile hotspot each include one mobile hotspot. In this solution, one of the mobile hotspots enabled by the electronic device can be turned off, and only one mobile hotspot is kept enabled to reduce the power consumption of the mobile phone.

[0014] In a possible implementation of the first aspect, the above-mentioned at least two mobile hotspots are three or more mobile hotspots. The first mobile hotspot includes one mobile hotspot. The second mobile hotspot includes two or more mobile hotspots.

[0015] In a possible implementation of the first aspect, the operating frequency band of the first mobile hotspot is the highest frequency band supported by all stations connected to the first mobile hotspot and the second mobile hotspot. That is to say, after the roaming ends, each station is connected to the highest frequency band jointly supported by all stations. When triggering the roaming of the station, the mobile hotspot corresponding to the highest frequency band supported by all stations is preferentially selected as the target hotspot for roaming, which can provide better mobile hotspot services for each station as much as possible on the premise of ensuring the power consumption of the electronic device.

[0016] In a possible implementation of the first aspect, the highest frequency band supported by all stations can specifically mean the highest frequency band supported by all stations for connecting to the mobile hotspot.

[0017] In a possible implementation of the first aspect, triggering the station connected to the second mobile hotspot to roam to the first mobile hotspot can specifically include: the electronic device sends a roaming instruction to the station connected to the second mobile hotspot, and this roaming instruction is used to indicate that the device roams from the currently connected mobile hotspot to the first mobile hotspot. If the station connected to the second mobile hotspot supports connecting to the first mobile hotspot, it can respond to the roaming instruction and roam to the first mobile hotspot.

[0018] In a possible implementation of the first aspect, the above-mentioned roaming instruction can carry information of the first mobile hotspot. Exemplarily, the information of the first mobile hotspot can include: the operating frequency band, channel, and BSS identifier (BSSID) of the first mobile hotspot.

[0019] In a possible implementation of the first aspect, triggering the station connected to the second mobile hotspot to roam to the first mobile hotspot can be specifically implemented based on the 802.11v protocol.

[0020] In a possible implementation of the first aspect, the method further includes: when only one of the first mobile hotspot and the second mobile hotspot is connected to a station, turning off the mobile hotspot that is not connected to a station among the first mobile hotspot and the second mobile hotspot. In this way, by turning off the mobile hotspot that is not connected to a station, it is possible to avoid keeping the mobile hotspot that is not connected to a station turned on for a long time, thereby reducing the power consumption of the electronic device.

[0021] In a possible implementation of the first aspect, the operating frequency band of the target mobile hotspot is higher than that of the non-target mobile hotspot. Here, the target mobile hotspot is the mobile hotspot among the first mobile hotspot and the second mobile hotspot that is connected to a station, and the non-target mobile hotspot is the mobile hotspot among the first mobile hotspot and the second mobile hotspot that is not connected to a station. That is to say, among the first mobile hotspot and the second mobile hotspot, the frequency band of the target mobile hotspot with a connected station is higher than that of the non-target mobile hotspot without a connected station. Since each station has already connected to the mobile hotspot with the highest frequency band, the network service obtained by the station from the mobile hotspot is optimal. In this case, it is possible to turn off the mobile hotspot without a connected station among the first mobile hotspot and the second mobile hotspot, that is, the mobile hotspot with a non-highest frequency band.

[0022] In a possible implementation of the first aspect, the operating frequency band of the target mobile hotspot is lower than that of the non-target mobile hotspot, and there is a station among the stations connected to the target mobile hotspot that does not support roaming to the non-target mobile hotspot. Here, the target mobile hotspot is the mobile hotspot among the first mobile hotspot and the second mobile hotspot that is connected to a station, and the non-target mobile hotspot is the mobile hotspot among the first mobile hotspot and the second mobile hotspot that is not connected to a station. That is to say, among the first mobile hotspot and the second mobile hotspot, the frequency band of the target mobile hotspot with a connected station is lower than that of the non-target mobile hotspot without a connected station. To ensure low power consumption of the electronic device, some mobile hotspots need to be turned off. If the stations connected to the non-target mobile hotspot cannot all be connected to a mobile hotspot with a higher frequency band, such as the target mobile hotspot, the electronic device directly turns off the mobile hotspot without a connected station among the first mobile hotspot and the second mobile hotspot.

[0023] In a possible implementation of the first aspect, the operating frequency band of the target mobile hotspot is lower than that of the non-target mobile hotspot, and the stations connected to the target mobile hotspot all support roaming to the non-target mobile hotspot. Before turning off the mobile hotspots of the unconnected stations in the first mobile hotspot and the second mobile hotspot, the method further includes: triggering the stations connected to the target mobile hotspot to roam to the non-target mobile hotspot. The target mobile hotspot is the mobile hotspot with stations connected among the first mobile hotspot and the second mobile hotspot, and the non-target mobile hotspot is the mobile hotspot without stations connected among the first mobile hotspot and the second mobile hotspot. That is to say, among the first mobile hotspot and the second mobile hotspot, the operating frequency band of the target mobile hotspot with stations connected is lower than that of the non-target mobile hotspot without stations connected. If the stations connected to the non-target mobile hotspot all support connecting to a mobile hotspot with a higher frequency band, such as the target mobile hotspot, there is a situation where the mobile hotspot network currently connected by the stations is not the optimal mobile hotspot network that the electronic device can provide. In this case, the stations connected to the non-target mobile hotspot can be triggered to roam to the target mobile hotspot. Then, the electronic device turns off the mobile hotspots without stations connected in the first mobile hotspot and the second mobile hotspot. In this way, a better mobile hotspot network can be provided for the stations as much as possible.

[0024] In a possible implementation of the first aspect, triggering the stations connected to the second mobile hotspot to roam to the first mobile hotspot may specifically include: triggering the stations connected to the candidate mobile hotspot to roam to the non-candidate mobile hotspot. If all the stations connected to the candidate mobile hotspot successfully roam, the first mobile hotspot is the candidate mobile hotspot. If at least one of the stations connected to the candidate mobile hotspot fails to roam, it means that the first mobile hotspot is the non-candidate mobile hotspot. In this way, it can be more accurately determined which one of the at least two mobile hotspots the first mobile hotspot is. The candidate mobile hotspot is the mobile hotspot with the highest frequency band among the first mobile hotspot and the second mobile hotspot, and the non-candidate mobile hotspot is one or more of the first mobile hotspot and the second mobile hotspot with non-highest frequency bands.

[0025] In a possible implementation of the first aspect, the above-mentioned at least two mobile hotspots include two mobile hotspots. That is, there are a total of two mobile hotspots, namely the first mobile hotspot and the second mobile hotspot. The candidate mobile hotspot is the one with a higher operating frequency band (i.e., the highest, such as the 5G frequency band) among the two mobile hotspots, and the non-candidate mobile hotspot is the one with a lower operating frequency band (i.e., the lowest, such as the 2.4G frequency band) among the two mobile hotspots. In this solution, by attempting to trigger the stations connected to the mobile hotspot with the lowest frequency band to roam to the mobile hotspot with the highest frequency band, if all stations roam successfully, it means that the candidate mobile hotspot with the highest frequency band can be used as the first mobile hotspot. If at least one station fails to roam, it means that the candidate mobile hotspot with the highest frequency band cannot be used as the first mobile hotspot. At this time, the non-candidate mobile hotspot is selected as the first mobile hotspot. Since the stations that support the mobile hotspot with the highest frequency band can usually also support the mobile hotspot with the lowest frequency band, the stations connected to the above-mentioned candidate mobile hotspot can all roam to the non-candidate mobile hotspot.

[0026] In a possible implementation of the first aspect, the above-mentioned at least two mobile hotspots include three mobile hotspots. That is, there are a total of three mobile hotspots, namely the first mobile hotspot and the second mobile hotspot. The candidate mobile hotspot is still the mobile hotspot with the highest frequency band (such as the 6G frequency band) among the first mobile hotspot and the second mobile hotspot, and the non-candidate mobile hotspots are the multiple mobile hotspots with non-highest frequency bands (such as the 5G frequency band and the 2.4G frequency band) among the first mobile hotspot and the second mobile hotspot. In this solution, by attempting to trigger the stations connected to the mobile hotspots with non-highest frequency bands (i.e., non-candidate mobile hotspots) to roam to the mobile hotspot with the highest frequency band (i.e., the candidate mobile hotspot), if all stations roam successfully, it means that the mobile hotspot with the highest frequency band can be used as the first mobile hotspot. If at least one station fails to roam, it means that the candidate mobile hotspot with the highest frequency band cannot be used as the first mobile hotspot. At this time, one of the non-candidate mobile hotspots can be selected as the first mobile hotspot. Trigger the stations connected to the candidate mobile hotspot to roam to the non-candidate mobile hotspot, so that the candidate mobile hotspot becomes a mobile hotspot without any stations connected, and then turn off this candidate mobile hotspot. In this way, it is also possible to trigger the stations of some mobile hotspots of the electronic device to roam to other mobile hotspots, and then turn off the mobile hotspots without any stations connected, reducing the power consumption of the electronic device.

[0027] Among them, if there is at least one site roaming failure for the sites connected to non-candidate mobile hotspots, one of the non-candidate mobile hotspots is selected as the first mobile hotspot. It is preferable to select the mobile hotspot with a higher frequency band among the non-candidate mobile hotspots as the first mobile hotspot. For example, if the operating frequency bands of the non-candidate mobile hotspots include the 5G band and the 2.4G band, then the non-candidate mobile hotspot in the 5G band is preferably selected as the first mobile hotspot. The electronic device triggers the sites connected to the candidate mobile hotspot in the 6G band to roam to the non-candidate mobile hotspot in the 5G band. After that, the candidate mobile hotspot in the 6G band will become a mobile hotspot without any site connection, so that the candidate mobile hotspot in the 6G band can be turned off.

[0028] It can be understood that when the non-candidate mobile hotspot in the 5G band is selected as the first mobile hotspot and there is no site connection to the non-candidate mobile hotspot in the 2.4G band, the electronic device can also turn off the non-candidate mobile hotspot in the 2.4G band.

[0029] Furthermore, if the non-candidate mobile hotspot in the 5G band is selected as the first mobile hotspot and there is a site connection to the non-candidate mobile hotspot in the 2.4G band, the electronic device can also try to trigger the sites connected to the non-candidate mobile hotspot in the 2.4G band to roam to the non-candidate mobile hotspot in the 5G band. If all the sites connected to the non-candidate mobile hotspot in the 2.4G band roam successfully, the electronic device can also turn off the non-candidate mobile hotspot in the 2.4G band. The fewer mobile hotspots are turned off and the fewer mobile hotspots are retained, the lower the power consumption of the electronic device.

[0030] Alternatively, if there is at least one site roaming failure for the sites connected to non-candidate mobile hotspots, one of the non-candidate mobile hotspots is selected as the first mobile hotspot. It is also possible to select the mobile hotspot with a lower frequency band among the non-candidate mobile hotspots as the first mobile hotspot. For example, if the operating frequency bands of the non-candidate mobile hotspots include the 5G band and the 2.4G band, then the non-candidate mobile hotspot in the 2.4G band is selected as the first mobile hotspot. The electronic device triggers the sites connected to the candidate mobile hotspot in the 6G band to roam to the non-candidate mobile hotspot in the 5G band. After that, the candidate mobile hotspot in the 6G band will become a mobile hotspot without any site connection, so that the candidate mobile hotspot in the 6G band can be turned off.

[0031] It can be understood that in the case where the non-candidate mobile hotspot in the 2.4G band is selected as the first mobile hotspot, if there is no site connection to the non-candidate mobile hotspot in the 5G band, the electronic device can turn off the non-candidate mobile hotspot in the 5G band.

[0032] Further, in the case of selecting a non-candidate mobile hotspot in the 2.4G band as the first mobile hotspot, if there is a site connection to the non-candidate mobile hotspot in the 5G band, the electronic device can trigger the site connected to the non-candidate mobile hotspot in the 5G band to roam to the non-candidate mobile hotspot in the 2.4G band. Similarly, the non-candidate mobile hotspot in the 5G band will become a mobile hotspot without a site connection. At this time, the electronic device can also turn off the non-candidate mobile hotspot in the 5G band at the same time. The fewer mobile hotspots are retained, the lower the power consumption of the electronic device.

[0033] In a possible implementation manner of the first aspect, the method further includes: if neither the first mobile hotspot nor the second mobile hotspot has a site connection, turn off other mobile hotspots other than the lowest band supported by the electronic device. In this way, some mobile hotspots can be turned off while keeping the mobile hotspot function of the electronic device turned on. For the band of the mobile hotspot, usually the most devices support connecting to the mobile hotspot. In this solution, the retained mobile hotspot is the mobile hotspot with the lowest band among at least two mobile hotspots, ensuring that the mobile hotspots turned on by the electronic device can be discovered and connected by more devices.

[0034] In a possible implementation manner of the first aspect, the method further includes: when the first preset time is reached after the mobile hotspot is turned on, obtain the site connection status of the first mobile hotspot and the second mobile hotspot. This connection status is used to indicate whether there is a site connected to the first mobile hotspot and the second mobile hotspot. In this way, at least two mobile hotspots turned on by the electronic device can be kept turned on for a period of time and can be discovered and connected by more other devices. After a period of time, when no other device wants to connect to the mobile hotspots turned on by the electronic device, then combine the site connection status to decide to turn off some mobile hotspots.

[0035] In a possible implementation manner of the first aspect, the method further includes: when the duration during which none of the at least two mobile hotspots is connected to a site reaches a certain time, such as the second preset time, it is possible that no device wants to connect to the mobile hotspots of the electronic device. At this time, turning off the at least two mobile hotspots can help reduce the power consumption of the electronic device. The second preset time is greater than the first preset time.

[0036] In a second aspect, the present application further provides an electronic device. The electronic device may include: a processor and a memory. The memory is used to store computer execution instructions. When the electronic device runs, the processor executes the computer execution instructions stored in the memory so that the electronic device executes the control method of the mobile hotspot as described in any one of the first aspects above.

[0037] In a third aspect, the present application provides a computer-readable storage medium storing instructions which, when run on a computer, enable the computer to execute the control method for a mobile hotspot according to any one of the first aspects above.

[0038] In a fourth aspect, there is provided a computer program product containing instructions which, when run on an electronic device, enable the electronic device to execute the control method for a mobile hotspot according to any one of the first aspects above.

[0039] In a fifth aspect, there is provided a device (for example, the device may be a chip system), which includes a processor for supporting an electronic device to implement the functions involved in the first aspect above. In a possible design, the device further includes a memory for storing necessary program instructions and data of the electronic device. When the device is a chip system, it may be composed of chips or may include chips and other discrete devices.

[0040] Among them, for the technical effects brought by any one of the design manners in the second to fifth aspects, reference may be made to the technical effects brought by different design manners in the first aspect, which will not be elaborated herein. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 Schematic diagram of an operation interface for turning on the mobile hotspot of a mobile phone provided by an embodiment of the present application;

[0042] Figure 2 Schematic diagram of a scenario for connecting to the mobile hotspot of a mobile phone provided by an embodiment of the present application;

[0043] Figure 3 Schematic diagram of a scenario for connecting to the mobile hotspot of a mobile phone provided by an embodiment of the present application;

[0044] Figure 4 Schematic flow diagram of a control method for a mobile hotspot provided by an embodiment of the present application;

[0045] Figure 5 Schematic flow diagram of a control method for a mobile hotspot provided by an embodiment of the present application;

[0046] Figure 6A Schematic flow diagram of a specific example of a control method for a mobile hotspot provided by an embodiment of the present application;

[0047] Figure 6B Schematic diagram of a scenario of a specific example of a control method for a mobile hotspot provided by an embodiment of the present application;

[0048] Figure 7A Schematic flow diagram of a specific example of a control method for a mobile hotspot provided by an embodiment of the present application;

[0049] Figure 7B A schematic diagram of a scenario for a specific example of a method for controlling a mobile hotspot provided by an embodiment of the present application;

[0050] Figure 8A A schematic flowchart for a specific example of a method for controlling a mobile hotspot provided by an embodiment of the present application;

[0051] Figure 8B A schematic diagram of a scenario for a specific example of a method for controlling a mobile hotspot provided by an embodiment of the present application;

[0052] Figure 9 A schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;

[0053] Figure 10 A software and hardware architecture diagram of an electronic device provided by an embodiment of the present application;

[0054] Figure 11 An architecture diagram of a chip system provided by an embodiment of the present application. Detailed implementation manners

[0055] The following briefly describes the technical terms that may be involved in the embodiments of the present application.

[0056] A wireless access point (AP) is an access point for a wireless network, commonly known as a "hotspot". It should be noted that this function of the mobile hotspot may be named differently by different mobile phone manufacturers, such as personal hotspot, network hotspot, shared hotspot, or mobile hotspot, etc. The frequency band of the mobile hotspot can be referred to as the frequency band or the operating frequency band.

[0057] The frequency band of the mobile hotspot represents the frequency range of the mobile hotspot, with the unit of hertz (Hz). The commonly used frequency bands of the mobile hotspot are 2.4 GHz and 5 GHz. Among them, the 2.4 GHz has good penetration, but the transmission distance is relatively short and it is easily interfered by other signals; the 5 GHz has poor penetration, but the transmission distance is long and it is not easily interfered by signals. The frequency band of the mobile hotspot may also include 6G frequency band, 7G frequency band, etc.

[0058] When some devices scan and connect to a mobile hotspot, they may not be able to connect to the mobile hotspot with the highest supported frequency band for some reasons. Taking a tablet computer that supports connecting to mobile hotspots with two working frequency bands, namely the 2.4G band and the 5G band, as an example, when the tablet computer scans and connects to a mobile hotspot, it scans mobile hotspots with both the 2.4G band and the 5G band at the same time. The tablet computer may connect to the mobile hotspot with the working frequency band of 5G (hereinafter referred to as the 5G band mobile hotspot), or it may connect to the mobile hotspot with the working frequency band of 2.4G (hereinafter referred to as the 2.4G band mobile hotspot). In an example, if the signal strength of the 5G band mobile hotspot scanned by the tablet computer is low, while the signal strength of the 2.4G band is high, the tablet computer may connect to the 2.4G band mobile hotspot.

[0059] Hostapd is a daemon process running in user space. Based on this open-source tool, a mobile phone can implement the mobile hotspot function.

[0060] 802.11v protocol: Wireless Network Management (WNM). The 802.11v protocol allows wireless devices to exchange information about the network topology, including information about the signal environment, to promote the overall improvement of the wireless network.

[0061] Basic Service Set (BSS) is a concept in a wireless local area network. An AP and the stations (STAs) associated with it can form a BSS. Each BSS is identified by a Basic Service Set Identifier (BSSID).

[0062] The Basic Service Set Identifier (BSSID) refers to the basic service set identifier in a wireless local area network, which is used to uniquely identify each basic service set (BSS) in the wireless network.

[0063] BSS Transition Management (BTM) is a technology. BTM can be used to notify wireless clients of the 802.11v protocol to leave the current BSS and connect to a more suitable AP, thereby improving the access quality of wireless clients of the 802.11v protocol. Devices connected to a mobile hotspot can perform BTM roaming based on the 802.11v protocol and roam from the currently connected mobile hotspot to other mobile hotspots. Radio Frequency (RF) represents the electromagnetic frequency that can be radiated into space.

[0064] Such as Figure 1The figure shows a schematic diagram of an operation interface for turning on the mobile hotspot function of a mobile phone in some embodiments. When the mobile phone displays the main interface 101, in response to a triggering operation by the user on the settings application icon, the settings application is entered, and the settings interface 102 is displayed. The settings interface 102 may include an option 103 for the mobile hotspot. In response to a triggering operation on the option 103 for the mobile hotspot, the mobile phone may display the settings interface 104 for the mobile hotspot. The settings interface 104 for the mobile hotspot may include a switch 105 for the mobile hotspot, hotspot information, and more sharing settings options. Among them, the hotspot information includes options such as device name, password, connected devices, and AP band. Among them, the user can turn on the mobile hotspot function of the mobile phone by turning on the switch 105 of the mobile hotspot, and provide the mobile hotspot for other devices to discover and connect.

[0065] The mobile phone can set (such as according to user selection) the working band of the mobile hotspot that is default turned on. For example, the mobile phone can set the working band of the default turned on mobile hotspot to the 2.4G band and / or the 5G band. When a device connects to the mobile hotspot, the device itself needs to support connecting to a mobile hotspot with the 2.4G band or the 5G band. For example, some Internet of Things (IoT) products (such as car head units, smart speakers, etc.) only support connecting to a mobile hotspot with the 2.4G band, and some devices such as mobile phones can support connecting to mobile hotspots with both the 2.4G band and the 5G band. Devices that only support connecting to a mobile hotspot with the 2.4G band cannot scan for a 5G band mobile hotspot to connect to.

[0066] When the working band of the default turned on mobile hotspot is the 5G band, the mobile phone, in response to a hotspot turn-on instruction, turns on the 5G band mobile hotspot. If other devices only support connecting to a mobile hotspot with the 2.4G band, then those other devices will not be able to scan and connect to this mobile hotspot. When the working band of the default turned on mobile hotspot is the 2.4G band, the mobile phone, in response to a hotspot turn-on instruction, turns on the 2.4G band mobile hotspot. If a device supports connecting to mobile hotspots with both the 2.4G band and the 5G band working bands, then that device can only connect to the 2.4G band mobile hotspot and cannot use the 5G band mobile hotspot to enjoy high speed for Internet access. If the default turned on mobile hotspot has working bands of both the 2.4G band and the 5G band, keeping the hotspots of both working bands turned on for a long time is likely to cause a large amount of power consumption waste.

[0067] For example, in the scenario of using a car head unit, it may be necessary to connect to the mobile hotspot of an electronic device such as a mobile phone in order to implement functions such as navigation or playing music on the car head unit. Figure 2, if the operating frequency band of the mobile hotspot defaultly enabled by a mobile phone, such as mobile phone 10, is the 5G frequency band, while the in-vehicle infotainment system, such as in-vehicle infotainment system 20, only supports connecting to mobile hotspots with the 2.4G frequency band, then after the mobile hotspot function of mobile phone 10 is enabled, in-vehicle infotainment system 20 cannot scan the mobile hotspot enabled by mobile phone 10 and thus cannot connect to the network for operation.

[0068] For another example, the device to be connected to the mobile hotspot is a tablet computer that supports connecting to mobile hotspots with two operating frequency bands, namely the 2.4G frequency band and the 5G frequency band. Such as Figure 3 , if the operating frequency band of the mobile hotspot defaultly enabled by a mobile phone, such as mobile phone 10, is the 2.4G frequency band, then after the mobile hotspot function of mobile phone 10 is enabled, tablet computer 30 can only connect to the mobile hotspot with the 2.4G frequency band, and the network rate is relatively low, so the best network service cannot be obtained.

[0069] In the related art, in order to ensure that the mobile hotspots enabled by electronic devices such as mobile phones can be scanned and connected by more devices and to provide better networks for the devices, mobile hotspots with multiple operating frequency bands will be enabled simultaneously. This may cause the mobile phone to waste more power consumption. In order to reduce the power consumption of the mobile phone, when the mobile hotspot function is turned on, only one mobile hotspot with one operating frequency band can be defaultly enabled. However, as mentioned above, defaultly enabling only one mobile hotspot with one operating frequency band may cause some devices to be unable to connect to the mobile hotspot enabled by the mobile phone or unable to access the Internet using a better-quality network.

[0070] Based on this, the present application proposes a control method for mobile hotspots, which is used to reduce the power consumption of electronic devices while providing mobile hotspots for other devices. Specifically, when the electronic device enables the mobile hotspot function, it can first enable at least two mobile hotspots with different operating frequency bands so that the mobile hotspots enabled by the electronic device can be discovered and connected by more devices. Among them, at least two mobile hotspots include a first mobile hotspot and a second mobile hotspot. Then, it queries whether there are stations connected to the mobile hotspots of each operating frequency band. Then, according to the query results, it selects to turn off some mobile hotspots without station connections. Specifically, if both the first mobile hotspot and the second mobile hotspot are connected with stations, the stations connected to the second mobile hotspot can be triggered to roam to the first mobile hotspot. After that, the second mobile hotspot will become a mobile hotspot without station connections, and the second mobile hotspot can be turned off. Thus, combined with the current station connection situation of each mobile hotspot, some mobile hotspots can be turned off to avoid power consumption waste caused by keeping all mobile hotspots with all operating frequency bands enabled for a long time.

[0071] In some embodiments of the present application, when the electronic device enables the mobile hotspot function, the enabled mobile hotspots are all the mobile hotspots with operating frequency bands supported by the electronic device.

[0072] In some embodiments, the above-mentioned at least two mobile hotspots include two mobile hotspots. In other embodiments, the above-mentioned at least two mobile hotspots include three or more mobile hotspots.

[0073] In some embodiments, the first mobile hotspot is any one of the at least two mobile hotspots. The second mobile hotspot is all of the at least two mobile hotspots other than the first mobile hotspot. In this embodiment, it can be divided into two cases. One case is that the electronic device only turns on two mobile hotspots; the other case is that the electronic device turns on three or more mobile hotspots.

[0074] In the case where the above-mentioned at least two mobile hotspots include two mobile hotspots, the first mobile hotspot and the second mobile hotspot are respectively one of the mobile hotspots turned on by the electronic device. In this case, after the electronic device triggers the station connected to the second mobile hotspot to roam to the first mobile hotspot and turns off the second mobile hotspot, only one mobile hotspot is retained, that is, the first mobile hotspot. For example, the electronic device turns on two mobile hotspots in the 2.4G band and the 5G band. The first mobile hotspot is the mobile hotspot in the 2.4G band, and the second mobile hotspot is the mobile hotspot in the 5G band. Or, the first mobile hotspot is the mobile hotspot in the 5G band, and the second mobile hotspot is the mobile hotspot in the 2.4G band.

[0075] In the case where the above-mentioned at least two mobile hotspots include three or more mobile hotspots, the first mobile hotspot is one of the mobile hotspots turned on by the electronic device, and the second mobile hotspot is all of the mobile hotspots turned on by the electronic device other than the first mobile hotspot. In this case, after the electronic device triggers the station connected to the second mobile hotspot to roam to the first mobile hotspot and turns off the second mobile hotspot, only one mobile hotspot is retained, that is, the first mobile hotspot. For example, the electronic device turns on three mobile hotspots in the 2.4G band, the 5G band, and the 6G band. The first mobile hotspot is the mobile hotspot in the 2.4G band, and the second mobile hotspot includes two mobile hotspots in the 5G band and the 6G band. Or, the first mobile hotspot is the mobile hotspot in the 5G band, and the second mobile hotspot includes two mobile hotspots in the 2.4G band and the 6G band. Or, the first mobile hotspot is the mobile hotspot in the 6G band, and the second mobile hotspot includes two mobile hotspots in the 2.4G band and the 5G band.

[0076] In some other embodiments, the first mobile hotspot is any one of at least two mobile hotspots, and the second mobile hotspot is some of the at least two mobile hotspots other than the first mobile hotspot. In this embodiment, the above-mentioned at least two mobile hotspots include three or more mobile hotspots. In this case, after the electronic device triggers the station connected to the second mobile hotspot to roam to the first mobile hotspot and turns off the second mobile hotspot, the remaining active mobile hotspots include: the first mobile hotspot and the mobile hotspots other than the first mobile hotspot and the second mobile hotspot.

[0077] For example, the electronic device turns on three mobile hotspots on the 2.4G band, 5G band, and 6G band. The first mobile hotspot is the mobile hotspot on the 2.4G band, and the second mobile hotspot is the mobile hotspot on the 5G band. The electronic device triggers the station connected to the mobile hotspot on the 5G band to roam to the mobile hotspot on the 2.4G band and turns off the mobile hotspot on the 5G band. Additionally, the mobile hotspot on the 6G band can remain on. In some other embodiments, if there is no station connected to the mobile hotspot on the 6G band, the electronic device can also turn off the mobile hotspot on the 6G band.

[0078] Alternatively, the first mobile hotspot is the mobile hotspot on the 2.4G band, and the second mobile hotspot is the mobile hotspot on the 6G band. Or, the first mobile hotspot is the mobile hotspot on the 5G band, and the second mobile hotspot is the mobile hotspot on the 2.4G band. Or, the first mobile hotspot is the mobile hotspot on the 5G band, and the second mobile hotspot is the mobile hotspot on the 6G band. Or, the first mobile hotspot is the mobile hotspot on the 6G band, and the second mobile hotspot is the mobile hotspot on the 2.4G band. Or, the first mobile hotspot is the mobile hotspot on the 6G band, and the second mobile hotspot is the mobile hotspot on the 5G band. In each of the above examples, the specific implementation of the electronic device triggering the station to roam and turning off the mobile hotspot can refer to the description of the example where the first mobile hotspot is the mobile hotspot on the 2.4G band and the second mobile hotspot is the mobile hotspot on the 5G band.

[0079] The specific implementation process of the electronic device triggering the station of the second mobile hotspot to roam to the first mobile hotspot and turning off the second mobile hotspot will be described in detail in the subsequent embodiments.

[0080] Exemplarily, the above-mentioned electronic device can be an electronic device that supports turning on mobile hotspots on multiple working bands, such as a mobile phone (such as Figure 2 and Figure 3As shown in [figure], tablet computers, personal computers (PCs), smart screens, desktops, laptops, handheld computers, notebooks, ultra-mobile personal computers (UMPCs), netbooks, wearable devices such as smartwatches, artificial intelligence (AI) speakers, and in-vehicle devices. It can also be various teaching aids (such as learning machines, early education machines), smart toys, portable robots, personal digital assistants (PDAs), augmented reality (AR) / virtual reality (VR) devices, media players, and other devices. It can also be devices with mobile office functions, devices with smart home functions, devices with audio-visual entertainment functions, devices that support smart travel, and so on. The specific form of this device is not particularly limited in the embodiments of this application.

[0081] The following will describe in detail the method for controlling a mobile hotspot provided in the embodiments of this application with reference to the accompanying drawings.

[0082] Figure 4 The flowchart of the method for controlling a mobile hotspot in some embodiments of this application is shown. In this embodiment, a mobile phone is used as an example for illustration.

[0083] S301. In response to a hotspot activation instruction, activate Mobile Hotspot 1 and Mobile Hotspot 2.

[0084] Among them, Mobile Hotspot 1 and Mobile Hotspot 2 are respectively in different operating frequency bands. Combining the above description, the common operating frequency bands of mobile hotspots include the 2.4G frequency band and the 5G frequency band. Exemplarily, the operating frequency band of Mobile Hotspot 2 is higher than that of Mobile Hotspot 1; for example, the operating frequency band of Mobile Hotspot 1 is the 2.4G frequency band, and the operating frequency band of Mobile Hotspot 2 is the 5G frequency band. If the first mobile hotspot is Mobile Hotspot 1, then the second mobile hotspot is Mobile Hotspot 2; or, if the first mobile hotspot is Mobile Hotspot 2, then the second mobile hotspot is Mobile Hotspot 1.

[0085] In some embodiments, the mobile phone can activate the mobile hotspot function in response to a user's operation. The process of activating the mobile hotspot function can refer to the Figure 1 flowchart shown above. The above hotspot activation instruction can be issued by the mobile phone in response to Figure 1 the triggering operation of the user on the switch 105 of the mobile hotspot as shown. That is to say, the mobile phone can activate Mobile Hotspot 1 and Mobile Hotspot 2 in response to the user's operation of activating the mobile hotspot function, such as the triggering operation on the switch 105 of the mobile hotspot.

[0086] In some other embodiments, the mobile phone can also turn on the mobile hotspot function in response to instructions from other applications. When other applications need to use the mobile hotspot function, they can send instructions to the settings application to trigger the settings application to turn on the mobile hotspot function. In this embodiment, the above hotspot activation instruction can correspond to the instruction sent by other applications to the settings application for triggering the activation of the mobile hotspot function.

[0087] S302. Obtain the site connection status of each mobile hotspot.

[0088] In some embodiments, the site connection status of the mobile hotspot obtained in S302 is used to indicate whether there is a site connected to the mobile hotspot. For example, there is a site connected to Mobile Hotspot 1, and there is no site connected to Mobile Hotspot 2. In some other embodiments, the site connection status of the mobile hotspot obtained in S302 is used to indicate the number of site connections of the mobile hotspot. For example, the number of site connections of Mobile Hotspot 1 is the first value, and the number of site connections of Mobile Hotspot 2 is the second value. A site connection number greater than 0 indicates that there is a site connected to the corresponding mobile hotspot.

[0089] As can be seen from the above description, the mobile hotspots include Mobile Hotspot 1 and Mobile Hotspot 2. Therefore, in the above S302, obtaining the site connection status of the sites connected to the mobile hotspots includes: obtaining the site connection status of the sites connected to Mobile Hotspot 1 and the site connection status of the sites connected to Mobile Hotspot 2.

[0090] In some embodiments, the mobile phone can count the number of site connections of the mobile hotspot after the time for turning on the mobile hotspot function reaches the first preset time. In this way, it is ensured that the mobile hotspot turned on by the mobile phone can be discovered and connected by other devices for a period of time. Further, the mobile phone can start timing after receiving the operation of the user to turn on the mobile hotspot function. Specifically, the mobile phone can start timing in response to the hotspot activation instruction.

[0091] The first preset time can be set according to the actual situation. Exemplarily, the first preset time can be set to 3 minutes (min), 5 min, or 10 min, etc. Usually, the user will turn on the mobile hotspot function of the mobile phone when there are other devices that want to connect to the mobile hotspot of the mobile phone. Therefore, within a period of time after the mobile hotspot function of the mobile phone is turned on, the devices with the need to connect to the mobile hotspot should have already connected to the mobile hotspot turned on by the mobile phone. At this time, the mobile phone can obtain the site connection status of each mobile hotspot, and in combination with the site connection status, turn off some of the mobile hotspots of the mobile phone to reduce the power consumption of the mobile phone. Specifically, the following S303a, S303b, or S303c can be executed.

[0092] S303a. If only one mobile hotspot is connected to a site, turn off the mobile hotspots that are not connected to the site.

[0093] In the above embodiments, when the mobile phone turns on both Mobile Hotspot 1 and Mobile Hotspot 2, only one mobile hotspot is connected to a station. Specifically, it can be any of the following situations: In the first situation, Mobile Hotspot 1 is not connected to a station, and Mobile Hotspot 2 is connected to a station; in the second situation, Mobile Hotspot 1 is connected to a station, and Mobile Hotspot 2 is not connected to a station.

[0094] In the first situation above, since Mobile Hotspot 1 is not connected to a station, Mobile Hotspot 1 can be turned off.

[0095] In the second situation above, since Mobile Hotspot 2 is not connected to a station, Mobile Hotspot 2 can be turned off.

[0096] In the technical solution proposed in the embodiments of the present application, after a period of time when the mobile phone turns on the mobile hotspot function, if only one mobile hotspot is connected to a station, then turn off the mobile hotspot that is not connected to a station to reduce the number of mobile hotspots kept on by the mobile phone and reduce the power consumption of the mobile phone.

[0097] As can be seen from the above description, for a mobile hotspot with a higher working frequency band, the network transmission distance it provides is farther and the transmission rate is faster. Moreover, when a device connects to a mobile hotspot, it may not directly connect to the mobile hotspot corresponding to the highest frequency band it supports. Therefore, when it is detected that only one mobile hotspot is connected to a station, it is also possible to determine whether this mobile hotspot is the highest frequency band mobile hotspot turned on by the mobile phone. If the mobile hotspot connected to the station is the highest frequency band mobile hotspot turned on by the mobile phone, it means that the mobile phone can provide the optimal mobile hotspot network for the station; at this time, the mobile phone can directly turn off the mobile hotspot that is not connected to a station, that is, the non - highest frequency band mobile hotspot. Exemplarily, in S303a, only Mobile Hotspot 2 is connected to a station, that is, Mobile Hotspot 1 is not connected to a station. Since the working frequency band of Mobile Hotspot 2 is higher than that of Mobile Hotspot 1, the mobile phone can directly turn off Mobile Hotspot 1.

[0098] In some embodiments, the mobile hotspots supported by the device can also be denoted as the mobile hotspots supported by the device.

[0099] If the mobile hotspot connected to the station is not the highest frequency band mobile hotspot turned on by the mobile phone, it means that there is a situation where the mobile hotspot network currently connected by the station is not the optimal mobile hotspot network that the mobile phone can provide. At this time, the mobile phone can respectively determine whether all stations connected to the non - highest frequency band mobile hotspot support connecting to the highest frequency band mobile hotspot, and then determine whether to turn off the mobile hotspot and which mobile hotspots need to be turned off according to the judgment results.

[0100] The following details how to determine whether to turn off the mobile hotspot and which mobile hotspots need to be turned off according to the judgment results.

[0101] In some embodiments, the mobile hotspot connected to the station is not the mobile hotspot with the highest frequency band, and among the N stations connected to this mobile hotspot, the number of stations that support connecting to the same higher-frequency mobile hotspot is less than N. To ensure the power consumption of the mobile phone, the mobile phone can directly turn off the higher-frequency mobile hotspot of the unconnected stations. Thus, only one mobile hotspot remains on.

[0102] Exemplarily, mobile hotspot 1 is connected to a station, that is, mobile hotspot 2 is not connected to a station, and among the N stations connected to mobile hotspot 1, the number of stations that support connecting to mobile hotspot 2 is less than N. Then, to prioritize ensuring the power consumption of the mobile phone, the second mobile hotspot is turned off. Among the N stations connected to mobile hotspot 1, the number of stations that support connecting to mobile hotspot 2 is less than N, that is, among the N stations of Bluetooth mobile hotspot 1, there are stations that do not support connecting to mobile hotspot 2.

[0103] In some other embodiments, if the mobile phone turns on three or more mobile hotspots with different operating frequency bands at the same time, the mobile hotspot connected to the station is not the mobile hotspot with the highest frequency band, and among the N stations connected to this mobile hotspot, the number of stations that support connecting to the same higher-frequency mobile hotspot is less than N, then the mobile hotspots of the unconnected stations are directly turned off. For example, if the mobile phone turns on mobile hotspots in the 2.4G band, 5G band, and 6G band at the same time, and only the mobile hotspot in the 2.4G band is connected to a station, and among the N stations connected to the mobile hotspot in the 2.4G band, the number of stations that support connecting to the mobile hotspot in the 6G band is less than N, then the mobile hotspot in the 6G band of the unconnected stations is directly turned off. Next, the mobile phone can also determine whether the number of stations among the N stations connected to the mobile hotspot in the 2.4G band that support connecting to the mobile hotspot in the 5G band is less than N. If the number of stations among the N stations connected to the mobile hotspot in the 2.4G band that support connecting to the mobile hotspot in the 5G band is also less than N, then the mobile hotspot in the 5G band of the unconnected stations is directly turned off. When determining whether the stations connected to the mobile hotspot in the 2.4G band support connecting to the same higher-frequency mobile hotspot, it can be judged in the order from high to low frequency bands. For example, first judge whether all stations connected to the mobile hotspot in the 2.4G band support connecting to the mobile hotspot in the 6G band. If so, trigger the stations connected to the mobile hotspot in the 2.4G band to roam to the mobile hotspot in the 6G band, and no longer judge whether all stations connected to the mobile hotspot in the 2.4G band support connecting to the mobile hotspot in the 5G band. In this way, better mobile hotspot services can be provided for the stations as much as possible.

[0104] For another example, if the mobile phone simultaneously turns on the mobile hotspots of the 2.4G band, 5G band, and 6G band, and only the mobile hotspot of the 5G band has stations connected, and among the N stations connected to the mobile hotspot of the 5G band, the number of stations that support connecting to the mobile hotspot of the 6G band is less than N, then directly turn off the mobile hotspot of the 6G band for the unconnected stations. Additionally, since the mobile hotspot of the 2.4G band also has no stations connected, the mobile phone can also turn off the mobile hotspot of the 2.4G band.

[0105] In some other embodiments, the mobile hotspot with stations connected is not the highest frequency band, and among the N stations connected to this mobile hotspot, the number of stations that support connecting to the same higher-frequency mobile hotspot is N. Then the mobile phone can first trigger the stations connected to this mobile hotspot to roam to the same higher-frequency mobile hotspot, and then turn off the mobile hotspots of the unconnected stations.

[0106] Exemplarily, only mobile hotspot 1 has stations connected, that is, mobile hotspot 2 has no stations connected, and among the N stations connected to mobile hotspot 1, the number of stations that support connecting to mobile hotspot 2 is N. Then the mobile phone triggers the stations connected to mobile hotspot 1 to roam to mobile hotspot 2. At this point, the number of connected stations of mobile hotspot 1 should become 0, and the mobile phone turns off mobile hotspot 1 of the unconnected stations.

[0107] In some other embodiments, taking the example of the mobile phone simultaneously turning on three mobile hotspots of the 2.4G band, 5G band, and 6G band, if only the mobile hotspot of the 2.4G band has stations connected, and among the N stations connected to the mobile hotspot of the 2.4G band, the number of stations that support connecting to the mobile hotspot of the 6G band is N, then the mobile phone triggers the N stations connected to the mobile hotspot of the 2.4G band to roam to the mobile hotspot of the 6G band. After the roaming ends, the number of connected stations of the mobile hotspot of the 2.4G band should become 0. At this time, the mobile phone can turn off the mobile hotspot of the 2.4G band for the unconnected stations. Additionally, the mobile hotspot of the 5G band also has no stations connected, and the mobile phone can also turn off the mobile hotspot of the 5G band. If among the N stations connected to the mobile hotspot of the 2.4G band, the number of stations that support connecting to the mobile hotspot of the 6G band is less than N, it can be further determined whether all the N stations connected to the mobile hotspot of the 2.4G band support connecting to the mobile hotspot of the 5G band. If among the N stations connected to the mobile hotspot of the 2.4G band, the number of stations that support connecting to the 5G band is N, then the mobile phone triggers the N stations connected to the mobile hotspot of the 2.4G band to roam to the mobile hotspot of the 5G band. After the roaming ends, the number of connected stations of the mobile hotspot of the 2.4G band should become 0. At this time, the mobile phone can turn off the mobile hotspot of the 2.4G band for the unconnected stations. Additionally, the mobile hotspot of the 6G band also has no stations connected, and the mobile phone can also turn off the mobile hotspot of the 6G band.

[0108] In this way, on the premise of ensuring the power consumption of the mobile phone, it is possible to provide the optimal mobile hotspot service for the site as much as possible.

[0109] If after S302, two or more mobile hotspots are connected to the site, in order to reduce the power consumption of the mobile phone, device roaming processing can be triggered to enable the sites connected to each mobile hotspot of the mobile phone to be connected to the same mobile hotspot, and then other mobile hotspots, that is, the mobile hotspots not connected to the site, are turned off. After that, the mobile phone only keeps one mobile hotspot turned on. Among them, the mobile hotspot selected by the mobile phone to keep can be recorded as the target mobile hotspot. In different situations, the target mobile hotspot can be different.

[0110] S303b. If both Mobile Hotspot 1 and Mobile Hotspot 2 are connected to the site, trigger the sites connected to the non-terminal mobile hotspot to roam to the terminal mobile hotspot, and turn off the non-terminal mobile hotspot.

[0111] The terminal mobile hotspot is Mobile Hotspot 1, and the non-terminal mobile hotspot is Mobile Hotspot 2; or, the terminal mobile hotspot is Mobile Hotspot 2, and the non-terminal mobile hotspot is Mobile Hotspot 1. It should be noted that the terminal mobile hotspot is the first mobile hotspot, and the non-terminal mobile hotspot is the second mobile hotspot.

[0112] It can be understood that after triggering the sites connected to the non-terminal mobile hotspot to roam to the terminal mobile hotspot, the number of site connections of the non-terminal mobile hotspot should become 0, so the mobile hotspot without a connected site, that is, the non-terminal mobile hotspot, can be turned off. In the above embodiment, the terminal mobile hotspot can be Mobile Hotspot 1, and the non-terminal mobile hotspot is Mobile Hotspot 2; when the terminal mobile hotspot is Mobile Hotspot 2, the non-terminal mobile hotspot is Mobile Hotspot 1.

[0113] In some embodiments, after determining that both Mobile Hotspot 1 and Mobile Hotspot 2 are connected to the site, the mobile phone can first determine the terminal mobile hotspot.

[0114] When the mobile phone determines the terminal mobile hotspot, it can specifically first determine the target working frequency band. The target working frequency band can refer to the highest one among the frequency bands jointly supported by all the sites connected to the mobile hotspot of the mobile phone. That is, the terminal mobile hotspot is the mobile hotspot of the highest frequency band jointly supported by all the sites connected to the mobile hotspot of the mobile phone. If the number of sites connected to all the mobile hotspots of the mobile phone is greater than or equal to 2, for the above-mentioned target working frequency band, the frequency bands supported by each site for connection can be obtained respectively, and then the highest frequency band among the frequency bands supported by each site for connection is taken.

[0115] Taking a car infotainment system and a tablet computer as examples, the frequency band supported by the car infotainment system for connection is the 2.4G frequency band, and the frequency bands supported by the tablet computer for connection are the 2.4G frequency band and the 5G frequency band. Then, the frequency band commonly supported by the car infotainment system and the tablet computer for connection is the 2.4G frequency band. Another example is that device A supports connecting to mobile hotspots with 2.4G and 5G frequency bands, and device B supports connecting to mobile hotspots with 2.4G, 5G, and 6G frequency bands. Then, the frequency bands commonly supported by device A and device B for connection include the 2.4G frequency band and the 5G frequency band, and the highest operating frequency band among them is the 5G frequency band, and the target operating frequency band can be set to the 5G frequency band.

[0116] If a device supports connecting to a mobile hotspot with a higher frequency band, the device usually also supports connecting to a mobile hotspot with a lower frequency band. If a device only supports connecting to a mobile hotspot with a lower frequency band, then the device does not support connecting to a mobile hotspot with a higher operating frequency band. For example, the tablet computer supports connecting to a mobile hotspot with a maximum of 5G frequency band, and the tablet computer also supports connecting to a mobile hotspot with 2.4G frequency band. Some car infotainment systems support connecting to a mobile hotspot with a maximum of 2.4G frequency band, but these car infotainment systems do not support connecting to a mobile hotspot with 5G frequency band. Therefore, the target operating frequency band can also be determined by obtaining the highest frequency band commonly supported by the stations. Exemplarily, the mobile phone first obtains the highest frequency band supported by each station for connection, and then takes the minimum value among them as the above-mentioned target operating frequency band. Exemplarily, the highest frequency band supported by the car infotainment system is the 2.4G frequency band, and the highest frequency band supported by the tablet computer is the 5G frequency band. Then, for these car infotainment systems and tablet computers, the determined target operating frequency band is the smaller value, that is, the 2.4G frequency band. Another example is that the highest frequency bands supported by three stations for connection are the 2.4G frequency band, the 5G frequency band, and the 6G frequency band respectively, and the target operating frequency band can be determined as the 2.4G frequency band.

[0117] Among them, in some embodiments, the mobile phone can obtain the frequency band or the highest frequency band supported by the station for connection through the interaction and communication between the mobile phone and the station. Exemplarily, the mobile phone can send a highest frequency band acquisition instruction to the station. In response to this highest frequency band acquisition instruction, the station returns to the mobile phone the highest frequency band of the hotspot it supports for connection. Or, the mobile phone can send a frequency band acquisition instruction to the station, and in response to this frequency band acquisition instruction, the station can return all the frequency bands supported by the station to the mobile phone.

[0118] Generally, during the process of a device connecting to the mobile hotspot of the mobile phone, it will interact with the mobile phone. Some device information of each other is exchanged during this interaction process. In this way, the mobile phone can determine the highest frequency band of the hotspot commonly supported by the stations according to the device information of the stations obtained through the interaction during the process of each station connecting to the mobile hotspot.

[0119] In the technical solution provided by this application, by interacting between the mobile phone and the stations connected to each mobile hotspot to determine the target working frequency band, the highest frequency band supported by each station for connection can be determined more quickly, improving the processing efficiency.

[0120] It can be understood that after determining the target working frequency band, the end mobile hotspot is also determined. The mobile phone can trigger the stations connected to the non-end mobile hotspots to roam to the end mobile hotspot.

[0121] In some embodiments, the mobile phone triggers the stations connected to the non-end mobile hotspots to roam to the end mobile hotspot, which can be specifically implemented in the following manner: The mobile phone sends a roaming instruction to the stations connected to the non-end mobile hotspots. After receiving the roaming instruction, the stations connected to the non-end mobile hotspots scan the end mobile hotspot in response to the roaming instruction. Among them, the roaming instruction is used to instruct the device to roam and connect from the currently connected mobile hotspot to the end mobile hotspot. After scanning the end mobile hotspot, the station disconnects from the currently connected mobile hotspot and establishes a connection with the end mobile hotspot. Thus, the station completes the process of roaming from the currently connected mobile hotspot to the end mobile hotspot. In some embodiments, the roaming instruction carries information about the end mobile hotspot. Exemplarily, the roaming instruction can carry any one of the following information: the working frequency band, channel, and BSSID of the end mobile hotspot, etc. Among them, the BSSID can also be the media access control address (MAC).

[0122] The mobile hotspot can announce the existence of the mobile hotspot signal by periodically sending broadcast frames, and the broadcast frames can carry mobile hotspot capability information. In this embodiment, when the station scans the end mobile hotspot in response to the roaming instruction, it can be that the station scans the broadcast frames sent by the end mobile hotspot according to the information about the end mobile hotspot carried in the roaming instruction. Exemplarily, the broadcast frames periodically sent by the mobile hotspot can be beacon frames, etc.

[0123] In some other embodiments, when the station scans the end mobile hotspot in response to the roaming instruction, it can also be that the station sends a connection request to the end mobile hotspot according to the information about the end mobile hotspot carried in the roaming instruction. If the station can receive the connection feedback information returned by the end mobile hotspot based on the connection request, it means that the station can scan the end mobile hotspot.

[0124] The above embodiments are implemented on the premise that the end mobile hotspot and non - end mobile hotspots can be determined before the mobile phone triggers site roaming. In some scenarios, if the end mobile hotspot and non - end mobile hotspots cannot be determined before the mobile phone triggers site roaming, it is necessary to determine the end mobile hotspot by attempting to trigger site roaming. In some embodiments, the mobile phone triggers the site connected to the non - end mobile hotspot to roam to the end mobile hotspot, which can also be achieved in the following way: Select mobile hotspots as candidate mobile hotspots in turn according to the order of the working frequency bands supported by the mobile phone to turn on the hotspot from high to low. Send roaming instructions to the sites of each non - candidate mobile hotspot respectively, and the roaming instructions are used to instruct the device to roam from the currently connected mobile hotspot to the candidate mobile hotspot. In some embodiments, the roaming instruction sent by the mobile phone to the site can specifically be a BTM request. The BTM request can specifically be a BTM frame. After the mobile phone sends the roaming instruction, it is divided into the following three cases:

[0125] In the first case, the mobile phone receives first roaming responses returned by each site connected to the non - candidate mobile hotspot, where the first roaming response is used to indicate that the device has scanned the candidate mobile hotspot. Since the candidate mobile hotspots are selected in the order of the working frequency bands supported by the mobile phone to turn on the hotspot from high to low, in the above - mentioned first case, the candidate mobile hotspot is the end mobile hotspot. After that, the sites connected to the non - end mobile hotspot can respond to the roaming instruction and roam to the end mobile hotspot.

[0126] In the second case, the mobile phone does not receive the first roaming responses returned by each site connected to the non - candidate mobile hotspot, and the number of hotspots that are not selected as candidate mobile hotspots is greater than or equal to 2. If the mobile phone does not receive the first roaming responses returned by all sites connected to the non - candidate mobile hotspot, it means that there are sites among the sites connected to the non - candidate mobile hotspot that do not support connecting to the candidate mobile hotspot, so the candidate mobile hotspot cannot be used as the end mobile hotspot. Thus, in this case, the sites of each mobile hotspot connected to the mobile phone cannot be connected to the same mobile hotspot. And since the number of hotspots that are not selected as candidate mobile hotspots is greater than or equal to 2, the mobile phone can return to re - select candidate mobile hotspots until all sites of each mobile hotspot connected to the mobile phone have roamed to the same mobile hotspot (i.e., the end mobile hotspot). It can be understood that when the selected candidate mobile hotspot can be used as the end mobile hotspot, the sites connected to the non - candidate mobile hotspot (that is, the non - end mobile hotspot) can respond to the roaming instruction and roam to the candidate mobile hotspot, that is, the end mobile hotspot.

[0127] In the third case, the first roaming responses returned by all stations connected to non-candidate mobile hotspots are not received, and the number of hotspots not selected as candidate mobile hotspots is 1. It can be understood that since the candidate mobile hotspots are selected in the order of the working frequency bands supported by the mobile phone for turning on the hotspots from high to low, the mobile hotspot not selected as a candidate mobile hotspot is the mobile hotspot with the lowest frequency band supported by the mobile phone for turning on the hotspot. That is, the destination mobile hotspot in this case is the mobile hotspot corresponding to the lowest frequency band among the frequency bands supported by the mobile phone. In this third case, if the first roaming responses returned by all stations connected to non-candidate mobile hotspots are not received, when the mobile phone triggers the stations connected to non-destination mobile hotspots to roam to the destination mobile hotspot, that is, when the mobile phone triggers the stations connected to mobile hotspots on other frequency bands to roam to the mobile hotspot with the lowest frequency band.

[0128] If the mobile phone only turns on mobile hotspots on two different working frequency bands, the mobile hotspot with the highest frequency band can be selected as the candidate mobile hotspot, and the mobile hotspot with the lowest frequency band can be selected as the non-candidate mobile hotspot. Trigger the stations connected to the non-candidate mobile hotspot to roam to the candidate mobile hotspot. If all stations connected to the non-candidate mobile hotspot roam successfully, the candidate mobile hotspot is the destination mobile hotspot. If at least one station connected to the non-candidate mobile hotspot fails to roam, the candidate mobile hotspot is a non-destination mobile hotspot.

[0129] For example, the mobile phone turns on Mobile Hotspot 1 and Mobile Hotspot 2 at the same time, and the working frequency band of Mobile Hotspot 1 is lower than that of Mobile Hotspot 2. The mobile phone can first determine Mobile Hotspot 2 as the candidate mobile hotspot and send the first roaming instruction to the stations connected to Mobile Hotspot 1 respectively; the first roaming instruction is used to instruct the device to roam from Mobile Hotspot 1 to Mobile Hotspot 2. After receiving the first roaming responses returned by each station connected to Mobile Hotspot 1, it means that the currently selected candidate mobile hotspot, that is, Mobile Hotspot 2, is the destination mobile hotspot. At this time, each station connected to Mobile Hotspot 1 can roam to Mobile Hotspot 2 in response to the first roaming instruction. This process corresponds to the first case above. In the case where the first roaming responses returned by all stations connected to Mobile Hotspot 1 are not received, since the only hotspot not selected as a candidate mobile hotspot is Mobile Hotspot 1, in this case, Mobile Hotspot 1 can be used as the destination mobile hotspot. Then, the mobile phone sends a second roaming instruction to the stations connected to Mobile Hotspot 2 to trigger all stations connected to Mobile Hotspot 2 to connect to Mobile Hotspot 1. This process corresponds to the third case above.

[0130] In some other embodiments, the mobile phone simultaneously turns on Mobile Hotspot 1, Mobile Hotspot 2, and Mobile Hotspot 3, and the operating frequencies of Mobile Hotspot 1, Mobile Hotspot 2, and Mobile Hotspot 3 are in ascending order. The specific implementation process of triggering the stations connected to the non-terminal mobile hotspots to roam to the terminal mobile hotspot in the above S303b is as follows: Select Mobile Hotspot 3 as the candidate mobile hotspot. The mobile phone sends third roaming instructions to the stations connected to Mobile Hotspot 1 and Mobile Hotspot 2 respectively. Among them, the third roaming instruction is used to instruct the device to roam from the currently connected mobile hotspot to Mobile Hotspot 3. When the mobile phone receives the first roaming responses returned by all the stations connected to Mobile Hotspot 1 and Mobile Hotspot 2, it means that the stations connected to Mobile Hotspot 1 and Mobile Hotspot 2 both support connecting to Mobile Hotspot 3. In this case, the stations connected to Mobile Hotspot 1 and Mobile Hotspot 2 will respond to the third roaming instruction and roam to Mobile Hotspot 3. This process corresponds to the first case above.

[0131] In the case where the first roaming responses returned by all the stations connected to Mobile Hotspot 1 and Mobile Hotspot 2 are not received, re-select a new candidate mobile hotspot. For example, the newly selected candidate mobile hotspot is Mobile Hotspot 2. The mobile phone sends fourth roaming instructions to the stations connected to Mobile Hotspot 1 and Mobile Hotspot 3 respectively. The fourth roaming instruction is used to instruct the device to roam from the currently connected mobile hotspot to Mobile Hotspot 2. After that, when the mobile phone receives the first roaming responses returned by all the stations connected to Mobile Hotspot 1 and Mobile Hotspot 3, it means that the stations connected to Mobile Hotspot 1 and Mobile Hotspot 3 both support connecting to Mobile Hotspot 2. After that, the stations connected to Mobile Hotspot 1 and Mobile Hotspot 3 will respond to the fourth roaming instruction and roam to Mobile Hotspot 2. This process also corresponds to the first case above.

[0132] In the case where the first roaming responses returned by all the stations connected to Mobile Hotspot 1 and Mobile Hotspot 3 are not received, since only Mobile Hotspot 1 is not selected as the candidate mobile hotspot, Mobile Hotspot 1 is the terminal mobile hotspot. In this embodiment, the mobile phone sends fifth roaming instructions to the stations connected to Mobile Hotspot 2 and Mobile Hotspot 3; the fifth roaming instruction is used to instruct the device to roam from the currently connected mobile hotspot to Mobile Hotspot 1. After that, the stations connected to Mobile Hotspot 2 and Mobile Hotspot 3 will respond to the second roaming instruction and roam to Mobile Hotspot 1. This process corresponds to the third case above.

[0133] In the technical solution provided by this application, the mobile phone selects candidate mobile hotspots in descending order of frequency bands, and sends a roaming instruction to the stations connected to non-candidate mobile hotspots, so as to trigger the stations connected to non-terminal mobile hotspots to roam to the terminal mobile hotspot. In this way, the terminal mobile hotspot with the highest frequency band that can be jointly supported by all stations can be determined more accurately, and a better mobile hotspot network can be provided for the stations connected to the mobile hotspot of the mobile phone while ensuring low power consumption of the mobile phone.

[0134] In addition, after S302, it is also possible that no stations are connected to all mobile hotspots. In this case, in order to ensure that the mobile hotspot function of the mobile phone remains on, one of the mobile hotspots can be selected to be retained, and the other mobile hotspots can be turned off, such as performing the following S303c.

[0135] S303c. If no stations are connected to both Mobile Hotspot 1 and Mobile Hotspot 2, turn off Mobile Hotspot 2.

[0136] Taking Mobile Hotspot 1 with a 2.4G frequency band and Mobile Hotspot 2 with a 5G frequency band as an example, the 2.4G frequency band mobile hotspot is a more basic mobile hotspot. Devices that support connecting to the 2.4G frequency band mobile hotspot do not necessarily support connecting to the 5G frequency band mobile hotspot; while devices that support connecting to the 5G frequency band mobile hotspot also support connecting to the 2.4G frequency band mobile hotspot. Then, in order to reduce the power consumption of the mobile phone and keep the mobile hotspot function on so that it can be discovered and connected by other devices, after S302, when the number of connected stations of both Mobile Hotspot 1 and Mobile Hotspot 2 is 0, turn off Mobile Hotspot 2 with a higher working frequency band and keep Mobile Hotspot 1 with a lower working frequency band on.

[0137] If the mobile phone turns on three or more mobile hotspots with different working frequency bands at the same time, then after turning on the mobile hotspots, if no stations are connected to all mobile hotspots, other mobile hotspots except the lowest working frequency band can be turned off. For example, if the mobile phone turns on mobile hotspots with 2.4G frequency band, 5G frequency band and 6G frequency band at the same time, and no stations are connected to all mobile hotspots, turn off the 5G frequency band and 6G frequency band mobile hotspots.

[0138] In the technical solution provided by the embodiments of this application, the number of mobile hotspots turned on by the mobile phone can be reduced and the power consumption of the mobile phone can be reduced while keeping the mobile hotspot function of the mobile phone on. Moreover, when the conditions are met, the mobile hotspots with higher working frequency bands are preferentially turned off, and the mobile hotspots with lower working frequency bands of the mobile phone can be retained so that the mobile hotspots of the mobile phone can be discovered and connected by more devices.

[0139] In some other embodiments, when the mobile phone detects that no stations are connected to all mobile hotspots at the first preset time after turning on the mobile hotspots, it can also choose to turn off all mobile hotspots.

[0140] In the technical solution provided by the embodiment of the present application, when the mobile phone turns on the mobile hotspot function, it turns on the mobile hotspots of all frequency bands supported by the mobile phone at the same time, ensuring that the mobile hotspots turned on by the mobile phone can meet the connection requirements of more stations. Moreover, in response to the hotspot turn-on instruction, the mobile phone turns on the mobile hotspots of all frequency bands at the same time. For the user, there is no need to select the frequency band to be turned on, which can reduce the user's operations. After the mobile phone turns on the mobile hotspot function for a period of time, the mobile phone checks the connection status of each mobile hotspot. If multiple mobile hotspots all have stations connected, it triggers the stations connected to the non-terminal mobile hotspots to roam to the terminal mobile hotspot, so that only one mobile hotspot of the mobile phone has a station connected, and then it turns off the mobile hotspots without connected stations. In this way, on the premise of ensuring the mobile hotspot of the mobile phone, the number of mobile hotspots turned on by the mobile phone can be minimized as much as possible, reducing the power consumption of the mobile phone. Among them, in the process of triggering the stations connected to the non-terminal mobile hotspots to roam to the terminal mobile hotspot, the mobile phone preferentially triggers the same mobile hotspot of the highest frequency band jointly supported by all stations connected to the mobile hotspot of the non-highest frequency band, which can ensure the network quality of the stations.

[0141] In addition, in some embodiments, when the mobile phone detects that the time when each mobile hotspot is in the idle state (no station is connected) reaches a certain time, the mobile phone can turn off all mobile hotspots. Among them, the mobile hotspot being in the idle state means that there is no station connected to the mobile hotspot of the mobile phone. In some embodiments, the mobile phone can turn off all mobile hotspots after detecting that the duration of each mobile hotspot being in the idle state reaches the second preset time.

[0142] In some embodiments, the second preset time can be set to be greater than the above-mentioned first preset time, so as to ensure that the mobile hotspot of the mobile phone is turned on for a longer time and can be discovered and connected by more stations. It should be noted that in this embodiment, this judgment process can be executed simultaneously with the above S303a - S303c.

[0143] Exemplarily, before S303a or S303b in the above embodiment, at least one mobile hotspot of the mobile phone has a station connected. After S303a or S303b, only one mobile hotspot of the mobile phone remains on and has a station connected. After that, if it is detected that the number of stations connected to this mobile hotspot of the mobile phone becomes 0, the time when this mobile hotspot is in the idle state can be started to be calculated. After the timing time reaches the second preset time, the mobile phone can turn off this mobile hotspot.

[0144] After the mobile phone enables the mobile hotspot function and until before the above S303c, there may be no station connected to each mobile hotspot of the mobile phone. Therefore, the time when each mobile hotspot of the mobile phone is in an idle state can be calculated starting from when the mobile phone enables the mobile hotspot function. When the timing time reaches the second preset time and there is still no station connected to each mobile hotspot of the mobile phone, the mobile phone can control to turn off the mobile hotspots on all working frequency bands.

[0145] It can be understood that in the above embodiments, after the mobile phone enables the mobile hotspot function, through a series of operations, finally one mobile hotspot is retained and other mobile hotspots are turned off. In an embodiment where the mobile phone supports simultaneously enabling three or more mobile hotspots on different working frequency bands, all stations can be connected to some of the mobile hotspots on the working frequency bands, such as two mobile hotspots. In this way, it is also possible to turn off some of the mobile hotspots on the working frequency bands while keeping the mobile hotspot function of the mobile phone enabled, which can reduce the power consumption of the mobile phone. When selecting the mobile hotspot to be retained, preferentially select the mobile hotspot on the higher frequency band as the station mobile hotspot that triggers station roaming. In this way, on the premise of ensuring the power consumption of the mobile phone, it is possible to provide better mobile hotspot services for stations as much as possible.

[0146] The following uses a specific example to illustrate the above control method of the mobile hotspot in detail. The mobile phone supports simultaneously enabling mobile hotspots on two working frequency bands of 2.4G band and 5G band. Figure 5 Some embodiments of the control method of the mobile hotspot are shown.

[0147] The mobile phone enables two mobile hotspots on the 2.4G band and the 5G band. After the mobile phone enables the mobile hotspot function for a period of time, the connection status of each of the mobile hotspots on the 2.4G band and the 5G band is obtained. Among them, the mobile hotspot on the 2.4G band is denoted as AP1, and the mobile hotspot on the 5G band is denoted as AP2.

[0148] In Figure 5 In the shown example, the number of stations connected to AP1 is 1, denoted as STA1. The number of stations connected to AP2 is 1, denoted as STA2. Since there are stations connected to both mobile hotspots, the mobile phone can trigger mobile hotspot optimization processing through the AP. Among them, the mobile optimization processing is divided into two parts: the first part is to make all stations connected to each mobile hotspot of the mobile phone connect to the same mobile hotspot (i.e., the destination mobile hotspot); the second part is to turn off the mobile hotspots of the unconnected stations.

[0149] In some cases, if only the mobile hotspots on the highest frequency band of the mobile phone are connected to stations, in the first part of the above mobile hotspot optimization process, the mobile phone can directly turn off the mobile hotspots of the unconnected stations. In other cases, if there are mobile hotspots on non-highest frequency bands of the mobile phone that are connected to stations, it may be necessary for the mobile phone to trigger device roaming. The mobile phone triggers device roaming following a preset priority principle. Exemplarily, the preset priority principle can include, from high to low: 1. The power consumption of the mobile phone; 2. The discoverability and connectability of other devices to the mobile hotspots of the mobile phone; 3. The network quality of the mobile hotspots provided by the mobile phone for devices. The power consumption of the mobile phone is the principle with the highest priority in triggering device roaming. To meet this principle, some mobile hotspots of the mobile phone need to be turned off. And the second priority principle to be met is the discoverability and connectability of other devices to the mobile hotspots of the mobile phone. Therefore, at least the mobile hotspots need to be kept on. Considering the above two priority principles, the mobile phone can make the stations connected to each mobile hotspot on the mobile phone roam to the destination mobile hotspot and turn off the mobile hotspots of the unconnected stations, so as to keep only one destination mobile hotspot on. Finally, the principle with the lowest priority is to ensure the network quality of the mobile hotspots provided by the mobile phone. Therefore, when selecting the destination mobile hotspot to be retained, the mobile hotspot on the highest frequency band is preferentially selected as the destination mobile hotspot. In some embodiments, the specific processing logic for triggering device roaming is as follows:

[0150] 1) The mobile phone triggers the stations connected to AP1 to roam to AP2.

[0151] 2) If at least one of the stations connected to AP1 fails to roam, that is, not all of them can roam to AP2, the mobile phone triggers the stations that were originally connected to AP1 and are currently connected to AP2 to reconnect to AP1. It should be noted that triggering the stations that were originally connected to AP1 and are currently connected to AP2 to reconnect to AP1 can specifically be that the mobile phone sends a roaming instruction to the stations that were originally connected to AP1 and are currently connected to AP2 again, triggering these stations to roam from AP2 to AP1.

[0152] 3) Trigger the stations that were originally connected to AP2 to roam to AP1. Since the stations connected to AP2 usually support connecting to AP1, the operation in operation 3) will definitely succeed.

[0153] After performing steps 1)-3), the number of stations connected to at least one of AP1 and AP2 becomes 0.

[0154] It can be understood that in other embodiments, after step 1), if at least one of the stations connected to AP1 fails to roam, the mobile phone can also directly send a roaming instruction to all the stations currently connected to AP2, triggering the stations currently connected to AP2 to roam to AP1.

[0155] After the mobile phone triggers device roaming, it can query again whether the number of site connections of AP1 and AP2 is 0. If Figure 5 as shown, if the number of site connections of AP1 is 0, then AP1 is turned off. If the number of site connections of AP1 is not 0, that is, greater than 0, then it is judged whether the number of connections of the sites of AP2 is 0. If the number of site connections of AP2 is 0, then AP2 is turned off. Only one of the 2.4G band and the 5G band mobile hotspots is kept on. This process corresponds to the second part of the above mobile hotspot optimization process.

[0156] Next, taking the case where the mobile phone has a site connection to a mobile hotspot in a non-highest frequency band as an example, the interaction process between the AP and the STA during the processing of the above mobile hotspot control method will be described. Please refer to Figure 6A , after the mobile phone turns on the 2.4G band mobile hotspot (AP1) and the 5G band mobile hotspot (AP2), STA1 connects to AP1 and STA2 connects to AP2.

[0157] According to the above priority principle of the mobile phone triggering device roaming, the mobile phone preferentially triggers the device STA1 connected to AP1 to roam to AP2. Specifically, AP1 sends a roaming instruction to STA1 to instruct STA1 to roam from AP1 to AP2. STA1 processes the roaming instruction and starts scanning for AP2. After that, if STA1 scans AP2, then STA1 can send a first roaming response to AP1, and this first roaming response is used to indicate that STA1 has scanned AP2. In addition, STA1 can disconnect from AP1 and establish a connection with AP2, so as to realize STA1 roaming from AP1 to AP2. After that, the mobile phone detects that there is no site connection to AP1, that is, the judgment result of whether there is a site connection to AP1 is negative. At this time, the mobile phone can turn off AP1.

[0158] Figure 6B is the schematic diagram of the scenario corresponding to the example shown in Figure 6A . It should be noted that in this scenario, the tablet computer 30 (corresponding to STA1) and the notebook computer 40 (corresponding to STA2) both support connecting to two mobile hotspots in the 2.4G band and the 5G band. After the mobile phone turns on the mobile hotspots in the 2.4G band and the 5G band, the tablet computer 30 connects to the mobile hotspot in the 2.4G band, and the notebook computer 40 connects to the mobile hotspot in the 5G band. After the first preset time, the mobile phone triggers the tablet computer 30 to roam to the mobile hotspot in the 5G band. Since the tablet computer 30 supports connecting to the mobile hotspot in the 5G band, it can roam successfully and connect to the mobile hotspot in the 5G band. After that, detecting that there is no site connection to the mobile hotspot in the 2.4G band, the mobile phone can execute the second part of the above mobile hotspot optimization process, that is, turn off the mobile hotspot in the 2.4G band.

[0159] In some other examples, if STA3 connected to the 2.4G mobile hotspot does not support connecting to the 5G band mobile hotspot, please refer to Figure 7A . After the mobile phone turns on two mobile hotspots on the 2.4G band and the 5G band, STA3 connects to AP1 of the 2.4G mobile hotspot, and STA2 connects to AP2 of the 5G band mobile hotspot. Similarly, AP1 sends a roaming instruction to STA3 to instruct STA3 to roam from AP1 to AP2. STA3 processes the roaming instruction and starts scanning for AP2. After that, if STA3 fails to detect AP2, it means that STA3 does not support connecting to the 5G band mobile hotspot. At this time, STA3 can send a second roaming response to AP1, and this second roaming response is used to indicate that STA3 has not detected AP2. After receiving the above second roaming response sent by STA3, AP1 records that STA1's roaming fails. Next, according to the above priority principle for the mobile phone to trigger device roaming, AP1 sends a notification message to AP2, and this notification message is used to instruct AP2 to trigger the station connected to AP2 to roam to AP1.

[0160] In response to the notification message, AP2 sends a roaming instruction to STA2, and this roaming instruction is used to instruct STA2 to roam to AP1. After STA2 processes the roaming instruction, STA2 starts scanning for AP1. After STA2 detects AP1, STA2 sends a first roaming response to AP2, and this first roaming response is used to indicate that STA2 has detected AP1. In addition, STA2 disconnects from AP2 and establishes a connection with AP1. Thus, STA2 roams to AP2. Finally, when the mobile phone detects that there is no device connected to AP2, that is, when the judgment result on whether there is a device connected to AP2 is negative, the mobile phone can turn off AP2.

[0161] Figure 7B is the scenario schematic diagram corresponding to the Figure 7A shown example. It should be noted that in this scenario, the in-vehicle unit 20 (corresponding to STA3) only supports connecting to the 2.4G band mobile hotspot, and the laptop 40 (corresponding to STA2) supports connecting to both the 2.4G band and the 5G band mobile hotspots. After the mobile phone turns on two mobile hotspots on the 2.4G band and the 5G band, the in-vehicle unit 20 connects to the 2.4G band mobile hotspot, and the laptop 40 connects to the 5G band mobile hotspot. After the first preset time, the mobile phone triggers the in-vehicle unit 20 to roam to the 5G band mobile hotspot. Since the in-vehicle unit 20 does not support connecting to the 5G band mobile hotspot, the roaming fails, and it remains connected to the 2.4G band mobile hotspot. Therefore, the mobile phone triggers the laptop 40 to roam to the 2.4G band mobile hotspot. The laptop 40 roams successfully and connects to the 2.4G band mobile hotspot. At this point, there is no device connected to the 5G band mobile hotspot of the mobile phone, and the mobile phone can turn off the 5G band mobile hotspot.

[0162] The sites connected to the 2.4G band mobile hotspot may include two or more, such as Figure 8A As shown, the sites connected to the 2.4G mobile hotspot include the above Figure 6A STA1 in the example shown and the above Figure 7A STA3 in the example shown. Figure 6A and Figure 7A As can be seen from the example description, STA1 supports connecting to a mobile hotspot in the 5G band, but STA3 does not support connecting to a mobile hotspot in the 5G band.

[0163] In this embodiment, when AP1 sends a roaming instruction to STA, it can send a roaming instruction to STA1 and STA3 respectively. STA1 can scan and connect to AP2 in response to the roaming instruction. However, STA3 cannot scan AP2 and cannot connect to AP2. After the mobile phone triggers the device roaming, AP1 detects that there is still a device connected to AP1, and it is necessary to re-trigger the device roaming. Exemplarily, AP1 resends the roaming instruction to STA1 so that STA1 reconnects to AP1. In addition, AP1 notifies AP2 to trigger the site connected to AP2 to roam to AP1. Finally, the mobile phone detects that AP2 has no site connection and can shut down AP2.

[0164] Figure 8B is with Figure 8A Schematic diagram of the scenario corresponding to the example shown. After the mobile phone turns on the mobile hotspots of the 2.4G band and the 5G band, the car machine 20 and the tablet computer 30 are connected to the mobile hotspot of the 2.4G band, and the laptop computer 40 is connected to the mobile hotspot of the 5G band. After the first preset time, the mobile phone triggers the car machine 20 and the tablet computer 30 to roam to the mobile hotspot of the 5G band. The car machine 20 does not support the connection to the mobile hotspot of the 5G band, so the roaming fails and is still connected to the mobile hotspot of the 2.4G band. The tablet computer 30 supports the connection to the mobile hotspot of the 5G band and can successfully roam to the mobile hotspot of the 5G band. Afterwards, the mobile phone triggers the tablet computer 30 to connect back to the mobile hotspot of the 2.4G band, and triggers the laptop computer 40 to roam the mobile hotspot of the 2.4G band. The laptop computer 40 roams successfully and connects to the mobile hotspot of the 2.4G band. At this point, there is no device connected to the mobile hotspot of the 5G band of the mobile phone, and the mobile phone can turn off the mobile hotspot of the 5G band.

[0165] The above describes the control method of the mobile hotspot provided by the embodiment of the present application. The following describes the device for implementing the method. Figure 9The following is a schematic structural diagram of an electronic device 900 provided by an embodiment of the present application. The electronic device 900 may include a processor 910, an external memory interface 920, an internal memory 921, a universal serial bus (USB) interface 930, a charging management module 940, a power management module 941, a battery 942, an antenna 1, an antenna 2, a mobile communication module 950, a wireless communication module 960, an audio module 970, a sensor module 980, a button 990, a motor 991, a camera 992, a display screen 993, and a subscriber identification module (SIM) card interface 994, etc. Among them, the sensor module 980 may include a pressure sensor 980A, a touch sensor 980B, etc.

[0166] It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 900. In other embodiments of the present application, the electronic device 900 may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0167] The processor 910 may include one or more processing units. For example, the processor 910 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors. For example, the processor 910 is used to execute the control method of the mobile hotspot in the embodiment of the present application.

[0168] Among them, the controller may be the nerve center and command center of the electronic device 900. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching instructions and executing instructions.

[0169] A memory can also be set in the processor 910 for storing instructions and data. In some embodiments, the memory in the processor 910 is a cache memory. This memory can save the instructions or data that the processor 910 has just used or recycled. If the processor 910 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 910, and thus improves the efficiency of the system.

[0170] The USB interface 930 is an interface that conforms to the USB standard specification. Specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 930 can be used to connect a charger to charge the electronic device 900, or to transfer data between the electronic device 900 and peripheral devices.

[0171] The external memory interface 920 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 900. The external memory card communicates with the processor 910 through the external memory interface 920 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.

[0172] The internal memory 921 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 910 executes various functional applications and data processing of the electronic device 900 by running the instructions stored in the internal memory 921. The internal memory 921 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function (such as a sound playback function, an image playback function, etc.).

[0173] In addition, the internal memory 921 can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0174] The charge management module 940 is used to receive a charging input from a charger. Among them, the charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charge management module 940 can receive the charging input of the wired charger through the USB interface 930.

[0175] The power management module 941 is used to connect the battery 942, the charge management module 940, and the processor 910. The power management module 941 receives the inputs of the battery 942 and / or the charge management module 940 to supply power to the processor 910, the internal memory 921, the external memory, the display screen 993, the camera 992, the wireless communication module 960, etc.

[0176] In some other embodiments, the power management module 941 may also be disposed in the processor 910. In some other embodiments, the power management module 941 and the charging management module 940 may also be disposed in the same device.

[0177] The wireless communication function of the electronic device 900 may be implemented by the antenna 1, antenna 2, the mobile communication module 950, the wireless communication module 960, the modulation and demodulation processor, and the baseband processor, etc. In some embodiments, the electronic device 900 includes at least an antenna corresponding to the 2.4G frequency band and an antenna corresponding to the 5G frequency band. In some other embodiments, the electronic device 900 may further include an antenna corresponding to 6G.

[0178] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 900 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as the diversity antenna of the wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0179] The mobile communication module 950 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the electronic device 900. The mobile communication module 950 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 950 can receive electromagnetic waves through the antenna 1, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 950 can also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves through the antenna 1 for radiation.

[0180] The wireless communication module 960 can provide solutions for wireless communications applied to the electronic device 900, including wireless local area networks (WLANs) (such as Wi-Fi networks), Bluetooth (BT), global navigation satellite systems (GNSSs), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 960 can be one or more devices integrating at least one communication processing module. The wireless communication module 960 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 910. The wireless communication module 960 can also receive the signals to be sent from the processor 910, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0181] Among them, the WLAN module of the wireless communication module 960 is used to manage the actual network interface. The actual network interface can multiplex antennas of different frequency bands.

[0182] In some embodiments, the antenna 1 of the electronic device 900 is coupled to the mobile communication module 950, and the antenna 2 is coupled to the wireless communication module 960, so that the electronic device 900 can communicate with the network and other devices through wireless communication technologies.

[0183] The electronic device 900 can implement audio functions through the audio module 970 and the application processor, etc. For example, music playback, recording, etc.

[0184] The audio module 970 is used to convert digital audio signals into analog audio signals for output, and is also used to convert analog audio inputs into digital audio signals. The audio module 970 can also be used to encode and decode audio signals. In some embodiments, the audio module 970 can be disposed in the processor 910, or some functional modules of the audio module 970 can be disposed in the processor 910.

[0185] The pressure sensor 980A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 980A can be disposed on the display screen 993. There are many types of pressure sensors 980A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can include at least two parallel plates with conductive materials. When a force acts on the pressure sensor 980A, the capacitance between the electrodes changes. The electronic device 900 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 993, the electronic device 900 detects the intensity of the touch operation according to the pressure sensor 980A. The electronic device 900 can also calculate the position of the touch according to the detection signal of the pressure sensor 980A.

[0186] The touch sensor 980B, also known as the "touch panel". The touch sensor 980B can be disposed on the display screen 993. The touch sensor 980B and the display screen 993 form a touch screen, also known as the "touch display screen". The touch sensor 980B is used to detect touch operations acting on it or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 993. In some other embodiments, the touch sensor 980B can also be disposed on the surface of the electronic device 900, at a different position from the display screen 993.

[0187] The button 990 includes a power-on button, a volume button, etc. The button 990 can be a mechanical button. It can also be a touch button. The electronic device 900 can receive button inputs and generate key signal inputs related to the user settings and function control of the electronic device 900.

[0188] The motor 991 can generate vibration prompts. The motor 991 can be used for incoming call vibration prompts and can also be used for touch vibration feedback.

[0189] The camera 992 is used to capture static images or videos. In some embodiments, the electronic device 900 can include one or N cameras 992, where N is a positive integer greater than 1.

[0190] The electronic device 900 realizes the display function through the GPU, the display screen 993, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 993 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 910 can include one or more GPUs, which execute program instructions to generate or change display information.

[0191] The display screen 993 is used to display images, videos, etc. In some embodiments, the electronic device 900 can include one or N display screens 993, where N is a positive integer greater than 1.

[0192] The SIM card interface 994 is used to connect to the SIM card. The SIM card can be inserted into or removed from the SIM card interface 994 to achieve contact and separation from the electronic device 900. The electronic device 900 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

[0193] The control methods of the mobile hotspot in the following embodiments can all be implemented in the electronic device 900 with the above hardware structure.

[0194] Figure 10 It is a structural diagram of the software and hardware of the electronic device in some embodiments. It shows the software and hardware modules involved in the control method of the mobile hotspot in the embodiments of the present application. The electronic device includes an application layer, an application framework layer, a hardware abstraction layer (HAL), a driver layer, and a hardware layer.

[0195] Among them, the application layer may include a series of application packages. In the embodiments of the present application, the application layer may include a settings application, a file sharing application, etc.

[0196] The application framework layer includes a mobile hotspot management module. The mobile hotspot management module is used to manage the turning on and off of the mobile hotspot (including AP1, AP2, etc. in the above embodiments). The mobile hotspot management module is also used to provide an interface for turning on the mobile hotspot function (which can be the hotspot turning-on interface). This hotspot turning-on interface is used for docking with an application or a user interface. When the settings application detects an operation by the user to turn on the mobile hotspot function, or when the settings application receives a call instruction for the mobile hotspot function from another application, it can call this interface to turn on the mobile hotspot function. In some other embodiments, when another application needs to turn on the mobile hotspot function, it can also be achieved by directly calling the interface provided by the mobile hotspot management module.

[0197] The HAL layer includes hostapd. Hostapd is used to provide protocol capabilities support (including supporting the BTM roaming protocol, connection process, etc.). In the embodiments of the present application, hostapd can also be used to perform the operations of mobile optimization processing in the above embodiments.

[0198] The driver layer includes a communication driver, which is used to manage and allocate resource-related information of the mobile hotspot. Exemplarily, the resource-related information of the mobile hotspot may include the correspondence between the mobile hotspot and the MAC address, the correspondence between the mobile hotspot and the actual network interface, etc. In an embodiment of the present application, when the mobile hotspot function is turned on in the mobile phone, the communication driver can allocate a MAC address and an actual network interface for the mobile hotspot to be turned on. In addition, the communication driver can also be used to store the correspondence between the mobile hotspot and the MAC address and the actual network interface allocated to the mobile hotspot.

[0199] The hardware layer includes a WLAN chip and a radio frequency antenna. The WLAN chip includes an actual network interface. The radio frequency antenna includes a radio frequency antenna corresponding to the 2.4G band and a radio frequency antenna corresponding to the 5G band. The antenna corresponding to the 2.4G band and the antenna corresponding to the 5G band are used to receive and process the physical layer information and transfer it to the actual network interface for processing.

[0200] In an embodiment of the present application, when the mobile phone turns on the mobile hotspot, the settings application calls the hotspot activation interface provided by the mobile hotspot management module to activate the mobile hotspot function. The mobile hotspot management module responds to the call request for the hotspot activation interface and sends an instruction for activating the hotspot to hostapd. After receiving the instruction, hostapd can initialize the relevant protocol. Then, hostapd forwards the instruction to the communication driver. After receiving the instruction, the communication driver allocates a MAC address and an actual network interface for the mobile hotspot to be turned on. Then, the communication driver can call the relevant interfaces of the MAC address and the actual network interface allocated to the mobile hotspot to be turned on to turn on the mobile hotspot. After that, the mobile phone can convert the received signal (such as a cellular signal) into a Wi-Fi signal and send out the Wi-Fi signal through the turned-on mobile hotspot based on the radio frequency antenna corresponding to the frequency band of the mobile hotspot. For example, the mobile phone converts the received signal into a Wi-Fi signal of the 2.4G band, and sends out the Wi-Fi signal of the 2.4G band through the turned-on mobile hotspot of the 2.4G band based on the radio frequency antenna corresponding to the 2.4G band.

[0201] After that, hostapd executes the logical judgment of the mobile hotspot optimization process. When device roaming needs to be triggered, hostapd sends a notification message to the communication driver based on the BTM roaming protocol. The communication driver responds to the notification message and sends a roaming instruction to the stations connected to the mobile hotspot through the mobile hotspot of the corresponding frequency band. Exemplarily, when hostapd needs to trigger the roaming of the stations connected to the mobile hotspot of the 2.4G band, it sends a notification message 1 to the communication driver based on the BTM roaming protocol. The communication driver responds to the notification message 1 and sends a roaming instruction to the stations connected to the mobile hotspot through the mobile hotspot of the 2.4G band.

[0202] Some other embodiments of this application provide an electronic device. The electronic device may include: a memory and one or more processors. The memory is coupled to the processor. The memory is further configured to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can perform each function or step that the mobile phone performs in the above method embodiments. The structure of the electronic device may refer to Figure 9 the structure of the electronic device 900 shown in

[0203] Embodiments of this application also provide a chip system, as Figure 11 shown, the chip system 1100 includes at least one processor 1101 and at least one interface circuit 1102. The processor 1101 and the interface circuit 1102 can be interconnected by a line. For example, the interface circuit 1102 can be used to receive signals from other devices (such as the memory of a computer). For another example, the interface circuit 1102 can be used to send signals to other devices (such as the processor 1101). Exemplarily, the interface circuit 1102 can read the instructions stored in the memory and send the instructions to the processor 1101. When the instructions are executed by the processor 1101, the computer can perform each step in the above embodiments. Of course, the chip system can also include other discrete devices, and embodiments of this application do not make specific limitations thereto.

[0204] Embodiments of this application also provide a computer-readable storage medium, which includes computer instructions. When the computer instructions run on the above electronic device, the electronic device is caused to perform each function or step that the mobile phone performs in the above method embodiments.

[0205] Embodiments of this application also provide a computer program product. When the computer program product runs on a computer, the computer is caused to perform each function or step that the mobile phone performs in the above method embodiments. Among them, the computer can be an electronic device, such as a mobile phone.

[0206] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and conciseness of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0207] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces. The indirect couplings or communication connections of devices or units can be in electrical, mechanical or other forms.

[0208] The units described as separate components may or may not be physically separated. The components displayed as units may be one physical unit or multiple physical units, that is, they can be located in one place, or they can be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0209] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0210] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to enable a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks or optical discs that can store program codes.

[0211] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A control method for a mobile hotspot, characterized in that, The method is applied to an electronic device, and the electronic device supports simultaneously turning on mobile hotspots of at least two different operating frequency bands; the method includes: Turn on at least two mobile hotspots, where the operating frequency bands of different mobile hotspots among the turned-on mobile hotspots are different, and the at least two mobile hotspots include a first mobile hotspot and a second mobile hotspot; When stations are connected to both the first mobile hotspot and the second mobile hotspot, trigger the stations connected to the second mobile hotspot to roam to the first mobile hotspot, and turn off the second mobile hotspot; the operating frequency band of the first mobile hotspot is the target operating frequency band, and the target operating frequency band is the highest frequency band supported by all stations connected to the first mobile hotspot and the second mobile hotspot; Before triggering the stations connected to the second mobile hotspot to roam to the first mobile hotspot, the method further includes: Obtain the frequency bands supported by all stations connected to the first mobile hotspot and the second mobile hotspot; determine the target operating frequency band according to the frequency bands supported by all stations connected to the first mobile hotspot and the second mobile hotspot.

2. The method according to claim 1, wherein The method further includes: When only one of the first mobile hotspot and the second mobile hotspot is connected to a station, turn off the mobile hotspot that is not connected to a station among the first mobile hotspot and the second mobile hotspot.

3. The method according to claim 2, wherein: The operating frequency band of the target mobile hotspot is higher than that of the non-target mobile hotspot; Or, the operating frequency band of the target mobile hotspot is lower than that of the non-target mobile hotspot, and there is a station among the stations connected to the target mobile hotspot that does not support roaming to the non-target mobile hotspot; Or, the operating frequency band of the target mobile hotspot is lower than that of the non-target mobile hotspot, and all stations connected to the target mobile hotspot support roaming to the non-target mobile hotspot. Before turning off the mobile hotspot that is not connected to a station among the first mobile hotspot and the second mobile hotspot, the method further includes: trigger the stations connected to the target mobile hotspot to roam to the non-target mobile hotspot; Wherein, the target mobile hotspot is the mobile hotspot connected to a station among the first mobile hotspot and the second mobile hotspot, and the non-target mobile hotspot is the mobile hotspot not connected to a station among the first mobile hotspot and the second mobile hotspot.

4. The method according to claim 1 or 2, characterized in that, The triggering the stations connected to the second mobile hotspot to roam to the first mobile hotspot includes: Trigger the stations connected to the candidate mobile hotspot to roam to the non-candidate mobile hotspot; the candidate mobile hotspot is the mobile hotspot with the highest frequency band among the first mobile hotspot and the second mobile hotspot; the non-candidate mobile hotspot is the mobile hotspot other than the highest frequency band among the first mobile hotspot and the second mobile hotspot; If all stations connected to the candidate mobile hotspot successfully roam, then the first mobile hotspot is the candidate mobile hotspot; If at least one station connected to the candidate mobile hotspot fails to roam, then the first mobile hotspot is the non-candidate mobile hotspot.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: If neither the first mobile hotspot nor the second mobile hotspot has a station connected thereto, other mobile hotspots other than the lowest frequency band among the at least two mobile hotspots are turned off.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: When a first preset time is reached after the mobile hotspot is turned on, obtaining the station connection status of the first mobile hotspot and the second mobile hotspot, where the connection status is used to indicate whether a station is connected to the first mobile hotspot and the second mobile hotspot.

7. The method according to claim 6, wherein The method further includes: When the duration during which none of the at least two mobile hotspots is connected to a station reaches a second preset time, turning off the at least two mobile hotspots; the second preset time is greater than the first preset time.

8. An electronic device, characterized in that, The electronic device includes: a processor, a memory, and a computer program stored on the memory; the memory is coupled to the processor; When the electronic device runs, the processor executes the computer program to implement the method according to any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, A computer program is stored, and when the computer program is run by the processor of the electronic device, the method according to any one of claims 1-7 is implemented.

10. A computer program product, characterized in that, It includes a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1-7 is implemented.

Citation Information

Patent Citations

  • WiFi hotspot management method, electronic equipment and computer readable storage medium

    CN119485595A

  • Communication method and related device

    WO2024002114A1