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

By receiving and executing the three-code synchronous switching command in the terminal device, and combining the national cryptographic algorithm and the quantum-resistant encryption algorithm, the synchronous switching of IMEI, IMSI, and MSISDN is realized, which solves the problems of user identity protection and communication security in the existing technology and improves the security of mobile communication networks and user experience.

CN121310126BActive Publication Date: 2026-05-15CHINA ACADEMY OF INFORMATION & COMM +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511799387.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-02
Publication Date
2026-05-15
Estimated Expiration
2045-12-02

AI Technical Summary

Technical Problem

Existing technologies for switching user identities in mobile communications suffer from high costs, poor user experience, and the vulnerability of communication identifier associations to theft, leading to a high risk of identity leakage.

Method used

The terminal device receives a three-code synchronous switching instruction issued by the management backend to activate the original eSIM code number, change the IMEI, restart the device, activate the new eSIM code number, and exchange keys using the national cryptographic algorithm and the quantum-resistant encryption algorithm to ensure synchronous switching of the IMEI, IMSI, and MSISDN codes and prevent the association relationship from being stolen.

Benefits of technology

It effectively protects user identity, improves the efficiency of communication identifier switching and data protection, reduces the risk of identity leakage, avoids the cost of users replacing equipment, and enhances communication security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121310126B_ABST
    Figure CN121310126B_ABST
Patent Text Reader

Abstract

The application provides a method and device for realizing three-code identification switching of user communication in a mobile communication network. The method for three-code identification switching comprises the following steps: a terminal device receives a three-code synchronous switching instruction issued by a management background, the three-code synchronous switching instruction comprising a new device identification IMEI, a new code number identification IMSI and a new mobile phone number MSISDN; information of the three-code synchronous switching instruction is parsed and buffered; the original eSIM code number of the terminal device is deactivated so that the terminal device is disconnected from a network; after the terminal device is disconnected from the network, the original IMEI of the terminal device is replaced by the new IMEI, and the terminal device is restarted; after the terminal device is restarted, the new IMSI and the new MSISDN buffered are read, and the new eSIM code number is activated. The application realizes switching of all network identity identifications of users in a current mobile communication network, and has significant advantages in user identity protection, communication identification switching efficiency and data protection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of communications, and in particular relates to a method and apparatus for switching three-code identifiers for mobile communication network users. Background Technology

[0002] Currently, in mobile communication, users have multiple network identity identifiers, including device identifier IMEI (International Mobile Equipment Identity), number identifier IMSI (International Mobile Subscriber Identity), and MSISDN (Mobile Number). Attackers can cross-verify information such as IMEI, IMSI, and MSISDN through multi-source data correlation analysis, thereby locking onto a specific user and tracking and locating them.

[0003] To address this security challenge, the industry currently primarily employs the following two technical approaches:

[0004] 1. Frequent SIM card changes. One method is to manually change the SIM card; another is to use an eSIM card and change the phone number via eSIM number switching technology. However, because the user uses the same mobile device in both methods, the device's IMEI information remains unchanged, causing the new number to be associated with the IMEI, making it easy for attackers to identify the user.

[0005] 2. Changing the device or manually modifying the IMEI. Users can change their mobile device or modify its IMEI while continuing to use their original phone number, thus breaking the SIM card's binding to the original mobile device. While this solution is simple and direct, it has inherent drawbacks such as high cost and poor user experience; furthermore, the phone number remains unchanged and is still associated with the user's identity.

[0006] In addition to the issues mentioned above, there is a risk that the communication identifiers sent to terminal devices may be stolen. The theft of the association relationship of the communication identifiers directly affects the effectiveness of the three-code switching of the communication identifiers. Therefore, data encryption protection during the communication process plays a crucial role.

[0007] Therefore, there is an urgent need for a method and device to achieve the switching of three-code identifiers for mobile communication network users. Summary of the Invention

[0008] To address the aforementioned technical problems, this invention proposes a technical solution for implementing the switching of three-code identifiers for mobile communication network users, thereby resolving the aforementioned technical issues.

[0009] The first aspect of this invention discloses a method for switching three-code identifiers for mobile communication network users, the method comprising:

