SIM card drop card rescue method, electronic equipment and storage medium

By enabling SIM card recovery processes that are triggered autonomously by electronic devices, and combining initial and repeated recovery mechanisms, the problem of communication interruption caused by lost SIM cards is solved, improving recovery efficiency and user experience.

CN119966431BActive Publication Date: 2026-02-10HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311439288.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2026-02-10
Estimated Expiration
2043-10-31

AI Technical Summary

Technical Problem

When a SIM card is lost, electronic devices cannot communicate normally. Current technology requires manual handling by the user, resulting in long communication interruption times and a poor user experience.

Method used

The electronic device autonomously triggers the SIM card recovery process, judges the SIM card feedback status through the initial recovery, and performs different numbers of repeated recovery attempts based on the feedback results, including the first repeated recovery attempt and the second repeated recovery attempt. It performs targeted recovery for different reasons for SIM card loss and prompts the user to manually operate after failure.

Benefits of technology

It improves the efficiency of recovering lost SIM cards, ensures that electronic devices can quickly restore normal communication, reduces power consumption, and promptly prompts users to handle the issue manually, thus enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119966431B_ABST
    Figure CN119966431B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of electronic devices, and provides a SIM card drop-out rescue method, an electronic device and a storage medium, which are applied to an electronic device supporting a subscriber identity module (SIM) card. The method comprises the following steps: after a SIM card is dropped, performing initial rescue on the SIM card; receiving a reset answer message (ATR) fed back by the SIM card within a preset time length, performing card identification on the SIM card, and performing first repeated rescue on the SIM card after the card identification fails; not receiving the ATR fed back by the SIM card within the preset time length, and performing second repeated rescue on the SIM card; wherein the first repeated rescue and the second repeated rescue each comprise one or more rescues until the SIM card returns to normal or the number of rescues reaches a preset number; and the number of the first repeated rescue is more than that of the second repeated rescue. The method can automatically trigger rescue by the electronic device after the SIM card is dropped, and can improve the rescue efficiency compared with waiting for the user to find the problem and manually rescuing the card.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic device technology, and in particular to a method for recovering a lost SIM card, an electronic device, and a storage medium. Background Technology

[0002] A Subscriber Identity Module (SIM) card is an integrated circuit card used to store and manage user information for mobile communication devices. Electronic devices must successfully connect to the SIM card to enjoy services provided by network operators, ensuring normal communication.

[0003] However, SIM cards can be lost for various reasons during daily use, and once lost, users have to wait for the problem to be discovered and resolved, resulting in electronic devices being unable to communicate normally for an extended period and degrading the user's communication experience. Therefore, there is an urgent need for a method to recover lost SIM cards that can improve the efficiency of SIM card recovery and ensure the rapid restoration of normal communication for electronic devices. Summary of the Invention

[0004] This application provides a method for recovering a lost SIM card, an electronic device, and a storage medium, which are used to recover a lost SIM card in a timely manner and ensure that the electronic device can resume normal communication as soon as possible.

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

[0006] Firstly, a method for recovering a lost SIM card is provided, applicable to an electronic device that supports a User Identification Module (SIM) card. The method includes: after the SIM card is lost, performing an initial recovery attempt; if a reset response message (ATR) is received from the SIM card within a preset time period, the SIM card is identified; if identification fails, a first repeated recovery attempt is performed; wherein the first repeated recovery attempt includes one or more recovery attempts until the SIM card returns to normal or the number of attempts reaches m; if no ATR is received from the SIM card within the preset time period, a second repeated recovery attempt is performed; wherein the second repeated recovery attempt includes one or more recovery attempts until the SIM card returns to normal or the number of attempts reaches n; n < m, where n and m are positive integers.

[0007] Therefore, this method, where the electronic device autonomously triggers SIM card recovery after a SIM card loss, improves recovery efficiency compared to waiting for the user to manually recover the card. During the recovery process, the electronic device first determines whether it can obtain the SIM card's ATR (Automatic Transfer Rate) feedback. Based on the ATR reception, the cause of the SIM card loss is determined, and different numbers of repeated recovery attempts are performed for different causes, further improving recovery efficiency and ensuring a quicker restoration of normal communication. Moreover, the limited number of repeated recovery attempts avoids increased power consumption caused by continuous SIM card recovery by the electronic device.

[0008] In one possible implementation of the first aspect, if the SIM card is still in a lost card state after the first repeated SIM card recovery is completed, a first prompt message is output; wherein, the first prompt message is used to remind the user that the SIM card is damaged and needs to be replaced in time.

[0009] In another possible implementation of the first aspect, if the SIM card is still in a lost state after the second repeated SIM card recovery is completed, a second prompt message is output; wherein the second prompt message is used to prompt the user to reinstall the SIM card.

[0010] In this implementation, after repeated failed SIM card recovery attempts for different reasons, the electronic device outputs corresponding prompts to promptly remind the user to manually recover the card. This ensures timely SIM card recovery after automatic recovery fails, allowing for a quick restoration of normal communication. Furthermore, generating corresponding prompts for different reasons of SIM card loss accurately guides the user on how to recover the card, further improving recovery efficiency.

