Dynamic IMEI switching method and device, electronic equipment and readable medium

By detecting the SIM card activation status and IMEI matching rules, a temporary IMEI is generated to maintain network connection, solving the network identification problem when eSIM and PSIM coexist, achieving efficient dynamic IMEI switching and seamless authentication, and adapting to different operator scenarios.

CN120640271APending Publication Date: 2025-09-12CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510961957.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-11
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In mobile devices, when eSIM and PSIM coexist, the network side cannot accurately identify the device identity, resulting in authentication failure, service restrictions and statistical errors. Existing solutions cannot adapt to the needs of different operator scenarios and are complex to configure.

Method used

By detecting the activation status of the SIM card, selecting the target SIM card based on the IMEI matching rules, generating a temporary IMEI to maintain connection with the network side, and activating the target IMEI after successful authentication, dynamic IMEI switching is achieved, simplifying configuration and improving automation.

Benefits of technology

It achieves seamless authentication on mobile devices, avoids authentication failures and service restrictions, adapts to different operator scenarios, and improves communication efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120640271A_ABST
    Figure CN120640271A_ABST
Patent Text Reader

Abstract

The invention provides a dynamic IMEI switching method and device, electronic equipment and a readable medium, and belongs to the technical field of communication. The method is applied to a mobile device comprising at least two SIM cards, each SIM card corresponds to an IMEI, the activation state of each SIM card is detected, when it is determined that SIM card switching occurs based on an IMEI matching rule and the activation state, a target IMEI corresponding to a target SIM card is selected from the IMEIs corresponding to the SIM cards, and a temporary IMEI is generated to maintain connection with a network side in the switching process; and if the legality verification of SIM card switching based on the target IMEI is passed, hardware synchronization and network side authentication are performed on the target IMEI, and when the authentication is successful, the temporary IMEI is terminated and the target IMEI is enabled to maintain connection with the network side. According to the scheme, the dynamic switching of the IMEI is realized based on the activated state of the SIM card and the IMEI matching rule, the configuration is simple, and the automation degree is high; network side seamless authentication is achieved through the IMEI corresponding to the SIM card and the temporary IMEI, and the problems of authentication failure, service limitation, statistical errors and the like caused by network side identity information identification errors are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of communication technology, and particularly relates to a dynamic IMEI switching method, a dynamic IMEI switching device, an electronic device, and a computer-readable medium. Background Art

[0002] Mobile devices can flexibly meet complex communication needs in different scenarios by coexisting eSIM (Embedded-SIM) and PSIM (Physical SIM). However, this also creates IMEI (International Mobile Equipment Identity) management issues.

[0003] The traditional method of managing dual physical SIM cards is to manage them by binding the card slots to the IMEI. The two physical SIM card slots are assigned a bound IMEI for network identification. However, eSIMs lack physical card slots, and their activation status is remotely configured. This results in the network being unable to accurately identify the device during the switching process, leading to authentication failures, service restrictions, and statistical errors.

[0004] At present, a single IMEI fixed binding solution can be used to avoid network-side recognition failure, but it cannot adapt to the different scenario requirements of the operators to which eSIM and PSIM belong; a manually configured dual IMEI static allocation solution can also be used, but the configuration process is complicated and cannot achieve automatic recognition on the network side, affecting communication efficiency. Summary of the Invention

[0005] The purpose of the embodiments of the present disclosure is to provide a dynamic IMEI switching method, a dynamic IMEI switching device, an electronic device and a computer-readable medium, which can realize dynamic IMEI switching based on the activation status of the SIM cards and the IMEI matching rules on a mobile device including at least two SIM cards. The configuration is simple and the degree of automation is high, thereby improving communication efficiency. Seamless authentication is achieved during the switching process through the IMEI corresponding to each SIM card and the temporary IMEI, effectively avoiding a series of problems such as authentication failure, service restrictions, and statistical errors caused by the network side's inability to accurately identify the device identity, and can also adapt to communication scenarios where different SIM cards belong to different operators.

[0006] In order to solve the above technical problems, the present disclosure is implemented as follows:

[0007] In a first aspect, the present disclosure provides a dynamic IMEI switching method, which is applied to a mobile device including at least two user identity module SIM cards, each SIM card having a corresponding international mobile equipment identity code IMEI, and the method may include: detecting the activation status of each SIM card; determining that a SIM card switching occurs based on an IMEI matching rule and the activation status, selecting a target IMEI corresponding to a target SIM card from the IMEIs corresponding to each SIM card; performing a legitimacy check on the SIM card switching based on the target IMEI; if the legitimacy check passes, generating a temporary IMEI, and maintaining a connection with the network side with the temporary IMEI during the SIM card switching process; performing hardware synchronization and network side authentication on the target IMEI; if the network side authentication is successful, terminating the temporary IMEI and enabling the target IMEI to maintain a connection with the network side.

[0008] Optionally, the SIM card includes a first SIM card and a second SIM card, and the IMEI matching rule includes any one of the following: when the first SIM card is in an activated state and the second SIM card is in any activation state, the first SIM card is the target SIM card; when the second SIM card is in an activated state and the first SIM card is in any activation state, the second SIM card is the target SIM card.

[0009] Optionally, the SIM card includes a first SIM card and a second SIM card, and the IMEI matching rule includes: when the first SIM card is in an activated state and the second SIM card is in an inactivated state, the first SIM card is the target SIM card; when the second SIM card is in an activated state and the first SIM card is in an inactivated state, the second SIM card is the target SIM card.

