WiFi roaming method and device, computer equipment and storage medium
By building and updating the roaming weight list in the terminal device and determining and optimizing the target access point, the problem of low WiFi roaming success rate is solved, and the stability and continuity of network connections are improved.
Patent Information
- Application Number
- CN202411725217.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-18
AI Technical Summary
The existing WiFi roaming technology has low roaming success rate in specific scenarios, resulting in network connection interruption and affecting business continuity.
By constructing and updating the roaming weight list in the terminal device, the target access point that meets the preset weight conditions is determined, and the weight value is dynamically adjusted to optimize roaming decisions.
It improves the success rate of WiFi roaming, reduces the trial and error time of roaming switching, and ensures the stability and continuity of network connections.
Smart Images

Figure CN119485258A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of wireless communication technology, and in particular to a WiFi roaming method, apparatus, computer equipment and storage medium. Background Art
[0002] In wireless communication technology, WiFi (Wireless Fidelity) roaming is one of the core functions of wireless local area network (WLAN). WiFi roaming technology allows wireless terminals (STAs) (wireless workstations) to seamlessly switch from one AP (Access Point) to another AP in a wireless LAN network, while maintaining an uninterrupted network connection.
[0003] However, in the related art, the WiFi roaming method still has certain limitations, and its roaming success rate needs to be further improved. Summary of the invention
[0004] The present application aims to solve at least one of the technical problems in the related art to a certain extent. To this end, the present application proposes a WiFi roaming method, apparatus, computer device and storage medium. The main technical solutions adopted by the present application include:
[0005] In a first aspect, an embodiment of the present application provides a WiFi roaming method, which is applied to a terminal; the method includes: determining a first roaming weight list of a current wireless access point; wherein the current wireless access point is a wireless access point to which the terminal is connected at a current moment; the first roaming weight list stores weight values of multiple candidate wireless access points, and the weight values are used to describe the probability of the terminal successfully switching from the current wireless access point to the corresponding candidate wireless access point; determining a first target weight value that meets a preset weight condition in the first roaming weight list, and using the candidate wireless access point corresponding to the first target weight value as a first target access point; if the current wireless access point is successfully switched to the first target access point, it is determined that the roaming is successful.
[0006] Optionally, the weight value of any candidate wireless access point is determined in the following manner, including: when the terminal is connected to the current wireless access point, obtaining roaming process information of switching from the current wireless access point to any candidate wireless access point; and determining the weight value of any candidate wireless access point based on the roaming process information of any candidate wireless access point.
[0007] Optionally, the method also includes: if the current wireless access point fails to switch to the first target access point successfully, updating the weight value of the first target access point in the first roaming weight list; re-determining a second target weight value that meets a preset weight condition in the updated first roaming weight list, and using the alternative wireless access point corresponding to the second target weight value as the second target access point.
[0008] Optionally, after the current wireless access point successfully switches to the first target access point, the method further includes: determining a second roaming weight list of the first target access point; wherein the second roaming weight list stores a weight value of the current wireless access point, and the weight value of the current wireless access point is used to describe the probability of the terminal switching from the first target access point to the current wireless access point.
[0009] Optionally, before determining the first roaming weight list of the current wireless access point, the method also includes: if it is detected that the first roaming weight list of the current wireless access point does not exist in the system layer of the terminal, constructing an empty roaming weight list; determining the first roaming weight list of the current wireless access point, including: filling in the empty roaming weight list according to roaming process information of the current wireless access point switching to any alternative wireless access point to obtain the first roaming weight list.
[0010] Optionally, the method further includes: if a new wireless access point is scanned, determining a weight value of the new wireless access point according to roaming process information of switching from the current wireless access point to the new wireless access point; and adding the weight value of the new wireless access point to the first roaming weight list.
[0011] Optionally, determining a first target weight value that satisfies a preset weight condition in the first roaming weight list includes: determining a first target weight value that satisfies the maximum weight value in the first roaming weight list; or determining multiple candidate weight values that satisfy the maximum weight value in the first roaming weight list, and taking the candidate weight value with the earliest storage time among the multiple candidate weight values as the first target weight value.
[0012] In a second aspect, an embodiment of the present application provides a WiFi roaming device, the device comprising:
[0013] A weight list determination module is used to determine a first roaming weight list of a current wireless access point; wherein the current wireless access point is a wireless access point to which the terminal is currently connected; the first roaming weight list stores weight values of multiple candidate wireless access points, and the weight values are used to describe the probability of the terminal successfully switching from the current wireless access point to the corresponding candidate wireless access point;
[0014] A target access point determination module, configured to determine a first target weight value satisfying a preset weight condition in a first roaming weight list, and use a candidate wireless access point corresponding to the first target weight value as a first target access point;
[0015] The roaming success determination module is used to determine that the roaming is successful if the current wireless access point is successfully switched to the first target access point.
[0016] In a third aspect, the present application further provides a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0017] In a fourth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when the computer program is executed by a processor.
[0018] In a fifth aspect, the present invention provides a computer program product, comprising a computer program, which implements the steps of any of the above methods when executed by a processor.
[0019] In the above embodiment, firstly, the first roaming weight list of the current wireless access point is determined; wherein the current wireless access point is the wireless access point to which the terminal is connected at the current moment; the first roaming weight list stores weight values of multiple candidate wireless access points, and the weight values are used to describe the probability of the terminal successfully switching from the current wireless access point to the corresponding candidate wireless access point; the first target weight value that meets the preset weight condition is determined in the first roaming weight list, and the candidate wireless access point corresponding to the first target weight value is used as the first target access point; finally, if the current wireless access point is successfully switched to the first target access point, the roaming is determined to be successful. At this point, based on the first roaming weight list of the current wireless access point, the best target access point for roaming is determined to improve the roaming success rate of the terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 A flowchart of a WiFi roaming method provided according to an embodiment of the present application;
[0022] Figure 2 A flowchart for determining a weight value according to an embodiment of the present application;
[0023] Figure 3 A flowchart of a WiFi roaming method provided according to another embodiment of the present application;
[0024] Figure 4 A flowchart of constructing a roaming weight list according to an embodiment of the present application;
[0025] Figure 5 A flowchart of a WiFi roaming method provided according to another embodiment of the present application;
[0026] Figure 6 is a structural block diagram of a WiFi roaming device according to an embodiment of the present application;
[0027] Figure 7 The figure is a diagram of the internal structure of a computer device according to one embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0029] In wireless communication technology, WiFi (Wireless Fidelity) roaming is one of the core functions of wireless local area network (WLAN). WiFi roaming technology allows wireless terminals (STAs) (wireless workstations) to seamlessly switch from one AP (Access Point) to another AP in a wireless LAN network, while maintaining uninterrupted network connection. WiFi roaming is a technology that was created to solve the problem of limited wireless signal coverage, allowing users to seamlessly switch to an AP with a stronger signal during movement, thereby maintaining service continuity.
[0030] The WiFi roaming algorithm in the related art mainly depends on the STA's driving algorithm, which determines when to roam to a new AP by monitoring the SNR (Signal Noise Ratio) of the received frame and based on the currently used data transmission rate. Most STAs use RSSI (Received Signal Strength Indication) as a reference. When the RSSI of the currently connected AP is lower than a certain threshold, the STA will start the roaming scan process and start looking for a suitable base station for roaming. When the roaming scan process detects that the RSSI of another or more APs is stronger than the currently connected AP and the difference is greater than the switching threshold, the STA will roam to the AP with the largest RSSI value.
[0031] Although this roaming technology can meet most WiFi roaming needs and has good versatility when STA is roaming in a variety of different WiFi environments, in some specific WiFi scenarios, such as scenarios with dense WiFi access points and many obstructions and frequent roaming, it often happens that when selecting AP as the roaming target, the roaming target AP is not the best choice for the current roaming due to factors such as many AP nodes and many obstructions, resulting in roaming failure and repeated roaming until roaming is successful. The process of repeatedly initiating roaming will cause WiFi data transmission to be interrupted, and the interruption time can be as long as several seconds to tens of seconds, affecting the use of business software.
[0032] Based on this, according to an embodiment of the present application, a WiFi roaming method, apparatus, computer device and storage medium embodiment are provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0033] In this embodiment, a WiFi roaming method is provided, which is applied to a terminal. Figure 1 is a flowchart of a WiFi roaming method according to an embodiment of the present application. Figure 1 As shown, the process includes the following steps:
[0034] S110: Determine a first roaming weight list of a current wireless access point.
[0035] The current wireless access point may refer to the wireless access point to which the terminal is currently connected. Specifically, the wireless access point may refer to a point in a wireless network used to connect a terminal device and a wired network, and may allow a terminal (STA) to access a wireless local area network through a wireless signal based on the point. Exemplarily, the wireless input point to which a terminal device such as a mobile phone or a laptop is currently connected when WiFi is turned on may be used as the current wireless input point.
[0036] It should be noted that the terminal here, that is, the wireless terminal STA (Station, wireless workstation) can be called a wireless terminal, terminal equipment, terminal or wireless client, etc.
[0037] The first roaming weight list may be a list showing multiple candidate wireless access points and their weight values that can be used for roaming switching of the current wireless access point. Specifically, the multiple candidate wireless access points stored in the first roaming weight list may be sorted from high to low according to their weight values, that is, the candidate wireless access point with the largest weight value will be arranged at the front of the first roaming weight list.
[0038] Among them, the candidate wireless access point may refer to other wireless access points available for roaming in the wireless network, except for the wireless access point to which the terminal is currently connected. Specifically, in the first roaming weight list, each candidate wireless access point will correspond to a weight value, and the weight value may be a quantitative indicator, which is used to reflect the probability of the terminal successfully switching from the current wireless access point to the corresponding candidate wireless access point. That is, the weight value may reflect the possibility or priority of the terminal switching from the current wireless access point to a certain candidate wireless access point.
[0039] For example, if the wireless access point currently connected to the terminal device is AP1, then when the terminal device is to roam from AP1, the terminal device will first determine the first roaming weight list 1 corresponding to AP1, wherein Table 1 contains multiple candidate wireless access points available for AP1 to roam and their associated weight values. That is, Table 1 may contain two columns of data, the first column of data is multiple candidate wireless access points available for AP1 to roam, such as AP2, AP3 or AP4, etc.; the second column of data is the weight value corresponding to each candidate wireless access point, such as 100, 80, or 60, etc.
[0040] S120: Determine a first target weight value that meets a preset weight condition in the first roaming weight list, and use a candidate wireless access point corresponding to the first target weight value as a first target access point.
[0041] The preset weight condition may be a standard for selecting the best target weight value that meets the requirements. For example, the preset weight condition may be a threshold, and only the candidate wireless access points with weight values higher than the threshold will be considered as the target access points for roaming handover of the current wireless access point.
[0042] Specifically, based on the preset weight condition, the terminal searches for and determines a first target weight value that meets the standard in the first roaming weight list.
[0043] The first target weight value can be used to represent a specific weight value, and can also reflect the probability or priority of the terminal device successfully switching from the current wireless access point to the alternative wireless access point. For example, if the preset weight condition is a certain threshold, the first target weight value can be the maximum weight value in the first roaming weight list.
[0044] Furthermore, the terminal determines a corresponding candidate wireless access point based on the first target weight value, and uses the candidate wireless access point as the best first target access point in the current situation.
[0045] The first target access point is an access point corresponding to the first target weight value. Exemplarily, if the preset weight condition is the weight value, the first target access point may be the access point with the highest weight value among all candidate access points that meet the preset condition.
[0046] Finally, when the terminal needs to perform roaming switching from the current wireless access point, it will preferentially try to connect to the first target access point.
[0047] S130: If the current wireless access point is successfully switched to the first target access point, it is determined that the roaming is successful.
[0048] Specifically, after the first target access point is determined, the terminal will begin to try to switch from the current wireless access point to the first target access point, that is, start roaming. At this time, the terminal will send a reassociation frame to the first target access point. This frame contains the BSSID (Basic Service Set Identifier) of the current wireless access point to which the terminal is connected and the BSSID of the first target access point. Further, the terminal will also send a management frame to the first target access point, which contains roaming information such as an authentication frame, an association request frame, and a reassociation request frame. When a confirmation frame (such as an ACK frame, etc.) sent by the first target access point is received and the terminal device is completely switched from the current wireless access point to the first target access point, it can be regarded that the terminal has completed the roaming process, that is, the roaming is determined to be successful.
[0049] Optionally, after determining that the roaming is successful, the terminal will save the data of the first roaming weight list corresponding to the current wireless access point in its system layer for subsequent reuse.
[0050] In the above implementation, firstly, the first roaming weight list of the current wireless access point is determined; wherein the current wireless access point is the wireless access point to which the terminal is connected at the current moment; the first roaming weight list stores weight values of multiple candidate wireless access points, and the weight values are used to describe the probability of the terminal successfully switching from the current wireless access point to the corresponding candidate wireless access point; the first target weight value that meets the preset weight condition is determined in the first roaming weight list, and the candidate wireless access point corresponding to the first target weight value is used as the first target access point; finally, if the current wireless access point is successfully switched to the first target access point, the roaming is determined to be successful. At this point, based on the first roaming weight list of the current wireless access point, the best target access point for roaming is determined to improve the roaming success rate of the terminal.
[0051] In some embodiments, please refer to the attached Figure 2 , the weight value of any candidate wireless access point is determined by:
[0052] S210: When the terminal is connected to the current wireless access point, obtain roaming process information of switching from the current wireless access point to any candidate wireless access point.
[0053] The roaming process information may refer to data containing basic information of the wireless access point connected before and after roaming. For example, the roaming process information may include information data such as SSID (Basic Service Set Identifier), RSSI (Received Signal Strength Indication), SNR (Signal-to-Noise Ratio), and channel, and may also include the execution times and duration data of management frames (such as authentication frames, association request frames, and reassociation request frames) sent during the roaming process.
[0054] Optionally, when the terminal is connected to the current wireless access point, the terminal will also obtain the repetition number and duration information of auth (authentication process of WiFi connection), reassoc (reassociation process of WiFi connection) and EAPoL (Extensible Authentication Protocol over over LAN) in the historical roaming process of the surrounding alternative wireless access points based on the WiFi driver, so as to better evaluate the roaming efficiency and stability of each alternative wireless access point.
[0055] S220: Determine a weight value of any candidate wireless access point based on the roaming process information of any candidate wireless access point.
[0056] Specifically, after acquiring the roaming process information of any candidate wireless access point, the terminal may analyze and process the information, evaluate the roaming efficiency and stability of each candidate wireless access point, and obtain its corresponding weight value.
[0057] For example, if, based on the obtained roaming process information, it is found that a candidate wireless access point needs to retransmit management frames multiple times during the historical roaming process, or the roaming process takes a long time, this indicates that the network connection of the candidate wireless access point is not stable enough or the efficiency is low, then its corresponding weight value is low. Similarly, based on the above method, the weight values of all candidate wireless access points are determined accordingly.
[0058] Furthermore, after determining the weight values of all candidate wireless access points, the terminal may construct a roaming weight list according to the weight value of each candidate wireless access point in descending order of weight value, so as to make subsequent roaming decisions.
[0059] In the above implementation, based on the roaming process information of the candidate wireless access points, the terminal device can select the best roaming target access point according to the real-time network status and historical roaming data, thereby effectively improving the roaming success rate and reducing the trial and error time of roaming switching.
[0060] In some embodiments, please refer to the attached Figure 3 , the method further comprises:
[0061] S310: If the current wireless access point fails to switch to the first target access point, update the weight value of the first target access point in the first roaming weight list.
[0062] Specifically, after the first target access point is determined, the terminal will try to roam from the current wireless access point to the first target access point, and at this time, a reassociation frame will be sent to the first target access point to start roaming. It should be understood that when information is transmitted in a wireless network, information frames may be lost or damaged, resulting in the receiver being unable to correctly parse the frame content. In other words, in addition to the network quality and access point characteristics that affect the roaming effect, transmission factors will also affect the roaming effect. Therefore, when roaming in a wireless network, reassociation frames will be retransmitted multiple times until they are successfully received and confirmed, so as to minimize the impact of transmission factors on roaming.
[0063] However, at the same time, the number of times the reassociation frame is retransmitted will also be used as a condition for evaluating the weight value. Each time the reassociation frame is retransmitted, the weight value of the first target access point will be correspondingly updated.
[0064] For example, if the initial weight value of the first target access point is 100, and the reassociation frame is retransmitted 5 times during roaming, then after the retransmission is completed, the weight value of the first target access point in the updated first roaming weight list will be reduced to 95.
[0065] S320: Re-determine a second target weight value that meets a preset weight condition in the updated first roaming weight list, and use the candidate wireless access point corresponding to the second target weight value as the second target access point.
[0066] Specifically, after updating the weight value of the first target access point, the system will re-match and search in the updated first roaming weight list based on the preset weight condition to determine the second target weight value that meets the preset weight condition, and use the alternative wireless access point corresponding to the second target weight value as the second target access point.
[0067] It is understandable that the second target weight value may be different from the first target weight value, but the second target access point may be the first target access point. For example, if the first target access point initially determined is AP2, its weight value is 100, and the first roaming weight list also includes an alternative access point AP3, whose weight value is 96. Then, after the first re-association frame retransmission fails during the roaming process, the weight value of the first target access point AP2 is reduced to 99 due to the failure of the re-association frame retransmission. However, since the weight value of the first target access point AP2, 99, is still the highest weight value in the updated first roaming weight list, the weight value of the first target access point AP2, 99, may be the second target weight value in the updated first roaming weight list that meets the preset weight condition, and at this time, the alternative wireless access point corresponding to the second target weight value, that is, the second target access point, may still be the wireless access point AP2 corresponding to 99.
[0068] It is also understandable that if the initially determined first target access point is AP2, its weight value is 100, but if during the roaming process, the reassociation frame fails to be retransmitted 5 times, resulting in the weight value corresponding to the first target access point AP2 being reduced to 95. Then at this time, in the updated first roaming weight list, the candidate access point AP3 becomes the candidate access point with the highest weight value with a weight value of 96, that is, at this time, the weight value 96 of the candidate access point AP3 becomes the second target weight value that meets the preset weight condition in the updated first roaming weight list, and the candidate wireless access point corresponding to the second target weight value, that is, the candidate wireless access point AP3 replaces the first target access point AP2 as the second target access point determined in the updated first roaming weight list.
[0069] Optionally, the condition for evaluating the weight value may also be the roaming duration.
[0070] For example, when the first target access point initially determined is AP2, if roaming fails to be completed within the specified time, that is, there is a roaming timeout of the first target access point, the terminal will also update the weight value of the first target access point AP2. For example, if roaming to AP2 fails to be completed after 200ms, the weight value corresponding to the first target access point AP2 will be reduced. If the weight value of AP2 has been reduced to less than the weight value of AP3 at this time, the terminal will reselect AP3 as the roaming target and initiate a reassociation frame to roam again.
[0071] In the above implementation, when roaming to a certain access point fails, the weight value of the access point is reduced to reduce the possibility of selecting it as a roaming target in the future. At the same time, a new optimal roaming target is searched again in the updated roaming weight list to improve the success rate of roaming and ensure the stability and continuity of network connection. That is, the roaming strategy is dynamically adjusted to improve the success rate of roaming.
[0072] In some implementations, after the current wireless access point successfully switches to the first target access point, the method further includes:
[0073] A second roaming weight list for the first target access point is determined.
[0074] The second roaming weight list may also be a list showing multiple candidate wireless access points and their weight values that can be used for roaming switching of the first target access point. Specifically, the second roaming weight list also stores the weight value of the current wireless access point, wherein the weight value of the current wireless access point is used to describe the probability of the terminal switching from the first target access point to the current wireless access point.
[0075] It can be understood that the second roaming weight list includes all the alternative wireless access points that can be used for roaming switching of the first target access point, and can also include the current wireless access point that has been roamed before, that is, the weight values of the historical wireless access points that have been roamed can also be stored in the second roaming weight list, and is not limited to the terminal roaming history.
[0076] For example, if the current wireless access point is AP1, the roaming switch will be selected in the first roaming weight list, that is, Table 1, to determine the first target access point. If the first target access point is determined to be AP2, the terminal will roam to AP2 accordingly. At the same time, the data of the first roaming weight list 1 corresponding to the current wireless access point AP1 will be saved for subsequent reuse.
[0077] Furthermore, after roaming to AP2, if roaming is still needed, the terminal will obtain the second roaming weight list corresponding to the first target access point, that is, obtain the second roaming weight list 2 corresponding to the first target access point AP2 based on the first target access point AP2. Among them, the second roaming weight list 2 shows the weight values of all the alternative wireless access points that can be used for roaming switching of the first target access point AP2, including the current wireless access point AP1 that has been roamed. And, if roaming is still needed, the terminal can select the next best target entry point for roaming from all the alternative wireless access points that can be roamed based on the second roaming weight list 2 of the first target access point AP2.
[0078] In the above implementation, it is emphasized that in a wireless network, each wireless access point has a roaming weight list associated with it, which includes the roaming probability of roaming from the current wireless access point to any other candidate wireless access point. And the candidate wireless access point can also be a historical wireless access point that has been roamed before. Through this method, each wireless access point can make more accurate roaming decisions based on historical data and real-time information, which helps to select the best roaming target and reduce the risk of roaming failure. At the same time, the roaming weight list of the historical wireless access point that has been roamed will also be saved for subsequent use, which reduces the time for roaming decisions and improves the efficiency of roaming.
[0079] In some implementations, before determining the first roaming weight list of the current wireless access point, please refer to the attached Figure 4 , the method further comprises:
[0080] S410: If it is detected that the first roaming weight list of the current wireless access point does not exist in the system layer of the terminal, construct an empty roaming weight list.
[0081] Accordingly, determining a first roaming weight list of the current wireless access point includes:
[0082] S420: Fill in the empty roaming weight list according to the roaming process information of switching from the current wireless access point to any candidate wireless access point to obtain a first roaming weight list.
[0083] The empty roaming weight list may refer to a roaming weight list that has not yet been filled with any data, and is used to provide a list framework for subsequent roaming switching operations.
[0084] Exemplarily, the empty roaming weight list may be a 2×N blank list, where N represents the number of candidate wireless access points available for the current wireless access point to roam.
[0085] Specifically, when the first roaming weight list of the current wireless access point does not exist in the system layer of the terminal, that is, the terminal cannot obtain the first roaming weight list of the current wireless access point, the terminal will construct an empty roaming weight list that has not been filled with any data, and fill the empty roaming weight list in an orderly manner according to a certain order according to the roaming process information of switching from the current wireless access point to any alternative wireless access point, to obtain the first roaming weight list.
[0086] Exemplarily, when the terminal connects to a new wireless access point for the first time, the roaming weight list of the wireless access point does not exist due to the lack of historical data, that is, the terminal cannot obtain the first roaming weight list of the current wireless access point. In this case, the terminal will construct an empty roaming weight list that has not yet been filled with any data. Further, based on the various roaming process information of each candidate wireless access point reported by the recorded WiFi driver to its system layer, the terminal will analyze and process it according to its reporting time to evaluate the roaming efficiency and stability of each candidate wireless access point, and obtain the weight value corresponding to each candidate wireless access point. After obtaining the weight value corresponding to each candidate wireless access point, the terminal will fill the empty roaming weight list from top to bottom according to the weight value from large to small, and finally obtain the first roaming weight list of the current wireless access point.
[0087] Optionally, when there are multiple candidate wireless access points with the same weight value, the terminal fills in the table in the order of reporting time of the candidate wireless access points from earliest to latest, and finally obtains the first roaming weight list of the current wireless access point.
[0088] In the above implementation, for wireless access points that do not have a roaming weight list, such as a new wireless access point that is connected for the first time, due to the lack of historical data, the terminal device will dynamically adapt to the new environment by constructing an empty list, ensuring effective roaming management even in the absence of historical data, further optimizing the roaming strategy, thereby improving network performance and user experience.
[0089] In some embodiments, please refer to the attached Figure 5 , the method further comprises:
[0090] S510: If a new wireless access point is scanned, determine a weight value of the new wireless access point according to roaming process information of switching from the current wireless access point to the new wireless access point.
[0091] The newly added wireless access point may be used to refer to a wireless access point newly discovered during the scanning process when the terminal needs to perform roaming switching. For example, the newly added wireless access point may be a wireless access point that has not been previously identified or recorded in the first roaming weight list of the current wireless access point, and the newly added wireless access point may be discovered due to changes in the network environment, the addition of a new device, or the movement of the terminal device to a new wireless local area network area.
[0092] Furthermore, after the terminal device scans a newly added wireless access point, the feasibility and efficiency of roaming from the current wireless access point to the newly added access point can be evaluated based on its roaming process information to determine the weight value of the newly added wireless access point.
[0093] S520: Add a weight value of the wireless access point to the first roaming weight list.
[0094] Specifically, after determining the weight value of the newly added wireless access point, the terminal can add the new weight value to the first roaming weight list of the current wireless access point, indicating that the newly added wireless access point can also be used as one of the candidate access points for roaming with the current wireless access point, so that the new access point can be considered in subsequent roaming decisions.
[0095] Optionally, when the terminal device is scanning, if it is found that a candidate wireless access point originally in the first roaming weight list is not scanned, then when making a roaming decision, the terminal device will not initiate roaming to the candidate wireless access point, and the weight value corresponding to the candidate wireless access point will not change.
[0096] In the above implementation, by adding the scanned new wireless access points in real time to the first roaming weight list, the wireless network can dynamically adapt to environmental changes and promptly include the newly appeared access points in the roaming consideration scope, ultimately achieving the effect of being able to make the best roaming decision based on the latest network conditions.
[0097] In some implementations, determining a first target weight value that satisfies a preset weight condition in the first roaming weight list includes:
[0098] A first target weight value that satisfies the maximum weight value is determined in the first roaming weight list.
[0099] Alternatively, multiple candidate weight values that meet the maximum weight value are determined in the first roaming weight list, and the candidate weight value with the earliest storage time among the multiple candidate weight values is used as the first target weight value.
[0100] Specifically, the first roaming weight list may be traversed to compare the weight value of each candidate wireless access point, so as to determine a first target weight value that meets a preset weight condition in the first roaming weight list.
[0101] For example, if after traversing the first roaming weight list, it is found that there is only one target weight value with the largest weight value, it can be used as the first target weight value to provide a basis for subsequent roaming decisions.
[0102] If after traversing the first roaming weight list, it is found that there are multiple candidate wireless access points with the same weight values and all of them are maximum weight values, the terminal will further determine the storage time of these candidate weight values in the first roaming weight list, and finally select the candidate weight value with the earliest storage time as the first target weight value.
[0103] It is understandable that, when establishing the first roaming weight list, the terminal will establish the first roaming weight list in accordance with the order in which its WiFi driver reports the roaming process information of switching the current wireless access point to any alternative wireless access point to the system layer. Therefore, if there are multiple alternative wireless access points with the same weight value and they are all maximum weight values, the top candidate weight value can be selected from the first roaming weight list in order from top to bottom as the first target weight value. That is, in the case of multiple maximum weight values, the terminal can also roam from top to bottom in the order of the list in the first roaming weight list.
[0104] In the above implementation, for different situations of the weight values of each candidate access point, it is explained how to determine the first target weight value that meets the preset weight condition in the first roaming weight list, so as to optimize the selection of roaming targets, reduce unnecessary roaming attempts, and thus improve the efficiency and performance of the wireless network.
[0105] The present specification also provides a WiFi roaming method, which is applied to a terminal. The method includes the following steps:
[0106] S602: When the terminal is connected to the current wireless access point, detect whether there is a first roaming weight list of the current wireless access point in the system layer of the terminal.
[0107] The current wireless access point is the wireless access point that the terminal is currently connected to. The first roaming weight list stores weight values of multiple candidate wireless access points, and the weight values are used to describe the probability of the terminal successfully switching from the current wireless access point to the corresponding candidate wireless access point.
[0108] S604: When it is detected that the current wireless access point does not have the first roaming weight list, construct an empty roaming weight list.
[0109] S606: Determine a weight value of any candidate wireless access point according to roaming process information of switching from the current wireless access point to any candidate wireless access point.
[0110] S608: Fill in the empty roaming weight list according to the weight value of any candidate wireless access point to obtain a first roaming weight list.
[0111] S610: When it is detected that the current wireless access point has a first roaming weight list, scan nearby candidate wireless access points.
[0112] S612: When a new wireless access point is scanned, determine a weight value of the new wireless access point according to roaming process information of switching from the current wireless access point to the new wireless access point.
[0113] S614: Add a weight value of the newly added wireless access point to the first roaming weight list.
[0114] S616: If no new wireless access point is scanned, extract a first roaming weight list of the current wireless access point.
[0115] S618: Determine a first target weight value that satisfies the maximum weight value in the first roaming weight list.
[0116] S620: When there are multiple candidate weight values that meet the maximum weight value, use the candidate weight value with the earliest storage time among the multiple candidate weight values as the first target weight value.
[0117] S622: Use the candidate wireless access point corresponding to the first target weight value as the first target access point, and start roaming.
[0118] S624: If the current wireless access point fails to switch to the first target access point, update the weight value of the first target access point in the first roaming weight list.
[0119] S626: Re-determine a second target weight value that meets the preset weight condition in the updated first roaming weight list, use the candidate wireless access point corresponding to the second target weight value as the second target access point, and start roaming.
[0120] S628: If the current wireless access point is successfully switched to any target access point, it is determined that the roaming is successful.
[0121] S630: After the current wireless access point is successfully switched to any target access point, determine a second roaming weight list of the target access point, and perform subsequent roaming operations.
[0122] The second roaming weight list stores a weight value of the current wireless access point, and the weight value of the current wireless access point is used to describe the probability of the terminal switching from the first target access point to the current wireless access point.
[0123] It should be understood that, although the steps in the above flowchart are shown in sequence according to the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction for the execution of these steps, and these steps can be performed in other orders.
[0124] Moreover, at least part of the steps in the above flowchart may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0125] The present specification also provides a WiFi roaming device 600, such as Figure 6 As shown, it includes: a weight list determination module 610, a target access point determination module 620 and a roaming success determination module 630, wherein:
[0126] The weight list determination module 610 is used to determine a first roaming weight list of the current wireless access point. The current wireless access point is the wireless access point to which the terminal is currently connected. The first roaming weight list stores weight values of multiple candidate wireless access points, and the weight values are used to describe the probability of the terminal successfully switching from the current wireless access point to the corresponding candidate wireless access point.
[0127] The target access point determination module 620 is configured to determine a first target weight value satisfying a preset weight condition in the first roaming weight list, and use the candidate wireless access point corresponding to the first target weight value as the first target access point.
[0128] The roaming success determination module 630 is configured to determine that the roaming is successful if the current wireless access point is successfully switched to the first target access point.
[0129] In some implementations, the weight list determination module 610 is further configured to determine the weight value of any candidate wireless access point by: when the terminal is connected to the current wireless access point, obtaining roaming process information of switching from the current wireless access point to any candidate wireless access point. The weight value of any candidate wireless access point is determined based on the roaming process information of any candidate wireless access point.
[0130] In some implementations, the WiFi roaming device 600 further includes a target access point update module, which is used to update the weight value of the first target access point in the first roaming weight list if the current wireless access point fails to switch to the first target access point. A second target weight value that meets the preset weight condition is re-determined in the updated first roaming weight list, and the candidate wireless access point corresponding to the second target weight value is used as the second target access point.
[0131] In some implementations, the WiFi roaming device 600 further includes a second roaming weight list confirmation module, which is used to determine a second roaming weight list of the first target access point after the current wireless access point successfully switches to the first target access point. The second roaming weight list stores a weight value of the current wireless access point, and the weight value of the current wireless access point is used to describe the probability of the terminal switching from the first target access point to the current wireless access point.
[0132] In some implementations, before determining the first roaming weight list of the current wireless access point, the WiFi roaming device 600 further includes a first roaming weight list construction module, which is used to construct an empty roaming weight list if it is detected that the first roaming weight list of the current wireless access point does not exist in the system layer of the terminal. It is also used to determine the first roaming weight list of the current wireless access point, including: filling the empty roaming weight list according to the roaming process information of the current wireless access point switching to any candidate wireless access point to obtain the first roaming weight list.
[0133] In some implementations, the WiFi roaming device 600 further includes a first roaming weight list updating module, which is used to determine the weight value of the newly added wireless access point based on the roaming process information of switching from the current wireless access point to the newly added wireless access point if a newly added wireless access point is scanned; and add the weight value of the newly added wireless access point to the first roaming weight list.
[0134] In some implementations, the target access point determination module 620 is further configured to determine a first target weight value that satisfies the maximum weight value in the first roaming weight list, or to determine multiple candidate weight values that satisfy the maximum weight value in the first roaming weight list, and use the candidate weight value with the earliest storage time among the multiple candidate weight values as the first target weight value.
[0135] For the specific definition of a WiFi roaming device, please refer to the definition of a WiFi roaming method above, which will not be repeated here. Each module in the above WiFi roaming device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0136] A WiFi roaming device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0137] The embodiment of the present application also provides a computer device, which may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies.
[0138] When the computer program is executed by the processor, a WiFi roaming method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touch pad set on the computer device shell, or an external keyboard, touch pad or mouse.
[0139] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0140] The present application also provides a computer-readable storage medium, and the above method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or downloaded through a network and originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory.
[0141] It can be understood that a computer, processor, microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, processor or hardware, the method shown in the above embodiment is implemented.
[0142] The embodiment of the present application provides a computer program product, which includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of any embodiment of the present application.
[0143] The WiFi roaming method, apparatus, computer device, and storage medium described in the above embodiments may be implemented by a computer chip or entity, or by a product having a certain function. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0144] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0145] Those skilled in the art should understand that the embodiments of the present application may be provided as a WiFi roaming method, apparatus, computer device, and storage medium.
[0146] Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0147] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions.
[0148] These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0149] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0151] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0152] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0153] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0154] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. Since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0155] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
[0156] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations are all within the scope defined by the appended claims.
[0157] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0158] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0159] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0160] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0161] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0162] It is understandable that in the specific implementation of the present application, related data such as user information, location information, navigation data, etc. are involved. When the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
Claims
1. A WiFi roaming method, characterized in that: Applied to a terminal; the method comprises: Determine a first roaming weight list of a current wireless access point; wherein the current wireless access point is a wireless access point to which the terminal is currently connected; the first roaming weight list stores weight values of multiple candidate wireless access points, and the weight values are used to describe the probability of the terminal successfully switching from the current wireless access point to the corresponding candidate wireless access point; Determine a first target weight value that meets a preset weight condition in the first roaming weight list, and use the candidate wireless access point corresponding to the first target weight value as the first target access point; If the current wireless access point is successfully switched to the first target access point, it is determined that the roaming is successful.
2. The method according to claim 1, characterized in that The weight value of any candidate wireless access point is determined by: When the terminal is connected to the current wireless access point, obtaining roaming process information of switching from the current wireless access point to any candidate wireless access point; The weight value of any candidate wireless access point is determined based on the roaming process information of any candidate wireless access point.
3. The method according to claim 1, characterized in that The method further comprises: If the current wireless access point fails to switch to the first target access point, updating the weight value of the first target access point in the first roaming weight list; A second target weight value satisfying a preset weight condition is re-determined in the updated first roaming weight list, and a candidate wireless access point corresponding to the second target weight value is used as a second target access point.
4. The method according to claim 1, characterized in that: After the current wireless access point is successfully switched to the first target access point, the method further includes: Determine a second roaming weight list of the first target access point; wherein the second roaming weight list stores a weight value of the current wireless access point, and the weight value of the current wireless access point is used to describe the probability of the terminal switching from the first target access point to the current wireless access point.
5. The method according to claim 1, characterized in that Before determining the first roaming weight list of the current wireless access point, the method further includes: If it is detected that the first roaming weight list of the current wireless access point does not exist in the system layer of the terminal, construct an empty roaming weight list; The determining of the first roaming weight list of the current wireless access point includes: The empty roaming weight list is filled according to the roaming process information of switching from the current wireless access point to any candidate wireless access point to obtain the first roaming weight list.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: If a new wireless access point is scanned, determining a weight value of the new wireless access point according to roaming process information of switching from the current wireless access point to the new wireless access point; The weight value of the newly added wireless access point is added to the first roaming weight list.
7. The method according to any one of claims 1 to 5, characterized in that: The determining, in the first roaming weight list, a first target weight value that satisfies a preset weight condition includes: Determine a first target weight value that satisfies the maximum weight value in the first roaming weight list; or A plurality of candidate weight values that satisfy the maximum weight value are determined in the first roaming weight list, and a candidate weight value with the earliest storage time among the plurality of candidate weight values is used as the first target weight value.
8. A WiFi roaming device, characterized in that: Applied to a terminal; the device comprises: A weight list determination module, configured to determine a first roaming weight list of a current wireless access point; wherein the current wireless access point is a wireless access point to which the terminal is currently connected; the first roaming weight list stores weight values of a plurality of candidate wireless access points, the weight values being used to describe the probability of the terminal successfully switching from the current wireless access point to a corresponding candidate wireless access point; a target access point determination module, configured to determine a first target weight value satisfying a preset weight condition in the first roaming weight list, and use a candidate wireless access point corresponding to the first target weight value as a first target access point; The roaming success determination module is used to determine that the roaming is successful if the current wireless access point is successfully switched to the first target access point.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.