WIFI roaming control method, terminal device, communication apparatus, chip system, and computer readable storage medium

By judging the roaming type of SSID and prohibiting roaming scanning under the SSID, the power consumption and business lag caused by WIFI roaming are solved, and the energy efficiency and user experience of terminal devices are improved.

WO2025168042A1PCT designated stage Publication Date: 2025-08-14HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/076165
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-08
Filing Date
2025-02-07
Publication Date
2025-08-14

AI Technical Summary

Technical Problem

When terminal devices are roaming WIFI, frequent roaming scans lead to increased power consumption and service lag, and the prior art has failed to effectively solve this problem.

Method used

By judging the roaming type of SSID, the roaming scanning process under the non-roaming SSID is prohibited, and only roaming scanning is performed under the roaming SSID is performed to reduce the number of unnecessary roaming scanning times.

Benefits of technology

It reduces the power consumption of terminal devices, avoids business lag, and improves users' Internet access experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025076165_14082025_PF_FP_ABST
    Figure CN2025076165_14082025_PF_FP_ABST
Patent Text Reader

Abstract

A WiFi roaming control method, a terminal device, a communication apparatus, a chip system, and a computer readable storage medium, applied to the field of communications. The method comprises: a terminal device acquiring the roaming type of a connected first SSID, the first SSID belonging to a first AP; determining whether the first SSID is a roamable SSID; and when it is determined that the roaming type corresponding to the first SSID is a non-roamable SSID, prohibiting the execution of a roaming scanning process. On the basis of the roaming strategy, unnecessary roaming scanning can be reduced, thereby reducing power consumption of terminal devices, and reducing service stuttering.
Need to check novelty before this filing date? Find Prior Art

Description

Wi-Fi roaming control method, terminal equipment, communication device, chip system and computer-readable storage medium

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on February 8, 2024, with application number 202410179385.6 and application name “WIFI roaming control method, terminal equipment, communication device, chip system 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 communications, and in particular, to a method for controlling WIFI roaming, a terminal device, a communication apparatus, a chip system, and a computer-readable storage medium. Background Art

[0003] With the advancement of communication technology, multiple access points (APs) are typically deployed in enterprise and home networking scenarios to facilitate user access within the network coverage area. When a user's terminal device (such as a mobile phone) moves around and the signal quality of the AP it is currently connected to deteriorates, the terminal device typically uses wireless fidelity (Wi-Fi) roaming to switch to a network with better signal quality to ensure normal service. Wi-Fi roaming refers to the process of switching a terminal device between different APs.

[0004] When the signal quality of the connected AP is poor, the terminal device will trigger a roaming scan to find available hotspots nearby. This roaming scan results in high power consumption, so a solution is urgently needed to address this issue. Summary of the Invention

[0005] In view of this, the present application provides a Wi-Fi roaming control method, terminal device, communication device, chip system, computer-readable storage medium and computer program product, which, by prohibiting unnecessary Wi-Fi roaming, minimizes the number of roaming times of the terminal device, helps save the power consumption of the terminal device, reduces the impact on the terminal device's services, and thus improves the service experience of the terminal device.

[0006] In a first aspect, a method for controlling Wi-Fi roaming is provided, which may be executed by a terminal device, or by a component configured in the terminal device (such as a circuit, a chip, or a chip system, etc.), but is not limited in this application.

[0007] Specifically, the method includes: first, the terminal device has been connected to the first service set identifier SSID, and the first SSID belongs to the first access point AP; then, it can be determined whether the roaming type corresponding to the first SSID is a non-roaming SSID; finally, when the first SSID is a non-roaming SSID, the roaming scanning process is prohibited.

[0008] Based on the above technical solution, compared to the related art solution that initiates a roaming scan process as soon as roaming conditions are met (which results in higher power consumption of the terminal device), the terminal device in the embodiment of the present application prohibits the roaming scan process when roaming scan is not necessary, thereby reducing unnecessary roaming scans and helping to save power consumption of the terminal device. In other words, by pre-marking the roaming type of the SSID, the roaming scan process is avoided in scenarios where the roaming type is non-roaming SSID, effectively reducing the number of roaming scans.

[0009] Furthermore, compared to the related art in which the terminal device interrupts the connected AP after initiating the scanning process, the embodiment of the present application will not initiate a roaming scan when there is no need to perform a roaming scan, and will not interrupt the connected AP. This can avoid the following situation as much as possible: the terminal device's service freeze is further aggravated due to the underlying roaming scan, thereby improving the user's Internet experience.

[0010] This application aims to avoid the roaming scan process when the roaming type corresponding to the first SSID is a non-roaming SSID. Of course, if the roaming type corresponding to the first SSID is a roaming SSID, the roaming scan process is allowed. In the case where the first SSID is a roaming SSID, the roaming scan process is allowed.

[0011] Generally speaking, a terminal device may trigger a roaming scan process when a roaming condition is met. In an embodiment of the present application, optionally, when the roaming condition (used to trigger the terminal device to initiate the roaming scan process) is met, the terminal device determines the roaming type corresponding to the first SSID; then, based on the roaming type corresponding to the first SSID, determines a roaming scan policy, which refers to a policy that determines whether to prohibit the aforementioned roaming scan process.

[0012] The embodiments of the present application do not specifically limit roaming conditions. Roaming conditions may be conditions in related art that trigger a terminal device to perform a roaming scan process. For example, roaming conditions may include one or more of the following: the signal quality of the first AP is less than a preset threshold, the service packet error rate is greater than or equal to a packet error rate threshold, etc.

[0013] The terminal device includes a Wi-Fi chip. The Wi-Fi chip has a roaming mechanism, typically used to perform a roaming scan process when roaming conditions are met, to search for nearby roaming-enabled SSIDs. In one possible implementation, prohibiting the terminal device from performing roaming scans includes sending a prohibit roaming instruction to the Wi-Fi chip, thereby prohibiting the Wi-Fi chip from performing the roaming scan process. Therefore, the upper layer of the terminal device sends the prohibit roaming instruction to the lower layer, reducing network lag caused by the lower layer's roaming scan.

[0014] Wherein, SSID can be understood as the name of a physical entity AP. For example, the WIFI available list displayed in the WLAN interface of the terminal device may include multiple WIFI names, and the WIFI name presented to the user here can be understood as SSID.

[0015] The present application does not specifically limit the relationship between SSIDs and APs. The correspondence between SSIDs and APs can exist in the following three situations:

[0016] In case 1, one physical AP corresponds to one SSID, or it can be understood that there is a one-to-one correspondence between the SSID and the AP;

[0017] Case 2: Multiple physical APs correspond to the same SSID, or it can be understood that there is a one-to-many correspondence between SSID and AP;

[0018] In case 3, a physical AP supports signals of different frequency bands (for example, AP 2.4G and AP 5G). APs of different frequency bands correspond to the same SSID, or the relationship between SSID and AP is understood to be a many-to-one correspondence.

[0019] Generally speaking, determining whether an SSID is non-roamable can be determined by determining whether multiple BSSIDs exist under an SSID. In one possible implementation, the roaming type corresponding to the first SSID is non-roaming, specifically including: there are no multiple BSSIDs under the first SSID; in other words, a non-roaming SSID is when there is a single BSSID under the first SSID. Accordingly, the roaming type corresponding to the first SSID is roamable, specifically including: there are multiple BSSIDs under the first SSID; in other words, a roamable SSID is when there are multiple BSSIDs under the first SSID, for example, two or more BSSIDs.

[0020] The terminal device can pre-mark the roaming type of the SSID based on historical scanning results so that its roaming type can be used when connecting to the SSID.

[0021] The embodiment of the present application does not limit the manner in which the terminal device stores the SSID roaming type. Optionally, the terminal device may store the roaming type corresponding to each SSID in a roaming list.

[0022] Exemplarily, the roaming type corresponding to the first SSID of the terminal device includes: searching for the roaming type corresponding to the first SSID according to a roaming list, where the roaming list includes the roaming type and / or one or more BSSIDs corresponding to the first SSID. If the roaming type corresponding to the first SSID is a non-roaming SSID, the roaming list includes the following information related to the first SSID: a non-roaming SSID and a first BSSID (i.e., a BSSID under the first SSID to which the terminal device is connected); if the roaming type corresponding to the first SSID is a roaming SSID, the roaming list includes the following information related to the first SSID: a roaming SSID and two or more BSSIDs (i.e., BSSIDs to which the terminal device can roam).

[0023] It should be understood that the above description is based on the first SSID as an example, and the embodiments of the present application are not limited thereto. In fact, the roaming list may record roaming types corresponding to multiple SSIDs, and / or one or more BSSIDs corresponding to each SSID.

[0024] The embodiment of the present application does not specifically limit the method for determining the roaming list.

[0025] In one possible implementation, the method for determining the roaming list includes: performing N channel scans;

[0026] The roaming list is determined according to N channel scanning results, where the roaming list includes a roaming type corresponding to at least one SSID and / or one or more BSSIDs corresponding to at least one SSID; wherein N is a positive integer greater than zero.

[0027] The value of N is configurable. The embodiment of the present application does not impose any specific limitation on the value of N. For example, after 100 scans, a conclusion can be drawn as to whether the SSID is roamable.

[0028] Based on the above roaming list, the terminal device can quickly obtain the roaming type corresponding to the connected SSID, and then execute the corresponding roaming decision based on the roaming type.

[0029] The embodiments of the present application provide a further solution for situations where the SSID changes. Specifically, when the SSID (or AP name) changes or is updated, the roaming type corresponding to the SSID stored in the roaming list is also updated accordingly. Furthermore, one or more BSSIDs corresponding to the SSID may also be updated accordingly, allowing the terminal device to query the most recently updated roaming list, obtain the roaming type of the SSID, and perform the corresponding roaming behavior based on the most recently updated roaming type.

[0030] In a possible implementation, the method further includes: when the name of the first SSID changes, updating the roaming type corresponding to the first SSID.

[0031] Exemplarily, in response to the user's operation of updating the first SSID (or changing the name of the connected AP), the roaming type corresponding to the first SSID is updated.

[0032] It should be noted that when the name of the first SSID changes, the roaming type corresponding to the first SSID will not be immediately updated. Instead, the roaming type corresponding to the first SSID will be updated based on the channel scanning results when waiting for a service to trigger a channel scan.

[0033] Exemplarily, updating the roaming type corresponding to the first SSID includes: triggering a channel scan when executing the first service; and updating the roaming type corresponding to the first SSID according to a channel scan result after the channel scan is completed.

[0034] The embodiment of the present application does not limit the type of the first service. For example, the first service is a screen projection service, a collaborative sharing service, a service that calls the auxiliary positioning function of the WiFi function, a screen lighting service, etc.

[0035] Therefore, by triggering channel scanning when executing the first service, there is no need to specifically trigger channel scanning to update the roaming type when the first SSID changes, but it is updated while executing the first service, which helps to save power consumption of the terminal device.

[0036] Furthermore, when the roaming type of the first SSID changes, the roaming instruction may be updated accordingly. Optionally, the method further includes:

[0037] When determining that the roaming type corresponding to the first SSID is a non-roaming SSID, determining whether to issue a prohibition roaming instruction;

[0038] In a case where a roaming prohibition instruction has been issued, determining whether the roaming type corresponding to the first SSID is updated to a roaming SSID;

[0039] When the roaming type corresponding to the first SSID is updated to a roamable SSID, a roaming permission instruction is issued.

[0040] That is, if the roaming type of the first SSID is updated from a non-roaming SSID to a roaming SSID, it can also be determined whether a prohibit roaming instruction has been issued. If a prohibit roaming instruction has been issued, a permit roaming instruction can be issued to enable the terminal device to perform roaming switching if roaming is indeed required after the roaming type is updated.

[0041] Optionally, the method further includes: allowing the roaming scanning process to be executed when no roaming prohibition instruction is issued.

[0042] For an AP that supports dual frequency bands, the embodiment of the present application can update the roaming type of the SSID based on the relationship between the RSSI signal value and a preset threshold.

