CN114338908B - SIM card recovery method, device, chip and module equipment - Google Patents

SIM card recovery method, device, chip and module equipment Download PDF

Info

Publication number
CN114338908B
CN114338908B CN202111591099.3A CN202111591099A CN114338908B CN 114338908 B CN114338908 B CN 114338908B CN 202111591099 A CN202111591099 A CN 202111591099A CN 114338908 B CN114338908 B CN 114338908B
Authority
CN
China
Prior art keywords
sim card
card
state
reset
reset operation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111591099.3A
Other languages
Chinese (zh)
Other versions
CN114338908A (en
Inventor
陆希望
王灿国
王旭鹏
张华伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN202111591099.3A priority Critical patent/CN114338908B/en
Publication of CN114338908A publication Critical patent/CN114338908A/en
Application granted granted Critical
Publication of CN114338908B publication Critical patent/CN114338908B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Telephone Function (AREA)

Abstract

The application discloses a method, a device, a chip and module equipment for recovering an SIM card, wherein the method comprises the following steps: when the SIM card is detected to be in a card-dropping state, carrying out hot reset operation on the SIM card; and if the state of the SIM card is still in a card dropping state after the SIM card is subjected to N1 times of hot reset operation, performing first cold reset operation on the SIM card, wherein N1 is more than or equal to 1. Therefore, based on the method described in the present application, the terminal device may perform a hot reset operation on the SIM card first. And if the SIM card is in the card-falling state after N1 times of hot reset operation, then performing cold reset operation on the SIM card. Because the SIM card is not required to be powered off and then powered on in the hot reset operation, the SIM card can be recovered to a normal state in more time by carrying out the hot reset operation on the SIM card.

Description

SIM card recovery method, device, chip and module equipment
Technical Field
The invention relates to the field of computers, in particular to a method, a device, a chip and module equipment for recovering an SIM card.
Background
A Subscriber Identity Module (SIM) card is a Subscriber Identity Module (SIM) card, and a mobile phone must be equipped with the SIM card for communication, and the SIM card is an essential important component in the mobile phone. At present, the SIM card is generally dropped under the following conditions that 1) the card support is displaced due to dropping or collision of a mobile phone, so that the electrical contact of the SIM card is displaced, and finally the SIM card cannot normally communicate with a baseband chip. The dropped card in this case belongs to a dropped card in the aspect of hardware structure, and can be recovered only by a user manually. 2) Due to the interference of the electrical signals, the SIM card cannot normally communicate with the baseband chip within a specified time, and finally the card is dropped. Because the SIM card dropping caused by the electrical signal interference is sudden, and cannot communicate with the baseband chip in a short time, but the interference disappears quickly, and so on, the SIM card dropping method for solving the reason is usually that the user manually restarts the mobile phone after the SIM card is dropped. If the mobile phone is abnormal after being restarted, the user can try to manually restart the mobile phone for a plurality of times until the SIM card is recovered to a normal state. However, this method takes a long time and cannot recover the SIM card to a normal state in a timely manner.
Disclosure of Invention
The application provides a method, a device, a chip and module equipment for recovering an SIM card, which can enable the SIM card to be recovered to a normal state in time.
In a first aspect, the present application provides a SIM card recovery method, including: when the SIM card is detected to be in a card-dropping state, carrying out hot reset operation on the SIM card; and if the state of the SIM card is still in a card dropping state after the SIM card is subjected to N1 times of hot reset operation, performing first cold reset operation on the SIM card, wherein N1 is more than or equal to 1.
It can be seen that based on the method described in the first aspect, the terminal device may perform a hot reset operation on the SIM card first. If the SIM card is subjected to N1 times of hot reset operation, the state of the SIM card is still in a card-falling state, and then the SIM card is subjected to cold reset operation. Because the SIM card does not need to be powered off and then on in the hot reset operation, the SIM card can be restored to a normal state in time by carrying out the hot reset operation on the SIM card.
In a possible implementation, if the state of the SIM card is still in the card dropping state after N2 times of the first cold reset operation is performed on the SIM card, a first prompt message is output, where the first prompt message is used to prompt the SIM card to drop, and N2 is greater than or equal to 1.
In one possible implementation, if the state of the SIM card is still in the card-off state after N2 times of the first cold reset operation is performed on the SIM card, starting a first reset timer, where N2 is greater than or equal to 1; and when the first reset timer is over time, carrying out second cold reset operation on the SIM card.
In a possible implementation, if the state of the SIM card is still in the card-out state after the second cold reset operation is performed on the SIM card, the second reset timer is started; when the second reset timer is overtime, carrying out third cold reset operation on the SIM card; and the duration of the second reset timer is greater than the duration of the first reset timer.
In a possible implementation, when the number of times of cold reset operations performed on the SIM card after N2 times of first cold reset operations reaches N3 times, if the state of the SIM card is still in the card dropping state, the cold reset operations performed on the SIM card are stopped, and second prompt information is output, where the second prompt information is used to prompt a user to insert a card into the SIM card again, and N3 is greater than 1.
In one possible implementation, the duration of the first reset timer is a first duration, and the first duration is a sum of durations of all reset timers started for restoring the SIM card to a normal state when the SIM card is dropped last time.
In one possible implementation, if the first duration is less than the first duration threshold, the duration of the first reset timer is the first duration; if the first duration is greater than the first duration threshold, the duration of the first reset timer is a preset duration, and the preset duration is less than the first duration threshold.
In a second aspect, the present application provides a SIM card recovery apparatus, including: the hot reset unit is used for carrying out hot reset operation on the SIM card when the SIM card is detected to be in a card-dropping state; and the cold reset unit is used for performing a first cold reset operation on the SIM card if the state of the SIM card is still in a card dropping state after performing N1 times of hot reset operation on the SIM card, wherein N1 is more than or equal to 1.
In a possible implementation, the SIM card recovery apparatus further includes a prompting unit, where the prompting unit is configured to output a first prompting message if the state of the SIM card is still in the card dropping state after N2 times of first cold reset operations are performed on the SIM card, where the first prompting message is used to prompt the SIM card to drop, and N2 is greater than or equal to 1.
In one possible implementation, the starting unit is configured to start a first reset timer if the state of the SIM card is still a card drop state after N2 times of first cold reset operations are performed on the SIM card, where N2 is greater than or equal to 1; and the cold reset unit is also used for carrying out second cold reset operation on the SIM card when the first reset timer is over time.
In a possible implementation, the starting unit is further configured to start a second reset timer if the state of the SIM card is still a card drop state after the second cold reset operation is performed on the SIM card; the cold reset unit is also used for carrying out third cold reset operation on the SIM card when the second reset timer is overtime; and the duration of the second reset timer is greater than the duration of the first reset timer.
In a possible implementation, the prompting unit is further configured to, when the number of times of cold reset operations performed on the SIM card after N2 times of the first cold reset operations reaches N3 times, stop performing the cold reset operation on the SIM card if the state of the SIM card is still in the card dropping state, and output second prompting information, where the second prompting information is used to prompt the user to insert the SIM card again, and N3 is greater than 1.
In one possible implementation, the duration of the first reset timer is a first duration, and the first duration is a sum of durations of all reset timers started for restoring the SIM card to a normal state when the SIM card is dropped last time.
In one possible implementation, if the first duration is smaller than the first duration threshold, the duration of the first reset timer is the first duration; if the first duration is greater than the first duration threshold, the duration of the first reset timer is a preset duration, and the preset duration is less than the first duration threshold.
In a third aspect, the present application provides a chip comprising a processor and a communication interface, the processor being configured to perform the following operations: when the SIM card is detected to be in a card-off state, carrying out hot reset operation on the SIM card; and if the state of the SIM card is still in a card dropping state after the SIM card is subjected to N1 times of hot reset operation, performing first cold reset operation on the SIM card, wherein N1 is more than or equal to 1.
In a fourth aspect, the present application provides a module device, which includes a communication module, a power module, a storage module, and a chip, wherein: the power module is used for providing electric energy for the module equipment; the storage module is used for storing data and instructions; the communication module is used for carrying out internal communication of the module equipment or is used for carrying out communication between the module equipment and external equipment; the chip is used for: when the SIM card is detected to be in a card-dropping state, carrying out hot reset operation on the SIM card; and if the state of the SIM card is still in a card dropping state after the SIM card is subjected to N1 times of hot reset operation, performing first cold reset operation on the SIM card, wherein N1 is more than or equal to 1.
In a fifth aspect, an embodiment of the present invention discloses a terminal device, where the terminal device includes a memory and a processor, the memory is used for storing a computer program, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method in the first aspect and any possible implementation manner thereof.
In a sixth aspect, the present application provides a computer-readable storage medium having stored thereon computer-readable instructions that, when run on a communication device, cause the communication device to perform the method of the first aspect and any of its possible implementations.
In a seventh aspect, the present application provides a computer program or computer program product comprising code or instructions which, when run on a computer, cause the computer to perform the method as in the first aspect and any one of its possible implementations.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for recovering an SIM card according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another SIM card recovery method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an apparatus for recovering an SIM card according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a terminal device provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a module apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the following embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the specification of this application and the appended claims, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the listed items.
It should be noted that the terms "first," "second," "third," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in other sequences than described or illustrated herein. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Some terms of art related to the embodiments of the present application are described below:
1. cold reset operation
After the SIM card contact is activated, the Gao Fuwei (reset) signal is pulled. The cold reset is the reset of powering on the SIM card again after powering off the SIM card. Therefore, the cold reset operation of the SIM card can also be understood as powering down and then powering up the SIM card.
2. Hot reset operation
The hot reset operation of the SIM card means that a reset signal is sent to the SIM card under the condition that the SIM card is electrified.
3. Timer with timer
Namely, a timing device simulated by software needs to acquire a timestamp a of a current system when a timer is started, then adds a time B to be timed with the timestamp a, and when the system timestamp is greater than a + B, indicates that the timing time is up, and starts to call a callback function to execute corresponding operations.
4. Non-volatile memory (NV)
Once data is written into NV, the data cannot be lost even if power is lost, and the original setting can still be kept when the data is restarted next time.
The method, the apparatus, the chip and the module device for recovering the SIM card provided in the embodiments of the present application are further described in detail below.
Fig. 1 is a schematic flowchart of a SIM card recovery method according to an embodiment of the present application. As shown in fig. 1, the SIM card recovery method includes the following steps 101 and 102. The method execution subject shown in fig. 1 may be a terminal device. Alternatively, the method execution body shown in fig. 1 may be a chip in the terminal device. Fig. 1 illustrates an execution subject of the method by taking a terminal device as an example.
101. And when the terminal equipment detects that the state of the SIM card is the card-dropping state, carrying out hot reset operation on the SIM card.
In the embodiment of the application, the terminal device can detect whether the SIM card is lost by sending an instruction to the SIM card. For example, after the terminal device sends the instruction to the SIM card, if the terminal device does not receive a response from the SIM card within a preset time, the terminal device determines that the SIM card is lost. Or after the terminal equipment sends the instruction to the SIM card, if the terminal equipment determines that the information returned by the SIM card is abnormal, the terminal equipment determines that the SIM card is lost. After detecting that the SIM card is lost, the terminal equipment carries out hot reset operation on the SIM card, namely the terminal equipment sends a reset signal to the SIM card under the condition that the SIM card is kept powered on.
102. And if the state of the SIM card is still in the card-dropping state after the SIM card is subjected to the hot reset operation for N1 times, the terminal equipment performs a first cold reset operation on the SIM card.
In the embodiment of the application, N1 is greater than or equal to 1.
When N1 is 1, after the terminal device performs the first hot reset operation on the SIM card, if the SIM card is still in the card dropping state, the terminal device may perform the cold reset operation on the SIM card.
When N1 is greater than 1, after the terminal device performs the first hot reset operation on the SIM card, if the SIM card is still in the card dropping state, the terminal device may perform the hot reset operation on the SIM card again until the SIM card recovers to the normal state, or until the number of times of performing the hot reset operation on the SIM card reaches N1 times. For example, N1 is 2, 3, 4, 5, 6, 7, or 8, etc. If the number of times of the terminal equipment performing the hot reset operation on the SIM card reaches N1 times, and the SIM card is still in a card dropping state, the terminal equipment can perform the cold reset operation on the SIM card.
In one possible implementation, N1 is system preset or user-defined.
It can be seen that, based on the method described in fig. 1, the terminal device may perform a hot reset operation on the SIM card first. And if the SIM card is in the card-falling state after N1 times of hot reset operation, then performing cold reset operation on the SIM card. Because the SIM card is not required to be powered off and then powered on in the hot reset operation, the SIM card can be recovered to a normal state in more time by carrying out the hot reset operation on the SIM card.
Fig. 2 is a schematic flowchart of another SIM card recovery method according to an embodiment of the present application. As shown in fig. 2, the SIM card recovery method includes the following steps 201 to 207. The method execution subject shown in fig. 2 may be a terminal device. Alternatively, the method execution body shown in fig. 2 may be a chip in the terminal device. Fig. 2 illustrates an execution subject of the method by taking the terminal device as an example.
201. And when the SIM card is detected to be in the card-dropping state, the terminal equipment carries out hot reset operation on the SIM card.
202. And if the state of the SIM card is still in the card-dropping state after the SIM card is subjected to the hot reset operation for N1 times, the terminal equipment performs a first cold reset operation on the SIM card. Wherein N1 is greater than or equal to 1
For specific implementation of step 201 and step 202, reference may be made to specific implementation of step 101 and step 102, which are not described herein again.
203. If the state of the SIM card is still in the card dropping state after N2 times of first cold reset operation is carried out on the SIM card, the terminal equipment outputs first prompt information, and the first prompt information is used for prompting the SIM card to drop.
Wherein N2 is greater than or equal to 1. Optionally, N2 is preset by the system or is user-defined.
When N2 is 1, after the terminal device performs a first cold reset operation on the SIM card for one time, the state of the SIM card is still the card dropping state, and the terminal device outputs first prompt information for prompting the SIM card to drop the card.
When N2 is greater than 1, after the terminal device performs the first cold reset operation on the SIM card for multiple times, the state of the SIM card is still the card dropping state, and the terminal device outputs first prompt information for prompting the SIM card to drop the card.
Optionally, the terminal device may prompt the SIM card to be dropped by displaying a text or a signal-free icon.
In a possible implementation, if the state of the SIM card is still in the card dropping state after N2 times of the first cold reset operation is performed on the SIM card, the terminal device may further output a time for prompting a subsequent automatic recovery operation on the SIM card. For example, the terminal device may prompt the user that a recovery operation will be automatically performed on the SIM card after 20 seconds.
204. And if the state of the SIM card is still in the card-dropping state after the SIM card is subjected to the N2 times of first cold reset operation, the terminal equipment starts a first reset timer.
205. And the terminal equipment performs second cold reset operation on the SIM card when the first reset timer is overtime.
If the state of the SIM card is still in the card dropping state after the first cold reset operation is performed on the SIM card for N2 times, the SIM card cannot be recovered even if the cold reset operation is performed on the SIM card in a short time. In order to save the power consumption of the terminal device, the terminal device may perform a cold reset operation on the SIM card after a preset time. Therefore, it is advantageous to save power consumption of the terminal device by performing step 204 and step 205.
206. And if the state of the SIM card is still in the card-dropping state after the second cold reset operation is carried out on the SIM card, the terminal equipment starts a second reset timer.
207. And when the second reset timer is over time, the terminal equipment performs third cold reset operation on the SIM card.
And the duration of the second reset timer is greater than the duration of the first reset timer. That is to say, after the first cold reset operation is performed on the SIM card N2 times, the state of the SIM card is still in the card dropping state, and the time interval between the subsequent cold reset operations performed on the terminal device becomes larger and larger. This is advantageous in saving power consumption of the terminal device.
In another possible implementation, the duration of the second reset timer may also be equal to the duration of the first reset timer. That is, after the first cold reset operation is performed on the SIM card for N2 times, the state of the SIM card is still in the card dropping state, and the time intervals between the subsequent cold reset operations performed on the terminal device are equal.
In one possible implementation, if the state of the SIM card is a normal state after the second cold reset operation is performed on the SIM card, the terminal device may prompt the SIM card to return to the normal state. If the state of the SIM card is a normal state after the third cold reset operation is performed on the SIM card, the terminal device may prompt the SIM card to recover to the normal state. Optionally, the terminal device may prompt the SIM card to return to the normal state by displaying a text or an icon with a signal.
In a possible implementation, when the number of times of cold reset operations performed on the SIM card after N2 times of first cold reset operations reaches N3 times, if the state of the SIM card is still in the card dropping state, the cold reset operations performed on the SIM card are stopped, and second prompt information is output, where the second prompt information is used to prompt a user to insert a card into the SIM card again, and N3 is greater than 1. Optionally, N3 is preset by the system or is user-defined.
After N2 times of the first cold reset operation, when N3 times of the cold reset operation are performed, it is described that the SIM card is dropped due to the loosening of the SIM card. In this case, therefore, the cold reset operation of the SIM card can be stopped to save power consumption of the terminal device. And the terminal equipment can output second prompt information which is used for prompting the user to insert the SIM card again so that the user can insert the SIM card again in time and restore the SIM card to a normal state in time.
In one possible implementation, the duration of the first reset timer is a first duration, and the first duration is a sum of durations of all reset timers started for restoring the SIM card to a normal state when the SIM card is dropped last time.
For example, when the SIM card is dropped last time, after N2 times of the first cold reset operation, the state of the SIM card is still in the card dropping state. The terminal equipment starts a reset timer 1 to trigger the execution of a cold reset operation 1, the cold reset operation 1 is unsuccessful, and starts a reset timer 2 to trigger the execution of a cold reset operation 2. The time length of the reset timer 1 is 5 seconds, and the time length of the reset timer 2 is 6 seconds. Then, this time the SIM card is dropped, the duration of the first reset timer (i.e. the first reset timer) started by the terminal device is 11 seconds. Since the SIM card was restored to the normal state last time, the sum of the durations of the reset timers started is 11 seconds. When the SIM card is dropped, after N2 times of first cold reset operation, the SIM card is likely to be recovered to a normal state through the cold reset operation after waiting for 11 seconds. Therefore, in order to reduce the frequency of the terminal device performing the cold reset operation on the SIM card and reduce the power consumption of the terminal device, the terminal device may determine the duration of the first reset timer started when the SIM card is dropped by referring to the sum of the durations of the reset timers started by the terminal device and the SIM card dropped last time.
In one possible implementation, if the first duration is less than the first duration threshold, the duration of the first reset timer is the first duration; if the first duration is greater than the first duration threshold, the duration of the first reset timer is a preset duration, and the preset duration is less than the first duration threshold. The preset duration may be preset by the system.
For example, if the first duration is 50 seconds, the first duration threshold is 20 seconds, and the preset duration is 10 seconds. Then, the duration of the first reset timer is 10 seconds. This is because, if the first time length is too long, setting the first time length to the time length of the first reset timer may cause the user to wait long to restore the SIM card to a normal state. Therefore, in order to reduce the time for the user to wait for the SIM card to return to the normal state, the duration of the first reset timer may be set to a preset duration when the first duration is too long. After the duration of the first reset timer is set to the preset duration, it is also possible to restore the SIM card to a normal state through the second cold reset operation. Therefore, based on the possible implementation mode, the time for the user to wait for the SIM card to recover to the normal state is favorably reduced.
In another possible implementation, if the first duration is greater than the first duration threshold, the terminal device may output a selection item of the first duration and the preset duration, so that the user may select whether to set the first time as the duration of the first reset timer or to set the preset time as the duration of the first reset timer. And the terminal equipment sets the time length selected by the user as the time length of the first reset timer. Thus, the requirements of users can be better met.
In a possible implementation, the control switches for the N1 hot reset, the N2 cold reset, and the N3 cold reset may be stored in the NV, so as to ensure that the original reset times are unchanged after the reset is successful, so as to prepare for the next use.
In a possible implementation, if the SIM card is still in the card-off state after N2 times of the first cold reset operation, the terminal device may not output the first prompt message. But directly performs steps 204 to 205.
In a possible implementation, after the terminal device performs the first cold reset operation N2 times, if the state of the SIM card is still in the card-off state, the terminal device may not perform step 204 and step 205. Subsequent users may manually restart the terminal device to recover the SIM card.
In another possible implementation, the terminal device may not perform step 206 and step 207. That is, after the first cold reset operation is performed on the SIM card for N2 times, the state of the SIM card is still the card-dropping state, and the terminal device performs only one cold reset operation on the SIM card subsequently.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a SIM card recovery apparatus according to an embodiment of the present invention, where the SIM card recovery apparatus may be a terminal device or an apparatus (e.g., a chip) having a function of the terminal device.
Specifically, as shown in fig. 3, the SIM card recovering apparatus 300 may include:
the hot reset unit 301 is configured to perform a hot reset operation on the SIM card when detecting that the state of the SIM card is a card drop state; a cold reset unit 302, configured to perform a first cold reset operation on the SIM card if the state of the SIM card is still a card drop state after performing N1 times of hot reset operations on the SIM card, where N1 is greater than or equal to 1.
In a possible implementation, the SIM card recovery apparatus further includes a prompt unit, where the prompt unit is configured to output a first prompt message if the state of the SIM card is still in the card dropping state after N2 times of first cold reset operations are performed on the SIM card, where the first prompt message is used to prompt the SIM card to drop, and N2 is greater than or equal to 1.
In one possible implementation, the starting unit is configured to start a first reset timer if the state of the SIM card is still a card drop state after N2 times of first cold reset operations are performed on the SIM card, where N2 is greater than or equal to 1; and the cold reset unit 302 is further configured to perform a second cold reset operation on the SIM card when the first reset timer times out.
In a possible implementation, the starting unit is further configured to start a second reset timer if the state of the SIM card is still a card drop state after the second cold reset operation is performed on the SIM card; the cold reset unit 302 is further configured to perform a third cold reset operation on the SIM card when the second reset timer times out; and the duration of the second reset timer is greater than the duration of the first reset timer.
In a possible implementation, the prompting unit is further configured to, when the number of times of cold reset operations performed on the SIM card after N2 times of the first cold reset operations reaches N3 times, stop performing the cold reset operation on the SIM card if the state of the SIM card is still in the card dropping state, and output second prompting information, where the second prompting information is used to prompt the user to insert the SIM card again, and N3 is greater than 1.
In one possible implementation, the duration of the first reset timer is a first duration, and the first duration is a sum of durations of all reset timers started for restoring the SIM card to a normal state when the SIM card is dropped last time.
In one possible implementation, if the first duration is less than the first duration threshold, the duration of the first reset timer is the first duration; if the first duration is greater than the first duration threshold, the duration of the first reset timer is a preset duration, and the preset duration is less than the first duration threshold.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. The terminal device 400 may include a memory 401, a processor 402. Optionally, a communication interface 403 is also included. The memory 401, processor 402, and communication interface 403 are connected by one or more communication buses. Wherein the communication interface 403 is controlled by the processor 402 for transceiving information.
Memory 401 may include both read-only memory and random-access memory, and provides instructions and data to processor 402. A portion of the memory 401 may also include non-volatile random access memory.
The Processor 402 may be a Central Processing Unit (CPU), and the Processor 402 may also be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor, and optionally, the processor 402 may be any conventional processor or the like. Wherein:
a memory 401 for storing program instructions.
A processor 402 for invoking program instructions stored in the memory 401.
The processor 402 calls program instructions stored in the memory 401 to cause the terminal device 400 to perform the following operations: when the SIM card is detected to be in a card-falling state, carrying out hot reset operation on the SIM card; and if the state of the SIM card is still in a card dropping state after the SIM card is subjected to N1 times of hot reset operation, performing first cold reset operation on the SIM card, wherein N1 is more than or equal to 1.
In one implementation, the processor 402 is further configured to: if the state of the SIM card is still in the card dropping state after N2 times of first cold reset operation is carried out on the SIM card, outputting first prompt information, wherein the first prompt information is used for prompting the SIM card to drop, and N2 is larger than or equal to 1.
In one implementation, the processor 402 is further configured to: if the state of the SIM card is still in a card dropping state after N2 times of first cold reset operation is carried out on the SIM card, starting a first reset timer, wherein N2 is more than or equal to 1; and when the first reset timer is over time, performing second cold reset operation on the SIM card.
In one implementation, the processor 402 is further configured to: if the state of the SIM card is still in the card-dropping state after the second cold reset operation is carried out on the SIM card, a second reset timer is started; when the second reset timer is overtime, carrying out third cold reset operation on the SIM card; and the duration of the second reset timer is greater than the duration of the first reset timer.
In one implementation, the processor 402 is further configured to: when the number of times of cold reset operation performed on the SIM card after the N2 times of first cold reset operation reaches N3 times, if the state of the SIM card is still in a card dropping state, the cold reset operation on the SIM card is stopped, and second prompt information is output, wherein the second prompt information is used for prompting a user to insert the SIM card again, and N3 is greater than 1.
In one implementation manner, the duration of the first reset timer is a first duration, and the first duration is a sum of durations of all reset timers started for restoring the SIM card to a normal state when the SIM card is dropped last time.
In one implementation, if the first duration is less than the first duration threshold, the duration of the first reset timer is the first duration; if the first duration is greater than the first duration threshold, the duration of the first reset timer is a preset duration, and the preset duration is less than the first duration threshold.
It should be noted that, for details that are not mentioned in the embodiment corresponding to fig. 4 and specific implementation manners of each step, reference may be made to the embodiment shown in fig. 1 and the foregoing contents, and details are not described here again.
The embodiment of the application also provides a chip, and the chip can execute the relevant steps of the electronic equipment in the embodiment of the method. The chip includes a processor and a communication interface, the processor configured to perform the following operations: when the SIM card is detected to be in a card-off state, carrying out hot reset operation on the SIM card; and if the state of the SIM card is still in a card dropping state after the SIM card is subjected to N1 times of hot reset operation, performing first cold reset operation on the SIM card, wherein N1 is more than or equal to 1.
In one implementation, the chip is further configured to: if the state of the SIM card is still in the card dropping state after N2 times of first cold reset operation is carried out on the SIM card, outputting first prompt information, wherein the first prompt information is used for prompting the SIM card to drop, and N2 is larger than or equal to 1.
In one implementation, the chip is further configured to: if the state of the SIM card is still in a card dropping state after N2 times of first cold reset operation is carried out on the SIM card, starting a first reset timer, wherein N2 is more than or equal to 1; and when the first reset timer is over time, performing second cold reset operation on the SIM card.
In one implementation, the chip is further configured to: if the state of the SIM card is still in the card-dropping state after the second cold reset operation is carried out on the SIM card, a second reset timer is started; when the second reset timer is overtime, carrying out third cold reset operation on the SIM card; and the duration of the second reset timer is greater than the duration of the first reset timer.
In one implementation, the chip is further configured to: when the number of times of cold reset operation performed on the SIM card after the N2 times of first cold reset operation reaches N3 times, if the state of the SIM card is still in a card dropping state, the cold reset operation on the SIM card is stopped, and second prompt information is output, wherein the second prompt information is used for prompting a user to insert the SIM card again, and N3 is greater than 1.
In one implementation manner, the duration of the first reset timer is a first duration, and the first duration is a sum of durations of all reset timers started for restoring the SIM card to a normal state when the SIM card is dropped last time.
In one implementation, if the first duration is less than the first duration threshold, the duration of the first reset timer is the first duration; if the first duration is greater than the first duration threshold, the duration of the first reset timer is a preset duration, and the preset duration is less than the first duration threshold.
In one possible implementation, the chip includes at least one processor, at least one first memory, and at least one second memory; the at least one first memory and the at least one processor are interconnected through a line, and instructions are stored in the first memory; the at least one second memory and the at least one processor are interconnected through a line, and the second memory stores the data required to be stored in the method embodiment.
For each device and product applied to or integrated in the chip, each module included in the device and product may be implemented in hardware such as a circuit, or at least a part of the modules may be implemented in software that runs on a processor integrated in the chip, and the rest (if any) part of the modules may be implemented in hardware such as a circuit.
As shown in fig. 5, fig. 5 is a schematic structural diagram of a module device according to an embodiment of the present disclosure. The module device 500 can perform the steps related to the terminal device in the foregoing method embodiments, and the module device 500 includes: a communication module 501, a power module 502, a memory module 503, and a chip 504.
The power module 502 is configured to provide power for the module device; the storage module 503 is used for storing data and instructions; the communication module 501 is used for performing internal communication of module equipment, or is used for performing communication between the module equipment and external equipment; the chip 504 is used for: when the SIM card is detected to be in a card-dropping state, carrying out hot reset operation on the SIM card; and if the state of the SIM card is still in a card dropping state after the SIM card is subjected to N1 times of hot reset operation, performing first cold reset operation on the SIM card, wherein N1 is more than or equal to 1.
In one implementation, the chip 504 is further configured to: if the state of the SIM card is still in the card dropping state after N2 times of first cold reset operation is carried out on the SIM card, outputting first prompt information, wherein the first prompt information is used for prompting the SIM card to drop, and N2 is larger than or equal to 1.
In one implementation, the chip 504 is further configured to: if the state of the SIM card is still in a card dropping state after N2 times of first cold reset operation is carried out on the SIM card, starting a first reset timer, wherein N2 is more than or equal to 1; and when the first reset timer is over time, performing second cold reset operation on the SIM card.
In one implementation, the chip 504 is further configured to: if the state of the SIM card is still in the card-dropping state after the second cold reset operation is carried out on the SIM card, a second reset timer is started; when the second reset timer is overtime, carrying out third cold reset operation on the SIM card; and the duration of the second reset timer is greater than the duration of the first reset timer.
In one implementation, the chip 504 is further configured to: when the number of times of cold reset operation performed on the SIM card after the N2 times of first cold reset operation reaches N3 times, if the state of the SIM card is still in a card dropping state, the cold reset operation on the SIM card is stopped, and second prompt information is output, wherein the second prompt information is used for prompting a user to insert the SIM card again, and N3 is greater than 1.
In one implementation manner, the duration of the first reset timer is a first duration, and the first duration is a sum of durations of all reset timers started for restoring the SIM card to a normal state when the SIM card is dropped last time.
In one implementation, if the first duration is less than the first duration threshold, the duration of the first reset timer is the first duration; if the first duration is greater than the first duration threshold, the duration of the first reset timer is a preset duration, and the preset duration is less than the first duration threshold.
For each device and product applied to or integrated in the chip module, each module included in the device and product may be implemented by using hardware such as a circuit, and different modules may be located in the same component (e.g., a chip, a circuit module, etc.) or different components of the chip module, or at least some of the modules may be implemented by using a software program running on a processor integrated in the chip module, and the rest (if any) of the modules may be implemented by using hardware such as a circuit. Embodiments of the present application further provide a computer-readable storage medium, in which instructions are stored, and when the computer-readable storage medium is executed on a processor, the method flow of the foregoing method embodiments is implemented.
Embodiments of the present application further provide a computer program product, where when the computer program product runs on a processor, the method flow of the above method embodiments is implemented.
It is noted that, for simplicity of explanation, the foregoing method embodiments are described as a series of acts or combination of acts, but those skilled in the art will appreciate that the present application is not limited by the order of acts, as some acts may, in accordance with the present application, occur in other orders and/or concurrently. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
The descriptions of the embodiments provided in the present application may be referred to each other, and the descriptions of the embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments. For convenience and brevity of description, for example, the functions and operations performed by the devices and apparatuses provided in the embodiments of the present application may refer to the related descriptions of the method embodiments of the present application, and may also be referred to, combined with or cited among the method embodiments and the device embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (9)

