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

By implementing escape strategies in electronic devices, some Wi-Fi roaming strategies are prohibited, which solves the poor user experience caused by frequent Wi-Fi roaming and achieves a more stable Internet experience.

CN120343539APending Publication Date: 2025-07-18HONOR DEVICE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410046081.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-10
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The user experience of Internet access caused by frequent Wi-Fi roaming is poor, especially in the Wi-Fi roaming table tennis scenario, the existing technology cannot effectively solve it.

Method used

By implementing escape strategies in electronic devices, some Wi-Fi roaming strategies are prohibited, the frequency of Wi-Fi roaming is reduced, and the occurrence of ping-pong scenarios is avoided.

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 CN120343539A_ABST
    Figure CN120343539A_ABST
Patent Text Reader

Abstract

The invention discloses a Wi-Fi roaming control method, electronic equipment and a computer readable storage medium, relates to the technical field of terminals, and aims to reduce the number of times of Wi-Fi roaming and realize escape in a Wi-Fi roaming ping-pong scene by prohibiting part of roaming strategies in various Wi-Fi roaming strategies, thereby ensuring the internet surfing experience of a user. The method can be applied to the electronic equipment supporting multiple Wi-F i roaming strategies, and the electronic equipment is accessed to a Wi-Fi network. The specific scheme is as follows: the electronic equipment generates Wi-Fi roaming between two different BSSI D; and executing an escape strategy in response to the fact that Wi-Fi roaming of the electronic equipment meets a preset condition. Wherein the escape strategy includes forbidding the electronic device to perform Wi-Fi roaming based on the first roaming strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technologies, and in particular, to a method for controlling Wi-Fi roaming, an electronic device, and a computer-readable storage medium. Background Art

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

[0003] Based on this, this application provides a method for controlling Wi-Fi roaming, an electronic device, and a computer-readable storage medium. The frequent occurrence of Wi-Fi frequent roaming is avoided, thereby ensuring the Internet access experience of users.

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

[0005] In a first aspect, this application provides a method for controlling Wi-Fi roaming, which is applied to an electronic device that supports multiple Wi-Fi roaming strategies, and 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 of the electronic device meeting a preset condition, an escape strategy is executed. Among them, the escape strategy includes prohibiting some of the multiple Wi-Fi roaming strategies supported by the electronic device, such as a first roaming strategy, that is, prohibiting the electronic device from performing Wi-Fi roaming based on the first roaming strategy. The electronic device can normally perform Wi-Fi roaming based on other roaming strategies except the first roaming strategy.

[0006] Among them, the Wi-Fi roaming of the electronic device meeting a predetermined condition can be considered that the electronic device is in a Wi-Fi roaming ping-pong scenario. By adopting the above technical solution, in the case where the 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 Wi-Fi roaming strategies it supports, and the escape from the Wi-Fi roaming ping-pong scenario is realized, thereby ensuring the Internet access experience of users.

[0007] In an implementable manner of the first aspect, the above-mentioned execution of the escape strategy can be achieved within a certain escape duration. That is, the electronic device executes the escape strategy, specifically, it can execute the escape strategy within an escape duration, such as the first escape duration, to avoid the problem of affecting the user's Internet experience due to long-term suppression of some strategies.

[0008] In an implementable manner of the first aspect, the above method may further include: in some cases, stop executing the escape strategy. For example, the situation of stopping the execution of the escape strategy may be that the first escape duration arrives, or an abnormal event is detected before the first escape duration arrives. In the case of stopping the 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 from the Wi-Fi connection and / or the signal quality of the Wi-Fi network accessed by the electronic device continuously remains below the first threshold within a preset duration. In this way, in the case where the escape duration arrives or an abnormal event occurs, the normal triggering of subsequent Wi-Fi roaming is ensured.

[0009] In an implementable manner 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 stop of executing the escape strategy and / or the timestamp of the last stop of executing the escape strategy. Specifically, the historical escape information can be obtained, that is, the reason for the last stop of executing the escape strategy and / or the timestamp of the last stop of executing the escape strategy can be obtained. Then, based on the obtained historical escape information, the first escape duration is obtained, so as to determine the execution time of the escape strategy.

[0010] Among them, when the reason for the last stop of executing the escape strategy is that the second escape duration arrives and the timestamp of the last stop of executing 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 executing the escape strategy is that the second escape duration arrives and the timestamp of the last stop of executing the escape strategy is greater than the second threshold from the current time, or the reason for the last stop of executing 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 different. Based on the reason for the last stop of executing the escape strategy and / or the timestamp of the last stop of executing the escape strategy, the current escape duration can be selected step by step, making the suppression more reasonable and further ensuring the user's Internet experience.

[0011] In an implementable manner of the first aspect, the above preset condition may be that the number of Wi-Fi roaming occurrences is greater than a third threshold; the time difference between the first Wi-Fi roaming occurrence and the last Wi-Fi roaming occurrence is less than a fourth threshold, or one or more of them. By setting the above preset conditions, it is possible to accurately determine whether the electronic device is in a Wi-Fi roaming ping-pong scenario, and thus accurately decide whether to execute an escape strategy, ensuring the user's Internet experience.