[0043] In some possible implementations, after performing a channel scan, the terminal device may determine whether multiple BSSIDs exist under the first SSID. If multiple SSIDs exist under the first SSID, the first SSID may be determined to be a roaming SSID. If the first SSID is not a roaming SSID, the roaming type may be further determined based on the frequency band and RSSI signal value.

[0044] Exemplarily, when there are no multiple BSSIDs (or there is one BSSID) under the first SSID, the method further includes:

[0045] determining whether the first SSID is in a first frequency band, where the coverage of the first frequency band is greater than the coverage of the second frequency band;

[0046] When the first SSID is in a first frequency band, determining a roaming type of the first SSID according to an RSSI value of the terminal device in the first frequency band;

[0047] When the first SSID is not in the first frequency band, the first SSID is determined to be a non-roaming SSID.

[0048] For example, the first frequency band is the 2.4G frequency band, and the second frequency band is the 5G frequency band.

[0049] Optionally, determining the roaming type of the first SSID according to the RSSI value of the terminal device in the first frequency band includes:

[0050] When the RSSI value is greater than or equal to a preset threshold, determining that the first SSID is a non-roaming SSID;

[0051] When the RSSI value is less than a preset threshold, the RSSI value is reacquired and judged until the RSSI value is greater than or equal to the preset threshold, the channel scanning process is re-executed, and the roaming type of the first SSID is determined based on the channel scanning result.

[0052] Therefore, when the terminal device determines that the RSSI value is less than the preset threshold, it does not draw a conclusion on the roaming type of the first SSID first, but waits for its RSSI value to become larger (for example, reaching the preset threshold) or the signal quality to become stronger, and then initiates channel scanning again before determining its roaming type, so that the roaming type of the first SSID can be updated based on the RSSI signal.

[0053] Optionally, the RSSI value being greater than or equal to the preset threshold includes: when the terminal device moves into the signal coverage range of the second frequency band, the RSSI value is greater than or equal to the preset threshold. Exemplarily, after the terminal device moves from the 2.4 GHz frequency band to the signal coverage range of the 5 GHz frequency band, the signal quality received by the terminal device becomes stronger, or in other words, the RSSI value is greater than the preset threshold.

[0054] Optionally, the above-mentioned terminal device re-executes the channel scanning process and determines the roaming type of the first AP based on the channel scanning results, including: determining whether there are multiple BSSIDs under the first SSID; when there are multiple BSSIDs under the first SSID, determining that the first SSID is a roamable SSID; when there is one BSSID under the first SSID, determining that the first SSID is a non-roaming SSID.

[0055] Therefore, when the terminal device re-executes the channel scan, the principle of determining the roaming type of the first SSID can be similar to the above, that is, by determining whether there are multiple BSSIDs under the first SSID, the roaming type of the first SSID can be determined so as to update the roaming type of the first SSID.

[0056] Based on the above description, the embodiment of the present application aims to avoid unnecessary roaming scanning. Of course, in the case where roaming scanning is allowed, roaming switching can be performed according to the roaming scanning process in the related art.

[0057] For example, if the roaming type corresponding to the first SSID is a roamable SSID, the method further includes: switching from the first BSSID to a second BSSID, where the second BSSID and the first BSSID have the same first SSID. The first BSSID is the first BSSID under the first SSID to which the terminal device is already connected.

[0058] In this way, when roaming switching is indeed necessary, the terminal device can roam from the first BSSID to the second BSSID, which can ensure the service of the terminal device and optimize the user experience.

[0059] The present embodiment of the application does not limit whether the physical entity corresponding to the switching target when a terminal device switches from a first BSSID to a second BSSID is the same physical entity. For example, the terminal device may switch from one physical entity to another; both physical entities correspond to the first SSID. For another example, the terminal device may switch from the SSID1_2.4G frequency band of the same physical entity to the SSID1_5G frequency band.

[0060] Optionally, in one possible implementation, if the roaming type corresponding to the first SSID is determined to be a non-roaming SSID, a handover scan is performed. That is, if the roaming type corresponding to the first SSID is a non-roaming SSID, the roaming scan process is prohibited, but the handover scan process is not affected. In this way, even if the quality of the network signal received by the terminal device deteriorates, or if the terminal device requires a Wi-Fi handover, the handover scan process can still be performed to initiate a Wi-Fi handover.

[0061] In a second aspect, a communication device is provided, comprising modules or units for executing the method in any possible implementation of the first aspect.

[0062] In one design, the communication device may include a module that executes the methods / operations / steps / actions described in each of the above aspects. The module may be a hardware circuit, software, or a combination of hardware circuit and software.

[0063] In one design, the communication device is a communication chip, which may include an input circuit or interface for sending information or data, and an output circuit or interface for receiving information or data.

[0064] In another design, the communication apparatus is a communication device, which may include a transmitter for sending information or data and a receiver for receiving information or data.

[0065] In another design, the communication device is used to execute the method in any possible implementation of the first aspect above. The communication device can be configured in the above-mentioned terminal device, or the communication device itself is the terminal device.

[0066] In a third aspect, a communication device is provided, comprising a processor. The processor is coupled to a memory and can be configured to execute instructions or data in the memory to implement the method of any possible implementation of the first aspect. Optionally, the communication device further comprises a memory. Optionally, the communication device further comprises a communication interface, the processor being coupled to the communication interface.

[0067] In one implementation, the communication interface may be a transceiver, or an input / output interface.

[0068] In another implementation, the communication device is a chip configured in a terminal device. When the communication device is a chip configured in a terminal device, the communication interface may be an input / output interface.

[0069] In a fourth aspect, a processor is provided, comprising: an input circuit, an output circuit, and a processing circuit. The processing circuit is configured to receive a signal through the input circuit and transmit a signal through the output circuit, so that the processor executes the method of any possible implementation of the first aspect.

[0070] In a specific implementation, the processor may be one or more chips, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a trigger, or various logic circuits. The input signal received by the input circuit may be, for example, but not limited to, received and input by a receiver, and the signal output by the output circuit may be, for example, but not limited to, output to and transmitted by a transmitter. The input circuit and the output circuit may be the same circuit, which functions as an input circuit and an output circuit at different times. The embodiments of the present application do not limit the specific implementation of the processor and various circuits.

[0071] In a fifth aspect, a communication device is provided, comprising a processor and a memory. The processor is configured to read instructions stored in the memory and receive signals via a receiver and transmit signals via a transmitter to execute the method of any possible implementation of the first aspect.

[0072] Optionally, there are one or more processors and one or more memories.

[0073] Optionally, the memory may be integrated with the processor, or the memory may be provided separately from the processor.

[0074] In the specific implementation process, the memory can be a non-transitory memory, such as a read-only memory (ROM), which can be integrated with the processor on the same chip or can be set on different chips. The embodiments of the present application do not limit the type of memory and the setting method of the memory and the processor.

[0075] It should be understood that related data interaction processes, such as sending indication information, can be the process of outputting indication information from the processor, and receiving capability information can be the process of receiving input capability information from the processor. Specifically, data output by the processor can be output to the transmitter, and input data received by the processor can be received from the receiver. The transmitter and receiver can be collectively referred to as a transceiver.

[0076] The processing device in the fifth aspect described above may be one or more chips. The processor in the processing device may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like; when implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated into the processor or located independently of the processor.

[0077] In a sixth aspect, a computer program product is provided, comprising: a computer program (also referred to as code, or instructions), which, when executed, enables a computer to execute a method in any possible implementation of the first aspect.

[0078] In the seventh aspect, a computer-readable storage medium is provided, which stores a computer program (also referred to as code, or instructions) which, when run on a computer, enables the computer to execute the method in any possible implementation of the first aspect above.

[0079] In an eighth aspect, embodiments of the present application provide a chip system comprising one or more processors configured to retrieve and execute instructions stored in a memory, thereby executing the method of any of the above aspects or any possible implementations of each aspect. The chip system may be composed of a chip or may include a chip and other discrete devices.

[0080] Among them, the chip system may include an input circuit or interface for sending information or data, and an output circuit or interface for receiving information or data.

[0081] In a ninth aspect, a communication system is provided, comprising the aforementioned terminal device and at least one access point (AP). Optionally, the communication system may further comprise other devices that communicate with the terminal device and / or the AP. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] FIG1A is a structural diagram of an electronic device according to an embodiment of the present application;

[0083] FIG1B shows a schematic block diagram of a software structure of an electronic device provided in an embodiment of the present application;

[0084] FIG1C shows another schematic block diagram of the software structure of an electronic device provided in an embodiment of the present application;

[0085] FIG2 is an example diagram of a WIFI list displayed on a terminal device according to an embodiment of the present application;

[0086] FIG3 is an example diagram of the relationship between the SSID and the AP according to an embodiment of the present application;

[0087] FIG4A is a diagram illustrating an example of a network using an embodiment of the present application;

[0088] FIG4B is another example diagram of a network using an embodiment of the present application;

[0089] FIG4C is another example diagram of a network using an embodiment of the present application;

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

[0091] FIG5B is another schematic flowchart of the WIFI roaming control method according to an embodiment of the present application;

[0092] FIG6A is a diagram illustrating an example of a network when two physical entity devices AP are far apart;

[0093] FIG6B is another schematic flowchart of the WIFI roaming control method according to an embodiment of the present application;

[0094] FIG7A is an example diagram of a scenario in which an AP name changes according to an embodiment of the present application;

[0095] FIG7B is an example flow chart of updating roaming types according to an embodiment of the present application;

[0096] FIG8A is an example diagram of a scenario in which a terminal device moves within the signal coverage of different frequency bands;

[0097] FIG8B is a flowchart illustrating an example of a method for determining a roaming type based on an RSSI signal according to an embodiment of the present application;

[0098] FIG9 is a schematic block diagram of a communication device provided in an embodiment of the present application;

[0099] FIG10 is another schematic block diagram of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0100] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

[0101] In the embodiments of the present application, “multiple” may be understood as “at least two”; “multiple items” may be understood as “at least two items”.

[0102] The technical solutions of the embodiments of the present application can be applied to various communication systems, such as: long term evolution (LTE) system, universal mobile telecommunication system (UMTS), world-wide interoperability for microwave access (WiMAX) communication system, fifth generation (5G) system or new radio (NR) and future mobile communication systems, vehicle-to-X (V2X), where V2X may include vehicle-to-network (V2N), vehicle-to-vehicle (V2V), vehicle-to-infrastructure (V2I), vehicle-to-pedestrian (V2P), etc., long term evolution technology for vehicle communication (LTE-V), Internet of Vehicles, machine type communication (MTC), Internet of Things (IoT), long term evolution technology for machine-to-machine communication (LTE-M), machine-to-machine (M2M), etc.

[0103] FIG1A shows a schematic structural diagram of an electronic device 1000 suitable for the present application.

[0104] The electronic device 1000 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0105] It should be noted that the structure shown in FIG1A does not constitute a specific limitation on the electronic device 1000. In other embodiments of the present application, the electronic device 1000 may include more or fewer components than those shown in FIG1A, or the electronic device 1000 may include a combination of some of the components shown in FIG1A, or the electronic device 1000 may include sub-components of some of the components shown in FIG1A. The components shown in FIG1A may be implemented in hardware, software, or a combination of software and hardware.

[0106] The processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: 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 a neural-network processing unit (NPU). The different processing units may be independent devices or integrated devices.

[0107] 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.

[0108] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0109] In some embodiments, the processor 110 may include one or more interfaces. For example, the processor 110 may include at least one of the following interfaces: a Wi-Fi chip 110-1, an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and a USB interface.

[0110] 1A is merely a schematic illustration and does not limit the connection relationship between the modules of the electronic device 1000. Alternatively, the modules of the electronic device 1000 may adopt a combination of the multiple connection modes described in the above embodiments.

[0111] The wireless communication function of the electronic device 1000 can be implemented through components such as the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.

[0112] Electronic device 1000 can implement display functions using a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0113] Display screen 194 can be used to display images or videos. Display screen 194 includes a display panel. The display panel can use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a mini light-emitting diode (Mini LED), a micro light-emitting diode (Micro LED), a micro OLED, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 1000 may include one or N display screens 194, where N is a positive integer greater than 1.

[0114] The electronic device 1000 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0115] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 1000 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0116] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and transformed into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

[0117] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0118] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device 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.