[0010] The terminal device receives a three-code synchronization switching instruction issued by the management backend. The three-code synchronization switching instruction includes a new device identifier IMEI, a new code number identifier IMSI, and a new mobile phone number MSISDN.

[0011] Parse and cache the information of the three-code synchronization switching instruction;

[0012] Deactivate the original eSIM number of the terminal device to disconnect the terminal device from the network;

[0013] Deactivating the original eSIM number of the terminal device refers to turning off or removing the eSIM profile already installed on the device, so that it is no longer connected to the cellular network.

[0014] After the terminal device disconnects from the network, the original IMEI of the terminal device is replaced with the new IMEI, and the terminal device is restarted.

[0015] After the terminal device restarts, it reads the cached new IMSI and new MSISDN and activates the new eSIM number.

[0016] Preferably, the step of parsing and caching the information of the three-code synchronization switching instruction specifically includes:

[0017] The new IMEI, new IMSI, and new MSISDN are cached in a local file on the terminal device.

[0018] Preferably, the deactivation of the original eSIM number of the terminal device and the activation of the new eSIM number are both performed through the LPA module of the terminal device.

[0019] Preferably, the replacement of the original IMEI of the terminal device with the new IMEI is achieved by sending an AT command to the terminal device.

[0020] Preferably, the method further includes: a verification step:

[0021] The three-code synchronization switch is verified by querying the current IMEI, IMSI, and MSISDN of the terminal device and comparing them with the cached new IMEI, new IMSI, and new MSISDN.

[0022] The verification steps are as follows:

[0023] Use AT commands to query the current IMEI of the terminal device;

[0024] The LPA module can be used to query the current IMSI and MSISDN of the terminal device.

[0025] Based on the verification results, the terminal device reports the result of the three-code synchronization switch to the management backend.

[0026] A second aspect of the present invention provides an encryption algorithm, the method comprising:

[0027] The terminal device generates a first public-private key and a second public-private key, and sends the first public key of the first public-private key and the second public key of the second public-private key to the management backend;

[0028] The management backend generates first random data and encrypts the first random data using the first public key to obtain first ciphertext;

[0029] The management backend generates second random data and encrypts the second random data using the second public key to obtain second ciphertext;

[0030] The management backend generates an intermediate key based on the first random data, the second random data, and the preset device identifier of the terminal device;

[0031] The management backend generates a session key and encrypts the session key using an encryption key derived from the intermediate key to obtain an encrypted session key;

[0032] The management backend sends the first ciphertext, the second ciphertext, and the encrypted session key to the terminal device;

[0033] The terminal device uses the first private key of the first public-private key to decrypt the first ciphertext and obtain the first random data.

[0034] The terminal device uses the second private key of the second public-private key to decrypt the second ciphertext and obtain the second random data;

[0035] The terminal device generates the intermediate key based on the recovered first random data, second random data, and its own preset device identifier;

[0036] The terminal device uses the encryption key derived from the intermediate key to decrypt the encryption session key and obtain the session key;

[0037] In the method for switching the three-code identifier of mobile communication network users as described in the first aspect, the terminal device and the management backend use the session key described in the second aspect for encryption during the interaction of the three-code synchronization switching instruction.

[0038] Preferably, the first public and private key is a key pair generated by the Chinese national cryptographic algorithm SM2; the second public and private key is a key pair generated by the quantum-resistant cryptographic algorithm CRYSTALS-Kyber.

[0039] The first random data is encrypted using the first public key and the national cryptographic SM2 algorithm to obtain the first ciphertext;

[0040] The second public key and the quantum-resistant cryptographic algorithm CRYSTALS-Kyber are used to encrypt the second random data to obtain the second ciphertext.

[0041] Preferably, the step of generating the intermediate key specifically includes:

[0042] The first random data, the second random data, and the preset device identifier are XORed in a predetermined order to obtain the intermediate key.

[0043] Preferably, the encryption key derived from the intermediate key is a prefix portion of a preset length of the intermediate key; the algorithm used to encrypt and decrypt the session key using the encryption key is the Chinese national standard SM4 algorithm; both the first random data and the second random data are 32 bytes; the encryption key is the first 16 bytes of the intermediate key;

