Smart card management method and device, electronic equipment and computer readable storage medium

By acquiring smart card binding and status information, the system automatically matches the target device identification code to the inserted smart card, solving network connectivity problems caused by users frequently changing SIM cards or card slot positions, improving user experience and reducing operator costs.

CN121509945APending Publication Date: 2026-02-10TCL COMM TECH (CHENGDU) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511757699.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Frequent changes in SIM cards or SIM card slot positions by users can cause devices to lose internet access, increasing operators' operating costs and impacting user experience.

Method used

In response to a smart card insertion event, the system obtains the smart card binding information and status information of the terminal. Based on this information, it determines the target device identification code and binds the target device identification code to the first smart card, ensuring that each smart card always matches the corresponding device identification code, regardless of the card slot position or card type.

Benefits of technology

This allows users to freely change the location of their smart card or use a virtual card without worrying about network registration failures or reactivation, improving the user experience while reducing the operator's operating costs and workload.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121509945A_ABST
    Figure CN121509945A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an intelligent card management method and device, electronic equipment and a computer readable storage medium, and belongs to the technical field of intelligent cards. According to the embodiment of the invention, the intelligent card binding information and the intelligent card state information of the terminal are acquired in response to the insertion event that the first intelligent card is inserted into the terminal, the target equipment identification code can be determined based on the intelligent card binding information and the intelligent card state information, and the target equipment identification code is bound to the first intelligent card. Therefore, the proper target equipment identification code can be automatically matched for the inserted first intelligent card, and an operator can complete activation without inquiring the type of the intelligent card and the card slot information while ensuring that the terminal can be successfully networked, so that the operation cost of the operator is reduced, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart card technology, specifically to a smart card management method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] A SIM (Subscriber Identity Module) card is a smart card used in mobile terminals. It enables users to connect to cellular mobile networks and use services such as voice, SMS, and mobile data.

[0003] With the increasing popularity of dual SIM cards and virtual SIM cards, users may frequently change their SIM cards or SIM card slot positions, which can easily lead to the inability of the terminal to use network services. At the same time, terminal operators need to repeatedly activate the binding relationship between the SIM card and IMEI (International Mobile Equipment Identity), thereby increasing operating costs and affecting user experience. Summary of the Invention

[0004] This application provides a smart card management method, apparatus, electronic device, and computer-readable storage medium, which can bind a suitable target device identification code to a first smart card, reducing operator operating costs and improving user experience.

[0005] In a first aspect, embodiments of this application provide a smart card management method, including: In response to an insertion event of a first smart card into the terminal, the smart card binding information and smart card status information of the terminal are obtained; the smart card binding information represents the correspondence between the smart cards bound to the terminal and the device identification code, and the smart card status information represents whether the terminal has a second smart card other than the first smart card; Based on the smart card binding information and the smart card status information, the target device identification code is determined, and the target device identification code is bound to the first smart card.

[0006] In one embodiment, determining the target device identification code based on the smart card binding information and the smart card status information includes: Based on the smart card binding information, the type information of the first smart card is determined; the type information indicates whether the first smart card is a new smart card. Based on the type information, the smart card binding information, and the smart card status information, the target device identification code is determined.

[0007] In one embodiment, determining the target device identification code based on the type information, the smart card binding information, and the smart card status information includes: When the type information indicates that the first smart card is not a new smart card and the smart card status information indicates that the terminal has a second smart card, the first binding information corresponding to the first smart card and the second binding information corresponding to the second smart card are extracted from the smart card binding information, and the target device identification code is determined based on the first binding information and the second binding information. When the type information indicates that the first smart card is not a new smart card and the smart card status information indicates that the terminal does not have a second smart card, the device identification code corresponding to the first smart card in the smart card binding information is determined as the target device identification code; When the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal has a second smart card, the target device identification code is determined from the remaining device identification codes of the terminal; When the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal does not have a second smart card, the preset device identification code of the terminal is determined as the target device identification code.

[0008] In one embodiment, after determining the target device identification code from the remaining device identification codes of the terminal when the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal has a second smart card, or after determining the preset device identification code of the terminal as the target device identification code when the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal does not have a second smart card, the method further includes: Add the correspondence between the first smart card and the target device identification code to the smart card binding information.

