A subscriber identity module (SIM) card switching method and an electronic device

By intercepting card status messages, the issue of changes in the network identifier on the UI during the switching between eSIM and physical SIM cards was resolved, thus improving the user experience.

CN119967397BActive Publication Date: 2026-05-22HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2023-10-31
Publication Date
2026-05-22

Smart Images

  • Figure CN119967397B_ABST
    Figure CN119967397B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a user identification module (SIM) card switching method and an electronic device. The electronic device includes one or more SIM card interfaces for inserting a physical SIM card, and a target SIM card interface of the one or more SIM card interfaces is associated with an embedded eSIM card. The method includes: displaying a first interface including a network identifier corresponding to the target SIM card interface, a first setting item indicating that a first SIM card is being used, and a second setting item indicating that a second SIM card is not being used; one of the first SIM card and the second SIM card is a physical SIM card, and the other is an eSIM card; in response to a selection operation on the second setting item, displaying a second interface including the network identifier corresponding to the target SIM card interface, a first setting item indicating that the first SIM card is not being used, and a second setting item indicating that the second SIM card is being used; and displaying the network identifier during switching from the first interface to the second interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and in particular to a method for switching SIM cards in a user identification module and an electronic device. Background Technology

[0002] Currently, in electronic devices that support both embedded Subscriber Identity Modules (eSIMs) and physical SIM cards, switching between the two is possible. During this switching process, the change in SIM card status leads to a change in the network identifier of the electronic device's user interface (UI), impacting the user experience. Summary of the Invention

[0003] This application provides a SIM card switching method and electronic device for a user identification module, which can maintain the display of the network identifier of the corresponding SIM interface during the switching process between an eSIM card and a physical SIM card.

[0004] To achieve the above objectives, the embodiments of this application adopt the following technical solutions:

[0005] In a first aspect, a method for switching a SIM card in a user identity module is provided. This method is applied to an electronic device, which includes one or more SIM card interfaces for inserting a physical SIM card. A target SIM card interface in one or more SIM card interfaces is associated with an embedded eSIM card. The method includes:

[0006] The electronic device displays a first interface, which includes a network identifier corresponding to the target SIM card interface, as well as a first setting and a second setting. The first setting indicates that the electronic device is using the first SIM card, and the second setting indicates that the second SIM card is not in use. In response to a selection operation on the second setting in the first interface, a second interface is displayed. The second interface includes a network identifier corresponding to the target SIM card interface; the first setting in the second interface indicates that the first SIM card is not in use, and the second setting indicates that the electronic device is using the second SIM card. During the transition from the first interface to the second interface, the electronic device displays the network identifier corresponding to the target SIM card interface. Of the first and second SIM cards, one is the physical SIM card inserted into the target SIM card interface, and the other is the eSIM card associated with the target SIM card interface.

[0007] In this solution, during the switching process between the eSIM card and the physical SIM card, the network identifier of the corresponding SIM interface is displayed on the UI, so that the UI is unaware of the switching process, thus improving the user experience.

[0008] In one possible implementation of the first aspect, displaying a second interface in response to a selection operation on a second setting item in the first interface includes: intercepting a card status message of the target SIM card interface in response to the selection operation, and then displaying the second interface. The card status message indicates whether the SIM card corresponding to the target SIM card interface is recognized or lost, and is used to update the network identifier corresponding to the target SIM card interface displayed by the electronic device. Specifically, if the card status message indicates that the SIM card corresponding to the target SIM card interface is recognized, the electronic device normally displays the network identifier corresponding to the target SIM card interface. If the card status message indicates that the SIM card corresponding to the target SIM card interface is lost, the electronic device does not display the network identifier corresponding to the target SIM card interface.

[0009] In one possible implementation of the first aspect, one or more SIM card interfaces are at least two SIM card interfaces, including a target SIM card interface. The method further includes: the electronic device's data service is currently carried by a first SIM card corresponding to the target SIM card interface; in response to a selection operation, after intercepting the card status message of the target SIM card interface, the data service of the electronic device is carried by a second SIM card corresponding to the target SIM card interface. In this scheme, by intercepting the card status message of the target SIM card interface, the SIM card management module cannot receive the card status message and therefore cannot determine whether the SIM card in the target SIM card interface has been lost. Thus, the SIM card management module considers the SIM card in the target SIM card interface to be in normal use. Consequently, the electronic device will not switch its data service to be carried by the SIM card corresponding to another SIM card interface.

[0010] In one possible implementation of the first aspect, intercepting the card status message of the target SIM card interface in response to the selection operation includes: generating a SIM switching message of the target SIM card interface in response to the selection operation, and intercepting the card status message of the target SIM card interface based on the SIM switching message.

[0011] In one possible implementation of the first aspect, the method further includes: after a successful SIM card switch at the target SIM card interface, the card status message of the target SIM card interface is not intercepted. Therefore, when the UI actively queries the card status message of the target SIM card interface, the card status message of the target SIM card interface can be reported to the UI. The UI can then display the network identifier of the target SIM card interface based on the SIM card identification information found within the target SIM card interface.

[0012] In one possible implementation of the first aspect, intercepting the card status message of the target SIM card interface based on the SIM switching message includes: setting a first flag bit of the target SIM card interface to a first preset value based on the SIM switching message; wherein, the first flag bit being the first preset value indicates that the target SIM card interface is switching SIM cards. Upon receiving the card status message of the target SIM card interface, if the first flag bit is read as the first preset value, the card status message of the target SIM card interface is intercepted. In this scheme, by setting a preset value for the flag bit of the target SIM card interface when the SIM switching message is received, in subsequent processes, once the card status message is received, the preset value corresponding to the flag bit is read, and the card status information is intercepted according to the operation indicated by the preset value.

[0013] In one possible implementation of the first aspect, the method further includes: powering down the first SIM card based on a SIM switching message; wherein, powering down the first SIM card triggers a card status message indicating that the first SIM card has been dropped. Specifically, the card status message of the target SIM card interface can indicate whether the first or second SIM card within the target SIM card interface has been dropped or is recognized. In response to the successful power-down of the first SIM card, the SIM card corresponding to the target SIM card interface is switched to power on the second SIM card. In response to the successful power-on of the second SIM card, the card status message of the target SIM card interface is not intercepted. During the process from powering down the first SIM card to powering on the second SIM card, the electronic device displays the network identifier corresponding to the target SIM card interface. In this solution, after successful power-on, the card status message of the target SIM card interface is no longer intercepted, allowing the UI interface to normally query the card status of the SIM card within the target SIM card interface.

