Main and standby card switching method, communication equipment and device

By automatically determining whether the main SIM card is dialed successfully and the communication quality, automatic switching of communication equipment is realized, which solves the problem of cumbersome and high cost in the existing technology, and reduces the switching cost of manual participation.

CN120018215APending Publication Date: 2025-05-16DATANG MOBILE COMM EQUIP CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311513356.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-14
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

In the prior art, switching between the main SIM card and the backup SIM card of the communication device requires manual control, and the process is cumbersome, resulting in high maintenance costs.

Method used

By judging the success of the main SIM card dialing and the communication quality, automatically switch to the backup SIM card for communication. If the backup SIM card communication quality is poor, switch back to the main SIM card.

Benefits of technology

It realizes that the communication device automatically switches to the backup SIM card when the main SIM card cannot be used or the communication quality is poor, reducing the switching cost of manual participation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120018215A_ABST
    Figure CN120018215A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a main and standby card switching method, communication equipment and a device, relates to the technical field of networks, is applied to the communication equipment configured with a main subscriber identity module (SIM) card and a standby SIM card, and comprises the following steps: judging whether dialing through the main SIM card is successful or not; if dialing succeeds, communication is carried out through the main SIM card, and main card communication quality information in the communication process is obtained; judging whether the main SIM card communication quality represented by the main card communication quality information is higher than a preset main card quality threshold; and if the dialing fails or the communication quality of the main SIM card is not higher than a preset main card quality threshold, switching to a standby SIM card for communication. By applying the scheme provided by the embodiment of the invention, the labor cost required for switching the main card and the standby card of the communication equipment can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network technology, and in particular to a method for switching between a primary and a secondary card, and communication equipment and a device. Background Art

[0002] Currently, configuring both the primary SIM (Subscriber Identification Module) card and the backup SIM card in a communication device is a common way to ensure the reliability and stability of the communication quality of the communication device. Users can control the communication device to switch between the primary SIM card and the backup SIM card according to the current network conditions, so that they can flexibly achieve better communication quality through different networks.

[0003] However, in the related art, the switching between the primary SIM card and the backup SIM card of the communication device needs to be completed by manual control, and the process of switching between the primary and backup cards is relatively cumbersome, and the maintenance labor cost is high. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a method, communication device and apparatus for switching between primary and secondary cards, so as to reduce the labor cost required for switching between primary and secondary cards of communication devices. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a method for switching between a primary and a backup SIM card, which is applied to a communication device configured with a primary user identity identification SIM card and a backup SIM card, the method comprising:

[0006] Determine whether dialing through the primary SIM card is successful;

[0007] If the dialing is successful, communication is carried out through the main SIM card, and the communication quality information of the main card during the communication process is obtained;

[0008] Determining whether the communication quality of the main SIM card indicated by the main card communication quality information is higher than a preset main card quality threshold;

[0009] If the dialing fails or the communication quality of the primary SIM card is not higher than the preset primary card quality threshold, the standby SIM card is switched to communicate.

[0010] In one embodiment of the present invention, the acquiring of the communication quality information of the primary card during the communication process includes:

[0011] Obtain the main card communication delay and / or main card packet loss rate during the communication process;

[0012] The determining whether the communication quality of the primary SIM card indicated by the primary card communication quality information is higher than a preset primary card quality threshold includes:

[0013] If the primary card communication delay is less than the preset primary card delay threshold, it is determined that the primary SIM card communication quality is higher than the preset primary card quality threshold;

[0014] and / or

[0015] If the primary card packet loss rate is less than a preset primary card packet loss rate threshold, it is determined that the communication quality of the primary SIM card is higher than a preset primary card quality threshold.

[0016] In one embodiment of the present invention, the determining whether dialing through the primary SIM card is successful includes:

[0017] Determining whether a first number of dialing times through the primary SIM card exceeds a first preset number;

[0018] and / or

[0019] Determine whether a first duration of dialing through the primary SIM card exceeds a first preset duration;

[0020] If the first number exceeds a first preset number and / or the first duration exceeds a first preset duration, it is determined that dialing through the primary SIM card fails.

[0021] In one embodiment of the present invention, before switching to communicating through the standby SIM card, the method further includes:

[0022] Determine whether the number of times the standby SIM card is switched to exceeds the preset number of switching times within the preset switching time;

[0023] If the preset switching times are not exceeded, switching to the standby SIM card for communication;

[0024] If the preset switching times are exceeded, communication continues through the primary SIM card.

[0025] In one embodiment of the present invention, after switching to the standby SIM card for communication, the method further includes:

[0026] Determine whether dialing through the standby SIM card is successful;

[0027] If the dialing is successful, communication is performed through the standby SIM card, and communication quality information of the standby card during the communication process is obtained;

[0028] Determining whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold;

[0029] If the dialing fails or the communication quality information of the standby SIM card is not higher than the preset standby card quality threshold, the communication is switched to the main SIM card.

[0030] In one embodiment of the present invention, the step of obtaining the communication quality information of the standby card during the communication process includes:

[0031] Obtaining the standby card communication delay and / or the standby card packet loss rate during the communication process;

[0032] The determining whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold includes:

[0033] If the standby card communication delay is less than the preset standby card delay threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold;

[0034] and / or

[0035] If the standby card packet loss rate is less than the preset standby card packet loss rate threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold.

[0036] In one embodiment of the present invention, the determining whether dialing through the standby SIM card is successful includes:

[0037] Determining whether a second number of dialing times through the standby SIM card exceeds a second preset number;

[0038] and / or

[0039] Determine whether the second duration of dialing through the standby SIM card exceeds the second preset duration;

[0040] If the second number of times exceeds a second preset number of times and / or the second duration exceeds a second preset duration, it is determined that the standby SIM card dialing fails.

[0041] In one embodiment of the present invention, the method further comprises:

[0042] During communication through the primary SIM card, sending a first ping packet to a preset server to determine a first delay statistical result of the first ping packet;

[0043] During the communication through the standby SIM card, sending a second ping packet to the preset server, and determining a second delay statistical result of the second ping packet;

[0044] The switching to the primary SIM card for communication includes:

[0045] If the second delay statistical result is not less than the first delay statistical result, switching to the primary SIM card for communication.

[0046] In a second aspect, an embodiment of the present invention provides a communication device, including a memory, a transceiver, a processor, a primary SIM card, and a standby SIM card:

[0047] A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations:

[0048] Determine whether dialing through the primary SIM card is successful;

[0049] If the dialing is successful, communication is carried out through the main SIM card, and the communication quality information of the main card during the communication process is obtained;

[0050] Determining whether the communication quality of the main SIM card indicated by the main card communication quality information is higher than a preset main card quality threshold;

[0051] If the dialing fails or the communication quality of the primary SIM card is not higher than the preset primary card quality threshold, the standby SIM card is switched to communicate.

[0052] In one embodiment of the present invention, the obtaining of the communication quality information of the primary card during the communication process specifically includes:

[0053] Obtain the main card communication delay and / or main card packet loss rate during the communication process;

[0054] The determining whether the communication quality of the primary SIM card indicated by the primary card communication quality information is higher than a preset primary card quality threshold specifically includes:

[0055] If the primary card communication delay is less than the preset primary card delay threshold, it is determined that the primary SIM card communication quality is higher than the preset primary card quality threshold;

[0056] and / or

[0057] If the primary card packet loss rate is less than a preset primary card packet loss rate threshold, it is determined that the communication quality of the primary SIM card is higher than a preset primary card quality threshold.

[0058] In one embodiment of the present invention, the determining whether dialing through the primary SIM card is successful specifically includes:

[0059] Determining whether a first number of dialing times through the primary SIM card exceeds a first preset number;

[0060] and / or

[0061] Determine whether a first duration of dialing through the primary SIM card exceeds a first preset duration;

[0062] If the first number exceeds a first preset number and / or the first duration exceeds a first preset duration, it is determined that dialing through the primary SIM card fails.

[0063] In one embodiment of the present invention, the processor is further configured to:

[0064] Determine whether the number of times the standby SIM card is switched to exceeds the preset number of switching times within the preset switching time;

[0065] If the preset switching times are not exceeded, switching to the standby SIM card for communication;

[0066] If the preset switching times are exceeded, communication continues through the primary SIM card.

[0067] In one embodiment of the present invention, the processor is further configured to:

[0068] Determine whether dialing through the standby SIM card is successful;

[0069] If the dialing is successful, communication is performed through the standby SIM card, and communication quality information of the standby card during the communication process is obtained;

[0070] Determining whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold;

[0071] If the dialing fails or the communication quality information of the standby SIM card is not higher than the preset standby card quality threshold, the communication is switched to the main SIM card.