[0009] In one embodiment, determining the target device identification code based on the first binding information and the second binding information includes: Based on the first binding information, a first device identification code corresponding to the first smart card is determined, and based on the second binding information, a second device identification code corresponding to the second smart card is determined. If the first device identification code and the second device identification code are inconsistent, the first device identification code shall be determined as the target device identification code; If the first device identification code and the second device identification code are the same, the target device identification code is determined from the remaining device identification codes of the terminal.

[0010] In one embodiment, after determining the target device identification code from the remaining device identification codes of the terminal if the first device identification code and the second device identification code are the same, the method further includes: In the smart card binding information, the device identification code corresponding to the first smart card is updated from the first device identification code to the target device identification code.

[0011] Secondly, embodiments of this application provide a smart card management device, the device comprising: The information acquisition module is used to acquire the smart card binding information and smart card status information of the terminal in response to the insertion event of the first smart card; the smart card binding information represents the correspondence between the smart card bound to the terminal and the device identification code, and the smart card status information represents whether the terminal has a second smart card other than the first smart card; The identification code binding module is used to determine the target device identification code based on the smart card binding information and the smart card status information, and to bind the target device identification code to the first smart card.

[0012] In one embodiment, the identification code binding module includes: The type determination submodule is used to determine the type information of the first smart card based on the smart card binding information; the type information indicates whether the first smart card is a new smart card. The identification code determination submodule is used to determine the target device identification code based on the type information, the smart card binding information, and the smart card status information.

[0013] In one embodiment, the identification code determination submodule includes: The first determining unit is configured to, when the type information indicates that the first smart card is not a new smart card and the smart card status information indicates that the terminal has a second smart card, extract the first binding information corresponding to the first smart card and the second binding information corresponding to the second smart card from the smart card binding information, and determine the target device identification code based on the first binding information and the second binding information; The second determining unit is configured to determine the device identification code corresponding to the first smart card in the smart card binding information as the target device identification code when the type information indicates that the first smart card is not a new smart card and the smart card status information indicates that the terminal does not have the second smart card. The third determining unit is configured to determine the target device identification code from the remaining device identification codes of the terminal when the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal has the second smart card. The fourth determining unit is configured to determine the preset device identification code of the terminal as the target device identification code when the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal does not have the second smart card.

[0014] In one embodiment, the smart card management device further includes: The information adding module is used to add the correspondence between the first smart card and the target device identification code to the smart card binding information.

[0015] In one embodiment, the first determining unit includes: The first determining subunit is configured to determine the first device identification code corresponding to the first smart card based on the first binding information, and to determine the second device identification code corresponding to the second smart card based on the second binding information. The second determining subunit is configured to determine the first device identification code as the target device identification code if the first device identification code and the second device identification code are inconsistent. The third determining subunit is used to determine the target device identification code from the remaining device identification codes of the terminal if the first device identification code and the second device identification code are the same.

[0016] In one embodiment, the smart card management device further includes: The information update module is used to update the device identification code corresponding to the first smart card from the first device identification code to the target device identification code in the smart card binding information.

[0017] Thirdly, embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the smart card management method described above.

[0018] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the smart card management method described above.

[0019] Fifthly, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in the embodiments of this application.

[0020] In summary, in this embodiment, by responding to the insertion event of the first smart card into the terminal, the smart card binding information and smart card status information of the terminal are obtained. Based on the smart card binding information and smart card status information, the target device identification code can be determined and bound to the first smart card. In this way, a suitable target device identification code can be automatically matched to the inserted first smart card. While ensuring that the terminal can successfully connect to the network, the operator can complete the activation without inquiring about the smart card type and card slot information, thereby reducing the operator's operating costs and improving the user experience. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram of the steps of a smart card management method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a smart card management device provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0023] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0024] It should be noted that the SIM card is used to securely store the IMSI (International Mobile Subscriber Identity) and is used for customer authentication on the GSM (Global System for Mobile Communications) network. It enables users to connect to the cellular mobile network and use services such as voice, SMS, and mobile data.

[0025] Currently, some devices also feature a virtual SIM card (also known as an eSIM or embedded SIM card). This virtual SIM card isn't a physical plastic card, but rather a chip soldered directly onto the phone's motherboard. A single virtual SIM chip can store multiple configuration files from different carriers, allowing users to switch between them as needed, thus enabling them to switch carriers without changing their physical SIM card.