[0119] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied in electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0120] In some embodiments, the electronic device initiates or receives a call request via the mobile communication module 150 and the antenna 1 .

[0121] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 3, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive signals to be transmitted from the processor 110, frequency modulate them, amplify them, and convert them into electromagnetic waves for radiation through the antenna 2. In some embodiments, the wireless communication module 160 includes a WIFI chip 110-1. The WIFI chip 110-1 is used to perform a roaming scanning process. In an embodiment of the present application, when the roaming type corresponding to the first SSID to which the electronic device 1000 is connected is a non-roaming SSID, the WIFI chip 110 - 1 is prohibited from performing a roaming scanning process, which helps to save power consumption of the terminal device.

[0122] For example, the electronic device 1000 is already connected to a first service set identifier (SSID), which belongs to a first access point (AP). In some embodiments, the processor 110 is configured to, when a roaming condition is met, determine a roaming type corresponding to the first SSID, where the roaming condition is used to trigger the terminal device to initiate a roaming scan process; if the roaming type corresponding to the first SSID is a non-roaming SSID, prohibit the WIFI chip 110-1 from executing the roaming scan process; and if the roaming type corresponding to the first SSID is a roaming SSID, allow the WIFI chip 110-1 to execute the roaming scan process.

[0123] It should be noted that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 1000. In other embodiments of the present application, the electronic device 1000 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0124] It can be understood that the WIFI roaming control method of the embodiment of the present application can be applied to the electronic device shown in Figure 1A. For specific implementation steps, please refer to the introduction of the method embodiment below.

[0125] In addition, an operating system runs on the above components, such as the iOS operating system, the Android operating system, and the Windows operating system. Application programs can be installed and run on the operating system.

[0126] Taking the electronic device 1000 as an example of a terminal device, the software architecture of the terminal device is explained in conjunction with Figure 1B and Figure 1C. The terminal device may be the electronic device 1000 shown in Figure 1A. The software system of the terminal device may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes a software system with a layered architecture as an example to exemplify the software structure of the electronic device 1000. The block diagram shown in Figure 1B includes at least a software architecture block diagram of the terminal device. Figure 1B illustrates the software architecture of the electronic device 1000 shown in Figure 1A as an example, and Figure 1B shows a software structure block diagram of the electronic device of the embodiment of the present application. In addition, Figure 1B also shows the hardware layer of the terminal device and the first AP to which the first SSID to which the terminal device is connected.

[0127] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the driver layer.

[0128] The application layer may include a series of application packages. As shown in FIG1B , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, and the first application that triggers the first service.

[0129] It is understood that the first application can be a system application or a third-party application. For example, if the first application is a collaborative application, channel scanning can be initiated when a user triggers a shared service using the collaborative application. For another example, if the first application is an application that invokes a Wi-Fi positioning function, channel scanning can be initiated when the Wi-Fi positioning function is activated by the first application.

[0130] For a detailed description of the first service, please refer to the description in the embodiments below, which will not be repeated here.

[0131] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. As shown in Figure 1B, the application framework layer may include a switching module, a window manager, a content provider, a telephony manager, a resource manager, a notification manager, a view system, and so on.

[0132] The handover module is used to perform functions related to Wi-Fi handover. In this embodiment of the present application, when the terminal device is already connected to the first AP, the handover module is used to perform the handover scanning process related to switching networks. The handover module is independent of the roaming module in the driver layer; in other words, when a roaming prohibition instruction is issued, the roaming scanning process of the roaming module is prohibited, and the handover scanning process of the handover module is not involved.

[0133] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0134] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0135] The phone manager is used to provide communication functions for electronic devices, such as call status management (including answering, hanging up, etc.).

[0136] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0137] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0138] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0139] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0140] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0141] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0142] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0143] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG2, H.262, MP3, AAC, AMR, JPG, PNG, etc.

[0144] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing.

[0145] A 2D graphics engine is a drawing engine for 2D drawings.

[0146] The driver layer is the layer between hardware and software. It includes at least a roaming module, a display driver, a camera driver, an audio driver, and a sensor driver. The roaming module is responsible for executing the roaming scan process. For details on the roaming scan process, please refer to the description of channel scanning below. In this embodiment of the present application, if the roaming type of the first SSID is a non-roaming SSID, the roaming module is prohibited from executing the roaming scan process.

[0147] The hardware layer includes at least a WIFI chip, a display screen, a sensor, etc. The WIFI chip is used to perform functions related to WIFI roaming and / or WIFI switching.

[0148] For example, in an embodiment of the present application, when it is determined that the roaming type corresponding to the first SSID is a non-roaming SSID, a roaming prohibition instruction may be sent to the roaming module to prohibit the WIFI chip in the hardware layer from performing a roaming scanning process.

[0149] It should be understood that in the architecture shown in FIG1B , the roaming module is located in the driver layer, but the embodiments of the present application are not limited to this. In one possible implementation, the roaming module may also be located in the Wi-Fi chip, such as shown in FIG1C . The difference between FIG1C and FIG1B is that the roaming module is deployed in a different layer. It is understood that the description of other modules or software architectures involved in FIG1C can refer to the description of FIG1B and will not be repeated here.

[0150] It should be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to electronic devices based on operating systems such as iOS and Windows.

[0151] To facilitate understanding of the embodiments of the present application, a brief description of the terms used in the present application is provided before introducing the embodiments. It should be understood that the interpretation of some terms can also refer to the interpretation in the WIFI standard protocol.

[0152] 1. Wi-Fi roaming and Wi-Fi switching

[0153] The terminal device can move or switch between different access points AP to ensure the normal use of the service. The WIFI roaming in the embodiment of the present application refers to the roaming and switching of the terminal device between APs with the same name (or hotspots with the same name). APs with the same name can be understood as APs with the same WIFI name, which can be understood as the same service set identifier (SSID). In another embodiment, different APs have the same SSID, and switching between different APs with the same SSID is also called roaming; as shown in Figure 3, in another embodiment, switching between BSSIDs with the same SSID under the same AP is also called roaming. Of course, another prerequisite for roaming and switching between APs with the same name is that the APs with the same name also have the same password.

[0154] Wi-Fi handover refers to the handover between APs with different SSIDs, or the handover between different APs with different SSIDs.

[0155] 2. SSID

[0156] SSID can be understood as the name of a wireless network or router, which is used to identify a wireless network (for example, a wireless local area network (WLAN)). SSID is used to distinguish different networks.

[0157] It is understandable that when a user searches for available wireless networks nearby through a terminal device, the SSID is scanned, and a list of available wireless networks (or SSID list) is displayed on the interface of the terminal device for the user to select.

[0158] In this way, users can select the wireless network to connect to based on the SSID. For example, for enterprise networking, by setting a specific SSID for the enterprise's internal wireless network, only enterprise employees can access the network.

[0159] Furthermore, when setting up the SSID, a password can be set to protect the data security in the network. The present embodiment does not specifically limit the encryption method of the password. For example, the password can be encrypted using WPA2 (Wi-Fi Protected Access 2) encryption.

[0160] 3. Basic service set identifier (BSSID)

[0161] A BSSID is a unique identifier used to identify each access point in a wireless network. A BSSID can be thought of as a MAC address. Typically, multiple BSSIDs can exist under one SSID.

[0162] 4. Channel Scan

[0163] Terminal devices perform channel scanning, or Wi-Fi scanning, to discover nearby available networks. Channel scanning can be categorized as active scanning or passive scanning. The following briefly describes active and passive scanning.

[0164] When a terminal device initiates an active scan, the router device actively sends a request frame (for example, a Probe Request frame). These request frames are broadcast to all nearby visible APs. The AP sends a response frame (for example, a Probe Response frame) and provides network information in the response frame.

[0165] Exemplarily, active scanning may include the following four steps:

[0166] (1) The terminal device jumps to a certain channel and waits. After receiving an incoming frame indication or the ProbeDelay timer expires, if the terminal device receives a frame on this channel, it proves that the channel is in use by a user, so it can continue channel detection.

[0167] (2) The terminal device obtains the right to use the medium using the basic contention-based distributed coordination function (DCF) access process and sends a Probe Request frame.

[0168] (3) After sending the Probe Request frame, the terminal device waits for at least the minimum channel time (i.e., MinChannelTime) to wait for the Probe Response frame sent by the AP;

[0169] If the medium is very busy during the MinChannelTime period, it will continue to wait for a while until the longest channel time (ie, MaxChannelTime) times out, and then process the Probe Response frame.

[0170] (4) The terminal device switches to the next channel and repeats steps (1) to (3) until all preset channels are traversed.

[0171] For example, passive scanning includes the following two steps:

[0172] (1) When a terminal device stays on a certain channel and receives a Beacon frame sent by an AP, it believes that there is an available AP;

[0173] (2) The terminal device switches to the next channel and repeats step (1) until all preset channels are traversed.

[0174] However, whether it is an active scan or a passive scan, there will be situations where it is necessary to traverse channels. Currently, when a terminal device detects that the signal quality has deteriorated, it will start a roaming scan process to find out whether there are roamable hotspots around. In other words, since the terminal device does not know whether there are roaming hotspots around, the terminal device will trigger a roaming scan regardless of whether there are roaming hotspots around, which will result in higher power consumption. When the terminal device switches from the working channel to the scanning channel, it will not be able to interact with the router (or AP) through the working channel. In other words, the Internet access service of the terminal device will be affected at this time until the channel scan is completed. The condition for triggering roaming is often because the current signal strength or packet error rate has affected the Internet access service. Performing a channel scan will make the already slow Internet access experience even slower.

[0175] In view of this, an embodiment of the present application proposes a method and apparatus for controlling Wi-Fi roaming. A terminal device determines whether a roaming-capable SSID is roamable by obtaining the roaming type of a first SSID to which it is connected (for example, the first SSID belongs to a first AP). A roaming policy is then determined based on the roaming type, which is a policy for prohibiting the terminal device from performing roaming scans. Based on this roaming policy, the terminal device's roaming scan process is prohibited when roaming scans are unnecessary, thereby reducing unnecessary roaming scans and helping to save power consumption on the terminal device. Furthermore, the following situation can be avoided to the greatest extent possible: Service lag on the terminal device is further exacerbated due to underlying roaming scans.

[0176] For ease of understanding, the WIFI list displayed in the terminal device is first described in conjunction with Figure 2. It can be understood that the available WIFIs scanned by the terminal device can be displayed in the interface in the form of a WIFI list and presented to the user. For example, referring to Figure 2, two example diagrams of the WIFI list displayed in the terminal device are shown in Figure 2. As shown in the left figure in Figure 2, the interface 10 shows a situation where each SSID corresponds to a WIFI name. The available WLAN lists shown in the interface 10 are: Home (corresponding to SSID1), Neighbor 1 (corresponding to SSID2), Neighbor 2 (corresponding to SSID3) and Neighbor 3 (corresponding to SSID3). The four SSIDs shown in the interface 10 are all different. The terminal device is currently connected to a network named "Home".

[0177] As shown in the right image of Figure 2, the WIFI list shown in interface 11 includes cases where signals of different frequency bands share the same physical AP. For example, Home_2.4G and Home_5G are hotspots of different frequency bands under the same AP; in other words, the SSIDs of Home_2.4G and Home_5G are both SSID1. The available WLAN list shown in interface 11 is: Home_2.4G, Home_5G, Neighbor 1 (corresponding to SSID2), Neighbor 2 (corresponding to SSID3), and Neighbor 3 (corresponding to SSID3).

[0178] It should be understood that the example shown in FIG2 is only a common WLAN list, and the embodiments of the present application are not limited thereto. In fact, whether the WLAN list displayed in the terminal device interface presents multiple BSSIDs under the same SSID to the user may depend on the manufacturer's setting policy. For example, in the list of available WLANs displayed in the terminal device, multiple BSSIDs under the same SSID may also be presented to the user in the form of a list.

[0179] It is understandable that the actual networking and AP deployment scenarios are relatively flexible, and the correspondence between SSID and AP may exist in different situations. The embodiments of the present application are applicable to situations where the correspondence between SSID and AP exists in different situations. In other words, the embodiments of the present application do not specifically limit the correspondence between SSID and AP. For example, the correspondence between SSID and AP may exist in the following three situations:

[0180] In case 1, one physical AP corresponds to one SSID, or it can be understood that there is a one-to-one correspondence between the SSID and the AP;

[0181] Case 2: Multiple APs correspond to the same SSID, or it can be understood that there is a one-to-many correspondence between SSID and AP;

[0182] In case 3, a physical AP has signals of different frequency bands (for example, two virtual APs, AP2.4G and AP5G, exist under the same physical AP). APs of different frequency bands correspond to the same SSID, or the relationship between SSID and AP is understood to be a many-to-one correspondence.

[0183] For ease of understanding, the following description is provided in conjunction with Figure 3. As shown in Figure 3, for a one-to-one scenario, AP1 and AP2 each have corresponding SSIDs. For example, AP1 corresponds to SSID1, and AP2 corresponds to SSID2, meaning one physical entity AP corresponds to one SSID. For a one-to-many scenario, SSID1 corresponds to two physical entities (AP1 and AP2), meaning AP1 and AP2 have the same name, SSID1. For a many-to-one scenario, for the same physical entity AP, there are signals in different frequency bands, for example, a 2.4 GHz signal and a 5 GHz signal, both of which are named SSID1.

[0184] The following describes examples of application scenarios of embodiments of the present application in conjunction with Figures 4A to 4C.

[0185] Referring to FIG4A , FIG4A is a schematic diagram of the architecture of an enterprise network 100 used in an embodiment of the present application. The enterprise network 100 includes a network (or the Internet), access controllers (ACs) 1 and AC2), AP1, AP2, AP3, and terminal devices. In the enterprise network 100, AP1, AP2, and AP3 correspond to the same SSID (e.g., SSID1), or the names of these three physical entities are the same. Thus, when the terminal device moves along the trajectory shown in FIG4A , it can roam from AP1 to AP2 and from AP2 to AP3 in sequence.

[0186] The roaming shown in Figure 4A is roaming between different router devices. The embodiment of the present application can also be applied to roaming of different frequency band signals within the same physical entity (or the same router device). Refer to Figure 4B, which is an example diagram of the architecture of the home network 200 applied in the embodiment of the present application. As shown in Figure 4B, the home network 200 includes: a physical entity AP, which has the function of dual-band integration. SSID1_2.4G can be understood as the 2.4G frequency band signal corresponding to the physical entity AP; SSID1_5G can be understood as the 5G frequency band signal corresponding to the physical entity AP. For example, SSID1_2.4G corresponds to BSSID1; SSID1_5G corresponds to BSSID2. BSSID1 and BSSID2 are different BSSIDs under SSID1. The terminal device can roam from SSID1_2.4G to SSID1_5G within the signal coverage range of the 5G frequency band.

[0187] The roaming shown in Figure 4C includes not only roaming between different router devices, but also roaming between different frequency band signals within the same router device. Referring to Figure 4C , Figure 4C is an example diagram of the architecture of a home network 300 used in an embodiment of the present application. As shown in Figure 4C , the home network 300 includes two physical APs (or routers). Each physical AP has dual-band unification functionality.

[0188] For example, SSID1_2.4G of physical entity AP1 corresponds to BSSID1; SSID1_5G of physical entity AP1 corresponds to BSSID2; SSID1_2.4G of physical entity AP2 corresponds to BSSID3; and SSID1_5G of physical entity AP2 corresponds to BSSID4. BSSID1, BSSID2, BSSID3, and BSSID4 are different BSSIDs under SSID1. In Figure 4C, SSID1_2.4G of physical entity AP1, SSID1_2.4G of physical entity AP2, SSID1_2.4G of physical entity AP2, and SSID1_5G of physical entity AP2 are hotspots with the same name. Terminal devices can roam and switch between these hotspots.

[0189] It should be understood that Figures 4A to 4C only illustrate the architecture of an enterprise network or a home network. The above network may also include other network devices, such as other routing and forwarding devices, etc., which are not shown in the figures. The embodiments of the present application do not limit the number of devices included in the mobile communication system.

[0190] It should also be understood that the above description is only based on the scenarios in Figures 4A to 4C as an example, and the embodiments of the present application are not limited to this.

[0191] The terminal device of the embodiment of the present application may also be referred to as: station, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent or user device, etc.

[0192] The terminal device may be a device that provides voice / data connectivity to users, such as a handheld device or vehicle-mounted device with wireless connection function. At present, some examples of terminals include: mobile phones, tablet computers, laptop computers, PDAs, mobile internet devices (MIDs), wearable devices, virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals equipped with cloud games, wireless terminals in self-driving cars, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to wireless modems, vehicle-mounted devices, wearable devices, terminal devices in 5G networks or future evolved public land mobile communication networks (PLMNs). The terminal equipment in the network (PLMN), etc., is not limited to this in the embodiments of the present application.

[0193] As an example and not a limitation, in the embodiment of the present application, the terminal device may also be a wearable device. Wearable devices may also be called wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.

[0194] In addition, in the embodiments of the present application, the terminal device may also be a terminal device in the Internet of Things (IoT) system. The IoT is an important component of the future development of information technology. Its main technical feature is to connect objects to the network through communication technology, thereby realizing an intelligent network that interconnects people and machines and things. The embodiments of the present application do not limit the specific technology and specific device form used by the terminal device.

[0195] In an embodiment of the present application, a terminal device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software. In addition, the embodiment of the present application does not specifically limit the specific structure of the execution subject of the method provided in the embodiment of the present application. As long as it is possible to communicate according to the method provided in the embodiment of the present application by running a program that records the code of the method provided in the embodiment of the present application, for example, the execution subject of the method provided in the embodiment of the present application can be a terminal device, or a functional module in the terminal device that can call a program and execute the program.

[0196] In addition, various aspects or features of the present application can be implemented as methods, devices or products using standard programming and / or engineering techniques. The term "product" as used in this application covers computer programs that can be accessed from any computer-readable device, carrier or medium. For example, computer-readable storage media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or magnetic tapes, etc.), optical disks (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memories (EPROMs), cards, sticks or key drives, etc.). In addition, the various storage media described herein may represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.

[0197] Referring to Figure 5A, Figure 5A is an example flow chart of a method for controlling Wi-Fi roaming provided in an embodiment of the present application. It is understood that the terminal device involved in Figure 5A can be the terminal device in Figure 4A (for example, the terminal device) or the terminal device in Figure 4B or the terminal device in Figure 4C, or can also refer to a device in the terminal device (for example, a processor, a chip, or a chip system, etc.). As shown in Figure 5A, at least the following steps are included:

[0198] In step 201, a terminal device has connected to a first SSID, where the first SSID belongs to a first AP.

[0199] Exemplarily, the terminal device has been connected to the first BSSID under the first SSID.

[0200] Optionally, the first AP may include signals of two different frequency bands. For example, the first AP includes AP2.4G and AP5G. The SSIDs of AP2.4G and AP5G are the same, and the terminal device can be connected to AP2.4G.

[0201] Step 202: The terminal device determines whether the first SSID (corresponding roaming type) is a non-roaming SSID.

[0202] In an embodiment of the present application, when the roaming conditions are met, the terminal device first determines the roaming type corresponding to the first SSID, and then decides whether to trigger the roaming scan process.

[0203] The roaming condition is used to trigger the terminal device to initiate a roaming scan process. The embodiment of the present application does not specifically limit the roaming condition. For example, the roaming condition includes one or more of the following: the received signal strength indication (RSSI) signal quality of the first AP is less than a preset threshold, and the service packet error rate is greater than or equal to the packet error rate threshold.

[0204] Optionally, the terminal device may obtain the roaming type of the currently connected SSID by querying a locally stored roaming list.

[0205] It will be understood that the embodiments of the present application do not impose any specific limitation on the type of roaming list stored locally on the terminal device.

[0206] Exemplarily, the type of the roaming list may be recorded in the terminal device in the form of a mapping table (map).

[0207] The embodiments of the present application do not specifically limit the information included in the roaming list. Optionally, the roaming list includes the roaming type corresponding to one or more SSIDs (for example, a flag can be used to indicate whether roaming is possible). Furthermore, for SSIDs whose roaming type is roamable, the roaming list may also include the MAC address of the roaming target (or BSSID that can be roamed to). The following table 1 shows an example:

[0208] Table 1

[0209] As shown in Table 1 above, if the first SSID is a non-roaming SSID, it means that there is only one BSSID under the first SSID, and there are no other BSSIDs, or BSSIDs that can be roamed to; if the second SSID is a roaming SSID, it means that there are multiple BSSIDs (or 2 or more BSSIDs) under the second SSID, for example, BSSID1, BSSID2, BSSID3... and so on.

[0210] It should be understood that the examples in Table 1 above do not limit the embodiments of the present application. In fact, Table 1 may include more roaming types corresponding to SSIDs and corresponding BSSIDs.

[0211] It should also be understood that the last column in Table 1 can also be replaced with "BSSIDs that can be roamed to," excluding the BSSID to which the terminal device is currently connected. In this case, for an SSID marked as non-roamable, this column is empty and does not include BSSID1, to which the terminal device is currently connected. For an SSID marked as roamable, this column includes multiple BSSIDs that can be roamed to. For example, the multiple BSSIDs that can be roamed to for the second SSID include BSSID2 and BSSID3.

[0212] It should also be understood that the content stored in the roaming list can be dynamically updated or adjusted, that is, it is not static. Different implementations of updating the roaming list will be described later.

[0213] In step 203, when the first SSID is a non-roaming SSID, the terminal device is prohibited from initiating a roaming process or prohibiting from executing a roaming scanning process.

[0214] Exemplarily, prohibiting the terminal device from initiating a roaming process specifically includes: prohibiting a roaming module in the terminal device from initiating a roaming scan.

[0215] The present embodiment does not specifically limit the deployment location of the roaming module; the specific deployment location may depend on the chip strategy. In one implementation, as shown in Figure 1B above, the roaming module can be located at the driver layer. In another implementation, as shown in Figure 1C above, the roaming module can be deployed in the Wi-Fi chip.

[0216] It should be noted that a handover module may also be provided in the terminal device, and the handover module is used to perform scanning processes related to Wi-Fi handover. The handover module is a different module from the aforementioned roaming module, and the two are independently deployed, or in other words, the processes of the two are independent of each other, and each performs its own corresponding function. In other words, when the roaming module is prohibited from initiating a roaming scan, the prohibition of roaming instruction sent by the upper layer to the roaming module only prohibits the channel scanning process of the roaming module and does not affect the scanning process of the handover module. In other words, the prohibition of roaming instruction sent by the upper layer is not sent to the handover module.

[0217] Optionally, the switching module can be deployed in the system framework layer of the terminal device, as shown in Figure 1B or 1C above.

[0218] It is understood that in related roaming technologies, roaming scans are triggered when roaming conditions are met. Typically, for example, a scan is triggered when the signal is poor. That is, as long as the signal reaches a poor threshold, a roaming scan is triggered. If the terminal device detects that the signal meets the scan threshold, roaming scans are frequently triggered. However, after adopting the technical solution of the embodiment of the present application, the terminal device will prohibit the roaming scan process after knowing in advance that the SSID it is connected to is not roaming. In other words, if it is known in advance that there are no roaming hotspots nearby, the aforementioned frequent roaming scan process can be omitted, and there is no need to trigger roaming scans, which greatly saves the power consumption of the terminal device.

[0219] Optionally, the terminal device includes a Wi-Fi chip, which is used to implement roaming handover. "The terminal device prohibits initiating roaming" can be understood as the upper layer of the terminal device sending a prohibit roaming command to the Wi-Fi chip driver (such as a roaming module) to prohibit the roaming process from the bottom layer. In other words, even if roaming conditions are met, the Wi-Fi chip will not perform roaming scanning.

[0220] In some embodiments, when the roaming type of the first SSID is a non-roaming SSID, the roaming policy is to prohibit the terminal device from initiating a roaming scan, or in other words, when the terminal device is connected to an SSID marked as a "non-roaming SSID", the terminal device is not allowed to initiate a roaming scan.

