A control method of Wi-Fi roaming, electronic equipment and computer readable storage medium

CN122122937APending Publication Date: 2026-05-29HONOR DEVICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-12-26
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Frequent Wi-Fi roaming leads to poor user experience in Internet access, especially in Wi-Fi roaming table tennis scenarios, which are difficult to effectively solve in the existing technology.

Method used

By implementing escape strategies when identifying Wi-Fi roaming ping-pong scenes, some Wi-Fi roaming strategies are prohibited, the frequency of Wi-Fi roaming is reduced, and the user's Internet experience is ensured.

Benefits of technology

Effectively reduce the frequency of Wi-Fi roaming, improve users' Internet access experience, and ensure the rationality and stability of Wi-Fi network use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122122937A_ABST
    Figure CN122122937A_ABST
Patent Text Reader

Abstract

The application discloses a control method of Wi-Fi roaming, an electronic device and a computer readable storage medium, relates to the technical field of terminals, and reduces the number of Wi-Fi roaming by prohibiting part of roaming strategies in multiple Wi-Fi roaming strategies, realizes the escape of the Wi-Fi roaming ping-pong scene, and thus guarantees the online experience of a user. The method can be applied to an electronic device supporting multiple Wi-Fi roaming strategies, wherein the electronic device accesses a Wi-Fi network. The specific scheme is as follows: the electronic device performs Wi-Fi roaming between two different BSSIDs; and in response to the fact that the Wi-Fi roaming of the electronic device meets preset conditions, an escape strategy is executed. The escape strategy comprises prohibiting the electronic device from performing Wi-Fi roaming based on a first roaming strategy.
Need to check novelty before this filing date? Find Prior Art

Description

A Wi-Fi roaming control method, electronic device, and computer-readable storage medium

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on January 10, 2024, with application number 202410046081.2 and invention name “A Wi-Fi roaming control method, electronic device and computer-readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a Wi-Fi roaming control method, an electronic device, and a computer-readable storage medium. Background Art

[0003] In a communication system, a router can enable multiple electronic devices to share the Internet for users. With the development of technology, routers with two or more different Basic Service Set IDs (BSSIDs) can be used to ensure the user's Internet experience. In other words, the user's Internet experience can be guaranteed by Wi-Fi roaming between different BSSIDs. However, if Wi-Fi roaming occurs frequently, the electronic devices will be in a Wi-Fi roaming ping-pong scenario, resulting in a poor user Internet experience. Summary of the Invention

[0004] Based on this, the present application provides a Wi-Fi roaming control method, electronic device, and computer-readable storage medium to avoid frequent Wi-Fi roaming, thereby ensuring the user's Internet experience.

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

[0006] In a first aspect, the present application provides a method for controlling Wi-Fi roaming, which is applied to an electronic device that supports multiple Wi-Fi roaming policies, wherein the electronic device is connected to a Wi-Fi network. In this method, the electronic device performs Wi-Fi roaming between two different BSSIDs; in response to the Wi-Fi roaming performed by the electronic device meeting a preset condition, an escape policy is executed. The escape policy includes prohibiting some of the multiple Wi-Fi roaming policies supported by the electronic device, such as a first roaming policy, that is, prohibiting the electronic device from performing Wi-Fi roaming based on the first roaming policy. The electronic device can normally perform Wi-Fi roaming based on other roaming policies except the first roaming policy.

[0007] When Wi-Fi roaming on an electronic device meets predetermined conditions, the electronic device can be considered to be in a Wi-Fi roaming ping-pong scenario. By adopting the above technical solution, when an electronic device is in a Wi-Fi roaming ping-pong scenario, the frequency of Wi-Fi roaming is reduced by prohibiting the electronic device from performing Wi-Fi roaming based on some of the multiple supported Wi-Fi roaming policies, thereby escaping the Wi-Fi roaming ping-pong scenario and ensuring the user's Internet experience.

[0008] In one possible implementation of the first aspect, the escape strategy can be executed within a certain escape duration. Specifically, the electronic device executes the escape strategy within a specific escape duration, such as a first escape duration. This avoids issues where the prolonged suppression of some strategies could impact the user's online experience.

[0009] In one possible implementation of the first aspect, the method may further include: in some cases, stopping execution of the escape strategy. For example, the escape strategy may be stopped when the first escape duration has expired, or when the first escape duration has not expired but an abnormal event has been detected. In the case of stopping execution of the escape strategy, the electronic device is allowed to perform Wi-Fi roaming based on the first roaming strategy. The abnormal event may be that the electronic device disconnects the Wi-Fi connection, and / or the signal quality of the Wi-Fi network to which the electronic device is connected continues to be lower than a first threshold for a preset duration. In this way, when the escape duration expires or an abnormal event occurs, the normal triggering of subsequent Wi-Fi roaming is ensured.

[0010] In one implementation of the first aspect, the first escape duration can be determined based on historical escape information. The historical escape information may include the reason for the last cessation of the escape strategy and / or the timestamp of the last cessation. Specifically, the historical escape information can be obtained, namely, the reason for the last cessation of the escape strategy and / or the timestamp of the last cessation of the escape strategy. The first escape duration is then obtained based on the obtained historical escape information, thereby determining the execution time of the escape strategy.

[0011] Among them, when the reason for the last stop of the execution of the escape strategy is the arrival of the second escape duration and the timestamp of the last stop of the execution of the escape strategy is less than the second threshold from the current time, the first escape duration is the first duration. When the reason for the last stop of the execution of the escape strategy is the arrival of the second escape duration and the timestamp of the last stop of the execution of the escape strategy is greater than the second threshold from the current time, or when the reason for the last stop of the execution of the escape strategy is an abnormal stop, the first escape duration is the second duration. The second escape duration is the duration of the last execution of the escape strategy, and the first duration is greater than the second duration. That is to say, the current escape duration corresponding to different historical escape information is not the same. Based on the reason for the last stop of the execution of the escape strategy and / or the timestamp of the last stop of the execution of the escape strategy, the current escape duration can be selected in a step-by-step manner, making the suppression more reasonable and further ensuring the user's Internet experience.