1. A SIM card recovery method, the method comprising:
when the SIM card is detected to be in a card-dropping state, carrying out hot reset operation on the SIM card;
if the state of the SIM card is still in a card dropping state after the SIM card is subjected to N1 times of hot reset operation, performing first cold reset operation on the SIM card, wherein N1 is more than or equal to 1;
if the state of the SIM card is still in a card-off state after N2 times of first cold reset operation is carried out on the SIM card, starting a first reset timer, wherein N2 is more than or equal to 1;
when the first reset timer is over time, performing second cold reset operation on the SIM card;
if the SIM card is still in the card-off state after the second cold reset operation is carried out on the SIM card, starting a second reset timer;
when the second reset timer is overtime, performing third cold reset operation on the SIM card;
wherein the duration of the second reset timer is greater than the duration of the first reset timer;
the time length of the first reset timer is a first time length, and the first time length is the sum of the time lengths of all reset timers which are started for restoring the SIM card to a normal state when the SIM card is dropped last time.
2. The method of claim 1, further comprising:
if the SIM card is subjected to N2 times of first cold reset operation, the state of the SIM card is still in a card dropping state, outputting first prompt information, wherein the first prompt information is used for prompting the SIM card to drop the card, and N2 is larger than or equal to 1.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
when the number of times of cold reset operation performed on the SIM card after the N2 times of first cold reset operation reaches N3 times, if the state of the SIM card is still in a card dropping state, the cold reset operation on the SIM card is stopped, and second prompt information is output, wherein the second prompt information is used for prompting a user to insert a card into the SIM card again, and N3 is greater than 1.
4. The method according to claim 1 or 2, wherein if the first duration is less than a first duration threshold, the duration of the first reset timer is the first duration;
if the first duration is greater than the first duration threshold, the duration of the first reset timer is a preset duration, and the preset duration is less than the first duration threshold.
5. A SIM card recovery apparatus, comprising:
the hot reset unit is used for carrying out hot reset operation on the SIM card when the SIM card is detected to be in a card-dropping state;
the cold reset unit is used for performing first cold reset operation on the SIM card if the state of the SIM card is still in a card dropping state after performing hot reset operation on the SIM card for N1 times, wherein N1 is more than or equal to 1;
the starting unit is used for starting a first reset timer if the state of the SIM card is still in a card dropping state after N2 times of first cold reset operation is carried out on the SIM card, wherein N2 is more than or equal to 1;
the cold reset unit is further used for carrying out second cold reset operation on the SIM card when the first reset timer is over time;
the starting unit is further configured to start a second reset timer if the state of the SIM card is still in the card drop state after the second cold reset operation is performed on the SIM card;
the cold reset unit is further configured to perform a third cold reset operation on the SIM card when the second reset timer times out;
wherein the duration of the second reset timer is greater than the duration of the first reset timer;
the first reset timer is a first time length, and the first time length is the sum of the time lengths of all reset timers which are started for restoring the SIM card to a normal state when the SIM card is dropped last time.
6. A chip comprising a processor and a communication interface, the processor configured to:
when the SIM card is detected to be in a card-dropping state, carrying out hot reset operation on the SIM card;
if the state of the SIM card is still in a card dropping state after the SIM card is subjected to N1 times of hot reset operation, performing first cold reset operation on the SIM card, wherein N1 is more than or equal to 1;
if the state of the SIM card is still in a card-dropping state after N2 times of first cold reset operation is carried out on the SIM card, starting a first reset timer, wherein N2 is more than or equal to 1;
when the first reset timer is over time, performing second cold reset operation on the SIM card;
if the state of the SIM card is still in a card dropping state after the second cold reset operation is carried out on the SIM card, starting a second reset timer;
when the second reset timer is overtime, performing third cold reset operation on the SIM card;
wherein the duration of the second reset timer is greater than the duration of the first reset timer;
the first reset timer is a first time length, and the first time length is the sum of the time lengths of all reset timers which are started for restoring the SIM card to a normal state when the SIM card is dropped last time.
7. The utility model provides a module equipment, its characterized in that, module equipment includes communication module, power module, storage module and chip, wherein:
the power supply module is used for providing electric energy for the module equipment;
the storage module is used for storing data and instructions;
the communication module is used for carrying out internal communication of module equipment or is used for carrying out communication between the module equipment and external equipment;
the chip is used for:
when the SIM card is detected to be in a card-dropping state, carrying out hot reset operation on the SIM card;
if the state of the SIM card is still in a card dropping state after the SIM card is subjected to N1 times of hot reset operation, performing first cold reset operation on the SIM card, wherein N1 is more than or equal to 1;
if the state of the SIM card is still in a card-dropping state after N2 times of first cold reset operation is carried out on the SIM card, starting a first reset timer, wherein N2 is more than or equal to 1;
when the first reset timer is over time, carrying out second cold reset operation on the SIM card;
if the SIM card is still in the card-off state after the second cold reset operation is carried out on the SIM card, starting a second reset timer;
when the second reset timer is over time, performing a third cold reset operation on the SIM card;
wherein the duration of the second reset timer is greater than the duration of the first reset timer;
the time length of the first reset timer is a first time length, and the first time length is the sum of the time lengths of all reset timers which are started for restoring the SIM card to a normal state when the SIM card is dropped last time.
8. A terminal device, comprising a memory for storing a computer program comprising program instructions and a processor configured to invoke the program instructions to perform the method of any one of claims 1 to 4.
9. A computer readable storage medium having computer readable instructions stored therein which, when run on a communication device, cause the communication device to perform the method of any one of claims 1-4.
CN202111591099.3A 2021-12-23 2021-12-23 SIM card recovery method, device, chip and module equipment Active CN114338908B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111591099.3A CN114338908B (en) 2021-12-23 2021-12-23 SIM card recovery method, device, chip and module equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111591099.3A CN114338908B (en) 2021-12-23 2021-12-23 SIM card recovery method, device, chip and module equipment