[0010] Optionally, the IMEI matching rule further includes: the first SIM card is in an activated state, the second SIM card is in an activated state, and the SIM card with a relatively higher RSRP is used as the target SIM card.

[0011] Optionally, a temporary IMEI is generated and the temporary IMEI is used to maintain connection with the network side during the SIM card switching process, including: generating a temporary IMEI based on the MAC address and timestamp of the mobile device; writing the temporary IMEI into a temporary IMEI register; and sending the temporary IMEI to the network side to declare to the network side that the mobile device maintains connection during the SIM card switching process.

[0012] Optionally, performing a legitimacy check on the SIM card switch based on the target IMEI includes: obtaining the operator network where the target IMEI is registered; and performing a legitimacy check on the target IMEI for the SIM card switch based on an IMEI whitelist of the operator network.

[0013] Optionally, the target IMEI is synchronized with the hardware and authenticated on the network side, including: performing hardware format verification on the target IMEI; if the hardware format verification passes, writing the target IMEI into the main IMEI register of the baseband chip; encrypting and encapsulating the target IMEI and sending it to the network side to obtain the authentication result of the network side for the IMEI.

[0014] In a second aspect, the present disclosure provides a dynamic IMEI switching device, which is applied to a mobile device including at least two SIM cards. The device may include: an IMEI storage module for storing the IMEI corresponding to each SIM card; a status detection module for detecting the activation status of each SIM card; a switching control module for determining, based on the IMEI matching rules and the activation status, that a SIM card switching occurs, and selecting a target IMEI corresponding to a target SIM card from the IMEIs corresponding to each SIM card; the switching control module is also used to perform a legitimacy check on the SIM card switching based on the target IMEI; the switching control module is also used to generate a temporary IMEI if the legitimacy check passes, and maintain a connection with the network side with the temporary IMEI during the SIM card switching process; a communication interface adaptation module is used to perform hardware synchronization and network side authentication on the target IMEI; the communication interface adaptation module is also used to terminate the temporary IMEI and enable the target IMEI to maintain a connection with the network side if the network side authentication is successful.

[0015] Optionally, the SIM card includes a first SIM card and a second SIM card, and the IMEI matching rule includes any one of the following: when the first SIM card is in an activated state and the second SIM card is in any activation state, the first SIM card is the target SIM card; when the second SIM card is in an activated state and the first SIM card is in any activation state, the second SIM card is the target SIM card.

[0016] Optionally, the SIM card includes a first SIM card and a second SIM card, and the IMEI matching rule includes: when the first SIM card is in an activated state and the second SIM card is in an inactivated state, the first SIM card is the target SIM card; when the second SIM card is in an activated state and the first SIM card is in an inactivated state, the second SIM card is the target SIM card.

[0017] Optionally, the IMEI matching rule further includes: the first SIM card is in an activated state, the second SIM card is in an activated state, and the SIM card with a relatively higher RSRP is used as the target SIM card.

[0018] Optionally, the switching control module is specifically used to generate a temporary IMEI based on the MAC address and timestamp of the mobile device; write the temporary IMEI into the temporary IMEI register; and send the temporary IMEI to the network side to declare to the network side that the mobile device maintains connection during the SIM card switching process.

[0019] Optionally, the switching control module is specifically configured to obtain the operator network where the target IMEI is registered; and perform a legitimacy check on the target IMEI for SIM card switching based on the IMEI whitelist of the operator network.

[0020] Optionally, the communication interface adapter module is specifically used to perform hardware format verification on the target IMEI; if the hardware format verification passes, the target IMEI is written into the main IMEI register of the baseband chip; the target IMEI is encrypted and encapsulated and sent to the network side to obtain the authentication result of the network side for the IMEI.

[0021] In a third aspect, the present disclosure provides an electronic device comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the dynamic IMEI switching method of the first aspect.

[0022] In a fourth aspect, the present disclosure provides a computer-readable medium storing a program or instruction, which, when executed by a processor, implements the steps of the dynamic IMEI switching method of the first aspect.

[0023] In a fifth aspect, the present disclosure provides a chip comprising a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps of the dynamic IMEI switching method of the first aspect.

[0024] In a sixth aspect, the present disclosure provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute steps for implementing the dynamic IMEI switching method of the first aspect.

[0025] The dynamic IMEI switching method, dynamic IMEI switching device, electronic device, and computer-readable medium provided in the present disclosure can be applied to a mobile device including at least two SIM cards, each SIM card having a corresponding IMEI. This solution can detect the activation status of each SIM card and, based on IMEI matching rules and activation status, select a target IMEI corresponding to a target SIM card from the IMEIs corresponding to each SIM card when a SIM card switch occurs. A temporary IMEI is generated to maintain a connection with the network during the SIM card switch process. Based on this, if the legitimacy verification of the SIM card switch is passed based on the target IMEI, the target IMEI is synchronized with the hardware and authenticated on the network side. If the network side authentication is successful, the temporary IMEI is terminated and the target IMEI is enabled to maintain a connection with the network side, thereby switching to the target SIM card. This solution can realize dynamic switching of IMEI based on the activation status of SIM cards and IMEI matching rules on a mobile device including at least two SIM cards. It has simple configuration and high degree of automation, thus improving communication efficiency. It realizes seamless authentication on the network side during the switching process through the IMEI corresponding to each SIM card and the temporary IMEI, effectively avoiding a series of problems such as authentication failure, service restrictions, and statistical errors caused by the network side's inability to accurately identify the device identity. It can also adapt to communication scenarios where different SIM cards belong to different operators. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 One of the flow charts of the steps of the dynamic IMEI switching method provided in an embodiment of the present disclosure;