[0012] In an implementable manner of the first aspect, before executing the escape strategy, it is also possible to obtain multiple Wi-Fi roaming strategies supported by the electronic device, and divide the multiple Wi-Fi roaming strategies into a first roaming strategy and a second roaming strategy. Among them, the first roaming strategy is a partial roaming strategy among the multiple supported Wi-Fi roaming strategies, that is, the roaming strategy that can be prohibited without affecting the user's use of the Wi-Fi network to access the Internet. The second roaming strategy may be other roaming strategies except the first roaming strategy, that is, the roaming strategy that cannot be prohibited. By selecting a partial roaming strategy from the supported roaming strategies as the suppressed roaming strategy, the user's Internet experience is maximally guaranteed.

[0013] Among them, the first roaming strategy includes one or more of the following strategies: the bit error rate is lower than the threshold, the priority of the first frequency band is higher than the priority of the second frequency band, the acknowledgment character ACK from the network device is not received, the load is higher than the threshold, and the transmitted data volume reaches the threshold. The second roaming strategy includes one or more of the following strategies: the transmission rate is lower than the threshold, the beacon BEACON frame from the network device is not received, the signal of the accessed Wi-Fi network is lower than the threshold, the Wi-Fi network that the electronic device actively reconnects to, and the passive DEAUTH instruction is received.

[0014] In an implementable manner of the first aspect, the escape strategy may further include: not responding to a handover request caused by a predetermined reason; the predetermined reason may include: Transition Management (BTM). For Wi-Fi roaming caused by BTM, it can also be suppressed as an escape strategy in the Wi-Fi roaming ping-pong scenario to achieve escape from the Wi-Fi roaming ping-pong scenario.

[0015] In the second aspect, the present application provides a control device for Wi-Fi roaming, and the device has the function of implementing the behavior of the electronic device in the method of the first aspect described above. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions, for example, an acquisition unit or module, a monitoring unit or module, and an execution unit or module.

[0016] 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 control method for Wi-Fi roaming in the first aspect and any of its implementation manners as described above is implemented.

[0017] In a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by the processor, the control method for Wi-Fi roaming in the first aspect and any of its implementation manners is implemented.

[0018] In a fifth aspect, a computer program product containing instructions is provided, including computer instructions, and when the computer instructions are executed by the processor, the control method for Wi-Fi roaming in the first aspect and any of its implementation manners as described above is implemented.

[0019] In a sixth aspect, an embodiment of the present application provides a chip system. The chip system includes a processor, and the processor is used to call a computer program in a memory to execute the control method for Wi-Fi roaming in the first aspect and any of its implementation manners.

[0020] 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 manner thereof, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a schematic diagram of the scenario of Wi-Fi roaming of an electronic device in the related art;

[0022] Figure 2 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application;

[0023] Figure 3 It is a schematic flow diagram of a control method for Wi-Fi roaming provided by an embodiment of the present application;

[0024] Figure 4 It is a schematic diagram of a control method for Wi-Fi roaming provided by an embodiment of the present application Figure 1 ;

[0025] Figure 5 It is a schematic diagram of a control method for Wi-Fi roaming provided by an embodiment of the present application Figure 2 ;

[0026] Figure 6 It is a schematic diagram of a control method for Wi-Fi roaming provided by an embodiment of the present applicationFigure 3 ;

[0027] Figure 7 This application provides a schematic diagram of a Wi-Fi roaming control method for an embodiment of the present application Figure 4 ;

[0028] Figure 8 This application provides a schematic diagram of a Wi-Fi roaming control method process for an embodiment of the present application Figure 1 ;

[0029] Figure 9 This application provides a schematic diagram of a Wi-Fi roaming control method process for an embodiment of the present application Figure 2 ;

[0030] Figure 10 This application provides a schematic diagram of the structure of a chip system for an embodiment of the present application Detailed implementation manners

[0031] In the description of the present application, unless otherwise specified, "and / or" in the present application is only an association relationship describing associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. These three situations, where A and B may be singular or plural

[0032] In the description of the present application, unless otherwise specified, "a plurality of" means two or more than two. "At least one (item)" or similar expressions thereof refer to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or multiple

[0033] To facilitate a clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions and roles. Those skilled in the art can understand that terms such as "first" and "second" do not limit the quantity and execution order, and terms such as "first" and "second" do not necessarily limit differences

[0034] In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific manner for easy understanding

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

[0036] 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 the Media Access Control (MAC) address. Through the BSSID, a wireless client (such as the electronic device in the present application) can determine the identity of the wireless access point it is connected to in order to establish a connection. For the scenario where the wireless access point is a router, a router may have only one BSSID. For example, a router that only supports a single frequency band (2.4G / 5G band) has only one BSSID. A router may also have multiple BSSIDs. For example, a router with dual-band integration has two different BSSIDs, corresponding to the 5G band and the 2.4G band it supports respectively. The BSSIDs of different routers are different.

[0037] 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 the embodiments of the present application, the ping-pong scenario of Wi-Fi roaming can refer to the situation where an electronic device performs Wi-Fi roaming between two different BSSIDs, which can be simply understood as the electronic device switching back and forth between two different BSSIDs. Among them, these two different BSSIDs can be of the same router, and these two BSSIDs correspond to the same Wi-Fi network. They can also be of different routers, and the names (such as the Service Set ID (SSID)) and passwords of the Wi-Fi networks corresponding to these two BSSIDs are the same.

