Network switching method, computer readable storage medium and terminal

By using the second SIM card in the terminal device to detect the communication quality of multiple second networks and control the switching of the first SIM card to a high-quality network, the problems of low network switching efficiency and frequent interruptions in the prior art are solved, and more efficient network switching and improved user experience are achieved.

CN120186699APending Publication Date: 2025-06-20WEILAI MOBILE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311770800.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-20
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

In the prior art, when the terminal device performs SIM card data network switching, the communication quality of the network to be switched cannot be predicted in advance, resulting in the duration of network switching and low efficiency, and may cause network interruption and affect user experience.

Method used

By setting the first SIM card and the second SIM card in the terminal device, the second SIM card is controlled to access a plurality of second networks that are the same as the first network operator, detect the communication quality of each network and obtain network parameters, and control the first SIM card to switch to a network with better communication quality based on these information.

Benefits of technology

It realizes rapid and effective network switching without the user's perception, improves the efficiency and user experience of network switching, and reduces the occurrence of network interruptions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120186699A_ABST
    Figure CN120186699A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of network communication, particularly provides a network switching method, a computer readable storage medium and a terminal, and aims to solve the problems that existing network switching is long in time consumption and low in efficiency, and network use experience of a user is poorer due to network interruption caused by multiple times of switching. In order to achieve the purpose, the network switching method comprises the following steps: a terminal controls a second SIM card to access a plurality of second networks respectively; wherein the second SIM card is a virtual SIM card or a physical SIM card; the plurality of second networks are the same as the operator of the first network to which the first SIM is currently accessed; respectively detecting communication quality of the plurality of second networks and acquiring network parameters of the plurality of second networks; and controlling the first SIM card to switch the network at least based on the communication quality and the network parameters of the plurality of second networks. According to the method, the network with relatively good communication quality can be determined under the condition that a user does not perceive and the quality of the current access network of the first SIM card is not influenced, so that the network switching of the first SIM card is realized quickly and effectively.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network communication technologies, and specifically provides a network switching method, a computer-readable storage medium, and a terminal. Background Art

[0002] When the current terminal device encounters a jam in using the data network of the SIM (Subscriber Identity Module) card, it directly adjusts the current network configuration parameters of the SIM to switch to a network with better communication quality.

[0003] However, only after the terminal device completes the network switching can it know the communication quality of the currently switched network, and it is impossible to predict in advance the communication quality of each network to be switched. Therefore, the consequences of each switch are unknown, which easily leads to the inability to obtain a better network experience even after multiple switches, with long network switching time and low efficiency. At the same time, the network interruption caused by multiple switches will make the user's network usage experience worse. Summary of the Invention

[0004] This application aims to solve the above technical problems, that is, to solve the problems of long network switching time and low efficiency in the existing technology, and at the same time, the network interruption caused by multiple switches will make the user's network usage experience worse.

[0005] In a first aspect, this application provides a network switching method, which is applied to a terminal. The terminal is provided with a first SIM card and a second SIM card. The method includes:

[0006] Controlling the first SIM card to access a first network;

[0007] Controlling the second SIM card to access multiple second networks respectively; the multiple second networks have the same operator as the first network;

[0008] Detecting the communication quality of the multiple second networks respectively and obtaining the network parameters of the multiple second networks;

[0009] Controlling the first SIM card to switch networks at least based on the communication quality and network parameters of the multiple second networks.

[0010] In some embodiments, the controlling the second SIM card to access multiple second networks respectively includes:

[0011] Based on the preset priority order of the multiple second networks, controlling the second SIM card to access the multiple second networks respectively;

[0012] The detecting the communication quality of the multiple second networks respectively and obtaining the network parameters of the multiple second networks includes:

[0013] Detect the communication quality of the multiple second networks respectively based on the priority order of the multiple second networks, and obtain the network parameters of the multiple second networks.

[0014] In some embodiments, the controlling the second SIM card to access multiple second networks respectively includes:

[0015] Based on the initial network configuration parameters and the adjusted network configuration parameters, control the second SIM card to access the multiple second networks respectively.

[0016] In some embodiments, the detecting the communication quality of the multiple second networks respectively and obtaining the network parameters of the multiple second networks includes:

[0017] For each second network, detect the communication quality of the current base station cell corresponding to the current second network and obtain the second network parameters corresponding to the current second network; and,

[0018] Detect the communication quality of the neighboring cells of the current base station cell and obtain the first network parameters corresponding to the second network.

[0019] In some embodiments, the controlling the first SIM card to switch networks based on at least the communication quality and network parameters of the multiple second networks includes:

[0020] Determine the network to be switched from the multiple second networks based on the communication quality;

[0021] Based on the network parameters corresponding to the network to be switched, control the first SIM card to switch networks.

[0022] In some embodiments, the determining the network to be switched from the multiple second networks based on the communication quality includes:

[0023] Determine the second network with the best communication quality from the multiple second networks based on the communication quality, and use it as the network to be switched.

[0024] In some embodiments, before the controlling the first SIM card to switch networks based on the network parameters corresponding to the network to be switched, the method further includes:

[0025] Obtain the network parameters of the first network;

[0026] Determine whether the network parameters of the first network are the same as the network parameters of the network to be switched;

[0027] If not, control the first SIM card to switch to the network to be switched.

[0028] In some embodiments, the method further includes obtaining the communication quality and network parameters of the first network;

[0029] Determining the network to be switched from the multiple second networks based on the communication quality includes:

[0030] Based on the communication quality and network parameters of the multiple second networks and the communication quality and network parameters of the first network, determining a second network from the multiple second networks that has better communication quality than the first network and different network parameters from the first network as the network to be switched.

[0031] In some embodiments, obtaining the communication quality of the first network includes obtaining the latency of the first network;

[0032] Before controlling the second SIM card to access multiple second networks respectively, the method further includes:

[0033] Judging whether the latency of the first network is greater than a preset threshold;

[0034] If so, controlling the second SIM card to start.

[0035] In some embodiments, after at least controlling the first SIM card to switch networks based on the communication quality and network parameters of the multiple second networks, the method further includes:

[0036] Detecting the network signal strength and / or preset terminal operations after the first SIM card switches networks;

[0037] Judging whether the network lock release condition is satisfied based on the network signal strength and / or preset operations;

[0038] If so, reconnecting the first SIM card to the first network.

[0039] In a second aspect, the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the network switching method described in any one of the above is implemented.

[0040] In a third aspect, the present application provides a terminal, which includes:

[0041] At least one processor;

[0042] A memory communicatively connected to the at least one processor;

[0043] And a first SIM card and a second SIM card, where the second SIM card is a physical SIM card;

[0044] Wherein, a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the network switching method described in any one of the above is implemented.

[0045] Solution 1. A network switching method, characterized in that it is applied to a terminal, the terminal is provided with a first SIM card and a second SIM card, and the method includes:

[0046] Control the first SIM card to access a first network;

[0047] Control the second SIM card to access multiple second networks respectively; the multiple second networks have the same operator as the first network;

[0048] Detect the communication quality of the multiple second networks respectively and obtain the network parameters of the multiple second networks;

[0049] Control the first SIM card to switch networks at least based on the communication quality and network parameters of the multiple second networks.

[0050] Solution 2. The method according to Solution 1, characterized in that the controlling the second SIM card to access multiple second networks respectively includes:

[0051] Based on the preset priority order of the multiple second networks, control the second SIM card to access the multiple second networks respectively;

[0052] The respectively detecting the communication quality of the multiple second networks and obtaining the network parameters of the multiple second networks includes:

[0053] Based on the priority order of the multiple second networks, detect the communication quality of the multiple second networks respectively and obtain the network parameters of the multiple second networks.

[0054] Solution 3. The method according to Solution 1, characterized in that the controlling the second SIM card to access multiple second networks respectively includes:

[0055] Based on the initial network configuration parameters and the adjusted network configuration parameters, control the second SIM card to access the multiple second networks respectively.

[0056] Solution 4. The method according to Solution 1, characterized in that the respectively detecting the communication quality of the multiple second networks and obtaining the network parameters of the multiple second networks includes:

[0057] For each second network, detect the communication quality of the current base station cell corresponding to the current second network and obtain the second network parameters corresponding to the current second network; and,

[0058] Detect the communication quality of the neighboring cells of the current base station cell and obtain the second network parameters corresponding to the second network.

[0059] Solution 5. The method according to any one of Solutions 1 to 4, characterized in that the controlling the first SIM card to switch networks based on at least the communication quality and network parameters of the multiple second networks includes:

[0060] Determine a network to be switched from the multiple second networks based on the communication quality;

[0061] Based on the network parameters corresponding to the network to be switched, control the first SIM card to switch networks.

[0062] Solution 6. The method according to Solution 5, characterized in that the determining a network to be switched from the multiple second networks based on the communication quality includes:

[0063] Determine the second network with the best communication quality from the multiple second networks based on the communication quality as the network to be switched.

[0064] Solution 7. The method according to Solution 5, characterized in that before controlling the first SIM card to switch networks based on the network parameters corresponding to the network to be switched, the method further includes:

[0065] Obtain the network parameters of the first network;

[0066] Determine whether the network parameters of the first network are the same as those of the network to be switched;

[0067] If not, control the first SIM card to switch to the network to be switched.

[0068] Solution 8. The method according to Solution 5, characterized in that the method further includes obtaining the communication quality and network parameters of the first network; the determining a network to be switched from the multiple second networks based on the communication quality includes:

[0069] Determine, from the multiple second networks, a second network that has better communication quality than the first network and different network parameters from those of the first network based on the communication quality and network parameters of the multiple second networks and the communication quality and network parameters of the first network as the network to be switched.