[0026] Currently, the activation and identification mechanism of carrier networks typically works as follows: When a user inserts a SIM card for the first time (whether a physical card or a virtual SIM card configuration file) and attempts to access the internet, the phone registers with the carrier network. During registration, the phone reports the terminal's IMEI number and the SIM card's identification information to the carrier's server. The carrier's server then binds and records the SIM card with this IMEI number. This binding relationship indicates that the user (SIM card) is using this specific phone (IMEI). Subsequently, each time the phone accesses the internet, the carrier network verifies whether the current device's IMEI and SIM card match the previously bound record. If they match, internet access is granted; if they do not match, the carrier considers it an anomaly (e.g., the user has changed their phone, the SIM card has been stolen, or the phone has been stolen), triggering a security mechanism that may result in network access being denied, requiring the user to reactivate and authenticate.

[0027] Current dual-SIM dual-standby phones typically have two IMEI numbers (e.g., IMEI1 and IMEI2), corresponding to SIM card slot 1 and SIM card slot 2 respectively. When users frequently change SIM cards or SIM card slot positions, the terminal operator needs to reactivate the binding relationship between the SIM card and the IMEI.

[0028] In one example, a user inserts SIM card A into SIM slot 1 to access the internet. The carrier records that SIM card A is bound to IMEI1. The user then removes SIM card A from SIM slot 1 and inserts it into SIM slot 2. When the user uses SIM slot 2 to access the internet, the phone reports SIM card A + IMEI2 to the network. The carrier verifies this and finds that the previous record indicated SIM card A was bound to IMEI1, but the current record shows SIM card A bound to IMEI2. This mismatch is considered abnormal and may result in internet access failure. The user is then required to contact customer service for re-verification and activation.

[0029] In another example, a user uses physical SIM card A to access the internet in SIM card slot 1. The operator records that physical SIM card A is bound to IMEI1. The user then disables physical SIM card A and activates virtual SIM card B in the phone. When the phone uses virtual SIM card B to access the internet, it reports virtual SIM card B + IMEI1 to the network. The operator verifies this and finds that this IMEI1 was previously bound to physical SIM card A, but now it appears together with virtual SIM card B, indicating a mismatch in the binding relationship. This triggers the security mechanism again, requiring the operator to reactivate the SIM card.

[0030] To address the issue that current binding mechanisms cannot adapt to dynamic multi-SIM usage scenarios arising from multiple SIM card slot changes and virtual SIM card switching, this application aims to provide a smart card management method. This method, in response to a first smart card insertion event into a terminal, acquires the terminal's smart card binding information and smart card status information. Based on these information, it determines the target device identification code and binds it to the first smart card. This automatically matches a suitable target device identification code to the inserted smart card, ensuring successful network connectivity for the terminal while allowing operators to complete activation without needing to inquire about the smart card type and slot information. This reduces operator operating costs and improves user experience.

[0031] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.

[0032] Figure 1 A flowchart illustrating a smart card management method according to an embodiment of this application is shown. The entity executing the smart card management method may be a smart card management device, which may be integrated into an electronic device configured with a smart card. The electronic device may be a smartphone, smartwatch, tablet, laptop, in-vehicle device, Internet of Things (IoT) device, smart home device, etc., but is not limited thereto.

[0033] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.

[0034] In this embodiment, the description will be from the perspective of a smart card management device, which can be integrated into a terminal. To facilitate the explanation of the smart card management method of this application, the following will describe it in detail with the smart card management device integrated into the terminal, that is, with the terminal as the execution subject.

[0035] Reference Figure 1 This application illustrates a smart card management method, which may specifically include the following steps: S101: In response to the insertion event of the first smart card being inserted into the terminal, obtain the smart card binding information and smart card status information of the terminal.

[0036] In this embodiment, the smart card binding information represents the correspondence between the smart cards bound to the terminal and the device identification codes. The smart card can be a SIM card, which can be a physical SIM card or a virtual SIM card (eSIM). The device identification code represents the terminal's unique identifier, specifically an IMEI. When the terminal is bound to multiple smart cards, the smart card binding information specifically represents the one-to-one correspondence between the multiple bound SIM cards and multiple IMEIs.