[0012] In one implementation of the first aspect, the preset condition may be one or more of: the number of Wi-Fi roaming occurrences being greater than a third threshold; and the time difference between the first Wi-Fi roaming occurrence and the last Wi-Fi roaming occurrence being less than a fourth threshold. By setting these preset conditions, it is possible to accurately determine whether the electronic device is in a Wi-Fi roaming ping-pong scenario, thereby accurately determining whether to execute an escape strategy, thereby ensuring a good user experience.

[0013] In one implementation of the first aspect, before executing the escape strategy, multiple Wi-Fi roaming strategies supported by the electronic device may be obtained and divided into a first roaming strategy and a second roaming strategy. The first roaming strategy is a subset of the multiple supported Wi-Fi roaming strategies, i.e., a roaming strategy that can be disabled without affecting the user's ability to access the Wi-Fi network. The second roaming strategy may be a roaming strategy other than the first roaming strategy, i.e., a roaming strategy that cannot be disabled. By selecting a subset of the supported roaming strategies as the disabled roaming strategies, the user's online experience is maximized.

[0014] The first roaming strategy includes one or more of the following: a bit error rate below a threshold, a priority of the first frequency band over a priority of the second frequency band, no acknowledgment character ACK from the network device is received, a load above a threshold, or a transmission data volume reaches a threshold. The second roaming strategy includes one or more of the following: a transmission rate below a threshold, no beacon frames from the network device are received, a Wi-Fi network signal below a threshold, the electronic device actively reconnecting to the Wi-Fi network, or receiving a passive DEAUTH command.

[0015] In one implementation of the first aspect, the escape strategy may further include: not responding to a handover request received due to a predetermined reason; the predetermined reason may include: transition management (BTM). Wi-Fi roaming caused by BTM may also be suppressed as an escape strategy in a Wi-Fi roaming ping-pong scenario, thereby achieving an escape from the Wi-Fi roaming ping-pong scenario.

[0016] In a second aspect, the present application provides a Wi-Fi roaming control device that implements the electronic device behavior described in the method of the first aspect. This functionality can be implemented in hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the aforementioned functionality, such as an acquisition unit or module, a monitoring unit or module, and an execution unit or module.

[0017] In a third aspect, a computer device, such as an electronic device, is provided. The computer device may include: a memory, a processor, a wireless communication module, and computer instructions stored in the memory. When the computer instructions are executed by the processor, the Wi-Fi roaming control method according to the first aspect and any implementation thereof is implemented.

[0018] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions. When the computer instructions are executed by a processor, the Wi-Fi roaming control method in the first aspect and any implementation thereof is implemented.

[0019] In a fifth aspect, a computer program product including instructions is provided, including computer instructions, which, when executed by a processor, implement the Wi-Fi roaming control method as described in the first aspect and any implementation thereof.

[0020] In a sixth aspect, an embodiment of the present application provides a chip system, the chip system including a processor, the processor being configured to call a computer program in a memory to execute a Wi-Fi roaming control method as described in the first aspect and any implementation thereof.

[0021] It can be understood that the beneficial effects that can be achieved by the device described in the second aspect, the electronic device described in the third aspect, the computer-readable storage medium described in the fourth aspect, the computer program product described in the fifth aspect, and the chip system described in the sixth aspect provided above can refer to the beneficial effects in the first aspect and any possible implementation method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] FIG1 is a schematic diagram of a Wi-Fi roaming scenario of an electronic device in the related art;

[0023] FIG2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0024] FIG3 is a flowchart of a Wi-Fi roaming control method according to an embodiment of the present application;

[0025] FIG4 is a first schematic diagram of a Wi-Fi roaming control method provided in an embodiment of the present application;

[0026] FIG5 is a second schematic diagram of a Wi-Fi roaming control method provided in an embodiment of the present application;

[0027] FIG6 is a third schematic diagram of a Wi-Fi roaming control method provided in an embodiment of the present application;

[0028] FIG7 is a fourth schematic diagram of a Wi-Fi roaming control method provided in an embodiment of the present application;

[0029] FIG8 is a second flow chart of a Wi-Fi roaming control method according to an embodiment of the present application;

[0030] FIG9 is a third flow chart of a Wi-Fi roaming control method according to an embodiment of the present application;

[0031] FIG10 is a schematic structural diagram of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In the description of this application, unless otherwise specified, "and / or" in this application is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural.

[0033] In the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.

[0034] To facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity or execution order, and the words "first" and "second" do not necessarily mean different.

[0035] In the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner to facilitate understanding.

[0036] First, some of the terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

[0037] BSSID: BSSID refers to the basic service set identifier in a wireless local area network. It is a unique identifier used to identify each wireless access point in a wireless local area network, similar to a media access control (MAC) address. Through the BSSID, a wireless client (such as the electronic device in this application) can determine the identity of the wireless access point to which it is connected in order to establish a connection. For scenarios where the wireless access point is a router, a router may have only one BSSID, such as a router that only supports a single frequency band (2.4G / 5G frequency band) has only one BSSID. A router may also have multiple BSSIDs, such as a dual-band router has two different BSSIDs, corresponding to the 5G frequency band and 2.4G frequency band it supports. The BSSIDs of different routers are different.

[0038] Ping-pong scenario: It can also be called the ping-pong effect, which generally refers to the change back and forth between two different states. In an embodiment of the present application, the ping-pong scenario of Wi-Fi roaming may refer to an electronic device performing Wi-Fi roaming between two different BSSIDs, which can be simply understood as an electronic device switching back and forth between two different BSSIDs. Among them, the two different BSSIDs may be from the same router, and the two BSSIDs correspond to the same Wi-Fi network. It can also be from different routers, and the names (such as Service Set ID (SSID)) and passwords of the Wi-Fi networks corresponding to the two BSSIDs are the same.