[0070] Solution 9. The method according to Solution 8, characterized in that obtaining the communication quality of the first network includes obtaining the delay of the first network;

[0071] Before controlling the second SIM card to access multiple second networks respectively, the method further includes:

[0072] Determine whether the latency of the first network is greater than a preset threshold;

[0073] If so, control the second SIM card to start.

[0074] Solution 10. The method according to Solution 1, characterized in that, after at least controlling the first SIM card to switch networks based on the communication quality and network parameters of the plurality of second networks, the method further includes:

[0075] Detect the network signal strength and / or preset terminal operations after the first SIM card switches networks;

[0076] Judge whether the network lock release condition is satisfied based on the network signal strength and / or preset terminal operations;

[0077] If so, reconnect the first SIM card to the first network.

[0078] Solution 11. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the network switching method described in any one of Solutions 1 to 10 is implemented.

[0079] Solution 12. A terminal, characterized in that it includes:

[0080] At least one processor;

[0081] A memory communicatively connected to the at least one processor;

[0082] And a first SIM card and a second SIM card, where the second SIM card is a physical SIM card;

[0083] Wherein, a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the network switching method described in any one of Solutions 1 to 10 is implemented.

[0084] In the case of adopting the above technical solutions, the present application can control the second SIM card to access multiple second networks respectively by the terminal; the multiple second networks have the same operator as the first network currently accessed by the first SIM card; detect the communication quality of the multiple second networks respectively and obtain the network parameters of the multiple second networks; at least control the first SIM card to switch networks based on the communication quality and network parameters of the multiple second networks. This method can determine a network with better communication quality without the user's perception and without affecting the network quality of the first SIM card currently accessed, and realize a fast and effective network switching of the first SIM card. Description of the Drawings

[0085] The preferred embodiments of the present application will be described below with reference to the accompanying drawings, in which:

[0086] Figure 1 is a schematic flowchart of the main steps of a network switching method provided by an embodiment of the present application;

[0087] Figure 2 is a schematic flowchart of the specific implementation method of step S13 provided by an embodiment of the present application;

[0088] Figure 3 is a schematic flowchart of the specific implementation method of step S13 provided by another embodiment of the present application;

[0089] Figure 4 is a schematic flowchart of a network switching method provided by a preferred embodiment of the present application;

[0090] Figure 5 is a schematic flowchart of the network switching method provided by a specific example of the present application;

[0091] Figure 6 shows a schematic diagram of a network switching system of a terminal provided by the present application;

[0092] Figure 7 is a schematic diagram of a partial structure of a terminal provided by an embodiment of the present application. Specific Embodiments

[0093] Some embodiments of the present application will be described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principle of the present application and are not intended to limit the protection scope of the present application.

[0094] The network switching method provided by the embodiment of the present application can be applied to a terminal, which can be provided with a first SIM card and a second SIM card. The first SIM card is currently accessing a first network and communicating through the first network. The second SIM card is a virtual SIM card or a physical SIM card. When it is a virtual SIM card, the corresponding functions of the second SIM card can be implemented by the terminal. The terminal supports DSDA (Dual SIM Dual Active), and by combining the first SIM card with the second SIM card set, when the network communication quality of the first SIM card is poor, the second SIM card can be used to access each network and perform network communication quality testing, avoiding the network switching method in the prior art of directly switching the network of the first SIM card to match a better network.

[0095] See Figure 1 as shown in Figure 1 is a schematic flowchart of the main steps of a network switching method provided by an embodiment of the present application, which may include:

[0096] Step S10: Control the first SIM card to access the first network;

[0097] Step S11: Control the second SIM card to access multiple second networks respectively; the multiple second networks have the same operator as the first network;

[0098] Step S12: Detect the communication quality of the multiple second networks respectively and obtain the network parameters of the multiple second networks;

[0099] Step S13: Control the first SIM card to switch networks based on at least the communication quality and network parameters of the multiple second networks.

[0100] In some embodiments, step S10 may specifically be that the terminal controls the first SIM card to access the first network in response to a user's operation. In other embodiments, step S10 may also be that the terminal controls the first SIM card to access the first network based on default settings or automatically selects the first network with better current communication quality.

[0101] In some embodiments, step S11 may specifically be: Based on the priority order of the multiple pre-set second networks, control the second SIM card to access the multiple second networks respectively, so as to detect the communication quality of the multiple second networks respectively based on the priority order of the multiple second networks.

[0102] It should be noted that in the embodiments of the present application, after accessing the current second network and completing the detection of the communication quality of the current second network and obtaining its network parameters, another second network is accessed, and the communication quality detection and network parameter acquisition are performed for another second network. Similarly, the steps of access, detection, and acquisition can be cyclically executed until the communication quality detection and network parameter acquisition of all the multiple second networks are completed.