[0011] In one possible implementation of the first aspect, card identification is for configuring the SIM card; therefore, SIM card identification may include reading the SIM card's key card configuration file. Thus, performing SIM card identification and a first attempt to recover the SIM card after identification failure may include: reading the SIM card's key card configuration file; if the key card configuration file reading is abnormal, then performing a first attempt to recover the SIM card; furthermore, the method may also include: if the key card configuration file reading is normal, then stopping the recovery process.

[0012] In one possible implementation of the first aspect, to ensure accurate card recovery under the constraint of m times, repeated card recovery can be performed by accumulating the number of recovery attempts. Performing the first repeated card recovery on the SIM card can include: accumulating one first recovery attempt for each SIM card recovery attempt; if the first recovery attempt reaches m times, or if the SIM card recovers after one recovery attempt, then clearing the first recovery attempt count and stopping the recovery process.

[0013] In one possible implementation of the first aspect, to ensure accurate card recovery under the constraint of n times, repeated card recovery can be performed by accumulating the number of recovery attempts. Performing a second repeated card recovery on the SIM card includes: accumulating one second recovery attempt for each SIM card recovery attempt; if the second recovery attempt reaches n times, or if the SIM card recovers after one recovery attempt, then clearing the second recovery attempt count and stopping the recovery process.

[0014] In one possible implementation of the first aspect, performing a second repeated card recovery on the SIM card may further include: performing a card recovery on the SIM card once when the first card recovery time interval is i times the second card recovery time interval; where i≥2; the first card recovery time interval is the time interval between the current time and the corresponding previous card recovery time; the second card recovery time interval is the time interval between the current time and the previous two card recovery times.

[0015] In this implementation, during the second repeated card recovery process, the SIM card is repeatedly recovered in a progressive manner. For cases where poor contact leads to card loss, the SIM card can be given a certain amount of reaction time to prevent ineffective and frequent card recovery, thereby reducing the power consumption of card recovery and improving the success rate of card recovery.

[0016] In one possible implementation of the first aspect, powering on can reset the SIM card that triggered the card loss, because recovering the SIM card can include powering on the SIM card.

[0017] Secondly, this application provides an electronic device, comprising: one or more processors, a memory, and a SIM card interface, wherein the memory and the SIM card interface are respectively coupled to the processor; the SIM card interface is used to install a SIM card; the memory stores one or more computer program codes, the computer program codes including computer instructions; when the processor executes the computer instructions, the electronic device performs the following steps:

[0018] After a SIM card is lost, an initial recovery attempt is made. If a reset response message (ATR) is received from the SIM card within a preset time period, the SIM card is identified. If identification fails, a first repeated recovery attempt is made. This first repeated recovery attempt includes one or more recovery attempts until the SIM card is restored to normal or the number of attempts reaches m. If no ATR is received from the SIM card within the preset time period, a second repeated recovery attempt is made. This second repeated recovery attempt includes one or more recovery attempts until the SIM card is restored to normal or the number of attempts reaches n, where n < m, and n and m are positive integers.

[0019] In one possible implementation of the second aspect, when the aforementioned computer instructions are executed by the processor, the electronic device further performs the following steps: after the first repeated card recovery is completed, if the SIM card is still in a lost card state, a first prompt message is output; wherein, the first prompt message is used to remind the user that the SIM card is damaged and needs to be replaced in time.

[0020] In one possible implementation of the second aspect, when the aforementioned computer instructions are executed by the processor, the electronic device further performs the following steps: after the second repeated card recovery is completed, if the SIM card is still in a lost card state, a second prompt message is output; wherein the second prompt message is used to prompt the user to reinstall the SIM card.

[0021] In one possible implementation of the second aspect, when the aforementioned computer instructions are executed by the processor, the electronic device further performs the following steps: reading the key card configuration file of the SIM card; if the key card configuration file reading is abnormal, performing a first duplicate card recovery on the SIM card; if the key card configuration file reading is normal, stopping the card recovery.

[0022] In one possible implementation of the second aspect, when the aforementioned computer instructions are executed by the processor, the electronic device further performs the following steps: each time a SIM card is rescued, a first rescue count is accumulated; if the first rescue count reaches m times, or if the SIM card recovers after a rescue, the first rescue count is cleared and the rescue process stops.

[0023] In one possible implementation of the second aspect, when the aforementioned computer instructions are executed by the processor, the electronic device further performs the following steps: each time a SIM card is rescued, a second rescue count is accumulated; if the second rescue count reaches n times, or if the SIM card recovers after a rescue, the second rescue count is cleared and the rescue process stops.

[0024] In one possible implementation of the second aspect, when the aforementioned computer instructions are executed by the processor, the electronic device further performs the following steps: when the first card recovery time interval is i times the second card recovery time interval, a card recovery is performed on the SIM card; where i ≥ 2; the first card recovery time interval is the time interval between the current time and the corresponding previous card recovery time; the second card recovery time interval is the time interval between the current time and the previous two card recovery times.

[0025] In one possible implementation of the second aspect, when the aforementioned computer instructions are executed by the processor, the electronic device further performs the following steps: powering on the SIM card.

[0026] In one possible implementation of the second aspect, the processor includes a modem. The modem performs the first aspect described above and any of its possible methods for recovering a lost SIM card.

[0027] Thirdly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor in an electronic device, causes the electronic device to perform a SIM card recovery method as described in the first aspect and any possible design thereof.