[0039] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0040] In addition to accessing the internet through data traffic, current electronic devices can also access the internet using Wi-Fi networks. This Wi-Fi access can be achieved through interaction between a router and the electronic device. To ensure a superior user experience, in one scenario, a dual-band router can be deployed. For example, a router that supports both the 5G and 2.4G bands can have two BSSIDs, one corresponding to the 5G and 2.4G bands it supports. The electronic device can select one of these BSSIDs to access the Wi-Fi network. If both BSSIDs correspond to the same Wi-Fi network, if the currently selected BSSID does not provide a good user experience, the electronic device can select another BSSID to access the Wi-Fi network. This allows the electronic device to perform Wi-Fi roaming between two different BSSIDs to ensure a superior user experience. In another scenario, two single-band routers can be deployed, each corresponding to a different BSSID. The BSSIDs for each router are different, but the Wi-Fi networks corresponding to the two BSSIDs share the same name and password. Similar to the previous scenario, electronic devices can also perform Wi-Fi roaming between two different BSSIDs to ensure the user's Internet experience.

[0041] For example, as shown in FIG1 , the electronic device is taken as a mobile phone. When the user needs to use the Wi-Fi function to access the Internet, he can turn on the Wi-Fi function on the mobile phone and select the Wi-Fi network to which the mobile phone needs to connect. For example, after the mobile phone receives the operation of the user selecting the identifier of a Wi-Fi network in the interface 11 shown in FIG1 , the mobile phone can connect to the Wi-Fi network selected by the user for the user to access the Internet. In the above two scenarios, in response to the user operation, the mobile phone can select one of the BSSIDs for connection. Subsequently, the mobile phone may select another BSSID for connection because the BSSID currently selected for connection cannot provide the user with a better Internet experience, that is, Wi-Fi roaming occurs between different BSSIDs. The user does not perceive the above-mentioned process of Wi-Fi roaming between the two BSSIDs.

[0042] Among them, electronic devices can decide whether to perform Wi-Fi roaming based on the configured Wi-Fi roaming policy. Electronic devices generally support multiple Wi-Fi roaming policies, which may cause them to frequently roam in Wi-Fi. For example, in the above scenario, the two BSSIDs are BSSID1 and BSSID2. Due to the different configured Wi-Fi roaming policies, electronic devices may frequently switch from BSSID1 to BSSID2 and then from BSSID2 to BSSID1, causing the electronic devices to be in a Wi-Fi roaming ping-pong scenario, affecting the user's Internet experience.

[0043] To improve the user experience, related technologies adjust handover parameters to delay Wi-Fi roaming when an electronic device detects a Wi-Fi roaming ping-pong scenario. This means that Wi-Fi roaming is not permitted during the delay period, even if the currently connected Wi-Fi network is poor. This prevents proper Wi-Fi network usage and results in a poor user experience.

[0044] To address the aforementioned issues, an embodiment of the present application provides a Wi-Fi roaming control method that, upon identifying a Wi-Fi roaming ping-pong scenario, can execute an escape strategy to reduce the frequency of Wi-Fi roaming and escape from the Wi-Fi roaming ping-pong scenario, thereby ensuring the rationality of Wi-Fi network usage and the user's Internet experience to the greatest extent possible.

[0045] The solutions provided in the embodiments of the present application can be applied to electronic devices. For example, the electronic devices may be mobile phones, tablet computers, smart watches, desktop computers, laptop computers, handheld computers, notebook computers, ultra-mobile personal computers (UMPCs), netbooks, as well as devices with specific wireless Internet access functions, such as cellular phones, personal digital assistants (PDAs), augmented reality (AR) and virtual reality (VR) devices. The embodiments of the present application do not impose any particular restrictions on the specific form of the electronic devices.

[0046] In some examples, the Wi-Fi roaming control method provided in the embodiments of the present application can be applied to scenarios where Wi-Fi roaming may occur. For example, it can be a scenario where a dual-band router is deployed. In this scenario, the two BSSIDs correspond to the same Wi-Fi network. Another example can be a scenario where two single-band routers are deployed. In this scenario, there are two BSSIDs, and the Wi-Fi networks corresponding to the two BSSIDs have the same name and password.

[0047] For example, taking a mobile phone 200 as an example of the electronic device, FIG2 shows a schematic diagram of the structure of the mobile phone 200. As shown in FIG2, the mobile phone 200 may include a processor 210, an external memory interface 220, an internal memory 221, a mobile communication module 230, a wireless communication module 240, a charging management module 250, a power management module 260, a battery 270, an antenna 1, an antenna 2, an audio module 280, a sensor module 290, a button 291, a motor 292, an indicator 293, a display 294, and a subscriber identification module (SIM) card interface 295.

[0048] It should be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the mobile phone 200. In other embodiments of the present application, the mobile phone 200 may include more or fewer components than shown, or some components may be combined or separated, or the components may be arranged differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0049] The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0050] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0051] A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or is cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system. In some embodiments, the processor 210 may include one or more interfaces. In an embodiment of the present application, the processor 210 may be configured to execute an escape strategy when it is determined that the current scenario is a Wi-Fi roaming ping-pong scenario. For example, the mobile phone 200 is prohibited from performing Wi-Fi roaming based on the first roaming strategy, or for example, does not respond to a handover request due to a predetermined reason.

[0052] The charging management module 250 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. While charging the battery 270, the charging management module 250 can also provide power to the mobile phone 200 via the power management module 260.

[0053] The power management module 260 is used to connect to the battery 270. The power management module 260 receives input from the battery 270 and / or the charging management module 250, and provides power to the processor 210, the internal memory 221, the display 294, and the wireless communication module 240 (such as a Wi-Fi chip, which optionally supports multiple Wi-Fi roaming strategies). The power management module 260 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 260 can also be set in the processor 210. In other embodiments, the power management module 260 and the charging management module 250 can also be set in the same device.

[0054] The wireless communication function of the mobile phone 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 230, the wireless communication module 240, the modem processor and the baseband processor.

[0055] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in mobile phone 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0056] Mobile communication module 230 can provide wireless communication solutions for mobile phone 200, including 2G / 3G / 4G / 5G. Mobile communication module 230 can include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. Mobile communication module 230 can receive electromagnetic waves from antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modem processor for demodulation.