[0037] In this embodiment, each time the terminal matches the corresponding device identification code for an inserted smart card, it records the correspondence between the smart card and the device identification code in the smart card binding information. For example, when the terminal is a dual-SIM dual-standby terminal, the terminal can assign IMEI1 to SIM card A and IMEI2 to SIM card B. Then, the smart card binding information includes the correspondence between SIM card A and IMEI1, as well as the correspondence between SIM card B and IMEI2.

[0038] In this embodiment, the smart card in the smart card binding information can be represented by a smart card identifier. Specifically, this smart card identifier can be an ICCID (Integrated Circuit Card Identity). For example, Table 1 shows an example table of smart card binding information.

[0039] Table 1. Example of Smart Card Binding Information

[0040] In this embodiment, the smart card status information indicates whether the terminal has a second smart card besides the first smart card. The first smart card refers to the smart card currently inserted into the terminal, and the second smart card refers to one or more smart cards inserted into the terminal before the first smart card. The first smart card can be a physical SIM card or a virtual SIM card, and the second smart card can be a physical SIM card and / or a virtual SIM card.

[0041] In this embodiment, after the terminal detects the insertion event of the first smart card into the terminal, it will trigger smart card detection to determine whether there is a second smart card other than the first smart card, and then determine the smart card status information based on the detection result.

[0042] In this embodiment, for any card slot other than the slot corresponding to the first smart card, the status information of the card slot pins can be detected by a baseband chip or a dedicated SIM interface controller to determine whether a smart card is present in the slot. It should be noted that each physical SIM card slot has specific detection pins. When a SIM card is inserted into the slot, the gold fingers on the SIM card contact the detection pins of the slot, thereby changing the electrical state of the detection pins, such as a level flip. By detecting the electrical state, the presence of a SIM card in the slot can be accurately determined.

[0043] In this embodiment, the activation status of a virtual SIM card can be determined through power supply and communication protocols. Specifically, the operating system can send a test command to the eSIM chip based on the communication protocol. If a response is received from the eSIM chip in response to the test command, the eSIM is confirmed to exist and function normally; if no response is received, the virtual SIM card is confirmed to be faulty or non-existent.

[0044] S102: Based on the smart card binding information and smart card status information, determine the target device identification code and bind the target device identification code to the first smart card.

[0045] In this embodiment, by analyzing the smart card binding information and smart card status information, it is possible to effectively determine whether a second smart card has already occupied the corresponding device identification code. Then, based on the smart card binding information, a suitable target device identification code is assigned to the first smart card, and the first smart card is bound to the target device identification code.

[0046] In this implementation, by assigning and matching a device identification code to each smart card within the terminal, it is ensured that each smart card can always match the corresponding target device identification code, regardless of the card slot location or the type of virtual / physical card. On the one hand, for users, they can freely change the smart card location or use a virtual card without worrying about network registration failures or the need for reactivation, making it more convenient and greatly improving the user experience. On the other hand, for operators, the binding relationship they receive is always stable and consistent, and activation can be completed without inquiring about the smart card type and card slot information, thereby effectively simplifying the operator's operating costs and reducing unnecessary work.

[0047] In one feasible implementation, the step of determining the target device identification code based on smart card binding information and smart card status information may specifically include the following sub-steps: S102-1: Determine the type information of the first smart card based on the smart card binding information.

[0048] In this embodiment, the type information indicates whether the first smart card is a new smart card. A new smart card indicates that there is no smart card listed in the smart card binding information.

[0049] In the specific implementation, the terminal reads the ICCID of the first smart card inserted through the baseband chip, and then queries the smart card binding information based on the ICCID. If the same ICCID is found, the type information of the first smart card is determined to be the first type information, which indicates that the first smart card is not a new smart card; if the same ICCID is not found, the type information of the first smart card is determined to be the second type information, which indicates that the first smart card is not a new smart card.

[0050] In this embodiment, to ensure security and privacy protection, the terminal can use an encrypted hash function (such as SHA-256) to process the ICCID, generating a unique and irreversible hash value. Even if someone illegally obtains the smart card binding information, they will not be able to deduce the original ICCID number, thus protecting user privacy. At this point, the terminal can generate the hash value corresponding to the ICCID of the first smart card and match it with the hash values ​​corresponding to the ICCIDs of each smart card already bound in the smart card binding information to determine the type information of the first smart card.