[0028] Fourthly, this application provides a computer program product that, when run on a computer, causes the computer to perform the method described in the first aspect and any of its possible design embodiments. The computer may be the aforementioned electronic device. It is understood that the beneficial effects achieved by the electronic device of any of the possible design embodiments of the second aspect, the computer-readable storage medium of the third aspect, and the computer program product of the fourth aspect can be referenced to the beneficial effects described in the first aspect and any of its possible design embodiments, and will not be repeated here. Attached Figure Description

[0029] Figure 1 This is an application scenario one of the SIM card recovery methods provided in the embodiments of this application;

[0030] Figure 2 This is a second application scenario of a SIM card recovery method provided in the embodiments of this application;

[0031] Figure 3 This is a schematic diagram of an interface for a lost SIM card provided in an embodiment of this application;

[0032] Figure 4 A flowchart illustrating a method for recovering a lost SIM card provided in this application embodiment. Figure 1 ;

[0033] Figure 5 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of this application;

[0034] Figure 6 A flowchart illustrating a method for recovering a lost SIM card provided in this application embodiment. Figure 2 ;

[0035] Figure 7 A flowchart illustrating a method for recovering a lost SIM card provided in this application embodiment. Figure 3 ;

[0036] Figure 8 This is a schematic diagram of an interface for providing a first prompt message, as provided in an embodiment of this application.

[0037] Figure 9 This is a schematic diagram of an interface for a second prompt message provided in an embodiment of this application;

[0038] Figure 10 A flowchart illustrating a method for recovering a lost SIM card provided in this application embodiment. Figure 4 ;

[0039] Figure 11 This is a structural block diagram of a chip system provided in an embodiment of this application. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will now be clearly and completely described with reference to the accompanying drawings. In the description of the embodiments of this application, the terminology used is for the purpose of describing specific embodiments only and is not intended to limit the application. Furthermore, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and that "first," "second," etc., are not necessarily different. Also, in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0041] Currently, in order for electronic devices to successfully establish a connection with a SIM card and enjoy the services provided by network operators, and to ensure normal communication of the electronic devices, the SIM card to be used needs to be powered on.

[0042] An electronic device powers on the SIM card either when the device is turned on or when the user activates the SIM card. For example, let's take a mobile phone as an example. Figure 1 The image shows a scenario where phone 1 is powered on. Figure 2 This illustrates a scenario where a user triggers SIM card activation.

[0043] refer to Figure 1 With phone 1 powered off, press and hold the power button 11 to power on phone 1. After phone 1 is powered on, it can power on the SIM card installed in phone 1.

[0044] refer to Figure 2 When phone 1 is powered on, it can display... Figure 2 The main interface 200 is shown. This main interface 200 includes application icons for applications such as "Clock", "Calendar", "Gallery", "Notes", etc., and "Settings". In response to the user's trigger operation on the "Settings" application icon 201 in the main interface 200, the mobile phone 1 enters the settings application and displays the settings application interface 202.

[0045] The settings application interface 202 can include multiple settings options, such as WLAN, Bluetooth, mobile network, and more connection settings. In response to the user selecting the mobile network option 203 in the settings application interface 202, mobile phone 1 can enter the mobile network interface 204.

[0046] The mobile network interface 204 may include multiple settings options, such as airplane mode, mobile data, SIM card management, and personal hotspot settings. In response to the user selecting the SIM card management option 205 in the mobile network interface 204, the mobile phone 1 can enter the SIM card management interface 206.

[0047] In the SIM card management interface 206, the user can select the SIM card to be enabled. Two SIM cards are displayed in this interface. This can be understood as... Figure 2 The mobile phone 1 shown supports dual SIM cards. Then, in response to the user selecting the SIM card 2 option 207 in the SIM card management interface 206, the mobile phone 1 can enter the SIM card 2 interface 208.

[0048] The SIM card 2 interface 208 includes the option to enable this number, as well as information about the SIM card 2, such as the phone number, carrier services, etc. In response to the user's selection of enabling this number 209 on the SIM card 2 interface 208, the mobile phone 1 powers on the SIM card 2.

[0049] It should be noted that, Figure 2 The process shown is only one way for a user to enable the SIM card. In other embodiments, the user can also enable the SIM card in other ways.

[0050] However, during the process of powering on the SIM card, the electronic device may fail to power on the SIM card due to poor contact, improper insertion (not inserted or inserted incorrectly), or other reasons. Alternatively, even after successfully powering on the SIM card, the SIM card may fail to power on again due to issues such as corrupted key card configuration files or malfunctions in the SIM card-related hardware of the electronic device.

[0051] If the SIM card fails to power on or experiences an abnormal power-off after a successful power-on, the electronic device will experience a SIM card loss. For example, using a mobile phone... Figure 3 A schematic diagram of the interface when a SIM card is lost is provided.

[0052] refer to Figure 3 When a phone experiences a SIM card loss, the area in the status bar that previously displayed signal bars will now show a "No SIM Card" message. (Reference) Figure 3 Figure a in the image illustrates a scenario where all SIM cards in a mobile phone (which can support single or dual SIM cards) are lost. (Reference) Figure 3 Figure b in the diagram illustrates a scenario where only one SIM card in a dual-SIM phone is lost. That is, for a dual-SIM phone, if only one SIM card is lost, it can display "No SIM Card" and a normal signal bar to indicate the lost SIM card.

[0053] In some embodiments, the mobile phone supports dual SIM cards, and SIM cards are inserted into both SIM card slots. In this scenario, if one SIM card in a dual-SIM phone is working properly, but the other SIM card is lost, the phone may display an error message such as... Figure 3 The image in Figure c shows the network identifier for one SIM card, but does not show the network identifier for the other SIM card.

[0054] It should be noted that the "No SIM card" display message includes, but is not limited to, those displayed in other ways. Figure 3 As shown in the image. For example, "No SIM card" can also be displayed in the phone's notification bar or other locations.

[0055] Currently, if an electronic device experiences a SIM card loss, the only recourse is for the user to discover it and manually recover the card. However, during the period when the SIM card is lost, the electronic device is essentially in a state without a SIM card. Therefore, the longer the SIM card is lost, the longer the electronic device will be unable to communicate normally. This can easily lead to prolonged periods of unreliable communication, degrading the user's communication experience. For example, the electronic device may be unable to enjoy all services provided by the network operator, including receiving call reminders, SMS notifications, application information notifications, and application service push notifications from other electronic devices.

[0056] Therefore, in order to improve the efficiency of SIM card recovery and restore normal communication of electronic devices as quickly as possible, this application provides a method for recovering a lost SIM card. This method is applied to an electronic device that supports SIM cards (e.g., mobile phones, tablets, smartwatches, etc. that support SIM cards). That is, after a SIM card is lost, the electronic device triggers recovery logic and executes the SIM card recovery method provided in this application.

[0057] like Figure 4 The diagram illustrates a method for recovering a lost SIM card. The following section, in conjunction with electronic devices and... Figure 4 The flowchart shown provides a simple explanation of the SIM card recovery method provided in the embodiments of this application.

[0058] Specifically, after detecting that the SIM card has been lost (including power-on failure or power-on success followed by abnormal power-off), the electronic device first triggers an initial SIM card recovery (i.e., the first recovery after the card has been lost).

[0059] After the electronic device completes the initial SIM card recovery, it waits for the SIM card to send a reset response message (ATR). The ATR is a sequence of bytes. When the SIM card receives a reset command, it can return an ATR to the sender of that command; these bytes represent the SIM card's response to the reset command. In other words, because the electronic device is in a SIM-less state after the SIM card is lost, the recovery operation performed by the electronic device can be simply viewed as sending a command to the SIM card to reset it. Therefore, if the electronic device sends a reset command to the SIM card through the SIM card interface (e.g., powering on the SIM card through the SIM card interface) to recover the SIM card, and the SIM card is properly connected to the electronic device, the SIM card will typically send a corresponding ATR back to the electronic device through the SIM card interface.

[0060] Whether the SIM card can send an ATR (Automatic Transfer Record) to the electronic device can be used to indicate the reason why the SIM card was lost.

[0061] If the electronic device receives an ATR (Automatic Transfer Record) from the SIM card within a preset time after the initial SIM card recovery attempt, it means the SIM card is responding to the recovery action. This allows the electronic device to rule out issues such as poor SIM card contact or incorrect insertion. At this point, the initial SIM card recovery can be considered successful. Furthermore, to further determine the cause of the SIM card loss and to complete the SIM card configuration to ensure normal communication with the SIM card in the future, the electronic device will then begin the SIM card identification process.

[0062] If the electronic device fails to recognize the SIM card, meaning that although the SIM card responds to the initial recovery operation but cannot complete further configuration on the device, the SIM card is still unusable. This indicates that the SIM card may have a problem with its critical configuration file or a hardware malfunction related to the SIM card in the electronic device. In this situation, the electronic device will still detect the SIM card as lost.

[0063] Then, the electronic device triggers another SIM card recovery attempt. In this embodiment, for a SIM card loss issue that occurs during the card identification process after receiving the ATR, the electronic device triggers a first repeated SIM card recovery attempt. The number of times the first repeated SIM card recovery attempt is made does not exceed m.

[0064] If the electronic device does not receive an ATR (Automatic Transfer Rate) from the SIM card after the initial SIM card recovery attempt, meaning the SIM card does not respond to the recovery action, it's highly likely that the SIM card has issues such as poor contact or incorrect insertion (e.g., the SIM card is inserted backwards, or the wrong card is inserted). Therefore, the lack of an ATR from the SIM card indicates a potential problem, such as poor contact or incorrect insertion. Consequently, the electronic device triggers a second, repeated SIM card recovery attempt. This second attempt can be performed no more than n times.

[0065] In this context, both the second and first repeated SIM card recovery operations refer to the electronic device performing repeated SIM card recovery operations, differing only in the triggering event and the number of recovery attempts. In this embodiment, the number of recovery attempts (n) for the second repeated SIM card recovery is less than the number of recovery attempts (m) for the first repeated SIM card recovery, i.e., n < m.

[0066] Because problems such as poor SIM card contact or incorrect insertion usually indicate that the SIM card is not properly installed in the electronic device, the device generally cannot recover these issues by recovering the SIM card itself. Therefore, to conserve power during SIM card recovery, the second SIM card recovery attempt is set to have fewer attempts than the first.

[0067] Therefore, it can be seen that in this embodiment of the application, the electronic device automatically triggers card recovery after the SIM card is lost, which can improve the efficiency of card recovery compared to waiting for the user to discover the problem and manually recover the card.