[0038] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application.

[0039] In addition to accessing the Internet through traffic, current electronic devices can also use Wi-Fi networks to achieve Internet access functions. The above Wi-Fi Internet access can be achieved through the interaction between a router and an electronic device. To ensure the user's Internet access experience, in one scenario, a dual-band unified router can be deployed, such as a router that supports both the 5G band and the 2.4G band. This router has two BSSIDs, corresponding to the 5G band and the 2.4G band it supports respectively. The electronic device can select one of the BSSIDs to access the Wi-Fi network. When the two BSSIDs correspond to the same Wi-Fi network, if the currently selected BSSID cannot provide a good Internet access experience for the user, the electronic device can select another BSSID to access the Wi-Fi network, that is, the electronic device can perform Wi-Fi roaming between two different BSSIDs to ensure the user's Internet access experience. In another scenario, two single-band routers can be deployed. Each of these two single-band routers corresponds to a BSSID, and the BSSIDs corresponding to different routers are different. The names and passwords of the Wi-Fi networks corresponding to these two BSSIDs are the same. Similar to the previous scenario, the electronic device can also perform Wi-Fi roaming between two different BSSIDs to ensure the user's Internet access experience.

[0040] Exemplarily, such as Figure 1 shown, taking the electronic device as a mobile phone as an example. When the user needs to use the Wi-Fi function to access the Internet, the user can turn on the Wi-Fi function on the mobile phone and then select the Wi-Fi network that the mobile phone needs to connect to. For example, after the mobile phone receives the operation of the user selecting the identifier of a certain Wi-Fi network in the Figure 1 interface 11 shown, the mobile phone can connect to the Wi-Fi network selected by the user for the user to access the Internet. Among them, in the above two scenarios, in response to the user's operation, the mobile phone can select one of the BSSIDs to connect. Subsequently, the mobile phone may select another BSSID to connect because the currently selected connected BSSID cannot provide a good Internet access experience for the user, that is, Wi-Fi roaming occurs between different BSSIDs. The user does not perceive the process of Wi-Fi roaming between the two BSSIDs.

[0041] Among them, the electronic device can decide whether Wi-Fi roaming is required according to the configured Wi-Fi roaming policy. Generally, the electronic device supports multiple Wi-Fi roaming policies, which may cause the electronic device to frequently perform Wi-Fi roaming. Taking the above scenario where the two BSSIDs are BSSID1 and BSSID2 as an example. Due to different configured Wi-Fi roaming policies, the electronic device may frequently switch from BSSID1 to BSSID2 and then from BSSID2 to BSSID1, thus putting the electronic device in a Wi-Fi roaming ping-pong scenario and affecting the user's Internet experience.

[0042] In order to improve the user's Internet experience, in the related art, when the electronic device recognizes that the current scenario is a Wi-Fi roaming ping-pong scenario, it adjusts the switching parameters to delay the occurrence of Wi-Fi roaming. That is to say, in the above technology, the electronic device is not allowed to perform Wi-Fi roaming within the delay time, even if the currently connected Wi-Fi network is not good. In this way, the rationality of Wi-Fi network usage cannot be guaranteed, and the user's Internet experience will still be poor.

[0043] To solve the above problems, an embodiment of the present application provides a method for controlling Wi-Fi roaming, which can execute an escape strategy when it is recognized that the current scenario is a Wi-Fi roaming ping-pong scenario, so as to reduce the occurrence frequency of Wi-Fi roaming, realize the escape from the Wi-Fi roaming ping-pong scenario, and thus ensure the rationality of Wi-Fi network usage to a greater extent and guarantee the user's Internet experience.

[0044] The solution provided by the embodiment of the present application can be applied to an electronic device. Exemplarily, the electronic device can be a device with specific wireless Internet functions such as a mobile phone, a tablet computer, a smart watch, a desktop type, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, etc. The embodiment of the present application does not impose special restrictions on the specific form of the electronic device.

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

[0046] Exemplarily, taking the mobile phone 200 as an example of the above-mentioned electronic device, Figure 2 shows a schematic structural diagram of the mobile phone 200. As Figure 2 shown, 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 screen 294, and a subscriber identification module (SIM) card interface 295, etc.

[0047] It can be understood that the structure schematically shown in the embodiments 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 in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure can be implemented in hardware, software, or a combination of software and hardware.

[0048] The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modulation and demodulation 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), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0049] The controller can generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.

[0050] 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. This memory may hold the instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses and reduces the waiting time of the processor 210, thus improving the efficiency of the system. In some embodiments, the processor 210 may include one or more interfaces. In the embodiments of the present application, the processor 210 may be used 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. Another example is not to respond to a handover request caused by a predetermined reason.

[0051] The charging management module 250 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. While charging the battery 270, the charging management module 250 may also supply power to the mobile phone 200 through the power management module 260.