[0051] S102-2: Determine the target device identification code based on type information, smart card binding information, and smart card status information.

[0052] In this embodiment, since different type information and / or different smart card status information contain various types of smart card insertion events, by further considering the type information of the first smart card based on the smart card binding information and smart card status information, it is possible to quickly assign a suitable target device identification code to the first smart card in various smart card insertion scenarios.

[0053] In one feasible implementation, the step of determining the target device identification code based on type information, smart card binding information, and smart card status information may specifically include the following sub-steps: S102-2-A: When the type information indicates that the first smart card is not a new smart card and the smart card status information indicates that the terminal has a second smart card, extract the first binding information corresponding to the first smart card and the second binding information corresponding to the second smart card from the smart card binding information, and determine the target device identification code based on the first binding information and the second binding information.

[0054] In this embodiment, when it is detected that the first smart card is not a new smart card and the terminal has a second smart card, it indicates that the first smart card is an old card and its binding relationship may conflict with that of the second smart card. In this case, the first binding information corresponding to the first smart card and the second binding information corresponding to the second smart card will be extracted from the smart card binding information, and a suitable target device identification code will be matched for the first smart card based on the first binding information and the second binding information.

[0055] In a specific implementation, the step of determining the target device identification code based on the first binding information and the second binding information may include: determining the first device identification code corresponding to the first smart card based on the first binding information, and determining the second device identification code corresponding to the second smart card based on the second binding information; if the first device identification code and the second device identification code are inconsistent, determining the first device identification code as the target device identification code; if the first device identification code and the second device identification code are consistent, determining the target device identification code from the remaining device identification codes of the terminal.

[0056] In this embodiment, the remaining device identification code refers to the remaining device identification code in the terminal. The remaining device identification code can be a physical SIM card and / or a virtual SIM card in the terminal that is not bound to the second smart card.

[0057] In this embodiment, if the first device identification code and the second device identification code are found to be inconsistent, that is, there is no device identification code conflict between the first smart card and the second smart card, the first device identification code originally bound to the first smart card will continue to be used; if the first device identification code and the second device identification code are found to be consistent, that is, there is a device identification code conflict between the first smart card and the second smart card, a new target device identification code will be matched for the first smart card to ensure the normal use of the second smart card.

[0058] In this embodiment, by analyzing the first binding information and the second binding information, the normal use of the terminal can be ensured, while effectively avoiding conflicts between the first smart card (which is the old card) and the inserted second smart card.

[0059] In this embodiment, considering that the binding relationship of the first smart card in the smart card binding information will change after the device identification code of the first smart card is reassigned, if the first device identification code and the second device identification code are the same, after determining the target device identification code from the remaining device identification codes of the terminal, the smart card management method may further include: updating the device identification code corresponding to the first smart card from the first device identification code to the target device identification code in the smart card binding information.

[0060] In this embodiment, in the event that the binding relationship of the first smart card in the smart card binding information may change, the device identification code corresponding to the first smart card is updated from the first device identification code to the target device identification code in a timely manner. This ensures that the accuracy of the smart card binding information is always maintained, thereby ensuring that the allocation of device identification code resources is always orderly and that multiple smart cards do not compete for the same device identification code without their knowledge, which would lead to network authentication failure.

[0061] S102-2-B: When the type information indicates that the first smart card is not a new smart card and the smart card status information indicates that the terminal does not have a second smart card, the device identification code corresponding to the first smart card in the smart card binding information is determined as the target device identification code.

[0062] In this embodiment, when it is detected that the first smart card is not a new smart card and the terminal does not have a second smart card, it indicates that the first smart card is an old card, and there is no situation where the second smart card occupies the device identification code corresponding to the first smart card. At this time, the device identification code corresponding to the first smart card in the smart card binding information can be directly determined as the target device identification code.

[0063] S102-2-C: When the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal has a second smart card, the target device identification code is determined from the remaining device identification codes of the terminal.