[0103] In some embodiments, the network types of the multiple second networks may be different, and the standard communication parameters corresponding to different network types are different, so the communication quality is also different. Among them, the standard communication parameters may include theoretical network speed, network density, spectrum efficiency, etc. In other embodiments, at least some of the multiple second networks may have the same network type and at least some of the other network configuration parameters except the network type are different.

[0104] In some embodiments, the priority order of the multiple second networks may be set in advance based on the network type, and the second SIM card is controlled to access the multiple second networks respectively based on the priority from high to low; among them, the network type with better standard communication parameters can be set with higher priority.

[0105] As an example, the network type may include a 5G network, a 4G network, a 3G network, etc. The priority order of the multiple pre-set second networks may be: 5G network, 4G network, and 3G network, with the priorities decreasing in sequence. The terminal may control the second SIM card to access the 5G network, 4G network, and 3G network in sequence based on the priority order.

[0106] In some other embodiments, step S11 may specifically be: based on the initial network configuration parameters and the adjusted network configuration parameters, controlling the second SIM card to access multiple second networks respectively.

[0107] Among them, both the initial network configuration parameters and the adjusted network configuration parameters may include one or more types of network configuration parameters, and the initial network configuration parameters and the adjusted network configuration parameters may include the same type of network configuration parameters but at least some of the numerical values of the network configuration parameters are different, or may include different types of network configuration parameters.

[0108] In some embodiments, the network configuration parameters may include at least one of: network type, network mode, transmission protocol, stand-alone networking mode, 5G stand-alone networking voice call (VONR, Voice over New Radio), and non-stand-alone networking mode.

[0109] As an example, the initial network configuration parameters may include: 5G, stand-alone networking mode, and VONR; the adjusted network configuration parameters may include: 5G and non-stand-alone networking mode.

[0110] In some preferred embodiments, step S11 may specifically be based on the priority order of the multiple pre-set second networks combined with the initial network configuration parameters or the adjusted network configuration parameters to control the second SIM card to access the second network.

[0111] As an example, when the priority order of the multiple pre-set second networks is: 5G network, 4G network, and 3G network, with the priorities decreasing in sequence, the initial network configuration parameters are stand-alone networking mode and VONR, and the adjusted network parameters are 5G and non-stand-alone networking mode, the SIM card may be controlled to first access the 5G network based on the stand-alone networking mode and VONR. After the test is completed, it may then automatically switch to the stand-alone network mode to access the 5G network. Similarly, after the test is completed, the SIM card may be controlled to access the 4G network and 3G network in sequence.

[0112] It should be noted that in the above embodiments, it may be based on the condition of completing a preset number of communication quality detections or completing the detection of the target base station area in the current second network to control the second SIM card to switch from the current second network to other first networks, or to control the second SIM card to switch from the second network with the initial network configuration parameters to the second network with the adjusted network configuration parameters.

[0113] In the embodiments of the present application, the network parameters may include parameters related to communication quality, network configuration parameters, and base station identifiers. Among them, the parameters related to communication quality may include at least one of delay, bit error rate, packet loss rate, and frequency point. The current base station cell may be the area covered by the base station to which the second SIM card is currently connected, and the adjacent cell of the current base station cell may be the area covered by other base stations adjacent to the base station corresponding to the current base station cell. Different base station cells may be distinguished based on the base station identifier.

[0114] In some embodiments, when step S11 may specifically be to control the second SIM card to access multiple second networks based on the priority order of multiple pre-set second networks, step S12 may specifically be:

[0115] Based on the priority order of the multiple second networks, detect the communication quality of the multiple second networks and obtain the network parameters of the multiple second networks.

[0116] In some embodiments, step S12 may specifically be:

[0117] For each second network, detect the communication quality of the current base station cell corresponding to the current second network and obtain the second network parameters corresponding to the current second network; and,

[0118] Detect the communication quality of the adjacent cell of the current base station cell and obtain the first network parameters corresponding to the second network.

[0119] In some embodiments, a probe request may be sent to the base station corresponding to the current base station cell based on the second SIM card, and the delay may be determined according to the response of the base station to the probe request, and the communication quality of the current base station cell may be determined based on the delay. As an example, a probe request may be initiated through a PING (Packet Internet Groper) command.

[0120] In some embodiments, multiple probe requests may be initiated, and the delay obtained for each probe request may be recorded to accurately and effectively determine the communication quality.

[0121] In other embodiments, the communication quality of the current base station cell may also be detected by other means. As an example, the communication quality may also be confirmed based on the bit error rate or the packet loss rate.

[0122] Among them, the second network parameters may include parameters related to communication quality corresponding to the current base station cell, network configuration parameters, and base station identifiers.

[0123] In some embodiments, the same method as that for detecting the communication quality of the current base station cell may be adopted to detect the communication quality of the adjacent cell.

[0124] Among them, the first network parameter may include parameters related to communication quality corresponding to adjacent cells, network configuration parameters, and base station identifiers.