[0027] Figure 2 A structural block diagram of a dynamic IMEI switching device provided in an embodiment of the present disclosure;

[0028] Figure 3 A schematic diagram of the implementation process of the dynamic IMEI switching process provided in an embodiment of the present disclosure;

[0029] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present disclosure;

[0030] Figure 5 A hardware schematic diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0031] The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0032] The terms "first", "second", etc. in the specification and claims of the present disclosure are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present disclosure can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects related to each other are in an "or" relationship.

[0033] Figure 1 This is one of the flow charts of the steps of the dynamic IMEI switching method provided in an embodiment of the present disclosure. The method may include a mobile device with at least two SIM cards, each SIM card having a corresponding IMEI.

[0034] A SIM (Subscriber Identity Module) card can be used to store user identity information of a mobile device and provide device identification to network operators. SIM cards can be of various types, such as PSIM cards, eSIM cards, and virtual SIM cards. In the disclosed embodiments, a mobile device includes at least two SIM cards, which can be of the same type or different types.

[0035] IMEI, or International Mobile Equipment Identity, is a digital sequence used to uniquely identify a device. The SIM card and IMEI can be associated with each other. When the SIM card is connected to the network, the network identifies the device itself based on the IMEI. In the disclosed embodiment, each SIM card can have a corresponding IMEI. When switching SIM cards, the corresponding IMEI is provided to the network for identity authentication, making the operator association relationship between the SIM card and the network more flexible. Different SIM cards can belong to the same operator or different operators. The information of the SIM card associated operator can also be stored to facilitate query, call and matching verification during the switching process.

[0036] like Figure 1 As shown, the method may include the following steps 101 to 106.

[0037] Step 101: Detect the activation status of each SIM card.

[0038] In embodiments of the present disclosure, the activation status of each SIM card in a mobile device comprising at least two SIM cards can be detected. This detection can be performed continuously in real time, periodically, or triggered when the SIM card status changes. Depending on the type of SIM card, the detection method may vary. For example, the SIM card interface may detect whether a PSIM card has been inserted or removed from the card slot to determine the activation status of the PSIM card. A PSIM card may be considered activated when inserted and inactivated when removed. Alternatively, the PSIM card may be detected as available when inserted into the card slot. If available, it may be activated, and if unavailable, it may be inactivated. Unavailable may include situations such as a PSIM card being in arrears, having no service, or having no signal. The activation status of the eSIM card may be determined by reading an eSIM activation flag through the eUICC (Embedded Universal Integrated Circuit Card) interface. The above detection methods are for example purposes only. Those skilled in the art may select the same or different detection methods to detect the activation status of the SIM card based on actual hardware and software detection conditions.

[0039] Step 102: When it is determined based on the IMEI matching rule and the activation status that a SIM card switch occurs, a target IMEI corresponding to the target SIM card is selected from the IMEIs corresponding to the respective SIM cards.

[0040] In the disclosed embodiment, the IMEI matching rule may be a selection rule for a SIM card and its corresponding IMEI. The IMEI matching rule may be pre-set based on the service type, communication environment, user needs, etc., or may be dynamically adjusted during the communication process based on feedback from the user side and the network side. Based on the IMEI matching rule and the activation status of each SIM card, the selected target SIM card may be determined. When the target SIM card changes, it may be considered that a SIM card switch has occurred, and then the target IMEI corresponding to the target SIM card may be selected from the IMEIs corresponding to each SIM card. For example, the target SIM card selected this time based on the IMEI matching rule and the activation status of each SIM card is SIM card A, and the target SIM card selected the previous time based on the IMEI matching rule and the activation status of each SIM card is SIM card B. Thus, the selection of the target SIM card has changed, and it is determined that a SIM card switch has occurred.

[0041] Step 103: Perform a validity check on the SIM card switch based on the target IMEI.

[0042] In the disclosed embodiment, the legitimacy check refers to checking the legitimacy of the target IMEI accessing the network side. When a mobile device is registered with the network side, the mobile device is allowed to access the network side for services such as calls, text messages, and Internet access. A list of authorized devices is maintained on the network side. By querying the target IMEI to identify whether the mobile device is in the authorized device list, the legitimacy of switching to the target SIM card based on the target IMEI can be checked. When the legitimacy check passes, the subsequent switching process can be carried out; when the legitimacy check fails, the mobile device will be denied access to the network side, and thus will not be able to use the corresponding communication services. At this point, other SIM cards of the mobile device can be used as the target SIM card, and the selection and legitimacy check of the target IMEI in the switching process can be repeated.

[0043] Step 104: If the legitimacy check passes, a temporary IMEI is generated, and the temporary IMEI is used to maintain connection with the network side during the SIM card switching process.

[0044] In an embodiment of the present disclosure, during the SIM card switching process, after the legitimacy check passes and the subsequent switching process begins, a temporary IMEI can be generated to maintain a connection with the network side to avoid communication interruption caused by link release triggered by identity information anomalies on the network side. The temporary IMEI can serve as a temporary identity identifier for the mobile device. The network side can store a mapping relationship between the temporary IMEI and the actual IMEI of the mobile device, so that the network side can identify the mobile device through the temporary IMEI, keep the context from being released, and maintain the continuity of the connection during the SIM card switching process.

[0045] Step 105: Perform hardware synchronization and network-side authentication on the target IMEI.