Publications (2)

Publication Number Publication Date
CN114338908A CN114338908A (en) 2022-04-12
CN114338908B true CN114338908B (en) 2023-01-10

Family

ID=81053953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111591099.3A Active CN114338908B (en) 2021-12-23 2021-12-23 SIM card recovery method, device, chip and module equipment

Country Status (1)

Country Link
CN (1) CN114338908B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016178495A1 (en) * 2015-05-01 2016-11-10 주식회사 엠버즈 Smart card for processing multi-subscriber information, electronic device using same, and method for managing multi-subscribers in electronic device
CN106851615A (en) * 2017-01-09 2017-06-13 宇龙计算机通信科技(深圳)有限公司 A kind of method and terminal of smart card abnormality processing
JP2018088156A (en) * 2016-11-29 2018-06-07 大日本印刷株式会社 Electronic information storage device, data processing method, and data processing program
CN108471612A (en) * 2017-02-23 2018-08-31 展讯通信(上海)有限公司 SIM card falls card restoration methods, device and terminal
CN111866262A (en) * 2019-04-26 2020-10-30 北京小米移动软件有限公司 SIM card dropping recovery method and device
CN112188472A (en) * 2020-09-07 2021-01-05 深圳市广和通无线股份有限公司 Method, device, computer equipment and medium for re-identifying SIM card after SIM card is dropped
CN112468979A (en) * 2019-09-06 2021-03-09 华为技术有限公司 SIM card drop recovery method of electronic equipment and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016178495A1 (en) * 2015-05-01 2016-11-10 주식회사 엠버즈 Smart card for processing multi-subscriber information, electronic device using same, and method for managing multi-subscribers in electronic device
JP2018088156A (en) * 2016-11-29 2018-06-07 大日本印刷株式会社 Electronic information storage device, data processing method, and data processing program
CN106851615A (en) * 2017-01-09 2017-06-13 宇龙计算机通信科技(深圳)有限公司 A kind of method and terminal of smart card abnormality processing
CN108471612A (en) * 2017-02-23 2018-08-31 展讯通信(上海)有限公司 SIM card falls card restoration methods, device and terminal
CN111866262A (en) * 2019-04-26 2020-10-30 北京小米移动软件有限公司 SIM card dropping recovery method and device
CN112468979A (en) * 2019-09-06 2021-03-09 华为技术有限公司 SIM card drop recovery method of electronic equipment and electronic equipment
CN112188472A (en) * 2020-09-07 2021-01-05 深圳市广和通无线股份有限公司 Method, device, computer equipment and medium for re-identifying SIM card after SIM card is dropped