[0221] In step 204, if the first SSID is a roaming SSID, the terminal device allows the roaming scanning process to be performed. The scanning specifically refers to channel scanning. The channel scanning process can be referred to the above description and will not be repeated here.

[0222] If the roaming type of the first SSID is set to "roamable," the roaming policy allows roaming scans. Specifically, when a terminal device connects to an SSID marked "roamable," roaming scans are enabled by default. "No action on the terminal device" means roaming is enabled by default, or the existing method is used. Even if signal quality is poor, a roaming scan is still initiated.

[0223] Optionally, when the first SSID is a roamable SSID, the terminal device switches from the first BSSID to a second BSSID, and the second BSSID has the same first SSID as the first BSSID.

[0224] In this way, when roaming switching is really necessary, the terminal device can roam from the first BSSID to the second BSSID, which can ensure the service of the terminal device and optimize the user experience. Among them, the first BSSID and the second BSSID have the same SSID (such as the first SSID), or have the same WIFI name. In other words, the first BSSID and the second BSSID are different BSSIDs under the same SSID.

[0225] In the embodiments of the present application, "roaming" refers to the mutual roaming switching between hotspots with the same name. Hotspots with the same name can be understood as APs with the same name. In some embodiments, hotspots with the same name refer to hotspots corresponding to different BSSIDs under the same SSID. Among them, one SSID can correspond to multiple BSSIDs. SSID can also be understood as a WIFI name, such as the name in the available WIFI list displayed in the interface on the mobile phone side, such as the WIFI list shown in Figure 2. BSSID can be understood as a physical name, such as a MAC address.

[0226] For example, in a certain network, a terminal device establishes a wireless connection with physical entity AP1 for service. Physical entity AP1 is named SSID1. The terminal device connects to BSSID1 under that SSID. Another physical entity, AP2, is also named SSID1. These two physical entities, AP1 and AP2, can be understood as hotspots with the same name, or as corresponding to different BSSIDs under the same SSID. Terminal devices can roam from physical entity AP1 to physical entity AP2.

[0227] It should be understood that the embodiments of the present application do not specifically limit the situations where roaming is indeed required. For example, as the terminal device moves from the coverage of the 5G frequency band of the same physical entity AP to the coverage of the 2.4G frequency band, the signal quality of the currently connected 5G frequency band has deteriorated, and the terminal device will automatically switch to the 2.4G frequency band. For another example, in the case of a preferred 5G network, or when certain services need to be performed in the 5G frequency band, the terminal device is connected to the 2.4G frequency band, which cannot meet the business needs of the terminal device, and the terminal device will automatically roam to the 5G frequency band.

[0228] In an embodiment of the present application, the terminal device decides whether to prohibit roaming by obtaining the roaming type of the first SSID to which it has been connected. When the first SSID is a non-roaming SSID, the terminal device is not allowed to initiate roaming. Compared with the solution in the related art that the terminal device triggers a scanning process to find out whether there are roamable hotspots around when the roaming conditions are met (for example, the network signal quality deteriorates, or the packet error rate is very high), the embodiment of the present application decides whether to initiate roaming by pre-marking the roaming type; if the first SSID is marked as a non-roaming SSID, the scanning process is not allowed to be initiated for roaming switching, thereby reducing unnecessary roaming scans and helping to save power consumption of the terminal device.

[0229] Moreover, compared to the related art in which the terminal device interrupts the connected AP after initiating the scanning process, the embodiment of the present application will not initiate a roaming scan when there is no need to perform a roaming scan, and will not interrupt the already connected first SSID. This can avoid the following situation as much as possible: the terminal device's service freeze is further aggravated due to the underlying roaming scan, thereby improving the user's Internet experience.

[0230] Figure 5B shows another schematic flow chart of the Wi-Fi roaming control method provided in an embodiment of the present application. Figure 5B differs from Figure 5A in that it includes not only steps 201 to 204 but also step 205. For the description of steps 201 to 204, please refer to the description of Figure 5A above. For the sake of brevity, these steps are not repeated here.

[0231] Step 205: The terminal device allows the handover scanning process to be performed.

[0232] Step 205 is introduced to illustrate that when the roaming type corresponding to the first SSID is non-roaming, the roaming scan process is disabled, but the handover scan process is not affected. Furthermore, in a specific implementation, the roaming scan process and the handover scan process are performed by different modules and do not affect each other. For example, please refer to the explanation of the roaming module and the handover module described in step 203 above.

[0233] In the embodiment of the present application, when it is determined that the roaming type corresponding to the first SSID is a non-roaming SSID, the terminal device is prohibited from executing the roaming scanning process, but it will not affect the switching scanning process, that is, the switching scanning process will be allowed to be executed. In this way, when the quality of the network signal received by the terminal device deteriorates, or when the terminal device has other situations where it is required to perform WIFI switching, the switching scanning process can still be executed to initiate WIFI switching. For the description of WIFI switching, please refer to the previous description, which will not be repeated here. In addition, the essence of switching scanning is also to perform channel scanning. For details, please refer to the previous active scanning and passive scanning processes, which will not be repeated here.

[0234] Based on the process shown in FIG5B , even if the terminal device prohibits the execution of the roaming scanning process, it can still execute the switching scanning process so as to execute the WIFI switching when necessary, which helps to improve the user's Internet experience.

[0235] In the embodiments of the present application, there are multiple implementations for determining the roaming type of an SSID, or in other words, for determining the aforementioned roaming list. The following describes different implementations of determining the roaming type of an SSID provided by a terminal device in the embodiments of the present application, using the first SSID as an example. It should be understood that the following three implementations can be implemented individually or in combination, and are not specifically limited in the embodiments of the present application.

[0236] Method 1: The terminal device determines whether the first SSID is roamable based on historical scanning results.

[0237] The historical scan result can be understood as the result obtained by the terminal device initiating a channel scan before connecting to the first SSID. Optionally, the historical scan result is the scan result obtained by the terminal device performing N scans, where N is an integer greater than or equal to 1.

[0238] Optionally, during the nth scan of N times, the terminal device detects multiple BSSIDs under the first SSID. The terminal device records the scan result, for example, the number of BSSIDs under the first SSID. After N scans, the roaming type of the first SSID can be finally determined based on the N scans.

[0239] By querying historical scan results, the terminal device can determine whether the first SSID is a roamable SSID. If there are multiple ("multiple" is understood to mean "more than two") BSSIDs under the first SSID, or if there is a roamable hotspot for the first SSID, then the first SSID is determined to be a "roamable SSID." If there are not multiple BSSIDs under the first AP's SSID (for example, there is only one BSSID), or if there is no roaming hotspot for the first SSID, then the first SSID is determined to be a "non-roamable SSID."

[0240] The number N is configurable. The embodiment of the present application does not specifically limit the value of N. For example, N is 10. For another example, N is 100.

[0241] The process of the terminal device performing N scans can be understood as a process of learning a roaming list. Generally speaking, for a fixed network environment, the roaming type of the hotspot can be obtained by scanning N times.

[0242] For example, in a home network, a terminal device typically connects to the same hotspot more than once. During each channel scan, the terminal device obtains information such as the signal quality and BSSID of each hotspot. After accumulating this information multiple times, it can determine whether a particular SSID is non-roamable.

[0243] In conjunction with the application scenario shown in FIG4C , a user carrying a terminal device in home network 300 may move from the first floor to the second floor, or from the second floor to the first floor. For example, the terminal device is already connected to physical entity AP1 on the first floor, named SSID1. During the process of moving from the first floor to the second floor, the terminal device may scan SSID1_2.4G and SSID1_5G under physical entity AP1, named SSID1, as well as SSID1_2.4G and SSID1_5G under physical entity AP2, named SSID1. These hotspots are all named SSID1. Based on the results of N scans, the terminal device can determine that the roaming type of SSID1 is a roamable SSID.

[0244] It should be understood that FIG4C shows the movement of a terminal device within the signal coverage of two physical entity APs, but the embodiments of the present application are not limited thereto.

[0245] It is understood that during the N-times scan process, the roaming type of the SSID may be updated based on the latest scan results. For example, a certain SSID may be a "non-roaming SSID" type during the first scan, but if multiple BSSIDs are found under the same SSID during the next or subsequent scan, the roaming type of the SSID will be recorded as a "roaming SSID."

[0246] The aforementioned Figure 4C shows a situation where the terminal device can connect to two physical entity APs regardless of whether it is on the first or second floor. However, in reality, there may be a situation where the distance between the two physical entity APs is relatively far, resulting in the terminal device being unable to scan the other physical entity AP after connecting to one physical entity AP after N scans. The following is an example diagram of another home network 400 in conjunction with Figure 6A. As shown in Figure 6A, in the home network 400, it can be seen that the distance between the two physical entities is relatively far, and there is no overlapping area in the signal coverage. When the current terminal device is connected to the physical entity AP on the first floor, even after N channel scans, it fails to scan the physical entity AP on the second floor. At this time, in the N historical scan records of the terminal device, there is no BSSID corresponding to the physical entity AP on the second floor, even if the physical entity AP on the first floor and the physical entity AP on the second floor use the same SSID.

[0247] In addition, since the physical entity AP on the second floor is not scanned after N scans, even if the terminal device moves from the coverage area of ​​the physical entity AP on the first floor to the coverage area of ​​the physical entity AP on the second floor, and switches to the BSSID of the physical entity AP on the second floor, even if the AP on the first floor and the AP on the second floor use the same SSID, the switching process cannot be called roaming switching, but should be understood as the process of "interrupting the connection with the AP on the first floor and reconnecting to the AP network on the second floor."

[0248] Referring to Figure 6B , which illustrates an example flow chart for updating the roaming type of the first SSID, it is understood that the terminal device referred to in Figure 6B may be the terminal device (e.g., terminal device) in Figure 4A , the terminal device in Figure 4B , or the terminal device in Figure 4C , or may also refer to a device in the terminal device (e.g., a processor, chip, or chip system, etc.).

[0249] As shown in FIG6B , the method includes at least the following steps:

[0250] Step 301: The terminal device triggers a channel scan (or a full channel scan).

[0251] The embodiment of the present application does not limit the specific service that triggers the channel scan. Optionally, when the terminal device executes the first service, the full channel scan is triggered.

[0252] The first service may be a service involving the use of WIFI or calling certain functions of WIFI. In short, the first service can trigger the terminal device to perform channel scanning. The embodiment of the present application does not specifically limit the type of the first service. For example, the first service is a sharing service, a collaborative service, or a screen projection service. For another example, the first service calls the WIFI assisted positioning function. For another example, the user enters the settings page to update the WIFI list and search for WIFI.

[0253] The channel scanning process can be referred to the previous description, and for the sake of brevity, it will not be repeated here.

[0254] Taking neighbor 1 shown in the list of Figure 2 as an example, the terminal device determines the roaming type corresponding to neighbor 1 or SSID2 by performing N channel scans, and stores the roaming type corresponding to SSID2 and the corresponding BSSID for subsequent use.

[0255] It should be noted that in the embodiment of the present application, for each WIFI name shown in the interface of Figure 2 above, the terminal device can judge and mark it during the channel scanning process, and store the obtained results in the above roaming list.

[0256] Step 302: The terminal device determines whether the first SSID is a roaming SSID.

[0257] If the judgment result of step 302 is “yes”, step 304 is executed; if the judgment result of step 302 is “no”, step 303 is executed.

[0258] Step 303: The terminal device determines whether there are multiple BSSIDs under the first SSID that has been connected in the current scanning result.

[0259] If the judgment result of step 303 is “yes”, step 304 is executed; if the judgment result of step 303 is “no”, step 305 is executed.

[0260] Step 304: The terminal device updates the first SSID to a "roaming SSID".

[0261] Step 305: The terminal device determines that the first SSID is a "non-roaming SSID".

[0262] It should be understood that what is shown in FIG. 6B is one of N scanning processes, and the embodiments of the present application are not limited thereto.

[0263] It should also be understood that if no roaming hotspot is found under the first SSID after N scans, it can be considered that no roaming hotspot exists under the first SSID.

[0264] In the second method, when the name of the first SSID changes, the terminal device triggers channel scanning when executing the first service and updates the roaming type of the first SSID.