[0044] The preset device identifier is the IMEI number of the terminal device;

[0045] Communication between the terminal device and the management backend is established via the MQTT protocol; the terminal device and the management backend subscribe to and publish to preset topics based on the device identifier; that is, the terminal device and the management backend subscribe to preset topics based on the device identifier and publish instruction information; specifically, when the terminal and the management backend communicate via the MQTT protocol, they need to subscribe to preset topics based on the device identifier, the sender sends messages to the preset topics, and the consumer subscribes to the topics to consume messages.

[0046] In a third aspect, the present invention provides an apparatus for switching communication three-code identifiers for mobile communication network users, the apparatus employing the method for switching communication three-code identifiers for mobile communication network users as described in any of the first aspects above, the apparatus comprising:

[0047] The receiving module is used to receive the three-code synchronous switching instruction issued by the management backend. The three-code synchronous switching instruction includes the new device identifier IMEI, the new code number identifier IMSI, and the new mobile phone number MSISDN.

[0048] The processing module is used to parse and cache the information of the three-code synchronization switching instruction;

[0049] The deactivation module is used to deactivate the original eSIM number of the terminal device, so that the terminal device disconnects from the network connection.

[0050] The switching module is used to replace the original IMEI of the terminal device with the new IMEI after the terminal device disconnects from the network, and to control the terminal device to restart.

[0051] The activation module is used to read the cached new IMSI and new MSISDN and activate the new eSIM number after the terminal device restarts.

[0052] A fourth aspect of this invention discloses an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of a method for switching communication three-code identifiers for mobile communication network users, as described in any of the first aspects of this disclosure.

[0053] The fifth aspect of this invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for switching communication three-code identifiers for mobile communication network users, as described in any of the first aspects of this disclosure.

[0054] Therefore, this invention proposes a method and encryption method for switching three-code identifiers in mobile communication network users, which can:

[0055] 1. It can flexibly implement strategies for switching the three communication codes of mobile communication network users;

[0056] 2. A method for single or synchronous switching of User Equipment Identifier (IMEI) and IMSI, MSISDN in mobile communication networks.

[0057] 3. A key exchange and communication encryption method that combines national cryptographic algorithms, quantum-resistant encryption algorithms, and device identifiers (IMEI).

[0058] Through the aforementioned technological innovations, this invention effectively enables the switching of all network identity identifiers for users in current mobile communication networks. Compared to existing technologies, this invention offers significant advantages in user identity protection, communication identifier switching efficiency, and data protection. Attached Figure Description

[0059] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0060] Figure 1This is a flowchart illustrating a method for switching communication three-code identifiers for mobile communication network users according to an embodiment of the present invention;

[0061] Figure 2 This is a schematic diagram illustrating the interaction process of a method for switching communication three-code identifiers for mobile communication network users according to an embodiment of the present invention.

[0062] Figure 3 This is a flowchart illustrating an encryption method according to an embodiment of the present invention;

[0063] Figure 4 This is a structural diagram of an apparatus for switching three-code identifiers for mobile communication network users according to an embodiment of the present invention;

[0064] Figure 5 This is a structural diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

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

[0066] Definitions:

[0067] 1. IMEI and SIM card binding

[0068] The principle of IMEI and SIM card binding technology is to record and compare the unique identifier of the device (IMEI) on the network side or the device side with the user identity identifier (usually IMSI) stored in the SIM card to achieve purposes such as device identification, user authentication, security management and contract control. This association can be verified when the device accesses the network, or it can be restricted at the hardware level through a device locking mechanism.

[0069] 2. Communication Identifier Reporting

[0070] When a mobile device attempts to access an operator's network to register, establish a call, send or receive SMS messages, or use data services, the device automatically sends its unique IMEI identifier to the base station via the wireless interface. The base station then transmits this information, along with user identification information such as the SIM card's IMSI, to the core network. The corresponding network elements in the core network record and associate the device's IMEI with the user's IMSI, enabling the operator to identify and manage specific devices and their user activities at the network level.

[0071] Example 1:

[0072] Users set switching strategies, which include flexible trigger rules and specific switching instructions. Trigger rules include switching at fixed time intervals, switching at specified times, and switching based on user events (such as the number of eSIM number calls). Specific switching instructions include single switching instructions (i.e., switching only the device identifier or the number identifier) ​​and three-code switching instructions (i.e., simultaneous switching of the device identifier and the number identifier). This process demonstrates the simultaneous switching strategy for the device identifier IMEI and the number identifier. The management backend executes the three-code switching strategy according to the user-defined three-code switching conditions. In some specific embodiments, the three-code switching strategy may be sent to the terminal device at fixed time intervals to achieve simultaneous switching instructions for the three codes. The three codes refer to: Device Identifier IMEI (International Mobile Equipment Identity), Number IMSI (International Mobile Subscriber Identity), and MSISDN (Mobile Number).

[0073] The management backend allocates a new eSIM number to the terminal device from the already applied eSIM numbers; the management backend also allocates a new IMEI to the newly applied eSIM number based on the terminal device's IMEI number range (the binding relationship between the device and the IMEI number range has been registered with the telecom operator).

[0074] The first aspect of this invention provides a method for switching the three-code identifier of mobile communication network users, such as... Figure 1 As shown, it includes the following steps:

[0075] Step S1: The terminal device receives a three-code synchronization switching instruction issued by the management backend. The three-code synchronization switching instruction includes a new device identifier IMEI, a new code identifier IMSI, and a new mobile phone number MSISDN.

[0076] Step S2: Parse and cache the information of the three-code synchronization switching instruction;

[0077] Step S3: Deactivate the original eSIM number of the terminal device to disconnect the terminal device from the network; wherein, deactivating the original eSIM number of the terminal device means turning off or removing the eSIM profile installed on the device so that it is no longer connected to the cellular network.

[0078] Step S4: After the terminal device disconnects from the network, change the original IMEI of the terminal device to the new IMEI, and restart the terminal device;

[0079] Step S5: After the terminal device restarts, it reads the cached new IMSI and new MSISDN and activates the new eSIM number.

[0080] In step S2, the step of parsing and caching the information of the three-code synchronous switching instruction specifically involves caching the new IMEI, new IMSI, and new MSISDN to a local file on the terminal device.

[0081] In step S3, both the deactivation of the original eSIM number of the terminal device and the activation of the new eSIM number are performed by the LPA module of the terminal device.

[0082] In step S4, the replacement of the original IMEI of the terminal device with the new IMEI is achieved by sending an AT command to the terminal device.

[0083] The method further includes: Step S6: Verification step: By querying the current IMEI, IMSI, and MSISDN of the terminal device and comparing them with the cached new IMEI, new IMSI, and new MSISDN, the method verifies whether the three-code synchronization switch has been completed.

[0084] The verification steps are as follows:

[0085] Use AT commands to query the current IMEI of the terminal device;

[0086] The LPA module can be used to query the current IMSI and MSISDN of the terminal device.

[0087] Step S7: The terminal device reports the result of the three-code synchronization switch to the management backend based on the verification result.

[0088] like Figure 2 In some specific embodiments, a three-code switching strategy can be sent to the terminal device at fixed time intervals to achieve synchronous switching instructions for the three codes; the specific method is as follows:

[0089] Step S10: Issue a three-code synchronization switching instruction. The management backend issues a three-code synchronization switching instruction to the terminal device. The content of the three-code synchronization switching instruction includes the switching of the new IMEI, the new IMSI, and the new MSISDN.

[0090] Among them, the device identifier IMEI is the International Mobile Equipment Identity, the code identifier IMSI is the International Mobile Subscriber Identity, and the MSISDN is the mobile phone number.

[0091] Step S20: The terminal device parses the three-code synchronization switching instruction and caches the information of the three-code synchronization switching instruction in a local file.

[0092] Step S30: The terminal device activates the new eSIM number. The terminal device activates the original eSIM number through the LPA module and replaces it with a new eSIM number. At this time, the terminal device is in a disconnected state.

[0093] Step S40: Replace the original IMEI of the terminal device with the new IMEI. After receiving the three-code synchronization switching instruction, the terminal device uses AT instructions to change the IMEI of the terminal device, applies the new IMEI to replace the original IMEI of the terminal device, and automatically restarts the device.

[0094] Step S50: After the terminal device restarts, it reads the new eSIM number information from the cache file and activates the new eSIM number using the new IMSI and new MSISDN number information through the LPA module.

[0095] Step S60: Query the current communication identifier and verify the effect. Query the current IMEI of the terminal device using AT commands. Query the current IMEI, IMSI, and MSISDN of the terminal device using the LPA module to see if they match the new IMEI, new IMSI, and new MSISDN in the local cache. If they match, the three-code synchronization switching instruction is completed. If the switching fails, continue using the existing three codes. After a failure, retry a maximum of three times. If it still fails after three attempts, wait for the next condition to be triggered.

[0096] Step S70: Report the three-code synchronization switching result. The terminal device reports the result of the completion of the three-code synchronization switching instruction to the management backend according to the activation status.

[0097] The core working principle of this solution is to first disconnect the terminal device from the network (deactivating the eSIM number in an eSIM device is similar to removing a SIM card in a regular device), then change the device's IMEI and restart the device. During the process from network disconnection to device startup, the device's IMEI will not be associated with the old eSIM number. After restarting the device, the new eSIM number is automatically activated, and the device can then connect to the network normally. This process ensures that the IMEI, IMSI, and MSISDN all change when the device reconnects to the network. The eSIM card, or Embedded-SIM, is a digital SIM card technology that is directly embedded in the device's chip, enabling functions such as calls and internet access without a physical card slot. The eSIM card is the communication chip that carries the eSIM number.

[0098] In summary, within the same device, single or synchronous switching of the device identifier (IMEI) and user identifier (MSISDN and IMSI) can be implemented according to a strategy. The user communication network identifier switching method can form a new and unique combination of communication identifiers (IMEI, IMSI, MSISDN) before each switching code, preventing any duplicate associations between the three communication identifiers. The three-code synchronous switching process is as follows: Upon receiving the three-code synchronous switching instruction (containing IMEI, IMSI, and MSISDN information), the terminal device first disconnects from the network, then changes the device IMEI and restarts the device. After restarting, the new eSIM code (IMSI and MSISDN) is automatically activated. The new user communication identifiers are confirmed by querying, ensuring that the new IMEI, IMSI, and MSISDN are not associated with the old ones. The communication key exchange process between the terminal device and the management backend is based on a comprehensive generation of national cryptographic algorithms, quantum-resistant encryption algorithms, and the terminal device identifier (IMEI). High-strength encryption of instruction data protects the three-code association from being stolen.

[0099] Example 2:

[0100] A second aspect of the present invention provides an encryption algorithm, the method comprising:

[0101] The terminal device generates a first public-private key and a second public-private key, and sends the first public key of the first public-private key and the second public key of the second public-private key to the management backend;

[0102] The management backend generates first random data and encrypts the first random data using the first public key to obtain first ciphertext;

[0103] The management backend generates second random data and encrypts the second random data using the second public key to obtain second ciphertext;

[0104] The management backend generates an intermediate key based on the first random data, the second random data, and the preset device identifier of the terminal device;

[0105] The management backend generates a session key and encrypts the session key using an encryption key derived from the intermediate key to obtain an encrypted session key;

[0106] The management backend sends the first ciphertext, the second ciphertext, and the encrypted session key to the terminal device;

[0107] The terminal device uses the first private key of the first public-private key to decrypt the first ciphertext and obtain the first random data.

[0108] The terminal device uses the second private key of the second public-private key to decrypt the second ciphertext and obtain the second random data;

[0109] The terminal device generates the intermediate key based on the recovered first random data, second random data, and its own preset device identifier;

[0110] The terminal device uses the encryption key derived from the intermediate key to decrypt the encryption session key and obtain the session key;

[0111] In the method for switching the three-code identifier of mobile communication network users described in the embodiment, the terminal device and the management backend use the aforementioned session key for encryption during the interaction of the three-code synchronization switching instruction.

[0112] The first public and private key is a key pair generated by the Chinese national cryptographic algorithm SM2; the second public and private key is a key pair generated by the quantum-resistant cryptographic algorithm CRYSTALS-Kyber.

[0113] The first random data is encrypted using the first public key and the national cryptographic SM2 algorithm to obtain the first ciphertext;

[0114] The second public key and the quantum-resistant cryptographic algorithm CRYSTALS-Kyber are used to encrypt the second random data to obtain the second ciphertext.

[0115] The specific steps for generating the intermediate key are as follows:

[0116] The first random data, the second random data, and the preset device identifier are XORed in a predetermined order to obtain the intermediate key.

[0117] The encryption key derived from the intermediate key is a prefix portion of the intermediate key with a preset length; the algorithm used to encrypt and decrypt the session key using the encryption key is the Chinese national standard SM4 algorithm; both the first random data and the second random data are 32 bytes; the encryption key is the first 16 bytes of the intermediate key;

[0118] The preset device identifier is the IMEI number of the terminal device.

[0119] Communication between the terminal device and the management backend is established via the MQTT protocol; the terminal device and the management backend subscribe to and publish to preset topics based on the device identifier.

[0120] like Figure 3 As shown, in some specific embodiments, the above encryption method is used, and the specific encryption method is as follows:

[0121] Terminal device startup: Generate a pair of SM2 public and private keys (public key and private key) using the national cryptographic SM2 algorithm; generate a pair of Kyber public and private keys (public key and private key) using the quantum-resistant encryption algorithm CRYSTALS-kyber.

[0122] The device terminal establishes an MQTT connection with the management backend and subscribes to topics: the topic format subscribed by the device terminal is " / server / device IMEI" (the management backend sends data to the device terminal), at which time the server has automatically subscribed to the topic "device / device IMEI" (the device terminal sends data to the management backend).

[0123] The device terminal reports the SM2 public key and the Kyber public key to the management backend.

[0124] After receiving the public key, the management backend generates a first random string A (32 bytes), and encrypts the first random string A using the SM2 public key to obtain the first ciphertext A'.

[0125] The management backend uses the CRYSTALS-kyber algorithm and the kyber public key to generate a second random string B (32 bytes) and a second ciphertext B'.

[0126] The management backend performs an XOR operation on the first random string A, the second random string B, and the IMEI of the device terminal in sequence to obtain the third string C.

[0127] The management backend generates a session key K (this key is used for subsequent command data encryption). The first 16 bytes of the third string C are used as the SM4 key. The session key K is encrypted using the national cryptographic SM4 algorithm to obtain the encrypted session key K'.

[0128] The management backend sends encrypted messages A', B', and K' to the device via the topic " / server / device IMEI".

[0129] After receiving the ciphertext, the terminal device uses the SM2 private key to decrypt A' and obtain the string A.

[0130] The terminal device uses the CRYSTALS-kyber algorithm and the kyber private key to decrypt B' and obtain the string B.

[0131] The terminal device performs an XOR operation on string A, string B, and the device IMEI in sequence to obtain string C.

[0132] The terminal device uses the national cryptographic SM4 algorithm and the first 16 bytes of string C to decrypt K' and obtain the session key K.

[0133] After the above steps, the terminal device and the management backend exchange session key K. In subsequent command interactions, especially in the three-code synchronous switching command process in the method for switching the three-code identifier of mobile communication network users in Embodiment 1, key K is used for encryption.

[0134] Furthermore, existing technical solutions require users to replace their mobile devices to change the IMEI, which undoubtedly increases the user's cost. This solution does not require users to replace their devices; users can continue using their existing devices to change the IMEI. Existing technical solutions, when changing the phone number within the same device, regardless of whether the number is new or old, will link it to the device's original IMEI, which is detrimental to protecting user identity information. This solution, although switching the number within the same device, simultaneously changes the IMEI information; the IMEI, IMSI, and MSISDN communication identifiers are switched synchronously, effectively protecting user identity. Existing technical solutions do not address the importance of data encryption. During the synchronous switching of the three codes, the instruction data is transmitted from the old communication channel. The instruction includes the binding relationship of the three codes. If it is intercepted during transmission, the binding relationship of the three codes can easily be linked to the old three codes, allowing a third party to detect that it is the same device. The method in this application combines national cryptographic algorithms, quantum-resistant encryption algorithms, and the device's IMEI, improving encryption strength and significantly reducing the risk of theft.

[0135] Example 3:

[0136] A third aspect of the present invention provides an apparatus for switching communication three-code identifiers for mobile communication network users, the apparatus employing the method described in any one of the first aspects, the apparatus 100 comprising:

[0137] The receiving module 101 is used to receive the three-code synchronous switching instruction issued by the management background. The three-code synchronous switching instruction includes a new device identifier IMEI, a new code number identifier IMSI, and a new mobile phone number MSISDN.

[0138] Processing module 102 is used to parse and cache the information of the three-code synchronization switching instruction;

[0139] Deactivation module 103 is used to deactivate the original eSIM code of the terminal device so that the terminal device disconnects from the network connection.

[0140] The switching module 104 is used to replace the original IMEI of the terminal device with the new IMEI after the terminal device disconnects from the network, and to control the terminal device to restart.

[0141] The activation module 105 is used to read the cached new IMSI and new MSISDN after the terminal device restarts, and activate the new eSIM number.

[0142] The processing module 102 is specifically used to cache the new IMEI, new IMSI, and new MSISDN to a local file on the terminal device.

[0143] Both the deactivation module 103 and the activation module 105 implement their functions through the LPA module of the terminal device.

[0144] The switching module 104 sends AT commands to the terminal device to change the original IMEI of the terminal device to the new IMEI.

[0145] The device further includes: a verification module, used to verify whether the three-code synchronous switching has been completed by querying the current IMEI, IMSI, and MSISDN of the terminal device and comparing them with the cached new IMEI, new IMSI, and new MSISDN;

[0146] Specifically, the verification module is used for:

[0147] Use AT commands to query the current IMEI of the terminal device;

[0148] The LPA module can be used to query the current IMSI and MSISDN of the terminal device.

[0149] AT commands are used for connection and communication between terminal devices and PC applications. AT stands for Attention. Each AT command line can contain only one AT command; for sending AT commands, in addition to the two AT characters, a maximum length of 1056 characters (including the final null character) can be received.

[0150] The LPA module stands for Local Profile Assistant. Simply put, the LPA module is a key component of eSIM (embedded SIM card) technology. Its main function is to act as a "bridge" between the phone's operating system and the eSIM chip, managing and manipulating the carrier profile within the eSIM.

[0151] The verification module is also used to control the device to report the result of the three-code synchronization switch to the management backend based on the verification result.

[0152] A fourth aspect of this invention discloses an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of a method for switching communication three-code identifiers for mobile communication network users, as disclosed in any of the first aspects of this invention.

[0153] Figure 5 This is a structural diagram of an electronic device according to an embodiment of the present invention, such as... Figure 5 As shown, the electronic device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, Near Field Communication (NFC), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.

[0154] Those skilled in the art will understand that Figure 5 The structure shown is merely a structural diagram of the part related to the technical solution of this disclosure and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0155] The fifth aspect of this invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for switching communication three-code identifiers for mobile communication network users, as disclosed in any of the first aspects of this invention.