[0072] In one embodiment of the present invention, the acquiring of the communication quality information of the standby card during the communication process specifically includes:

[0073] Obtaining the standby card communication delay and / or the standby card packet loss rate during the communication process;

[0074] The determining whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold specifically includes:

[0075] If the standby card communication delay is less than the preset standby card delay threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold;

[0076] and / or

[0077] If the standby card packet loss rate is less than the preset standby card packet loss rate threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold.

[0078] In one embodiment of the present invention, the determining whether dialing through the standby SIM card is successful specifically includes:

[0079] Determining whether a second number of dialing times through the standby SIM card exceeds a second preset number;

[0080] and / or

[0081] Determine whether the second duration of dialing through the standby SIM card exceeds the second preset duration;

[0082] If the second number of times exceeds a second preset number of times and / or the second duration exceeds a second preset duration, it is determined that the standby SIM card dialing fails.

[0083] In one embodiment of the present invention, the processor is further configured to:

[0084] During communication through the primary SIM card, sending a first ping packet to a preset server to determine a first delay statistical result of the first ping packet;

[0085] During the communication through the standby SIM card, sending a second ping packet to the preset server, and determining a second delay statistical result of the second ping packet;

[0086] The switching to the primary SIM card for communication specifically includes:

[0087] If the second delay statistical result is not less than the first delay statistical result, switching to the primary SIM card for communication.

[0088] In a third aspect, an embodiment of the present invention provides a primary and standby card switching device, which is applied to a communication device configured with a primary user identity identification SIM card and a standby SIM card, and the device includes:

[0089] The first dialing judgment module is used to judge whether the dialing through the primary SIM card is successful;

[0090] A first quality acquisition module, configured to communicate through the primary SIM card and acquire communication quality information of the primary card during the communication process if the first dialing determination module determines that the dialing is successful;

[0091] A first quality judgment module, used to judge whether the communication quality of the main SIM card indicated by the main card communication quality information is higher than a preset main card quality threshold;

[0092] The first switching module is used to switch to the standby SIM card for communication if the dialing fails or the communication quality of the main SIM card is not higher than the preset main card quality threshold.

[0093] In one embodiment of the present invention, the first quality acquisition module is specifically used to:

[0094] If the first dialing judgment module determines that the dialing is successful, communication is performed through the primary SIM card, and the primary card communication delay and / or the primary card packet loss rate during the communication process are obtained;

[0095] The first quality judgment module is specifically used to:

[0096] If the primary card communication delay is less than the preset primary card delay threshold, it is determined that the primary SIM card communication quality is higher than the preset primary card quality threshold;

[0097] and / or

[0098] If the primary card packet loss rate is less than a preset primary card packet loss rate threshold, it is determined that the communication quality of the primary SIM card is higher than a preset primary card quality threshold.

[0099] In one embodiment of the present invention, the first dialing determination module is specifically used to:

[0100] Determining whether a first number of dialing times through the primary SIM card exceeds a first preset number;

[0101] and / or

[0102] Determine whether a first duration of dialing through the primary SIM card exceeds a first preset duration;

[0103] If the first number exceeds a first preset number and / or the first duration exceeds a first preset duration, it is determined that dialing through the primary SIM card fails.

[0104] In one embodiment of the present invention, the device further comprises:

[0105] The number judgment module is used to judge whether the number of switching to the standby SIM card within the preset switching time exceeds the preset switching number; if it does not exceed the preset switching number, trigger the execution of the first switching module; if it exceeds the preset switching number, continue to communicate through the main SIM card.

[0106] In one embodiment of the present invention, the device further comprises:

[0107] The second dialing judgment module is used to judge whether the dialing through the standby SIM card is successful;

[0108] A second quality acquisition module, configured to communicate through the standby SIM card and acquire communication quality information of the standby card during the communication process if the second dialing judgment module determines that the dialing is successful;

[0109] A second quality judgment module is used to judge whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold;

[0110] The second switching module is used to switch to the main SIM card for communication if the dialing fails or the communication quality information of the standby SIM card is not higher than the preset standby card quality threshold.

[0111] In one embodiment of the present invention, the second quality acquisition module is specifically used to:

[0112] If the second dialing judgment module determines that the dialing is successful, communication is performed through the standby SIM card, and the standby card communication delay and / or the standby card packet loss rate during the communication process are obtained;

[0113] The second quality judgment module is specifically used to:

[0114] If the standby card communication delay is less than the preset standby card delay threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold;

[0115] and / or

[0116] If the standby card packet loss rate is less than the preset standby card packet loss rate threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold.

[0117] In one embodiment of the present invention, the second dialing determination module is specifically used to:

[0118] Determining whether a second number of dialing times through the standby SIM card exceeds a second preset number;

[0119] and / or

[0120] Determine whether the second duration of dialing through the standby SIM card exceeds the second preset duration;

[0121] If the second number of times exceeds a second preset number of times and / or the second duration exceeds a second preset duration, it is determined that the standby SIM card dialing fails.

[0122] In one embodiment of the present invention, the device further comprises:

[0123] A first delay statistics module, used to send a first ping packet to a preset server during communication through the primary SIM card, and determine a first delay statistics result of the first ping packet;

[0124] A second delay statistics module, used to send a second ping packet to the preset server during communication through the standby SIM card, and determine a second delay statistics result of the second ping packet;

[0125] The second switching module is specifically used to:

[0126] If the second delay statistical result is not less than the first delay statistical result, switching to the primary SIM card for communication.

[0127] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.

[0128] In a fifth aspect, an embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect.

[0129] Beneficial effects of the embodiments of the present invention:

[0130] An embodiment of the present invention provides a method for switching between a primary and a standby card. If the communication device determines that the dialing of the primary SIM card fails, it means that communication cannot be performed through the primary SIM card at present, and the communication device can automatically switch to the standby SIM card for communication. Alternatively, if the communication device determines that the communication quality of the primary card is less than the preset primary card quality threshold during communication through the primary SIM card, that is, the communication quality of communication through the primary SIM card is low, the communication device can also automatically switch to the standby SIM card for communication. That is, an embodiment of the present invention provides a method for automatically switching between primary and standby cards, which automatically switches to the standby SIM card for communication when communication cannot be performed through the primary SIM card or the communication quality is poor, without manual intervention, thereby reducing the labor cost required for switching between primary and standby cards of the communication device. BRIEF DESCRIPTION OF THE DRAWINGS

[0131] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention, and a person skilled in the art can also obtain other drawings based on these drawings.

[0132] Figure 1 A schematic diagram of a flow chart of a first method for switching between master and standby cards provided in an embodiment of the present invention;

[0133] Figure 2 A schematic flow chart of a second method for switching between master and standby cards provided in an embodiment of the present invention;

[0134] Figure 3 A schematic diagram of a flow chart of a third method for switching between a primary card and a secondary card provided in an embodiment of the present invention;

[0135] Figure 4 A schematic flow chart of a fourth method for switching between master and standby cards provided in an embodiment of the present invention;

[0136] Figure 5 A schematic flow chart of a fifth method for switching between master and standby cards provided in an embodiment of the present invention;

[0137] Figure 6 A schematic flow chart of a sixth method for switching between a primary card and a secondary card provided in an embodiment of the present invention;

[0138] Figure 7A schematic diagram of the structure of a communication device provided by an embodiment of the present invention;

[0139] Figure 8 A schematic diagram of the structure of a master-slave card switching device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0140] In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0141] In the embodiments of the present invention, the term "plurality" refers to two or more than two, and other quantifiers are similar.

[0142] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0143] Since the process of switching between the primary and standby cards in the related art is relatively complicated and requires a high level of maintenance labor, in order to solve the above problems, an embodiment of the present invention provides a method, electronic device and apparatus for switching between the primary and standby cards.

[0144] See also Figure 1 , which is a flow chart of the first primary-backup card switching method provided in an embodiment of the present invention, and is applied to a communication device configured with a primary SIM card and a backup SIM card. The above-mentioned communication device can be a gateway (including an industrial gateway, a common gateway, etc.).

[0145] The communication device involved in the embodiments of the present invention may be a device that provides voice and / or data connectivity to a user, a handheld device with a wireless connection function, or other processing devices connected to a wireless modem. In different systems, the name of the communication device may also be different. For example, in a 5G system, the communication device may be called a user equipment (UE). The wireless communication device can communicate with one or more core networks via a radio access network (RAN).