[0052] The power management module 260 is configured to connect to the battery 270. The power management module 260 receives inputs from the battery 270 and / or the charging management module 250 and supplies power to the processor 210, the internal memory 221, the display screen 294, and the wireless communication module 240 (such as a Wi-Fi chip. Optionally, the Wi-Fi chip supports multiple Wi-Fi roaming strategies), etc. The power management module 260 may also be used to monitor parameters such as the battery capacity, the number of battery cycles, and the battery health status (leakage, impedance). In some other embodiments, the power management module 260 may also be provided in the processor 210. In some other embodiments, the power management module 260 and the charging management module 250 may also be provided in the same device.

[0053] The wireless communication function of the mobile phone 200 may be implemented through antenna 1, antenna 2, the mobile communication module 230, the wireless communication module 240, the modulation and demodulation processor, and the baseband processor, etc.

[0054] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the mobile phone 200 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, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0055] The mobile communication module 230 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the mobile phone 200. The mobile communication module 230 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 230 can receive electromagnetic waves through the antenna 1, filter, amplify, and perform other processing on the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation.

[0056] The wireless communication module 240 can provide solutions for wireless communications such as 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 technology (IR), etc. applied to the mobile phone 200. In some embodiments of the present application, when the wireless communication module 240 provides the WLAN solution for the mobile phone 200, the wireless communication module 240 may include the Wi-Fi chip in the present application.

[0057] 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 technologies.

[0058] The mobile phone 200 realizes the display function through the GPU, the display screen 294, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations and is used for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or change the display information.

[0059] 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 may be a touch screen.

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

[0061] The internal memory 221 can be used to store computer-executable program codes, and the executable program codes include instructions. The internal memory 221 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the mobile phone 200 (such as audio data, a phone book, etc.). In addition, the internal memory 221 can include a high-speed random access memory, and can 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 the instructions stored in the internal memory 221 and / or the instructions stored in the memory provided in the processor 210.

[0062] The audio module 280 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 280 can also be used for encoding and decoding 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.

[0063] The sensor module 290 can include a pressure sensor 290A, a fingerprint sensor 290B, a temperature sensor 290C, a touch sensor 290D, etc.

[0064] Among them, the pressure sensor 290A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 290A can be provided 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. The capacitive pressure sensor can include at least two parallel plates with conductive materials. 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 according to 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 according to the pressure sensor 290A. The mobile phone 200 can also calculate the position of the touch according to the detection signal of the pressure sensor 290A.

[0065] The fingerprint sensor 290B is used to collect fingerprints. The mobile phone 200 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access to application locks, fingerprint photography, fingerprint answering of incoming calls, etc.

[0066] The temperature sensor 290C is used to detect temperature. In some embodiments, the mobile phone 200 utilizes the temperature detected by the temperature sensor 290C to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 290C exceeds a threshold, the mobile phone 200 reduces the performance of the processor near the temperature sensor 290C in order to reduce power consumption and implement thermal protection. In some other embodiments, when the temperature is lower than another threshold, the mobile phone 200 heats the battery 270 to avoid abnormal shutdown of the mobile phone 200 caused by low temperature. In some other embodiments, when the temperature is lower than yet another threshold, the mobile phone 200 boosts the output voltage of the battery 270 to avoid abnormal shutdown caused by low temperature.

[0067] The touch sensor 290D, also known as a "touch control device". The touch sensor 290D can be disposed on the display screen 294. The touch sensor 290D and the display screen 294 form a touch screen, also known as a "touch control screen". The touch sensor 290D 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 294. In some other embodiments, the touch sensor 290D can also be disposed on the surface of the mobile phone 200, at a different position from that of the display screen 294.

[0068] The keys 291 include a power-on key, volume keys, etc. The keys 291 can be mechanical keys. They can also be touch keys. The mobile phone 200 can receive key inputs and generate key signal inputs related to the user settings and function controls of the mobile phone 200.

[0069] The motor 292 can generate vibration prompts. The 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 playing, etc.) can correspond to different vibration feedback effects. Touch operations acting on different regions of the display screen 294 can also cause the motor 292 to correspond to different vibration feedback effects. Different application scenarios (such as time reminder, receiving messages, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0070] The indicator 293 can be an indicator light and can be used to indicate the charging status, power change, and can also be used to indicate messages, missed calls, notifications, etc.

[0071] The SIM card interface 295 is used to connect the SIM card. The SIM card can be inserted into or removed from the SIM card interface 295 to achieve contact and separation with the mobile phone 200.

[0072] The following combination with Figure 3To introduce the specific process of the control method for the electronic device to achieve Wi-Fi roaming.

[0073] Figure 3 This application provides a schematic diagram of the process of a control method for Wi-Fi roaming. This method can be applied to an electronic device, and the electronic device is connected to a Wi-Fi network. As Figure 3 shown, this method includes: S301 - S304.

[0074] S301. The electronic device obtains multiple Wi-Fi roaming policies pre-configured in the electronic device.

[0075] In some embodiments, in order to provide a better Wi-Fi Internet access experience for users, generally, chip manufacturers will pre-configure Wi-Fi roaming policies in the Wi-Fi chip to provide a better Internet access experience for users through roaming when the currently connected Wi-Fi network cannot provide a good Internet access experience for users. Generally, multiple Wi-Fi roaming policies are included in the Wi-Fi chip. The Wi-Fi roaming policies pre-configured by different chip manufacturers in their Wi-Fi chips may be the same or different.

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