[0125] As an example, when at least some of the multiple second networks have the same network type, and at least some of the other network configuration parameters except the network type are different, the multiple second networks may include: a 5G network with an initial network configuration parameter of the standalone mode and VONR, a 5G network with an adjusted network configuration parameter of the non-standalone mode, and a 4G network. Step S12 may be that when accessing the 5G network in the standalone mode and VONR, based on the second SIM card, the latency of the current base station cell corresponding to the current 5G network is detected multiple times, and the second network parameter corresponding to the current 5G network is obtained; based on the second SIM card, the latency of the adjacent cells of the current base station cell is detected multiple times and the first network parameter is obtained, and this step is repeated until all adjacent cells are detected. When the 5G network in the standalone mode and VONR is automatically switched to the 5G network in the non-standalone mode, step S12 may be that for the 5G network in the non-standalone mode, based on the second SIM card, the latency of the current base station cell corresponding to the current 5G network is detected multiple times, and the second network parameter corresponding to the current 5G network is obtained; based on the second SIM card, the latency of the adjacent cells of the current base station cell is detected multiple times and the first network parameter is obtained, and this step is repeated until all adjacent cells are detected. When the 5G network in the non-standalone mode can be automatically switched to the 4G network, step S12 may be that for the 4G network, based on the second SIM card, the latency of the current base station cell corresponding to the current 4G network is detected multiple times, and the second network parameter corresponding to the current 4G network is obtained; based on the second SIM card, the latency of the adjacent cells of the current base station cell is detected multiple times and the first network parameter is obtained, and this step is repeated until all adjacent cells are detected.

[0126] In some embodiments, referring to Figure 2 as shown, step S13 may be specifically:

[0127] Step S1311: Determine the network to be switched from multiple second networks based on the communication quality;

[0128] Step S1312: Control the first SIM card to switch the network based on the network parameter corresponding to the network to be switched.

[0129] In some embodiments, step S1311 may be specifically:

[0130] Determine the second network with the best communication quality from multiple second networks based on the communication quality as the network to be switched.

[0131] As an example, when determining the communication quality by detecting the time delay, the second network with the shortest time delay can be determined from multiple second networks as the second network with the best quality, that is, the network to be switched. In other embodiments, step S1311 may also be based on the network speed and a preset network speed threshold, and determine from multiple second networks the second network whose network speed is greater than the preset network speed threshold as the preliminary network to be switched. There may be multiple preliminary networks to be switched; then randomly select one or the one with the fastest network speed from multiple preliminary networks to be switched as the final network to be switched. Among them, the preset network speed threshold may be set based on the network speed experience value when the network is in a better state.

[0132] In some other embodiments, the method may further include obtaining the communication quality and network parameters of the first network; step 1311 may specifically be based on the communication quality and network parameters of multiple second networks and the communication quality and network parameters of the first network, and determine from multiple second networks the second network whose communication quality is better than that of the first network and whose network parameters are different from those of the first network as the network to be switched.

[0133] In some embodiments, step S1312 may specifically be: directly control the first SIM card to switch networks based on the network parameters corresponding to the network to be switched, so that the first SIM card switches to the network to be switched.

[0134] In other embodiments, in order to improve the effectiveness of network switching and save processes, the following steps may also be performed before step S1312:

[0135] Obtain the network parameters of the first network;

[0136] Determine whether the network parameters of the first network and the network parameters of the network to be switched are the same;

[0137] If not, control the first SIM card to switch to the network to be switched.

[0138] If so, the first network currently accessed by the first SIM card is the same as the network to be switched, and the communication quality is the same, so there is no need to switch.

[0139] In some embodiments, before step S13, it may also include:

[0140] Obtain the communication quality and network parameters of the first network. It should be noted that the first network may be the same as or different from the second network.

[0141] In some embodiments, obtaining the communication quality of the first network may include obtaining the time delay of the first network. In other embodiments, it may also be based on monitoring the packet loss rate, bandwidth change, and whether there may be a situation where there is only uplink data but no downlink data to obtain the communication quality of the first network.

[0142] On the one hand, it is possible to determine whether to activate the second SIM card based on the communication quality of the first network. When the communication quality of the first network is poor, the second SIM card is activated and a network with better communication quality is determined based on the second SIM card, so as to switch the second SIM card to the network with better quality. When the communication quality of the first network is good, the activation of the second SIM card is not triggered to save computing resources. On the other hand, it is possible to determine whether to perform a network switch based on the communication quality and network parameters of the first network. For details, please refer to Figure 3 and the description in the following text.

[0143] Refer to Figure 3 As shown, in some other embodiments, step S13 may specifically be:

[0144] Step S1321: Based on the communication quality and network parameters of multiple second networks and the communication quality and network parameters of the first network, determine whether there is a second network whose communication quality is better than that of the first network and whose network parameters are different from those of the first network;