[0064] In this embodiment, when a new smart card is detected and a second smart card exists in the terminal, it indicates that the first smart card is a new card, and the smart card binding information does not contain a device identification code corresponding to the first smart card. In this case, to avoid conflict with the second smart card, the target device identification code will be determined from the remaining device identification codes in the terminal.

[0065] S102-2-D: When the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal does not have a second smart card, the terminal's preset device identification code is determined as the target device identification code.

[0066] In this embodiment, when a new smart card is detected and the terminal does not have a second smart card, it indicates that the first smart card is a new card, the smart card binding information does not contain a device identification code corresponding to the first smart card, and there is no situation where a second smart card occupies a device identification code. In this case, a preset device identification code can be directly determined as the target device identification code. Here, the preset device identification code represents the terminal's default device identification code; for example, the terminal's IMEI1 can be defined as the preset device identification code.

[0067] In this embodiment, under four smart card insertion scenarios corresponding to different types of information and different smart card status information, the first smart card and the target device identification code can be intelligently bound according to the smart card binding information. While ensuring terminal availability, this effectively avoids device identification code conflicts and ensures that no matter how many times the same smart card is inserted or removed, as long as it is used on the terminal, the terminal will assign it a suitable target device identification code, thus avoiding the operator from repeatedly activating the binding relationship between the smart card and the device identification code.

[0068] In this embodiment, to achieve timely updates to the smart card binding information, when the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal has a second smart card, the target device identification code is determined from the remaining device identification codes of the terminal; or when the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal does not have a second smart card, the terminal's preset device identification code is determined as the target device identification code. The smart card management method further includes adding the correspondence between the first smart card and the target device identification code to the smart card binding information.

[0069] In this embodiment, when the first smart card is inserted into the terminal as a new card, the correspondence between the first smart card and the target device identification code is added to the smart card binding information in a timely manner. This enables the timely updating of the smart card binding information and effectively ensures the accuracy of the allocation or switching of the device identification code that may appear again in the future.

[0070] In one example, the terminal is a dual-SIM dual-standby terminal. The user first inserts SIM card A into card slot 1. The terminal detects that SIM card A is a new card and that there is no other second smart card in card slot 2. The terminal will match the preset device identification code IMEI1 for SIM card A and record the correspondence between SIM card A and IMEI1 in the smart card binding information.

[0071] The user then inserts SIM card A into card slot 2. The terminal detects that SIM card A is not a new smart card and that the terminal does not have any other second smart cards (i.e., there are no other second smart cards in card slot 1). At this time, the IMEI1 corresponding to SIM card A in the smart card binding information is determined as the target device identification code, that is, IMEI1 continues to be used, and SIM card A will not be re-bound to IMEI2, thereby avoiding the operator from activating the binding relationship between SIM card A and IMEI2.

[0072] The user then inserts SIM card B into card slot 1. The terminal detects that SIM card B is a new smart card and that the terminal has a second smart card (i.e., SIM card A). At this time, the terminal will determine the remaining device identification code (i.e., IMEI2) as the target device identification code of SIM card B.

[0073] Subsequently, the user needs to swap the slot positions of SIM cards A and B, and remove SIM cards A and B. Then, SIM card A is inserted into slot 1. At this point, SIM card A continues to be bound to IMEI1. However, when the user inserts SIM card B into slot 2, an error occurs in the smart card binding information, causing SIM card B to be bound to IMEI1 in the smart card binding information. Upon detecting that SIM card B and SIM card A are identical, the terminal will bind the remaining device identification code (i.e., IMEI2) to SIM card B and update the IMEI corresponding to SIM card B from IMEI1 to IMEI2 in the smart card binding information. This not only avoids new conflicts but also automatically detects and corrects any previously erroneous binding records, ensuring that at any given time, one IMEI can only be used by one active SIM card, thus completely preventing the situation where two SIM cards correspond to one IMEI.

[0074] In this implementation, on the one hand, users no longer need to worry about their phones becoming unable to access the internet or needing to reactivate due to changing the physical SIM card slot. They can freely switch between primary and secondary SIM cards in any slot, with the system automatically handling IMEI adaptation and seamless network connectivity. Furthermore, when using virtual SIM cards such as eSIMs, the user experience is completely consistent with that of physical SIM cards. Switching between eSIM plans or numbers eliminates concerns about conflicts with the existing physical SIM card's binding, significantly improving the user experience. On the other hand, operators can complete activation without inquiring about the smart card type or slot information, fundamentally avoiding complaints and subsequent repair requests caused by users unintentionally changing SIM slots, thus significantly reducing the operator's operational and maintenance costs.