[0057] The wireless communication module 240 can provide wireless communication solutions including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. applied on the mobile phone 200. In some embodiments of the present application, when the wireless communication module 240 provides a WLAN solution on the mobile phone 200, the wireless communication module 240 may include the Wi-Fi chip in the present application.

[0058] In some embodiments, the antenna 1 of the mobile phone 200 is coupled to the mobile communication module 230, and the antenna 2 is coupled to the wireless communication module 240, so that the mobile phone 200 can communicate with the network and other devices through wireless communication technology.

[0059] Mobile phone 200 implements display functionality through a GPU, display screen 294, and an application processor. The GPU is a microprocessor for image processing that connects display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or modify display information.

[0060] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a display panel. For example, the display screen 294 can be a touch screen.

[0061] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 200.

[0062] The internal memory 221 can be used to store computer executable program codes, which include instructions. The internal memory 221 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the mobile phone 200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 210 executes various functions and data processing of the mobile phone 200 by running instructions stored in the internal memory 221 and / or instructions stored in a memory provided in the processor 210.

[0063] The audio module 280 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 280 can also be used to encode and decode audio signals. In some embodiments, the audio module 280 can be provided in the processor 210, or some functional modules of the audio module 280 can be provided in the processor 210.

[0064] The sensor module 290 may include a pressure sensor 290A, a fingerprint sensor 290B, a temperature sensor 290C, a touch sensor 290D, and the like.

[0065] Among them, the pressure sensor 290A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 290A can be set on the display screen 294. There are many types of pressure sensors 290A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a device including at least two parallel plates with conductive material. When a force acts on the pressure sensor 290A, the capacitance between the electrodes changes. The mobile phone 200 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 294, the mobile phone 200 detects the intensity of the touch operation based on the pressure sensor 290A. The mobile phone 200 can also calculate the position of the touch based on the detection signal of the pressure sensor 290A.

[0066] Fingerprint sensor 290B is used to collect fingerprints. Mobile phone 200 can use the collected fingerprint characteristics to realize fingerprint unlocking, access application lock, fingerprint photo taking, fingerprint answering incoming calls, etc.

[0067] Temperature sensor 290C is used to detect temperature. In some embodiments, mobile phone 200 uses the temperature detected by temperature sensor 290C to implement a temperature management strategy. For example, when the temperature reported by temperature sensor 290C exceeds a threshold, mobile phone 200 reduces the performance of a processor located near temperature sensor 290C to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is below another threshold, mobile phone 200 heats battery 270 to prevent abnormal shutdown of mobile phone 200 due to low temperature. In other embodiments, when the temperature is below yet another threshold, mobile phone 200 boosts the output voltage of battery 270 to prevent abnormal shutdown due to low temperature.

[0068] Touch sensor 290D, also known as a "touch device," can be disposed on display screen 294. Touch sensor 290D and display screen 294 form a touch screen, also known as a "touch screen." Touch sensor 290D is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via display screen 294. In other embodiments, touch sensor 290D can also be disposed on the surface of mobile phone 200, at a location different from that of display screen 294.

[0069] Keys 291 include a power button, a volume button, etc. Keys 291 can be mechanical keys or touch keys. Mobile phone 200 can receive key inputs and generate key signal inputs related to user settings and function control of mobile phone 200.

[0070] Motor 292 can generate vibration prompts. Motor 292 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 294, motor 292 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0071] The indicator 293 may be an indicator light, which may be used to indicate the charging status, power level change, messages, missed calls, notifications, etc.

[0072] The SIM card interface 295 is used to connect a SIM card. The SIM card can be connected to or disconnected from the mobile phone 200 by inserting or removing the SIM card into or from the SIM card interface 295.

[0073] The specific process of the control method for implementing Wi-Fi roaming in an electronic device is described below with reference to FIG3 .

[0074] FIG3 is a flow chart of a method for controlling Wi-Fi roaming according to an embodiment of the present application. The method can be applied to an electronic device connected to a Wi-Fi network. As shown in FIG3 , the method includes steps S301 to S304.

[0075] S301. The electronic device obtains a plurality of Wi-Fi roaming policies pre-configured in the electronic device.

[0076] In some embodiments, to provide users with a better Wi-Fi experience, chip manufacturers typically pre-configure Wi-Fi roaming policies in their Wi-Fi chips. This policy allows users to roam to a different Wi-Fi network if the current Wi-Fi network they are connected to cannot provide a better experience. Wi-Fi chips typically include multiple Wi-Fi roaming policies. The Wi-Fi roaming policies pre-configured in their Wi-Fi chips by different chip manufacturers may be the same or different.

[0077] Exemplarily, the Wi-Fi roaming policy configured in the Wi-Fi chip may include: a bit error rate lower than a threshold, a priority of the first frequency band (such as a 5G frequency band) higher than a priority of the second frequency band (such as a 2.4G frequency band), no confirmation character (ACK) replied by the network device (such as a router) is received, a load (BSS LOAD, such as a channel occupancy rate) is higher than a threshold, a transmission data volume reaches a threshold, a transmission rate is lower than a threshold, no beacon (BEACON) frame from the network device (such as a router) is received, the connected Wi-Fi network signal is lower than a threshold, the electronic device actively reconnects to the connected Wi-Fi network, and a passive (DEAUTH) command is received.

[0078] The so-called bit error rate refers to the evaluation of the received signal performance of the electronic device. If the received signal performance does not reach the qualified percentage, that is, the bit error rate is higher than the threshold, it can be considered that the signal of the currently connected Wi-Fi network is poor, and Wi-Fi roaming can be used to improve the user's Internet experience. For example, a dual-band router is deployed. For example, in the current scenario, a router that supports both 5G and 2.4G bands is deployed. The router has two BSSIDs, BSSID1 and BSSID2, which correspond to the 5G and 2.4G bands it supports respectively. The above threshold is 2.5%. For example, if the current electronic device selects BSSID1 to access the Wi-Fi network, and the electronic device detects that the current bit error rate exceeds 2.5%, it can switch from BSSID1 to BSSID2, that is, Wi-Fi roaming occurs.

[0079] The so-called priority of the first frequency band over the second frequency band means that when accessing a Wi-Fi network, the electronic device prefers the Wi-Fi network of the first frequency band. For example, the electronic device prefers to access the Wi-Fi network using the BSSID corresponding to the 5G frequency band. Correspondingly, if the electronic device is currently accessing a Wi-Fi network using the BSSID corresponding to the second frequency band, such as the 2.4G frequency band, the electronic device can perform Wi-Fi roaming to switch to the BSSID corresponding to the 5G frequency band to access the Wi-Fi network.

[0080] The so-called ACKnowledge character (ACK) refers to the ACK sent by the router during the interaction between the electronic device and the network device (such as a router). If the electronic device does not continuously receive ACKs, the electronic device will enter Wi-Fi roaming.

[0081] Similarly, when other Wi-Fi roaming policies are met, electronic devices will also perform Wi-Fi roaming to ensure the user's Internet experience.

[0082] In this embodiment, the electronic device, such as the processor of the electronic device, may obtain the configured Wi-Fi roaming policy from the Wi-Fi chip.

[0083] S302. The electronic device divides the multiple Wi-Fi roaming policies obtained in S301 into a first roaming policy and a second roaming policy.

[0084] After obtaining multiple Wi-Fi roaming policies pre-set in the Wi-Fi chip, the electronic device, such as a processor of the electronic device, can classify the multiple Wi-Fi roaming policies into a first roaming policy and a second roaming policy. For example, the multiple Wi-Fi roaming policies can be classified based on the principle of not affecting normal use of the Wi-Fi network. For example, the first roaming policy can be a roaming policy for optimizing the network, and the second roaming policy can be a roaming policy for maintaining the connection. In other words, disabling the first roaming policy will not affect normal use of the Wi-Fi network.

[0085] It should be noted that the above principle may also be other division principles, which are not specifically limited here. For example, it is sufficient to ensure that the first roaming policy is part of the multiple Wi-Fi roaming policies supported by the electronic device.

[0086] For example, as shown in FIG4 , combined with the example in S301 , the first roaming policy may include one or more of the following policies: a bit error rate lower than a threshold, a priority of the first frequency band higher than a priority of the second frequency band, no ACK response from the network device is received, a load higher than a threshold, or a transmission data volume reaches a threshold. The second roaming policy may include one or more of the following policies: the electronic device transmission rate lower than a threshold, no BEACON frames from the network device are received, the connected Wi-Fi network signal is lower than a threshold, the electronic device actively reconnects to the connected Wi-Fi network, or a DEAUTH command is received.

[0087] S303. The electronic device performs Wi-Fi roaming between two different BSSIDs.

[0088] As described above, in a scenario where a dual-band router is deployed, or a scenario where two single-band routers are deployed, if two different BSSIDs correspond to the same Wi-Fi network or the names and passwords of the Wi-Fi networks corresponding to two different BSSIDs are the same, then, in order to ensure that the electronic device provides normal Internet access for the user, the electronic device can periodically monitor the currently connected Wi-Fi network, such as determining whether Wi-Fi roaming is required based on the Wi-Fi roaming policy configured for the electronic device, that is, determining whether Wi-Fi roaming is required between two different BSSIDs.

[0089] For example, the Wi-Fi chip of the electronic device may determine whether Wi-Fi roaming is required between two different BSSIDs based on a Wi-Fi roaming policy. If the Wi-Fi chip determines that Wi-Fi roaming is required, it may switch from one BSSID to another. Furthermore, the Wi-Fi chip may report the occurrence of Wi-Fi roaming to the processor of the electronic device.

[0090] When an electronic device, such as a processor of an electronic device, detects that Wi-Fi roaming occurs between two different BSSIDs, the electronic device, such as the processor of the electronic device, can further determine whether the current scenario requires the implementation of an escape strategy. For example, the escape strategy can be implemented if it is determined that the Wi-Fi roaming meets preset conditions. Specifically, the following steps can be performed: S304-S305.

[0091] S304. In response to the Wi-Fi roaming of the electronic device meeting a preset condition, the electronic device obtains a first escape duration.

[0092] When it is determined that the electronic device is in Wi-Fi roaming between two different BSSIDs, the electronic device may further determine whether the Wi-Fi roaming of the electronic device meets a preset condition. If the Wi-Fi roaming of the electronic device meets the preset condition, it may be considered that the electronic device is in a Wi-Fi roaming ping-pong scenario.

[0093] As an example, the preset conditions may include one or more of the following: the number of Wi-Fi roaming events between the two different BSSIDs by the electronic device is greater than a third threshold, and the time difference between the first and last Wi-Fi roaming events is less than a fourth threshold. In other words, if the Wi-Fi roaming events between the two different BSSIDs by the electronic device meet the preset conditions, the electronic device can be considered to be in a Wi-Fi roaming ping-pong scenario that affects the user's Internet experience.

[0094] The third threshold value may be an integer greater than 1, such as 3, 5, or 6. For example, the fourth threshold value may be 2 minutes, 75 seconds, 1 minute, 30 seconds, etc.

[0095] For example, as shown in FIG5 , the preset conditions include: the number of Wi-Fi roaming events is greater than a third threshold, the time difference between the first and last Wi-Fi roaming events is less than a fourth threshold, the third threshold is 3, and the fourth threshold is 2 minutes. To determine whether an electronic device is performing Wi-Fi roaming between two different BSSIDs, the electronic device, such as a processor of the electronic device, can determine whether the number of Wi-Fi roaming events between the two different BSSIDs is greater than 3, and whether the time difference between the first and last Wi-Fi roaming events is less than 2 minutes. In other words, it can determine whether the electronic device frequently performs Wi-Fi roaming between the two different BSSIDs within two minutes. If the number of Wi-Fi roaming events is greater than 3, and the three Wi-Fi roaming events occur within 2 minutes, then the electronic device is in a Wi-Fi roaming ping-pong scenario, and suppression, i.e., execution of an escape strategy, is required. If the number of roaming events is less than three or the time difference between the first and last Wi-Fi roaming events is greater than two minutes, the electronic device is not in a Wi-Fi roaming ping-pong scenario and does not need to trigger suppression. In other words, there is no need to execute the escape strategy.

