Network switching method and apparatus, and terminal device and computer-readable storage medium
By acquiring the current network status and candidate network parameters of the terminal device, and combining the usage scenario and historical connection information, the target network is determined for switching, which solves the problem of network interruption during network switching of smart devices and achieves stable network connection.
Patent Information
- Application Number
- PCT/CN2025/078994
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-26
- Filing Date
- 2025-02-25
- Publication Date
- 2025-10-30
AI Technical Summary
In existing technologies, when a smart device determines that it needs to switch networks, directly switching networks may result in poor signal strength of the network to be connected, leading to network outages.
By obtaining the current network connection status information of the terminal device and the connection parameters of the candidate networks, combined with the current usage scenario information and historical network connection information, the target network is determined for switching, thus avoiding unstable network connections.
Ensure a smooth connection to the target network during network switching to avoid network disconnection issues in the user experience and guarantee network smoothness.
Smart Images

Figure CN2025078994_30102025_PF_FP_ABST
Abstract
Description
Network switching methods, devices, terminal equipment and computer-readable storage media
[0001] This application claims priority to Chinese patent application filed on April 26, 2024, with application number 202410522181.8 and entitled "Network switching method, apparatus, terminal equipment and computer-readable storage medium", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of communication technology, specifically to a network switching method, apparatus, terminal equipment, and computer-readable storage medium. Background Technology
[0003] For most smart terminals such as personal computers (PCs), mobile phones, and televisions, Wi-Fi has become an important wireless networking method. The application of Wi-Fi technology in smart terminals is becoming increasingly widespread. As the number of Wi-Fi-enabled smart terminals increases, the number of wireless workstations (STAs) connected to Wi-Fi routers will also increase. To meet the Wi-Fi needs of multiple smart terminals, users will adopt a network configuration using multiple Wi-Fi access points (APs), which will also have the function of intelligently adjusting the load on the STAs. If the current Wi-Fi network load is high or the network conditions are poor, it is necessary to instruct the STAs to switch Wi-Fi connections to ensure that each AP in the network operates in an optimal state, guaranteeing a good Wi-Fi network experience for end users. Technical issues
[0004] In existing technologies, if a smart device determines that it needs to switch networks, it will directly switch networks. However, the drawback of this approach is that it first disconnects the current network and then attempts to connect to the network to be connected. If the network to be connected also has poor signal or other problems, the smart device will be unable to connect successfully, resulting in a network outage. Technical solutions
[0005] This application provides a network switching method that can effectively ensure the network connection of terminal devices.
[0006] In a first aspect, this application provides a network switching method, the method comprising:
[0007] Obtain the current network connection status information;
[0008] If the connection status information meets the preset switching conditions, then the connection parameters of each candidate network in one or more candidate networks are obtained;
[0009] Based on the current usage scenario information, historical network connection information, and the connection parameters of each candidate network, a target network is determined from the one or more candidate networks;
[0010] Switch the current network to the target network and conduct network communication based on the target network.
[0011] In some embodiments of this application, before obtaining the connection parameters of the candidate network if the connection status information meets the preset switching conditions, the method further includes:
[0012] Get the number of network switches within a target time period;
[0013] Determine whether the number of network handovers is less than or equal to a preset threshold number;
[0014] If the number of network switching attempts is less than or equal to the preset threshold number, the connection status information is determined to meet the preset switching conditions.
[0015] If the number of network switching attempts exceeds the preset threshold, it is determined that the connection status information does not meet the preset switching conditions.
[0016] In some embodiments of this application, determining the target network from one or more candidate networks based on the current usage scenario information of the terminal device, historical network connection information, and connection parameters of each candidate network includes:
[0017] Identify the usage scenario type of the current usage scenario information;
[0018] If the usage scenario type meets the preset switchable adjustment, then the target network is determined from the one or more candidate networks based on the historical network connection information and the connection parameters of each candidate network.
[0019] In some embodiments of this application, determining the target network from one or more candidate networks based on the historical network connection information and the connection parameters of each candidate network includes:
[0020] Extract the number of connections within a preset time period from the historical network connection information, and extract preset list marking information from the historical network connection information;
[0021] If the number of connections is less than a preset connection number threshold, and the preset list of markers does not include each candidate network, then the connection prediction result for each candidate network is determined based on the connection parameters corresponding to each candidate network.
[0022] The target network is selected from the one or more candidate networks based on the connection prediction results of each candidate network.
[0023] In some embodiments of this application, determining the connection prediction result for each candidate network based on the connection parameters corresponding to each candidate network includes:
[0024] Extract the connection result information of each candidate network within the historical time period from the historical network connection information;
[0025] Based on the connection parameters corresponding to each candidate network and the connection result information of the terminal device for each candidate network, a connection prediction result for each candidate network is determined.
[0026] In some embodiments of this application, the historical network connection information includes the number of connection failures and reconnection attempts between the terminal device and the historical network. The step of determining the connection prediction result for each candidate network based on the connection parameters corresponding to each candidate network includes:
[0027] Determine whether there exists a target candidate network in the historical network that is the same as one or more candidate networks;
[0028] If the target candidate network exists, the number of target connection failures and the number of target reconnections for the target candidate network are determined based on the historical network connection information.
[0029] The number of target connection failures is compared with a failure count threshold to obtain a first comparison result;
[0030] The target reconnection count is compared with the reconnection count threshold to obtain a second comparison result;
[0031] Based on the first comparison result and the second comparison result, the connection prediction result of the target candidate network is determined.
[0032] In some embodiments of this application, determining the connection prediction result of the target candidate network based on the first comparison result and the second comparison result includes:
[0033] If the first comparison result indicates that the number of target connection failures is less than the failure number threshold, and the second comparison result indicates that the number of target reconnections is greater than or equal to the reconnection number threshold, then the connection prediction result for the successful connection of the target candidate network is obtained.
[0034] If the first comparison result indicates that the number of target connection failures is greater than or equal to the failure number threshold, and the second comparison result indicates that the number of target reconnections is less than the reconnection number threshold, then the connection prediction result of the successful connection of the target candidate network is obtained.
[0035] If the first comparison result indicates that the number of target connection failures is greater than or equal to the failure number threshold, and the second comparison result indicates that the number of target reconnections is greater than or equal to the reconnection number threshold, then the connection prediction result of the target candidate network connection failure is obtained.
[0036] Secondly, this application also provides a network switching device, the device comprising:
[0037] The first acquisition module is used to acquire the current network connection status information;
[0038] The second acquisition module is used to acquire the connection parameters of each candidate network in one or more candidate networks if the connection status information acquired by the first acquisition module meets the preset switching conditions.
[0039] The determination module is used to determine the target network from the one or more candidate networks based on the current usage scenario information, historical network connection information, and the connection parameters of each candidate network obtained by the second acquisition module;
[0040] The switching module is used to switch the current network to the target network determined by the determining module, and to perform network communication based on the target network.
[0041] Thirdly, this application also provides a terminal device, the terminal device including a processor, a memory, and a computer program stored in the memory and executable on the processor, the processor executing the computer program to implement the steps in any of the network handover methods described above.
[0042] Fourthly, this application also provides a computer-readable storage medium storing a computer program that is executed by a processor to implement the steps in any of the network handover methods described above. Beneficial effects
[0043] The network switching method provided in this application can first obtain the current network connection status information of the terminal device and the connection parameters of relevant candidate networks. Then, based on the terminal device's current usage scenario information, historical network connection information, and the connection parameters of each candidate network, a target network that can be successfully switched to can be determined from the candidate networks. Therefore, the problem of the switched network failing to connect smoothly during network switching will not occur, ensuring smooth network operation. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 is a schematic diagram of a network switching system provided in an embodiment of this application.
[0046] Figure 2 is a flowchart of an embodiment of the network switching method in this application;
[0047] Figure 3 is a schematic diagram of a functional module of the network switching device in an embodiment of this application;
[0048] Figure 4 is a schematic diagram of the structure of the terminal device in an embodiment of this application. Embodiments of the present invention
[0049] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0050] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0051] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. Furthermore, it is understood that in the specific embodiments of this application, user information, user data, and other related data are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0052] To enable any person skilled in the art to implement and use this application, the following description is provided. In this description, details are set forth for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be implemented without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0053] This application provides a network switching method, apparatus, device, and storage medium, which are described in detail below.
[0054] Please refer to Figure 1, which is a schematic diagram of a network switching system provided in an embodiment of this application. The network switching system may include a terminal device 100 and a network device 200, and the network device 200 may transmit data to the terminal device 100. As shown in Figure 1, the terminal device 100 may establish a communication connection with the network device 200 to execute the network switching method in this application.
[0055] In this embodiment, the terminal device 100 may include, but is not limited to, desktop computers, portable computers, network servers, PDAs (personal digital assistants), tablet computers, wireless terminal devices, embedded devices, etc. The network device 200 may be a router, base station, or other signal transmission device.
[0056] In the embodiments of this application, the terminal device 100 and the network device 200 can communicate through any communication method, including but not limited to mobile communication based on the 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), and Worldwide Interoperability for Microwave Access (WiMAX), or computer network communication based on the TCP / IP Protocol Suite (TCP / IP) and User Datagram Protocol (UDP).
[0057] It should be noted that the network handover system scenario diagram shown in Figure 1 is merely an example. The network handover system and scenario described in this application embodiment are intended to more clearly illustrate the technical solutions of this application embodiment and do not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of network handover systems and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.
[0058] As shown in Figure 2, Figure 2 is a schematic flowchart of an embodiment of the network switching method in this application. The network switching method may include the following steps 201 to 204:
[0059] 201. Obtain the current network connection status information of the terminal device.
[0060] In this embodiment, the current network connection status information may include network connection time, current traffic usage, whether the terminal device has reconnected to the current network, the number of reconnections, the average connection duration of each connection, etc. The specific embodiments of this application are not limited.
[0061] 202. If the connection status information meets the preset switching conditions, then obtain the connection parameters of the candidate network.
[0062] In this embodiment, the connection status information can include the current network traffic usage of the terminal device. Therefore, based on the current traffic usage, the network traffic volume per unit time is analyzed to determine whether the current network is experiencing lag. For example, a traffic threshold can be set, or it can be determined whether there are network fluctuations in related applications when the user is using the current network, thereby determining whether the terminal device is experiencing lag. If lag exists, it indicates that the current network condition of the terminal device is poor, and it needs to be switched to another network with better network performance. At this time, the connection parameters of the candidate network are obtained.
[0063] In this embodiment, the candidate network can be any other network that the terminal device can search for. When obtaining the connection parameters of the candidate network, a pre-connection can be performed with the candidate network to test its connection parameters such as traffic and speed. For example, if the terminal device can connect to multiple networks, a pre-connection with the candidate network can be performed. Specific embodiments of this application are not limited in this regard.
[0064] 203. Based on the current usage scenario information of the terminal device, historical network connection information, and connection parameters of each candidate network, determine the target network from the candidate networks.
[0065] In this embodiment, the current usage scenario information of the terminal device can be the current operating mode of the terminal device. In some modes, when no network is needed or there is no significant demand for network speed, network switching is not required. In this case, even if the current network speed is slow, network switching is not necessary. In other words, when the terminal device is in a scenario where a high-load network is not required, network switching is not necessary. Therefore, the terminal device can obtain its local network traffic demand. For example, the current network bandwidth is usually 100 Mbps, 200 Mbps, or higher. Therefore, if the terminal device currently only requires a network speed of 500 KB / s, and the current network is not congested and can smoothly provide a network speed of 500 KB / s, then the current usage scenario information of the terminal device can be described as a low-speed-demand scenario. Otherwise, the current usage scenario information of the terminal device can be determined as a high-speed-demand scenario. When in a high-load scenario, network switching is required.
[0066] Meanwhile, it should be noted that in this embodiment, the connection logs of historical networks in the local storage of the terminal device can be obtained as historical connection parameters. The names of the historical networks recorded in the logs are then compared with the names of candidate networks to determine the identity of the candidate network. After identity determination, data such as the number of historical connections and historical traffic of the candidate network with the confirmed identity are obtained from the logs as connection parameters for the candidate network. It should be noted that if the current usage scenario requires network access, and the connection parameters of the candidate network indicate the existence of a candidate network with better current network conditions, then the historical connection parameters are used to determine whether the terminal device has connected to that candidate network. If it has, the historical connection parameters are used to determine the number of connections, reconnection counts, and other relevant data to determine whether a successful connection with the candidate network is possible. For example, if the terminal device has multiple connections to the candidate network, it can be determined that the candidate network is also a frequently used network for the terminal device. Furthermore, if the number of reconnections during the connection is less than a certain threshold, it can be proven that the candidate network has good stability, and switching to that candidate network is possible.
[0067] Additionally, it should be noted that if multiple similar candidate networks exist, the network speeds of each candidate network should be compared, and the candidate network with the highest network speed should be selected as the target network for switching.
[0068] 204. Switch the terminal device from the current network to the target network and conduct network communication based on the target network.
[0069] Once a candidate network is identified, the terminal device connects to the target network and disconnects from the currently connected network; the specifics will not be elaborated here.
[0070] The network switching method provided in this application first obtains the current network connection status information of the terminal device and the connection parameters of relevant candidate networks. Then, based on the terminal device's current usage scenario information, historical network connection information, and the connection parameters of each candidate network, a target network that can be successfully switched to is determined from the candidate networks. Therefore, the problem of the switched network failing to connect smoothly during network switching is avoided, ensuring smooth network operation.
[0071] To better implement the embodiments of this application, in one embodiment of this application, if the connection status information meets the preset switching conditions, before obtaining the connection parameters of the candidate network, the method further includes:
[0072] Obtain the number of network switching operations of the terminal device within the target time period; determine whether the number of network switching operations is less than or equal to a preset threshold; if the number of network switching operations is less than or equal to the preset threshold, determine that the connection status information meets the preset switching conditions; if the number of network switching operations is greater than the preset threshold, determine that the connection status information does not meet the preset switching conditions.
[0073] The above embodiments provide an implementation method that determines whether a switching condition is met and thus requires switching only when the current network conditions are poor. However, in reality, network switching presents at least the following problems: for example, programs that require the network may suddenly experience lag during switching, especially in game mode, where this lag can severely impact the user experience. Therefore, frequent network switching, compared to poor network speed, also affects the user's network experience.
[0074] Based on this, this application also provides an implementation method, namely, obtaining the number of network switching times of the current terminal device within a target time period. For example, if the number of network switching times per hour after the terminal device is turned on exceeds 5 or 10 times, it is determined that all networks in the terminal device's environment have varying degrees of network problems, leading to frequent network switching. In this case, since all networks have problems, if the poor network conditions cannot be resolved after switching, network switching can be avoided to ensure that the user does not experience network lag during network switching. Therefore, based on the above embodiments, the number of network switching times per unit time can be detected first. When the number of switching times per unit time is low, it can be determined whether the current network is lagging. If lagging is detected, then the connection data of candidate networks can be obtained. Alternatively, the number of switching times per unit time can be used as the sole criterion to determine whether the switching conditions are met. This application does not limit the specific implementation.
[0075] To better implement the embodiments of this application, in one embodiment, a target network is determined from the candidate networks based on the current usage scenario information of the terminal device, historical network connection information, and connection parameters of each candidate network, including:
[0076] Identify the usage scenario type of the current usage scenario information; if the usage scenario type meets the preset switchable adjustment, then determine the target network from the candidate networks based on the historical network connection information and the connection parameters of each candidate network.
[0077] The above embodiments provide a solution for detecting network speed requirements as information about the current usage scenario, thereby further determining whether a network switch is necessary. To conserve computing resources for calculating network load, the determination of the current usage scenario can be based solely on the terminal device's current operating mode. For example, if the terminal device is in a mode that does not require network load, such as screen mirroring, there is no need to switch network environments. However, if it is in game mode or online video viewing mode, a network switch is necessary when network conditions are poor. In this case, it is unnecessary to obtain the current network speed and then calculate whether the current network speed falls under the high-speed-demand or low-speed-demand scenarios for the terminal device, thus saving certain computing resources.
[0078] To better implement the embodiments of this application, in one embodiment, the target network is determined from the candidate networks based on historical network connection information and the connection parameters of each candidate network, including:
[0079] Extract the number of connections within a preset time period from the current time from the historical network connection information, and extract the preset list marker information from the historical network connection information; if the number of connections is less than the preset connection number threshold, and the preset list marker information does not contain each candidate network, then determine the connection prediction result for each candidate network according to the connection parameters corresponding to each candidate network; and select the target network from the candidate networks according to the connection prediction result.
[0080] The above embodiments provide an implementation method that only requires network switching when the current network speed is slow. However, in some application scenarios, although the network to be connected may have good network conditions, Wi-Fi signal pairing may be difficult when the terminal device connects to that network, for example, when there are many obstacles, which may hinder the network connection. Therefore, it is also necessary to detect whether the network to be connected is stable. Therefore, in this embodiment, the number of times each historical network has been connected can be used as a reference. When the number of connections is high, it can be proven that the network is a frequently used network, which can indirectly prove that the network connection is relatively stable.
[0081] Furthermore, in this embodiment, the preset list marking information can be a blacklist, which can be set by the user. For example, some network signals are poor, but terminal devices will still automatically connect. In this case, the user can choose to add the network to the blacklist to block it. Therefore, in this embodiment, while obtaining the number of connections, it is also possible to detect whether the candidate network is a network in the blacklist. If it is not a network in the blacklist, the connection prediction result of each candidate network that is not in the blacklist and has a connection count greater than the connection count threshold is predicted.
[0082] Since terminal devices can detect the network signal strength of each candidate network, such as the number of signal bars on a Wi-Fi list, they can determine whether a successful connection can be established based on the signal strength of the candidate network. If the signal strength is greater than a certain threshold, the connection prediction for that candidate network is considered successful; if the signal strength is less than or equal to a certain threshold, the connection prediction for that candidate network is considered unsuccessful.
[0083] To better implement the embodiments of this application, in one embodiment, the connection prediction result for each candidate network is determined based on the connection parameters corresponding to each candidate network, including:
[0084] The connection results of the terminal device connecting to each candidate network at a historical time are extracted from the historical network connection information; based on the connection parameters corresponding to each candidate network and the connection results of the terminal device for each candidate network, the connection prediction results for each candidate network are determined.
[0085] The above embodiments provide an implementation method for predicting connection results based on the signal strength of candidate networks. However, in some cases, although network strength can be guaranteed, it is possible that networks with good strength may periodically disappear. For example, the network signal may disappear every afternoon. If a network switch has just been performed and the network disappears again, a new network switch is required. In this case, it can be concluded that the network cannot maintain stability after the switch. Therefore, to avoid this situation, the connection history of the terminal device with each candidate network can be extracted from historical network connection information. This allows for the extraction of information such as the length of connection time with each candidate network in the past, when the connection occurred, and when it was disconnected. This analysis can determine whether the current switch to a candidate network can maintain network stability. If network stability can be maintained, the connection prediction result can be considered successful, and then a network switch can be performed.
[0086] It should be noted that the embodiments of this application only list one scenario where network switching might result in a disconnection, and this scenario is considered unstable. This also includes situations where the switched network experiences periodic network fluctuations after the network switch, which can also be considered unstable. Other scenarios that can determine network instability will not be elaborated upon here. Therefore, based on various historical connection parameters, it can be determined whether a candidate network can maintain stability after a switch.
[0087] To better implement the embodiments of this application, in one embodiment, the historical network connection information includes the number of connection failures and reconnection attempts between the terminal device and the historical network. The connection prediction result for each candidate network is determined based on the connection parameters corresponding to each candidate network, including:
[0088] Determine whether there is a target candidate network in the historical network that is the same as the candidate network; if there is a target candidate network, determine the number of target connection failures and the number of target reconnections based on the historical network connection information; compare the number of target connection failures with the failure number threshold to obtain a first comparison result; compare the number of target reconnections with the reconnection number threshold to obtain a second comparison result; determine the connection prediction result of the target candidate network based on the first comparison result and the second comparison result.
[0089] The above embodiments provide a method for determining whether a candidate network can maintain stability based on historical connection data and obtaining related connection prediction results. This application also provides a relatively simple prediction method with low computational resource consumption. Specifically, it can determine whether a connection can be successfully established and maintained stably based solely on the number of connection failures and reconnections for each candidate network present in historical network connection information. The number of connection failures indicates whether a connection can be successfully established, and the number of reconnections indicates whether a stable connection can be maintained. Specifically, only when a first comparison result (the target number of connection failures being less than a failure threshold) and a second comparison result (the target number of reconnections being less than a reconnection threshold) are obtained can it be determined that the candidate network to be connected can both connect successfully and maintain connection stability, at which point a successful connection prediction result can be obtained; otherwise, only a failed connection prediction result can be obtained.
[0090] To better implement the embodiments of this application, in one embodiment, the connection prediction result of the target candidate network is determined based on the first comparison result and the second comparison result, including:
[0091] If the first comparison result indicates that the number of target connection failures is less than the failure count threshold, and the second comparison result indicates that the number of target reconnections is greater than or equal to the reconnection count threshold, a connection prediction result for a successful connection to the target candidate network is obtained; if the first comparison result indicates that the number of target connection failures is greater than or equal to the failure count threshold, and the second comparison result indicates that the number of target reconnections is less than the reconnection count threshold, a connection prediction result for a successful connection to the target candidate network is obtained; if the first comparison result indicates that the number of target connection failures is greater than or equal to the failure count threshold, and the second comparison result indicates that the number of target reconnections is greater than or equal to the reconnection count threshold, a connection prediction result for a failed connection to the target candidate network is obtained.
[0092] The above embodiments provide a scheme where the target number of reconnections must be less than a reconnection threshold and the target number of connection failures must be less than a failure threshold to obtain a successful connection prediction result. However, this application embodiment also provides a scheme where either one of these conditions must be met to obtain a successful connection prediction result. Specifically, in some cases, when the current network connection is in a very poor condition, if switching can improve network speed, even if the network signal strength of the candidate network to be connected is poor, if connecting can improve the user's network within a certain period of time, the scheme in this embodiment can also be selected. Therefore, if it is determined that the current network speed is less than a very low target network speed threshold, then a network switching can be performed by selecting a method where only one comparison result passes the determination.
[0093] To better implement the network handover method in the embodiments of this application, a network handover device is also provided in the embodiments of this application, as shown in FIG3. The device 300 includes:
[0094] The first acquisition module 301 is used to acquire the current network connection status information of the terminal device;
[0095] The second acquisition module 302 is used to acquire the connection parameters of the candidate network if the connection status information meets the preset switching conditions.
[0096] The determination module 303 is used to determine the target network from the candidate networks based on the current usage scenario information of the terminal device, historical network connection information, and connection parameters of each candidate network;
[0097] The switching module 304 is used to switch the terminal device from the current network to the target network and conduct network communication based on the target network.
[0098] The network switching device provided in this application can first obtain the current network connection status information and connection parameters of relevant candidate networks of the terminal device through the first acquisition module 301 and the second acquisition module 302. At this time, based on the current usage scenario information, historical network connection information and connection parameters of each candidate network of the terminal device, the determination module 303 can determine the target network that can be successfully switched from the candidate networks. Then, the switching module 304 performs the network switching. Therefore, the problem of the switched network failing to connect successfully will not occur when the user is switching networks, ensuring smooth network operation.
[0099] In some embodiments of this application, the determining module 303 is specifically used for:
[0100] Obtain the number of network switching times of the terminal device within the target time period;
[0101] Determine whether the number of network handovers is less than or equal to a preset threshold.
[0102] If the number of network switching attempts is less than or equal to the preset threshold, the connection status information is determined to meet the preset switching conditions.
[0103] If the number of network switching attempts exceeds a preset threshold, it is determined that the connection status information does not meet the preset switching conditions.
[0104] In some embodiments of this application, the determining module 303 is further configured to:
[0105] Identify the usage scenario type of the current usage scenario information;
[0106] If the usage scenario type meets the preset switchable adjustment, the target network is determined from the candidate networks based on historical network connection information and the connection parameters of each candidate network.
[0107] In some embodiments of this application, the determining module 303 is further configured to:
[0108] Extract the number of connections within a preset time period from the current time from historical network connection information, and extract preset list marking information from historical network connection information;
[0109] If the number of connections is less than the preset connection threshold and the preset list of candidate networks is not included, then the connection prediction result for each candidate network is determined based on the connection parameters corresponding to each candidate network.
[0110] The target network is selected from the candidate networks based on the connection prediction results.
[0111] In some embodiments of this application, the determining module 303 is further configured to:
[0112] Extract the connection results of the terminal device to each candidate network at a historical time from the historical network connection information;
[0113] Based on the connection parameters corresponding to each candidate network and the connection result information of the terminal device for each candidate network, the connection prediction result for each candidate network is determined.
[0114] In some embodiments of this application, the determining module 303 is further configured to:
[0115] Determine if a target candidate network identical to the candidate network exists in the historical network;
[0116] If a target candidate network exists, determine the number of target connection failures and the number of target reconnections for the target candidate network based on historical network connection information;
[0117] The number of target connection failures is compared with the failure count threshold to obtain the first comparison result;
[0118] The target reconnection count is compared with the reconnection count threshold to obtain the second comparison result;
[0119] Based on the first comparison result and the second comparison result, the connection prediction result of the target candidate network is determined.
[0120] In some embodiments of this application, the determining module 303 is further configured to:
[0121] If the first comparison result indicates that the number of target connection failures is less than the failure number threshold, and the second comparison result indicates that the number of target reconnections is greater than or equal to the reconnection number threshold, the connection prediction result of the successful connection of the target candidate network is obtained.
[0122] If the first comparison result indicates that the number of target connection failures is greater than or equal to the failure number threshold, and the second comparison result indicates that the number of target reconnections is less than the reconnection number threshold, the connection prediction result of the successful connection of the target candidate network is obtained.
[0123] If the first comparison result indicates that the number of target connection failures is greater than or equal to the failure number threshold, and the second comparison result indicates that the number of target reconnections is greater than or equal to the reconnection number threshold, then the connection prediction result of the target candidate network connection failure is obtained.
[0124] This application also provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the steps of any of the network handover methods in this application. This terminal device integrates any of the network handover methods provided in this application, as shown in Figure 4, which illustrates the structural diagram of the terminal device involved in this application. Specifically:
[0125] The terminal device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that the terminal device structure shown in FIG4 does not constitute a limitation on the terminal device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0126] The processor 401 is the control center of the terminal device. It connects various parts of the terminal device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, thereby providing overall monitoring of the terminal device. Optionally, the processor 401 may include one or more processing cores; the processor 401 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor. Preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and application programs, and the modem processor mainly handles wireless communication. It is understood that the aforementioned modem processor may not be integrated into the processor 401.
[0127] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0128] The terminal device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0129] The terminal device may also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0130] Although not shown, the terminal device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the terminal device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, such as:
[0131] Obtain the current network connection status information of the terminal device;
[0132] If the connection status information meets the preset switching conditions, then obtain the connection parameters of the candidate network;
[0133] Based on the current usage scenario information of the terminal device, historical network connection information, and connection parameters of each candidate network, the target network is determined from the candidate networks;
[0134] Switch the terminal device from the current network to the target network, and conduct network communication based on the target network.
[0135] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0136] Therefore, embodiments of this application provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the network handover methods provided in embodiments of this application. For example, the computer program loaded by the processor can execute the following steps:
[0137] Obtain the current network connection status information of the terminal device;
[0138] If the connection status information meets the preset switching conditions, then obtain the connection parameters of the candidate network;
[0139] Based on the current usage scenario information of the terminal device, historical network connection information, and connection parameters of each candidate network, the target network is determined from the candidate networks;
[0140] Switch the terminal device from the current network to the target network, and conduct network communication based on the target network.
[0141] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.
[0142] In practice, each of the above units or structures can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, which will not be repeated here.
[0143] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0144] The foregoing has provided a detailed description of a network switching method and apparatus provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A network handover method, wherein, The method includes: Obtain the current network connection status information; If the connection status information meets the preset switching conditions, then the connection parameters of each candidate network in one or more candidate networks are obtained; Based on the current usage scenario information, historical network connection information, and the connection parameters of each candidate network, a target network is determined from the one or more candidate networks; Switch the current network to the target network and conduct network communication based on the target network.
2. The network handover method according to claim 1, wherein, Before obtaining the connection parameters of the candidate network if the connection status information meets the preset switching conditions, the method further includes: Get the number of network switches within a target time period; Determine whether the number of network handovers is less than or equal to a preset threshold number; If the number of network switching attempts is less than or equal to the preset threshold number, the connection status information is determined to meet the preset switching conditions. If the number of network switching attempts exceeds the preset threshold, it is determined that the connection status information does not meet the preset switching conditions.
3. The network handover method according to claim 1, wherein, Before obtaining the connection parameters of the candidate network if the connection status information meets the preset switching conditions, the method further includes: Get the number of network switches within a target time period; Detect the number of network switches per unit time; If the number of switching times per unit time is less than or equal to the preset threshold, determine whether the current network is lagging. If there is a lag, it is determined that the connection status information meets the preset switching conditions.
4. The network handover method according to claim 1, wherein, The step of determining the target network from one or more candidate networks based on the current usage scenario information of the terminal device, historical network connection information, and connection parameters of each candidate network includes: Identify the usage scenario type of the current usage scenario information; If the usage scenario type meets the preset switchable adjustment, then the target network is determined from the one or more candidate networks based on the historical network connection information and the connection parameters of each candidate network.
5. The network handover method according to claim 4, wherein, The usage scenario type for identifying the current usage scenario information includes: Based on the current operating mode, identify the usage scenario type of the current usage scenario information.
6. The network handover method according to claim 4, wherein, The step of determining the target network from one or more candidate networks based on the historical network connection information and the connection parameters of each candidate network includes: Extract the number of connections within a preset time period from the historical network connection information, and extract preset list marking information from the historical network connection information; If the number of connections is less than a preset connection number threshold, and the preset list of markers does not include each candidate network, then the connection prediction result for each candidate network is determined based on the connection parameters corresponding to each candidate network. The target network is selected from the one or more candidate networks based on the connection prediction results of each candidate network.
7. The network handover method according to claim 6, wherein, The step of determining the connection prediction result for each candidate network based on the connection parameters corresponding to each candidate network includes: Extract the connection result information of each candidate network within the historical time period from the historical network connection information; Based on the connection parameters corresponding to each candidate network and the connection result information of the terminal device for each candidate network, a connection prediction result for each candidate network is determined.
8. The network handover method according to claim 6, wherein, The historical network connection information includes the number of connection failures and reconnection attempts between the terminal device and the historical network. Determining the connection prediction result for each candidate network based on the connection parameters corresponding to each candidate network includes: Determine whether there exists a target candidate network in the historical network that is the same as one or more candidate networks; If the target candidate network exists, the number of target connection failures and the number of target reconnections for the target candidate network are determined based on the historical network connection information. The number of target connection failures is compared with a failure count threshold to obtain a first comparison result; The target reconnection count is compared with the reconnection count threshold to obtain a second comparison result; Based on the first comparison result and the second comparison result, the connection prediction result of the target candidate network is determined.
9. The network handover method according to claim 8, wherein, The step of determining the connection prediction result of the target candidate network based on the first comparison result and the second comparison result includes: If the first comparison result is obtained that the number of target connection failures is less than the failure threshold, and the second comparison result is obtained that the number of target reconnections is less than the reconnection threshold, then a connection prediction result of success is obtained.
10. The network handover method according to claim 8, wherein, The step of determining the connection prediction result of the target candidate network based on the first comparison result and the second comparison result includes: If the first comparison result indicates that the number of target connection failures is less than the failure number threshold, and the second comparison result indicates that the number of target reconnections is greater than or equal to the reconnection number threshold, then the connection prediction result for the successful connection of the target candidate network is obtained. If the first comparison result indicates that the number of target connection failures is greater than or equal to the failure number threshold, and the second comparison result indicates that the number of target reconnections is less than the reconnection number threshold, then the connection prediction result of the successful connection of the target candidate network is obtained. If the first comparison result indicates that the number of target connection failures is greater than or equal to the failure number threshold, and the second comparison result indicates that the number of target reconnections is greater than or equal to the reconnection number threshold, then the connection prediction result of the target candidate network connection failure is obtained.
11. The network handover method according to claim 10, wherein, Before the first comparison result indicates that the number of target connection failures is less than the failure count threshold, the method further includes: Check the current network speed; If the current network speed is less than the target network speed threshold, then the method described in claim 9 will be executed again.
12. The network handover method according to claim 1, wherein, The connection status information includes network connection time, current traffic usage, reconnection information, number of reconnections, and average connection duration per connection.
13. The network handover method according to claim 1, wherein, If the connection status information meets the preset switching conditions, then the connection parameters of each candidate network in one or more candidate networks are obtained, including: Analyze the connection status information to determine if there are network fluctuations; If the network fluctuations exist, then obtain the connection parameters of each candidate network from one or more candidate networks.
14. The network handover method according to claim 1, wherein, Before determining the target network from the one or more candidate networks, the method further includes: If the current usage scenario is determined to be a high-load scenario, then network switching will be performed.
15. The network handover method according to claim 1, wherein, Before determining the target network from the one or more candidate networks, the method further includes: If the current usage scenario is determined to be a low-load scenario, then network switching should be stopped.
16. The network handover method according to claim 1, wherein, The step of determining the target network from the one or more candidate networks includes: If there are multiple candidate networks, compare the network speeds of each candidate network; The candidate network with the highest network speed is selected as the target network.
17. The network handover method according to claim 1, wherein, Before determining the target network from the one or more candidate networks based on the current usage scenario information, historical network connection information, and the connection parameters of each candidate network, the method further includes: Retrieve historical network connection logs; The historical network connection information is determined based on the connection logs of the historical network.
18. A network switching device, wherein, The device includes: The first acquisition module is used to acquire the current network connection status information; The second acquisition module is used to acquire the connection parameters of each candidate network in one or more candidate networks if the connection status information acquired by the first acquisition module meets the preset switching conditions. The determination module is used to determine the target network from the one or more candidate networks based on the current usage scenario information, historical network connection information, and the connection parameters of each candidate network obtained by the second acquisition module; The switching module is used to switch the current network to the target network determined by the determining module, and to perform network communication based on the target network.
19. A terminal device, wherein, The terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the network handover method according to any one of claims 1 to 17.
20. A computer-readable storage medium, wherein, The computer-readable storage medium stores a computer program that is executed by a processor to implement the steps of the network handover method according to any one of claims 1 to 17.
Citation Information
Patent Citations
Network switching processing method and device
CN111787582A
Wireless network switching method and device, equipment, storage medium and product
CN114867075A
Network switching method and device, terminal equipment and computer readable storage medium
CN118283728A
Method and device for network handover, and electronic apparatus and storage medium for performing the same
US20230362770A1
Cited By
Wireless channel switching method and device, computer equipment and storage medium
CN121078504A