[0075] To facilitate better implementation of the smart card management method of this application, this application also provides a smart card management device based on the above-described smart card management method. The meanings of the terms used are the same as in the smart card management method described above, and specific implementation details can be found in the descriptions of the method embodiments.

[0076] Based on the same inventive concept, and referring to Figure 2 This application provides a smart card management device 200, which includes: The information acquisition module 201 is used to acquire the smart card binding information and smart card status information of the terminal in response to the insertion event of the first smart card; the smart card binding information represents the correspondence between the smart card bound to the terminal and the device identification code, and the smart card status information represents whether the terminal has a second smart card other than the first smart card; The identification code binding module 202 is used to determine the target device identification code based on the smart card binding information and smart card status information, and bind the target device identification code to the first smart card.

[0077] In one embodiment, the identification code binding module 202 includes: The type determination submodule is used to determine the type information of the first smart card based on the smart card binding information; the type information indicates whether the first smart card is a new smart card. The identification code determination submodule is used to determine the target device identification code based on type information, smart card binding information, and smart card status information.

[0078] In one embodiment, the identification code determination submodule includes: The first determining unit is used to extract the first binding information corresponding to the first smart card and the second binding information corresponding to the second smart card from the smart card binding information when the type information indicates that the first smart card is not a new smart card and the smart card status information indicates that the terminal has a second smart card, and to determine the target device identification code based on the first binding information and the second binding information. The second determining unit is used to determine the device identification code corresponding to the first smart card in the smart card binding information as the target device identification code when the type information indicates that the first smart card is not a new smart card and the smart card status information indicates that the terminal does not have a second smart card. The third determining unit is used to determine the target device identification code from the remaining device identification codes of the terminal when the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal has a second smart card. The fourth determining unit is used to determine the terminal's preset device identification code as the target device identification code when the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal does not have a second smart card.

[0079] In one embodiment, the smart card management device 200 further includes: The information addition module is used to add the correspondence between the first smart card and the target device identification code to the smart card binding information.

[0080] In one embodiment, the first determining unit includes: The first determining subunit is used to determine the first device identification code corresponding to the first smart card based on the first binding information, and to determine the second device identification code corresponding to the second smart card based on the second binding information. The second determining subunit is used to determine the first device identification code as the target device identification code if the first device identification code and the second device identification code are inconsistent. The third determining subunit is used to determine the target device identification code from the remaining device identification codes of the terminal if the first device identification code and the second device identification code are the same.

[0081] In one embodiment, the smart card management device 200 further includes: The information update module is used to update the device identification code corresponding to the first smart card from the first device identification code to the target device identification code in the smart card binding information.

[0082] The technical solution adopted in this application assigns and matches a device identification code to each smart card within the terminal, ensuring that each smart card can always match the corresponding target device identification code, regardless of the card slot position or virtual / physical card type. On the one hand, for users, they can freely change the smart card position or use a virtual card without worrying about network registration failure or reactivation, making it more convenient and greatly improving the user experience. On the other hand, for operators, the binding relationship they receive is always stable and consistent, and activation can be completed without asking for smart card type and card slot information, thereby effectively simplifying the operator's operating costs and reducing unnecessary work.

[0083] Specific limitations regarding the smart card management device 200 can be found in the limitations of the smart card management method described above, and will not be repeated here. Each module in the aforementioned smart card management device 200 can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0084] In addition, this application also provides an electronic device, such as Figure 3 As shown, it illustrates the structural diagram of the electronic device involved in this application, specifically: The electronic device may include components such as a processor 301 with one or more processing cores and a memory 302 with one or more computer-readable storage media. Those skilled in the art will understand that... Figure 3 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 302, and by calling data stored in the memory 302, thereby providing overall monitoring of the electronic device. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 301.

[0085] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.

[0086] In one feasible implementation, the electronic device further includes a power supply 303 that supplies power to the various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 303 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0087] In one feasible implementation, the electronic device may further include an input unit 304, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0088] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 302 according to the following instructions, and the processor 301 runs the applications stored in the memory 302, thereby implementing the steps in any of the smart card management methods provided in the embodiments of this application.

