A method for network connectivity based on dual physical and virtual SIM cards.

By setting status data and pattern recognition mechanisms on mobile communication devices, the problem of dual-SIM devices being unable to connect to the network simultaneously is solved, enabling flexible network processing and supporting compatibility with multiple devices and normal network connectivity under abnormal conditions.

CN117295053BActive Publication Date: 2025-11-14BEIJING SHUMI NETWORK TECH CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311235837.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-22
Publication Date
2025-11-14
Estimated Expiration
2043-09-22

AI Technical Summary

Technical Problem

Existing IoT communication devices that support both physical and virtual SIM cards cannot connect to two mobile communication networks simultaneously, and their fixed connection methods are not flexible enough. This results in the device being unable to connect to the network normally when the physical telecom card is faulty, and also causes problems such as the need for program upgrades or incompatibility with hot reset functions.

Method used

Three status data are set on the mobile communication device: device mode, priority card type, and previous network card type. By configuring the priority card type, a physical card or a virtual card is selected as the priority network access card. When the device is powered on, the device mode is identified, and the priority card type or the previous network card type is selected for network operation according to the mode. For devices that support hot reset, the priority card type is a physical card in the first mode, and for devices that support cold reset, the operation is based on the previous network card type in the second mode.

Benefits of technology

It enables normal network access even when the physical telecom card is faulty, supports full compatibility with both hot and cold reset devices, and allows switching the priority network card type without upgrading the program, thus improving the flexibility of the network access mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117295053B_ABST
    Figure CN117295053B_ABST
Patent Text Reader

Abstract

This invention relates to a method for network connectivity based on dual SIM cards (virtual and physical). The method includes: pre-setting three status data on a first mobile communication device: device mode, priority SIM card type, and previous network connection SIM card type; identifying the device mode each time the first mobile communication device is powered on; if the device mode is a first mode, network connectivity is performed based on the priority SIM card type during device operation; if the device mode is a second mode, network connectivity is performed based on the previous network connection SIM card type during device operation. This invention improves the flexibility of the mobile communication device's network connectivity mechanism.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a processing method for networking based on dual virtual and physical SIM cards. Background Technology

[0002] An IoT communication device supporting both physical and virtual SIM cards is a mobile communication device with one physical telecom SIM card and one virtual telecom SIM card. This device connects to the internet via either the physical or virtual SIM card. For the physical SIM card, the IoT communication device needs a hardware SIM card slot to establish a data transmission channel. For the virtual SIM card, the IoT communication device needs to pre-install a virtual machine (also called a telecom SIM card virtual machine) on its internal system software or hardware to simulate communication with the physical SIM card. It then loads a set of configuration information—the virtual telecom SIM card configuration—onto the virtual SIM card virtual machine to simulate a real telecom SIM card. Although this type of IoT communication device supports two SIM cards, it cannot connect to two different mobile communication networks simultaneously; that is, the network connection process can only be implemented based on one SIM card at a time. Currently, the network connection method for this type of device is generally fixed: it always first connects to the network using the physical telecom SIM card, and only uses the virtual telecom SIM card to connect when the signal from the current network operator is weak.

[0003] However, in practical applications, this fixed networking method is not flexible enough and has many problems. For example, if the physical telecom card is removed or has poor contact, it cannot connect to the network normally. If you want to use a flexibly configurable virtual telecom card to log in first, you need to upgrade the device's software. It is also incompatible with devices that support or do not support hot reset functionality, requiring customized processing procedures for each. Here, hot reset functionality refers to being able to switch cards and log in without powering on or restarting the device; conversely, if switching cards and logging in can only be done by powering on or restarting the device, it is called cold reset. Therefore, providing a more flexible networking processing mechanism for these IoT communication devices that support both physical and virtual SIM cards is the technical problem that this invention aims to solve. Summary of the Invention

[0004] The purpose of this invention is to address the shortcomings of existing technologies by providing a processing method, electronic device, and computer-readable storage medium for network connectivity based on dual physical and virtual SIM cards. First, three status data points are set on the mobile communication device for flexible configuration: device mode, priority SIM card type, and previous network access SIM card type. By configuring the priority SIM card type, either a physical SIM card or a virtual SIM card can be selected as the preferred SIM card for network access. For mobile communication devices supporting hot reset, the device mode is set to the first mode; for those supporting only cold reset, the device mode is set to the second mode. The previous network access SIM card type is determined by the device mode and the priority SIM card type: in the first mode, the previous network access SIM card type is invalid; in the second mode, the initial value of the previous network access SIM card type corresponds to the configuration of the priority SIM card type. Then, each time the mobile communication device is powered on, it first identifies the device mode and performs network connectivity based on the priority SIM card type in the first mode, and in the second mode, it performs network connectivity based on the previous network access SIM card type. The state-configuration-based network processing mechanism provided by this invention can solve a variety of problems that traditional methods cannot solve while being compatible with traditional processing methods. It can still connect to the network normally when the physical telecom card is abnormal. It can configure and switch the telecom card type that is preferred for network access without upgrading the program. It can be fully compatible with devices that support or do not support hot reset function.