[0077] Among them, the so-called bit error rate refers to evaluating the receiving signal performance of the electronic device. When the receiving signal performance does not reach the qualified percentage, that is, when the bit error rate is higher than the threshold, it can be considered that the signal of the currently connected Wi-Fi network is not good, and the user's Internet access experience can be improved through Wi-Fi roaming. Taking a router with dual-band integration deployed, such as a router that supports both the 5G frequency band and the 2.4G frequency band in the current scenario, and there are two BSSIDs for this router, namely BSSID1 and BSSID2, which respectively correspond to the supported 5G frequency band and 2.4G frequency band, and the above threshold is 2.5% as an example. For example, when the current electronic device selects BSSID1 to connect to 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.

[0078] The so-called priority of the first frequency band being higher than that of the second frequency band means that during the process of accessing a Wi-Fi network, the electronic device preferably selects the Wi-Fi network of the first frequency band. For example, the electronic device preferably accesses the Wi-Fi network using the BSSID corresponding to the 5G frequency band. Correspondingly, when currently accessing the Wi-Fi network using the BSSID corresponding to the second frequency band, such as the BSSID corresponding to the 2.4G frequency band, the electronic device can perform Wi-Fi roaming to switch to accessing the Wi-Fi network using the BSSID corresponding to the 5G frequency band.

[0079] The so-called ACK (ACKnowledge Character) means that during the interaction between the electronic device and the network device (such as a router), the router will reply with an ACK. If the electronic device does not continuously receive the ACK, the electronic device will perform Wi-Fi roaming.

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

[0081] In this embodiment, the electronic device, such as the processor of the electronic device, can obtain the configured Wi-Fi roaming policies from the Wi-Fi chip.

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

[0083] After obtaining multiple Wi-Fi roaming policies pre-set in the Wi-Fi chip, the electronic device, such as the processor of the electronic device, can divide the multiple Wi-Fi roaming policies into a first roaming policy and a second roaming policy. Exemplarily, the multiple Wi-Fi roaming policies can be classified based on the principle of not affecting the 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. That is, prohibiting the first roaming policy will not affect the normal use of the Wi-Fi network.

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

[0085] For example, such as Figure 4As shown, in combination with the example in S301, the first roaming policy may include 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, no ACK is received from the network device, the load is higher than the threshold, and the transmitted data volume reaches the threshold. The second roaming policy may include one or more of the following policies: the transmission rate of the electronic device is lower than the threshold, no BEACON frame is received from the network device, the signal strength of the accessed Wi-Fi network is lower than the threshold, the electronic device actively reconnects to the accessed Wi-Fi network, and a DEAUTH instruction is received.

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

[0087] As described above, in a scenario where a dual-band integrated router is deployed or two single-band routers are deployed, if the two different BSSIDs correspond to the same Wi-Fi network or the names and passwords of the Wi-Fi networks corresponding to the two different BSSIDs are the same, then, to ensure that the electronic device provides normal Internet access functions for the user, the electronic device may periodically monitor the currently accessed Wi-Fi network. For example, according to the Wi-Fi roaming policy configured by the electronic device, it is determined whether Wi-Fi roaming is required, that is, it is determined whether Wi-Fi roaming needs to occur between two different BSSIDs.

[0088] Exemplarily, it may be determined by the Wi-Fi chip of the electronic device whether Wi-Fi roaming needs to occur between two different BSSIDs according to the Wi-Fi roaming policy. In the case where the Wi-Fi chip determines that Wi-Fi roaming is required, the electronic device may perform a switch from one BSSID to another BSSID. In addition, the Wi-Fi chip may also report the event of Wi-Fi roaming to the processor of the electronic device.

[0089] In the case where the electronic device, such as the processor of the electronic device, monitors that the electronic device performs Wi-Fi roaming between two different BSSIDs, further, the electronic device, such as the processor of the electronic device, may determine whether an escape policy needs to be executed in the current scenario. For example, an escape policy may be executed when it is determined that the Wi-Fi roaming that occurs meets a preset condition. Specifically, the following may be executed: S304 - S305.

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

[0091] When it is determined that the electronic device has performed Wi-Fi roaming between two different BSSIDs, the electronic device can further determine whether the Wi-Fi roaming performed by the electronic device meets a preset condition. When the Wi-Fi roaming performed by the electronic device meets the preset condition, it can be considered that the electronic device is in a Wi-Fi roaming ping-pong scenario.

[0092] Among them, as an example, the above preset condition may include one or more of the following conditions: the number of times of Wi-Fi roaming performed by the electronic device between these two different BSSIDs is greater than a third threshold, and 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. In other words, when the Wi-Fi roaming performed by the electronic device between two different BSSIDs meets the above preset condition, it can be considered that the electronic device is in a Wi-Fi roaming ping-pong scenario that will affect the user's Internet access experience.

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