[0265] Among them, the change of the first SSID can also be understood as a change in the AP name. The embodiment of the present application does not limit the triggering conditions for the change of the SSID. For example, the user may manually modify the WiFi name of a certain AP, thereby causing the AP's SSID to change. For another example, the WiFi name or SSID of the AP may be refreshed when the device is reset in the background or the network is configured, thereby causing the AP's SSID to change. For another example, the first service may trigger a channel scan, and the roaming type of the SSID may be updated based on the channel scan results.

[0266] It should be noted that a change in the AP name (or SSID) does not trigger the terminal device to update the SSID roaming type. Instead, a channel scan is triggered when the terminal device executes the first service. After the channel scan is performed, the roaming list can be updated, that is, the roaming type of the SSID involved in the name change can be changed or updated.

[0267] Since the embodiment of the present application is aimed at switching between hotspots with the same name, if the first SSID (or AP name) changes, the roaming type of the first SSID may change. Therefore, when a channel scan is triggered, the terminal device can update the roaming type of the first SSID involved.

[0268] For example, as shown in Figure 7A, the terminal device establishes a connection with the physical entity AP2 named SSID2. When the terminal device moves to another hotspot coverage area, that is, the coverage area of ​​the physical entity AP1 named SSID1, because the two are named differently, or the SSIDs are different, the terminal device cannot roam to the physical entity AP1 named SSID1 to conduct business. Accordingly, the roaming type of SSID2 recorded in the roaming list is "non-roaming". However, if the user changes SSID2 to SSID1, the modified name is the same as SSID1. When the terminal device triggers a collaborative service, it can trigger a channel scan and update the roaming type of the physical entity AP2 named SSID2 to "roamable". If the terminal device moves to the coverage area of ​​the physical entity AP1 named SSID1 on the left side of the figure, it can roam to AP (SSID1) to conduct business.

[0269] It should be noted that the example shown in FIG7A is only a case of updating the roaming type from "non-roaming" to "roaming", and the embodiments of the present application are not limited thereto. For example, the embodiments of the present application can also be applied to the case of updating the roaming type from "roaming" to "non-roaming".

[0270] In some embodiments, after the roaming type is updated, the terminal device may re-issue the corresponding roaming instruction to update the roaming policy.

[0271] For example, after the terminal device has determined that the first SSID is a non-roaming SSID and issued a prohibition roaming instruction, if the first SSID is updated to a roaming SSID through other scanning results, the terminal device re-issues a permission roaming instruction.

[0272] Referring to Figure 7B , Figure 7B shows an example flow chart when the roaming type of the first SSID is updated. It is understood that the terminal device involved in Figure 7B can be the terminal device (e.g., terminal device) in Figure 4A , or the terminal device in Figure 4B , or the terminal device in Figure 4C , or can also refer to a device in the terminal device (e.g., a processor, chip, or chip system, etc.). As shown in Figure 7B , at least the following steps are included:

[0273] Step 401: The terminal device has connected to the first SSID.

[0274] Step 402: The terminal device determines whether the first SSID is a non-roaming SSID.

[0275] If the judgment result of step 402 is “yes”, step 403 is executed; if the judgment result of step 402 is “no”, step 406 is executed.

[0276] Step 403: The terminal device determines whether a prohibition of roaming instruction has been issued.

[0277] If the judgment result of step 403 is “yes”, step 404 is executed; if the judgment result of step 403 is “no”, step 406 is executed.

[0278] Step 404: The terminal device determines whether the roaming type of the first SSID is updated to a roamable SSID.

[0279] If the judgment result of step 404 is "yes", step 405 is executed; if the judgment result of step 404 is "no", step 407 is executed, and no roaming permission instruction is issued, that is, execution is still performed based on the previous roaming type.

[0280] Exemplarily, after the name of the SSID changes or channel scanning is triggered in other ways, the roaming type of the first SSID is updated.

[0281] Step 405: The terminal device sends a roaming permission instruction.

[0282] Specifically, when it is determined that the first SSID is updated from a non-roaming SSID to a roaming SSID, the terminal device can send a roaming permission instruction to the roaming module; then, based on the roaming permission instruction, a roaming scan process is performed; after performing the roaming scan, roaming switching can be further performed, for example, switching from the current BSSID to another BSSID.

[0283] Based on the process shown in Figure 7B, if the roaming type of the first SSID is updated from "non-roaming SSID" to "roaming SSID", then when the terminal device triggers the first service to perform channel scanning, it can update the stored roaming type of the first SSID and re-issue the roaming permission instruction so that the terminal device can perform roaming switching when the roaming conditions are met, such as switching to other BSSIDs.

[0284] Step 406: The terminal device allows the roaming scanning process to be performed.

[0285] That is, if the result of step 402 is that the first SSID is a roaming SSID, then the roaming scan process is allowed. Furthermore, although the result of step 402 is that the first SSID is a non-roaming SSID, the result of step 403 is that a roaming prohibition instruction has not yet been issued, then the terminal device temporarily allows the roaming scan process to be executed, for example, executing step 406. Of course, whether the roaming scan is subsequently allowed depends on whether the roaming type of the first SSID is updated or whether a relevant instruction (e.g., a roaming permission instruction or a roaming prohibition instruction) has been issued.

[0286] Step 407: The terminal device does not send a roaming permission instruction.

[0287] It can be understood that FIG7B only shows the case where the "non-roaming SSID" is updated to the "roaming SSID". On the contrary, if the first SSID is updated from the "roaming SSID" to the "non-roaming SSID", the embodiment of the present application is also applicable.

[0288] For another example, the terminal device has determined that the first SSID is a roamable SSID. If the first SSID is updated to a non-roamable SSID through other scanning results, the terminal device issues a roaming prohibition instruction to prohibit the first SSID from roaming.

[0289] Based on the second approach, when the SSID changes, the roaming type of the SSID can be updated based on the scan result, so that the terminal device performs the corresponding roaming behavior based on the latest updated roaming type.

[0290] In a third method, the terminal device updates the roaming type of the first SSID according to the relationship between the RSSI signal value and the preset threshold.

[0291] Currently, APs typically support dual-band integration. In other words, an AP supports two frequency bands: the first and second frequency bands. The first and second frequency bands correspond to different coverage areas. For example, the first frequency band is the 2.4 GHz band, and the second frequency band is the 5 GHz band.

[0292] Optionally, when determining the roaming type based on the RSSI signal value, the signal coverage ranges in different frequency bands may be considered to decide the roaming type of the AP.

[0293] Referring to the scenario shown in Figure 8A, the physical entity AP in Figure 8A can be understood as including two virtual entities. The two names of the physical entity AP are SSID1_2.4G and SSID1_5G. In other words, SSID1_2.4G and SSID1_5G can correspond to the same physical entity device (for example, the same router). SSID1_2.4G and SSID1_5G have the same name, for example, both are SSID1, or they correspond to the same SSID. Among them, SSID1_2.4G corresponds to BSSID1, and SSID1_5G corresponds to BSSID2. BSSID1 and BSSID2 are different BSSIDs under the same SSID.

[0294] The signal coverage of the 2.4 GHz band is greater than that of the 5 GHz band. The dotted line in Figure 8A represents the movement trajectory of the terminal device. When the terminal device moves from position A to position C, the quality of the received network signal becomes stronger.

[0295] Specifically, when the terminal device moves to position A shown in Figure 8A, the terminal device is within the signal coverage range of the 2.4G frequency band. At this time, the RSSI value corresponding to the quality of the network signal received by the terminal device is less than the RSSI threshold. When the terminal device moves to position B shown in Figure 8A, the RSSI value corresponding to the quality of the network signal received by the terminal device is equal to the RSSI threshold value. As the terminal device continues to move, when the terminal device moves to position C shown in Figure 8A, the terminal device is not only within the signal coverage range of the 5G frequency band, but also within the signal coverage range of the 2.4G frequency band. At this time, the RSSI value corresponding to the quality of the network signal received by the terminal device is greater than the RSSI threshold value.

[0296] The RSSI threshold may be a preset threshold value, or the value of the RSSI threshold may be a reasonable value set based on actual needs, and the embodiment of the present application does not make any specific limitation on this.

[0297] It should be noted that during the movement of the above-mentioned terminal device, the roaming type of the SSID will also change. For example, when the terminal device is located at the above-mentioned position A, it can only scan the signal of the 2.4G frequency band and cannot scan the signal of the 5G frequency band, or the available hotspot of the terminal device is only SSID1_2.4G, that is, there is only BSSID1 under SSID1, and no other BSSIDs, so it can be determined that SSID1_2.4G is a non-roaming SSID. For another example, when the terminal device moves to position C, the terminal device can not only scan the signal of the 2.4G frequency band, but also scan the signal of the 5G frequency band, or there are multiple BSSIDs under SSID1 at this time (for example, BSSID1 and BSSID2; corresponding to SSID1_2.4G and SSID1_5G respectively), then it can be determined that SSID1 is a roaming SSID.

[0298] The following describes the process of determining the SSID roaming type in the scenario shown in Figure 8A in conjunction with Figure 8B. Referring to Figure 8B, Figure 8B shows another method flow for determining the AP roaming type. It can be understood that the terminal device involved in Figure 8B can be the terminal device in Figure 4A (for example, the terminal device) or the terminal device in Figure 4B or the terminal device in Figure 4C, or can also refer to a device in the terminal device (for example, a processor, a chip, or a chip system, etc.). As shown in Figure 8B, at least the following steps are included:

[0299] Step 501: The terminal device performs channel scanning.

[0300] The channel scanning process can be referred to the previous description, and for the sake of brevity, it will not be repeated here.

[0301] Step 502: The terminal device determines whether there is an available AP (eg, the first SSID).

[0302] For example, it is assumed that the AP to which the terminal device is connected is the first AP shown in FIG8A , for example, BSSID1 under the SSID.

[0303] Step 503 - 1 : The terminal device determines whether there are multiple BSSIDs under the first SSID.

[0304] The purpose of step 503 - 1 is to determine whether there is a roamable hotspot with the same name as the first SSID.

[0305] If the judgment result of step 503 - 1 is “yes”, step 509 is executed; if the judgment result of step 503 - 1 is “no”, step 504 is executed.

[0306] That is, if there are multiple BSSIDs under the first SSID, then there is an SSID that can be roamed, and the roaming type of the first SSID can be determined to be a roamable SSID. If there are no multiple BSSIDs under the first SSID (for example, there is only one BSSID), then there is no SSID that can be roamed, and the frequency band of the first SSID can be further determined so that the next decision can be made based on the frequency band.

[0307] In step 503-2, the terminal device initiates a connection. That is, the terminal device may initiate a connection to the available AP (or available SSID) scanned in step 502.

[0308] It should be understood that step 503 - 1 and step 503 - 2 can be executed simultaneously, and the embodiment of the present application does not specifically limit the execution order of these two steps.

[0309] Step 504: The terminal device determines whether the first SSID is in a first frequency band, and the coverage range of the first frequency band is greater than the coverage range of the second frequency band.

[0310] For example, the first frequency band is the 2.4 GHz frequency band shown in FIG. 8A ; the second frequency band is the 5 GHz frequency band shown in FIG. 8A .

[0311] It is understandable that the first frequency band and the second frequency band may also be other frequency band values, and the description here is only based on the example in FIG. 8A .

[0312] If the judgment result of step 504 is “yes”, step 505 is executed; if the judgment result of step 504 is “no”, step 510 is executed.

[0313] That is, if the terminal device determines that the first SSID is in the first frequency band, the RSSI value can be further determined to be greater than the preset threshold. If the terminal device determines that the first SSID is not in the first frequency band, the roaming type of the first SSID can be determined to be a non-roaming SSID.

[0314] Step 505: The terminal device determines whether the RSSI value is less than a preset threshold.

[0315] If the judgment result of step 505 is “yes”, step 506 is executed; if the judgment result of step 504 is “no”, step 510 is executed.