[0068] Meanwhile, during the SIM card recovery process, the electronic device first determines whether it can obtain the SIM card's ATR (Automatic Transfer Rate) through an initial recovery attempt. Based on the ability to receive the ATR, the cause of the SIM card loss is determined. Then, different numbers of recovery attempts are performed for different causes, further improving recovery efficiency and ensuring a rapid restoration of normal communication. Moreover, a limited number of recovery attempts avoids increased power consumption caused by continuous recovery efforts.

[0069] It should be understood that the SIM card recovery method proposed in this application can be applied to any electronic device that supports SIM card installation. This electronic device can be, in addition to mobile phones, tablets, personal computers (PCs), smart screens, artificial intelligence (AI) speakers, in-vehicle systems, and wearable 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., and can also be 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.

[0070] refer to Figure 5 This application embodiment illustrates a schematic diagram of the structure of an electronic device 100. 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.

[0071] 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.

[0072] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor (i.e., a modem), 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. Specifically, in this application, processor 110 (which may be a modem processor) is used to execute the SIM card recovery method for lost SIM cards in the embodiments of this application.

[0073] 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.

[0074] The processor 110 may also include a memory for storing instructions and data. For example, it may store the number of times a card has been repeatedly retrieved. 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 being 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 processor 110's waiting time, and thus improves system efficiency.

[0075] 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.

[0076] 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.

[0077] 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.

[0078] 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.

[0079] 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.

[0080] 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.

[0081] 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.

[0082] The wireless communication function of electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, and modem processor (i.e., modem).

[0083] 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 a tuning switch.

[0084] 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.

[0085] 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, 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.

[0086] 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.

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

[0088] 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.

[0089] 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.

[0090] 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.

[0091] 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.

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

[0093] 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.

[0094] 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.

[0095] 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.

[0096] The SIM card interface 194 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 194 to achieve contact and separation with 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.

[0097] The methods for recovering a lost SIM card in the following embodiments can all be implemented in the electronic device 100 with the above-described hardware structure.

[0098] The following will describe in detail the SIM card recovery method proposed in the embodiments of this application with reference to the accompanying drawings.

[0099] like Figure 6 The diagram shows a flowchart of a method for recovering a lost SIM card, applicable to electronic devices that support SIM cards, including steps S601-S615.

[0100] The following, combined with Figure 6 This application provides a detailed description of the method for recovering a lost SIM card.

[0101] S601 performs the initial SIM card recovery after the SIM card is lost.

[0102] S602, determine whether ATR has been received within a preset time period.

[0103] After detecting a lost SIM card, the electronic device first performs an initial SIM card recovery. This initial recovery can be understood as the first attempt to recover the SIM card after it has been lost. Then, the electronic device waits to receive the SIM card's ATR (Automatic Transfer Record) feedback.

[0104] In some embodiments, the waiting time for the electronic device to receive the SIM card's ATR feedback can be customized according to actual needs. Optionally, the waiting time can be set according to the standard time required for the SIM card to normally provide ATR feedback. Alternatively, the waiting time can be appropriately delayed based on the standard time. This delay provides the SIM card with more response time, eliminating the possibility of incorrect judgments due to short-term judgments.

[0105] Then, if the electronic device receives the ATR from the SIM card within the specified waiting time (i.e., the preset time), it proceeds to S603. If the electronic device does not receive the ATR from the SIM card within the specified waiting time (i.e., the preset time), it can perform a second SIM card recovery, i.e., proceed to S611.

[0106] S603 identifies the SIM card.

[0107] S604, determine if card recognition failed.

[0108] Once the electronic device receives the ATR (Automatic Transfer Record) from the SIM card, it indicates that the SIM card is currently responding successfully to the electronic device's reset command (SIM card recovery operation). In this case, there are no issues such as poor contact or improper insertion of the SIM card. The SIM card may have been successfully recovered at this point.

[0109] Furthermore, in order for the SIM card to function properly afterward, the electronic device needs to further configure the SIM card, that is, the electronic device begins to recognize the SIM card. At the same time, by recognizing the card, the electronic device can further determine whether there are other reasons for the card loss, such as abnormalities in critical configuration card files or abnormalities in the SIM card-related hardware of the electronic device.

[0110] In some embodiments, card recognition is for configuring the SIM card; therefore, SIM card recognition may include reading the SIM card's key card configuration file. If the electronic device encounters an error while reading the SIM card's key card configuration file, indicating a SIM card loss issue causing recognition failure, a first repeated card recovery operation can be performed, i.e., entering step S605.

[0111] If the electronic device successfully reads the SIM card's key card configuration file and completes the SIM card configuration based on this file, then the card recognition is successful. In other words, the electronic device has successfully completed the SIM card recognition process. No SIM card loss occurred during this process. Therefore, the SIM card is in a normal state, the initial card recovery attempt has been successful, and the electronic device enters S610, stopping the recovery process.

[0112] Depending on the actual situation of the SIM card, there may be one or more key card configuration files for the SIM card. Abnormalities in reading the key card configuration file may include: the SIM card being lost, resulting in the inability to read the key card configuration file; or the key card configuration file being read, but its contents being missing or corrupted.

[0113] The reason why a lost SIM card can prevent the reading of critical card configuration files could be due to a SIM card malfunction or a hardware issue related to the SIM card in the electronic device. The specific cause can be analyzed based on the actual application, and this application does not limit the scope of the embodiments.