[0146] (Core Network, CN) for communication, wireless communication equipment can be mobile communication equipment, such as mobile phones (or "cellular" phones) and computers with mobile communication equipment, for example, portable, pocket, handheld, computer-built-in or vehicle-mounted mobile devices, which exchange language and / or data with the wireless access network. For example, Personal Communication Service (PCS) phones, cordless phones, Session Initiated Protocol (SIP) phones, Wireless Local Loop (WLL) stations, Personal Digital Assistants (PDA) and other equipment. Wireless communication equipment can also be called system, subscriber unit, subscriber station, mobile station, mobile, remote station, access point, remote communication equipment (remote terminal), access communication equipment (access terminal), user communication equipment (user terminal), user agent, user device

[0147] (user device), which is not limited in the embodiments of the present invention.

[0148] The above method may include steps S101 - S104 .

[0149] S101: Determine whether dialing through the primary SIM card is successful.

[0150] Specifically, if the dialing is successful, it means that the current communication device can communicate through the primary SIM card, and step S102 is executed. If the dialing fails, it means that the current communication device cannot communicate through the primary SIM card, and step S104 is executed.

[0151] The primary SIM card may not be able to dial successfully at one time. In one embodiment of the present invention, as long as the primary SIM card fails to dial once, it can be determined that the primary SIM card dialing has failed, and step S104 is executed. It can also be determined that the primary SIM card dialing has failed only when the primary SIM card fails to dial multiple times, and then step S104 is executed. The specific method of determining whether the dialing through the primary SIM card is successful can be found in the following Figure 2 The implementation of steps S101A-S101C shown is not described in detail here.

[0152] S102: Communicate via the primary SIM card and obtain communication quality information of the primary card during the communication process.

[0153] When dialing is successful through the primary SIM card, communication is performed through the primary SIM card, and the communication quality of the primary card during the communication process is monitored to obtain the communication quality information of the primary card.

[0154] Since the communication quality of the primary card of the communication device will continue to change, step S102 may be continuously performed periodically according to a preset period so that the obtained communication quality information of the primary card matches the current actual communication quality of the primary card.

[0155] Specifically, the communication quality information of the main card can be obtained through the following step A.

[0156] Step A: Obtain the main card communication delay and / or the main card packet loss rate during the communication process.

[0157] In one embodiment of the present invention, during the communication process through the main SIM card, the communication device can send a message to a preset server for a ping packet test. The preset server can be one or more. The communication device can send a preset number of messages to the preset server according to a preset period. The data volume of each message can be the same. After the ping packet test, each message is counted, and the average delay, maximum delay or minimum delay of the message is used as the main card communication delay, and the packet loss rate of each message can be used as the main card packet loss rate. If the communication device does not complete the sending of the preset number of messages within the preset period, the main card communication delay and / or the main card packet loss rate can be counted based on the messages that have been sent, or the message can continue to be sent, and statistics are performed after the preset number of messages are sent.

[0158] In an example, the duration of the above-mentioned preset period can be 120ms, the preset number can be 50, the data volume of the message can be 32Byte, etc. It should be noted that the duration of the preset period, the preset number and the data volume of the message in the embodiment of the present invention can be adjusted according to needs.

[0159] The main card communication delay and / or the main card packet loss rate are obtained through relevant technologies, and the specific acquisition method is not limited.

[0160] S103: Determine whether the communication quality of the primary SIM card indicated by the primary card communication quality information is higher than a preset primary card quality threshold.

[0161] Specifically, the above-mentioned primary card communication quality information represents the communication quality during the communication process through the primary SIM card. If the above-mentioned primary card communication quality is higher than the preset primary card quality threshold, it indicates that the current primary SIM card communication quality is high, and communication can continue to be performed through the primary SIM card. On the contrary, if the primary SIM card communication quality is lower than the preset primary card quality threshold, it indicates that the current primary SIM card communication quality is poor, and step S104 can be executed.

[0162] In one embodiment of the present invention, when the above-mentioned main card communication quality information includes the main card communication delay and / or the main card packet loss rate, the following steps B and / or C can be used to determine whether the communication quality of the main SIM card is higher than the preset main card quality threshold.

[0163] Step B: If the primary card communication delay is less than the preset primary card delay threshold, it is determined that the primary SIM card communication quality is higher than the preset primary card quality threshold.

[0164] Specifically, the smaller the communication delay of the primary card is, the smaller the delay is when communicating through the primary SIM card, and the communication quality of the primary SIM card is higher. Therefore, if the communication delay of the primary card is less than the preset primary card delay threshold, it is determined that the communication quality of the primary SIM card is higher than the preset primary card quality threshold, and the communication continues to be performed through the primary SIM card; otherwise, it is determined that the communication quality of the primary SIM card is not higher than the preset primary card quality threshold, and step S104 is executed.

[0165] Step C: If the primary card packet loss rate is less than the preset primary card packet loss rate threshold, it is determined that the communication quality of the primary SIM card is higher than the preset primary card quality threshold.

[0166] Specifically, the smaller the packet loss rate of the primary card is, the smaller the packet loss rate is when communicating through the primary SIM card, and the communication quality of the primary SIM card is higher. Therefore, if the primary card packet loss rate is less than the preset primary card packet loss rate threshold, it is determined that the communication quality of the primary SIM card is higher than the preset primary card quality threshold, and the communication continues to be performed through the primary SIM card; otherwise, it is determined that the communication quality of the primary SIM card is not higher than the preset primary card quality threshold, and step S104 is executed.

[0167] In addition, in one embodiment of the present invention, it can be determined through any one of step B or step C whether the communication quality of the primary SIM card is higher than a preset primary card quality threshold.

[0168] Alternatively, it is determined through step B and step C whether the communication quality of the primary SIM card is higher than the preset primary card quality threshold. Specifically, the two steps may be performed simultaneously. If it is determined through any step that the communication quality of the primary SIM card is lower than the preset primary card quality threshold, step S104 is performed. Furthermore, step B may be performed first and then step C, or step C may be performed first and then step B. If it is determined in the first step that the communication quality of the primary SIM card is lower than the preset primary card quality threshold, the second step is not performed and step S104 is directly performed. If it is determined in the first step that the communication quality of the primary SIM card is not lower than the preset primary card quality threshold, the second step is performed.

[0169] In addition, the above-mentioned main card communication quality information may also be the signal strength during communication through the main SIM card. The stronger the signal strength, the higher the communication quality through the main SIM card. If the signal strength is higher than the preset signal strength of the main card, it is determined that the communication quality of the main SIM card is higher than the preset main card quality threshold.

[0170] S104: Switch to the standby SIM card for communication.

[0171] Specifically, the standby SIM card is switched to dial, and communication is performed through the standby SIM card after the dialing is successful.

[0172] As can be seen from the above, an embodiment of the present invention provides a method for switching between primary and standby cards. If the communication device determines that the dialing of the primary SIM card fails, it means that communication cannot be performed through the primary SIM card at present, and the communication device can automatically switch to the standby SIM card for communication. Alternatively, if the communication device determines that the communication quality of the primary card is less than the preset primary card quality threshold during communication through the primary SIM card, that is, the communication quality of communication through the primary SIM card is low, the communication device can also automatically switch to the standby SIM card for communication. That is, an embodiment of the present invention provides a method for automatically switching between primary and standby cards, which automatically switches to the standby SIM card for communication when communication cannot be performed through the primary SIM card or the communication quality is poor, without manual intervention, thereby reducing the labor cost required for switching between primary and standby cards of the communication device.

[0173] See also Figure 2 , is a flow chart of a second method for switching between master and standby cards provided in an embodiment of the present invention, which is similar to the above Figure 1 Compared with the embodiment shown, the above step S101 can be implemented by the following steps S101A to S101C. The above step S101A and step S101B can be performed together or only one of them can be performed.

[0174] S101A: Determine whether a first number of dialing times through the primary SIM card exceeds a first preset number.

[0175] In one embodiment of the present invention, a counter may be used to record the first number of dialing through the primary SIM card, and the counter is cleared when the dialing through the primary SIM card succeeds.

[0176] If the first number of dialing through the primary SIM card exceeds the first preset number, it means that the dialing through the primary SIM card has failed multiple times, and it can be determined that the dialing of the primary SIM card has failed to execute step S101C. Otherwise, it can be determined that the number of dialing failures of the primary SIM card is within the allowable range, and the dialing through the primary SIM card can continue to be attempted until the dialing is successful.

[0177] In addition, if it is determined that the first number of dialing times through the primary SIM card exceeds the first preset number, the recorded first number of times may be cleared after executing step S101C.

[0178] S101B: Determine whether the first duration of dialing through the primary SIM card exceeds a first preset duration.

[0179] In one embodiment of the present invention, a timer may be started to count the first duration when dialing through the primary SIM card for the first time, and the timer is reset to zero when dialing through the primary SIM card is successful.