[0316] For example, when the first SSID to which the terminal device is connected is within the signal coverage range of the 2.4G frequency band, if the signal strength of the 2.4G hotspot is relatively weak, that is, the RSSI signal value is less than the threshold value, then it can be determined that the 5G hotspot is not within the coverage range and the terminal device cannot scan the 5G hotspot. The terminal device can wait for the signal quality to become stronger, initiate another full-channel scan, and record the number of BSSIDs under the connected SSID, and then determine whether the first SSID is a roamable SSID. If the signal strength of the AP2.4G hotspot is relatively strong, that is, the RSSI signal value is greater than or equal to the threshold value, if no 5G hotspot can be scanned at this time, it means that there is indeed no 5G hotspot, then it can be determined that the first SSID is a non-roaming SSID.

[0317] Step 506: The terminal device waits for the RSSI value to be greater than or equal to a preset threshold.

[0318] That is to say, when the terminal device determines that the RSSI value is less than the preset threshold, it does not draw a conclusion on the roaming type of the first SSID. Instead, it waits for the RSSI value to increase or the signal quality to become stronger, and then initiates channel scanning again before determining the roaming type of the first SSID.

[0319] Optionally, as an implementation, the RSSI value being greater than or equal to the preset threshold includes: when the terminal device moves into the signal coverage area of ​​the second frequency band, the RSSI value being greater than or equal to the preset threshold. For example, if the RSSI value increases after the terminal device moves into the signal coverage area of ​​the 5G frequency band, a channel scan may be reinitiated to determine the roaming type of the first SSID.

[0320] Step 507: The terminal device re-initiates channel scanning.

[0321] Based on steps 505 to 507, when the terminal device determines that the RSSI value is greater than or equal to a preset threshold, it can determine that the first SSID is a non-roaming SSID. When the RSSI value is less than the preset threshold, the terminal device can re-acquire the RSSI value until the RSSI value is greater than or equal to the preset threshold, re-execute the channel scanning process, and re-determine the roaming type of the first SSID based on the channel scanning results. Of course, the principles for determining the roaming type of the first SSID are similar to those previously described, for example, determining whether there are multiple BSSIDs under the first SSID.

[0322] For example, when the terminal device moves from position A to position C as shown in FIG8A , a channel scanning process is performed again.

[0323] It should be noted that step 507 and step 501 are performed at different times, the channel scanning process is similar, and the scanning results may be different or the same.

[0324] Step 508: The terminal device determines whether there are multiple BSSIDs under the first SSID.

[0325] If the judgment result of step 508 is "yes", it can be considered that there is a roamable SSID around the first SSID, and the roaming type of the first SSID can be determined as a roamable SSID, for example, executing step 509; if the judgment result of step 508 is "no", it can be considered that there is no roamable SSID around the first SSID, and the roaming type of the first SSID can be determined as a non-roaming SSID, for example, executing step 510.

[0326] Step 509: The terminal device determines that the first SSID is a roaming SSID.

[0327] Step 510: The terminal device determines that the first SSID is a non-roaming SSID.

[0328] Based on the process shown in FIG8B , as the terminal device moves, the terminal device can dynamically update the roaming type of the connected SSID based on the relationship between the signal coverage strength of different frequency bands and the preset threshold.

[0329] It should be understood that the interface diagrams, flow charts, or scenario diagrams shown in Figures 2 to 8B are merely for ease of understanding and are not intended to limit the embodiments of the present application to the examples shown in the diagrams. In fact, those skilled in the art can perform equivalent transformations based on the examples in Figures 2 to 8B to obtain more implementation methods.

[0330] The above description, in conjunction with Figures 1A to 8B, details the Wi-Fi roaming control method provided by the embodiments of the present application. The following description details the device embodiments of the present application in conjunction with Figures 9 and 10. It should be understood that the communication device of the embodiments of the present application can perform the various communication methods of the aforementioned embodiments of the present application. For the specific working processes of the various products below, reference can be made to the corresponding processes in the aforementioned method embodiments.

[0331] In each of the above embodiments, the terminal device may perform some or all of the steps in each embodiment. These steps or operations are merely examples, and the embodiments of the present application may also perform other operations or variations of various operations. In addition, the various steps may be performed in the different orders presented in the embodiments, and it is possible that not all of the operations in the embodiments of the present application need to be performed. Furthermore, the size of the sequence number of each step does not mean the order of execution. The execution order of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0332] FIG9 is a schematic block diagram of a communication device according to an embodiment of the present application. As shown in FIG9 , the communication device 1400 may include a processing module 1410 and a roaming module 1420 .

[0333] In one possible design, the communication device 1400 may correspond to the terminal device in the above method embodiment, or a component configured in the terminal device (such as a circuit, a chip, or a chip system). The communication device 1400 has been connected to a first service set identifier SSID, and the first SSID belongs to a first access point AP.

[0334] In some embodiments, the processing module 1410 is configured to prohibit the roaming module 1420 from performing a roaming scanning process when determining that the roaming type corresponding to the first SSID is a non-roaming SSID.

[0335] In some embodiments, the processing module 1410 is further configured to allow the roaming module 1420 to perform a roaming scan process when determining that the roaming type corresponding to the first SSID is a roamable SSID.

[0336] In some embodiments, the processing module 1410 is configured to determine a roaming type corresponding to the first SSID when a roaming condition is met, and the roaming condition is configured to trigger the roaming module 1420 to initiate a roaming scanning process.

[0337] Optionally, as an embodiment, the non-roaming SSID is a basic service set identifier BSSID under the first SSID; the roaming SSID is a plurality of BSSIDs under the first SSID.

[0338] Optionally, as an embodiment, the processing module 1410 is used to determine the roaming type corresponding to the first SSID, including: searching for the roaming type corresponding to the first SSID according to a roaming list, the roaming list including the roaming type corresponding to the first SSID and / or one or more BSSIDs.

[0339] Optionally, as an embodiment, the processing module 1410 is used to determine the roaming list, specifically including: performing N channel scans; determining the roaming list based on the results of the N channel scans, the roaming list including at least one roaming type corresponding to an SSID, and / or one or more BSSIDs corresponding to at least one SSID; wherein N is a positive integer greater than zero.

[0340] Optionally, as an embodiment, the processing module 1410 is further configured to update the roaming type corresponding to the first SSID when the name of the first SSID changes.

[0341] Optionally, as an embodiment, the processing module 1410 is used to update the roaming type corresponding to the first SSID, including: triggering channel scanning when executing the first service; after the channel scanning is completed, updating the roaming type corresponding to the first SSID according to the channel scanning result.

[0342] Optionally, as an embodiment, the processing module 1410 is also used to determine whether the first SSID is in the first frequency band when there is a BSSID under the first SSID, and the coverage range of the first frequency band is greater than the coverage range of the second frequency band; when the first SSID is in the first frequency band, the roaming type of the first SSID is determined according to the received signal strength indication RSSI value of the communication device 1400 in the first frequency band; when the first SSID is not in the first frequency band, the first SSID is determined to be a non-roaming SSID.

[0343] Optionally, as an embodiment, the processing module 1410 is used to determine the roaming type of the first SSID based on the RSSI value of the terminal device in the first frequency band, including: when the RSSI value is greater than or equal to a preset threshold, determining that the first SSID is a non-roaming SSID; when the RSSI value is less than the preset threshold, re-acquiring the RSSI value and judging the RSSI value until the RSSI value is greater than or equal to the preset threshold, re-executing the channel scanning process, and determining the roaming type of the first SSID based on the channel scanning result.

[0344] Optionally, as an embodiment, the RSSI value being greater than or equal to the preset threshold includes: the communication device 1400 moves into the signal coverage range of the second frequency band, and the RSSI value is greater than or equal to the preset threshold.

[0345] Optionally, as an embodiment, the processing module 1410 is used to re-execute the channel scanning process and determine the roaming type of the first SSID based on the channel scanning result, including: determining whether there are multiple BSSIDs under the first SSID; when there are multiple BSSIDs under the first SSID, determining that the first SSID is a roamable SSID; when there is one BSSID under the first SSID, determining that the first SSID is a non-roaming SSID.

[0346] Optionally, as an embodiment, the first frequency band is a 2.4G frequency band, and the second frequency band is a 5G frequency band.

[0347] Optionally, as an embodiment, the processing module 1410 is further used to: determine whether to issue a prohibit roaming instruction when the roaming type corresponding to the first SSID is a non-roaming SSID; determine whether the roaming type corresponding to the first SSID is updated to a roaming SSID when a prohibit roaming instruction has been issued; and issue a allow roaming instruction when the roaming type corresponding to the first SSID is updated to a roaming SSID.

[0348] Optionally, as an embodiment, the processing module 1410 is further configured to: allow the roaming scanning process to be executed if it is determined that no roaming prohibition instruction has been issued.

[0349] Optionally, as an embodiment, the communication device includes a WIFI chip; the processing module 1410 is used to prohibit the execution of the roaming scanning process, including: prohibiting the WIFI chip from executing the roaming scanning process by sending a prohibit roaming instruction to the WIFI chip.

[0350] Optionally, as an embodiment, the processing module 1410 is further configured to, when the roaming type corresponding to the first SSID is a roamable SSID, switch from the first BSSID to a second BSSID, where the second BSSID and the first BSSID have the same first SSID.

[0351] Optionally, as an embodiment, the roaming condition includes one or more of the following: the signal quality of the first AP is less than a preset threshold, and the service packet error rate is greater than or equal to a packet error rate threshold.

[0352] Optionally, the communication device further includes a switching module 1430. Exemplarily, the processing module 1410 is further configured to call the switching module 1430 to perform a switching scan.

[0353] Optionally, as an embodiment, the handover module 1430 is configured to perform handover scanning when it is determined that the roaming type corresponding to the first SSID is a non-roaming SSID.

[0354] It should be understood that the communication device 1400 may correspond to the terminal device in the method of Figures 2 to 8B according to the embodiments of the present application, and the communication device 1400 may include modules or units for executing the method executed by the terminal device in Figures 2 to 8B. Furthermore, each unit in the communication device 1400 and the other operations and / or functions described above are respectively for implementing the corresponding processes of Figures 2 to 8B.

[0355] It should also be understood that when the communication device 1400 is a terminal device, the processing module 1410 in the communication device 1400 can be implemented by at least one processor, for example, corresponding to the processor 1510 in the communication device 1500 shown in FIG. 10 . Alternatively, the roaming module 1420 can be implemented by a roaming chip, such as the WiFi chip shown in FIG. 1A to FIG. 1C . Alternatively, the roaming module 1420 can also be in the form of a unit, such as the roaming module shown in FIG. 1B and FIG. 1C .

[0356] It should also be understood that when the communication device 1400 is a chip or chip system configured in the above-mentioned terminal device, the roaming module 1420 in the communication device 1400 can be implemented by a roaming chip, and the processing module 1410 in the communication device 1400 can be implemented by a processor, microprocessor or integrated circuit integrated on the chip or chip system.

[0357] Figure 10 is another schematic block diagram of a communication device 1500 provided in an embodiment of the present application. As shown in Figure 10, the communication device 1500 includes a processor 1510, a transceiver 1520, and a memory 1530. The processor 1510, the transceiver 1520, and the memory 1530 communicate with each other via an internal connection path. The memory 1530 is used to store instructions, and the processor 1510 is used to execute the instructions stored in the memory 1530 to control the transceiver 1520 to send and / or receive signals.

[0358] Optionally, the memory 1530 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. The memory 1530 may be a separate device or integrated into the processor 1510.

[0359] In one implementation, the communication device 1500 may correspond to the terminal device in the above-mentioned method embodiment and may be used to execute the various steps and / or processes performed by the terminal device in the above-mentioned method embodiment. The processor 1510 may be used to execute instructions stored in the memory 1530, and when the processor 1510 executes the instructions stored in the memory, the processor 1510 is used to execute the various steps and / or processes of the above-mentioned method embodiment corresponding to the terminal device.

[0360] The transceiver 1520 may include a transmitter and a receiver. The transceiver 1520 may further include an antenna, which may be one or more. The processor 1510, memory 1530, and transceiver 1520 may be integrated on different chips. For example, the processor 1510 and memory 1530 may be integrated in a baseband chip, and the transceiver 1520 may be integrated in a radio frequency chip. The processor 1510, memory 1530, and transceiver 1520 may also be integrated on the same chip. This application does not limit this.