[0046] In the embodiment of the present disclosure, after the legitimacy check is passed and the subsequent switching process is entered, the target IMEI can be synchronized with the hardware and authenticated to the network side. Hardware synchronization can be to write the target IMEI into the local hardware of the mobile device to support communication services based on the target SIM card, such as baseband chips and radio frequency modules. Network side authentication can be to verify the binding relationship between the target IMEI and the IMSI (International Mobile Subscriber Identification Number) of the target SIM card on the network side. If the verification is passed, the network side authentication is successful and the subsequent switching process can be carried out; if the verification fails, the network side authentication fails. At this time, other SIM cards of the mobile device can be used as the target SIM card, and the selection and legitimacy verification of the target IMEI in the switching process can be carried out again.

[0047] Step 106: If the network side authentication is successful, terminate the temporary IMEI and enable the target IMEI to maintain connection with the network side.

[0048] In the disclosed embodiment, if the network authentication is successful, the temporary IMEI can be terminated and the target IMEI can be officially activated to maintain a connection with the network. The target SIM card can support communication services with the network, completing the dynamic switching process. In actual applications, the temporary IMEI life cycle is relatively short, typically no more than 10 seconds, and the connection with the network is temporarily maintained during the IMEI switching process.

[0049] In an optional embodiment of the present disclosure, the SIM card includes a first SIM card and a second SIM card, and the IMEI matching rule includes the following A1 or A2:

[0050] A1. When the first SIM card is in an activated state and the second SIM card is in any activated state, the first SIM card is the target SIM card.

[0051] A2. When the second SIM card is in an activated state and the first SIM card is in any activated state, the second SIM card is the target SIM card.

[0052] In the embodiments of the present disclosure, the SIM cards of the mobile device may include a first SIM card and a second SIM card. The first SIM card and the second SIM card may be different types of SIM cards. For example, the first SIM card may be a PSIM card and the second SIM card may be an eSIM card; alternatively, the first SIM card may be an eSIM card and the second SIM card may be a PSIM card. Those skilled in the art may also select other types of SIM cards based on actual needs, and the embodiments of the present disclosure do not impose specific limitations on this.

[0053] In the disclosed embodiment, when the SIM cards include a first SIM card and a second SIM card, the IMEI matching rule may prioritize the first SIM card. When the first SIM card is activated, the second SIM card may be activated or inactivated, with the first SIM card being the target SIM card. Based on this, if the target SIM card changes, the IMEI corresponding to the first SIM card may be used as the target IMEI for subsequent switching processes. When prioritizing the first SIM card, if the first SIM card is inactivated, the second SIM card's activation status may be used to determine whether to use it as the target SIM card.

[0054] Similarly, the IMEI matching rule can prioritize the second SIM card. When the second SIM card is activated, the first SIM card may be activated or inactivated, with the second SIM card being the target SIM card. Based on this, if the target SIM card changes, the IMEI corresponding to the second SIM card can be used as the target IMEI for subsequent switching processes. When prioritizing the second SIM card, if the second SIM card is inactivated, the first SIM card's activation status can be used to determine whether to use the first SIM card as the target SIM card.

[0055] In an optional embodiment of the present disclosure, the SIM card includes a first SIM card and a second SIM card, and the IMEI matching rule includes B1 or B2:

[0056] B1. When the first SIM card is in an activated state and the second SIM card is in an unactivated state, the first SIM card is a target SIM card.

[0057] B2. When the second SIM card is in an activated state and the first SIM card is in an unactivated state, the second SIM card is the target SIM card.

[0058] In the embodiment of the present disclosure, the SIM card of the mobile device may include a first SIM card and a second SIM card. For details, please refer to the relevant description of A1 or A2 above. To avoid repetition, they will not be repeated here.

[0059] In the disclosed embodiment, when the SIM cards include a first SIM card and a second SIM card, the IMEI matching rule may prioritize the activation status of the SIM cards. For example, if the first SIM card is activated and the second SIM card is inactivated, the first SIM card is used as the target SIM card; if the second SIM card is activated and the first SIM card is inactivated, the second SIM card is used as the target SIM card. If the target SIM card changes during the target SIM card selection process, the IMEI corresponding to the target SIM card may be used as the target IMEI for subsequent switching procedures.

[0060] In an optional method embodiment of the present disclosure, based on the above B1 and B2, the IMEI matching rule further includes B3:

[0061] B3. The first SIM card is in an activated state, the second SIM card is in an activated state, and the SIM card with a relatively higher RSRP is used as the target SIM card.

[0062] In the embodiment of the present disclosure, when the first SIM card is in an activated state and the second SIM card is also in an activated state, the target SIM card can be selected by comparing other parameters. For example, a SIM card with a relatively higher RSRP (Reference Signal Received Power) can be used as the target SIM card. RSRP is used to measure the reference signal strength received by a mobile device in a communication network and can indicate the quality of communication network coverage. At this time, a SIM card with a relatively higher RSRP can better support communication services and can therefore be selected as the target SIM card. On this basis, those skilled in the art can select other parameters representing communication quality according to actual needs to select the target SIM card.

[0063] In an optional method embodiment of the present disclosure, the aforementioned step 103 includes the following steps C1 to C2.

[0064] Step C1: Obtain the operator network where the target IMEI is registered.

[0065] In the embodiment of the present disclosure, the operator network registered by the SIM card can be obtained through RRC (Radio Resource Control) signaling analysis of the baseband chip, or through other methods, such as pre-storing the correspondence between IMEI and operator network, and obtaining the registered operator network based on selecting the target IMEI. The embodiment of the present disclosure does not impose specific restrictions on this.