[0114] S605 performs a SIM card recovery operation.

[0115] S606, the first cumulative number of card rescues.

[0116] S607, determine whether the card recovery was successful.

[0117] S608, determine whether the first card rescue attempt exceeds the preset card rescue attempt m (first card rescue attempt ≥ m).

[0118] S609, clear the first rescue card count.

[0119] S610, stop rescuing the card.

[0120] If the SIM card fails to be identified again during the SIM card recognition process, the electronic device will trigger a first repeated SIM card recovery attempt. This first repeated SIM card recovery attempt refers to the electronic device performing a second SIM card recovery attempt within a preset limit of m attempts. In other words, the electronic device cannot perform more than m attempts at the first repeated SIM card recovery attempt.

[0121] In this embodiment, the preset number of card rescue attempts m can be pre-configured based on experience and actual needs. After the preset number of card rescue attempts m is configured, it can also be changed according to actual needs.

[0122] After the electronic device enters the first repeated SIM card recovery process, it first performs a SIM card recovery attempt, and the first recovery attempt is accumulated after each recovery attempt. This first recovery attempt count refers to the total number of recovery attempts accumulated during the first repeated SIM card recovery process.

[0123] For example, if the SIM card has already been rescued three times during the first repeated SIM card recovery process, then the cumulative number of first SIM card recovery attempts is 3.

[0124] Next, since the electronic device has already performed a SIM card recovery operation, it can be determined whether the SIM card has been restored to normal operation as a result. If the SIM card is restored to normal operation, the recovery was successful. If the SIM card is still disconnected, the recovery failed.

[0125] If the card recovery is successful, proceed to step S609. After clearing the accumulated first card recovery attempts, the electronic device stops the card recovery process and ends the first repeated card recovery process.

[0126] If the SIM card recovery attempt fails, the electronic device further determines whether the current cumulative number of first recovery attempts has reached the preset number of recovery attempts m. If the number of first recovery attempts is less than m, it means that the preset number of recovery attempts m has not yet been reached, and there is still a chance to try again. In this case, the system returns to S605 to continue trying to recover the SIM card once more.

[0127] If the first card recovery count is greater than or equal to m, it means that the preset card recovery count m has been reached. In order to avoid increasing the power consumption of the phone due to continuous card recovery, the system enters S609. After clearing the accumulated first card recovery count, the electronic device stops the card recovery process and ends the first repeated card recovery process.

[0128] S611 performs a SIM card recovery operation.

[0129] S612, the second cumulative number of card rescues.

[0130] S613, determine whether the card rescue was successful.

[0131] S614, determine whether the second card rescue attempt exceeds the preset card rescue attempt number n (second card rescue attempt ≥ n).

[0132] S615, clear the second rescue card count, stop rescue card.

[0133] When the electronic device does not receive an ATR from the SIM card, it triggers a second attempt to recover the SIM card. This second attempt refers to the electronic device performing a second recovery attempt on the SIM card within a preset recovery count (n). That is, the electronic device cannot perform more than n attempts at the second recovery. The difference between the first and second attempts lies in the triggering event and the number of attempts, and n < m.

[0134] In this embodiment, the preset number of card rescue attempts n can also be pre-configured based on experience and actual needs. After the preset number of card rescue attempts n is configured, it can also be changed according to actual needs.

[0135] After the electronic device enters the second repeated SIM card recovery process, it first performs a SIM card recovery attempt, and then accumulates the second recovery attempt after each attempt. This second recovery attempt refers to the total number of recovery attempts accumulated during the second repeated recovery process. Similarly, if the electronic device has already performed two SIM card recovery attempts during the second repeated recovery process, then the accumulated first recovery attempt is 2.

[0136] Next, the electronic device can determine whether the SIM card has been restored to normal operation as a result of the recovery process. If the SIM card is restored to normal operation, the recovery is successful. If the SIM card remains disconnected, the recovery has failed.

[0137] If the card recovery is successful, proceed to step S615. After clearing the accumulated second card recovery attempts, the electronic device stops the card recovery process and ends the second repeated card recovery process.

[0138] If the SIM card recovery attempt fails, the electronic device further determines whether the current cumulative number of second recovery attempts has reached the preset number of recovery attempts n. If the number of second recovery attempts is less than n, it means that the preset number of recovery attempts n has not yet been reached, and there is still a chance to try again. In this case, the system returns to S611 to try to recover the SIM card again.

[0139] If the second card recovery count is greater than or equal to n, it means that the preset card recovery count n has been reached. In order to avoid increasing the power consumption of the mobile phone due to continuous card recovery, the process enters S615. The electronic device stops card recovery after clearing the accumulated second card recovery count, thus ending the process of the second repeated card recovery.

[0140] Therefore, it can be seen that the principle behind the first and second repeated card recovery is the same. The difference lies in the different reasons for card loss, which trigger the repeated card recovery process with different limits on the number of attempts.

[0141] In this embodiment, the electronic device automatically recovers the SIM card when it is lost. After determining the different reasons for the loss based on the ATR, the recovery is repeated a different number of times. Compared with the traditional method of waiting for the user to discover the loss and manually recover the SIM card, the recovery efficiency can be improved and the electronic device can be restored to communication as soon as possible.