[0145] If so, execute step S1322: Based on the judgment result, determine the network to be switched from multiple second networks, and control the first SIM card to switch the network based on the network parameters of the network to be switched.

[0146] If not, this round of detection can be ended, and the process can return to obtain the communication quality detection of the first network or re-perform the communication quality detection based on the second SIM card.

[0147] In some embodiments, step S1322 may specifically be: Based on the judgment result, determine a second network whose communication quality is better than that of the first network and whose network parameters are different from those of the first network. There may be multiple such first networks; use these multiple second networks as the initial networks to be switched; then randomly select one or select the one with the best communication quality from the multiple preliminary networks to be switched as the final network to be switched, in the same way as above.

[0148] In some embodiments, after step S1311 or S1321, the method may further include: Upload the network detection data of the final network to be switched or multiple preliminary networks to be switched, such as network parameters and parameters related to communication quality, to the cloud server. The cloud server can store the relevant data for sharing data with other terminals.

[0149] It should be noted that the terminal can upload the network detection data to the cloud server based on the currently accessed first network or the final network to be switched.

[0150] The above is a network switching method provided by an embodiment of the present application, in which the terminal controls a second SIM card to access multiple second networks respectively; wherein, the second SIM card is a virtual SIM card or a physical SIM card; the multiple second networks have the same operator as the first network currently accessed by the first SIM card; the communication quality of the multiple second networks is detected respectively and the network parameters of the multiple second networks are obtained; at least based on the communication quality and network parameters of the multiple second networks, the first SIM card is controlled to switch networks. This method can determine a network with better communication quality without the user's awareness and without affecting the network quality of the first SIM card currently accessed, and realize fast and effective network switching of the first SIM card.

[0151] See Figure 4 as shown in Figure 4 is a schematic flowchart of a network switching method provided by a preferred embodiment of the present application, which may include:

[0152] Step S41: Obtain the latency of the first network, where the first network is the network currently accessed by the first SIM card;

[0153] Step S42: Determine whether the latency of the first network is greater than a preset threshold;

[0154] If so, execute Step S43: Control the second SIM card to start; if not, end this round of detection;

[0155] Step S44: Control the second SIM card to access multiple second networks respectively; the multiple second networks have the same operator as the first network;

[0156] Step S45: Detect the communication quality of the multiple second networks respectively and obtain the network parameters of the multiple second networks;

[0157] Step S46: Control the first SIM card to switch networks at least based on the communication quality and network parameters of the multiple second networks;

[0158] Step S47: Detect the network signal strength and / or preset terminal operations after the first SIM card switches networks;

[0159] Step S48: Determine whether the network lock release condition is satisfied based on the network signal strength and / or preset terminal operations;

[0160] If so, Step S49: Re-connect the first SIM card to the first network; if not, end this round of detection.

[0161] Among them, Steps S44-S46 can be implemented in the same manner as the corresponding Figure 1 embodiment above, and will not be elaborated here for the sake of brevity. For details, please refer to the description in the above text.

[0162] In some embodiments, step S41 may specifically be that the terminal initiates a PING command based on the first SIM card to detect the latency of the first network.

[0163] Among them, the preset threshold can be set according to requirements.

[0164] In some embodiments, step S43 may specifically be: the terminal triggers the start of the second SIM card by sending a start instruction.

[0165] During the startup process, the second SIM card sends an ATR command to the MODEM (modem). In response to the ATR (Answer-to-Reset) command, the MODEM sends a request instruction to the second SIM card through the APDU (Application Protocol data unit, the information unit transmitted between the smart card and the smart card reader) protocol to request information of the second SIM card. As an example, it can request information such as the KI (Key identifier, the key for encrypted data transfer between the SIM card and the operator), IMSI (International Mobile Subscriber Identification Number), ICCID (Integrate circuit card identity, the unique identifier of the SIM card), etc.

[0166] In addition, before the second SIM card accesses any second network, the corresponding second network will also perform network authentication on the second SIM card. The network authentication can adopt the conventional two-way authentication method in the art. Specifically, it can be initiated by the second network to be accessed. After receiving the authentication request, the MODEM sends the authentication request and the corresponding authentication parameters to the second SIM card based on the APDU protocol. The second SIM card performs authentication calculations in response to the authentication request and returns the calculation result to the MODEM, which is sent to the second network through the MODEM. At the same time, the second network also performs authentication. When the authentication of both the second SIM card and the second network is successful, the terminal can control the MODEM to initiate network registration so that the second SIM card can access the second network. Among them, the network registration can be implemented in a common manner in the art.

[0167] In some embodiments, when the first SIM card switches networks based on the communication quality and network parameters of multiple second networks, it can be confirmed that the first SIM card has switched to a network with better communication quality, and then network locking can be performed, that is, the current first SIM card can be locked in the switched network and will no longer automatically switch to other networks.