[0180] If the first duration of dialing through the primary SIM card exceeds the first preset duration, it means that dialing through the primary SIM card has failed for a long time, and it can be determined that the dialing of the primary SIM card has failed to execute step S101C. Otherwise, it can be determined that the duration of the failed dialing of the primary SIM card is within the allowable range, and dialing through the primary SIM card can be continued until the dialing is successful.

[0181] In addition, if it is determined that the first duration of dialing through the primary SIM card exceeds the first preset duration, the recorded first duration may be cleared after executing step S101C.

[0182] S101C: It is determined that dialing through the primary SIM card fails.

[0183] In one embodiment of the present invention, whether dialing through the primary SIM card is successful can be determined by step S101A, whether dialing through the primary SIM card is successful can be determined by step S101B, or whether dialing through the primary SIM card is successful can be determined by both steps S101A and S101B.

[0184] When steps S101A-S101B are used to jointly determine whether dialing through the primary SIM card is successful, steps S101A-S101B may be executed simultaneously. If the first number exceeds the first preset number and the first duration exceeds the first preset duration, it is determined that dialing through the primary SIM card fails.

[0185] Alternatively, step S101A may be performed first. If it is determined that the first number does not exceed the first preset number, step S101B is not performed to directly determine that dialing through the primary SIM card has not failed. If it is determined that the first number exceeds the first preset number, step S101B is performed again.

[0186] Furthermore, step S101B may be executed first. If it is determined that the first duration does not exceed the first preset duration, step S101A is not executed to directly determine that dialing through the primary SIM card has not failed. If it is determined that the first duration exceeds the first preset duration, step S101A is executed again.

[0187] As can be seen from the above, the solution provided by the embodiment of the present invention can judge whether dialing through the primary SIM card is successful through two different dimensions, which can improve the accuracy of the judgment result, and thus make the primary and standby card switching result based on the judgment result of whether dialing through the primary SIM card is successful more adapted to the actual application scenario.

[0188] See also Figure 3 , is a flow chart of a third method for switching between master and standby cards provided in an embodiment of the present invention, which is similar to the above Figure 1 Compared with the embodiment shown, before step S104, the following steps S105-S106 are also included.

[0189] S105: Determine whether the number of times of switching to the standby SIM card within the preset switching time exceeds the preset switching number.

[0190] In one embodiment of the present invention, if the number of switches to the backup SIM card exceeds the preset switching number within the preset switching time, it means that the communication device frequently switches from the primary SIM card to the backup SIM card in a short period of time. Since it is often difficult for the communication device to communicate normally during the switching of the primary and backup cards, frequent switching of the primary and backup cards may affect the communication quality of the communication device.

[0191] Therefore, if the number of times the backup SIM card is switched to exceeds the preset number of switching times within the preset switching time, even if there is a dialing failure or poor communication quality during the current communication through the main SIM card, communication can continue through the main SIM card, that is, step S106 is executed. On the contrary, if the number of times the backup SIM card is switched to does not exceed the preset number of switching times within the preset switching time, step S104 can be executed to switch to the backup SIM card for communication.

[0192] S106: Continue communicating via the primary SIM card.

[0193] From the above, it can be seen that in the solution provided by the embodiment of the present invention, before switching to the standby SIM card for communication, it will be preferentially determined whether the communication device has frequently performed multiple primary and standby card switches in a short period of time, and only when the primary and standby card switches are not frequently performed will the standby SIM card be switched to for communication, thereby preventing the communication device from frequently performing primary and standby card switches and affecting the communication quality of the communication device.

[0194] After switching from the primary SIM card to the backup SIM card for communication, the backup SIM card may also have poor communication quality and needs to be switched back to the primary SIM card. In the related art, the process of switching from the backup SIM card back to the primary SIM card needs to be completed manually, resulting in low efficiency of switching from the backup SIM card to the primary SIM card. In order to solve the above problem, an embodiment of the present invention further provides a solution for switching from the backup SIM card back to the primary SIM card, which is described below for details.

[0195] See also Figure 4 , is a flow chart of a fourth method for switching between master and standby cards provided in an embodiment of the present invention, which is similar to the above Figure 1 Compared with the embodiment shown, after step S104, the following steps S107-S110 are also included.

[0196] S107: Determine whether dialing through the standby SIM card is successful.

[0197] Specifically, if the dialing is successful, it means that the current communication device can communicate through the backup SIM card, and step S108 is executed. If the dialing fails, it means that the current communication device cannot communicate through the backup SIM card, and step S110 is executed.

[0198] The standby SIM card may not be able to dial successfully in one go. In one embodiment of the present invention, as long as the standby SIM card fails to dial once, it can be determined that the standby SIM card dialing has failed, and step S110 is executed. Alternatively, the standby SIM card may be determined to have failed to dial, and step S110 is executed again, only when the standby SIM card fails to dial multiple times.

[0199] Specifically, the following steps D to F can be used to determine whether dialing through the standby SIM card is successful.

[0200] Step D: Determine whether the second number of dialing times through the standby SIM card exceeds the second preset number.

[0201] In one embodiment of the present invention, a counter may be used to record the second number of dialing through the standby SIM card until the dialing through the standby SIM card is successful, and then the counter is cleared.

[0202] If the second number of dialing through the backup SIM card exceeds the second preset number, it means that the dialing through the backup SIM card has failed multiple times, and it can be determined that the dialing of the backup SIM card has failed to execute step F; otherwise, it can be determined that the number of failed dialing of the backup SIM card is within the allowable range, and you can continue to try to dial through the backup SIM card.

[0203] In addition, if it is determined that the second number of dialing times through the standby SIM card exceeds the second preset number, the recorded second number of times may be cleared after executing step F.

[0204] Step E: Determine whether the second duration of dialing through the standby SIM card exceeds the second preset duration.

[0205] In one embodiment of the present invention, a timer may be started to count the second duration when dialing through the standby SIM card for the first time, and the timer is reset when dialing through the standby SIM card succeeds.

[0206] If the second duration of dialing through the backup SIM card exceeds the second preset duration, it means that the dialing through the backup SIM card has failed for a long time, and it can be determined that the dialing of the backup SIM card has failed to execute step F; otherwise, it can be determined that the duration of the failed dialing of the backup SIM card is within the allowable range, and you can continue to try to dial through the backup SIM card.

[0207] In addition, if it is determined that the second duration of dialing through the standby SIM card exceeds the second preset duration, the recorded second duration may be cleared after executing step F.

[0208] Step F: If the second number exceeds the second preset number and / or the second duration exceeds the second preset duration, it is determined that the standby SIM card dialing fails.

[0209] In one embodiment of the present invention, whether dialing through the standby SIM card is successful can be determined in step D, whether dialing through the standby SIM card is successful can be determined in step E, or whether dialing through the standby SIM card is successful can be determined in both steps DE.

[0210] When step DE is used to jointly determine whether dialing through the standby SIM card is successful, step DE can be executed simultaneously. If the second number exceeds the second preset number and the second duration exceeds the second preset duration, it is determined that dialing through the standby SIM card fails.

[0211] Alternatively, step D may be performed first. If it is determined that the second number does not exceed the second preset number, step E is not performed to directly determine that dialing through the backup SIM card has not failed. If it is determined that the second number exceeds the second preset number, step E is performed again.

[0212] Furthermore, step E may be performed first. If it is determined that the second duration does not exceed the second preset duration, step D is not performed to directly determine that dialing through the backup SIM card has not failed. If it is determined that the second duration exceeds the second preset duration, step D is performed again.

[0213] S108: Communicate via the standby SIM card and obtain communication quality information of the standby card during the communication process.

[0214] In the case that dialing through the standby SIM card is successful, communication is performed through the standby SIM card, and the communication quality of the standby card during the communication process is monitored to obtain the communication quality information of the standby card.

[0215] Since the standby card communication quality of the communication device will continue to change, step S102 may be performed periodically and continuously according to a preset period, so that the acquired standby card communication quality information matches the current actual standby card communication quality.

[0216] Specifically, the standby card communication quality information can be obtained through the following step G.

[0217] Step G: Obtain the standby card communication delay and / or the standby card packet loss rate during the communication process.

[0218] The manner in which the communication device obtains the standby card communication delay and / or the standby card packet loss rate in the embodiment of the present invention is similar to the aforementioned step A, with the only difference being that when executing step A, the communication device communicates through the primary SIM card, and when executing step G, the communication device communicates through the standby SIM card, so step G will not be described in detail herein.

[0219] S109: Determine whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold.

[0220] Specifically, the above-mentioned standby card communication quality information represents the communication quality during the communication process through the standby SIM card. If the above-mentioned standby card communication quality is higher than the preset standby card quality threshold, it indicates that the current standby SIM card communication quality is high, and communication can continue to be performed through the standby SIM card. Conversely, if the standby SIM card communication quality is lower than the preset standby card quality threshold, it indicates that the current standby SIM card communication quality is poor, and step S110 can be executed.