[0094] For example, as Figure 5 shown, taking the above preset condition including: the number of times of Wi-Fi roaming is greater than the third threshold, the time difference between the first occurrence of Wi-Fi roaming and the last occurrence of Wi-Fi roaming is less than the fourth threshold, the third threshold is 3, and the fourth threshold is 2 minutes as an example. When it is determined that the electronic device has performed Wi-Fi roaming between two different BSSIDs, the electronic device, such as the processor of the electronic device, can determine whether the number of times of Wi-Fi roaming between the two different BSSIDs is greater than 3, and determine whether the time difference between the first occurrence of Wi-Fi roaming and the last occurrence of Wi-Fi roaming is less than 2 minutes, that is, determine whether the electronic device has frequently performed Wi-Fi roaming between two different BSSIDs within two minutes. If the number of times of Wi-Fi roaming is greater than 3, and these three times of Wi-Fi roaming occur within 2 minutes, it indicates that the electronic device is in a Wi-Fi roaming ping-pong scenario and needs to trigger suppression, that is, execute an escape strategy. If the number of times of roaming is less than 3 or the time difference between the first occurrence of Wi-Fi roaming and the last occurrence of Wi-Fi roaming is greater than 2 minutes, it indicates that the electronic device is not in a Wi-Fi roaming ping-pong scenario and does not need to trigger suppression, that is, there is no need to execute an escape strategy.

[0095] After it is determined that the Wi-Fi roaming occurring in the electronic device meets the preset conditions, that is, it is determined that the electronic device is in a Wi-Fi roaming ping-pong scenario, the electronic device, such as the processor of the electronic device, can execute an escape strategy to reduce the frequency of Wi-Fi roaming occurrences. Exemplarily, after the Wi-Fi roaming ping-pong scenario appears, the electronic device can limit the frequency of Wi-Fi roaming occurrences by executing the escape strategy within a certain duration (such as called the escape duration) to ensure rationality.

[0096] The above escape duration can be the first escape duration in the embodiments of this application.

[0097] In some embodiments of this application, the first escape duration can be determined based on relevant information of historical escapes. Specifically, the determination method of the first escape duration is as follows: The electronic device, such as the processor of the electronic device, can obtain historical escape information, and then determine the first escape duration according to the historical escape information. Among them, the historical escape information can include: the reason for stopping the execution of the escape strategy last time and / or the timestamp of stopping the execution of the escape strategy last time.

[0098] Among them, the above reason for stopping the execution of the escape strategy last time can include normal stop and abnormal stop. Among them, when the reason for stopping the execution of the escape strategy last time is that the second escape duration is reached, it can be considered that the stop reason is normal. When the reason for stopping the execution of the escape strategy last time is that the second escape duration is not reached and an abnormal event is detected, it can be considered that the stop reason is abnormal. The second escape duration is the duration of the last execution of the escape strategy. The timestamp of stopping the execution of the escape strategy last time can be the specific time when the execution of the escape strategy was stopped last time.

[0099] The duration of this escape to be determined, that is, the first escape duration, is different for different historical escape information. That is, the duration of this escape to be required can be selected step by step according to the historical escape information.

[0100] Exemplarily, taking the historical escape information including the reason and timestamp for stopping the execution of the escape strategy last time as an example. When the reason for stopping the execution of the escape strategy last time is that the second escape duration is reached, that is, a normal stop, and the time difference between the timestamp of stopping the execution of the escape strategy last time and the current moment is less than the second threshold, the first escape duration can be determined as the first duration. When the reason for stopping the execution of the escape strategy last time is that the second escape duration is reached (i.e., a normal stop) and the time difference between the timestamp of stopping the execution of the escape strategy last time and the current moment is greater than the second threshold, or, when the reason for stopping the execution of the escape strategy last time is that an abnormal event is detected (i.e., an abnormal stop), the first escape duration can be determined as the second duration.

[0101] Among them, 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 above second threshold can be 1 hour, 1.5 hours, 2 hours, etc.

[0102] For example, as Figure 6 shown, taking the historical escape information including the reason for the last stop of the escape strategy execution and the timestamp of the last stop of the escape strategy execution, the second threshold is 2 hours, the first duration is 30 minutes, and the second duration is 5 minutes as an example. When the reason for the last stop of the escape strategy execution is normal stop and the time difference between the timestamp of the last stop of the escape strategy execution and the current moment is less than 2 hours, the first escape duration can be determined to be 30 minutes. When the reason for the last stop of the escape strategy execution is normal stop and the time difference between the timestamp of the last stop of the escape strategy execution and the current moment is greater than 2 hours, or when the reason for the last stop of the escape strategy execution is abnormal stop, the first escape duration is determined to be 5 minutes.

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

[0104] S305. The electronic device executes the escape strategy within the first escape duration.

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

[0106] The above execution of the escape strategy, that is, 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, and this tag is used to indicate that the roaming strategy is prohibited from being used. In this way, when the electronic device is connected to a Wi-Fi network, the electronic device only uses the untagged Wi-Fi roaming strategy to decide whether to trigger Wi-Fi roaming. That is to say, the electronic device only uses the second roaming strategy as the basis to decide whether to trigger Wi-Fi roaming, thereby reducing the frequency of Wi-Fi roaming and also ensuring the user's Internet experience. The specific implementation of the above execution of the escape strategy can also be to add the first roaming strategy to the blacklist. In this way, when the electronic device is connected to a Wi-Fi network, the electronic device can decide whether to trigger Wi-Fi roaming according to the Wi-Fi roaming strategy that is not added to the blacklist. Or the second roaming strategy can also be added to the whitelist. In this way, when the electronic device is connected to a Wi-Fi network, the electronic device can decide whether to trigger Wi-Fi roaming according to the Wi-Fi roaming strategy added to the whitelist.