[0142] Furthermore, in this embodiment of the application, the repeated card recovery is limited according to the preset number of card recovery attempts m and n, which can prevent the electronic device from continuously recovering cards after entering the repeated card recovery process, thus preventing the increase of mobile phone power consumption.

[0143] In some embodiments, such as Figure 7 The diagram shows another method for recovering a lost SIM card.

[0144] refer to Figure 7 As can be seen, the SIM card recovery method provided in this application embodiment is relatively... Figure 6 The method for recovering a lost SIM card has been improved by adding a step of outputting a prompt message.

[0145] That is, after the first repeated SIM card recovery is completed, if the SIM card is still in a lost state, the first recovery attempt will be cleared, the recovery process will stop, and the corresponding first prompt message will be output. Similarly, after the second repeated SIM card recovery is completed, if the SIM card is still in a lost state, the second recovery attempt will be cleared, the recovery process will stop, and the corresponding second prompt message will be output.

[0146] Therefore, the first prompt message is displayed when the electronic device fails to recover the SIM card after the first attempt. The second prompt message is displayed when the electronic device fails to recover the SIM card after the second attempt.

[0147] Since the first and second repeated card recovery processes are repeated card recovery processes triggered by different card loss reasons with different number of recovery attempts, the output prompt information can be generated accordingly based on the corresponding card loss reason, thereby achieving the purpose of accurate prompting.

[0148] Therefore, the first message can be used to inform the user that the SIM card is damaged and needs to be replaced promptly. Since the second message addresses SIM card recovery when the ATR (Automatic Transfer Record) is unavailable, the main problem with a lost SIM card is poor contact or improper insertion. Therefore, the second message can primarily be used to prompt the user to reinstall the SIM card.

[0149] For example, refer to Figure 8 and Figure 9 The first and second prompt messages can be displayed as pop-ups on the interface of the electronic device.

[0150] It should be noted that, Figure 8 and Figure 9 The display of the prompt message in the pop-up window shown does not constitute a limitation of this application. For example, the first and second prompt messages can also be displayed to the user on the lock screen, in the notification center, or as a banner.

[0151] In this embodiment, after repeated failed SIM card recovery attempts for different reasons, the electronic device outputs corresponding prompts to promptly remind the user to manually recover the SIM card. This allows for timely SIM card recovery by prompting the user after automatic recovery fails, ensuring a quick restoration of normal communication. Furthermore, generating corresponding prompts for different reasons of SIM card loss accurately guides the user on how to recover the card, further improving recovery efficiency.

[0152] In some embodiments, when recovering a SIM card without receiving feedback from the ATR (Automatic Transfer Record), the cause of the card loss is most likely a temporary contact failure. In this case, frequently performing repeated SIM card recovery attempts is not very effective and only increases power consumption.

[0153] Therefore, the second method of recovering a duplicate SIM card can be done in a gradual manner.

[0154] refer to Figure 10 The flowchart illustrates a method for recovering a lost SIM card in a progressive manner through repeated attempts.

[0155] That is, in the second repeated SIM card recovery process described in the above embodiment, except for the first SIM card recovery, the electronic device needs to further determine whether the first SIM card recovery time interval is i times the second SIM card recovery time interval for each subsequent SIM card recovery. Where i≥2, it can be customized according to experience and needs.

[0156] The first card-saving interval is the time interval between the current time and the corresponding time of the previous card-saving event. The second card-saving interval is the time interval between the current time and the two previous card-saving events.

[0157] For example, in the second repeated card rescue process, assume that three card rescues have already been performed, and i = 2. Furthermore, the time of the second card rescue was 10:30:20, the time of the third card rescue was 10:30:30, and the current time is 10:30:35. Therefore, the time interval for the first card rescue is 5 seconds, and the time interval for the second card rescue is 10 seconds.

[0158] At this point, the first card recovery time interval is not twice the second card recovery time interval, so the electronic device needs to wait until the first card recovery time interval is twice the second card recovery time interval before performing a fourth card recovery on the SIM card.

[0159] In other words, in the second repeated card-saving process, the time interval between each card saving can increase exponentially. Taking i=2 as an example, the card can be saved in the order of 5s, 10s, 20s, 40s, 80s… or 2s, 4s, 8s, 16s, 32s… That is, after the first card saving, a 5s / 2s interval is required before the second card saving can be performed, and similarly, a 10s / 4s interval is required before the third card saving can be performed, and so on, until the number of second card saving attempts reaches n, at which point the card saving stops.

[0160] It should be understood that the progressive repeated card rescue does not necessarily have to increase in the multiples described in the embodiments of this application, but can also be in other ways. For example, the time interval between each card rescue can be increased by a fixed number of seconds.

[0161] In this embodiment of the application, for the second repeated card recovery process, the SIM card is repeatedly recovered in the above-mentioned progressive manner. In the case of poor contact leading to card loss, the SIM card can be given a certain reaction time to prevent invalid and frequent card recovery, thereby reducing the power consumption of card recovery and improving the success rate of card recovery.

[0162] It should be understood that the SIM card recovery process described in the above embodiments can be achieved by powering on the SIM card. Specifically, the initial recovery of a lost SIM card by the electronic device refers to the initial power-on of the SIM card. Furthermore, repeated recovery operations (including first and second repeated recovery operations) refer to the electronic device repeatedly powering on the SIM card until the SIM card is successfully powered on or the number of power-on operations reaches a preset number of recovery attempts (n or m).