[0066] The operator network can be a PLMN (Public Land Mobile Network) belonging to different operators. The operator network registered by the operator PLMN code can be used to identify the operator network. For example, the operator PLMN code is 46003 or 46011, which means that the operator network corresponding to the IMEI is operator A.

[0067] Step C2: Based on the IMEI whitelist of the operator network, the legitimacy of the SIM card switch is verified on the target IMEI.

[0068] In the embodiment of the present disclosure, the authorized device list of the operator network can be represented as an IMEI whitelist, and the identity of the mobile device is identified based on the IMIE to determine whether it is an authorized device in the IMEI whitelist.

[0069] Among them, different SIM cards can correspond to the same operator network or different operator networks. When each SIM card corresponds to the same operator network, the legitimacy verification is based on the same IMEI whitelist; when each SIM card corresponds to a different operator, the legitimacy verification is based on the IMEI whitelist corresponding to each operator. When the legitimacy of the target IMEI is verified, the IMEI whitelist maintained by the corresponding operator can be obtained through the cloud API (Application Programming Interface) of the corresponding operator. When the target IMEI is in the IMEI whitelist, it means that the mobile device is identified as an authorized device, the legitimacy verification passes, and the subsequent switching process is carried out; when the target IMEI is not in the IMEI whitelist, it can be considered that the target IMEI is not bound to the corresponding operator, indicating that the mobile device is identified as an unauthorized device and is denied access, and thus cannot use the corresponding communication service.

[0070] In an optional method embodiment of the present disclosure, in the aforementioned step 104, a temporary IMEI is generated, and the temporary IMEI is used to maintain connection with the network side during the SIM card switching process, including the following steps D1 to D3.

[0071] Step D1: Generate a temporary IMEI based on the MAC address and timestamp of the mobile device.

[0072] In the embodiment of the present disclosure, a temporary IMEI can be used to prevent the connection between the mobile device and the network side from being interrupted. The temporary IMEI can be generated based on the MAC address and timestamp of the mobile device. Among them, the MAC address is the unique network identifier of the mobile device in the network, and the timestamp can be the time when the SIM card switch occurs. The MAC address and timestamp can be converted into an IMEI format code by calculation as a temporary IMEI. For example, the MAC address of the mobile device is 00:1A:2B:3C:4D:5E, and the timestamp is 1686403200. On this basis, the temporary IMEI is calculated using temp_imei=SHA-256(MAC+timestamp).substring(0,15) to obtain 253996326911714.

[0073] Step D2: Write the temporary IMEI into the temporary IMEI register.

[0074] In the embodiment of the present disclosure, a temporary IMEI is used to maintain a communication connection, and the temporary IMEI can be written into a temporary IMEI register of a baseband chip of a mobile device for hardware synchronization.

[0075] Step D3: Send the temporary IMEI to the network side to inform the network side that the mobile device maintains connection during the SIM card switching process.

[0076] In the embodiment of the present disclosure, a temporary IMEI is used to maintain the communication connection, and the temporary IMEI is also sent to the network side through a signaling channel, so that the network side maintains the identity recognition of the mobile device based on the temporary IMEI during the IMEI switching process, avoiding triggering link release.

[0077] In an optional method embodiment of the present disclosure, the aforementioned step 105 includes the following steps E1 to E3.

[0078] Step E1: Perform hardware format verification on the target IMEI.

[0079] In the embodiment of the present disclosure, when the target IMEI is synchronized with the hardware, hardware format verification can be used to determine whether the target IMEI meets the hardware writing requirements, whether the target IMEI code contains TAC (type allocation code), SNR (serial number), CD (check digit), etc., and whether it meets the meaning expressed by the format requirements.

[0080] Step E2: If the hardware format verification passes, the target IMEI is written into the main IMEI register of the baseband chip.

[0081] In the embodiment of the present disclosure, if the hardware format check passes, the target IMEI can be synchronized with the hardware and written into the main IMEI register of the baseband chip to support subsequent network communication based on the target IMEI.

[0082] Step E3: Encrypt and encapsulate the target IMEI and send it to the network side to obtain the authentication result of the network side for the IMEI.

[0083] In the disclosed embodiment, the target IMEI can also be synchronized with the network. The target IMEI can be encrypted and encapsulated in an RRC connection reconfiguration message and then sent to the network. The network-side base station will then send the RRC reconfiguration message carrying the encrypted target IMEI to the operator's core network. The operator's core network then analyzes and decrypts the RRC reconfiguration message, verifies the IMSI binding relationship between the target IMEI and the target SIM card, and returns a response message carrying the authentication result.

[0084] In the embodiment of the present disclosure, when encrypting and encapsulating the IMEI, an encryption method can be selected based on specific security requirements, computing conditions, etc. For example, the AES (Advanced Encryption Standard) algorithm can be used to encrypt the IMEI, or other encryption methods can be used. The network side returns a successful authentication result if the binding relationship verification is passed, and can also return a failed authentication result if the binding relationship verification fails. Thus, the mobile device can obtain the authentication result returned by the network side and perform subsequent switching processes based on the authentication result. Among them, the encrypted and encapsulated target IMEI can be sent to the base station in the RRC connection reconfiguration message, or it can be sent in other ways. The embodiment of the present disclosure does not impose specific restrictions on this.