[0221] In one embodiment of the present invention, when the above-mentioned standby card communication quality information includes the standby card communication delay and / or the standby card packet loss rate, it can be determined whether the standby SIM card communication quality is higher than the preset main card quality threshold through the following steps H and / or I.

[0222] Step H: If the standby card communication delay is less than the preset standby card delay threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold.

[0223] Specifically, the smaller the communication delay of the primary card is, the smaller the delay is when communicating through the primary SIM card, and the communication quality of the primary SIM card is higher. Therefore, if the communication delay of the primary card is less than the preset primary card delay threshold, it is determined that the communication quality of the primary SIM card is higher than the preset primary card quality threshold, and the communication continues to be performed through the primary SIM card; otherwise, it is determined that the communication quality of the primary SIM card is not higher than the preset primary card quality threshold, and step S104 is executed.

[0224] Step I: If the standby card packet loss rate is less than a preset standby card packet loss rate threshold, it is determined that the standby SIM card communication quality is higher than a preset standby card quality threshold.

[0225] Specifically, the smaller the standby card packet loss rate is, the smaller the packet loss rate is when communicating through the standby SIM card, and the communication quality of the standby SIM card is higher. Therefore, if the standby card packet loss rate is less than the preset standby card packet loss rate threshold, it is determined that the communication quality of the standby SIM card is higher than the preset standby card quality threshold, and the communication continues to be performed through the standby SIM card; otherwise, it is determined that the communication quality of the standby SIM card is not higher than the preset standby card quality threshold, and step S110 is executed.

[0226] In addition, in one embodiment of the present invention, it can be determined through any one of step H or step I whether the communication quality of the standby SIM card is higher than the preset primary card quality threshold.

[0227] Alternatively, it is determined through step H and step I whether the communication quality of the standby SIM card is higher than the preset standby card quality threshold. Specifically, the two steps can be performed simultaneously. If it is determined through any step that the communication quality of the standby SIM card is lower than the preset standby card quality threshold, step S110 is performed. Furthermore, step H can be performed first and then step I, or step H can be performed first and then step I. If the communication quality of the standby SIM card is determined to be lower than the preset primary card quality threshold in the first step, the later step is not performed, and step S110 is directly performed. If it is determined through the first step that the communication quality of the standby SIM card is not lower than the preset standby card quality threshold, the later step is performed.

[0228] In addition, the above-mentioned standby card communication quality information can also be the signal strength during communication through the standby SIM card. The stronger the signal strength, the higher the communication quality through the standby SIM card. When the signal strength is higher than the preset signal strength of the standby card, it is determined that the communication quality of the standby SIM card is higher than the preset standby card quality threshold.

[0229] S110: Switch to the primary SIM card for communication.

[0230] Specifically, the primary SIM card is switched to dial, and communication is performed through the primary SIM card after the dialing is successful.

[0231] As can be seen from the above, during the process of the communication device communicating through the backup SIM card, if it is determined that the backup SIM card dialing fails, it means that communication cannot be performed through the backup SIM card at present, and the communication device can automatically switch to the main SIM card for communication. Alternatively, if the communication device determines that the communication quality of the backup card is less than the preset backup card quality threshold during the communication through the backup SIM card, that is, the communication quality of the communication through the backup SIM card is low, then the communication device can also automatically switch to the main SIM card for communication. That is, the embodiment of the present invention provides a method for automatically switching between the main and backup cards, which automatically switches back to the main SIM card for communication when communication cannot be performed through the backup SIM card or the communication quality is poor, without manual intervention, thereby reducing the labor cost required for switching the main and backup cards of the communication device.

[0232] See also Figure 5 , is a flow chart of a fifth method for switching between master and standby cards provided in an embodiment of the present invention, which is similar to the above Figure 4 In comparison, the following steps S111-S112 are also included.

[0233] S111: During communication via the primary SIM card, a first ping packet is sent to a preset server to determine a first delay statistical result of the first ping packet.

[0234] S112: During communication via the standby SIM card, a second ping packet is sent to the preset server to determine a second delay statistical result of the second ping packet.

[0235] The above-mentioned preset server may be one or two. Specifically, the method for obtaining the first delay statistical result and the second delay statistical result can refer to the above step A. The average value, maximum value or minimum value of each first ping packet delay can be used as the first delay statistical result, and the average value, maximum value or minimum value of each second ping packet delay can be used as the second delay statistical result. The statistical method used to obtain the first delay statistical result and the second delay statistical result should be the same.

[0236] After executing steps S111-S112, it can be determined whether the second delay statistical result is less than the first delay statistical result. If so, it means that the delay of the current communication device communicating through the standby SIM card is less than the delay of communicating through the main SIM card, so the effect of continuing to communicate through the standby SIM card is better, and the standby SIM card can be continued to communicate without switching to the main SIM card. On the contrary, it means that the delay of the current communication device communicating through the standby SIM card is not less than the delay of communicating through the main SIM card, so the effect of communicating through the main SIM card is better, and step S110 can be executed.

[0237] From the above, it can be seen that before switching from the standby SIM card to the main SIM card, the first delay statistical result of communicating through the main SIM card and the second delay statistical result of communicating through the standby SIM card are compared, that is, the communication quality of communicating through the standby SIM card and the communication quality of communicating through the main SIM card are compared. When the communication quality of communicating through the main SIM card is better than the communication quality of communicating through the standby SIM card, the main SIM card is switched to communicate, thereby ensuring that the communication quality after switching is better.

[0238] See also Figure 6 , is a flow chart of a sixth method for switching between a primary and a secondary card provided in an embodiment of the present invention, comprising the following steps S601-S615, Figure 6 The diagram shows a complete process flow of switching between the primary and standby cards provided by an embodiment of the present invention.

[0239] Relevant parameters are pre-set, including the maximum number of times the main SIM card is redialed (a first preset number of times), the maximum number of times the standby SIM card is redialed (a second preset number of times), the main SIM card redial duration (a first preset duration), the standby SIM card redial duration (a second preset duration), the maximum number of times the main SIM card is switched to the standby SIM card within a preset switching duration (a preset switching number), a preset period for obtaining the main card communication delay and the main card communication packet loss rate, a preset main card delay threshold, a preset main card packet loss rate threshold, a preset standby card delay threshold, an IP address of a main preset server for sending ping packets, and an IP address of a standby preset server.

[0240] S601: Establish a PDU (Pack Data Unit, Protocol Data Unit) channel through the primary SIM card for communication.

[0241] S602: Determine whether a single dialing through the primary SIM card is successful, and accumulate the first number of dialing times.

[0242] If successful, execute step S603, otherwise execute step S604.

[0243] S603: Clear the first accumulated number to zero.

[0244] After executing step S603, execute step S607.

[0245] S604: Determine whether the first dialing duration exceeds a first preset duration.

[0246] If the first preset time period is exceeded, step S605 is executed; otherwise, the dialing attempt is continued and step S602 is executed.

[0247] S605: Determine whether the first number exceeds a first preset number.

[0248] If the number exceeds the first preset number, step S606 is executed; otherwise, the dialing attempt is continued and step S602 is executed.

[0249] S606: Establish a PDU channel through the standby SIM card for communication.

[0250] S607: Determine whether the primary card communication delay is less than a preset primary card delay threshold.

[0251] If yes, execute step S608; otherwise, execute step S609.

[0252] S608: Determine whether the primary card communication packet loss rate is less than a preset primary card packet loss rate threshold.

[0253] If yes, then communication is continued through the primary SIM card. Otherwise, step S609 is executed.

[0254] S609: Determine whether the number of times of switching to the standby SIM card within the preset switching time exceeds the preset switching number.

[0255] If yes, then communication is continued through the primary SIM card. Otherwise, step S606 is executed.

[0256] S610: Determine whether a single dialing through the standby SIM card is successful, and accumulate a second number of dialing times.

[0257] If successful, execute step S611, otherwise execute step S612.

[0258] S611: Clear the second cumulative number to zero.

[0259] S612: Determine whether the second dialing duration exceeds a second preset duration.

[0260] If the second preset time period is exceeded, step S613 is executed; otherwise, the dialing attempt is continued and step S610 is executed.

[0261] S613: Determine whether the second number exceeds the second preset number.

[0262] If the number exceeds the second preset number, step S601 is executed; otherwise, the dialing attempt is continued and step S610 is executed.

[0263] S614: Determine whether the standby card communication delay is less than a preset standby card delay threshold.

[0264] If yes, then communication is continued through the standby SIM card. Otherwise, step S615 is executed.

[0265] S615: Determine whether the second delay statistical result of the second ping packet is smaller than the first delay statistical result of the first ping packet.