[0014] In one possible implementation of the first aspect, responding to the successful power-on of the second SIM card by not intercepting the card status message of the target SIM card interface includes: setting a first flag bit of the target SIM card interface to a second preset value in response to the successful power-on of the second SIM card. Upon receiving the card status message of the target SIM card interface and reading that the first flag bit is the second preset value, the card status message of the target SIM card interface is not intercepted. In this scheme, by setting the preset value for the flag bit of the target SIM card interface when the second SIM card is successfully powered on, in subsequent processes, once a card status message is received, the preset value corresponding to the flag bit can be read, and the operation indicated by the preset value can be performed without intercepting the card status information.

[0015] In one possible implementation of the first aspect, the network identifier corresponding to the target SIM card interface in the first interface is a first network identifier, which corresponds to the first SIM card. In the second interface, the network identifier corresponding to the target SIM card interface is a second network identifier, which corresponds to the second SIM card. In this scheme, the card type of the SIM card being used can be distinguished in the UI interface based on different network identifiers.

[0016] In a second aspect, an electronic device is provided, comprising: a processor, a memory, and one or more SIM card interfaces; the memory and the one or more SIM card interfaces are respectively coupled to the processor. The one or more SIM card interfaces are used to insert a physical SIM card. The electronic device also includes one or more eSIM cards, each eSIM card corresponding to one SIM card interface. The memory is used to store computer execution instructions, and when the electronic device is running, the processor executes the computer execution instructions stored in the memory to cause the electronic device to perform the SIM card switching method of the User Identity Module as described in any of the first aspects above.

[0017] Thirdly, a computer-readable storage medium is provided, which stores instructions that, when executed on a computer, enable the computer to perform the SIM card switching method of either the first or second aspect described above.

[0018] Fourthly, a computer program product containing instructions is provided, which, when run on an electronic device, enables the electronic device to execute the SIM card switching method of either the first or second aspect described above.

[0019] Fifthly, an apparatus (e.g., a system-on-a-chip) is provided, comprising a processor for supporting an electronic device in performing the functions described in the first aspect above. In one possible design, the apparatus further comprises a memory for storing program instructions and data necessary for the electronic device. When the apparatus is a system-on-a-chip, it may be composed of chips or may include chips and other discrete devices.

[0020] The technical effects of any of the design methods in aspects two through five can be found in the technical effects of different design methods in aspect one, and will not be repeated here. Attached Figure Description

[0021] Figure 1A This is a schematic diagram illustrating the operation process of switching SIM cards in a mobile phone, as provided in an embodiment of this application.

[0022] Figure 1BA schematic diagram of the UI interface during the process of switching from a physical SIM card to an eSIM card, as provided in an embodiment of this application;

[0023] Figure 2 A schematic diagram of the hardware and software structure of a mobile phone provided in an embodiment of this application;

[0024] Figure 3 This is a schematic diagram illustrating the interaction flow of various modules of a mobile phone in a scenario of switching SIM cards, as provided in an embodiment of this application.

[0025] Figure 4 A schematic diagram illustrating the interaction flow of various modules of a mobile phone in another scenario of switching SIM cards provided in this application embodiment;

[0026] Figure 5 This is a schematic diagram of the interaction process of various modules of a mobile phone in a scenario of switching SIM cards, provided by an embodiment of this application.

[0027] Figure 6 A schematic diagram of a mobile phone interface provided in an embodiment of this application;

[0028] Figure 7 A schematic diagram illustrating another mobile phone interface provided in an embodiment of this application;

[0029] Figure 8 A schematic diagram illustrating another mobile phone interface provided in an embodiment of this application;

[0030] Figure 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;

[0031] Figure 10 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation

[0032] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first," "second," etc., may explicitly or implicitly include one or more of that feature.

[0033] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0034] First, a brief explanation of the technical terms that may be involved in this application will be provided.

[0035] A modem consists of a modulator and a demodulator. It translates a computer's digital signals into analog signals that can be transmitted over a regular telephone line. These analog signals can then be received by another modem at the other end of the line and translated into a language that the computer can understand.

[0036] The Radio Interface Layer (RIL) in Android. TM In this platform, the RIL is located between the framework layer and the modem. The RIL can also be referred to as QCRIL (Qualcomm Radio Interface Layer) in other platforms. This platform can also provide an interface for communication with the modem (Qualcomm Modem Interface, QMI).

[0037] A SIM card is an integrated circuit card used to store and manage user information for mobile communication devices.

[0038] An eSIM card is an embedded SIM card. Unlike traditional SIM cards, eSIM cards do not need to be inserted into a device; instead, they can be downloaded to the device via a network. In this embodiment, to distinguish between traditional physical SIM cards and eSIM cards, the physical SIM card is referred to as a physical SIM card.

[0039] Some electronic devices support eSIM cards, while others do not. ESIM support specifically means that certain SIM card slots (corresponding to the SIM card interface) on the electronic device support both physical and eSIM cards. Only one SIM card can be enabled at a time for that slot. The SIM card used in this slot can be either a physical or eSIM card. In some scenarios, users can choose to switch the currently used SIM card in that slot from a physical SIM card to an eSIM card. In other scenarios, users can also choose to switch the currently used SIM card in that slot from an eSIM card back to a physical SIM card.

[0040] During the switching process between the physical SIM card and the eSIM card, the SIM card to be switched must be powered off first, and then powered on again after the switch is complete. Powering off the SIM card causes it to switch from a recognized state (also known as a card-ready state) to a lost state (also known as a lost card state), resulting in the SIM card interface's card status changing to lost card. Consequently, the card status icon for the SIM card interface on the user interface also changes to the icon corresponding to a lost card.

[0041] Powering on a SIM card changes its status from "disconnected" to "recognized," causing the SIM card slot's status to change to "recognized," and consequently, the icon for that SIM card slot on the user interface to change accordingly. Therefore, the cycle of powering on and off a SIM card causes a change in the SIM card slot's status (recognized → disconnected → recognized), which in turn causes a change in the SIM card slot's status icon on the UI. This frequent icon change on the UI within a short period negatively impacts the user experience.

[0042] Taking mobile phones as an example, Figure 1A This illustrates a scenario where the user selects to trigger a card switch. Phone 1, when powered on, can display... Figure 1A The main interface shown is 100. (The rest of the text appears to be a list of characters and symbols, possibly related to a computer interface or a similar interface.) Figure 1A As shown in Figure a, the main interface 100 includes application icons for applications such as "Clock," "Calendar," "Gallery," "Notes," and "Settings." In response to a user's triggering action on the "Settings" application icon in the main interface 100, the mobile phone 1 enters the Settings application and displays the Settings application interface 102.

[0043] Depend on Figure 1A As shown in b, the settings application interface 102 can include multiple settings items, such as WLAN, Bluetooth, SIM card management, and mobile network settings. In response to the user selecting the SIM card management settings item 103 in the settings application interface 102, the mobile phone 1 can enter... Figure 1A The SIM card management interface shown in c is 104.