[0085] The dynamic IMEI switching method provided by the present disclosure can be applied to a mobile device comprising at least two SIM cards, each with a corresponding IMEI. This solution detects the activation status of each SIM card and, based on IMEI matching rules and activation status, selects a target IMEI corresponding to the target SIM card from the IMEIs corresponding to each SIM card when a SIM card switch occurs. A temporary IMEI is generated to maintain a connection with the network during the SIM card switch. Furthermore, if the legitimacy of the SIM card switch is verified based on the target IMEI, the target IMEI is synchronized with the hardware and authenticated with the network. If network authentication succeeds, the temporary IMEI is terminated and the target IMEI is activated to maintain a connection with the network, thereby switching to the target SIM card. This solution enables dynamic IMEI switching based on the activation status of the SIM cards and IMEI matching rules on a mobile device comprising at least two SIM cards. It features simple configuration and a high degree of automation, resulting in high communication efficiency. The IMEI corresponding to each SIM card and the temporary IMEI enable seamless network authentication during the switch process, effectively avoiding issues such as authentication failures, service restrictions, and statistical errors caused by the network's inability to accurately identify the device. It also adapts to communication scenarios where different SIM cards belong to different operators.

[0086] Figure 2The present invention provides a structural block diagram of a dynamic IMEI switching device 200 provided in an embodiment of the present disclosure. The device can be applied to a mobile device including at least two SIM cards. The device may include: an IMEI storage module 201 for storing the IMEI corresponding to each SIM card; a status detection module 202 for detecting the activation status of each SIM card; a switching control module 203 for selecting a target IMEI corresponding to a target SIM card from the IMEIs corresponding to each SIM card when determining that a SIM card switch has occurred based on an IMEI matching rule and the activation status; the switching control module 203 is further configured to perform a legitimacy check on the SIM card switch based on the target IMEI; the switching control module 203 is further configured to generate a temporary IMEI if the legitimacy check passes, and to maintain a connection with the network using the temporary IMEI during the SIM card switch process; a communication interface adaptation module 204 for performing hardware synchronization and network-side authentication on the target IMEI; and the communication interface adaptation module 204 is further configured to terminate the temporary IMEI and activate the target IMEI to maintain a connection with the network if the network-side authentication succeeds.

[0087] For example, taking a mobile device including eSIM and PSIM as an example, the aforementioned Figure 1 Or the dynamic IMEI seamless authentication and switching process shown in 2.

[0088] Among them, the IMEI storage module 201 may include a memory, such as EEPROM (Electrically Erasable Programmable read only memory), and an encryption engine based on AES-256 to securely store the IMEI mapping table. The IMEI mapping table can store the IMEI_eSIM corresponding to the eSIM and its associated operator information, as well as the IMEI_PSIM corresponding to the PSIM and its associated operator information. The IMEI storage module can obtain the aforementioned IMEI_eSIM and IMEI_PSIM from the operator or device manufacturer during initialization, specifically from the information pre-written in the mobile device factory, or through remote OTA (Over-the-Air) update.

[0089] Status detection module 202 may include an eSIM status detector, a PSIM status detector, and a network registration analyzer, depending on the SIM card type. The eSIM status detector can determine the eSIM activation status by reading the eSIM activation flag via the eUICC interface, such as "ENABLED" for activated or "DISABLED" for inactivated. The PSIM status detector can determine the PSIM activation status by detecting the insertion or removal of the card slot via the SIM card interface. The network registration analyzer can parse the RRC signaling from the baseband chip to obtain the carrier network to which the IMEI is registered.

[0090] The handover control module 203 may include a policy decision unit, a temporary IMEI generator, and a handover verifier. The policy decision unit may select a target IMEI based on the activation status of the SIM card and IMEI matching rules; the temporary IMEI generator may generate a temporary IMEI based on a preset algorithm to maintain connection with the network during the IMEI handover process; and the handover verifier may call the operator network's API to verify the legitimacy of the target IMEI.

[0091] The communication interface adaptation module 204 may include a baseband configuration unit, a signaling encapsulation unit, and a synchronization feedback device. The baseband configuration unit may modify the master IMEI register of the baseband chip through AT commands to synchronize the target IMEI hardware; the signaling encapsulation unit may embed the target IMEI into communication signaling such as RRC messages and NAS messages to synchronize the target IMEI to the base station and core network on the network side; and the synchronization feedback device may receive the authentication result from the network side to determine the switching of the target IMEI.

[0092] In an optional embodiment of the present disclosure, the SIM card includes a first SIM card and a second SIM card, and the IMEI matching rule includes any one of the following: when the first SIM card is in an activated state and the second SIM card is in any activation state, the first SIM card is the target SIM card; when the second SIM card is in an activated state and the first SIM card is in any activation state, the second SIM card is the target SIM card.

[0093] In an optional embodiment of the present disclosure, the SIM card includes a first SIM card and a second SIM card, and the IMEI matching rule includes: when the first SIM card is in an activated state and the second SIM card is in an inactivated state, the first SIM card is the target SIM card; when the second SIM card is in an activated state and the first SIM card is in an inactivated state, the second SIM card is the target SIM card.

[0094] In an optional embodiment of the present disclosure, the IMEI matching rule further includes: the first SIM card is in an activated state, the second SIM card is in an activated state, and the SIM card with a relatively higher RSRP is selected as the target SIM card.

[0095] In an optional embodiment of the present disclosure, the switching control module 203 is specifically used to generate a temporary IMEI based on the MAC address and timestamp of the mobile device; write the temporary IMEI into the temporary IMEI register; and send the temporary IMEI to the network side to declare to the network side that the mobile device maintains connection during the SIM card switching process.

