SIM card switching method and system
By constructing target detection instructions and performing message quality detection processing, the problem of inaccurate network quality judgment in the existing technology is solved, and timely switching of SIM cards and effective improvement of network quality is achieved.
Patent Information
- Application Number
- CN202411933330.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-05-09
AI Technical Summary
In the prior art, when judging the network quality of a mobile communication terminal, it is difficult to accurately judge the network quality, resulting in untimely switching of SIM cards.
By obtaining the long-period timing information and weak signal detection information of the SIM card, a target detection instruction is constructed to indicate whether the mobile communication terminal needs to perform quality detection on the communication network of the SIM card. If necessary, perform message quality detection processing to obtain network quality detection results, and switch the SIM card according to the results.
Improve the accuracy of network quality judgment, ensure that SIM cards are switched in time when network quality is poor, and improve communication experience.
Smart Images

Figure CN119967521A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network communication technology, and in particular to a SIM card switching method and system. Background Art
[0002] In a mobile communication network, the network quality of one operator's network may be poor while the network quality of another operator's network may be good at the same location. For a multi-SIM single-standby single-communication terminal, when the signal of the operator's network connected to its current user card is weak or the network is congested, it can disable the current user card and enable the user card of another operator to connect to a mobile communication network with better communication quality.
[0003] At present, for multi-SIM single-standby single-channel terminals, the existing technology usually involves continuously obtaining the wireless network parameters of the currently connected operator network (such as reference signal received power RSRP, interference signal-to-noise ratio SINR, etc.) through the terminal, and determining whether to switch SIM cards based on the values of these network parameters. This method often cannot accurately judge the network quality.
[0004] Therefore, the problems existing in the prior art still need to be solved and optimized. Summary of the invention
[0005] In order to solve at least one of the above technical problems, the present application provides a SIM card switching method and system, wherein the method can effectively improve the accuracy of network quality judgment.
[0006] According to a first aspect of the present application, a SIM card switching method is provided, which is applied to a mobile communication terminal, wherein the mobile communication terminal is provided with a first SIM card and a second SIM card, and the method comprises:
[0007] Acquire long-cycle timing information and weak signal detection information of the first SIM card;
[0008] Constructing a detection instruction for the long-cycle timing information and the weak signal detection information to obtain a target detection instruction, wherein the target detection instruction is used to indicate whether the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card;
[0009] If the target detection instruction is that the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card, a message quality detection process is performed on the communication network of the first SIM card to obtain a network quality detection result, and the network quality detection result is used to indicate whether the communication network of the first SIM card needs to be switched;
[0010] If the network quality detection result indicates that the communication network of the first SIM card needs to be switched, the first SIM card is switched to the second SIM card.
[0011] In some embodiments, the acquiring the long-period timing information of the first SIM card includes:
[0012] Obtaining the long cycle interval time and the preset long cycle timing threshold of the first SIM card;
[0013] Comparing the long cycle timing threshold with the long cycle interval time to obtain a long cycle comparison result;
[0014] The long cycle timing information is generated according to the long cycle comparison result.
[0015] In some embodiments, the acquiring the weak signal detection information of the first SIM card includes:
[0016] Obtaining preset delay update parameters and first terminal state conditions;
[0017] Acquire a first network attachment state and a quality detection execution state of the mobile communication terminal;
[0018] Performing a first condition judgment on the first network attachment state and the quality detection execution state according to the first terminal state condition to obtain a first state judgment result;
[0019] If the first state judgment result is that the condition is met, weak signal detection is performed on the first SIM card according to the delayed update parameter to obtain weak signal detection information; or, if the first state judgment result is that the condition is not met, return to the step of obtaining the first network attachment state and quality detection execution state of the mobile communication terminal.
[0020] In some embodiments, performing weak signal detection on the first SIM card according to the delayed update parameter to obtain weak signal detection information includes:
[0021] Get the preset maximum number of detections;
[0022] Obtaining a current delay value and weak signal network information corresponding to the current delay value;
[0023] Performing network weak signal detection on the weak signal network information to obtain intermediate detection information and a number of weak signal detections corresponding to the intermediate detection information;
[0024] According to the maximum detection number, the number of weak signal detections is compared to obtain a number comparison result;
[0025] If the result of the comparison of the number of times is that the number of weak signal detections is less than the maximum number of detections, the current delay value is updated according to the delay update parameter, and then the step of obtaining the current delay value and the weak signal network information corresponding to the current delay value is returned; or, if the result of the comparison of the number of times is that the number of weak signal detections is equal to the maximum number of detections, the weak signal detection information is obtained based on the current intermediate detection information.
[0026] In some embodiments, performing network weak signal detection on the weak signal network information to obtain intermediate detection information includes:
[0027] Get the preset weak signal network threshold;
[0028] According to the weak signal network threshold, the weak signal network information is subjected to threshold comparison to obtain a weak signal comparison result;
[0029] If the weak signal comparison result is that the weak signal network information is greater than the weak signal network threshold, return to the step of obtaining the first network attachment status and quality detection execution status of the mobile communication terminal; or, if the weak signal comparison result is that the weak signal network information is less than or equal to the weak signal network threshold, then the weak signal comparison result is determined as the intermediate detection information.
[0030] In some embodiments, performing message quality detection processing on the communication network of the first SIM card to obtain a network quality detection result includes:
[0031] Obtaining a preset second terminal status condition;
[0032] Acquiring a second network attachment state of the mobile communication terminal;
[0033] Performing a second condition judgment on the second network attachment state according to the second terminal state condition to obtain a second state judgment result;
[0034] If the second status judgment result is that the condition is met, a first network packet detection is performed on the communication network of the first SIM card to obtain the network quality detection result; or, if the second status judgment result is that the condition is not met, return to the step of obtaining the second network attachment state of the mobile communication terminal.
[0035] In some embodiments, the network quality detection result includes a first quality detection result and a second quality detection result, and performing a first network packet detection on the communication network of the first SIM card to obtain the network quality detection result includes:
[0036] Get the preset detection delay threshold;
[0037] Obtaining packet return delay information of the communication network of the first SIM card;
[0038] According to the detection delay threshold, performing a packet return delay comparison on the packet return delay information to obtain delay comparison information;
[0039] If the delay comparison information shows that the packet return delay information is less than or equal to the detection delay threshold, the first quality detection result is generated according to the delay comparison information; or, if the delay comparison information shows that the packet return delay information is greater than the detection delay threshold, a second network packet detection is performed on the communication network of the first SIM card to obtain the second quality detection result.
[0040] In some embodiments, the obtaining of the packet return delay information of the communication network of the first SIM card includes:
[0041] Get the preset maximum number of return packets and maximum return packet delay;
[0042] Obtaining the current number of return packets and the first return packet delay corresponding to the current number of return packets;
[0043] According to the maximum packet return delay, the first packet return delay is updated to obtain a second packet return delay;
[0044] Compare the current number of returned packets with the maximum number of returned packets to obtain a number comparison result;
[0045] If the result of the number comparison is that the current number of packet returns is less than the maximum number of packet returns, the second packet return delay is retained, and the current number of packet returns is updated, and then the step of obtaining the current number of packet returns and the first packet return delay corresponding to the current number of packet returns is returned; or, if the result of the number comparison is that the current number of packet returns is equal to the maximum number of packet returns, the packet return delay information is obtained based on all the second packet return delays.
[0046] In some embodiments, performing a second network packet detection on the communication network of the first SIM card to obtain the second quality detection result includes:
[0047] Obtaining a preset maximum number of comparisons and a number of packet return comparisons corresponding to the delay comparison information;
[0048] Comparing the packet return comparison times with the maximum comparison times to obtain a packet return comparison result;
[0049] If the packet return comparison result is that the packet return comparison number is less than the maximum comparison number, return to the step of obtaining the packet return delay information of the communication network of the first SIM card; or, if the packet return comparison result is that the packet return comparison number is equal to the maximum comparison number, generate the second quality detection result according to the delay comparison information.
[0050] According to a second aspect of the present application, a SIM card switching system is provided, which is applied to a mobile communication terminal, wherein the mobile communication terminal is provided with a first SIM card and a second SIM card, and the system comprises:
[0051] A first processing unit, configured to obtain long-cycle timing information and weak signal detection information of the first SIM card;
[0052] A second processing unit is used to construct a detection instruction for the long-cycle timing information and the weak signal detection information to obtain a target detection instruction, wherein the target detection instruction is used to indicate whether the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card;
[0053] A third processing unit is configured to, if the target detection instruction is that the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card, perform message quality detection processing on the communication network of the first SIM card to obtain a network quality detection result, wherein the network quality detection result is used to indicate whether it is necessary to switch the communication network of the first SIM card;
[0054] The fourth processing unit is configured to switch the first SIM card to the second SIM card if the network quality detection result indicates that the communication network of the first SIM card needs to be switched.
[0055] According to a third aspect of the present application, a computer device is provided, comprising:
[0056] at least one processor;
[0057] at least one memory for storing at least one program;
[0058] When the at least one program is executed by the at least one processor, the at least one processor implements the method as described in any one of the above aspects.
[0059] According to a fourth aspect of the present application, a computer-readable storage medium is provided, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the method described in any of the above aspects.
[0060] The beneficial effects of the technical solution provided by the embodiment of the present application are:
[0061] The present application provides a SIM card switching method and system, wherein the method is applied to a mobile communication terminal, wherein the mobile communication terminal is provided with a first SIM card and a second SIM card, and the method acquires long-cycle timing information and weak signal detection information of the first SIM card; performs detection instruction construction on the long-cycle timing information and the weak signal detection information to obtain a target detection instruction, wherein the target detection instruction is used to indicate whether the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card; if the target detection instruction indicates that the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card, message quality detection processing is performed on the communication network of the first SIM card to obtain a network quality detection result, wherein the network quality detection result is used to indicate whether the communication network of the first SIM card needs to be switched; if the network quality detection result indicates that the communication network of the first SIM card needs to be switched, the first SIM card is switched to the second SIM card. The method uses a target detection instruction constructed by weak signal detection information and long-cycle timing information to drive a mobile communication terminal to perform message quality detection on the communication network of a first SIM card, and then switches the SIM card based on the detection result indicating that the communication network needs to be switched. This method can effectively improve the accuracy of network quality judgment and, at the same time, achieve the switching of SIM cards with poor network quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 A flow chart of a SIM card switching method provided in an embodiment of the present application;
[0063] Figure 2 A detailed flow chart of the first step S110 provided in the embodiment of the present application;
[0064] Figure 3 A detailed flow chart of the second step S110 provided in the embodiment of the present application;
[0065] Figure 4 A detailed flow chart of step B4 provided in an embodiment of the present application;
[0066] Figure 5 A detailed flow chart of step B43 provided in an embodiment of the present application;
[0067] Figure 6 A detailed flow chart of step S130 provided in an embodiment of the present application;
[0068] Figure 7 A detailed flow chart of step C4 provided in an embodiment of the present application;
[0069] Figure 8A detailed flow chart of step C42 provided in an embodiment of the present application;
[0070] Fig. 9 A schematic diagram of a SIM card switching system provided in an embodiment of the present application;
[0071] Fig.10 A structural block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0072] The present application is further described below in conjunction with the accompanying drawings and specific embodiments. The described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0073] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0074] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0075] At present, for multi-SIM single-standby single-channel terminals, the existing technology usually involves the terminal continuously obtaining the wireless network parameters of the currently connected operator network (such as reference signal received power RSRP, interference signal-to-noise ratio SINR, etc.), and judging whether to switch SIM cards based on the values of these network parameters. However, since this method can only reflect the strength of the wireless signal received by the terminal, but cannot reflect the network delay of the service applications in the terminal, it is difficult to reflect the end-to-end communication experience of the terminal service applications, and cannot accurately judge the network quality.
[0076] In addition, some existing technologies monitor the network quality of the currently connected operator network by continuously performing ping detection operations in the currently connected operator network by the terminal. However, since this method requires the terminal to continuously send ICMP packets in the operator network, it requires more data traffic and the terminal consumes more power.
[0077] In view of this, an embodiment of the present application provides a SIM card switching method and system, wherein the method drives a mobile communication terminal to perform message quality detection on the communication network of a first SIM card through a target detection instruction constructed by weak signal detection information and long-cycle timing information, and then switches the SIM card with poor network quality based on the detection result that the communication network needs to be switched. By combining weak signal detection information (such as wireless network parameters such as RSRP and SINR) and packet return delay information (such as the round-trip delay of ICMP packets), the accuracy of network quality judgment can be effectively improved; at the same time, the target detection instruction constructed by weak signal detection information and long-cycle timing information reduces the number of ping detection operations performed by the terminal in the currently connected operator network while ensuring the timeliness of wireless network quality perception, further reduces the data traffic required for the mobile communication terminal to monitor the network quality of the SIM card using ping delay, and thus reduces the power consumption of the mobile communication terminal to a certain extent.
[0078] A SIM card switching method and system provided in an embodiment of the present application can be specifically described through the following embodiments. First, a SIM card switching method in an embodiment of the present application is described.
[0079] The SIM card switching method provided in the embodiment of the present application can be applied to network communication application scenarios. In the network communication application scenarios, the network communication service user can detect the network quality of the communication network to which the mobile communication is interrupted by the method provided in the embodiment of the present application, and switch the network when the quality is poor. This can improve the accuracy of network quality judgment, reduce the data traffic and power consumption required for network quality monitoring, and effectively meet the communication quality requirements of the network communication service user.
[0080] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0081] Reference Figure 1 , Figure 1This is an optional flow chart of a SIM card switching method provided in an embodiment of the present application, which is applied to a mobile communication terminal, wherein the mobile communication terminal is provided with a first SIM card and a second SIM card. The method may include but is not limited to steps S110 to S140.
[0082] Step S110: Acquire long-cycle timing information and weak signal detection information of the first SIM card;
[0083] In an embodiment of the present application, the first SIM card and the second SIM card may be user cards of different operators loaded in the mobile communication terminal, wherein the first SIM card is the user card currently being used by the mobile communication terminal, the operator corresponding to the first SIM card is different from the operator corresponding to the second SIM card, and the number of the second SIM cards may be one or more. The long-period timing information may be timing information provided by the mobile communication terminal, and the weak signal detection information may be instruction information generated based on the wireless network parameters of the communication network, wherein the instruction information is used to trigger or not trigger message quality detection, and the timing information is similar to the aforementioned instruction information and can be simply deduced by analogy.
[0084] It can be understood that the mobile communication terminal in the embodiments of the present application can be a handheld mobile communication terminal used by people, a financial payment mobile communication terminal, an industrial data collection and transmission terminal, a commodity retail data collection and transmission terminal, a video surveillance mobile communication terminal, an electronic advertising screen mobile communication terminal, etc. The examples in this application are for illustration only and do not limit the present application.
[0085] Reference Figure 2 In some embodiments, the step S110 of obtaining the long-period timing information of the first SIM card includes:
[0086] A1. Obtaining the long cycle interval time and the preset long cycle timing threshold of the first SIM card;
[0087] A2. Compare the long cycle timing threshold and the long cycle interval time to obtain a long cycle comparison result;
[0088] A3. Generate the long-cycle timing information according to the long-cycle comparison result.
[0089] In an embodiment of the present application, the preset long-cycle timing threshold can be set according to actual conditions, such as 30 minutes, 60 minutes, 120 minutes, etc.; the long-cycle interval time can be the cumulative interval time from the processing moment when the previous message quality detection processing of the mobile communication terminal started to the current moment.
[0090] It can be understood that step A2 can be to compare the size relationship between the long cycle timing threshold and the long cycle interval time. If the long cycle comparison result obtained is that the long cycle interval time is greater than or equal to the long cycle timing threshold, then an instruction information for instructing the mobile communication terminal to trigger message quality detection can be generated, and the instruction information is determined as the long cycle timing information; or, if the long cycle comparison result obtained is that the long cycle interval time is less than the long cycle timing threshold, then an instruction information for instructing the mobile communication terminal not to trigger message quality detection can be generated, and the instruction information is determined as the long cycle timing information.
[0091] Reference Figure 3 In some embodiments, the step S110 of obtaining the weak signal detection information of the first SIM card includes:
[0092] B1. Obtaining preset delay update parameters and first terminal status conditions;
[0093] B2. Acquire the first network attachment state and quality detection execution state of the mobile communication terminal;
[0094] B3. Perform a first condition judgment on the first network attachment state and the quality detection execution state according to the first terminal state condition to obtain a first state judgment result;
[0095] In the embodiment of the present application, the specific value of the delay update parameter can be set according to the actual situation, such as any one of 0 seconds, 3 seconds, 5 seconds, 10 seconds, etc.; the first terminal status condition is used to determine the current network status of the mobile communication terminal, which specifically includes whether the mobile communication terminal is currently attached to the operator network and whether the mobile communication terminal is currently in the message quality detection process. Specifically, the first network attachment state of the mobile communication terminal is used to indicate whether the mobile communication terminal is currently connected to a certain operator network state, and the quality detection execution state is used to indicate whether the mobile communication terminal is currently performing a message quality detection process.
[0096] It can be understood that the conditional judgment in step B3 can be to judge whether the first network attachment state and the quality detection execution state meet the first terminal state condition. Specifically, if the first network attachment state is that the mobile communication terminal is currently connected to the operator network state, and the quality detection execution state is that the mobile communication terminal is not currently performing message quality detection processing, it means that the first terminal state condition is met, and a first state judgment result indicating that the condition is met is obtained; or, if the first network attachment state is that the mobile communication terminal is not currently connected to the operator network state, or the quality detection execution state is that the mobile communication terminal is currently performing message quality detection processing, it means that the first terminal state condition is not met, and a first state judgment result indicating that the condition is not met is obtained.
[0097] It should be noted that there are multiple ways to implement step B3. In a first implementation, the first network attachment state and the quality detection execution state can be conditionally judged in parallel according to the first terminal state condition, and then the final first state judgment result is obtained based on the two judgment results obtained in parallel; or, in a second implementation, the first network attachment state and the quality detection execution state can be judged in series in a sequential order, and the present application does not limit the specific sequence of judgment.
[0098] B4. If the first state judgment result is that the condition is met, weak signal detection is performed on the first SIM card according to the delayed update parameter to obtain weak signal detection information;
[0099] Reference Figure 4 Further, the step B4, performing weak signal detection on the first SIM card according to the delayed update parameter to obtain weak signal detection information, includes:
[0100] B41. Obtain the preset maximum number of detection times;
[0101] B42. Obtaining a current delay value and weak signal network information corresponding to the current delay value;
[0102] In an embodiment of the present application, the preset maximum number of detections may be the maximum number of times a mobile communication terminal performs weak signal detection between two adjacent message quality detection processes. The maximum number of detections may be set according to actual conditions, such as 3, 5, 20, etc. The delay value is the interval time between two adjacent weak signal detection processes of the mobile communication terminal. The initial value of the delay value may be 0 seconds, 10 seconds, etc.
[0103] It can be understood that after the previous weak signal detection process ends and returns to execute step B42, the mobile communication terminal can first obtain the delay value of the current weak signal detection process, and wait for the corresponding time based on the current delay value, and then obtain the weak signal network information corresponding to the current delay value. The weak signal network information can be the wireless network parameters of the communication network of the first SIM card, which include but are not limited to RSRP, SINR. The wireless network parameters can be obtained using the AT instructions or API interface provided by the communication module or communication chip in the mobile communication terminal.
[0104] B43, performing network weak signal detection on the weak signal network information to obtain intermediate detection information and a number of weak signal detections corresponding to the intermediate detection information;
[0105] Reference Figure 5Further, the step B43, performing network weak signal detection on the weak signal network information to obtain intermediate detection information, includes:
[0106] B431. Obtain a preset weak signal network threshold;
[0107] B432. Perform threshold comparison on the weak signal network information according to the weak signal network threshold to obtain a weak signal comparison result;
[0108] B433. If the weak signal comparison result is that the weak signal network information is greater than the weak signal network threshold, return to the step of obtaining the first network attachment state and quality detection execution state of the mobile communication terminal;
[0109] Alternatively, B434: if the weak signal comparison result is that the weak signal network information is less than or equal to the weak signal network threshold, the weak signal comparison result is determined as the intermediate detection information.
[0110] In an embodiment of the present application, the weak signal network threshold may be a specific numerical value set in advance. Specifically, if the weak signal network information is an RSRP parameter, the weak signal network threshold may be the minimum threshold value of the RSRP parameter; or, if the weak signal network information is an SINR parameter, the weak signal network threshold may be the minimum threshold value of the SINR parameter; or, if the signal network information is an RSRP parameter and an SINR parameter, the signal network threshold may be a combination of the minimum threshold value of the RSRP parameter and the minimum threshold value of the SINR parameter. The examples in this application are for illustration only. For example, in actual applications, the weak signal network information may also be other parameters for measuring network performance, such as signal strength, bandwidth, and packet loss rate.
[0111] It can be understood that, in the embodiment of the present application, the weak signal network information is taken as the RSRP parameter as an example. Step B432 can be to compare the threshold of the RSRP parameter and the size relationship between the RSRP parameter. If the RSRP parameter is less than or equal to the minimum threshold, a weak signal comparison result is obtained in which the weak signal network information is less than or equal to the weak signal network threshold. At this time, it indicates that the network quality of the communication network of the first SIM card may deteriorate. At this time, the obtained weak signal comparison result can be determined as the intermediate detection information; or, if the RSRP parameter is greater than the minimum threshold, a weak signal comparison result is obtained in which the weak signal network information is greater than the weak signal network threshold. At this time, it indicates that the network quality of the communication network of the first SIM card is normal, and it can return to execute B2.
[0112] It should be noted that the number of weak signal detections may be the current number of detections by the mobile communication terminal during the weak signal detection process, which may be obtained by counting the number of weak signal detections performed by the mobile communication terminal in a loop. Specifically, an initial number of detections may be set, and then the current number of detections may be increased by 1 each time a weak signal detection is performed. There are many specific implementation methods, which will not be described in detail in this application.
[0113] B44. Compare the number of weak signal detections according to the maximum number of detections to obtain a number comparison result;
[0114] B45. If the comparison result of the number is that the number of weak signal detections is less than the maximum number of detections, the current delay value is numerically updated according to the delay update parameter, and then the step of returning to obtain the current delay value and the weak signal network information corresponding to the current delay value is executed;
[0115] Or B46: If the comparison result is that the number of weak signal detection times is equal to the maximum number of detection times, the weak signal detection information is obtained according to the current intermediate detection information.
[0116] In an embodiment of the present application, for a certain weak signal detection process, after obtaining the number of weak signal detection times, the size relationship between the maximum number of detection times and the number of weak signal detection times can be compared. If the number of weak signal detection times is less than the maximum number of detection times, it means that the weak signal detection has not reached the loop exit condition. At this time, the current delay value can be numerically updated according to the delay update parameter. Specifically, the sum of the delay update parameter and the current delay value can be calculated, and the sum is used as the current delay value used for the next weak signal detection process, and then the process returns to execute step B42; or, if the number of weak signal detection times is equal to the maximum number of detection times, it means that the weak signal detection reaches the loop exit condition. At this time, the current intermediate detection information can be determined as weak signal detection information, and the weak signal detection information instructs the mobile communication terminal to perform message quality detection.
[0117] Or, B5. If the first state judgment result is that the condition is not satisfied, return to the step of obtaining the first network attachment state and quality detection execution state of the mobile communication terminal.
[0118] In an embodiment of the present application, if step B3 is implemented in the first embodiment, when the first state judgment result that the characterization condition is not met is obtained, the process can return to step B2 for execution; or, if step B3 is implemented in the second embodiment, after the target judgment result appears, the target judgment result can be determined as the first state judgment result that the characterization condition is not met, and the process can return to step B2 for execution. The target judgment result can be a judgment result that the mobile communication terminal is currently attached to the operator network, or a judgment result that the mobile communication terminal is currently in the message quality detection process.
[0119] Step S120: constructing a detection instruction for the long-cycle timing information and the weak signal detection information to obtain a target detection instruction, wherein the target detection instruction is used to indicate whether the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card;
[0120] In an embodiment of the present application, step S120 may be based on OR logic, and a logical operation may be performed on the long-cycle timing information and the weak signal detection information to obtain a final target detection instruction. Specifically, if the long-cycle timing information instructs the mobile communication terminal to perform message quality detection or the weak signal detection information instructs the mobile communication terminal to perform message quality detection, a target detection instruction indicating that the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card may be obtained; or, if the long-cycle timing information instructs the mobile communication terminal not to perform message quality detection and the weak signal detection information instructs the mobile communication terminal not to perform message quality detection, a target detection instruction indicating that the mobile communication terminal does not need to perform quality detection on the communication network of the first SIM card may be obtained.
[0121] It can be understood that in actual applications, the weak signal detection information and the long-cycle timing information can be set by default to instruct the mobile communication terminal not to perform message quality detection, and the long-cycle timing information can be generated and updated in step A3, or the weak signal detection information can be updated in step B46, which will not be repeated in this application.
[0122] It should be noted that the embodiment of the present application sets the timing time period to be relatively long, instructs the mobile communication terminal to perform message quality detection through long-period timing information, and continuously updates the delay value obtained based on the delay update parameter. By judging whether several weak signal network information is less than or equal to the weak signal network threshold, it can ensure timely perception of the deterioration of the network quality of the first SIM card while reducing the number of invalid message quality detections of the mobile communication terminal, thereby reducing the data traffic generated during the message quality detection process, which is beneficial to reducing the power consumption of the mobile communication terminal.
[0123] Step S130: If the target detection instruction indicates that the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card, a message quality detection process is performed on the communication network of the first SIM card to obtain a network quality detection result, wherein the network quality detection result is used to indicate whether the communication network of the first SIM card needs to be switched;
[0124] In an embodiment of the present application, if the target detection instruction is that the mobile communication terminal does not need to perform quality detection on the communication network of the first SIM card, the execution of step S110 can be returned at this time; or, if the target detection instruction is that the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card, a message instruction detection can be performed on the communication network of the first SIM card at this time, specifically, it can be based on the ICMP protocol, through the mobile communication terminal The PING operation between the communication network of the first SIM card and other devices (such as a server, a cloud platform), etc., thereby obtaining the network quality detection result.
[0125] Reference Figure 6 In some embodiments, the step S130 of performing message quality detection processing on the communication network of the first SIM card to obtain a network quality detection result includes:
[0126] C1. Obtaining a preset second terminal status condition;
[0127] C2. Acquire a second network attachment state of the mobile communication terminal;
[0128] C3. Perform a second condition judgment on the second network attachment state according to the second terminal state condition to obtain a second state judgment result;
[0129] In the embodiment of the present application, the second terminal state condition in step C1 is similar to the first terminal state condition in the aforementioned step B1; the second network attachment state in step C2 is similar to the first network attachment state in the aforementioned step B2, the difference being that the first network attachment state is the network attachment state of the mobile communication terminal in the weak signal detection phase, and the second network attachment state is the network attachment state of the mobile communication terminal in the message quality detection phase. In addition, the second condition judgment in step C3 is similar to the first condition judgment in the aforementioned step B3, and can be simply deduced by analogy, so this application will not repeat it here.
[0130] C4. If the second state judgment result is that the condition is met, performing a first network packet detection on the communication network of the first SIM card to obtain the network quality detection result;
[0131] Reference Figure 7Further, the network quality detection result includes a first quality detection result and a second quality detection result, and the step C4, performing a first network packet detection on the communication network of the first SIM card to obtain the network quality detection result, includes:
[0132] C41. Obtain a preset detection delay threshold;
[0133] In the embodiment of the present application, the detection delay threshold is used to characterize the maximum delay of the PING operation, and its specific value can be set according to actual conditions, such as any one of 10ms, 50ms, 200ms, etc.
[0134] C42. Obtaining packet return delay information of the communication network of the first SIM card;
[0135] Reference Figure 8 Further, the step C42 of obtaining the packet return delay information of the communication network of the first SIM card includes:
[0136] C421, obtain the preset maximum number of return packets and maximum return packet delay;
[0137] C422. Obtain the current number of return packets and the first return packet delay corresponding to the current number of return packets;
[0138] C423. Update the first packet return delay according to the maximum packet return delay to obtain a second packet return delay.
[0139] C424. Compare the current number of returned packets with the maximum number of returned packets to obtain a number comparison result;
[0140] C425. If the comparison result of the number is that the current number of packet returns is less than the maximum number of packet returns, retain the second packet return delay, update the current number of packet returns, and then return to the step of obtaining the current number of packet returns and the first packet return delay corresponding to the current number of packet returns;
[0141] Alternatively, C426: if the comparison result is that the current number of returned packets is equal to the maximum number of returned packets, then according to all the second return packet delays, obtain the return packet delay information.
[0142] In an embodiment of the present application, the preset maximum number of reply packets can be a specific value set according to actual conditions, or it can be the total number of ICMP packets sent by the mobile communication terminal to other devices in each PING operation; in addition, the maximum reply packet delay can also be set according to actual conditions. The maximum reply packet delay is used to characterize the maximum round-trip delay of the ICMP packet, specifically the delay of the ICMP being sent from the mobile communication terminal to other devices and then returned from other devices to the mobile communication terminal.
[0143] It is understandable that for a certain ICMP packet that the mobile communication terminal has recently sent out in a PING operation, the mobile communication terminal can obtain the current number of return packets and the first return packet delay of the latest sent ICMP packet. Specifically, after sending out the ICMP packet, the mobile communication terminal can first wait for the ICMP packet returned by other devices according to the preset maximum return packet delay. If the other device returns the ICMP packet within the maximum return packet delay range, the corresponding first return packet delay is the actual round-trip delay of the ICMP packet; or, if the other device does not return the ICMP packet within the maximum return packet delay range, the corresponding first return packet delay can be empty or the actual round-trip delay of the ICMP packet that exceeds the maximum return packet delay range.
[0144] It should be noted that the update of step C423 may first determine whether the first packet return delay is empty and whether the first packet return delay is greater than the maximum packet return delay. If the first packet return delay is not empty and the first packet return delay is less than or equal to the maximum packet return delay, the first packet return delay may not be updated at this time, and the first packet return delay may be directly determined as the second packet return delay. Alternatively, if the first packet return delay is empty or the first packet return delay is greater than the maximum packet return delay, the first packet return delay may be updated based on the maximum packet return delay, and specifically, the specific delay value of the first packet return delay may be deleted, and several times the maximum packet return delay may be determined as the second packet return delay.
[0145] It is worth mentioning that step C424 can be to compare the size relationship between the current number of return packets and the maximum number of return packets to obtain the number comparison result. Specifically, if the number comparison result is that the current number of return packets is less than the maximum number of return packets, it means that the mobile communication terminal still has ICMP packets that have not been sent or received. At this time, the second return packet delay is retained, and the current number of return packets is updated. Specifically, the current number of return packets can be added by 1, and then the execution of step C422 is returned; or, if the number comparison result is that the current number of return packets is equal to the maximum number of return packets, it means that the mobile communication terminal does not have ICMP that has not been sent or received, and the mobile communication terminal has completed the PING operation, that is, the mobile communication terminal has completed a round of network packet detection. At this time, the actual delay that characterizes the PING operation of the mobile communication terminal can be determined according to the second return packet delay corresponding to each ICMP packet. Specifically, the average value of all second return packet delays can be calculated, and the average value is determined as the return packet delay information.
[0146] C43. Performing a packet return delay comparison on the packet return delay information according to the detection delay threshold to obtain delay comparison information;
[0147] C44. If the delay comparison information indicates that the packet return delay information is less than or equal to the detection delay threshold, generating the first quality detection result according to the delay comparison information;
[0148] In the embodiment of the present application, after obtaining the packet return delay information, step C43 may be to compare the size relationship between the detection delay threshold and the packet return delay information to obtain delay comparison information. Specifically, if the delay comparison information is that the packet return delay information is less than or equal to the detection delay threshold, then based on the delay comparison information, a first quality detection result indicating that there is no need to switch the communication network of the first SIM card can be obtained, and then the process returns to step S110.
[0149] C45. Alternatively, if the delay comparison information indicates that the packet return delay information is greater than the detection delay threshold, a second network packet detection is performed on the communication network of the first SIM card to obtain the second quality detection result.
[0150] Further, the step C45 of performing a second network packet detection on the communication network of the first SIM card to obtain the second quality detection result includes:
[0151] C451. Obtain a preset maximum number of comparisons and a number of packet return comparisons corresponding to the delay comparison information;
[0152] C452, comparing the packet return comparison times and the maximum comparison times, and obtaining a packet return comparison result;
[0153] C453. If the packet return comparison result is that the packet return comparison number is less than the maximum comparison number, return to the step of obtaining the packet return delay information of the communication network of the first SIM card;
[0154] Alternatively, C454: if the packet return comparison result is that the packet return comparison times are equal to the maximum comparison times, generating the second quality detection result according to the delay comparison information.
[0155] In an embodiment of the present application, if the delay comparison information is that the packet return delay information is greater than the detection delay threshold, a preset maximum number of comparisons can be obtained at this time. The maximum number of comparisons is used to characterize the maximum number of times the mobile communication terminal performs packet return delay comparisons during the message quality detection process, that is, the maximum number of times network packet detection is performed; the packet return comparison number can be the specific round corresponding to the current network packet detection of the mobile communication terminal.
[0156] It is understandable that step C452 may be to compare the size relationship between the number of packet comparisons and the maximum number of comparisons to obtain a return comparison result. Specifically, if the packet comparison result is that the number of packet comparisons is less than the maximum number of comparisons, it means that the loop exit condition of the network packet detection is not met at present, and at this time, it can return to step C42 to perform the next round of network packet detection.
[0157] It is worth mentioning that in the embodiment of the present application, when the packet comparison result is that the number of packet comparisons is less than the maximum number of comparisons, it is also possible to return to step C42 based on a preset short cycle; specifically, it can be that the mobile communication terminal waits for a waiting time indicated by a short cycle after obtaining the packet comparison result, and then returns to step C42, which can ensure timely perception of the network quality of the first SIM card communication network while reducing the number of quality detection times in the message quality detection process, effectively reducing the data traffic required for quality detection and terminal power consumption.
[0158] It should be noted that if the packet comparison result is that the number of packet comparisons is equal to the maximum number of comparisons, it means that the loop exit condition of the network packet detection has been met. At this time, the second quality detection result that requires switching the communication network of the first SIM card can be generated based on the current delay comparison information or the delay comparison information obtained from all rounds of network packet detection.
[0159] Or, C5: if the second state judgment result is that the condition is not satisfied, return to the step of obtaining the second network attachment state of the mobile communication terminal.
[0160] In the embodiment of the present application, if the result of the second state judgment is that the condition is not met, it means that the mobile communication terminal is not currently attached to the operator network, and at this time, it can return to execute step C2.
[0161] It should be noted that the embodiments of the present application can more fully consider the end-to-end communication experience of mobile communication terminal applications by combining weak signal network information and delay comparison information, and effectively improve the accuracy of network quality judgment.
[0162] Step S140: If the network quality detection result indicates that the communication network of the first SIM card needs to be switched, the first SIM card is switched to the second SIM card.
[0163] In an embodiment of the present application, if the network quality detection result indicates that the communication network of the first SIM card needs to be switched, the first SIM card can be switched to the second SIM card, thereby switching the communication network of the first SIM card connected to the mobile communication terminal to the communication network of the second SIM card.
[0164] Fig. 9A schematic diagram of a SIM card switching system provided in an embodiment of the present application is applied to a mobile communication terminal, wherein the mobile communication terminal is provided with a first SIM card and a second SIM card, and the system includes:
[0165] A first processing unit 810 is configured to obtain long-cycle timing information and weak signal detection information of the first SIM card;
[0166] The second processing unit 820 is used to construct a detection instruction for the long-cycle timing information and the weak signal detection information to obtain a target detection instruction, where the target detection instruction is used to indicate whether the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card;
[0167] The third processing unit 830 is configured to, if the target detection instruction is that the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card, perform message quality detection processing on the communication network of the first SIM card to obtain a network quality detection result, and the network quality detection result is used to indicate whether it is necessary to switch the communication network of the first SIM card;
[0168] The fourth processing unit 840 is configured to switch the first SIM card to the second SIM card if the network quality detection result indicates that the communication network of the first SIM card needs to be switched.
[0169] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0170] Fig.10 A schematic diagram of the structure of a computer device provided in an embodiment of the present application includes:
[0171] at least one processor 980;
[0172] At least one memory 920, used to store at least one program;
[0173] When the at least one program is executed by the at least one processor 980, the at least one processor 980 implements the methods described in the foregoing embodiments.
[0174] An embodiment of the present application also provides a computer-readable storage medium, which stores a program executable by a processor. When the program executable by the processor is executed by the processor 980, it is used to implement the methods described in the above embodiments.
[0175] Fig.10Specifically, the computer device may be a user terminal or a server.
[0176] The present application embodiment takes the computer device as a user terminal as an example, and the details are as follows:
[0177] like Fig.10 As shown, the computer device 900 may include an RF (Radio Frequency) circuit 910, a memory 920 including one or more computer-readable storage media, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a WiFi module 970, a processor 980 including one or more processing cores, and a power supply 990. Those skilled in the art will appreciate that Fig.10 The device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0178] The RF circuit 910 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is handed over to one or more processors 980 for processing; in addition, the data related to the uplink is sent to the base station. Generally, the RF circuit 910 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a user identity module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, etc. In addition, the RF circuit 910 can also communicate with the network and other devices through wireless communication. Wireless communication can use any communication standard or protocol, including but not limited to the fifth generation mobile communication technology (5th Generation Mobile Communication Technology), GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), etc.
[0179] The memory 920 can be used to store software programs and modules. The processor 980 executes various functional applications and data processing by running the software programs and modules stored in the memory 920. The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the device 900 (such as audio data, a phone book, etc.), etc. In addition, the memory 920 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 920 may also include a memory controller to provide the processor 980 and the input unit 930 with access to the memory 920. Although Fig.10 The RF circuit 910 is shown, but it is understandable that it is not an essential component of the device 900 and can be omitted as required without changing the essence of the invention.
[0180] The input unit 930 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 930 may include a touch-sensitive surface 932 and other input devices 931. The touch-sensitive surface 932, also known as a touch display screen or a touch pad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 932), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 932 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 980, and can receive and execute commands sent by the processor 980. In addition, the touch-sensitive surface 932 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 932, the input unit 930 may further include other input devices 931. Specifically, the other input devices 931 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
[0181] The display unit 940 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the device 900, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 940 may include a display panel 941. Optionally, the display panel 941 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 932 may be covered on the display panel 941. When the touch-sensitive surface 932 detects a touch operation on or near it, it is transmitted to the processor 980 to determine the type of touch event. Subsequently, the processor 980 provides a corresponding visual output on the display panel 941 according to the type of touch event. Although in Fig.10 In the embodiment, the touch-sensitive surface 932 and the display panel 941 are implemented as two independent components to implement input and output functions, but in some embodiments, the touch-sensitive surface 932 and the display panel 941 can be integrated to implement input and output functions.
[0182] The computer device 900 may also include at least one sensor 950, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 941 and / or the backlight when the device 900 is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the device 900, they will not be repeated here.
[0183] The audio circuit 960, the speaker 961, and the microphone 962 can provide an audio interface between the user and the device 900. The audio circuit 960 can transmit the electrical signal converted from the received audio data to the speaker 961, which is converted into a sound signal for output; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, which is received by the audio circuit 960 and converted into audio data, and then the audio data is processed by the output processor 980 and sent to another control device through the RF circuit 910, or the audio data is output to the memory 920 for further processing. The audio circuit 960 may also include an earplug jack to provide communication between an external headset and the device 900.
[0184] The processor 980 is the control center of the device 900. It uses various interfaces and lines to connect various parts of the entire control device. It executes various functions of the device 900 and processes data by running or executing software programs and / or modules stored in the memory 920, and calling data stored in the memory 920, so as to monitor the control device as a whole. Optionally, the processor 980 may include one or more processing cores; optionally, the processor 980 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 980.
[0185] The device 900 also includes a power supply 990 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 980 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 990 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0186] Although not shown, the device 900 may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0187] An embodiment of the present application further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the method described in the above embodiments.
[0188] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0189] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0190] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0191] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0192] In addition, each functional unit in each embodiment of the present application may be integrated into one 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.
[0193] 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 computer-readable storage medium. Based on this understanding, the technical solution of the present application 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0194] The step numbers in the above method embodiment are only provided for the convenience of explanation and description, and no limitation is imposed on the order of the steps. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0195] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the described embodiments. Technical personnel familiar with the field may make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
Claims
1. A SIM card switching method, characterized in that: Applied to a mobile communication terminal, the mobile communication terminal is provided with a first SIM card and a second SIM card, the method comprising: Acquire long-cycle timing information and weak signal detection information of the first SIM card; Constructing a detection instruction for the long-cycle timing information and the weak signal detection information to obtain a target detection instruction, wherein the target detection instruction is used to indicate whether the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card; If the target detection instruction is that the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card, a message quality detection process is performed on the communication network of the first SIM card to obtain a network quality detection result, and the network quality detection result is used to indicate whether the communication network of the first SIM card needs to be switched; If the network quality detection result indicates that the communication network of the first SIM card needs to be switched, the first SIM card is switched to the second SIM card.
2. The method according to claim 1, characterized in that The acquiring the long-period timing information of the first SIM card includes: Obtaining the long cycle interval time and the preset long cycle timing threshold of the first SIM card; Comparing the long cycle timing threshold with the long cycle interval time to obtain a long cycle comparison result; The long cycle timing information is generated according to the long cycle comparison result.
3. The method according to claim 1, characterized in that: Acquiring weak signal detection information of the first SIM card, including: Obtaining preset delay update parameters and first terminal state conditions; Acquire a first network attachment state and a quality detection execution state of the mobile communication terminal; Performing a first condition judgment on the first network attachment state and the quality detection execution state according to the first terminal state condition to obtain a first state judgment result; If the first state judgment result is that the condition is met, weak signal detection is performed on the first SIM card according to the delayed update parameter to obtain weak signal detection information; or, if the first state judgment result is that the condition is not met, return to the step of obtaining the first network attachment state and quality detection execution state of the mobile communication terminal.
4. The method according to claim 3, characterized in that: The step of performing weak signal detection on the first SIM card according to the delayed update parameter to obtain weak signal detection information includes: Get the preset maximum number of detections; Obtaining a current delay value and weak signal network information corresponding to the current delay value; Performing network weak signal detection on the weak signal network information to obtain intermediate detection information and a number of weak signal detections corresponding to the intermediate detection information; According to the maximum detection number, the number of weak signal detections is compared to obtain a number comparison result; If the result of the comparison of the number of times is that the number of weak signal detections is less than the maximum number of detections, the current delay value is updated according to the delay update parameter, and then the step of obtaining the current delay value and the weak signal network information corresponding to the current delay value is returned; or, if the result of the comparison of the number of times is that the number of weak signal detections is equal to the maximum number of detections, the weak signal detection information is obtained based on the current intermediate detection information.
5. The method according to claim 4, characterized in that The performing network weak signal detection on the weak signal network information to obtain intermediate detection information includes: Get the preset weak signal network threshold; According to the weak signal network threshold, the weak signal network information is subjected to threshold comparison to obtain a weak signal comparison result; If the weak signal comparison result is that the weak signal network information is greater than the weak signal network threshold, return to the step of obtaining the first network attachment status and quality detection execution status of the mobile communication terminal; or, if the weak signal comparison result is that the weak signal network information is less than or equal to the weak signal network threshold, then the weak signal comparison result is determined as the intermediate detection information.
6. The method according to claim 1, characterized in that The performing message quality detection processing on the communication network of the first SIM card to obtain a network quality detection result includes: Obtaining a preset second terminal status condition; Acquiring a second network attachment state of the mobile communication terminal; Performing a second condition judgment on the second network attachment state according to the second terminal state condition to obtain a second state judgment result; If the second status judgment result is that the condition is met, a first network packet detection is performed on the communication network of the first SIM card to obtain the network quality detection result; or, if the second status judgment result is that the condition is not met, return to the step of obtaining the second network attachment state of the mobile communication terminal.
7. The method according to claim 6, characterized in that The network quality detection result includes a first quality detection result and a second quality detection result, and the first network packet detection is performed on the communication network of the first SIM card to obtain the network quality detection result, including: Get the preset detection delay threshold; Obtaining packet return delay information of the communication network of the first SIM card; According to the detection delay threshold, performing a packet return delay comparison on the packet return delay information to obtain delay comparison information; If the delay comparison information shows that the packet return delay information is less than or equal to the detection delay threshold, the first quality detection result is generated according to the delay comparison information; or, if the delay comparison information shows that the packet return delay information is greater than the detection delay threshold, a second network packet detection is performed on the communication network of the first SIM card to obtain the second quality detection result.
8. The method according to claim 7, characterized in that The obtaining the packet return delay information of the communication network of the first SIM card includes: Get the preset maximum number of return packets and maximum return packet delay; Obtaining the current number of return packets and the first return packet delay corresponding to the current number of return packets; According to the maximum packet return delay, the first packet return delay is updated to obtain a second packet return delay; Compare the current number of returned packets with the maximum number of returned packets to obtain a number comparison result; If the result of the number comparison is that the current number of packet returns is less than the maximum number of packet returns, the second packet return delay is retained, and the current number of packet returns is updated, and then the step of obtaining the current number of packet returns and the first packet return delay corresponding to the current number of packet returns is returned; or, if the result of the number comparison is that the current number of packet returns is equal to the maximum number of packet returns, the packet return delay information is obtained based on all the second packet return delays.
9. The method according to claim 7, characterized in that: The performing a second network packet detection on the communication network of the first SIM card to obtain the second quality detection result includes: Obtaining a preset maximum number of comparisons and a number of packet return comparisons corresponding to the delay comparison information; Comparing the packet return comparison times with the maximum comparison times to obtain a packet return comparison result; If the packet return comparison result is that the packet return comparison number is less than the maximum comparison number, return to the step of obtaining the packet return delay information of the communication network of the first SIM card; or, if the packet return comparison result is that the packet return comparison number is equal to the maximum comparison number, generate the second quality detection result according to the delay comparison information.
10. A SIM card switching system, characterized in that: Applied to a mobile communication terminal, the mobile communication terminal is provided with a first SIM card and a second SIM card, and the system comprises: A first processing unit, configured to obtain long-cycle timing information and weak signal detection information of the first SIM card; A second processing unit is used to construct a detection instruction for the long-cycle timing information and the weak signal detection information to obtain a target detection instruction, wherein the target detection instruction is used to indicate whether the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card; A third processing unit is configured to, if the target detection instruction is that the mobile communication terminal needs to perform quality detection on the communication network of the first SIM card, perform message quality detection processing on the communication network of the first SIM card to obtain a network quality detection result, wherein the network quality detection result is used to indicate whether it is necessary to switch the communication network of the first SIM card; The fourth processing unit is configured to switch the first SIM card to the second SIM card if the network quality detection result indicates that the communication network of the first SIM card needs to be switched.