[0266] If yes, communication is continued through the standby SIM card; otherwise, step S601 is executed.

[0267] Specifically, the above steps S601-S615 are similar to the embodiment shown above and will not be described in detail here.

[0268] Corresponding to the above-mentioned method for switching between a primary card and a secondary card applied to a communication device, an embodiment of the present invention further provides a communication device.

[0269] See also Figure 7 , is a schematic diagram of the structure of a communication device provided in an embodiment of the present invention, including a memory 701, a transceiver 702, a processor 703, a main SIM card 704, and a standby SIM card 705:

[0270] A memory 701 is used to store a computer program; a transceiver 702 is used to send and receive data under the control of the processor; and a processor 703 is used to read the computer program in the memory and perform the following operations for each cell of the base station:

[0271] Determine whether dialing through the primary SIM card is successful;

[0272] If the dialing is successful, communication is carried out through the main SIM card, and the communication quality information of the main card during the communication process is obtained;

[0273] Determining whether the communication quality of the main SIM card indicated by the main card communication quality information is higher than a preset main card quality threshold;

[0274] If the dialing fails or the communication quality of the primary SIM card is not higher than the preset primary card quality threshold, the standby SIM card is switched to communicate.

[0275] The transceiver 702 is used to receive and send data under the control of the processor 703 .

[0276] Among them, Figure 7In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 703 and various circuits of memory represented by memory 701 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 702 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, which transmission medium may include a wireless channel, a wired channel, an optical cable, and other transmission media. The processor 703 is responsible for managing the bus architecture and general processing, and the memory 701 may store data used by the processor 703 when performing operations.

[0277] The processor 703 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD). The processor may also adopt a multi-core architecture.

[0278] As can be seen from the above, if the communication device determines that the dialing of the main SIM card fails, it means that communication cannot be performed through the main SIM card at present, and the communication device can automatically switch to the backup SIM card for communication. Alternatively, if the communication device determines that the communication quality of the main card is less than the preset main card quality threshold during communication through the main SIM card, that is, the communication quality of communication through the main SIM card is low, then the communication device can also automatically switch to the backup SIM card for communication. That is, the embodiment of the present invention provides a method for automatically switching between the main and backup cards, which automatically switches to the backup SIM card for communication when communication cannot be performed through the main SIM card or the communication quality is poor, without manual intervention, thereby reducing the labor cost required for switching the main and backup cards of the communication device.

[0279] In one embodiment of the present invention, the obtaining of the communication quality information of the primary card during the communication process specifically includes:

[0280] Obtain the main card communication delay and / or main card packet loss rate during the communication process;

[0281] The determining whether the communication quality of the primary SIM card indicated by the primary card communication quality information is higher than a preset primary card quality threshold specifically includes:

[0282] If the primary card communication delay is less than the preset primary card delay threshold, it is determined that the primary SIM card communication quality is higher than the preset primary card quality threshold;

[0283] and / or

[0284] If the primary card packet loss rate is less than a preset primary card packet loss rate threshold, it is determined that the communication quality of the primary SIM card is higher than a preset primary card quality threshold.

[0285] In one embodiment of the present invention, the determining whether dialing through the primary SIM card is successful specifically includes:

[0286] Determining whether a first number of dialing times through the primary SIM card exceeds a first preset number;

[0287] and / or

[0288] Determine whether a first duration of dialing through the primary SIM card exceeds a first preset duration;

[0289] If the first number exceeds a first preset number and / or the first duration exceeds a first preset duration, it is determined that dialing through the primary SIM card fails.

[0290] As can be seen from the above, the solution provided by the embodiment of the present invention can judge whether dialing through the primary SIM card is successful through two different dimensions, which can improve the accuracy of the judgment result, and thus make the primary and standby card switching result based on the judgment result of whether dialing through the primary SIM card is successful more adapted to the actual application scenario.

[0291] In one embodiment of the present invention, the processor is further configured to:

[0292] Determine whether the number of times the standby SIM card is switched to exceeds the preset number of switching times within the preset switching time;

[0293] If the preset switching times are not exceeded, switching to the standby SIM card for communication;

[0294] If the preset switching times are exceeded, communication continues through the primary SIM card.

[0295] From the above, it can be seen that in the solution provided by the embodiment of the present invention, before switching to the standby SIM card for communication, it will be preferentially determined whether the communication device has frequently performed multiple primary and standby card switches in a short period of time, and only when the primary and standby card switches are not frequently performed will the standby SIM card be switched to for communication, thereby preventing the communication device from frequently performing primary and standby card switches and affecting the communication quality of the communication device.

[0296] In one embodiment of the present invention, the processor is further configured to:

[0297] Determine whether dialing through the standby SIM card is successful;

[0298] If the dialing is successful, communication is performed through the standby SIM card, and communication quality information of the standby card during the communication process is obtained;

[0299] Determining whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold;

[0300] If the dialing fails or the communication quality information of the standby SIM card is not higher than the preset standby card quality threshold, the communication is switched to the main SIM card.

[0301] As can be seen from the above, during the process of the communication device communicating through the backup SIM card, if it is determined that the backup SIM card dialing fails, it means that communication cannot be performed through the backup SIM card at present, and the communication device can automatically switch to the main SIM card for communication. Alternatively, if the communication device determines that the communication quality of the backup card is less than the preset backup card quality threshold during the communication through the backup SIM card, that is, the communication quality of the communication through the backup SIM card is low, then the communication device can also automatically switch to the main SIM card for communication. That is, the embodiment of the present invention provides a method for automatically switching between the main and backup cards, which automatically switches back to the main SIM card for communication when communication cannot be performed through the backup SIM card or the communication quality is poor, without manual intervention, thereby reducing the labor cost required for switching the main and backup cards of the communication device.

[0302] In one embodiment of the present invention, the acquiring of the communication quality information of the standby card during the communication process specifically includes:

[0303] Obtaining the standby card communication delay and / or the standby card packet loss rate during the communication process;

[0304] The determining whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold specifically includes:

[0305] If the standby card communication delay is less than the preset standby card delay threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold;

[0306] and / or

[0307] If the standby card packet loss rate is less than the preset standby card packet loss rate threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold.

[0308] In one embodiment of the present invention, the determining whether dialing through the standby SIM card is successful specifically includes:

[0309] Determining whether a second number of dialing times through the standby SIM card exceeds a second preset number;

[0310] and / or

[0311] Determine whether the second duration of dialing through the standby SIM card exceeds the second preset duration;

[0312] If the second number of times exceeds a second preset number of times and / or the second duration exceeds a second preset duration, it is determined that the standby SIM card dialing fails.

[0313] It can be seen from the above that the solution provided by the embodiment of the present invention can judge whether dialing through the standby SIM card is successful through two different dimensions, which can improve the accuracy of the judgment result, and thus make the primary and standby card switching results based on the judgment result of whether dialing through the standby SIM card is successful more adapted to the actual application scenario.

[0314] In one embodiment of the present invention, the processor is further configured to:

[0315] During communication through the primary SIM card, sending a first ping packet to a preset server to determine a first delay statistical result of the first ping packet;

[0316] During the communication through the standby SIM card, sending a second ping packet to the preset server, and determining a second delay statistical result of the second ping packet;

[0317] The switching to the primary SIM card for communication specifically includes:

[0318] If the second delay statistical result is not less than the first delay statistical result, switching to the primary SIM card for communication.

[0319] From the above, it can be seen that before switching from the standby SIM card to the main SIM card, the first delay statistical result of communicating through the main SIM card and the second delay statistical result of communicating through the standby SIM card are compared, that is, the communication quality of communicating through the standby SIM card and the communication quality of communicating through the main SIM card are compared. When the communication quality of communicating through the main SIM card is better than the communication quality of communicating through the standby SIM card, the main SIM card is switched to communicate, thereby ensuring that the communication quality after switching is better.

[0320] Corresponding to the above-mentioned method for switching between primary and secondary cards applied to a communication device, an embodiment of the present invention further provides a device for switching between primary and secondary cards applied to a communication device.

[0321] See also Figure 8 , is a structural schematic diagram of a primary and standby card switching device provided by an embodiment of the present invention, which is applied to a communication device configured with a primary user identity identification SIM card and a standby SIM card, and the device includes:

[0322] The first dialing determination module 801 is used to determine whether the dialing through the primary SIM card is successful;

[0323] A first quality acquisition module 802, configured to communicate through the primary SIM card and acquire communication quality information of the primary card during the communication process if the first dialing determination module determines that the dialing is successful;

[0324] The first quality judgment module 803 is used to judge whether the communication quality of the main SIM card indicated by the main card communication quality information is higher than a preset main card quality threshold;