[0096] In an optional embodiment of the present disclosure, the switching control module 203 is specifically configured to obtain the operator network where the target IMEI is registered; and perform a legitimacy check on the target IMEI for SIM card switching based on the IMEI whitelist of the operator network.

[0097] In an optional embodiment of the present disclosure, the communication interface adapter module 204 is specifically used to perform hardware format verification on the target IMEI; if the hardware format verification passes, the target IMEI is written into the main IMEI register of the baseband chip; the target IMEI is encrypted and encapsulated and sent to the network side to obtain the authentication result of the network side for the IMEI.

[0098] Figure 3 This is a schematic diagram of the implementation process of the dynamic IMEI switching process provided in the embodiment of the present disclosure. Figure 3 As shown, in the scenario where the user switches the primary card from PSIM to eSIM, the dynamic IMEI switching process is triggered as shown in steps 301 to 309 below:

[0099] Step 301: In response to the user switching the primary card of the mobile device from the PSIM to the eSIM through the settings interface, the eSIM status detector in the status detection module is triggered to send a "GET_STATUS" command through the eUICC interface, and obtain the activation status of the eSIM as "ENABLED", and the PSIM status detector detects that the PSIM is inserted into the card slot, but the primary card flag is set to "DISABLED".

[0100] Step 302: The network registration analyzer of the status detection module obtains the operator PLMN code 46000 registered by the eSIM through the baseband chip.

[0101] Step 303: The policy decision unit of the handover control module selects the IMEI_eSIM corresponding to the eSIM according to the primary card type and activation status.

[0102] In step 304, the handover verifier of the handover control module verifies the validity of the IMEI_eSIM based on the IMEI whitelist corresponding to operator network 46000. If the validity check passes, the process proceeds to step 305. If the validity check fails, the process proceeds to step 304a to maintain the IMEI_PSIM of the original PSIM.

[0103] Step 305: The temporary IMEI generator of the handover control module uses the SHA-256 algorithm to perform hash calculation on the MAC address and timestamp of the mobile device to obtain a temporary IMEI.

[0104] Step 306: The baseband configuration unit of the communication interface adaptation module writes the temporary IMEI into the temporary register of the baseband chip to maintain the connection with the network side.

[0105] Step 307: The baseband configuration unit of the communication interface adapter module performs hardware format verification on the IMEI_eSIM to ensure that the IMEI_eSIM meets the writing requirements of the baseband chip's main IMEI register, and then writes the IMEI_eSIM into the baseband chip's main IMEI register through an AT command.

[0106] Step 308: The signaling encapsulation unit of the communication interface adaptation module encrypts the IMEI_eSIM in the RRC connection reconfiguration message using the AES encryption algorithm, encapsulates the encrypted data, and sends the encrypted data to the base station.

[0107] Step 309: The synchronous feedback device of the communication interface adapter module obtains the authentication result returned by the network after decrypting the RRC connection reconfiguration message and verifying the IMSI binding relationship between the IMEI_eSIM and the eSIM. If the authentication result is successful, the temporary IMEI is terminated and the IMEI_eSIM is enabled to maintain the connection with the network.

[0108] The dynamic IMEI switching device provided by the present disclosure can be applied to a mobile device comprising at least two SIM cards, each with a corresponding IMEI. This solution detects the activation status of each SIM card and, based on IMEI matching rules and activation status, selects a target IMEI corresponding to the target SIM card from the IMEIs corresponding to each SIM card when a SIM card switch occurs. A temporary IMEI is generated to maintain a connection with the network during the SIM card switch. Furthermore, if the legitimacy verification for the SIM card switch is passed based on the target IMEI, the target IMEI is hardware synchronized and authenticated with the network. If network authentication is successful, the temporary IMEI is terminated and the target IMEI is activated to maintain a connection with the network, thereby switching to the target SIM card. This solution enables dynamic IMEI switching based on the activation status of the SIM cards and IMEI matching rules on a mobile device comprising at least two SIM cards. It features simple configuration and a high degree of automation, resulting in high communication efficiency. The IMEI corresponding to each SIM card and the temporary IMEI enable seamless network authentication during the switch process, effectively avoiding issues such as authentication failures, service restrictions, and statistical errors caused by the network's inability to accurately identify the device. It also adapts to communication scenarios where different SIM cards belong to different operators.

[0109] Figure 4 This is a structural diagram of an electronic device 400 provided in an embodiment of the present disclosure, such as Figure 4 As shown, the electronic device 400 may include a processor 401, a memory 402, and a program or instruction stored in the memory 402 and executable on the processor 401. When the program or instruction is executed by the processor 401, the various processes of the above-mentioned signaling intercommunication embodiment are implemented and the same technical effect can be achieved. To avoid repetition, they will not be described here.

[0110] It should be noted that Figure 4 The electronic device 400 shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0111] Figure 5 A hardware diagram of an electronic device 500 provided in an embodiment of the present disclosure is shown in FIG. Figure 5As shown, electronic device 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to the program stored in ROM (Read Only Memory) 502 or the program loaded from storage unit 508 into RAM (Random Access Memory) 503. Various programs and data required for system operation are also stored in RAM 503. CPU 501, ROM 502 and RAM 503 are connected to each other via bus 504. I / O (Input / Output) interface 505 is also connected to bus 504.

[0112] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output section 507 including devices such as a CRT (Cathode Ray Tube), an LCD (Liquid Crystal Display), and a speaker; a storage section 508 including devices such as a hard disk; and a communication section 509 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. Removable media 511, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 510 as needed, so that computer programs read from the removable media can be installed in the storage section 508 as needed.