[0005] To achieve the above objectives, a first aspect of the present invention provides a method for networking based on dual physical and virtual SIM cards, the method comprising:

[0006] Three status data are pre-set on the first mobile communication device: device mode, priority card type, and previous network card type; the device mode includes a first mode and a second mode; the priority card type includes physical card priority and virtual card priority; the previous network card type includes invalid type, physical card type, and virtual card type.

[0007] The first mobile communication device identifies the device mode each time it is powered on; if the device mode is the first mode, it performs network operation based on the priority card type during device operation; if the device mode is the second mode, it performs network operation based on the previous network card type during device operation.

[0008] Preferably, the first mobile communication device includes a first hardware card slot and a first telecom card virtual machine; the first hardware card slot is used to insert a physical telecom card; the first telecom card virtual machine is used to load and run a virtual telecom card configuration; the first mobile communication device uses the physical telecom card inserted in the first hardware card slot to perform network operation, or uses the first telecom card virtual machine to run the loaded virtual telecom card configuration to perform network operation.

[0009] When the device mode is the first mode, the previous network card type is invalid; when the device mode is the second mode, if the priority card type is physical card priority, the previous network card type is initialized to physical card type, and if the priority card type is virtual card priority, the previous network card type is initialized to virtual card type.

[0010] Preferably, the network operation based on the priority card type during device operation specifically includes:

[0011] The first mobile communication device identifies the priority card type;

[0012] If the priority card type is physical card priority, then during device operation, network operation is performed with physical cards as the priority and virtual cards as the backup;

[0013] If the priority card type is virtual card priority, then during device operation, the virtual card takes precedence and the physical card serves as a backup for network operation.

[0014] Furthermore, the method of prioritizing physical cards and using virtual cards as a backup during device operation specifically includes:

[0015] When the first mobile communication device is powered on, it confirms whether a physical telecom card is inserted in the first hardware card slot and generates a corresponding first confirmation result. When the first confirmation result indicates that a card is inserted, it uses the physical telecom card inserted in the first hardware card slot to perform a network connection operation, generating a corresponding first network connection status. If the first network connection status indicates successful network connection, it sets the current card type to physical card. If the first network connection status indicates failed network connection, it identifies whether a virtual telecom card configuration has been loaded on the first telecom card virtual machine. If it has, it runs the loaded virtual telecom card configuration through the first telecom card virtual machine to perform a network connection operation, and sets the current card type to virtual card upon successful network connection. When the first confirmation result indicates that no card is inserted, it identifies whether a virtual telecom card configuration has been loaded on the first telecom card virtual machine. If it has, it runs the loaded virtual telecom card configuration through the first telecom card virtual machine to perform a network connection operation, and sets the current card type to virtual card upon successful network connection. The first confirmation result includes both inserted and uninserted cards; the current card type includes physical cards and virtual cards; the first network connection status includes successful and failed network connection.

[0016] After the first mobile communication device successfully connects to the network, it periodically identifies whether the current card type is a virtual card at a preset first time frequency. If the current card type is a virtual card, it confirms whether a physical telecom card is inserted in the first hardware card slot, generating a corresponding second confirmation result. When the second confirmation result indicates that a card is inserted, it calls the physical telecom card inserted in the slot through the first hardware card slot to perform network operation and generate a corresponding second network result. When the second network result indicates successful network connection, it updates the current card type to a physical card. When the second network result indicates failed network connection, it continues to perform network operation by running the loaded virtual telecom card configuration through the first telecom card virtual machine. The second confirmation result includes whether a card is inserted or not. The second network status includes successful network connection and failed network connection.

[0017] Furthermore, the method of prioritizing virtual cards and using physical cards as backups during device operation specifically includes:

[0018] When the first mobile communication device powers on, it checks whether a virtual telecom card configuration has been loaded on the first telecom card virtual machine, generating a corresponding third confirmation result. If the third confirmation result indicates loading, it runs the loaded virtual telecom card configuration through the first telecom card virtual machine to perform a network connection operation, generating a corresponding third network status. If the third network status indicates successful network connection, it sets the current card type to virtual card. If the third network status indicates failed network connection, it checks whether a physical telecom card is inserted in the first hardware card slot. If a physical telecom card is inserted, it calls the inserted physical telecom card through the first hardware card slot to perform a network connection operation, and sets the current card type to physical card upon successful network connection. If the third confirmation result indicates not loading, it checks whether a physical telecom card is inserted in the first hardware card slot. If a physical telecom card is inserted, it calls the inserted physical telecom card through the first hardware card slot to perform a network connection operation, and sets the current card type to physical card upon successful network connection. The third confirmation result includes loaded and not loaded; the third network status includes successful and failed network connection; and the current card type includes physical card and virtual card.

[0019] After the first mobile communication device successfully connects to the network, it periodically identifies whether the current card type is a physical card at a preset second time frequency. If the current card type is a physical card, it confirms whether a virtual telecom card configuration has been loaded on the first telecom card virtual machine to generate a corresponding fourth confirmation result. When the fourth confirmation result is that the configuration has been loaded, it runs the loaded virtual telecom card configuration through the first telecom card virtual machine to perform network operation and generate a corresponding fourth network result. When the fourth network result is that the network connection is successful, it updates the current card type to a virtual card. When the fourth network result is that the network connection fails, it continues to call the physical telecom card inserted in the first hardware card slot to perform network operation. The fourth confirmation result includes loaded and unloaded. The fourth network status includes successful network connection and failed network connection.

[0020] Preferably, the step of performing network connection operation based on the previous network card type during device operation specifically includes:

[0021] The first mobile communication device identifies the type of the previous network card when the device is powered on or restarted.

[0022] When the previous network card type was a physical card, the system confirms whether a physical telecom card is inserted in the first hardware card slot, generating a corresponding fifth confirmation result. When the fifth confirmation result indicates that a card is inserted, the system uses the physical telecom card inserted in the first hardware card slot to perform a network connection operation, generating a corresponding fifth network status. If the fifth network status indicates a network failure, the previous network card type is updated to a virtual card type and the system restarts. The fifth confirmation result includes "card inserted" and "card not inserted." The fifth network status includes "network successful" and "network failed."

[0023] When the previous network card type was a virtual card type, the system confirms whether the virtual telecom card configuration has been loaded on the first telecom card virtual machine, generating a corresponding sixth confirmation result. When the sixth confirmation result indicates that the configuration has been loaded, the system runs the loaded virtual telecom card configuration through the first telecom card virtual machine to perform network operations, generating a corresponding sixth network status. If the sixth network status indicates a network failure, the previous network card type is updated to a physical card type and the system restarts. The sixth confirmation result includes both loaded and unloaded types. The sixth network status includes both successful and failed network connections.

[0024] Furthermore, the method also includes:

[0025] When the first mobile communication device experiences multiple consecutive network connection failures during device operation, it counts the number of consecutive failures in this round; and when the count value exceeds a preset maximum failure count threshold, it stops the network connection operation, restores the previous network connection card type to its initial value according to the device mode and the priority card type, and performs network anomaly alarm processing based on a preset alarm method.

[0026] A second aspect of the present invention provides an electronic device, including: a memory, a processor, and a transceiver;

[0027] The processor is configured to be coupled to the memory, read and execute instructions in the memory to implement the method described in the first aspect above;

[0028] The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.

[0029] A third aspect of the present invention provides a computer-readable storage medium storing computer instructions that, when executed by a computer, cause the computer to perform the method described in the first aspect.

[0030] This invention provides a method, electronic device, and computer-readable storage medium for network connectivity based on dual physical and virtual SIM cards. First, three status data points are set on the mobile communication device for flexible configuration: device mode, priority SIM card type, and previous network access SIM card type. By configuring the priority SIM card type, either a physical SIM card or a virtual SIM card can be selected as the preferred network access SIM card. For mobile communication devices supporting hot reset, the device mode is set to the first mode; for those supporting only cold reset, the device mode is set to the second mode. The previous network access SIM card type is determined by the device mode and the priority SIM card type: in the first mode, the previous network access SIM card type is invalid; in the second mode, the initial value of the previous network access SIM card type corresponds to the configuration of the priority SIM card type. Then, each time the mobile communication device is powered on, it first identifies the device mode and performs network connectivity based on the priority SIM card type in the first mode, and in the second mode, it performs network connectivity based on the previous network access SIM card type. The state-configuration-based network processing mechanism provided by this invention can solve many problems that traditional methods cannot while maintaining compatibility with traditional processing methods. It allows for normal network access even when the physical SIM card is faulty, enables configuration switching of the preferred SIM card type without software upgrades, and provides full compatibility with devices that support or do not support hot reset functionality. This invention significantly improves the flexibility of network mechanisms for mobile communication devices. Attached Figure Description