[0107] The Bss Transition - management (BTM) is router - initiated. The so - called BTM means that the router triggers the need for a Wi - Fi roam of an electronic device. For example, in load balancing, when the Wi - Fi network on a BSSID is congested, the router will send a handover request caused by the load - balancing policy to the electronic device. Then, during the execution of the escape strategy, the electronic device can ignore the received handover request.

[0108] For example, take the escape strategy that includes prohibiting the electronic device from performing Wi - Fi roaming based on the first roaming strategy and not responding to the received handover request due to a predetermined reason, and the first escape duration is 30 minutes as an example. During this first escape duration, such as within 30 minutes, the electronic device only makes a decision on whether to trigger Wi - Fi roaming based on the second roaming strategy. Additionally, during the first escape duration, such as within 30 minutes, the electronic device does not respond to the received handover request due to a predetermined reason to prohibit Wi - Fi roaming.

[0109] When the conditions for stopping the execution of the escape strategy are met, the electronic device can stop executing the escape strategy. Among them, in some instances, the condition for stopping the execution of the escape strategy can be that the first escape duration has elapsed. That is, as shown Figure 7 After the first escape duration is reached, the electronic device, such as the processor of the electronic device, can stop executing the escape strategy, that is, resume using the first roaming strategy as the decision condition for determining whether Wi - Fi roaming is required, and / or allow responding to the handover request due to a predetermined reason.

[0110] Exemplarily, taking the first escape duration as the first duration, and the first duration is 30 minutes as an example, after 30 minutes from the start of the execution of the suppression, the execution of the escape strategy is stopped.

[0111] In other instances, the condition for stopping the execution of the escape strategy can also be that the first escape duration has not elapsed, but an abnormal event is detected. That is, when the first escape duration has not elapsed, but an abnormal event is detected, the electronic device, such as the processor of the electronic device, can stop executing the escape strategy. For example, the abnormal event can be that the electronic device disconnects from the Wi - Fi connection, or the signal quality of the Wi - Fi network accessed by the electronic device continuously drops below the first threshold within a preset duration.

[0112] It should be noted that the above S301 and S302 can be executed after determining the occurrence of the Wi - Fi roaming ping - pong scenario, or can be executed before determining the occurrence of the Wi - Fi roaming ping - pong scenario, and no specific limitation is made here.

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

[0114] The following combines Figure 8 , taking an electronic device including a ping-pong judgment module, an escape module, an escape stage selection module, and an escape execution module as an example, to exemplarily illustrate the Wi-Fi roaming control method provided by the embodiments of the present application.

[0115] In the case of successful Wi-Fi roaming, that is, when the electronic device switches from one BSSID to another BSSID, the ping-pong escape module can receive an instruction of successful Wi-Fi roaming. In response, the ping-pong judgment module can judge the current scenario, that is, identify whether it is a ping-pong scenario. For example, the ping-pong judgment module can judge whether there is frequent back-and-forth switching between two BSSIDs, and whether the number of switches meets a certain quantity (for example, the third threshold, such as 5 times). In the case of identifying a ping-pong scenario, the ping-pong judgment module sends the information identifying the ping-pong scenario to the escape module. Then, the escape module can further judge the time limit threshold, that is, the escape module can judge whether the ping-pong scenario appears within a predetermined time, such as whether the above-mentioned ping-pong scenario appears within 2 minutes. In the case of meeting the ping-pong scenario and meeting the threshold requirements, it is identified as a Wi-Fi roaming ping-pong scenario. When the escape module determines that the current is a Wi-Fi roaming ping-pong scenario, it obtains the escape duration from the escape phase selection module. For example, the escape module can send a request message to the escape phase selection module. After receiving the request message, the escape phase selection module can select the current escape duration according to the historical escape information. After determining the current escape duration, the escape phase selection module can return the escape duration to the escape module. Then, the escape module can trigger the escape execution module to execute the escape strategy. Among them, in the case where the escape execution module confirms that the escape strategy has been successfully started, it can return a confirmation execution result with a successful execution result to the escape module, so that the escape module can set the current escape timer based on this and start monitoring abnormal events. When 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 trigger the escape execution module to execute escape suppression removal. After the escape execution module successfully stops the escape suppression, it can also return an execution result confirming the successful stop of the escape suppression to the escape module. Then, all roaming strategies are restored.

[0116] The following is combined with Figure 9 to illustrate the Wi-Fi roaming control method provided by the embodiments of the present application.

[0117] For example Figure 9 As shown, the electronic device monitors whether Wi-Fi roaming occurs between two different BSSIDs. In the case of monitoring that Wi-Fi roaming occurs between two different BSSIDs, it is judged whether it is on the ping-pong path, or whether it switches back from the current BSSID to the previous BSSID. In the case of judging that it is not on the ping-pong path, continue to monitor whether Wi-Fi roaming occurs between two different BSSIDs.

[0118] When it is determined that the device is in the ping-pong path, the Wi-Fi roaming count can be incremented by one. It can be understood that the electronic device can count the number of times of switching back and forth between two different BSSIDs based on the listening result of the first step and the judgment result of the second step, that is, count the Wi-Fi roaming count.

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

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

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

[0122] If the device is not currently in Wi-Fi roaming escape, the electronic device can continue to determine whether the reason for stopping the execution of the escape strategy last time was that the escape duration reached, that is, whether the escape stopped after the normal timing ended last time.

[0123] If the reason for stopping the execution of the escape strategy last time was not that the escape duration reached, perform the first-stage escape, that is, select the escape duration for this time as the first duration, such as 30 minutes. If the reason for stopping the execution of the escape strategy last time was that the escape duration reached, continue to determine whether the timestamp of the last stop of the execution of the escape strategy is less than a threshold, such as 2 hours. If the timestamp of the last stop of the execution of the escape strategy is greater than the threshold, also perform the first-stage escape, that is, select the escape duration for this time as the first duration, such as 30 minutes. If the timestamp of the last stop of the execution of the escape strategy is less than the threshold, perform the second-stage escape, that is, select the escape duration for this time as the second duration, such as 5 minutes.

[0124] After that, the electronic device can set a timer based on the first duration or the second duration and start the timer. When the timer is started, an escape strategy is executed, such as prohibiting the electronic device from performing Wi-Fi roaming based on the first roaming strategy. And the electronic device can determine whether the timing time of the timer has arrived. When the timer has not arrived, the electronic device can also detect whether an abnormal event has occurred. When the timer arrives, or when an abnormal event is detected while the timer has not arrived, the execution of the escape strategy is stopped.

[0125] Some other embodiments of the present application provide a computer device, which can be the above-mentioned electronic device, for example, may include: 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 can execute each function or step performed in the above method embodiments. The structure of the electronic device can refer to Figure 2 the structure of the electronic device shown in the example of a mobile phone.

[0126] Embodiments of the present application also provide a chip system, as Figure 10 shown, 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 through a line. For example, the interface circuit 1002 can be used to receive signals from other devices (such as the memory of the 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 the 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 execute each step in the above embodiments. Of course, the chip system can also include other discrete devices, and the embodiments of the present application do not make specific limitations on this.

[0127] Embodiments of the present application also provide a computer storage medium, which includes computer instructions. When the computer instructions run on the above-mentioned electronic device, the electronic device is caused to execute each function or step performed by the electronic device in the above method embodiments.

[0128] Embodiments of the present application also provide a computer program product. When the computer program product runs on a computer, the computer is caused to execute each function or step performed by the electronic device in the above method embodiments.

[0129] 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 division of the above functional modules is used as an example. In actual applications, the above functions can be allocated to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0130] In several embodiments provided in this application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may 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 coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.

[0131] The unit described as a separated component may or may not be physically separated. The component displayed as a unit may be a physical unit or multiple physical units, that is, it can be located in one place, or it 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.

[0132] In addition, each functional unit in various embodiments of this application 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 integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0133] If the above 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 embodiments of this 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 described in various embodiments of this application. The foregoing storage medium includes: USB flash drive, mobile hard disk, read only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other various media that can store program codes.

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

Claims

1. A control method for Wi-Fi roaming, characterized in that, Applied to an electronic device that supports multiple Wi-Fi roaming policies, the electronic device is connected to a Wi-Fi network, and the method includes: 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 strategy is executed; Wherein, the escape strategy 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 execution of the escape strategy includes: Executing the escape strategy 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 strategy; or, in the case where the first escape duration is not reached but an abnormal event is detected, stop executing the escape strategy; the abnormal event includes one or more of the following events: the electronic device disconnects from the Wi-Fi connection, and the signal quality of the Wi-Fi network accessed by the electronic device continuously drops below a first threshold within a preset duration; In the case of stopping the execution of the escape strategy, 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, where the historical escape information includes: the reason for stopping the execution of the escape strategy last time and / or the timestamp of stopping the execution of the escape strategy last time; 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 stopping the execution of the escape strategy last time is that the second escape duration arrives, and the time difference between the timestamp of stopping the execution of the escape strategy last time 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 stopping the execution of the escape strategy last time is that the second escape duration arrives and the time difference between the timestamp of stopping the execution of the escape strategy last time and the current moment is greater than the second threshold, or, in the case where the reason for stopping the execution of the escape strategy last time is an abnormal event is detected, the first escape duration is a second duration; Wherein, the second escape duration is the duration of executing the escape strategy last time, 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 Wi-Fi roaming occurrences is greater than a third threshold; The time difference between the first Wi-Fi roaming occurrence and the last Wi-Fi roaming occurrence is less than a fourth threshold.

7. According to the method described in any one of claims 1-6, characterized in that, Before executing the escape strategy, 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, wherein 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 acknowledgment character ACK replied by the network device is not continuously received, the load is higher than the threshold, and the transmitted data volume reaches the 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 the threshold, the Wi-Fi network actively reconnected by the electronic device, and a passive deauthentication command 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.

Citation Information

Cited By

  • Wi-fi roaming control method, and electronic device and computer-readable storage medium

    WO2025148709A1