[0044] Depend on Figure 1A As shown in Figure c, the SIM card management interface 104 includes settings for the SIM card slot in the mobile phone. Users can select the desired SIM card slot in this SIM card management interface 104. Combined with... Figure 1A As shown in the interface, Figure 1AThe mobile phone 1 shown includes two SIM card slots (slot 1 and slot 2), supporting simultaneous use of dual SIM cards. Currently, slot 1 uses a physical SIM card, and slot 2 also uses a physical SIM card. Assuming that slot 2 (i.e., slot 2 shown on the interface of mobile phone 1) supports not only physical SIM cards but also eSIM cards, then slot 2 supports switching between physical SIM cards and eSIM cards.

[0045] Mobile Phone 1 responds to user requests Figure 1A Triggering the submenu settings item 105 of SIM card slot 2 (as shown in c) can display the submenu interface 106 of SIM card slot 2. Submenu interface 106 includes settings for the SIM card corresponding to SIM card slot 2 in the phone. It is understood that in other embodiments, SIM card slot 1 of phone 1 (i.e., card 1 shown on the interface of phone 1) may also support switching between a physical SIM card and an eSIM card. Alternatively, phone 1 may support only a single SIM card, and this single SIM card slot may support switching between a physical SIM card and an eSIM card.

[0046] Depend on Figure 1A As shown in diagram d, the sub-menu interface 106 of card slot 2 displays the two SIM cards that card slot 2 supports switching between. Currently, card slot 2 is using a physical SIM card. At this time, the status bar of sub-menu interface 106 displays the network identifier 108 corresponding to card slot 1 and the network identifier 109 corresponding to card slot 2. The display of the network identifier in the status bar indicates that the physical SIM card or eSIM card in the corresponding SIM card interface is powered on. Figure 1A As can be seen, the status bar of submenu interface 106 displays the network identifier 109 corresponding to SIM card slot 2, indicating that the physical SIM card in SIM card slot 2 is powered on. In response to the user's trigger operation on the setting item 107 corresponding to the eSIM card in the submenu interface 106 of SIM card slot 2, mobile phone 1 switches the SIM card used in SIM card slot 2 from the physical SIM card to the eSIM card.

[0047] Specifically, after the user selects an eSIM card in the sub-menu interface 106 of SIM card slot 2, mobile phone 1 will respond to the operation by first powering down the SIM card currently used in SIM card slot 2 (such as a physical SIM card) and then powering on the SIM card selected by the user (such as an eSIM card).

[0048] When the physical SIM card is powered off, it changes from a recognized SIM card to a lost SIM card, causing the SIM card status in SIM slot 2 to change to lost SIM card. Consequently, the network identifier for SIM slot 2 also changes to the icon corresponding to a lost SIM card. The icon for a lost SIM card may be blank, meaning the corresponding network identifier is not displayed. When the eSIM card is powered on, it becomes a recognized SIM card, causing the SIM card status in SIM slot 2 to change to recognized SIM card. Consequently, the network identifier for SIM slot 2 also changes to the icon corresponding to a recognized SIM card, meaning the corresponding network identifier is displayed.

[0049] Depend on Figure 1A As shown in Figure e, at this time, the status bar of the submenu interface 106 for slot 2 only displays the network identifier 108 corresponding to slot 1, and does not display the network identifier corresponding to slot 2. After a period of time, by Figure 1A As shown in f, at this time, the status bar of the sub-menu interface 106 of SIM card slot 2 displays the network identifier 108 corresponding to SIM card slot 1 and the network identifier 109 corresponding to SIM card slot 2. Since the process from the physical SIM card powering off to the eSIM card powering on is very brief, the network identifier corresponding to SIM card slot 2 in the status bar of phone 1 will appear, briefly disappear, and then reappear, affecting the user experience.

[0050] Mobile phone 1 can re-enter the SIM card management interface 110 in response to the user's trigger operation of exiting the settings item in the sub-menu interface 106 of SIM card slot 2. Figure 1A As shown in g, the SIM card currently used in SIM slot 2 is an eSIM card.

[0051] It should be noted that, Figure 1A The process shown is only one implementation of the user's choice to switch SIM cards. In other embodiments, the user can also switch SIM cards in other ways.

[0052] Please see Figure 1B This illustrates a schematic diagram of the UI during the switching process from a physical SIM card to an eSIM card. Figure 1B As shown in Figure a, in response to the user's selection of the eSIM card settings 107 in the sub-menu interface 106 of the SIM card slot 2, the mobile phone 1 displays as follows: Figure 1B The sub-menu interface 106 for card slot 2 is shown in diagram b. When the physical SIM card is powered off, a message 111 is displayed in the status bar of sub-menu interface 106, indicating "SIM not inserted". This message 111 is no longer displayed after the eSIM card is powered on. Regarding... Figure 1B Please refer to the description of c. Figure 1AThe description of g. Therefore, displaying prompts during the switch from a physical SIM card to an eSIM card can affect the user's experience of using the phone.

[0053] Please refer to Figure 2 It illustrates the hardware and software architecture of mobile phone 1 in some embodiments, including several modules that may be involved in the SIM card switching process in mobile phone 1. Figure 2 In this paper, the software architecture of mobile phone 1 is divided into an application layer and a middleware layer.

[0054] The application layer may include a series of application packages. In this embodiment, the application may include a SIM card management module. It will be understood that in other embodiments, the SIM card management module may also be a submodule of a settings application.

[0055] The intermediate layer may include QCRIL, QMI, SIM card interface 1, and SIM card interface 2. It can be understood that SIM card interface 1 and SIM card interface 2 in the intermediate layer are the software interfaces corresponding to the two SIM card slots of mobile phone 1, respectively. Figure 2 In the example shown, phone 1 supports the simultaneous use of two SIM cards.

[0056] The hardware layer includes SIM card interface 1, SIM card interface 2, eSIM card, and modem. SIM card interface 1 and SIM card interface 2 each support the insertion of a physical SIM card. In other embodiments, where the mobile phone 1 only supports the simultaneous use of a single SIM card, the intermediate layer and hardware layer may also include a single SIM card interface. For ease of distinction, in this embodiment, the SIM card interfaces of the intermediate layer are referred to as SIM card interface 1 (software) and SIM card interface 2 (software), and the SIM card interfaces of the hardware layer are referred to as SIM card interface 1 (hardware) and SIM card interface 2 (hardware). SIM card interface 2 (software) supports both eSIM cards and physical SIM cards inserted into SIM card interface 2 (hardware).

[0057] In some embodiments, the SIM card slot 2 of the mobile phone 1 supports both physical SIM cards and eSIM cards, but only one physical SIM card or eSIM card can be activated at a time. For example, the SIM card slot 2 is equipped with a switch that allows the modem to connect to the SIM card interface 2 (hardware) or to the eSIM card.

