Search

US-12621647-B2 - Terminal roaming guidance method, electronic device, and storage medium

US12621647B2US 12621647 B2US12621647 B2US 12621647B2US-12621647-B2

Abstract

A terminal roaming guidance method, an electronic device, and a storage medium. The method includes: obtaining historical roaming data of a target terminal under a first target roaming policy, and determining a roaming evaluation result of the target terminal based on the historical roaming data; if the roaming evaluation result does not meet an expected requirement, adjusting a policy parameter in the first target roaming policy until the expected requirement is met, to obtain a second target roaming policy of the target terminal; and guiding the target terminal to roam to a target AP in the AP network environment based on the second target roaming policy.

Inventors

  • Zhaowei ZHONG

Assignees

  • RUIJIE NETWORKS CO., LTD.

Dates

Publication Date
20260505
Application Date
20250624
Priority Date
20230531

Claims (20)

  1. 1 . A terminal roaming guidance method, comprising: obtaining historical roaming data of a target terminal under a first target roaming policy, and determining a roaming evaluation result of the target terminal based on the historical roaming data, wherein the first target roaming policy is a roaming policy assigned based on a network profile library in a wireless access point AP network environment when the target terminal enters the AP network environment, wherein the network profile library is determined based on network environment characteristics of a plurality of various AP network profiles, and includes network profiles in the plurality of AP network environments; when the roaming evaluation result does not meet an expected requirement, adjusting a policy parameter in the first target roaming policy until the expected requirement is met, to obtain a second target roaming policy of the target terminal, wherein the expected requirement represents an optimal occasion for the target terminal to execute an optimal roaming policy; and guiding the target terminal to roam to a target AP in the AP network environment based on the second target roaming policy, wherein the target AP is a target AP in the second target roaming policy; wherein the AP network environment comprises N APs and is configured with a terminal profile library; and wherein the method further comprises: determining whether a first AP network profile that meets a similarity requirement with an AP network profile of the AP network environment exists in the network profile library; and when the first AP network profile exists, reusing the terminal profile library corresponding to the first AP network profile for the AP network environment; wherein the step of determining whether the first AP network profile that meets the similarity requirement with the AP network profile of the AP network environment exists in the network profile library comprises: determining a similarity between a mutual scanning matrix of the AP network environment and a mutual scanning matrix of a first AP network environment in the network profile library; and when the similarity meets a preset requirement, determining that the AP network profile of the AP network environment meets the similarity requirement with the first AP network profile of the first AP network environment in the network profile library.
  2. 2 . The method according to claim 1 , wherein the AP network environment comprises N APs and is configured with a terminal profile library, the terminal profile library comprises roaming policies of one or more types of terminals in the N APs, and N is an integer greater than 0; and before the obtaining the historical roaming data of the target terminal under the first target roaming policy, the method further comprises: determining a terminal type of the target terminal; and when a first terminal matching the terminal type is found in the terminal profile library based on the terminal type of the target terminal, using a roaming policy in a first AP that the first terminal is currently associated with among the N APs as the first target roaming policy of the target terminal.
  3. 3 . The method according to claim 2 , wherein the method further comprises: configuring the AP network environment with the terminal profile library.
  4. 4 . The method according to claim 3 , wherein the configuring the AP network environment with the terminal profile library comprises: determining whether a first network profile that meets a similarity requirement with an AP network profile of the AP network environment exists in the network profile library; and when the first network profile exists, reusing the terminal profile library corresponding to the first network profile for the AP network environment.
  5. 5 . The method according to claim 2 , wherein the method further comprises: when the first terminal matching the terminal type is not found in the terminal profile library based on the terminal type of the target terminal, determining an initial roaming policy of the target terminal based on mutual scanning information of the N APs in the AP network environment and roaming information of the target terminal, and using the initial roaming policy of the target terminal as the first target roaming policy of the target terminal, wherein the roaming information of the target terminal comprises one or more pieces of the following information: signal strength information, roaming time, channel utilization, a quantity of uplink bytes, a quantity of downlink bytes, a packet loss rate, or a physical rate.
  6. 6 . The method according to claim 2 , wherein a terminal profile of the terminal profile library comprises one or more pieces of the following information: a network communication capability of a terminal during roaming, a terminal name, a terminal identity, a terminal type, or roaming policies used when the terminal roams in the N APs respectively.
  7. 7 . The method according to claim 2 , wherein the determining the terminal type of the target terminal comprises one or more of the following: determining the terminal type of the target terminal by identifying a media access control address; determining the terminal type of the target terminal based on a hypertext transfer protocol HTTP communication request initiated by the target terminal; and determining the terminal type of the target terminal based on attribute information of the target terminal.
  8. 8 . The method according to claim 2 , wherein the terminal type is classified based on one or more combinations of hardware specifications.
  9. 9 . The method according to claim 1 , wherein the method further comprises: obtaining network information of N APs in the AP network environment, wherein N is an integer greater than 0; determining network environment characteristics of the AP network environment based on the network information of the N APs; and constructing an AP network profile of the AP network environment based on the network environment characteristics of the AP network environment, and storing the AP network profile in the network profile library.
  10. 10 . The method according to claim 9 , wherein the determining the network environment characteristics of the AP network environment based on the network information of the N APs comprises one or more of the following: determining the network environment characteristics of the AP network environment based on coverage information in the network information of the N APs; determining the network environment characteristics of the AP network environment based on distribution information in the network information of the N APs; determining the network environment characteristics of the AP network environment based on drop-point areas in the network information of the N APs; and determining the network environment characteristics of the AP network environment based on mutual scanning information in the network information of the N APs.
  11. 11 . The method according to claim 1 , wherein the method further comprises: obtaining mutual scanning information of M APs in a new AP network environment, wherein M is an integer greater than 0; ranking the M APs by importance based on the mutual scanning information of the M APs; constructing a mutual scanning matrix of the new AP network environment based on mutual scanning signal strength values of the M APs in the importance ranking; generating a new AP network profile of the new AP network environment based on the mutual scanning matrix of the new AP network environment; and when the new AP network profile of the new AP network environment meets a similarity requirement with the AP network profile of the AP network environment in the network profile library, reusing the terminal profile library in the AP network environment for the new AP network environment.
  12. 12 . The method according to claim 11 , wherein the method further comprises: when the new AP network profile of the new AP network environment does not meet the similarity requirement with the AP network profile in the network profile library, adding the new AP network profile to the network profile library.
  13. 13 . The method according to claim 11 , wherein the ranking the M APs by importance based on the mutual scanning information of the M APs comprises: performing the importance ranking based on the mutual scanning signal strength values of the M APs, wherein the greater a mutual scanning signal strength value, the higher the importance; or performing the importance ranking based on frequencies of the M APs, wherein the higher a frequency, the higher the importance.
  14. 14 . The method according to claim 1 , wherein the obtaining the historical roaming data of the target terminal under the first target roaming policy comprises: obtaining historical roaming data of the target terminal within a preset time period under the first target roaming policy; obtaining a preset quantity of pieces of historical roaming data of the target terminal under the first target roaming policy; or obtaining all pieces of historical roaming data of the target terminal under the first target roaming policy.
  15. 15 . The method according to claim 1 , wherein the historical roaming data comprises one or more of the following: signal strength, an uplink physical rate, a downlink physical rate, a quantity of uplink bytes, a quantity of downlink bytes, and a packet loss rate of the target terminal under the first target roaming policy; and the determining the roaming evaluation result of the target terminal based on the historical roaming data comprises: determining, based on historical roaming data before and after the target terminal executes the first target roaming policy, whether communication performance of the target terminal meets a specified expected requirement, wherein the expected requirement represents suitability of a roaming behavior of the target terminal.
  16. 16 . The method according to claim 15 , wherein the determining whether the communication performance of the target terminal meets the specified expected requirement comprises: when one piece of the historical roaming data does not meet a corresponding specified threshold, determining that the communication performance of the target terminal does not meet the specified expected requirement after the target terminal roams by using the first target roaming policy.
  17. 17 . The method according to claim 1 , wherein the adjusting the policy parameter in the first target roaming policy until the expected requirement is met comprises: based on a selected first roaming action performed by the target terminal in a current first roaming state, obtaining an expected reward and a second roaming state at a next time point; determining, based on a Q-function, a second roaming action to be performed by the target terminal in the second roaming state; and updating the Q-function based on the second roaming state, the second roaming action, and the expected reward until an updated Q-function meets the expected requirement, wherein the Q-function meets the following expression: Q(s,a)=Q(s,a)+α(r+γQ(s′,a′)−Q(s,a)), wherein s is the first roaming state, a is the first roaming action, r is the expected reward, α is a specified learning rate, γ is a specified discount rate, s′ is the second roaming state, and a′ is the second roaming action.
  18. 18 . An electronic device, comprising: a memory, configured to store a computer program; and a processor, configured to execute the computer program stored in the memory, to implement the steps of the method according to claim 1 .
  19. 19 . A non-transitory computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method according to claim 1 are implemented.
  20. 20 . A terminal roaming guidance method, comprising: obtaining historical roaming data of a target terminal under a first target roaming policy, and determining a roaming evaluation result of the target terminal based on the historical roaming data, wherein the first target roaming policy is a roaming policy assigned based on a network profile library in a wireless access point AP network environment when the target terminal enters the AP network environment; wherein the network profile library is determined based on environment characteristics of various AP network profiles, and includes network profiles in a plurality of AP network environments; when the roaming evaluation result does not meet an expected requirement, adjusting a policy parameter in the first target roaming policy until the expected requirement is met, to obtain a second target roaming policy of the target terminal, wherein the expected requirement represents an optimal occasion for the target terminal to execute an optimal roaming policy; guiding the target terminal to roam to a target AP in the AP network environment based on the second target roaming policy, wherein the target AP is a target AP in the second target roaming policy; and wherein the adjusting the policy parameter in the first target roaming policy until the expected requirement is met comprises: based on a selected first roaming action performed by the target terminal in a current first roaming state, obtaining an expected reward and a second roaming state at a next time point; determining, based on a Q-function, a second roaming action to be performed by the target terminal in the second roaming state; and updating the Q-function based on the second roaming state, the second roaming action, and the expected reward until an updated Q-function meets the expected requirement, wherein the Q-function meets the following expression: Q(s,a)=Q(s,a)+α(r+γQ(s′,a′)−Q(s,a)), wherein s is the first roaming state, a is the first roaming action, r is the expected reward, α is a specified learning rate, γ is a specified discount rate, s′ is the second roaming state, and a′ is the second roaming action.