[0163] Another embodiment of this application provides an electronic device (such as a mobile phone), including: one or more processors, a memory, and a SIM card interface; the memory and the SIM card interface are respectively coupled to the processor; the SIM card interface is used to install a SIM card; the memory stores one or more computer program codes, the computer program codes including computer instructions; when the processor executes the computer instructions, the electronic device implements the SIM card recovery method described in any of the above embodiments.

[0164] In some embodiments, the processing of the electronic device includes a modem. A modem includes a modulator and demodulator, which translates the computer's digital signals into analog signals that can be transmitted over ordinary telephone lines. These analog signals can then be received by another modem at the other end of the line and translated into a language the computer can understand. Specifically, the SIM card recovery method described in any of the above embodiments can be implemented by a modem.

[0165] Another embodiment of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor in an electronic device (such as a mobile phone), causes the electronic device to implement the SIM card recovery method described in any of the above embodiments.

[0166] This application also provides a computer program product that, when run on a computer, causes the computer to perform the various functions or steps described in the above method embodiments.

[0167] This application also provides a chip system, such as... Figure 11 As shown, the chip system 110 includes at least one processor 1101 and at least one interface circuit 1102. The processor 1101 and the interface circuit 1102 are interconnected via lines. For example, the interface circuit 1102 can be used to receive signals from other devices (e.g., a computer's memory). As another example, the interface circuit 1102 can be used to send signals to other devices (e.g., the processor 1101).

[0168] For example, interface circuit 1102 can read instructions stored in memory and send those instructions to processor 1101. When the instructions are executed by processor 1101, the computer can perform the steps in the above embodiments. Of course, the chip system may also include other discrete devices, and this application embodiment does not specifically limit this.

[0169] 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.

[0170] 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.

[0171] 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.

[0172] 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.

[0173] 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, essentially or in other words, 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.

[0174] 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 recovering a lost SIM card, characterized in that, Applied to an electronic device that supports a User Identification Module (SIM) card; the method includes: After the SIM card is lost, the SIM card is initially recovered. If a reset response message (ATR) is received from the SIM card within a preset time period, the SIM card is identified. If the identification fails, a first repeated card recovery is performed on the SIM card. The first repeated card recovery includes one or more card recovery attempts. The card recovery is stopped after the SIM card returns to normal or the number of first repeated card recovery attempts reaches m. If no ATR feedback is received from the SIM card within a preset time period, a second repeated card recovery is performed on the SIM card; wherein, the second repeated card recovery includes one or more card recovery attempts, and the card recovery stops after the SIM card returns to normal or the number of second repeated card recovery attempts reaches n; n < m, where n and m are positive integers.

2. The method according to claim 1, characterized in that, The method further includes: After the first repeated SIM card recovery is completed, if the SIM card is still in a lost card state, a first prompt message is output; wherein, the first prompt message is used to remind the user that the SIM card is damaged and needs to be replaced in time.

3. The method according to claim 1, characterized in that, The method further includes: If the SIM card is still in a lost card state after the second repeated SIM card recovery is completed, a second prompt message is output; wherein, the second prompt message is used to prompt the user to reinstall the SIM card.

4. The method according to any one of claims 1-3, characterized in that, The step of identifying the SIM card and performing a first attempt to recover the SIM card after the identification fails includes: Read the key card configuration file of the SIM card; If the critical card configuration file is read abnormally, the SIM card will be subjected to a first duplicate card recovery process; The method further includes: If the critical card configuration file is read normally, then stop the card recovery process.

5. The method according to any one of claims 1-3, characterized in that, The first SIM card recovery process includes: Each time the SIM card is rescued, the first rescue attempt is counted. If the first number of card recovery attempts reaches m, or if the SIM card recovers to normal after one card recovery attempt, then the first number of card recovery attempts is cleared and the card recovery process is stopped.

6. The method according to any one of claims 1-3, characterized in that, The second SIM card recovery process includes: Each time the SIM card is rescued, one second rescue attempt is counted. If the second number of card recovery attempts reaches n, or if the SIM card recovers to normal after one card recovery attempt, then the second number of card recovery attempts is cleared and the card recovery process is stopped.

7. The method according to claim 6, characterized in that... The second method of recovering the SIM card after repeated use also includes: When the first card rescue time interval is i times the second card rescue time interval, the SIM card is rescued once; where i≥2; the first card rescue time interval is the time interval between the current time and the corresponding previous card rescue time; the second card rescue time interval is the time interval between the current time and the previous two card rescue times.

8. The method according to any one of claims 1-3, characterized in that, The process of recovering the SIM card includes: powering on the SIM card.

9. An electronic device, characterized in that, include: One or more processors, a memory, and a SIM card interface; the memory and the SIM card interface are respectively coupled to the processor; The SIM card interface is used to install a SIM card; the memory stores one or more computer program codes, the computer program codes including computer instructions; when the processor executes the computer instructions, the electronic device performs the SIM card recovery 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 perform a SIM card recovery method as described in any one of claims 1-8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor of the electronic device, the electronic device performs the SIM card recovery method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Card-off recovery method and device of SIM card, and terminal

    CN108471612A

  • Method and device for card reidentification when SIM card is disconnected, computer device, and medium

    WO2022048331A1