[0031] Figure 1This is a schematic diagram of a network connection processing method based on dual virtual and physical SIM cards provided in Embodiment 1 of the present invention;

[0032] Figure 2 This is a schematic diagram of the structure of an electronic device provided in Embodiment 2 of the present invention. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0034] Embodiment 1 of the present invention provides a method for network connectivity based on dual virtual and physical SIM cards, such as... Figure 1 The schematic diagram of a method for networking based on dual virtual and physical SIM cards provided in Embodiment 1 of the present invention mainly includes the following steps:

[0035] Step 1: Pre-set three status data on the first mobile communication device: device mode, priority card type, and previous network card type;

[0036] The first mobile communication device includes a first hardware card slot and a first telecom card virtual machine; the first hardware card slot is used to insert a physical telecom card; the first telecom card virtual machine is used to load and run a virtual telecom card configuration; the first mobile communication device can call the physical telecom card inserted in the slot to perform network operation through the first hardware card slot, or run the loaded virtual telecom card configuration through the first telecom card virtual machine to perform network operation.

[0037] The device modes include a first mode and a second mode;

[0038] Priority card types include physical card priority and virtual card priority;

[0039] The previous network card type includes invalid type, physical card type and virtual card type; when the device mode is the first mode, the previous network card type is invalid; when the device mode is the second mode, if the priority card type is physical card priority, the previous network card type is initialized to physical card type, and if the priority card type is virtual card priority, the previous network card type is initialized to virtual card type.

[0040] Here, the first mobile communication device in this embodiment of the invention is a mobile communication device that can simultaneously load one physical telecom card and one virtual telecom card; in this embodiment of the invention, by configuring the priority card type, either the physical card or the virtual card can be selected as the priority telecom card for network access; for mobile communication devices that support hot reset, the device mode will be set to the first mode, and for mobile communication devices that only support cold reset, the device mode will be set to the second mode; the setting of the previous network card type is determined by the device mode and the priority card type: in the first mode, the previous network card type is invalid, and in the second mode, the initial value of the previous network card type corresponds to the configuration of the priority card type.

[0041] Step 2: Each time the first mobile communication device is powered on, it identifies the device mode; if the device mode is the first mode, it performs network operation based on the priority card type during device operation; if the device mode is the second mode, it performs network operation based on the previous network card type during device operation.

[0042] Here, the first mobile communication device in this embodiment of the invention first identifies the device mode each time it is powered on, and performs network operation based on the priority card type in the first mode, and performs network operation based on the previous network card type in the second mode;

[0043] Specifically, this includes: Step 21, the first mobile communication device identifies the device mode each time it is powered on;

[0044] Step 22: If the device mode is the first mode, then network operation is performed based on the priority card type during device operation;

[0045] Specifically, this includes: Step 221, identifying the priority card type;

[0046] Step 222: If the priority card type is physical card priority, then during device operation, the physical card is given priority and the virtual card is used as a backup for network operation;

[0047] Specifically, this includes: Step 2221, when the device is powered on, confirming whether a physical telecom card is inserted in the first hardware card slot and generating a corresponding first confirmation result; when the first confirmation result indicates that a card is inserted, calling the physical telecom card inserted in the slot through the first hardware card slot to perform network operation and generating a corresponding first network status, and setting the corresponding current card type to physical card when the first network status indicates successful network connection, and identifying whether a virtual telecom card configuration has been loaded on the first telecom card virtual machine when the first network status indicates failed network connection; if loaded, running the loaded virtual telecom card configuration through the first telecom card virtual machine to perform network operation, and setting the current card type to virtual card when the network connection is successful; when the first confirmation result indicates that no card is inserted, identifying whether a virtual telecom card configuration has been loaded on the first telecom card virtual machine; if loaded, running the loaded virtual telecom card configuration through the first telecom card virtual machine to perform network operation, and setting the current card type to virtual card when the network connection is successful.

[0048] The first confirmation result includes whether the card is inserted or not; the current card type includes physical card and virtual card; the first network connection status includes successful network connection and failed network connection.

[0049] Here, in this embodiment of the invention, the first mobile communication device is in device mode = first mode and priority card type = physical card priority:

[0050] First, check if the physical card exists. If the physical card exists, connect to the network based on the physical card. If the physical card successfully connects to the network, the current card type is set to physical card. If the physical card fails to connect to the network, switch to virtual card connection and set the current card type to virtual card when the virtual card successfully connects to the network. If the physical card does not exist, switch to virtual card connection and set the current card type to virtual card when the virtual card successfully connects to the network.