[0058] Specifically, when the SIM card selected for slot 2 is a physical SIM card, this switch connects the modem to SIM card interface 2 (hardware). This connects the hardware circuitry between the modem and SIM card interface 2 (hardware), while disconnecting the hardware circuitry between the modem and the eSIM card. In other words, the power-on circuitry of the SIM card interface 2 (software) of mobile phone 1 is connected to the SIM card interface 2 (hardware).

[0059] When the SIM card selected for slot 2 is an eSIM card, this switch connects the modem to the eSIM card. This connects the hardware circuitry between the modem and the eSIM card, and disconnects the hardware circuitry between the modem and SIM card interface 2 (hardware). In other words, the power-on circuitry of the SIM card interface 2 (software) of mobile phone 1 is connected to the eSIM card.

[0060] Please see Figure 3 , Figure 3 The diagram illustrates a flowchart showing the network identifier change on the phone's UI during a SIM card switching operation in response to a user's action. The UI can be... Figure 1A The SIM card management interface 104 is shown. Users can switch SIM cards on this UI interface.

[0061] The phone's SIM card management module can detect SIM card switching operations triggered by the user interface. Upon detecting this operation, the SIM card management module sends a SIM card switching command (SIM switching message) to QCRIL. Figure 1A Taking the illustrated operation as an example, the SIM card switching command is specifically used to instruct the SIM card used in SIM slot 2 to switch from a physical SIM card to an eSIM card. Of course, the SIM card switching command can also be used to instruct the SIM card used in SIM slot 2 to switch from an eSIM card to a physical SIM card, and this embodiment of the application does not limit this.

[0062] After QCRIL receives the SIM card switching command (SIM switching message), it powers down the physical SIM card in response. Specifically, QMI sends a power-down command for the physical SIM card to the modem, and the modem, upon receiving the command, powers down the physical SIM card. This is understandable. Figure 1A In the process shown, this step specifically involves the modem powering down the physical SIM card used in SIM slot 2. After the physical SIM card is successfully powered down, the modem will return feedback information indicating that the physical SIM card has been successfully powered down via QMI.

[0063] After the physical SIM card is successfully powered off, the modem detects a change in the card status of that slot and reports the card status to the QCRIL via QMI. In this example, because the physical SIM card in that slot is powered off, it is lost, and the card status of that slot is "absent." Subsequently, QCRIL can report this card status to the SIM card management module, which can then update the network identifier corresponding to that slot on the UI interface, displaying the network identifier corresponding to the "absent" status, which is also the network identifier corresponding to the lost card. Figure 1A As shown in e.

[0064] Simultaneously, after receiving the SIM card switching command, QCRIL sends a switching command between the physical SIM card and eSIM card to the modem via QMI. In response to this switching command, the modem will switch the SIM card on / off, activating the corresponding SIM card's hardware circuitry. For example, in... Figure 1A In the illustrated process, the user selects to switch the physical SIM card in slot 2 to an eSIM card. Correspondingly, after receiving the switch command sent by QCRIL via QMI, the modem parses it to obtain the switch command indicating a switch from the physical SIM card to the eSIM card. Responding to this switch command, the modem adjusts the switch position to disconnect the hardware circuit between the modem and SIM card interface 2 (hardware), and reconnects the hardware circuit between the modem and the eSIM card. Afterwards, when the modem powers on the SIM card to be used in slot 2, it can power on the eSIM card by calling SIM card interface 2 (software).

[0065] Similarly, after the modem completes the switching between the physical SIM card and the eSIM card, it will send a feedback message to QCRIL via QMI indicating that the switching was successful.

[0066] It should be noted that, in some embodiments, the two steps of QCRIL sending a power-off command for the physical SIM card to the modem via QMI and QCRIL sending a switching command between the physical SIM card and the eSIM card to the modem via QMI can be executed in parallel.

[0067] Next, QCRIL sends a power-on command for the eSIM card to the modem via QMI. The modem responds to this command and powers on the eSIM card. After successful power-on, the modem returns a confirmation message to QCRIL via QMI, indicating successful power-on. At this point, the phone has completed the process of switching from a physical SIM card to an eSIM card. Afterward, the phone can display on the UI that the SIM card used in SIM slot 2 is an eSIM card. Figure 1A The SIM card management interface shown is 110.

[0068] At this point, after the eSIM card successfully powers on, the modem detects a change in the card status of SIM slot 2 and reports this status to the QCRIL via the QMI. In this example, since the eSIM card in slot 2 is powered on, it becomes a recognized card, and the card status of that slot is "present." The QCRIL can then report this card status to the SIM card management module, which can update the network identifier corresponding to that slot on the UI interface, displaying the network identifier corresponding to the "present" status, which is also the network identifier corresponding to the recognized card. Figure 1A As shown in f.

[0069] In some embodiments, when mobile phone 1 includes at least two SIM card slots, and one of these slots is associated with an eSIM card, the following example illustrates the situation: SIM card slot 1 supports a physical SIM card, SIM card slot 2 supports both a physical SIM card and an eSIM card, and SIM card slot 2 is currently using a physical SIM card. If the data service of mobile phone 1 is currently carried by the physical SIM card in SIM card slot 2, during the process of switching the physical SIM card in SIM card slot 2 to an eSIM card, the data service of mobile phone 1 will switch to be carried by the physical SIM card corresponding to SIM card slot 1.

[0070] Please see Figure 4 , Figure 4 The process is illustrated in which, during the process of mobile phone 1 responding to a user's operation to switch SIM cards, the card status is reported, causing the data service to switch to the physical SIM card corresponding to card slot 1.

[0071] The phone's SIM card management module can detect SIM card switching operations triggered by the user in the UI interface. After detecting the SIM card switching operation, the SIM card management module sends a SIM card switching command to QCRIL. This SIM card switching command specifically instructs the SIM card used in SIM slot 2 to be switched from a physical SIM card to an eSIM card.

[0072] After QCRIL receives the SIM card switching command, the steps for powering down the physical SIM card can be referred to above. Figure 3 The specific steps for powering off a physical SIM card are described in detail below, and will not be repeated here.

[0073] After the physical SIM card is successfully powered off, the modem detects a change in the card status of slot 2 and reports the card status of slot 2 to the QCRIL via QMI. In this example, since the physical SIM card in this slot is powered off and has been removed, the card status of this slot is vacant. Afterwards, QCRIL can report this card status to the SIM card management module. At this point, because the card status of the slot is vacant, the data service of mobile phone 1 is switched from the physical SIM card in slot 2 to the physical SIM card corresponding to slot 1.

[0074] Simultaneously, after receiving the SIM card switching command, QCRIL sends a switching command between the physical SIM card and the eSIM card to the modem via QMI. The steps for the modem to switch the physical SIM card in slot 2 to the eSIM card in response to this switching command, as well as the steps for powering on the eSIM card, can be referred to the above. Figure 3 The specific descriptions in the text will not be repeated here.

[0075] In summary, to address the issues of the network identifier not being continuously displayed on the UI during SIM card switching and the potential change of the SIM card carrying data services, this application provides a SIM card switching method. By intercepting card status messages during SIM card switching, the network identifier on the UI can be continuously displayed without changing the SIM card carrying data services.

[0076] This SIM card switching method can be applied to an electronic device that includes one or more SIM card interfaces. The one or more SIM card interfaces are used to insert a physical SIM card. A target SIM card interface among the one or more SIM card interfaces is associated with an embedded eSIM card.

[0077] In this method, the electronic device can consistently display the network identifier corresponding to the target SIM card interface during the switching process between the physical SIM card and the eSIM card. This solution avoids the problem of the SIM card being lost due to power-on / off cycles during the switching process. The switching between the physical SIM card and the eSIM card includes both switching from a physical SIM card to an eSIM card and switching from an eSIM card to a physical SIM card.

[0078] Specifically, the electronic device can display a first interface. This first interface can be used to switch between the physical SIM card and the eSIM card. The first interface also includes a first setting for the first SIM card and a second setting for the second SIM card. The first setting in the first interface indicates that the electronic device is using the first SIM card, and the second setting indicates that the second SIM card is not in use. In other words, on this first interface, the user can trigger the electronic device to switch from the first SIM card to the second SIM card.

[0079] Among the first SIM card and the second SIM card mentioned above, one SIM card is a physical SIM card inserted into the target SIM card interface, and the other is an eSIM card associated with the target SIM card interface.

[0080] Subsequently, the electronic device can receive a user's selection of a second setting item in the first interface. In response to this selection, the electronic device can display a second interface. The first setting item in the second interface indicates that the first SIM card is not in use, and the second setting item in the second interface indicates that the electronic device is using the second SIM card. In other words, in response to the above selection, the electronic device has completed the switch from the first SIM card to the second SIM card.

[0081] It is important to emphasize that both the first and second interfaces mentioned above include the network identifier corresponding to the target SIM card interface. Furthermore, the electronic device will continuously display the network identifier corresponding to the target SIM card interface during the switching process from the first interface to the second interface. This solution prevents the SIM card from being displayed as lost due to the SIM card being powered on and off during the switching process.

[0082] In the following embodiments, the method provided by the embodiments of this application is described as follows: the first SIM card is a physical SIM card inserted into the target SIM card interface (such as the card slot 2 of a mobile phone), and the second SIM card is an eSIM card associated with the target SIM card interface.

[0083] Please see Figure 5 , Figure 5 This illustrates the interaction flow of various modules in mobile phone 1 that intercept card status messages during a user's SIM card switching operation. The phone's SIM card management module can detect the user's SIM card switching operation triggered by the UI interface. This operation can be referenced... Figure 1A As shown in d, this represents the selection operation for the settings corresponding to the eSIM card. Upon detecting the SIM card switching operation, the SIM card management module can respond by generating a SIM card switching message for SIM slot 2 and sending a SIM card switching command to QCRIL. This SIM card switching command specifically instructs SIM slot 2 to switch from a physical SIM card to an eSIM card.

[0084] After QCRIL receives the SIM card switching command, the steps for powering down the physical SIM card can be referred to above. Figure 3 The specific steps for powering off a physical SIM card are described in detail below, and will not be repeated here.

[0085] After the physical SIM card is successfully powered off, the modem detects a change in the card status of SIM slot 2 and reports this status to the QCRIL via the QMI. The QCRIL can intercept the card status message corresponding to SIM slot 2 based on the SIM handover message. Therefore, when the QCRIL receives the card status message for SIM slot 2 reported by the modem, it can intercept the corresponding card status message.

[0086] Specifically, when QCRIL receives a SIM switching message, it sets the first flag bit of SIM slot 2 to a first preset value. This first preset value indicates that SIM slot 2 is switching SIM cards. Therefore, after QCRIL receives the card status message for SIM slot 2 reported by the modem, it reads that the first flag bit is at the first preset value and intercepts the card status message for SIM slot 2. For example, let's say the first preset value is 1. When QCRIL receives a SIM switching message, it sets the first flag bit of SIM slot 2 to 1. At this time, if QCRIL receives the card status message for SIM slot 2 reported by the modem, it intercepts the received card status message for SIM slot 2 by reading that the first flag bit is 1.

[0087] Simultaneously, after receiving the SIM card switching command, QCRIL sends a switching command between the physical SIM card and the eSIM card to the modem via QMI. The steps for the modem to switch the physical SIM card in slot 2 to the eSIM card in response to this switching command, as well as the steps for powering on the eSIM card, can be referred to the above. Figure 3 The specific descriptions in the text will not be repeated here.

[0088] After a successful switch between the physical SIM card and the eSIM card, QCRIL no longer intercepts the card status messages for SIM slot 2 reported by the modem. At this point, after the eSIM card powers on successfully, the modem detects a change in the card status of SIM slot 2 and will report the card status of SIM slot 2 to QCRIL via QMI. Upon receiving the card status messages for SIM slot 2 reported by the modem, QCRIL sends the card status messages to the UI interface.

[0089] Specifically, after a successful switch between the physical SIM card and the eSIM card, QCRIL sets the first flag bit of SIM slot 2 to a second preset value. Upon receiving the card status message for SIM slot 2 from the modem, QCRIL reads that the first flag bit is at the second preset value and therefore does not intercept the card status message from the target SIM card interface. For example, let the second preset value be 0. When QCRIL receives a SIM handover message, it sets the first flag bit of SIM slot 2 from 1 to 0. At this time, if QCRIL receives the card status message for SIM slot 2 from the modem, it reads that the first flag bit is 0 and therefore does not intercept the received card status message for SIM slot 2.

[0090] Therefore, during the switching between the physical SIM card and the eSIM card, or in other words, during the process from the physical SIM card being powered down to the eSIM card being powered on, QCRIL no longer sends the card status message of card slot 2 reported by medem to the UI interface. The UI interface no longer receives the card status message of card slot 2, and therefore will not obtain the card status change of card slot 2 based on the card status message of card slot 2. Consequently, it will not change the network identifier corresponding to the displayed card status. In other words, the UI interface will always maintain the display of the network identifier corresponding to card slot 2.

[0091] Please see Figure 6 , Figure 6 This is a schematic diagram illustrating the display of a UI interface in response to a switching operation between a physical SIM card and an eSIM card, as provided in an embodiment of this application. Figure 6 As shown in Figure a, the sub-menu interface 106 of card slot 2 displays the two SIM cards that card slot 2 supports switching between. Let... Figure 6 The submenu interface 106 shown in Figure a is the first interface. Submenu interface 106 includes a first setting item corresponding to the physical SIM card and a second setting item corresponding to the eSIM card. At this time, the first setting item corresponding to the physical SIM card indicates that the mobile phone 1 is using the physical SIM card, and the second setting item corresponding to the eSIM card indicates that the eSIM card is not in use. The status bar of submenu interface 106 displays the network identifier 108 corresponding to SIM card slot 1 and the network identifier 109 corresponding to SIM card slot 2.

[0092] In response to the user's selection of the second setting item corresponding to the eSIM card, mobile phone 1 displays as follows: Figure 6 The submenu interface shown in b is 106. Let... Figure 6 The submenu interface 106 shown in b is the second interface. The status bar of submenu interface 106 displays the network identifier 108 corresponding to SIM card slot 1 and the network identifier 109 corresponding to SIM card slot 2. Submenu interface 106 also includes a first setting item corresponding to the physical SIM card and a second setting item corresponding to the SIM card. The first setting item in submenu interface 106 indicates that the physical SIM card is not in use, and the second setting item in submenu interface 106 indicates that mobile phone 1 is using an eSIM card.

[0093] In response to the aforementioned selection operation, mobile phone 1 can intercept the card status message of SIM card slot 2 and then display the second interface mentioned above. Intercepting the card status message of SIM card slot 2 means intercepting messages that indicate whether the SIM card corresponding to SIM card slot 2 is recognized or lost. The recognition or loss of the SIM card corresponding to SIM card slot 2 can be used to update the network identifier displayed on mobile phone 1 corresponding to SIM card slot 2. Specifically, if the SIM card corresponding to SIM card slot 2 is recognized, mobile phone 1 displays the network identifier corresponding to SIM card slot 2; if the SIM card corresponding to SIM card slot 2 is lost, mobile phone 1 no longer displays the network identifier corresponding to SIM card slot 2.

[0094] In response to the above selection operation, mobile phone 1 can generate a SIM switching message for card slot 2 and intercept the card status message of card slot 2 based on the SIM switching message.

[0095] Mobile phone 1 can re-enter the SIM card management interface 110 in response to the user's trigger operation of exiting the settings item in the sub-menu interface 106 of SIM card slot 2. Figure 6 As shown in c, the SIM card currently used in SIM slot 2 is an eSIM card.

[0096] Depend on Figure 6 It can be seen that in mobile phone 2, by Figure 6 The submenu interface 106 (first interface) shown in 'a' switches to... Figure 6 During the process of the sub-menu interface 106 (second interface) shown in b, the mobile phone 1 displays the network identifier 109 corresponding to the card slot 2.

[0097] In this embodiment, when mobile phone 1 includes at least two SIM card slots, and one of these slots is associated with an eSIM card, the following example illustrates the situation: SIM card slot 1 supports a physical SIM card, SIM card slot 2 supports both a physical SIM card and an eSIM card, and SIM card slot 2 is currently using a physical SIM card. If the data service of mobile phone 1 is currently carried by the first SIM card corresponding to SIM card slot 2, in response to the selection operation of the second setting item corresponding to the eSIM card, mobile phone 1 intercepts the card status message of SIM card slot 2, and the data service of the electronic device can continue to be carried by the second SIM card corresponding to SIM card slot 2. Specifically, by intercepting the card status message of the target SIM card interface, the SIM card management module does not receive the card status message and therefore cannot determine whether the SIM card in the target SIM card interface has been lost. Thus, the SIM card management module considers the SIM card in the target SIM card interface to be in normal use. Consequently, the electronic device will not switch its data service to be carried by the SIM card corresponding to another SIM card interface.

[0098] It should be noted that the above embodiments only use the switching from a physical SIM card to an eSIM card as an example to illustrate the SIM card switching method provided in this application. The SIM card switching method provided in this application can also be applied to the process of switching from an eSIM card to a physical SIM card.

[0099] In some embodiments, the network identifier corresponding to the target SIM card interface (e.g., card slot 2) displayed in the first interface may be different from the network identifier corresponding to the target SIM card interface (e.g., card slot 2) displayed in the second interface. When the electronic device displays the first interface, it uses a first SIM card (e.g., a physical SIM card). Therefore, the network identifier in the first interface (referred to as the first network identifier) ​​can correspond to the first SIM card. When the electronic device displays the second interface, it uses a second SIM card (e.g., an eSIM card). Therefore, the network identifier in the second interface (referred to as the second network identifier) ​​can correspond to the second SIM card.

[0100] Please see Figure 7 , Figure 7 This is a schematic diagram illustrating another UI interface response to switching operations between a physical SIM card and an eSIM card, provided as an embodiment of this application. Figure 7 As shown in Figure a, the submenu interface 106 of SIM card slot 2 displays the two SIM cards that SIM card slot 2 supports switching between. At this time, the first setting item corresponding to the physical SIM card indicates that the mobile phone 1 is using the physical SIM card, and the second setting item corresponding to the eSIM card indicates that the eSIM card is not in use. At this time, the status bar of the submenu interface 106 displays the network identifier 108 corresponding to SIM card slot 1 and the network identifier 701 corresponding to SIM card slot 2. Among them, the network identifier 701 corresponding to SIM card slot 2 can correspond to the physical SIM card and be set as the first network identifier. For example, as shown in Figure a. Figure 7 As shown in a, the network identifier 701 may include the word "SIM", indicating that it corresponds to a physical SIM card and prompting the user that mobile phone 1 is using a physical SIM card.

[0101] In response to the user's selection of the second setting item corresponding to the eSIM card, mobile phone 1 displays as follows: Figure 7 The submenu interface 106 is shown in b. The status bar of submenu interface 106 displays the network identifier 108 corresponding to SIM card slot 1 and the network identifier 702 corresponding to SIM card slot 2. The first setting item in submenu interface 106 indicates that the physical SIM card is not in use, and the second setting item in submenu interface 106 indicates that the phone 1 is using the eSIM card. The network identifier 702 corresponding to SIM card slot 2 can correspond to the eSIM card and be set as the second network identifier. For example, as shown... Figure 7 As shown in b, the network identifier 702 may include the word "eSIM", indicating that it corresponds to an eSIM card and prompting the user that mobile phone 1 is using an eSIM card.

[0102] The display portion of the first and second network identifiers that indicates the correspondence between the physical SIM card and the eSIM card can be customized. Figure 7 This is just an example.

[0103] Mobile phone 1 can re-enter the SIM card management interface 110 in response to the user's trigger operation of exiting the settings item in the sub-menu interface 106 of SIM card slot 2. Figure 7 As shown in c, the SIM card currently used in SIM slot 2 is an eSIM card.

[0104] Depend on Figure 7 It can be seen that in mobile phone 2, by Figure 7 The submenu interface shown in 'a' 106 switches to... Figure 7 During the process of the sub-menu interface 106 shown in b, the mobile phone 1 displays the network identifier corresponding to the card slot 2, and can distinguish the card type of the SIM card that the mobile phone 1 is using in the UI interface according to the network identifier.