[0361] Optionally, the communication device 1500 may be a component configured in an access network device, such as a chip, a chip system, etc.

[0362] The transceiver 1520 may also be a communication interface, such as an input / output interface. The transceiver 1520, the processor 1510, and the memory 1530 may all be integrated into the same chip, such as a baseband chip.

[0363] An embodiment of the present application further provides a processing device, including a processor and an interface; the processor is used to execute the Wi-Fi roaming control method in any of the above method embodiments.

[0364] It should be understood that the processing device may be one or more chips. For example, the processing device may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.

[0365] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.

[0366] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiment can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0367] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0368] Based on the methods provided in the embodiments of the present application, the present application also provides a chip system, which includes one or more processors configured to retrieve and execute instructions stored in a memory, thereby executing the methods of the embodiments of the present application. The chip system can be composed of a chip or can include a chip and other discrete devices.

[0369] Among them, the chip system may include an input circuit or interface for sending information or data, and an output circuit or interface for receiving information or data.

[0370] According to the method provided in the embodiment of the present application, the present application also provides a WIFI chip device, which includes a roaming module. In some embodiments, the WIFI roaming control method of the embodiment of the present application can be executed by the WIFI chip device.

[0371] According to the method provided in the embodiments of the present application, the present application also provides a computer program product, which includes: computer program code, which, when running on a computer, enables the computer to execute the method of the embodiments shown in Figures 5A to 8B or any one of the preceding embodiments.

[0372] According to the method provided in the embodiments of the present application, the present application also provides a computer-readable storage medium, which stores program code. When the program code is run on a computer, the computer executes the method of the embodiments shown in Figures 5A to 8B or any one of the preceding embodiments.

[0373] The computer-readable storage medium may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0374] According to the method provided in the embodiment of the present application, the present application also provides a communication system, which includes the aforementioned terminal device and at least one AP.

[0375] Optionally, the communication system may further include other devices that communicate with the terminal device and / or the AP.

[0376] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a high-density digital video disc (DVD)), or a semiconductor medium (eg, a solid state disc (SSD)).

[0377] The terminal devices and access network devices in the above-described apparatus embodiments and the terminal devices and access network devices in the method embodiments completely correspond to each other, and the corresponding modules or units perform the corresponding steps. For example, the communication unit (transceiver) performs the receiving or sending steps in the method embodiments, while other steps besides sending and receiving can be performed by the processing unit (processor). The functions of the specific units can be referred to in the corresponding method embodiments. There can be one or more processors.

[0378] As used in this specification, the terms "component," "module," "system," and the like are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or a computer. By way of illustration, both an application running on a computing device and a computing device can be a component. One or more components can reside in a process and / or an execution thread, and a component can be located on a computer and / or distributed between two or more computers. In addition, these components can be executed from various computer-readable media having various data structures stored thereon. Components can communicate, for example, via local and / or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component on a local system, a distributed system, and / or a network, such as the Internet interacting with other systems via signals).

[0379] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0380] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0381] In the several embodiments provided in this application, it should be understood that the disclosed systems, 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 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 system, 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.

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

[0383] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0384] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) 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.

[0385] It should be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0386] Additionally, the terms "system" and "network" are often used interchangeably in this document. The term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship. For example, A / B can mean either A or B.

[0387] The terms (or numbers) "first", "second", ... etc. that appear in the embodiments of the present application are used for descriptive purposes only, that is, they are only used to distinguish different objects, such as different "APs", etc., and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first", "second", ... etc. may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, "at least one (item)" refers to one or more. "Multiple" means two or more. "At least one of the following (item)" or similar expressions refers to any combination of these items, including any combination of a single (item) or plural (items).

[0388] For example, the meaning of expressions similar to "the item includes at least one of the following: A, B, and C" in the embodiments of the present application, unless otherwise specified, generally means that the item can be any one of the following: A; B; C; A and B; A and C; B and C; A, B and C; A and A; A, A and A; A, A and B; A, A and C, A, B and B; A, C and C; B and B, B, B and B, B, B and C, C and C; C, C and C, and other combinations of A, B and C. The above examples use A, B, and C as an example to illustrate the optional items of the item. When the expression is "the item includes at least one of the following: A, B, ..., and X", that is, when the expression has more elements, the items that can be applied to the item can also be obtained according to the above rules.

[0389] In short, the above description is only a preferred embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included in the scope of protection of this application.

Claims

1. A method for controlling WIFI roaming, characterized in that: The method is applied to a terminal device, and the method includes: The terminal device has been connected to a first service set identifier SSID, where the first SSID belongs to a first access point AP; When it is determined that the roaming type corresponding to the first SSID is a non-roaming SSID, the roaming scanning process is prohibited.

2. The control method according to claim 1, characterized in that: The method further comprises: When it is determined that the roaming type corresponding to the first SSID is a roamable SSID, the roaming scanning process is allowed to be performed.

3. The control method according to claim 1 or 2, characterized in that: The method further comprises: When a roaming condition is met, a roaming type corresponding to the first SSID is determined, and the roaming condition is used to trigger the terminal device to start a roaming scanning process.

4. The control method according to claim 1 or 2, characterized in that: The non-roaming SSID is a basic service set identifier BSSID under the first SSID; The roamable SSID means that there are multiple BSSIDs under the first SSID.

5. The control method according to claim 1 or 2, characterized in that: The determining the roaming type corresponding to the first SSID includes: The roaming type corresponding to the first SSID is searched according to a roaming list, where the roaming list includes the roaming type corresponding to the first SSID and / or one or more BSSIDs.

6. The control method according to claim 5, characterized in that: The method for determining the roaming list includes: Perform N channel scans; The roaming list is determined according to N channel scanning results, where the roaming list includes a roaming type corresponding to at least one SSID and / or one or more BSSIDs corresponding to at least one SSID; wherein N is a positive integer greater than zero.

7. The control method according to any one of claims 1 to 6, characterized in that: The method further comprises: When the name of the first SSID changes, the roaming type corresponding to the first SSID is updated.

8. The method according to claim 7, characterized in that The updating of the roaming type corresponding to the first SSID includes: When executing the first service, triggering channel scanning; After the channel scan is completed, the roaming type corresponding to the first SSID is updated according to the scan result.

9. The control method according to any one of claims 1 to 8, characterized in that: In a case where there is a BSSID under the first SSID, the method further includes: determining whether the first SSID is in a first frequency band, where the coverage of the first frequency band is greater than the coverage of the second frequency band; When the first SSID is in a first frequency band, determining a roaming type of the first SSID according to a received signal strength indicator RSSI value of the terminal device in the first frequency band; When the first SSID is not in the first frequency band, the first SSID is determined to be a non-roaming SSID.

10. The control method according to claim 9, characterized in that: The determining, according to the RSSI value of the terminal device in the first frequency band, the roaming type of the first SSID includes: When the RSSI value is greater than or equal to a preset threshold, determining that the first SSID is a non-roaming SSID; When the RSSI value is less than a preset threshold, the RSSI value is reacquired and judged until the RSSI value is greater than or equal to the preset threshold, the channel scanning process is re-executed, and the roaming type of the first SSID is determined based on the channel scanning result.

11. The control method according to claim 10, characterized in that: The RSSI value being greater than or equal to the preset threshold includes: when the terminal device moves into the signal coverage range of the second frequency band, the RSSI value is greater than or equal to the preset threshold.

12. The control method according to claim 10, characterized in that: The re-execution of the channel scanning process and determination of the roaming type of the first SSID based on the channel scanning result includes: Determining whether there are multiple BSSIDs under the first SSID; When there are multiple BSSIDs under the first SSID, determining that the first SSID is a roaming SSID; When there is a BSSID under the first SSID, the first SSID is determined to be a non-roaming SSID.

13. The control method according to any one of claims 9 to 12, characterized in that: The first frequency band is a 2.4G frequency band, and the second frequency band is a 5G frequency band.

14. The control method according to any one of claims 1 to 13, characterized in that: The method further comprises: When determining that the roaming type corresponding to the first SSID is a non-roaming SSID, determining whether to issue a prohibition roaming instruction; In a case where a roaming prohibition instruction has been issued, determining whether the roaming type corresponding to the first SSID is updated to a roaming SSID; When the roaming type corresponding to the first SSID is updated to a roamable SSID, a roaming permission instruction is issued.

15. The control method according to claim 14, characterized in that: The method further comprises: If it is determined that no roaming prohibition instruction has been issued, the roaming scanning process is allowed to be performed.

16. The control method according to any one of claims 1 to 15, characterized in that: The terminal device includes a WIFI chip; and the prohibiting the roaming scanning process includes: The WIFI chip is prohibited from executing the roaming scanning process by sending a prohibition roaming instruction to the WIFI chip.

17. The control method according to any one of claims 3 to 16, characterized in that: The roaming conditions include one or more of the following: The signal quality of the first AP is less than a preset threshold, and the service packet error rate is greater than or equal to the packet error rate threshold.

18. The method according to any one of claims 1 to 17, characterized in that When the roaming type corresponding to the first SSID is a roamable SSID, the method further includes: Switching from a first BSSID to a second BSSID, the second BSSID having the same first SSID as the first BSSID.

19. The control method according to any one of claims 1 to 18, characterized in that: The method further includes: performing a handover scan when it is determined that the roaming type corresponding to the first SSID is a non-roaming SSID.

20. A terminal device, characterized in that: The terminal device includes a processing module and a roaming module; the terminal device has been connected to a first service set identifier SSID, and the first SSID belongs to a first access point AP; The processing module is configured to prohibit the execution of the roaming scanning process when it is determined that the roaming type corresponding to the first SSID is a non-roaming SSID.

21. The terminal device according to claim 20, characterized in that The processing module is further configured to allow execution of a roaming scanning process when it is determined that the roaming type corresponding to the first SSID is a roamable SSID.

22. The terminal device according to claim 20 or 21, characterized in that: The processing module is further configured to determine a roaming type corresponding to the first SSID when a roaming condition is met, wherein the roaming condition is configured to trigger the terminal device to initiate a roaming scanning process.

23. The terminal device according to claim 20 or 21, characterized in that: The non-roaming SSID is a basic service set identifier BSSID under the first SSID; The roamable SSID means that there are multiple BSSIDs under the first SSID.

24. The terminal device according to claim 20 or 21, characterized in that: The processing module is further configured to: Perform N channel scans; Determine a roaming list based on N channel scan results, where the roaming list includes a roaming type corresponding to at least one SSID and / or one or more BSSIDs corresponding to at least one SSID; wherein N is a positive integer greater than zero; The processing module is configured to determine the roaming type corresponding to the first SSID, including: The roaming type corresponding to the first SSID is searched according to the roaming list, where the roaming list includes the roaming type corresponding to the first SSID and / or one or more BSSIDs.

25. The terminal device according to any one of claims 22 to 24, characterized in that: The roaming conditions include one or more of the following: The signal quality of the first AP is less than a preset threshold, and the service packet error rate is greater than or equal to the packet error rate threshold.

26. The terminal device according to any one of claims 20 to 25, characterized in that: The terminal device further includes: a switching module; The processing module is further configured to, when it is determined that the roaming type corresponding to the first SSID is a non-roaming SSID, call the switching module to perform a switching scan.

27. A communication device, characterized in that: The communication device includes: one or more processors, and a memory; The memory is coupled to the one or more processors, and is configured to store computer program code, where the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the communication device to perform the method according to any one of claims 1 to 19.

28. A chip system, characterized in that: The chip system is applied to a communication device, and the chip system includes one or more processors, and the one or more processors are used to call computer instructions so that the communication device executes the method as described in any one of claims 1 to 19.

29. A computer-readable storage medium, characterized in that The computer-readable storage medium comprises instructions, which, when executed on a communication device, cause the communication device to perform the method according to any one of claims 1 to 19.

Citation Information

Patent Citations

  • Mobile device and method for automatic connectivity, data offloading and roaming between networks

    CN102857997A

  • Wireless access device control method and wireless access device

    CN104796973A

  • Device and method for accessing wireless local area network

    CN106358189A

  • Wireless roaming method, wireless roaming device and electronic device

    CN107040910A

  • Wireless switch network architecture implementing mobility areas within a mobility domain

    US20080008088A1