[0156] Please note that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for switching three-code identifiers for mobile communication network users, characterized in that, Includes the following steps: The terminal device receives a three-code synchronization switching instruction issued by the management backend. The three-code synchronization switching instruction includes a new device identifier IMEI, a new code number identifier IMSI, and a new mobile phone number MSISDN. Parse and cache the information of the three-code synchronization switching instruction; Deactivate the original eSIM number of the terminal device to disconnect the terminal device from the network; After the terminal device disconnects from the network, the original IMEI of the terminal device is replaced with the new IMEI, and the terminal device is restarted. After the terminal device restarts, it reads the cached new IMSI and new MSISDN and activates the new eSIM number. In the method for switching the three-code identifier of mobile communication network users, the terminal device and the management backend use a session key for encryption during the interaction of the three-code synchronization switching command. The encryption algorithm includes: The terminal device generates a first public-private key and a second public-private key, and sends the first public key of the first public-private key and the second public key of the second public-private key to the management backend; The management backend generates first random data and encrypts the first random data using the first public key to obtain first ciphertext; The management backend generates second random data and encrypts the second random data using the second public key to obtain second ciphertext; The management backend generates an intermediate key based on the first random data, the second random data, and the preset device identifier of the terminal device; The management backend generates a session key and encrypts the session key using an encryption key derived from the intermediate key to obtain an encrypted session key; The management backend sends the first ciphertext, the second ciphertext, and the encrypted session key to the terminal device; The terminal device uses the first private key of the first public-private key to decrypt the first ciphertext and obtain the first random data. The terminal device uses the second private key of the second public-private key to decrypt the second ciphertext and obtain the second random data; The terminal device generates the intermediate key based on the recovered first random data, second random data, and its own preset device identifier; The terminal device uses the encryption key derived from the intermediate key to decrypt the encryption session key and obtain the session key; The encryption key derived from the intermediate key is a prefix portion of the intermediate key with a preset length; the algorithm used to encrypt and decrypt the session key using the encryption key is the Chinese national standard SM4 algorithm; both the first random data and the second random data are 32 bytes; the encryption key is the first 16 bytes of the intermediate key; The preset device identifier is the IMEI number of the terminal device; Communication between the terminal device and the management backend is established via the MQTT protocol; the terminal device and the management backend subscribe to and publish to preset topics based on the device identifier.

2. The method for switching the three-code identifier of mobile communication network users according to claim 1, characterized in that, The step of parsing and caching the information of the three-code synchronization switching instruction specifically includes: The new IMEI, new IMSI, and new MSISDN are cached in a local file on the terminal device.

3. The method for switching the three-code identifier of mobile communication network users according to claim 1, characterized in that, The process of deactivating the original eSIM number of the terminal device and activating the new eSIM number is both performed through the LPA module of the terminal device.

4. The method for switching the three-code identifier of mobile communication network users according to claim 1, characterized in that, The replacement of the original IMEI of the terminal device with the new IMEI is achieved by sending an AT command to the terminal device.

5. The method for switching the three-code identifier of mobile communication network users according to claim 1, characterized in that, The method further includes: a verification step: The three-code synchronization switch is verified by querying the current IMEI, IMSI, and MSISDN of the terminal device and comparing them with the cached new IMEI, new IMSI, and new MSISDN. The verification steps are as follows: Use AT commands to query the current IMEI of the terminal device; The LPA module can be used to query the current IMSI and MSISDN of the terminal device. Based on the verification results, the terminal device reports the result of the three-code synchronization switch to the management backend.

6. The method for switching the three-code identifier of mobile communication network users according to claim 1, characterized in that, The first public and private key is a key pair generated by the Chinese national cryptographic algorithm SM2; the second public and private key is a key pair generated by the quantum-resistant cryptographic algorithm CRYSTALS-Kyber. The first random data is encrypted using the first public key and the national cryptographic SM2 algorithm to obtain the first ciphertext; The second public key and the quantum-resistant cryptographic algorithm CRYSTALS-Kyber are used to encrypt the second random data to obtain the second ciphertext.

7. The method for switching the three-code identifier of a mobile communication network user according to claim 1 or 6, characterized in that, The specific steps for generating the intermediate key are as follows: The first random data, the second random data, and the preset device identifier are XORed in a predetermined order to obtain the intermediate key.

8. An apparatus for switching three-code identifiers for mobile communication network users, wherein the apparatus employs the method described in any one of claims 1-7, characterized in that, The device includes: The receiving module is used to receive the three-code synchronous switching instruction issued by the management backend. The three-code synchronous switching instruction includes the new device identifier IMEI, the new code number identifier IMSI, and the new mobile phone number MSISDN. The processing module is used to parse and cache the information of the three-code synchronization switching instruction; The deactivation module is used to deactivate the original eSIM number of the terminal device, so that the terminal device disconnects from the network connection. The switching module is used to replace the original IMEI of the terminal device with the new IMEI after the terminal device disconnects from the network, and to control the terminal device to restart. The activation module is used to read the cached new IMSI and new MSISDN and activate the new eSIM number after the terminal device restarts.