[0105] Specifically, during the switching process between the physical SIM card and the eSIM card, the display time of the first network identifier and the second network identifier can be set to explain how the UI interface maintains the display of the network identifier corresponding to card slot 2. Combined with... Figure 5 The following explanation is provided: Figure 5 As shown, assume that the time it takes for QCRIL to send a power-down command for the physical SIM card in response to the switching command for SIM slot 2 is t1; the time it takes for the modem to send a feedback message to QCRIL indicating successful power-down of the physical SIM card is t2; the time it takes for the modem to send a feedback message indicating successful switching between the physical SIM card and the eSIM card is t3; and the time it takes for the modem to send a feedback message indicating successful power-on of the eSIM card is t4.

[0106] Specifically, before receiving a handover message (i.e., before t1), the UI displays the first network identifier; in response to the handover message, starting at time t1, QCRIL triggers the UI to display the second network identifier. Alternatively, before the physical SIM card is successfully powered off (i.e., before t2), the UI displays the first network identifier; in response to feedback that the physical SIM card has successfully powered off, starting at time t2, QCRIL triggers the UI to display the second network identifier. Alternatively, before successfully switching between the physical SIM card and eSIM card (i.e., before t3), the UI displays the first network identifier; in response to feedback that the switch has successfully switched, starting at time t3, QCRIL triggers the UI to display the second network identifier. Alternatively, before the eSIM card is successfully powered on (i.e., before t4), the UI displays the first network identifier; in response to feedback that the eSIM card has successfully powered on, starting at time t4, QCRIL triggers the UI to display the second network identifier. Therefore, during the switching process between the physical SIM card and the eSIM card, the network identifier displayed on the UI interface changes from the first network identifier to the second network identifier, while maintaining the network identifier corresponding to card slot 2.

[0107] In some embodiments, if the data service of mobile phone 1 is currently carried by the physical SIM card corresponding to slot 2, during the process of switching the physical SIM card of slot 2 to the eSIM card, QCRIL can automatically obtain the data traffic limit of the eSIM card after intercepting the modem's card status message. This data traffic limit can be set by the user according to their needs and stored in the phone. If mobile phone 1 determines that the eSIM card has reached its data traffic limit, it can switch the data service to be carried by the SIM card in slot 1, avoiding exceeding the eSIM card's data traffic limit by continuing to use the eSIM card for data services.

[0108] In some embodiments, such as Figure 8 As shown, after automatically obtaining the data traffic limit of the eSIM card, mobile phone 1 can also display a prompt message 801 on its interface, asking the user whether to switch the primary data service SIM card to the physical SIM card corresponding to SIM card slot 1. Here, the primary data service SIM card is the SIM card that carries the phone's data services. The user can choose whether to switch the primary data service SIM card to the physical SIM card corresponding to SIM card slot 1 by selecting either button "Yes" 802 or button "No" 803. This makes the switching of the primary data service SIM card more responsive to the user's needs.

[0109] In the technical solution provided in this application embodiment, during the switching process between the physical SIM card and eSIM card of the target SIM card interface, card status messages can be intercepted and not reported to the UI interface. This ensures that the UI interface continues to display the network identifier of the target SIM card interface, making the switching process between the physical card and eSIM seamless for the UI interface. Furthermore, when the current data service is carried by the SIM card within the target SIM card interface, the system prevents the data service from switching to be carried by the SIM card corresponding to another SIM card interface.

[0110] The method proposed in this application can be applied to any electronic device that supports physical SIM cards and eSIM cards. For example, the electronic device can specifically be a mobile phone, tablet computer, personal computer (PC), smart screen, artificial intelligence (AI) speaker, in-vehicle infotainment system, and wearable terminal devices such as smartwatches. It can also be various teaching aids (e.g., learning machines, early education machines), smart toys, portable robots, personal digital assistants (PDAs), augmented reality (AR) devices, virtual reality (VR) devices, etc., or devices with mobile office functions, smart home functions, audio-visual entertainment functions, or devices supporting smart travel. It should be understood that the embodiments of this application do not limit the specific technology or device form used in the terminal device.

[0111] like Figure 9 The diagram shows a structural schematic of an electronic device 100 provided in an embodiment of this application. For example, the electronic device may be the aforementioned mobile phone 1. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, buttons 190, a motor 191, a camera 192, a display screen 193, and a SIM card interface 194, etc. The sensor module 180 may include a pressure sensor 180A, a touch sensor 180B, etc.

[0112] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0113] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. For example, processor 110 is used to execute the SIM card power-on method in the embodiments of this application.

[0114] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0115] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0116] USB interface 130 is an interface that conforms to the USB standard specification, specifically it can be a Mini USB interface, Micro USB interface, USB Type C interface, etc. USB interface 130 can be used to connect a charger to charge electronic device 100, and it can also be used for data transfer between electronic device 100 and peripheral devices.

[0117] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120.

[0118] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121.

[0119] In addition, the internal memory 121 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, universal flash storage (UFS), etc.

[0120] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130.

[0121] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 193, camera 192, and wireless communication module 160, etc.

[0122] In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be located in the same device.

[0123] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, and modem processor, etc.

[0124] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0125] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.

[0126] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as Wi-Fi), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR). The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0127] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.

[0128] Electronic device 100 can implement audio functions through audio module 170 and application processor, such as music playback and recording.

[0129] The audio module 170 is used to convert digital audio signals into analog audio signals for output, and also to convert analog audio inputs into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0130] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A may be disposed on display screen 193. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 193, electronic device 100 detects the touch operation intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A.

[0131] Touch sensor 180B, also known as a "touch panel," can be located on display screen 193. The touch sensor 180B and display screen 193 together form a touchscreen, also known as a "touch screen." Touch sensor 180B is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 193. In other embodiments, touch sensor 180B may also be located on the surface of electronic device 100, in a different position than display screen 193.

[0132] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0133] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.

[0134] Camera 192 is used to capture still images or videos. In some embodiments, electronic device 100 may include one or N cameras 192, where N is a positive integer greater than 1.

[0135] Electronic device 100 implements display functions through a GPU, a display screen 193, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 193 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0136] The display screen 193 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include one or N display screens 193, where N is a positive integer greater than 1.

[0137] The SIM card interface 194 is used to connect a SIM card. The physical SIM card can be inserted into or removed from the SIM card interface 194, thus enabling contact and separation between the physical SIM card and the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1.

[0138] In some embodiments, the electronic device 100 may employ an eSIM card 195. Taking an example where the software interface of one card slot in the electronic device 100 supports both physical SIM cards and eSIM cards, the SIM card interface 194 corresponding to that card slot's software interface shares a switch connected to the processor 110 with the eSIM card 195. The electronic device 100 may support one or more eSIM cards.