[0096] After determining that Wi-Fi roaming occurring in the electronic device meets a preset condition, i.e., determining that the electronic device is in a Wi-Fi roaming ping-pong scenario, the electronic device, such as a processor of the electronic device, can execute an escape strategy to reduce the frequency of Wi-Fi roaming. For example, after the Wi-Fi roaming ping-pong scenario occurs, the electronic device can execute the escape strategy to limit the frequency of Wi-Fi roaming within a certain period of time (e.g., an escape period) to ensure rationality.

[0097] The above escape duration may be the first escape duration in the embodiment of the present application.

[0098] In some embodiments of the present application, the first escape duration can be determined based on historical escape information. Specifically, the first escape duration can be determined as follows: an electronic device, such as a processor of an electronic device, can obtain historical escape information and then determine the first escape duration based on the historical escape information. The historical escape information can include the reason for the last cessation of the escape strategy and / or the timestamp of the last cessation of the escape strategy.

[0099] The reason for the last cessation of the escape strategy can include a normal cessation and an abnormal cessation. If the reason for the last cessation of the escape strategy was the expiration of the second escape duration, the cessation reason can be considered a normal cessation. If the reason for the last cessation of the escape strategy was the failure to reach the second escape duration and the detection of an abnormal event, the cessation reason can be considered an abnormal cessation. The second escape duration is not the duration of the last execution of the escape strategy. The timestamp of the last cessation of the escape strategy can be the specific time when the escape strategy was last ceased.

[0100] The duration of the current escape required by different historical escape information, that is, the first escape duration, is different. That is, the duration of the current escape required by different historical escape information can be selected step by step.

[0101] For example, taking the historical escape information including the reason and timestamp for the last stop of the escape strategy as an example, if the reason for the last stop of the escape strategy was the arrival of the second escape duration, i.e., normal stop, and the time difference between the timestamp for the last stop of the escape strategy and the current moment is less than the second threshold, the first escape duration can be determined to be the first duration. If the reason for the last stop of the escape strategy was the arrival of the second escape duration (i.e., normal stop), and the time difference between the timestamp for the last stop of the escape strategy and the current moment is greater than the second threshold, or if the reason for the last stop of the escape strategy was the detection of an abnormal event (i.e., abnormal stop), the first escape duration can be determined to be the second duration.

[0102] The first duration is greater than the second duration. For example, the first duration can be 30 minutes, 25 minutes, 20 minutes, etc. The second duration can be 5 minutes, 3 minutes, etc. The second threshold can be 1 hour, 1.5 hours, 2 hours, etc.

[0103] For example, as shown in Figure 6, historical escape information includes: the reason for the last stop of the escape strategy and the timestamp of the last stop, the second threshold is 2 hours, the first duration is 30 minutes, and the second duration is 5 minutes. If the reason for the last stop of the escape strategy was a normal stop, and the time difference between the timestamp of the last stop and the current time is less than 2 hours, the first escape duration can be determined to be 30 minutes. If the reason for the last stop of the escape strategy was a normal stop and the time difference between the timestamp of the last stop and the current time is greater than 2 hours, or if the reason for the last stop of the escape strategy was an abnormal stop, the first escape duration is determined to be 5 minutes.

[0104] After determining the current escape duration, that is, the first escape duration, the electronic device may trigger suppression, such as executing the following S305 .

[0105] S305. The electronic device executes the escape strategy within the first escape time period.

[0106] The escape strategy may include: prohibiting the electronic device from performing Wi-Fi roaming based on the first roaming strategy determined in S302. The escape strategy may also include: not responding to a handover request received due to a predetermined reason; the predetermined reason may include: BTM.

[0107] Executing the escape strategy, i.e., prohibiting the electronic device from performing Wi-Fi roaming based on the first roaming strategy, can be specifically implemented by tagging the first roaming strategy with a tag indicating that the roaming strategy is prohibited. Thus, when the electronic device accesses a Wi-Fi network, it only uses the untagged Wi-Fi roaming strategy to determine whether to trigger Wi-Fi roaming. In other words, the electronic device only uses the second roaming strategy as a basis for determining whether to trigger Wi-Fi roaming, thereby reducing the frequency of Wi-Fi roaming while still ensuring the user's online experience. Executing the escape strategy can also be specifically implemented by blacklisting the first roaming strategy. Thus, when the electronic device accesses a Wi-Fi network, it can determine whether to trigger Wi-Fi roaming based on a Wi-Fi roaming strategy that is not on the blacklist. Alternatively, the second roaming strategy can be whitelisted. Thus, when the electronic device accesses a Wi-Fi network, it can determine whether to trigger Wi-Fi roaming based on a Wi-Fi roaming strategy that is on the whitelist.

[0108] BTM (Broadband Transition Management) is initiated by the router. BTM refers to the router triggering Wi-Fi roaming for electronic devices. For example, load balancing involves sending handover requests to electronic devices based on load balancing strategies when Wi-Fi networks on a BSSID are congested. During this time, electronic devices may not respond to handover requests.

[0109] For example, consider an escape policy that prohibits the electronic device from performing Wi-Fi roaming based on a first roaming policy and does not respond to handover requests received due to a predetermined reason, with a first escape duration of 30 minutes. During this first escape duration, e.g., 30 minutes, the electronic device determines whether to trigger Wi-Fi roaming based solely on the second roaming policy. Furthermore, during the first escape duration, e.g., 30 minutes, the electronic device prohibits Wi-Fi roaming by not responding to handover requests received due to a predetermined reason.

[0110] If a condition for stopping execution of the escape strategy is met, the electronic device may stop executing the escape strategy. In some instances, the condition for stopping execution of the escape strategy may be the expiration of a first escape duration. That is, as shown in FIG. 7 , after the first escape duration has expired, the electronic device, such as the processor of the electronic device, may stop executing the escape strategy, i.e., resume using the first roaming strategy as a decision criterion for determining whether Wi-Fi roaming is required, and / or allow a handover request due to a predetermined reason to be responded to.

[0111] For example, taking the first escape duration as the first duration, and the first duration being 30 minutes as an example, after 30 minutes have passed since the start of the suppression, the escape strategy is stopped from being executed.