[0051] Step 2222: After the device is powered on and connected to the network successfully, the current card type is periodically identified as a virtual card at a preset first time frequency. If the current card type is a virtual card, the device confirms whether a physical telecom card is inserted in the first hardware card slot to generate a corresponding second confirmation result. When the second confirmation result indicates that a card has been inserted, the device calls the physical telecom card inserted in the slot through the first hardware card slot to perform a network connection operation and generate a corresponding second network connection result. When the second network connection result indicates that the network connection is successful, the current card type is updated to a physical card. When the second network connection result indicates that the network connection fails, the device continues to perform a network connection operation by running the loaded virtual telecom card configuration through the first telecom card virtual machine.

[0052] The second confirmation result includes whether the card has been inserted or not; the second network status includes successful network connection and failed network connection.

[0053] Here, the first time frequency is a pre-set frequency data; the embodiments of the present invention stipulate that when the device mode = first mode and the priority card type = physical card priority, if the device previously switched to a virtual card for network access due to a physical card malfunction, it needs to switch back to the physical card for network access as soon as the physical card recovers; therefore, the first mobile communication device of the present invention, when the device mode = first mode and the priority card type = physical card priority, will periodically check whether the physical card exists if the current card type is a virtual card. Once the existence is confirmed, it will switch to the physical card for network access and set the current card type = physical card when the network access is successful.

[0054] It should be noted that, in this embodiment of the invention, after the device mode = first mode, the priority card type = physical card priority, and the device is powered on and connected to the network successfully, even when the current card type = physical card, a processing mechanism similar to step 2221 is provided to switch to virtual card when the network efficiency of the physical card is lower than a specified threshold or when there is an abnormal network disconnection. Specifically, after the device mode = first mode, the priority card type = physical card priority, and the device is powered on and connected to the network successfully, if the current card type = physical card, the data transmission efficiency and network disconnection event of the current network are tracked. Once the data transmission efficiency is lower than the specified efficiency threshold or a network disconnection event occurs, it is immediately identified whether the virtual telecom card configuration has been loaded on the first telecom card virtual machine. If it has been loaded, the loaded virtual telecom card configuration is run through the first telecom card virtual machine to perform network operation, and the current card type is set to virtual card when the network connection is successful.

[0055] Step 223: If the priority card type is virtual card priority, then during device operation, the virtual card is given priority and the physical card is used as a backup for network operation.

[0056] Specifically, this includes: Step 2231, when the device is powered on, confirming whether the virtual telecom card configuration has been loaded on the first telecom card virtual machine to generate a corresponding third confirmation result; when the third confirmation result is loaded, running the loaded virtual telecom card configuration through the first telecom card virtual machine to perform network operation and generate a corresponding third network status, and when the third network status is successful, setting the corresponding current card type to virtual card, and when the third network status is failed, identifying whether a physical telecom card is inserted in the first hardware card slot; if a physical telecom card is inserted, calling the physical telecom card inserted in the slot through the first hardware card slot to perform network operation, and setting the current card type to physical card when the network is successful; when the third confirmation result is not loaded, identifying whether a physical telecom card is inserted in the first hardware card slot; if a physical telecom card is inserted, calling the physical telecom card inserted in the slot through the first hardware card slot to perform network operation, and setting the current card type to physical card when the network is successful.

[0057] The third confirmation result includes loaded and unloaded; the third network status includes successful network connection and failed network connection; the current card type includes physical card and virtual card;

[0058] Here, similar to step 2221, the first mobile communication device in this embodiment of the invention is in the following condition: device mode = first mode and priority card type = virtual card priority:

[0059] First, confirm whether the virtual card exists. If the virtual card exists, connect to the network based on the virtual card. If the virtual card successfully connects to the network, the current card type is set to virtual card. If the virtual card fails to connect to the network, switch to the physical card and set the current card type to physical card when the virtual card successfully connects to the network. If the virtual card does not exist, switch to the physical card and set the current card type to physical card when the physical card successfully connects to the network.

[0060] Step 2232: After the device is powered on and connected to the network successfully, the current card type is periodically identified as a physical card at a preset second time frequency. If the current card type is a physical card, the system confirms whether the virtual telecom card configuration has been loaded on the first telecom card virtual machine to generate a corresponding fourth confirmation result. If the fourth confirmation result is that the configuration has been loaded, the system runs the loaded virtual telecom card configuration through the first telecom card virtual machine to perform network operation and generate a corresponding fourth network result. If the fourth network result is that the network connection is successful, the current card type is updated to a virtual card. If the fourth network result is that the network connection fails, the system continues to use the physical telecom card inserted in the first hardware card slot to perform network operation.