[0139] The SIM card switching methods described in the above embodiments can all be implemented in the electronic device 100 with the above hardware structure.

[0140] Other embodiments of this application provide an electronic device (such as mobile phone 1). The electronic device may include one or more SIM card interfaces, a memory, and one or more processors. The memory and a plurality of SIM card interfaces are coupled to the processors respectively. The one or more card interfaces are used to insert and connect physical SIM cards. The electronic device also includes one or more eSIM cards, each eSIM card corresponding to one SIM card interface. The memory is also used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device can perform various functions or steps performed by the mobile phone in the above method embodiments. The structure of the electronic device can be referred to... Figure 9 The structure of the electronic device 100 shown.

[0141] In some embodiments, the processing of the electronic device includes a modem. One or more SIM card interfaces are coupled to the modem. The modem is used to power on / off the physical SIM card and / or eSIM card.

[0142] This application also provides a chip system, such as... Figure 10As shown, the chip system 120 includes at least one processor 1201 and at least one interface circuit 1202. The processor 1201 and the interface circuit 1202 are interconnected via lines. For example, the interface circuit 1202 can be used to receive signals from other devices (e.g., a computer's memory). As another example, the interface circuit 1202 can be used to send signals to other devices (e.g., the processor 1201). Exemplarily, the interface circuit 1202 can read instructions stored in memory and send those instructions to the processor 1201. When the instructions are executed by the processor 1201, the computer can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, which are not specifically limited in this application embodiment.

[0143] This application also provides a computer-readable storage medium including computer instructions that, when executed on the aforementioned electronic device (such as a mobile phone), cause the electronic device to perform various functions or steps performed by the mobile phone in the above method embodiments.

[0144] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps performed by the mobile phone in the above method embodiments. The computer can be an electronic device, such as a mobile phone.

[0145] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0146] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0147] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0148] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0149] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0150] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for switching SIM cards in a user identification module, characterized in that, The method is applied to an electronic device, the electronic device including one or more SIM card interfaces for inserting a physical SIM card, wherein a target SIM card interface of the one or more SIM card interfaces is associated with an embedded eSIM card, the method comprising: The first interface is displayed, which includes the network identifier corresponding to the target SIM card interface. The first interface also includes a first setting item and a second setting item. The first setting item in the first interface indicates that the electronic device is using the first SIM card, and the second setting item in the first interface indicates that the second SIM card is not being used. Of the first SIM card and the second SIM card, one SIM card is the physical SIM card inserted into the target SIM card interface, and the other is the eSIM card associated with the target SIM card interface. In response to the selection of the second setting item in the first interface, interception is enabled to intercept the first card status message of the target SIM card interface, and the second interface is displayed. The second interface includes the network identifier corresponding to the target SIM card interface. The first setting item in the second interface indicates that the first SIM card is not in use, and the second setting item in the second interface indicates that the electronic device is using the second SIM card. Wherein, the first card status message indicates that the first SIM card has been lost, and is used to update the network identifier corresponding to the target SIM card interface displayed by the electronic device; the update includes not displaying the network identifier corresponding to the target SIM card interface; or, not displaying the network identifier corresponding to the target SIM card interface, but displaying a prompt message to indicate that the first SIM card has been lost; after the first card status message is intercepted, during the process of the electronic device switching from the first interface to the second interface, the electronic device continues to display the network identifier corresponding to the target SIM card interface.

2. The method according to claim 1, characterized in that, The method further includes: After the target SIM card interface successfully switches SIM cards, the interception of the card status message of the target SIM card interface is canceled, and the second card status message of the target SIM card interface is not intercepted; wherein, the second card status message indicates that the second SIM card is recognized.

3. The method according to claim 1 or 2, characterized in that, The one or more SIM card interfaces are at least two SIM card interfaces, and the at least two SIM card interfaces include the target SIM card interface; the method further includes: The data service of the electronic device is currently carried by the first SIM card corresponding to the target SIM card interface. In response to the selection operation, after interception is enabled to intercept the first card status message of the target SIM card interface, the data service of the electronic device is carried by the second SIM card corresponding to the target SIM card interface.

4. The method according to claim 1 or 2, characterized in that, The step of enabling interception to intercept the first card status message of the target SIM card interface in response to the selection operation of the second setting item in the first interface includes: In response to the selection operation, a SIM switching message for the target SIM card interface is generated, and interception is enabled based on the SIM switching message to intercept the first card status message of the target SIM card interface.

5. The method according to claim 4, characterized in that, The step of enabling interception based on the SIM switching message to intercept the card status message of the target SIM card interface includes: Based on the SIM switching message, the first flag bit of the target SIM card interface is set to a first preset value; wherein, the first flag bit being the first preset value indicates that the target SIM card interface is switching SIM cards and interception is enabled; Upon receiving the first card status message from the target SIM card interface, if the first flag bit is read as the first preset value, then the first card status message from the target SIM card interface is intercepted.

6. The method according to claim 4, characterized in that, The method further includes: Based on the SIM switching message, the first SIM card is powered down; wherein, the power-down of the first SIM card triggers the first card status message; In response to the successful power-down of the first SIM card, the SIM card corresponding to the target SIM card interface is switched to be powered on for the second SIM card; the successful power-on of the second SIM card indicates that the target SIM card interface has successfully switched SIM cards. During the process from the first SIM card being powered off to the second SIM card being powered on, the electronic device continuously displays the network identifier corresponding to the target SIM card interface.

7. The method according to claim 2, characterized in that, After the target SIM card interface successfully switches SIM cards, the interception of the card status messages of the target SIM card interface is stopped, and the second card status message of the target SIM card interface is not intercepted, including: After the target SIM card interface successfully switches SIM cards, the first flag bit of the target SIM card interface is set to a second preset value; the first flag bit being the second preset value indicates that the interception has been cancelled. Upon receiving the second card status message from the target SIM card interface, if the first flag bit is read as the second preset value, then the second card status message from the target SIM card interface will not be intercepted.

8. The method according to claim 1 or 2, characterized in that, The network identifier corresponding to the target SIM card interface in the first interface is the first network identifier, and the first network identifier corresponds to the first SIM card; The network identifier corresponding to the target SIM card interface in the second interface is the second network identifier, and the second network identifier corresponds to the second SIM card.

9. An electronic device, characterized in that, The electronic device includes: a processor, a memory, and one or more SIM card interfaces; the memory and the one or more SIM card interfaces are respectively coupled to the processor; The one or more SIM card interfaces are used to insert physical SIM cards; the electronic device further includes one or more eSIM cards, each eSIM card corresponding to a SIM card interface; the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the method as described in any one of claims 1-8.

10. The electronic device according to claim 9, characterized in that, The processor includes a modem; the modem is used to power on / off the physical SIM card and / or the eSIM card.

11. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-8.