[0089] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present 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.

[0090] In one feasible implementation, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the methods described in any embodiment of this application.

[0091] In one feasible implementation, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the methods described in any embodiment of this application.

[0092] In one feasible implementation, a computer program product is also proposed, comprising a computer program or instructions that, when executed by a processor, implement the methods described in any embodiment of this application.

[0093] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0094] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0095] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the smart card management methods provided in this application.

[0096] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0097] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0098] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the smart card management methods provided in this application, the beneficial effects that any of the smart card management methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0099] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0100] The above provides a detailed description of a smart card management method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A smart card management method, characterized in that, The method includes: In response to an insertion event of a first smart card into the terminal, the smart card binding information and smart card status information of the terminal are obtained; the smart card binding information represents the correspondence between the smart cards bound to the terminal and the device identification code, and the smart card status information represents whether the terminal has a second smart card other than the first smart card; Based on the smart card binding information and the smart card status information, the target device identification code is determined, and the target device identification code is bound to the first smart card.

2. The smart card management method according to claim 1, characterized in that, The step of determining the target device identification code based on the smart card binding information and the smart card status information includes: Based on the smart card binding information, the type information of the first smart card is determined; the type information indicates whether the first smart card is a new smart card. Based on the type information, the smart card binding information, and the smart card status information, the target device identification code is determined.

3. The smart card management method according to claim 2, characterized in that, The step of determining the target device identification code based on the type information, the smart card binding information, and the smart card status information includes: When the type information indicates that the first smart card is not a new smart card and the smart card status information indicates that the terminal has a second smart card, the first binding information corresponding to the first smart card and the second binding information corresponding to the second smart card are extracted from the smart card binding information, and the target device identification code is determined based on the first binding information and the second binding information. When the type information indicates that the first smart card is not a new smart card and the smart card status information indicates that the terminal does not have a second smart card, the device identification code corresponding to the first smart card in the smart card binding information is determined as the target device identification code; When the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal has a second smart card, the target device identification code is determined from the remaining device identification codes of the terminal; When the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal does not have a second smart card, the preset device identification code of the terminal is determined as the target device identification code.

4. The smart card management method according to claim 3, characterized in that, The method further includes determining the target device identification code from the remaining device identification codes of the terminal when the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal has a second smart card, or determining the preset device identification code of the terminal as the target device identification code when the type information indicates that the first smart card is a new smart card and the smart card status information indicates that the terminal does not have a second smart card. Add the correspondence between the first smart card and the target device identification code to the smart card binding information.

5. The smart card management method according to claim 3, characterized in that, The step of determining the target device identification code based on the first binding information and the second binding information includes: Based on the first binding information, a first device identification code corresponding to the first smart card is determined, and based on the second binding information, a second device identification code corresponding to the second smart card is determined. If the first device identification code and the second device identification code are inconsistent, the first device identification code shall be determined as the target device identification code; If the first device identification code and the second device identification code are the same, the target device identification code is determined from the remaining device identification codes of the terminal.

6. The smart card management method according to claim 5, characterized in that, If the first device identification code and the second device identification code are the same, after determining the target device identification code from the remaining device identification codes of the terminal, the method further includes: In the smart card binding information, the device identification code corresponding to the first smart card is updated from the first device identification code to the target device identification code.

7. A smart card management device, characterized in that, The device includes: The information acquisition module is used to acquire the smart card binding information and smart card status information of the terminal in response to the insertion event of the first smart card; the smart card binding information represents the correspondence between the smart card bound to the terminal and the device identification code, and the smart card status information represents whether the terminal has a second smart card other than the first smart card; The identification code binding module is used to determine the target device identification code based on the smart card binding information and the smart card status information, and to bind the target device identification code to the first smart card.

8. The smart card management device according to claim 7, characterized in that, The identification code binding module includes: The type determination submodule is used to determine the type information of the first smart card based on the smart card binding information; the type information indicates whether the first smart card is a new smart card. The identification code determination submodule is used to determine the target device identification code based on the type information, the smart card binding information, and the smart card status information.

9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the smart card management method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the smart card management method as described in any one of claims 1 to 6.