[0168] In some embodiments, step S48 may specifically be:

[0169] Monitor the change in the network signal strength and determine whether the strength change reaches a preset change value. If so, determine that the network lock release condition is met; if not, maintain the current network.

[0170] In some other embodiments, step S48 may specifically be:

[0171] Monitor whether at least one of the following preset terminal operations occurs: the user turns on / off the flight mode, restarts the mobile phone, keeps the screen off for more than a preset time, and the user manually switches the network. If so, determine that the network lock release condition is met; if not, maintain the current network.

[0172] In some embodiments, step S49 may specifically be to reconnect the first SIM card to the first network by setting the network parameters of the first SIM card.

[0173] See Figure 5 as shown in Figure 5 is a schematic flowchart of the network switching method provided by a specific example of the present application. Among them, the first SIM card may be the main card data card, and the second SIM card may be the secondary card virtual card. The terminal can periodically perform traffic delay detection on the main card data card and determine whether the delay is greater than expected. If not, end this round of testing. If so, start the secondary card virtual card. The secondary card virtual card interacts with the MODEM to complete the power-on network authentication process. After successful authentication, it can register for the network of the same operator as the main card. The terminal can set different network parameters for the secondary card virtual card, such as setting different network types 4G or 5G, and switching different base station cells. Based on the secondary card virtual card, network registration can be performed in different base station cells. Thus, in each base station cell, the terminal can initiate a data request to the network it is currently accessing based on the secondary card virtual card, detect and calculate the delay information of this data request, and record the delay information and network parameters obtained under different registration conditions. The terminal can determine whether there are other base station cells that are different from the base station cell currently accessed by the main card and have a delay less than that of the base station cell currently accessed by the main card based on the measured delay information and network parameters. If not, end this round of testing. If so, switch the network parameters of the main card to the network parameters corresponding to the optimal base station cell. The network parameters may include NSA, SA, 4G, 5G, base station cell identification information, frequency points, etc. After switching, the terminal can also detect whether the main card meets the network lock release condition. If so, restore the original network parameter settings of the main card, and re-monitor the communication quality of the main card and determine whether to start the secondary card virtual card to determine the optimal base station cell. If not, maintain the current network and end this round of testing.

[0174] The above is the network switching method provided by another embodiment of the present application, which can achieve the same as Figure 1It has the same beneficial effects as the corresponding embodiments, and by detecting the communication quality of the first network accessed by the first SIM card and the network accessed after switching, it is beneficial to realize the real-time monitoring of the communication quality of the current terminal, perform network switching in a timely manner, and ensure the user experience.

[0175] On the other hand, the present application also provides a network switching method, which is applied to another terminal. The other terminal is communicatively connected to a cloud server. The method includes: the other terminal sending a network detection data acquisition request to the cloud server based on its current location information or network parameter information; so that the server determines the base station cell or adjacent cell where the other terminal is located based on the location information or network parameters, and sends the pre-stored network detection data of the base station cell or adjacent cell to the other terminal based on this information; the other terminal determines whether to perform network switching based on the received network detection data.

[0176] In some embodiments, the other terminal can directly perform network switching based on the network detection data; in other embodiments, the other terminal can also determine whether there is a communication quality superior to its current access network based on the network detection data. If so, it then performs network switching based on the network detection data. Thus, the process of repeatedly detecting the network communication quality can be omitted, the network switching efficiency can be improved, and it is more efficient and convenient.

[0177] Those skilled in the art can understand that all or part of the processes of the methods in the above embodiments of the present application can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable storage medium can include: any entity or device, medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, electrical carrier signal, telecommunication signal, and software distribution medium that can carry the computer program code.

[0178] On the other hand, the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the network switching method described in any of the above embodiments is implemented. The computer-readable storage medium can be a storage device formed by various electronic devices. Optionally, the computer-readable storage medium in the embodiments of the present application is a non-transitory computer-readable storage medium.

[0179] Another aspect of the present application further provides a terminal, which may include at least one processor; a memory communicatively connected to the at least one processor, a first SIM card and a second SIM card, where the second SIM card is a virtual SIM card or a physical SIM card; wherein, a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the network switching method described in any of the above embodiments is implemented.

[0180] It should be noted that when the second SIM card is a virtual SIM card, the second SIM card may be a virtual module set in the memory. Correspondingly, the terminal can also implement the corresponding functions of the virtual SIM card, such as the network authentication step for the network to be accessed. When the second SIM card is a physical SIM card, the second SIM card can be set on the terminal through a card slot, and the network authentication process is executed by the physical SIM card.

[0181] See Figure 6 as shown Figure 6 shows a schematic diagram of a network switching system based on the terminal provided by the present application, which may include:

[0182] a terminal, which may include a first SIM card and a second SIM card that is a physical SIM card;

[0183] a first network accessed by the first SIM card;

[0184] and a plurality of second networks to be accessed by the second SIM card.