Description

CROSS-REFERENCE TO RELATED APPLICATIONS This application is a continuation of International Patent Application No. PCT/CN2024/086124 filed on Apr. 3, 2024, which claims priority to Chinese Patent Application No. 202310636473. X, filed with the China National Intellectual Property Administration on May 31, 2023 and entitled “TERMINAL ROAMING GUIDANCE METHOD AND APPARATUS, ELECTRONIC DEVICE, AND STORAGE MEDIUM”, which are incorporated herein by reference in their entireties. TECHNICAL FIELD This application relates to the field of network communication technologies, and in particular, to a terminal roaming guidance method, an electronic device, and a storage medium. BACKGROUND In a wireless communication network, a terminal device can always maintain network communication within signal coverage of a wireless access point (AP). However, because signal coverage of a single AP device (also known as a service area of the AP) is limited, the terminal device usually crosses from a service area of one AP to a service area of another AP during movement. To avoid an interruption of network communication of the terminal device when the terminal device is handed over between different APs, a wireless roaming technology is introduced for terminal devices. Wireless roaming means that when a terminal device moves to a critical area within coverage areas of two APs, the terminal device is associated with a new AP and disassociated from an original AP (an AP initially associated with). In this process, the terminal device maintains an uninterrupted network connection. This wireless roaming mode needs to be aggressively initiated by the terminal device. However, some terminal devices with poor roaming aggressiveness (for example, low-end mobile phones and tablets and the like) may stick to an AP that they are originally associated with, and may not roam to an AP with high signal quality even if they are far away from the AP that they are originally associated with and their signals are weak as the terminal device moves. This type of terminal device may be referred to as a sticky terminal device. This type of sticky terminal device cannot implement autonomous roaming relying on the terminal device itself. In this case, emergence of an intelligent roaming mode resolves this problem well. The intelligent roaming mode can guide the terminal device to roam in a way that the terminal device can understand. Compared with autonomous roaming of the terminal device, this mode is more intelligent. SUMMARY Exemplary embodiments of this application provide a terminal roaming guidance method, an electronic device, and a storage medium. According to a first aspect, a terminal roaming guidance method is provided and includes: obtaining historical roaming data of a target terminal under a first target roaming policy, and determining a roaming evaluation result of the target terminal based on the historical roaming data, where the first target roaming policy is a roaming policy assigned based on a network profile library in a wireless access point AP network environment when the target terminal enters the AP network environment;if the roaming evaluation result does not meet an expected requirement, adjusting a policy parameter in the first target roaming policy until the expected requirement is met, to obtain a second target roaming policy of the target terminal, where the expected requirement represents an optimal occasion for the target terminal to execute an optimal roaming policy; andguiding the target terminal to roam to a target AP in the AP network environment based on the second target roaming policy, where the target AP is a target AP in the second target roaming policy. In a possible embodiment, the AP network environment includes N APs and is configured with a terminal profile library, the terminal profile library includes roaming policies of one or more types of terminals in the N APs, and N is an integer greater than 0; and before the obtaining the historical roaming data of the target terminal under the first target roaming policy, the method further includes:determining a terminal type of the target terminal; andif a first terminal matching the terminal type is found in the terminal profile library based on the terminal type of the target terminal, using a roaming policy in a first AP that the first terminal is currently associated with among the N APs as the first target roaming policy of the target terminal. In a possible embodiment, configuring the terminal profile library in the AP network environment includes: determining whether a first network profile that meets a similarity requirement with an AP network profile of the AP network environment exists in the network profile library; andif the first network profile exists, reusing the terminal profile library corresponding to the first network profile for the AP network environment. In a possible embodiment, the method further includes: if the first terminal matching the ter