[0113] In particular, according to an embodiment of the present disclosure, the process described below with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 509, and / or installed from a removable medium 511. When the computer program is executed by the central processing unit (CPU501), the various functions defined in the system of the present application are executed.

[0114] The embodiment of the present disclosure also sends a computer-readable medium, on which a program or instruction is stored. When the program or instruction is executed by the processor, the various processes of the above-mentioned signaling intercommunication embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0115] The processor is the processor in the electronic device in the above embodiment. The computer-readable medium includes computer-readable media such as ROM, RAM, magnetic disk or optical disk.

[0116] The embodiment of the present disclosure also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above-mentioned signaling intercommunication embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0117] It should be understood that the chip mentioned in the embodiments of the present disclosure can also be called a system-level chip, a system chip, a chip system, or a system-on-chip chip, etc.

[0118] The embodiment of the present disclosure provides a computer program product containing instructions, which, when executed on a computer, enables the computer to execute the steps of signaling intercommunication as described above and achieve the same technical effects. To avoid repetition, they will not be described here.

[0119] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present disclosure is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0120] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, electronic device, air conditioner, or network device, etc.) to execute the methods of the various embodiments of the present disclosure.

[0121] The embodiments of the present disclosure are described above in conjunction with the accompanying drawings, but the present disclosure is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present disclosure, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present disclosure and the claims, all of which are protected by the present disclosure.

Claims

1. A dynamic IMEI switching method, characterized in that: Applied to a mobile device comprising at least two Subscriber Identity Module (SIM) cards, each SIM card having a corresponding International Mobile Equipment Identity (IMEI), the method comprises: Detecting the activation status of each of the SIM cards; When determining that a SIM card switch occurs based on the IMEI matching rule and the activation state, selecting a target IMEI corresponding to a target SIM card from the IMEIs corresponding to each of the SIM cards; Performing a legitimacy check on the SIM card switch based on the target IMEI; If the legitimacy check passes, a temporary IMEI is generated, and the temporary IMEI is used to maintain a connection with the network side during the SIM card switching process; Performing hardware synchronization and network-side authentication on the target IMEI; If the network side authentication is successful, the temporary IMEI is terminated and the target IMEI is enabled to maintain connection with the network side.

2. The method according to claim 1, characterized in that The SIM card includes a first SIM card and a second SIM card, and the IMEI matching rule includes any one of the following: When the first SIM card is in an activated state and the second SIM card is in any of the activated states, the first SIM card is the target SIM card; When the second SIM card is in an activated state and the first SIM card is in any of the activated states, the second SIM card is the target SIM card.

3. The method according to claim 1, characterized in that The SIM card includes a first SIM card and a second SIM card, and the IMEI matching rule includes: When the first SIM card is in an activated state and the second SIM card is in an unactivated state, the first SIM card is the target SIM card; When the second SIM card is in an activated state and the first SIM card is in an unactivated state, the second SIM card is the target SIM card.

4. The method according to claim 3, characterized in that The IMEI matching rules also include: The first SIM card is in an activated state, the second SIM card is in an activated state, and the SIM card with a relatively higher reference signal received power RSRP is used as the target SIM card.

5. The method according to claim 1, characterized in that Generating a temporary IMEI and maintaining a connection with the network side using the temporary IMEI during the SIM card switching process includes: generating a temporary IMEI based on the media access control MAC address and a timestamp of the mobile device; Writing the temporary IMEI into a temporary IMEI register; The temporary IMEI is sent to the network side to inform the network side that the mobile device maintains the connection during the SIM card switching process.

6. The method according to claim 1, characterized in that The legitimacy verification of the SIM card switching based on the target IMEI includes: Obtain the operator network where the target IMEI is registered; Based on the IMEI whitelist of the operator network, the legitimacy of the SIM card switching is verified on the target IMEI.

7. The method according to claim 1, characterized in that The hardware synchronization and network side authentication of the target IMEI include: Performing hardware format verification on the target IMEI; If the hardware format verification passes, writing the target IMEI into the main IMEI register of the baseband chip; The target IMEI is encrypted and encapsulated and sent to the network side to obtain the authentication result of the network side for the IMEI.

8. A dynamic IMEI switching device, characterized in that: The device is applied to a mobile device including at least two SIM cards, and includes: IMEI storage module, used to store the IMEI corresponding to each SIM card; A status detection module, used to detect the activation status of each SIM card; a switching control module, configured to select a target IMEI corresponding to a target SIM card from the IMEIs corresponding to the SIM cards when determining that a SIM card switching occurs based on an IMEI matching rule and the activation state; The switching control module is further configured to perform a legitimacy check on the SIM card switching based on the target IMEI; The switching control module is further configured to generate a temporary IMEI if the legitimacy check passes, and to maintain a connection with the network side using the temporary IMEI during the SIM card switching process; A communication interface adapter module, configured to perform hardware synchronization and network-side authentication on the target IMEI; The communication interface adaptation module is further configured to terminate the temporary IMEI and enable the target IMEI to maintain connection with the network side when the network side authentication is successful.

9. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the dynamic IMEI switching method according to any one of claims 1 to 7.

10. A computer-readable medium, characterized in that The computer-readable medium stores a program or instruction, and when the program or instruction is executed by a processor, the dynamic IMEI switching method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Method, device and encryption method for realizing switching of user communication three-code identification of mobile communication network

    CN121310126A

  • A method and device for switching three-code identification of a mobile communication network user communication

    CN121310126B