[0325] The first switching module 804 is configured to switch to the standby SIM card for communication if the dialing fails or the communication quality of the primary SIM card is not higher than the preset primary card quality threshold.

[0326] As can be seen from the above, if the communication device determines that the dialing of the main SIM card fails, it means that communication cannot be performed through the main SIM card at present, and the communication device can automatically switch to the backup SIM card for communication. Alternatively, if the communication device determines that the communication quality of the main card is less than the preset main card quality threshold during communication through the main SIM card, that is, the communication quality of communication through the main SIM card is low, then the communication device can also automatically switch to the backup SIM card for communication. That is, the embodiment of the present invention provides a method for automatically switching between the main and backup cards, which automatically switches to the backup SIM card for communication when communication cannot be performed through the main SIM card or the communication quality is poor, without manual intervention, thereby reducing the labor cost required for switching the main and backup cards of the communication device.

[0327] In one embodiment of the present invention, the first quality acquisition module 802 is specifically configured to:

[0328] If the first dialing judgment module determines that the dialing is successful, communication is performed through the primary SIM card, and the primary card communication delay and / or the primary card packet loss rate during the communication process are obtained;

[0329] The first quality judgment module 803 is specifically used to:

[0330] If the primary card communication delay is less than the preset primary card delay threshold, it is determined that the primary SIM card communication quality is higher than the preset primary card quality threshold;

[0331] and / or

[0332] If the primary card packet loss rate is less than a preset primary card packet loss rate threshold, it is determined that the communication quality of the primary SIM card is higher than a preset primary card quality threshold.

[0333] In one embodiment of the present invention, the first dialing determination module 801 is specifically used to:

[0334] Determining whether a first number of dialing times through the primary SIM card exceeds a first preset number;

[0335] and / or

[0336] Determine whether a first duration of dialing through the primary SIM card exceeds a first preset duration;

[0337] If the first number exceeds a first preset number and / or the first duration exceeds a first preset duration, it is determined that dialing through the primary SIM card fails.

[0338] As can be seen from the above, the solution provided by the embodiment of the present invention can judge whether dialing through the primary SIM card is successful through two different dimensions, which can improve the accuracy of the judgment result, and thus make the primary and standby card switching result based on the judgment result of whether dialing through the primary SIM card is successful more adapted to the actual application scenario.

[0339] In one embodiment of the present invention, the device further comprises:

[0340] The number judgment module is used to judge whether the number of switching to the standby SIM card within the preset switching time exceeds the preset switching number; if it does not exceed the preset switching number, trigger the execution of the first switching module; if it exceeds the preset switching number, continue to communicate through the main SIM card.

[0341] From the above, it can be seen that in the solution provided by the embodiment of the present invention, before switching to the standby SIM card for communication, it will be preferentially determined whether the communication device has frequently performed multiple primary and standby card switches in a short period of time, and only when the primary and standby card switches are not frequently performed will the standby SIM card be switched to for communication, thereby preventing the communication device from frequently performing primary and standby card switches and affecting the communication quality of the communication device.

[0342] In one embodiment of the present invention, the device further comprises:

[0343] The second dialing judgment module is used to judge whether the dialing through the standby SIM card is successful;

[0344] A second quality acquisition module, configured to communicate through the standby SIM card and acquire communication quality information of the standby card during the communication process if the second dialing judgment module determines that the dialing is successful;

[0345] A second quality judgment module is used to judge whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold;

[0346] The second switching module is used to switch to the main SIM card for communication if the dialing fails or the communication quality information of the standby SIM card is not higher than the preset standby card quality threshold.

[0347] As can be seen from the above, during the process of the communication device communicating through the backup SIM card, if it is determined that the backup SIM card dialing fails, it means that communication cannot be performed through the backup SIM card at present, and the communication device can automatically switch to the main SIM card for communication. Alternatively, if the communication device determines that the communication quality of the backup card is less than the preset backup card quality threshold during the communication through the backup SIM card, that is, the communication quality of the communication through the backup SIM card is low, then the communication device can also automatically switch to the main SIM card for communication. That is, the embodiment of the present invention provides a method for automatically switching between the main and backup cards, which automatically switches back to the main SIM card for communication when communication cannot be performed through the backup SIM card or the communication quality is poor, without manual intervention, thereby reducing the labor cost required for switching the main and backup cards of the communication device.

[0348] In one embodiment of the present invention, the second quality acquisition module is specifically used to:

[0349] If the second dialing judgment module determines that the dialing is successful, communication is performed through the standby SIM card, and the standby card communication delay and / or the standby card packet loss rate during the communication process are obtained;

[0350] The second quality judgment module is specifically used to:

[0351] If the standby card communication delay is less than the preset standby card delay threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold;

[0352] and / or

[0353] If the standby card packet loss rate is less than the preset standby card packet loss rate threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold.

[0354] In one embodiment of the present invention, the second dialing determination module is specifically used to:

[0355] Determining whether a second number of dialing times through the standby SIM card exceeds a second preset number;

[0356] and / or

[0357] Determine whether the second duration of dialing through the standby SIM card exceeds the second preset duration;

[0358] If the second number of times exceeds a second preset number of times and / or the second duration exceeds a second preset duration, it is determined that the standby SIM card dialing fails.

[0359] It can be seen from the above that the solution provided by the embodiment of the present invention can judge whether dialing through the standby SIM card is successful through two different dimensions, which can improve the accuracy of the judgment result, and thus make the primary and standby card switching results based on the judgment result of whether dialing through the standby SIM card is successful more adapted to the actual application scenario.

[0360] In one embodiment of the present invention, the device further comprises:

[0361] A first delay statistics module, used to send a first ping packet to a preset server during communication through the primary SIM card, and determine a first delay statistics result of the first ping packet;

[0362] A second delay statistics module, used to send a second ping packet to the preset server during communication through the standby SIM card, and determine a second delay statistics result of the second ping packet;

[0363] The second switching module is specifically used to:

[0364] If the second delay statistical result is not less than the first delay statistical result, switching to the primary SIM card for communication.

[0365] From the above, it can be seen that before switching from the standby SIM card to the main SIM card, the first delay statistical result of communicating through the main SIM card and the second delay statistical result of communicating through the standby SIM card are compared, that is, the communication quality of communicating through the standby SIM card and the communication quality of communicating through the main SIM card are compared. When the communication quality of communicating through the main SIM card is better than the communication quality of communicating through the standby SIM card, the main SIM card is switched to communicate, thereby ensuring that the communication quality after switching is better.

[0366] It should be noted that the division of units in the embodiments of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present invention may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0367] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0368] It should be noted here that the above-mentioned device provided in the embodiment of the present invention can implement all the method steps implemented in the above-mentioned method embodiment, and can achieve the same technical effect. The parts of this embodiment that are the same as the method embodiment will not be described in detail here.

[0369] In one embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step of the method for switching between a primary card and a standby card is implemented.

[0370] The computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CD, DVD, BD, HVD, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD)), etc.

[0371] When the computer program stored in the computer-readable storage medium provided by the embodiment of the present invention is used to switch the primary and standby cards, if the communication device determines that the dialing of the primary SIM card fails, it means that communication cannot be performed through the primary SIM card at present, and the communication device can automatically switch to the standby SIM card for communication. Alternatively, if the communication device determines that the communication quality of the primary card is less than the preset primary card quality threshold during communication through the primary SIM card, that is, the communication quality of communication through the primary SIM card is low, the communication device can also automatically switch to the standby SIM card for communication. That is, the embodiment of the present invention provides a method for automatically switching the primary and standby cards, which automatically switches to the standby SIM card for communication when communication cannot be performed through the primary SIM card or the communication quality is poor, without manual intervention, thereby reducing the labor cost required for switching the primary and standby cards of the communication device.

[0372] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes any one of the master / slave card switching methods in the above embodiments.

[0373] When the computer program product provided by the embodiment of the present invention is used to switch between the primary and standby cards, if the communication device determines that the dialing of the primary SIM card fails, it means that communication cannot be performed through the primary SIM card at present, and the communication device can automatically switch to the standby SIM card for communication. Alternatively, if the communication device determines that the communication quality of the primary card is less than the preset primary card quality threshold during communication through the primary SIM card, that is, the communication quality of communication through the primary SIM card is low, the communication device can also automatically switch to the standby SIM card for communication. That is, the embodiment of the present invention provides a method for automatically switching between the primary and standby cards, which automatically switches to the standby SIM card for communication when communication cannot be performed through the primary SIM card or the communication quality is poor, without manual intervention, thereby reducing the labor cost required for switching between the primary and standby cards of the communication device.