[0112] In other examples, the condition for stopping execution of the escape strategy may also be that the first escape time period has not been reached, but an abnormal event has been detected. That is, if the first escape time period has not been reached, but an abnormal event has been detected, the electronic device, such as the processor of the electronic device, may stop executing the escape strategy. For example, the abnormal event may be that the electronic device loses its Wi-Fi connection, or the signal quality of the Wi-Fi network to which the electronic device is connected continues to be below a first threshold for a preset period of time.

[0113] It should be noted that the above S301 and S302 may be executed after determining that a Wi-Fi roaming ping-pong scenario occurs, or may be executed before determining that a Wi-Fi roaming ping-pong scenario occurs, which is not specifically limited here.

[0114] By adopting the technical solution of the present application, when it is determined that an electronic device is Wi-Fi roaming between two different BSSIDs and meets the preset conditions, that is, it is currently in a Wi-Fi roaming ping-pong scenario, by prohibiting some roaming strategies to reduce the frequency of Wi-Fi roaming, the Wi-Fi roaming ping-pong scenario is escaped, thereby ensuring the user's Internet experience. In addition, the escape strategy can be executed during the escape time, and when the escape time is reached or an abnormal event occurs, the suppressed roaming strategy can be restored, ensuring the normal triggering of subsequent Wi-Fi roaming, further ensuring the user's Internet experience. The escape time is selected in a step-by-step manner, making the suppression more reasonable and further ensuring the user's Internet experience.

[0115] 8 , the Wi-Fi roaming control method provided in an embodiment of the present application is exemplarily described by taking an electronic device including a ping-pong determination module, an escape module, an escape stage selection module, and an escape execution module as an example.

[0116] If Wi-Fi roaming is successful, i.e., the electronic device switches from one BSSID to another, the ping-pong escape module may receive a successful Wi-Fi roaming instruction. In response, the ping-pong determination module may determine the current scenario, identifying whether it is a ping-pong scenario. For example, the ping-pong determination module may determine whether the device frequently switches back and forth between the two BSSIDs, and whether the number of switches meets a certain threshold (e.g., a third threshold, such as 5). If a ping-pong scenario is identified, the ping-pong determination module sends the ping-pong scenario identification information to the escape module. The escape module may then further determine a time limit threshold, i.e., whether the ping-pong scenario occurs within a predetermined time, such as whether the ping-pong scenario occurs within 2 minutes. If the ping-pong scenario and the threshold requirements are met, it is identified as a Wi-Fi roaming ping-pong scenario. If the escape module determines that the current scenario is a Wi-Fi roaming ping-pong scenario, it obtains the escape duration from the escape phase selection module. For example, the escape module may send a request message to the escape phase selection module. After receiving the request message, the escape phase selection module can select a current escape duration based on historical escape information. After determining the current escape duration, the escape phase selection module can return the duration to the escape module. The escape module can then trigger the escape execution module to execute the escape strategy. If the escape execution module confirms the successful start of the escape strategy, it can return a confirmation result to the escape module indicating success, allowing the escape module to set the current escape timer and begin monitoring for abnormal events. If the set escape timer expires or an abnormal event occurs, the escape module can trigger the escape execution module to stop executing the escape strategy, or to remove escape suppression. After the escape execution module successfully stops the escape suppression, it can return a confirmation result to the escape module confirming the successful cessation of the escape suppression. All roaming strategies are then restored.

[0117] The following describes an example of a Wi-Fi roaming control method provided in an embodiment of the present application with reference to FIG9 .

[0118] As shown in Figure 9, the electronic device monitors whether Wi-Fi roaming occurs between two different BSSIDs. If Wi-Fi roaming is detected between two different BSSIDs, it determines whether the device is on a ping-pong path, or whether the device has switched back from the current BSSID to the previous BSSID. If the device determines that the device is not on a ping-pong path, it continues to monitor whether Wi-Fi roaming occurs between the two different BSSIDs.

[0119] If it is determined that the device is on a ping-pong path, the number of Wi-Fi roaming times may be increased by 1. It is understood that the electronic device may count the number of times the device switches back and forth between two different BSSIDs based on the monitoring result of the first step and the determination result of the second step, i.e., count the number of Wi-Fi roaming times.

[0120] After counting the number of Wi-Fi roaming sessions, the electronic device may continue to determine whether the time difference between the first and last Wi-Fi roaming sessions is less than a threshold, such as 2 minutes. If the time difference between the first and last Wi-Fi roaming sessions is greater than the threshold, the electronic device may clear the currently counted number of Wi-Fi roaming sessions and re-execute the monitoring operation.

[0121] If the time difference between the first Wi-Fi roaming occurrence and the last Wi-Fi roaming occurrence is less than a threshold, the electronic device continues to determine whether the counted number of Wi-Fi roaming occurrences is greater than a threshold, such as 5. If the number of Wi-Fi roaming occurrences is less than the threshold, the electronic device may clear the currently counted number of Wi-Fi roaming occurrences and re-execute the monitoring operation.

[0122] If the number of Wi-Fi roaming times is greater than the threshold, it is determined whether the Wi-Fi roaming escape is currently in progress, that is, whether the escape strategy is currently being executed. If the Wi-Fi roaming escape is currently in progress, the monitoring operation can be re-executed.

[0123] When the Wi-Fi roaming escape is not currently in progress, the electronic device may continue to determine whether the reason for stopping the escape strategy last time was due to the expiration of the escape time, that is, whether the escape was stopped after a normal timer expired last time.

[0124] In the case that the reason for stopping the execution of the escape strategy last time was not the escape time limit, the first stage of escape is performed, that is, the escape time limit for this time is selected as the first time limit, such as 30 minutes. In the case that the reason for stopping the execution of the escape strategy last time was the escape time limit, continue to judge whether the timestamp of the last time the escape strategy was stopped is less than a threshold value from the current time, such as 2 hours. In the case that the timestamp of the last time the escape strategy was stopped is greater than a threshold value from the current time, the first stage of escape is also performed, that is, the escape time limit for this time is selected as the first time limit, such as 30 minutes. In the case that the timestamp of the last time the escape strategy was stopped is less than a threshold value from the current time, the second stage of escape is performed, that is, the escape time limit for this time is selected as the second time limit, such as 5 minutes.