[0185] Among them, the second network may be the same as or different from the first network.

[0186] By executing the network switching method described in any of the above embodiments, the terminal can determine the second network with the optimal or relatively better communication quality from the plurality of second networks, and control the second SIM card to perform network switching. In some embodiments, the terminal may include a mobile phone, a computer, an intelligent driving device, etc.

[0187] In some embodiments, as Figure 6 shown, the network switching system may further include a base station connected to the second network, a base station connected to the first network, a cloud server connected to the second network and the first network respectively through two base stations, and another terminal accessing any one of the second networks and communicatively connected to the cloud server.

[0188] See Figure 7 as shown Figure 7 is a partial structural schematic diagram of the terminal provided by the embodiment of the present application, Figure 7 exemplarily shows the structure when there is only one memory 71 and one processor 72 connected through a bus.

[0189] In some other embodiments, the terminal may include a plurality of memories 71 and a plurality of processors 72. The program for executing the network switching method of any of the above embodiments may be divided into multiple sub-programs, and each sub-program may be loaded and run by the processor 72 respectively to execute different steps of the network switching method of the above method embodiments. Specifically, each sub-program may be stored in a different memory 71 respectively, and each processor 72 may be configured to execute the programs in one or more memories 71 to jointly implement the network switching method of the above method embodiments.

[0190] So far, the technical solutions of the present application have been described in conjunction with the preferred embodiments shown in the drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Without departing from the principle of the present application, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the protection scope of the present application.

Claims

1. A network switching method, characterized in that, Applied to a terminal, the terminal is provided with a first SIM card and a second SIM card, and the method includes: Controlling the first SIM card to access a first network; Controlling the second SIM card to access multiple second networks respectively; the multiple second networks have the same operator as the first network; Detecting the communication quality of the multiple second networks respectively and obtaining the network parameters of the multiple second networks; Controlling the first SIM card to switch networks at least based on the communication quality and network parameters of the multiple second networks.

2. The method according to claim 1, characterized in that, The controlling the second SIM card to access multiple second networks respectively includes: Based on the priority order of the multiple second networks set in advance, controlling the second SIM card to access the multiple second networks respectively; The detecting the communication quality of the multiple second networks respectively and obtaining the network parameters of the multiple second networks includes: Based on the priority order of the multiple second networks, detecting the communication quality of the multiple second networks respectively and obtaining the network parameters of the multiple second networks.

3. The method according to claim 1, characterized in that, The controlling the second SIM card to access multiple second networks respectively includes: Based on the initial network configuration parameters and the adjusted network configuration parameters, controlling the second SIM card to access the multiple second networks respectively.

4. The method according to claim 1, characterized in that, The detecting the communication quality of the multiple second networks respectively and obtaining the network parameters of the multiple second networks includes: For each second network, detecting the communication quality of the current base station cell corresponding to the current second network and obtaining the second network parameters corresponding to the current second network; and, Detecting the communication quality of the neighboring cells of the current base station cell and obtaining the second network parameters corresponding to the second network.

5. The method according to any one of claims 1 to 4, characterized in that, The controlling the first SIM card to switch networks at least based on the communication quality and network parameters of the multiple second networks includes: Determining a network to be switched to from the multiple second networks based on the communication quality; Controlling the first SIM card to switch networks based on the network parameters corresponding to the network to be switched to.

6. The method according to claim 5, characterized in that, The determining a network to be switched to from the multiple second networks based on the communication quality includes: Determining the second network with the best communication quality from the multiple second networks based on the communication quality as the network to be switched to.

7. The method according to claim 5, characterized in that, Before controlling the first SIM card to switch networks based on the network parameters corresponding to the network to be switched to, the method further includes: Obtaining the network parameters of the first network; Determining whether the network parameters of the first network are the same as the network parameters of the network to be switched to; If not, controlling the first SIM card to switch to the network to be switched to.

8. The method according to claim 5, characterized in that, The method further includes obtaining the communication quality and network parameters of the first network; the determining a network to be switched to from the multiple second networks based on the communication quality includes: Determining, from the multiple second networks, a second network with better communication quality than the first network and different network parameters from the first network as the network to be switched to based on the communication quality and network parameters of the multiple second networks and the communication quality and network parameters of the first network.

9. The method according to claim 8, characterized in that, Obtaining the communication quality of the first network includes obtaining the latency of the first network; Before controlling the second SIM card to access multiple second networks respectively, the method further includes: Judging whether the latency of the first network is greater than a preset threshold; If so, controlling the second SIM card to start.

10. The method according to claim 1, characterized in that, After controlling the first SIM card to switch networks at least based on the communication quality and network parameters of the multiple second networks, the method further includes: Detecting the network signal strength and / or preset terminal operations after the first SIM card switches networks; Judging whether the network lock release condition is satisfied based on the network signal strength and / or preset terminal operations; If so, reconnecting the first SIM card to the first network.