[0374] The technical solution provided by the embodiment of the present invention can be applicable to a variety of systems, especially 5G systems. For example, the applicable system can be a global system of mobile communication (GSM) system, a code division multiple access (CDMA) system, a wideband code division multiple access (WCDMA) general packet radio service (GPRS) system, a long term evolution (LTE) system, a LTE frequency division duplex (FDD) system, a LTE time division duplex (TDD) system, an advanced long term evolution (LTE-A) system, a universal mobile telecommunication system (UMTS), a world-wide interoperability for microwave access (WiMAX) system, a 5G new radio (NR) system, etc. These various systems include communication equipment and network equipment. The system may also include a core network part, such as an evolved packet system (EPS), a 5G system (5GS), etc.

[0375] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, communication equipment, devices or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program codes.

[0376] The present invention is described with reference to flowcharts and / or block diagrams of methods, communication devices, apparatuses, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer executable instructions. These computer executable instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0377] These processor executable instructions may also be stored in a processor readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the processor readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0378] These processor-executable instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0379] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for switching between a primary card and a secondary card, characterized in that: Applied to a communication device equipped with a primary user identity identification SIM card and a backup SIM card, the method comprises: Determine whether dialing through the primary SIM card is successful; If the dialing is successful, communication is carried out through the main SIM card, and the communication quality information of the main card during the communication process is obtained; Determining whether the communication quality of the main SIM card indicated by the main card communication quality information is higher than a preset main card quality threshold; If the dialing fails or the communication quality of the primary SIM card is not higher than the preset primary card quality threshold, the standby SIM card is switched to communicate.

2. The method according to claim 1, characterized in that The obtaining of the communication quality information of the main card during the communication process includes: Obtain the main card communication delay and / or main card packet loss rate during the communication process; The determining whether the communication quality of the primary SIM card indicated by the primary card communication quality information is higher than a preset primary card quality threshold includes: If the primary card communication delay is less than the preset primary card delay threshold, it is determined that the primary SIM card communication quality is higher than the preset primary card quality threshold; and / or If the primary card packet loss rate is less than a preset primary card packet loss rate threshold, it is determined that the communication quality of the primary SIM card is higher than a preset primary card quality threshold.

3. The method according to claim 1, characterized in that: The determining whether dialing through the primary SIM card is successful includes: Determining whether a first number of dialing times through the primary SIM card exceeds a first preset number; and / or Determine whether a first duration of dialing through the primary SIM card exceeds a first preset duration; If the first number exceeds a first preset number and / or the first duration exceeds a first preset duration, it is determined that dialing through the primary SIM card fails.

4. The method according to claim 1, characterized in that Before switching to communicating through the standby SIM card, the method further includes: Determine whether the number of times the standby SIM card is switched to exceeds the preset number of switching times within the preset switching time; If the preset switching times are not exceeded, switching to the standby SIM card for communication; If the preset switching times are exceeded, communication continues through the primary SIM card.

5. The method according to any one of claims 1 to 4, characterized in that After switching to the standby SIM card for communication, the method further includes: Determine whether dialing through the standby SIM card is successful; If the dialing is successful, communication is performed through the standby SIM card, and communication quality information of the standby card during the communication process is obtained; Determining whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold; If the dialing fails or the communication quality information of the standby SIM card is not higher than the preset standby card quality threshold, the communication is switched to the main SIM card.

6. The method according to claim 5, characterized in that The obtaining of the standby card communication quality information during the communication process includes: Obtaining the standby card communication delay and / or the standby card packet loss rate during the communication process; The determining whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold includes: If the standby card communication delay is less than the preset standby card delay threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold; and / or If the standby card packet loss rate is less than the preset standby card packet loss rate threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold.

7. The method according to claim 5, characterized in that The determining whether dialing through the standby SIM card is successful includes: Determining whether a second number of dialing times through the standby SIM card exceeds a second preset number; and / or Determine whether the second duration of dialing through the standby SIM card exceeds the second preset duration; If the second number of times exceeds a second preset number of times and / or the second duration exceeds a second preset duration, it is determined that the standby SIM card dialing fails.

8. The method according to claim 5, characterized in that The method further comprises: During communication through the primary SIM card, sending a first ping packet to a preset server to determine a first delay statistical result of the first ping packet; During the communication through the standby SIM card, sending a second ping packet to the preset server, and determining a second delay statistical result of the second ping packet; The switching to the primary SIM card for communication includes: If the second delay statistical result is not less than the first delay statistical result, switching to the primary SIM card for communication.

9. A communication device, characterized in that: Including memory, transceiver, processor, main SIM card, backup SIM card: A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations: Determine whether dialing through the primary SIM card is successful; If the dialing is successful, communication is carried out through the main SIM card, and the communication quality information of the main card during the communication process is obtained; Determining whether the communication quality of the main SIM card indicated by the main card communication quality information is higher than a preset main card quality threshold; If the dialing fails or the communication quality of the primary SIM card is not higher than the preset primary card quality threshold, the standby SIM card is switched to communicate.

10. The communication device according to claim 9, characterized in that The obtaining of the communication quality information of the primary card during the communication process specifically includes: Obtain the main card communication delay and / or main card packet loss rate during the communication process; The determining whether the communication quality of the primary SIM card indicated by the primary card communication quality information is higher than a preset primary card quality threshold specifically includes: If the primary card communication delay is less than the preset primary card delay threshold, it is determined that the primary SIM card communication quality is higher than the preset primary card quality threshold; and / or If the primary card packet loss rate is less than a preset primary card packet loss rate threshold, it is determined that the communication quality of the primary SIM card is higher than a preset primary card quality threshold.

11. The communication device according to claim 9, characterized in that The determining whether the dialing through the primary SIM card is successful specifically includes: Determining whether a first number of dialing times through the primary SIM card exceeds a first preset number; and / or Determine whether a first duration of dialing through the primary SIM card exceeds a first preset duration; If the first number exceeds a first preset number and / or the first duration exceeds a first preset duration, it is determined that dialing through the primary SIM card fails.

12. The communication device according to claim 9, characterized in that The processor is further configured to: Determine whether the number of times the standby SIM card is switched to exceeds the preset number of switching times within the preset switching time; If the preset switching times are not exceeded, switching to the standby SIM card for communication; If the preset switching times are exceeded, communication continues through the primary SIM card.

13. The communication device according to any one of claims 9 to 12, characterized in that: The processor is further configured to: Determine whether dialing through the standby SIM card is successful; If the dialing is successful, communication is performed through the standby SIM card, and communication quality information of the standby card during the communication process is obtained; Determining whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold; If the dialing fails or the communication quality information of the standby SIM card is not higher than the preset standby card quality threshold, the communication is switched to the main SIM card.

14. The communication device according to claim 13, characterized in that The obtaining of the standby card communication quality information during the communication process specifically includes: Obtaining the standby card communication delay and / or the standby card packet loss rate during the communication process; The determining whether the standby SIM card communication quality indicated by the standby card communication quality information is higher than a preset standby card quality threshold specifically includes: If the standby card communication delay is less than the preset standby card delay threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold; and / or If the standby card packet loss rate is less than the preset standby card packet loss rate threshold, it is determined that the standby SIM card communication quality is higher than the preset standby card quality threshold.

15. The communication device according to claim 13, characterized in that The determining whether the dialing through the standby SIM card is successful specifically includes: Determining whether a second number of dialing times through the standby SIM card exceeds a second preset number; and / or Determine whether the second duration of dialing through the standby SIM card exceeds the second preset duration; If the second number of times exceeds a second preset number of times and / or the second duration exceeds a second preset duration, it is determined that the standby SIM card dialing fails.

16. The communication device according to claim 13, characterized in that The processor is further configured to: During communication through the primary SIM card, sending a first ping packet to a preset server to determine a first delay statistical result of the first ping packet; During the communication through the standby SIM card, sending a second ping packet to the preset server, and determining a second delay statistical result of the second ping packet; The switching to the primary SIM card for communication specifically includes: If the second delay statistical result is not less than the first delay statistical result, switching to the primary SIM card for communication.

17. A master-slave card switching device, characterized in that: Applicable to a communication device equipped with a primary user identity identification SIM card and a standby SIM card, the device comprises: The first dialing judgment module is used to judge whether the dialing through the primary SIM card is successful; A first quality acquisition module, configured to communicate through the primary SIM card and acquire communication quality information of the primary card during the communication process if the first dialing determination module determines that the dialing is successful; A first quality judgment module, used to judge whether the communication quality of the main SIM card indicated by the main card communication quality information is higher than a preset main card quality threshold; The first switching module is used to switch to the standby SIM card for communication if the dialing fails or the communication quality of the main SIM card is not higher than the preset main card quality threshold.

18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps of any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Control method based on wireless communication module, wireless communication module and related product

    CN121692457A