[0125] The electronic device can then set a timer based on the first duration or the second duration and start the timer. When the timer is started, the escape strategy is executed, such as prohibiting the electronic device from performing Wi-Fi roaming based on the first roaming strategy. The electronic device can also determine whether the timer has expired. If the timer has not expired, the electronic device can further detect whether an abnormal event has occurred. If the timer has expired, or if the timer has not expired but an abnormal event has been detected, the escape strategy is stopped.

[0126] Other embodiments of the present application provide a computer device, which may be the aforementioned electronic device and may include, for example, a memory, a wireless communication module, and one or more processors. The memory, the wireless communication module, and the processor are coupled. The memory is used to store computer instructions. When the processor executes the computer instructions, the electronic device may perform the various functions or steps performed in the aforementioned method embodiments. The structure of the electronic device may refer to the structure of the electronic device shown in FIG2 , using a mobile phone as an example.

[0127] An embodiment of the present application also provides a chip system, as shown in Figure 10, the chip system 1000 includes at least one processor 1001 and at least one interface circuit 1002. The processor 1001 and the interface circuit 1002 can be interconnected via lines. For example, the interface circuit 1002 can be used to receive signals from other devices (such as the memory of an electronic device). For another example, the interface circuit 1002 can be used to send signals to other devices (such as the processor 1001). Exemplarily, the interface circuit 1002 can read instructions stored in the memory and send the instructions to the processor 1001. When the instructions are executed by the processor 1001, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.

[0128] An embodiment of the present application further provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes the various functions or steps executed by the electronic device in the above-mentioned method embodiment.

[0129] An embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the functions or steps executed by the electronic device in the above method embodiment.

[0130] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0131] In the several embodiments provided in this 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 schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0133] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0134] 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 this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0135] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A control method for Wi-Fi roaming, characterized in that, An electronic device applicable to support multiple Wi-Fi roaming policies, the electronic device being connected to a Wi-Fi network, the method comprising: The electronic device performs Wi-Fi roaming between two different basic service set identifiers (BSSIDs); In response to the Wi-Fi roaming of the electronic device meeting a preset condition, an escape policy is executed; Wherein, the escape policy includes prohibiting the electronic device from performing Wi-Fi roaming based on a first roaming policy, and the first roaming policy includes some of the multiple Wi-Fi roaming policies supported by the electronic device.

2. The method according to claim 1, wherein The executing the escape policy includes: Executing the escape policy within a first escape duration.

3. The method according to claim 2, wherein The method further includes: After the first escape duration arrives, stop executing the escape policy; or, in the case where the first escape duration has not been reached but an abnormal event is detected, stop executing the escape policy; the abnormal event includes one or more of the following events: the electronic device disconnects from the Wi-Fi connection, the signal quality of the Wi-Fi network accessed by the electronic device continuously remains below a first threshold within a preset duration; In the case of stopping executing the escape policy, allow the electronic device to perform Wi-Fi roaming based on the first roaming policy.

4. The method according to claim 2 or 3, characterized in that The method further includes: Obtain historical escape information, the historical escape information including: the reason for the last stop of executing the escape policy and / or the timestamp of the last stop of executing the escape policy; Based on the historical escape information, obtain the first escape duration.

5. The method according to claim 4, characterized in that In the case where the reason for the last stop of executing the escape policy is that the second escape duration arrives, and the time difference between the timestamp of the last stop of executing the escape policy and the current moment is less than a second threshold, the first escape duration is a first duration; In the case where the reason for the last stop of executing the escape policy is that the second escape duration arrives and the time difference between the timestamp of the last stop of executing the escape policy and the current moment is greater than the second threshold, or, in the case where the reason for the last stop of executing the escape policy is that an abnormal event is detected, the first escape duration is a second duration; Wherein, the second escape duration is the duration of the last execution of the escape policy, and the first duration is greater than the second duration.

6. The method according to claim 1, characterized in that, The preset condition includes one or more of the following conditions: The number of times of Wi-Fi roaming is greater than a third threshold; The time difference between the first occurrence of Wi-Fi roaming and the last occurrence of Wi-Fi roaming is less than a fourth threshold.

7. The method according to any one of claims 1 to 6, characterized in that Before executing the escape policy, the method further includes: Obtain the multiple Wi-Fi roaming policies; Divide the multiple Wi-Fi roaming policies into the first roaming policy and the second roaming policy; Wherein, the second roaming policy is the roaming policy other than the first roaming policy among the multiple Wi-Fi roaming policies; in the case where the Wi-Fi roaming of the electronic device meets the preset condition, allow the electronic device to perform Wi-Fi roaming based on the second roaming policy.

8. The method according to claim 7, characterized in that, The first roaming policy includes one or more of the following policies: the bit error rate is lower than a threshold, the priority of the first frequency band is higher than the priority of the second frequency band, the acknowledgement character ACK of the network device reply is not continuously received, the load is higher than a threshold, the amount of transmitted data reaches a threshold; The second roaming policy includes one or more of the following policies: the transmission rate is lower than a threshold, the beacon frame of the network device is not received, the Wi-Fi network signal accessed is lower than a threshold, the Wi-Fi network to which the electronic device actively reconnects, a passive deauth instruction is received.

9. The method according to any one of claims 1-8, characterized in that, The escape policy further includes: not responding to a handover request received due to a predetermined reason; the predetermined reason includes: transition management BTM.

10. A computer device, comprising: A memory, a processor, a wireless communication module, and computer instructions stored on the memory, wherein the memory executes the computer instructions to implement the steps of the method according to any one of claims 1-9.

11. A computer-readable storage medium, on which computer instructions are stored, wherein when the computer instructions are executed by a processor, the steps of the method according to any one of claims 1-9 are implemented.

12. A computer program product comprising computer instructions, characterized in that, when the computer instructions are executed by a processor, the steps of the method according to any one of claims 1-9 are implemented.