[0061] The fourth confirmation result includes loaded and unloaded; the fourth network status includes successful network connection and failed network connection.

[0062] Here, the second time frequency is a pre-set frequency data; similar to step 2222, this embodiment of the invention stipulates that when the device mode = first mode and the priority card type = virtual card priority, if the device previously switched to a physical card for network access due to a virtual card malfunction, it needs to switch back to the virtual card for network access as soon as the virtual card recovers; therefore, this embodiment of the invention stipulates that when the device mode = first mode and the priority card type = virtual card priority, if the current card type is a physical card, the first mobile communication device will periodically check whether the virtual card exists. Once it is confirmed that the virtual card exists, it will switch to the virtual card for network access and set the current card type = virtual card when the network access is successful.

[0063] It should be noted that, in this embodiment of the invention, after the device mode = first mode, the priority card type = virtual card priority, and the device is powered on and connected to the network successfully, even when the current card type = virtual card, a processing mechanism similar to step 2231 is provided to switch to a physical card when the virtual card network efficiency is lower than a specified threshold or when there is an abnormal network disconnection. Specifically, after the device mode = first mode, the priority card type = virtual card priority, and the device is powered on and connected to the network successfully, if the current card type = virtual card, the data transmission efficiency and network disconnection event of the current network are tracked. Once the data transmission efficiency is lower than the specified efficiency threshold or a network disconnection event occurs, the device immediately identifies whether a physical telecom card is inserted in the first hardware card slot. If a physical telecom card is inserted, the device calls the physical telecom card inserted in the slot through the first hardware card slot to perform network operation, and sets the current card type to physical card when the network connection is successful.

[0064] Step 23: If the device mode is the second mode, then network operation is performed based on the previous network card type during device operation;

[0065] Here, as can be seen from the previous text, when the device mode is the second mode, it means that the first mobile communication device in this embodiment of the invention does not support hot reset. Therefore, each time a card change is determined, the configuration information of the previous network card type is updated to another card type before restarting. After restarting, the card change network will be realized based on the updated previous network card type.

[0066] Specifically, this includes: Step 231, identifying the type of the previous network card when the device is powered on or restarted each time the device is restarted;

[0067] Step 232: When the current network card type is a physical card type, confirm whether a physical telecom card is inserted in the first hardware card slot to generate the corresponding fifth confirmation result; when the fifth confirmation result is that the card is inserted, call the physical telecom card inserted in the slot through the first hardware card slot to perform network operation to generate the corresponding fifth network status, and when the fifth network status is network failure, update the previous network card type to virtual card type and restart.

[0068] The fifth confirmation result includes whether the card has been inserted or not; the fifth network status includes whether the network connection was successful or failed.

[0069] Step 233: When the current network card type is a virtual card type, confirm whether the virtual telecom card configuration has been loaded on the first telecom card virtual machine to generate the corresponding sixth confirmation result; when the sixth confirmation result is loaded, run the loaded virtual telecom card configuration through the first telecom card virtual machine to perform network operation and generate the corresponding sixth network status; when the sixth network status is network failure, update the previous network card type to physical card type and restart.

[0070] The sixth confirmation result includes loaded and unloaded; the sixth network status includes successful network connection and failed network connection.

[0071] It should also be noted that the first mobile communication device in this embodiment of the invention will count the number of consecutive network failures when multiple network connection failures occur during device operation; and stop network operation when the count value exceeds a preset maximum failure count threshold, restore the previous network card type to its initial value according to the device mode and priority card type, and perform network anomaly alarm processing based on a preset alarm method. Here, the maximum failure count threshold is a preset value; the preset alarm method can be an alarm processing mechanism implemented through SMS, voice, instant messaging, email, alarm network messages, etc., or an alarm processing mechanism implemented through on-site sound and light alarms, or an alarm processing mechanism composed of all or some of the above alarm methods.

[0072] Figure 2 This is a schematic diagram of an electronic device provided in Embodiment 2 of the present invention. This electronic device can be the aforementioned terminal device or server, or it can be a terminal device or server connected to the aforementioned terminal device or server that implements the method of the embodiments of the present invention. Figure 2 As shown, the electronic device may include: a processor 301 (e.g., CPU), a memory 302, and a transceiver 303; the transceiver 303 is coupled to the processor 301, and the processor 301 controls the transmission and reception operations of the transceiver 303. The memory 302 may store various instructions for performing various processing functions and implementing the processing steps described in the foregoing method embodiments. Preferably, the electronic device involved in the embodiments of the present invention further includes: a power supply 304, a system bus 305, and a communication port 306. The system bus 305 is used to realize communication connections between components. The communication port 306 is used for communication between the electronic device and other peripherals.

[0073] exist Figure 2 The system bus 305 mentioned can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This system bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 2The symbol is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write libraries, and read-only libraries). Memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk drive.

[0074] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), graphics processing units (GPUs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0075] It should be noted that the embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods provided in the above embodiments.

[0076] This invention also provides a chip for executing instructions, which is used to perform the processing steps described in the foregoing method embodiments.

[0077] This invention provides a method, electronic device, and computer-readable storage medium for network connectivity based on dual physical and virtual SIM cards. First, three status data points are set on the mobile communication device for flexible configuration: device mode, priority SIM card type, and previous network access SIM card type. By configuring the priority SIM card type, either a physical SIM card or a virtual SIM card can be selected as the preferred network access SIM card. For mobile communication devices supporting hot reset, the device mode is set to the first mode; for those supporting only cold reset, the device mode is set to the second mode. The previous network access SIM card type is determined by the device mode and the priority SIM card type: in the first mode, the previous network access SIM card type is invalid; in the second mode, the initial value of the previous network access SIM card type corresponds to the configuration of the priority SIM card type. Then, each time the mobile communication device is powered on, it first identifies the device mode and performs network connectivity based on the priority SIM card type in the first mode, and in the second mode, it performs network connectivity based on the previous network access SIM card type. The state-configuration-based network processing mechanism provided by this invention can solve many problems that traditional methods cannot while maintaining compatibility with traditional processing methods. It allows for normal network access even when the physical SIM card is faulty, enables configuration switching of the preferred SIM card type without software upgrades, and provides full compatibility with devices that support or do not support hot reset functionality. This invention significantly improves the flexibility of network mechanisms for mobile communication devices.

[0078] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0079] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0080] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for networking based on dual virtual and physical SIM cards, characterized in that, The method includes: Three status data are pre-set on the first mobile communication device: device mode, priority card type, and previous network card type; the device mode includes a first mode and a second mode; the priority card type includes physical card priority and virtual card priority; the previous network card type includes invalid type, physical card type, and virtual card type. The first mobile communication device identifies the device mode each time it is powered on; if the device mode is the first mode, it performs network operation based on the priority card type during device operation; if the device mode is the second mode, it performs network operation based on the previous network card type during device operation. Among them, the device mode of the first mobile communication device that supports hot reset is set to the first mode, and the device mode of the first mobile communication device that only supports cold reset is set to the second mode. When the device mode is the first mode, the previous network card type is invalid; when the device mode is the second mode, if the priority card type is physical card priority, the previous network card type is initialized to physical card type; if the priority card type is virtual card priority, the previous network card type is initialized to virtual card type. The network operation based on the priority card type during device operation specifically includes: The first mobile communication device identifies the priority card type; If the priority card type is physical card priority, then during device operation, network operation is performed with physical cards as the priority and virtual cards as the backup; If the priority card type is virtual card priority, then during device operation, the virtual card is given priority and the physical card is used as a backup for network operation; The process of performing network connection operations based on the previous network card type during device operation specifically includes: The first mobile communication device identifies the type of the previous network card when the device is powered on or restarted. When the previous network card type was a physical card, a fifth confirmation result is generated by confirming whether a physical telecom card is inserted in the first hardware card slot. When the fifth confirmation result indicates that a card is inserted, the physical telecom card inserted in the first hardware card slot is used to perform network operation, generating a corresponding fifth network status. If the fifth network status indicates network failure, the previous network card type is updated to a virtual card type and the system is restarted. The fifth confirmation result includes card inserted and card not inserted. The fifth network status includes network success and network failure. When the previous network card type was a virtual card type, the system confirms whether the virtual telecom card configuration has been loaded on the first telecom card virtual machine, generating a corresponding sixth confirmation result. When the sixth confirmation result indicates that the configuration has been loaded, the system runs the loaded virtual telecom card configuration through the first telecom card virtual machine to perform network operations, generating a corresponding sixth network status. If the sixth network status indicates a network failure, the previous network card type is updated to a physical card type and the system restarts. The sixth confirmation result includes both loaded and unloaded types. The sixth network status includes both successful and failed network connections.

2. The processing method for networking based on dual virtual and physical SIM cards according to claim 1, characterized in that, The method of prioritizing physical cards and using virtual cards as a backup during device operation specifically includes: When the first mobile communication device is powered on, it confirms whether a physical telecom card is inserted in the first hardware card slot and generates a corresponding first confirmation result. When the first confirmation result indicates that a card is inserted, it uses the physical telecom card inserted in the first hardware card slot to perform a network connection operation, generating a corresponding first network connection status. If the first network connection status indicates successful network connection, it sets the current card type to physical card. If the first network connection status indicates failed network connection, it identifies whether a virtual telecom card configuration has been loaded on the first telecom card virtual machine. If it has, it runs the loaded virtual telecom card configuration through the first telecom card virtual machine to perform a network connection operation, and sets the current card type to virtual card upon successful network connection. When the first confirmation result indicates that no card is inserted, it identifies whether a virtual telecom card configuration has been loaded on the first telecom card virtual machine. If it has, it runs the loaded virtual telecom card configuration through the first telecom card virtual machine to perform a network connection operation, and sets the current card type to virtual card upon successful network connection. The first confirmation result includes both inserted and uninserted cards; the current card type includes physical cards and virtual cards; the first network connection status includes successful and failed network connection. After the first mobile communication device successfully connects to the network, it periodically identifies whether the current card type is a virtual card at a preset first time frequency. If the current card type is a virtual card, it confirms whether a physical telecom card is inserted in the first hardware card slot, generating a corresponding second confirmation result. When the second confirmation result indicates that a card is inserted, it calls the physical telecom card inserted in the slot through the first hardware card slot to perform network operation and generate a corresponding second network result. When the second network result indicates successful network connection, it updates the current card type to a physical card. When the second network result indicates failed network connection, it continues to perform network operation by running the loaded virtual telecom card configuration through the first telecom card virtual machine. The second confirmation result includes whether a card is inserted or not. The second network status includes successful network connection and failed network connection.

3. The processing method for networking based on dual virtual and physical SIM cards according to claim 1, characterized in that, The method of prioritizing virtual cards and using physical cards as backups during device operation specifically includes: When the first mobile communication device powers on, it checks whether a virtual telecom card configuration has been loaded on the first telecom card virtual machine, generating a corresponding third confirmation result. If the third confirmation result indicates that the configuration has been loaded, the device runs the loaded virtual telecom card configuration through the first telecom card virtual machine to perform a network connection operation, generating a corresponding third network status. If the third network status indicates a successful network connection, the device sets the current card type to virtual card. If the third network status indicates a failed network connection, the device checks whether a physical telecom card is inserted in the first hardware card slot. If a physical telecom card is inserted, the device calls the inserted physical telecom card through the first hardware card slot to perform a network connection operation, and sets the current card type to physical card upon successful network connection. If the third confirmation result indicates that the configuration has not been loaded, the device checks whether a physical telecom card is inserted in the first hardware card slot. If a physical telecom card is inserted, the device calls the inserted physical telecom card through the first hardware card slot to perform a network connection operation, and sets the current card type to physical card upon successful network connection. The third confirmation result includes both loaded and unloaded; the third network status includes successful and failed network connection; and the current card type includes physical card and virtual card. After the first mobile communication device successfully connects to the network, it periodically identifies whether the current card type is a physical card at a preset second time frequency. If the current card type is a physical card, it confirms whether a virtual telecom card configuration has been loaded on the first telecom card virtual machine to generate a corresponding fourth confirmation result. When the fourth confirmation result is that the configuration has been loaded, it runs the loaded virtual telecom card configuration through the first telecom card virtual machine to perform network operation and generate a corresponding fourth network result. When the fourth network result is that the network connection is successful, it updates the current card type to a virtual card. When the fourth network result is that the network connection fails, it continues to call the physical telecom card inserted in the first hardware card slot to perform network operation. The fourth confirmation result includes loaded and unloaded. The fourth network status includes successful network connection and failed network connection.

4. The processing method for networking based on dual virtual and physical SIM cards according to claim 1, characterized in that, The method further includes: When the first mobile communication device experiences multiple consecutive network connection failures during device operation, it counts the number of consecutive failures in this round; and when the count value exceeds a preset maximum failure count threshold, it stops the network connection operation, restores the previous network connection card type to its initial value according to the device mode and the priority card type, and performs network anomaly alarm processing based on a preset alarm method.

5. An electronic device, characterized in that, include: Memory, processor, and transceiver; The processor is configured to be coupled to the memory, read and execute instructions in the memory to implement the method according to any one of claims 1-4; The transceiver is coupled to the processor, and the processor controls the transceiver to send and receive messages.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a computer, cause the computer to perform the method described in any one of claims 1-4.

Citation Information

Patent Citations

  • Communication method for virtual SIM card, electronic equipment and device

    CN108200569A

  • SIM card selection method, device, electronic device and storage medium

    CN109495875A