Also Published As

Publication number Publication date
CN114338908A (en) 2022-04-12

Similar Documents

Publication Publication Date Title
EP2871825B1 (en) Method for enabling shutdown alarm clock and mobile terminal
EP2851798A1 (en) Method, device, and terminal for adjusting heartbeat cycle for application
CN100401820C (en) Cellular phone and operational mode switching method thereof
EP2824895B1 (en) Information backup method and apparatus, mobile terminal
CN105786657A (en) Terminal halting processing method and terminal
CN105867579A (en) Terminal control method and apparatus as well as terminal
CN101860624A (en) Crash auto-restart method and mobile phone
CN109067416B (en) Method for realizing hot plug and start of SIM card and intelligent hardware
CN103425506A (en) Powering off method, starting up method and communication terminal
CN105511985A (en) Data backup method and terminal
CN108650155B (en) Control method, device and system for household electrical appliance
CN104079724A (en) Mobile phone card losing recovery method and mobile terminal applying mobile phone card
CN107844341B (en) Process starting control method and device, storage medium and mobile terminal
CN104156050A (en) Task monitoring method and electronic device
CN107132905A (en) Terminal communication control method and terminal
CN104023147A (en) Method and system for facilitating stable dormancy of mobile terminal
CN114338908B (en) SIM card recovery method, device, chip and module equipment
CN112312565B (en) Communication processing method, device, apparatus and storage medium
CN105052214B (en) A kind of method and WIFI access point reducing WIFI access point power consumption
CN107423300B (en) Terminal file processing method and device and mobile terminal
CN104461659B (en) A kind of computer starting method of high reliability
CN108196617B (en) BMC time setting method, device and system and readable storage medium
CN105764128B (en) The method for controlling power supply and device of mobile terminal
CN108419260B (en) SIM card connection control method, mobile terminal and storage medium
CN105204908B (en) Application program package stopping method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant