SIM card management method and electronic device

By implementing the SIM card management method in electronic devices, detecting SIM card abnormalities and controlling power consumption, the problem of increased standby power consumption caused by SIM card abnormalities is solved, and power saving and user experience improvement are achieved.

CN117135731BActive Publication Date: 2024-09-27HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310209681.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-27
Publication Date
2024-09-27
Estimated Expiration
2043-02-27

AI Technical Summary

Technical Problem

Abnormal SIM cards lead to increased standby power consumption of electronic devices, affecting user experience.

Method used

By implementing a SIM card management method in the electronic device, it detects whether the SIM card is abnormal, and outputs reminder information and controls power consumption when abnormal, such as interrupting signal interception or disabling the SIM card, reducing the number of times the MD wakes up the AP, and reducing power consumption. Consumption.

Benefits of technology

Effectively save device power, extend standby time, improve user experience, and ensure the accuracy of SIM card anomaly detection and the effectiveness of power consumption management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117135731B
    Figure CN117135731B
Patent Text Reader

Abstract

The embodiment of the present application provides a SIM card management method and an electronic device, wherein the electronic device is provided with a first SIM card that is shut down or has a network speed limit, and the method comprises: when the screen is off, in a first time period, the electronic device receives a first number of data packets sent by the operator, and the number of times the MD sends an interrupt signal to the AP is the first number; in a second time period, the electronic device receives a second number of data packets sent by the operator, and the number of times the MD sends an interrupt signal to the AP is the third number; the third number is less than the second number; after the first SIM card is replaced with the second SIM card, in a third time period, the electronic device receives a fourth number of data packets sent by the operator, and the number of times the MD sends an interrupt signal to the AP is the fourth number; in a fourth time period, the electronic device receives a fifth number of data packets sent by the operator, and the number of times the MD sends an interrupt signal to the AP is the fifth number. The method can reduce the power consumption of the device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to a SIM card management method and electronic device. Background Art

[0002] A subscriber identity module (SIM), also known as a smart card or user identification card, is inserted into an electronic device to implement functions such as call and data communication.

[0003] In actual applications, it is found that when an abnormality occurs in the SIM card, for example, shutdown due to arrears, network speed limit, etc., the standby power consumption of the electronic device increases. Summary of the invention

[0004] The present application provides a SIM card management method and electronic device, which can solve the problem of increased standby power consumption due to SIM card abnormality and effectively save device power.

[0005] In a first aspect, the present application provides a SIM card management method, which is performed by an electronic device, the electronic device includes a modem (modem, MD) and an application processor (application processor, AP), the electronic device is provided with a first SIM card, the first SIM card is shut down or there is a network speed limit, the method includes:

[0006] In response to the user's screen-off operation, the screen of the electronic device is turned off; in a first time period, the electronic device receives a first number of data packets sent by the operator, and the number of times the MD sends an interrupt signal to the AP is the first number; in a second time period, the electronic device receives a second number of data packets sent by the operator, and the number of times the MD sends an interrupt signal to the AP is a third number; wherein the third number is less than the second number, the second time period is a time period after the first time period, and the screen of the electronic device remains turned off during the first time period and the second time period, and between the first time period and the second time period;

[0007] After the first SIM card is replaced with the second SIM card, the screen of the electronic device is turned off in response to the user's screen-off operation; the second SIM card is not shut down and there is no network speed limit; within the third time period, the electronic device receives a fourth number of data packets sent by the operator, and the number of times the MD sends an interrupt signal to the AP is the fourth number; within the fourth time period, the electronic device receives a fifth number of data packets sent by the operator, and the number of times the MD sends an interrupt signal to the AP is the fifth number; the fourth time period is the time period after the third time period, and the electronic device keeps the screen off within the third time period and the fourth time period, and between the third time period and the fourth time period.

[0008] Optionally, screen turning off may include completely turning off the screen and displaying a screen turning off interface.

[0009] It can be understood that, when a normal second SIM card is installed in an electronic device, when the screen is off, the electronic device receives a data packet, and the MD wakes up the AP once through an interrupt signal. Therefore, the number of data packets sent by the operator received by the electronic device in the third time period and the fourth time period is the same as the number of times the MD wakes up the AP (that is, the number of times the MD sends an interrupt signal to the AP).

[0010] The SIM card management method provided in the first aspect of the present application is that when the first SIM card installed in the electronic device is shut down or there is a network speed limit, during the first time period when the screen is off, the number of data packets sent by the operator received by the electronic device is the same as the number of times the MD sends an interrupt signal to the AP, both of which are the first number. During the second time period, the electronic device intercepts the interrupt signal, so that the number of times the MD sends a terminal interrupt signal to the AP (the third number) is less than the number of data packets sent by the electronic device by the operator (the second number). In this way, the number of times the MD wakes up the AP is reduced, solving the problem of increased device power consumption caused by SIM card shutdown or abnormal network speed limit, saving power, extending the standby time of the electronic device, and improving the user experience.

[0011] In combination with the first aspect, in some implementations of the first aspect, after the first time period and before replacing the first SIM card with the second SIM card, the method further includes: the electronic device displays a prompt message; the prompt message indicates that an abnormality exists in the first SIM card.

[0012] In this implementation, the reminder information is displayed to remind the user that the first SIM card has an abnormality, so that the user can solve the card abnormality problem in time, thereby solving the problem of increased standby power consumption caused by the SIM card abnormality and improving user experience.

[0013] In a possible implementation, after the first time period and before replacing the first SIM card with the second SIM card, the method further includes: when the screen is off, the electronic device disables the first SIM card within a fifth time period; the fifth time period is within a preset time period.

[0014] In this implementation, the first SIM card is disabled, and the MD stops sending and receiving data, so the MD no longer wakes up the AP, thereby reducing power consumption; and disabling the first SIM card can solve the problem of DDR not being powered off caused by the abnormality of the first SIM card, thereby reducing power consumption, saving electricity, extending the standby time of the electronic device, and improving user experience.

[0015] Optionally, the preset time period may be, for example, a time period at night, such as 00:00 to 06:00, etc. That is, the first SIM card may be disabled at night. In this way, the impact of disabling the SIM card on the user can be reduced, thereby improving the user experience.

[0016] In a possible implementation, the electronic device also includes a double rate synchronous dynamic random access memory DDR, and the method also includes: within a first time period, the electronic device obtains target data, the target data includes at least one of AP sleep data, AP wake-up data, DDR frequency change data, MD interrupt data and a data receiving object; the AP sleep data includes the time when the AP enters the sleep state, the AP wake-up data includes the time when the AP is awakened, the DDR frequency change data includes the time and frequency when the DDR operating frequency changes, the MD interrupt data includes the time when the MD sends an interrupt signal to the AP, and the data receiving object represents the receiving object of the data packet transmitted by the MD to the AP; according to the target data, it is determined that the first SIM card is shut down or there is a network speed limit.

[0017] The first SIM card has a network speed limit or is shut down, which may cause the DDR to not be powered off, or the MD to frequently wake up the AP, etc. Therefore, the method provided by this implementation can intuitively and accurately determine whether the SIM card is shut down or has a network speed limit anomaly by obtaining at least one of AP sleep data, AP wakeup data, DDR frequency change data, MD interruption data and data receiving objects, that is, improve the accuracy of SIM card anomaly detection.

[0018] In a possible implementation, determining that the first SIM card is shut down or that there is a network speed limit based on target data includes: determining that a first preset condition is met based on the target data; the first preset condition includes: when the AP is in a dormant state, the DDR's non-power-off time is greater than a preset time threshold, or the number of MD awakening the AP caused by the first type of data packet is greater than a preset interruption threshold, or the number of MD awakening the AP caused by the network speed limit is greater than the preset interruption threshold; the DDR's non-power-off time refers to the total time the DDR runs in a working mode, and the first type of data packet refers to a data packet whose data receiving object is an application; according to the preset detection strategy, when it is determined that the second preset condition is met, it is determined that the first SIM card is shut down or there is a network speed limit.

[0019] In this implementation, after the target data determines that the first preset condition is met and the SIM card is initially determined to be abnormal, the preset detection strategy is further used to determine whether the second preset condition is met, thereby confirming whether the first SIM card is shut down or has a network speed limit abnormality. In this way, through two-level abnormality detection, the accuracy of SIM card abnormality detection is improved, thereby preventing the normal operation of electronic equipment from being affected by power consumption miscontrol, and further improving the user experience.

[0020] In a possible implementation, the target data includes AP wake-up data, AP sleep data and DDR frequency change data. According to the target data, it is determined that the first preset condition is met, including: based on the AP wake-up data and the AP sleep data, determining whether the duration of the most recent sleep period is greater than the preset sleep duration; the sleep period refers to the time period in which the AP is continuously in a sleep state, and the most recent sleep duration refers to the sleep period closest to the current moment; if the duration of the most recent sleep period is greater than the preset sleep duration, then based on the DDR frequency change data in the most recent sleep period, determining whether the non-power-off duration of the DDR in the most recent sleep period is greater than the preset duration threshold; if the non-power-off duration of the DDR in the most recent sleep period is greater than the preset duration threshold, it is determined that the first preset condition is met.

[0021] In a possible implementation, the preset duration threshold is the product of the duration of the most recent sleep period and the preset ratio. In this way, the preset duration threshold is associated with the duration of the most recent sleep period, so that the condition for determining whether the DDR is not powered off is more accurate, and thus the abnormality detection result of the SIM card is more accurate.

[0022] In a possible implementation, the target data includes MD interruption data and a data receiving object. According to the target data, determining whether the first preset condition is met includes: determining whether the number of MD interruptions within the timing time period is greater than a preset interruption number threshold value according to the MD interruption data within the timing time period; the timing time period is within the first time period, and the duration of the timing time period is the preset detection cycle duration; if the number of MD interruptions within the timing time period is greater than the preset interruption number threshold value, determining, according to the data receiving object, whether the proportion of first-class data packets in the data packets transmitted from the MD to the AP within the timing time period is less than a preset proportion; if the proportion of first-class data packets is less than the preset proportion, determining that the first preset condition is met.

[0023] In one possible implementation, the method also includes: if the proportion of first-class data packets is greater than or equal to a preset proportion, determining whether the number of first-class data packets within the timing time period is greater than a preset number, and whether the data volume of each first-class data packet is less than a preset data volume threshold; if the number of first-class data packets within the timing time period is greater than the preset number, and the data volume of each first-class data packet is less than the preset data volume threshold, determining that the first preset condition is met.

[0024] In one possible implementation, based on the MD interruption data within the timing time period, determining whether the number of MD interruptions within the timing time period is greater than a preset interruption number threshold, the method also includes: in response to the electronic device turning off the screen, starting the timing with the moment when the screen is turned off as the starting moment of the timing time period; if the timing reaches the preset detection cycle length, stopping the timing and obtaining the MD interruption data within the timing time period.

[0025] In one possible implementation, the method also includes: if the number of first-class data packets within the timing time period is less than or equal to a preset number, or the data volume of at least one first-class data packet is greater than or equal to a preset data volume threshold, then the timing is restarted with the current moment as the starting moment of the timing time period, and the execution is returned. If the timing reaches the preset detection cycle length, the timing is stopped, and the MD interruption data within the timing time period is obtained.

[0026] That is to say, if within the timing period, the number of times the first type of data packet causes the MD to wake up the AP is greater than the preset interruption threshold, and the number of times the network speed limit causes the MD to wake up the AP is greater than the preset interruption threshold, the timing is restarted and the above judgment process is repeated to make a judgment on the next detection cycle.

[0027] In a possible implementation, the preset detection strategy includes a first detection strategy and a second detection strategy;

[0028] The first detection strategy includes at least one of the following strategies: detecting the state of the first SIM card through the communication detection interface of the MD to determine whether the first SIM card is shut down; querying the operator about the state of the first SIM card to determine whether the first SIM card is shut down;

[0029] The second detection strategy includes at least one of the following strategies: detecting the status of the first SIM card through the speed limit detection interface of the MD to determine whether the first SIM card has a network speed limit; querying the operator about the status of the first SIM card to determine whether the first SIM card has a network speed limit; performing a network speed test on the electronic device to determine whether the first SIM card has a network speed limit; obtaining the traffic monitoring result of the electronic device, and determining whether the first SIM card has a network speed limit based on the traffic monitoring result.

[0030] When the preset detection strategy is the first detection strategy, the second preset condition may be: the first SIM card is shut down.

[0031] When the preset detection strategy is the second detection strategy, the second preset condition may be: there is a network speed limit on the first SIM card.

[0032] In a second aspect, the present application provides a device, which is included in an electronic device, and the device has the function of implementing the electronic device behavior in the above-mentioned first aspect and the possible implementation of the above-mentioned first aspect. The function can be implemented by hardware, or it can be implemented by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above-mentioned functions. For example, a receiving module or unit, a processing module or unit, etc.

[0033] In a third aspect, the present application provides an electronic device, comprising: a processor, a memory, and an interface; the processor, the memory, and the interface cooperate with each other so that the electronic device executes any one of the methods in the technical solution of the first aspect.

[0034] In a fourth aspect, the present application provides a chip, including a processor. The processor is used to read and execute a computer program stored in a memory to perform the method in the first aspect and any possible implementation thereof.

[0035] Optionally, the chip also includes a memory, and the memory is connected to the processor via a circuit or wire.

[0036] Further optionally, the chip also includes a communication interface.

[0037] In a fifth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes any one of the methods in the technical solution of the first aspect.

[0038] In a sixth aspect, the present application provides a computer program product, the computer program product comprising: a computer program code, when the computer program code runs on an electronic device, the electronic device executes any one of the methods in the technical solution of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 This is an example of an electric quantity monitoring data diagram provided in an embodiment of the present application;

[0040] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0041] Figure 3 is a structural block diagram of an electronic device provided in an embodiment of the present application;

[0042] Figure 4 This is a timing diagram of a SIM card management method provided in an embodiment of the present application;

[0043] Figure 5 This is a schematic diagram of an interface including reminder information provided in an embodiment of the present application;

[0044] Figure 6 This is a schematic diagram of data flow in a SIM card communication process of an electronic device provided in an embodiment of the present application;

[0045] Figure 7 This is a schematic diagram of monitoring data under a SIM card network speed limit condition provided in an embodiment of the present application;

[0046] Figure 8 This is a schematic diagram of the principle of an example of inter-core interrupt communication provided in an embodiment of the present application;

[0047] Fig. 9 This is a schematic diagram of a principle of shared memory communication provided by an embodiment of the present application;

[0048] Fig.10 This is a schematic diagram of the operation data and DDR frequency distribution of an AP in a certain period of time in a case where a SIM card arrears causes shutdown, provided in an embodiment of the present application;

[0049] Fig.11 This is a flowchart of a SIM card management method provided in an embodiment of the present application;

[0050] Fig.12 It is a flowchart of another SIM card management method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0052] In the following, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", and "third" may explicitly or implicitly include one or more of the features.

[0053] References to "one embodiment" or "some embodiments" etc. described in the specification of the present application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in the specification of the present application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0054] In order to better understand the embodiments of the present application, the terms or concepts that may be involved in the embodiments are explained below.

[0055] 1. Double rate synchronous dynamic random access memory

[0056] Double data rate synchronous dynamic random access memory is called double data rate synchronous dynamic random access memory, and its English abbreviation is DDR SDRAM. DDR SDRAM is an SDRAM with double data rate, and its data transmission speed is twice the system clock frequency. People are generally accustomed to abbreviating DDR SDRAM as DDR, and it is also referred to as DDR in the embodiments of this application.

[0057] DDR has multiple operating frequencies (also called operating frequency points). The operating frequency of DDR is different in different operating modes; and the operating frequency of DDR is different in different data amounts stored or read. Specifically, DDR can operate in low power mode (LPM) and working mode (also called non-low power mode). In low power mode, DDR operates at a preset frequency (this frequency may be different for DDRs of different specifications and models). In working mode, DDR switches between several preset frequencies according to the amount of data stored or read. In a specific embodiment, the frequency of DDR can be represented by an index value (index), and each index value corresponds to an actual frequency of DDR. The frequency index value of DDR can be set according to actual needs. For example, the index value of the frequency of DDR in working mode can include one or more of 10000, 10001, 10002...10009.

[0058] 2. Modem processor

[0059] The modem processor is called modem in English, abbreviated as MD. MD can include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.

[0060] The signals received and sent by electronic devices all need to be processed by the MD. Specifically, the signal received by the electronic device through the antenna is demodulated by the MD and sent to other modules of the device (such as the application processor) for processing. When the electronic device needs to send a signal, it is first modulated by the MD, then amplified, and converted into electromagnetic waves for radiation through the antenna.

[0061] 3. Application Processor

[0062] The full name of application processor is application processor, abbreviated as AP. AP is an important part of the processor of electronic equipment. AP is responsible for the system operation of electronic equipment and the operation of application (APP). The demodulated signal of MD of electronic equipment will be transmitted to AP for processing.

[0063] The operation state of an AP may include a working state and a dormant state, etc. When an AP is in a dormant state, if a preset trigger condition is met, the AP enters a working state from the dormant state, which is called AP awakening.

[0064] 4. Inter-core communication

[0065] Inter-process communication is the full name of inter-core communication, abbreviated as IPC. IPC refers to the communication between different cores in a multi-core processor due to application requirements. The inter-core communication methods of a multi-core processor include inter-core interrupts and shared memory. When using inter-core interrupts and shared memory to communicate, the cores will wake up the other end by sending interrupt signals (also called interrupt notifications, interrupt reminders, etc.).

[0066] 5. SIM card abnormality

[0067] SIM card abnormality means that the SIM card cannot work normally. The SIM card abnormalities involved in the embodiments of the present application mainly include the following:

[0068]

[0069] In the embodiment of the present application, normal communication refers to communication between terminal devices based on SIM cards, including phone calls, text messages, data transmission through mobile data functions, etc. The above-mentioned SIM card cannot communicate normally means that the SIM card cannot normally realize all communication functions. The SIM card cannot communicate normally includes two situations: some communication functions of the SIM card are abnormal, and all communication functions of the SIM card are abnormal.

[0070] The inability of the SIM card to communicate normally includes the situation where the SIM card is shut down. SIM card shutdown means that the normal communication function of the electronic device is restricted due to arrears, user loss report, etc., that is, it cannot communicate normally with other terminal devices based on the SIM card.

[0071] It should be noted that Table 1 is only used to illustrate the abnormal situation of the SIM card and does not constitute any limitation. In actual applications, the abnormal type, cause, and manifestation of the SIM card may include more or less content than Table 1.

[0072] The technical issues of this application are explained below.

[0073] The inventor has found that in some cases, when using an electronic device with a SIM card installed, the electronic device will consume power quickly in standby mode. Standby power consumption refers to the power consumption of an electronic device when it is in standby mode. Standby mode means that the electronic device is powered on, but the user does not operate the electronic device, and the electronic device does not process user-specified tasks. Generally, after the screen of an electronic device is turned off, the electronic device enters standby mode.

[0074] Figure 1 This is a power monitoring data diagram provided by an embodiment of the present application. Taking the electronic device as a mobile phone as an example, Figure 1 Figure (a) in FIG. 1 is part of the data obtained by continuously monitoring the power consumption of the mobile phone in the standby state. The power consumption corresponding to each sampling moment is shown as 101 in the figure. It can be seen that in the standby state, the mobile phone continues to consume power, and the power consumption is relatively large. Figure 1 Figure (b) shows the various power statistics of the mobile phone during the standby period of 4 hours, 51 minutes and 38 seconds (i.e., 4h51m38s). From the power change and total power consumption shown in Figure 102, it can be seen that during this 4h51m38s, the power consumption dropped from 540 milliamperes (mAh) (11%) to 180mAh (2%), and the total power consumption was 3360mAh (9%). In short, Figure 1 As can be seen from Figures (a) and (b) in the figure, the phone consumes power quickly when in standby mode.

[0075] For Figure 1The inventors analyzed and investigated the phenomenon shown and found that it was caused by the SIM card installed in the mobile phone being out of service due to arrears, which resulted in abnormal communication functions of some SIM cards.

[0076] In another case, a user reported that after changing the SIM card one day, the phone's power consumption increased at night. After analysis and investigation, the inventor found that this was because the monthly traffic of the replaced SIM card exceeded the operator's limited traffic, and the operator restricted the network speed of the SIM card, that is, the SIM card network speed was limited.

[0077] In addition to the above two cases, the inventor also found that the problem of increased power consumption of the mobile phone will occur in scenarios where the SIM card cannot be recognized, such as when the SIM card identity information is invalid, the SIM card hardware is damaged, the contact between the SIM card and the SIM card interface is poor, and when the SIM card can be recognized but cannot communicate.

[0078] In short, when an abnormality occurs in the SIM card, the standby power consumption of the electronic device increases, resulting in an increase in standby power consumption. The increase in standby power consumption will seriously affect the user experience, especially in the current scenario where electronic devices support multiple SIM cards. If one of the SIM cards is abnormal, the electronic device may automatically switch to other SIM cards for data communication, making the user unaware of the abnormality of the SIM card, but only aware of the rapid decrease in the device power, further aggravating the user's poor experience.

[0079] In view of the above technical problems, the embodiment of the present application provides a SIM card management method for detecting whether a SIM card is abnormal, and outputting a reminder message when the SIM card is abnormal so that the user can solve the card abnormality problem in time, thereby solving the problem of increased standby power consumption caused by the SIM card abnormality. In addition, when the SIM card is abnormal, power consumption control can also be performed to solve the problem of increased standby power consumption caused by the SIM card abnormality, thereby reducing standby power consumption, extending the standby time of the device, and improving user experience.

[0080] The SIM card management method provided in the embodiment of the present application can be applied to mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA) and other electronic devices that can be installed with SIM cards. The electronic device can be a terminal device, and the embodiment of the present application does not impose any restrictions on the specific type of the electronic device.

[0081] For example, Figure 21 is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. 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, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a SIM card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0082] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0083] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0084] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0085] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0086] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM interface, and / or a universal serial bus (USB) interface, etc.

[0087] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.

[0088] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

[0089] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to implement the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0090] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.

[0091] The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0092] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0093] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

[0094] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0095] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0096] 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, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0097] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0098] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Figure 2 The structures of antenna 1 and antenna 2 in the electronic device 100 are only examples. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0099] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0100] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0101] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. 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 the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0102] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. GNSS may include the global positioning system (GPS), the global navigation satellite system (GLONASS), the Beidou navigation satellite system (BDS), the quasi-zenith satellite system (QZSS) and / or the satellite based augmentation system (SBAS).

[0103] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0104] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.

[0105] 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 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0106] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0107] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into the SIM card interface 195, or pulled out from the SIM card interface 195, to achieve contact and separation with the electronic device 100. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to achieve functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0108] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0109] Figure 3 1 is a block diagram of the electronic device 100 of an embodiment of the present application, which shows the structure of the software and hardware of the electronic device 100. Among them, the software adopts a layered architecture. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, the application layer, the application framework layer, the Android runtime (Android runtime) and the system library, and the kernel layer. The application layer may include a series of application packages.

[0110] like Figure 3 As shown, the application package can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications. Among them, navigation, Bluetooth, video Figure 3 As shown in the figure.

[0111] In the embodiment of the present application, the application layer may also include applications such as anomaly detection and power consumption management. The anomaly detection application is used to determine whether the first preset condition is met based on the target data and the screen status message, so as to preliminarily determine whether the SIM card is abnormal. In a specific embodiment, the program of the anomaly detection application may be Dubai. The target data and the screen status message are described later.

[0112] The power consumption management application is used to control the power consumption of electronic devices. In an embodiment of the present application, the power consumption management application is also used to determine whether the SIM card meets the second preset condition when the abnormality detection application determines that the first preset condition is met (i.e., preliminarily determines that the SIM card is abnormal), so as to determine whether the SIM card is abnormal, and when it is determined that the SIM card is abnormal, output a reminder message and / or perform power consumption control. Among them, the reminder message is used to prompt the user that there is an abnormality in the SIM card. In a specific embodiment, the power consumption management application can be a power saving wizard.

[0113] For the sake of convenience, in the following embodiments, the abnormality detection application is Dubai and the power consumption management application is Power Saving Wizard.

[0114] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0115] like Figure 3 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0116] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0117] Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0118] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0119] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including connecting, hanging up, etc.).

[0120] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0121] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0122] In an embodiment of the present application, the application framework layer may further include a screen monitoring module. The screen monitoring module is used to monitor the state of the screen. The state of the screen may include a screen-on state and a screen-off state, etc. The screen monitoring module is also used to send a screen state change message to Dubai when the screen state changes. Specifically, when the screen enters a screen-off state from a screen-on state, the screen monitoring module sends a screen-off message to Dubai. The screen-off message indicates that the screen enters a screen-off state from a screen-on state. When the screen enters a screen-on state from a screen-off state, the screen monitoring module sends a screen-on message to Dubai. The screen-on message indicates that the screen enters a screen-on state from a screen-off state.

[0123] It should be noted that, in other embodiments, the screen monitoring module may also be located at other layers of the software architecture layer, such as the application layer or the kernel layer, etc., and the embodiments of the present application do not impose any limitation on this.

[0124] Android runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0125] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0126] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0127] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0128] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0129] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0130] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0131] A 2D graphics engine is a drawing engine for 2D drawings.

[0132] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0133] In the embodiment of the present application, the kernel layer also includes a data acquisition module. The data acquisition module is used to acquire target data and report the target data to Dubai. The target data may include one or more of AP sleep data, AP wake-up data, DDR frequency change data, MD interrupt data, and data receiving objects. AP sleep data is related data of the AP entering a sleep state. AP wake-up data is related data of the AP being awakened, DDR frequency change data is related data of the change in the operating frequency of the DDR, and MD interrupt data is related data of the MD sending an interrupt signal to the AP.

[0134] AP sleep data includes but is not limited to the time when the AP enters the sleep state (hereinafter referred to as the AP sleep time), etc. AP wake-up data includes but is not limited to the time when the AP is awakened (hereinafter referred to as the AP wake-up time), etc. DDR frequency change data is also called DDR frequency point change data, including but not limited to the time when the DDR frequency changes and the frequency after the change, etc. MD interrupt data includes but is not limited to the time when the MD sends an interrupt signal to the AP, etc. Optionally, the above-mentioned device operation data can be acquired and reported in the form of events. That is, the data acquisition module acquires the AP sleep event, the AP wake-up event, the DDR frequency change event and the MD interrupt event, as well as the timestamps of these events, etc., and reports these events and timestamps to Dubai of the application layer.

[0135] The data receiving object refers to the final receiving object of the data packet transmitted to the AP via the MD, that is, the sending target of the data packet. The final receiving object of the data packet may be an application in the electronic device, or a protocol layer of the AP, etc.

[0136] In addition, the kernel layer may also include a SIM identification module. The SIM identification module is used to read and identify the user identity information associated with the SIM card. The identification results of the SIM identification module may include identification success and identification failure. Identification success means that the SIM card can normally identify and read the user identity information of the SIM card. Identification failure means that the SIM card cannot identify and read the user identity information of the SIM card. In the case of invalid SIM card identity information, damaged SIM card hardware, poor contact between the SIM card and the SIM card interface, the SIM identification module will fail to read the card. When the identification result of the SIM identification module is identification failure, the SIM identification module can report the identification result to Dubai. Optionally, the triggering of the SIM identification module identification action can be triggered by the insertion of the SIM card into the SIM card interface, or by other software operations, for example, periodically triggering the SIM identification module action according to a preset program.

[0137] It can be understood that in some embodiments, the SIM identification module may also be located in other layers of the software architecture, such as the application architecture layer.

[0138] The hardware layer includes at least devices such as AP, DDR and MD.

[0139] For ease of understanding, the following embodiments of the present application will be described in detail with Figure 2 and Figure 3 Taking the electronic device with the structure shown as an example, the SIM card management method provided in the embodiment of the present application is specifically described in combination with the accompanying drawings and application scenarios.

[0140] Figure 4 : is a timing diagram of a SIM card management method provided in an embodiment of the present application, the method comprising:

[0141] S101. A data acquisition module of a kernel layer acquires target data, where the target data includes at least one of AP sleep data, AP wake-up data, DDR frequency change data, MD interrupt data, and data receiving objects.

[0142] S102: The data acquisition module of the kernel layer reports the target data to Dubai of the application layer.

[0143] S103: The screen monitoring module of the application framework layer monitors the screen status.

[0144] S104: When the screen status changes, the screen monitoring module of the application framework layer sends a screen status change message to Dubai.

[0145] It should be noted that the above steps S101 and S103 can be performed continuously. Moreover, the above steps S101-S102 and steps S103-S104 are not sequentially distinguished, and the two groups of steps can be performed simultaneously.

[0146] S105. Dubai determines whether the first preset condition is met according to the screen state change message and the target data; if so, execute step S106; if not, end this detection.

[0147] The first preset condition is the condition that Dubai determines that there is an abnormality in the SIM card.

[0148] According to the screen status change message and the target data, if it is determined that the first preset condition is met, it means that Dubai preliminarily determines that there is an abnormality in the SIM card, and step S106 is executed; if it is determined that the first preset condition is not met, it means that Dubai preliminarily determines that there is no abnormality in the SIM card, and no processing is performed, and this detection is ended.

[0149] It can be understood that in this embodiment, for the abnormality detection of the SIM card (i.e., detecting whether the SIM card is abnormal), a detection process may include a preliminary detection process and a secondary detection process. The above steps S105 to S107 are a preliminary detection process, which is used to preliminarily detect whether the SIM card is abnormal. In practical applications, the abnormality detection of the SIM card can be triggered by a preset event. The event that triggers the detection may be, for example, the screen entering the off state, etc. Every time a preset event occurs, the abnormality detection process of the SIM card is triggered once. In the embodiment of the present application, this detection refers to the detection process triggered by the occurrence of the preset event this time, including a preliminary detection process and a secondary detection process. Ending this detection refers to ending the detection process triggered by this preset event.

[0150] The specific implementation of this step may refer to the following steps S201 to S210.

[0151] S106. Dubai sends a card abnormality message to the power saving wizard of the application layer, where the card abnormality message indicates that an abnormality exists in the SIM card.

[0152] Optionally, the card exception message may be reflected by assigning a preset value to a flag bit, or in the form of an event, or in the form of other preset data information, and the embodiments of the present application do not impose any limitation on this.

[0153] S107, the power saving wizard responds to the card abnormality message and determines whether the SIM card meets the second preset condition according to the preset detection strategy; if so, execute step S108, if not, end this detection.

[0154] This step is the secondary detection process in the SIM card abnormality detection process, that is, it is used to confirm for the second time whether there is an abnormality in the SIM card.

[0155] The preset detection strategy is used to detect whether the SIM card has at least one of the following anomalies: failure to communicate normally, failure to be identified, and network speed limitation.

[0156] The second preset condition is the condition that the power saving wizard determines that there is an abnormality in the SIM card.

[0157] If, according to the preset detection strategy, it is determined that the SIM card meets the second preset condition, it means that the power saving wizard determines that there is an abnormality in the SIM card, and step S108 is executed; if it is determined that the SIM card does not meet the second preset condition, it means that the power saving wizard determines that there is no abnormality in the SIM card, and no processing is performed, and this detection ends.

[0158] S108. The power saving wizard outputs reminder information and / or performs power consumption control. The reminder information is used to inform the user that there is an abnormality in the SIM card.

[0159] That is, when the power saving wizard determines that there is an abnormality in the SIM card, it outputs a reminder message, or performs power consumption control, or outputs a reminder message and performs power consumption control.

[0160] Optionally, the reminder information may be a voice reminder information, or an interface reminder information such as a pop-up window, a notification information, etc. In a specific embodiment, the reminder information output by the power saving wizard may be as follows: Figure 5 shown.

[0161] Optionally, the power consumption control includes but is not limited to at least one of intercepting an interrupt signal sent by the MD, disabling a SIM card, etc. For details, refer to step S213 of the following embodiment.

[0162] In this embodiment, based on AP sleep data, AP wake-up data, DDR frequency change data, MD interruption data, data receiving object and screen status change message, it is determined whether the first preset condition is met, and based on the preset detection strategy, it is determined whether the SIM card meets the second preset condition to determine whether the SIM card is abnormal. In the case of SIM card abnormality, a reminder message is output and / or power consumption control is performed. In this way, the SIM card abnormality can be detected in time, and the user can be reminded to solve the card abnormality problem in time, thereby solving the problem of increased standby power consumption caused by SIM card abnormality. Moreover, the problem of increased standby power consumption caused by SIM card abnormality can be solved through power consumption control, thereby reducing standby power consumption, increasing the standby time of the device, and improving user experience. In addition, when the first preset condition is met and Dubai preliminarily determines that the SIM card is abnormal, the power saving wizard further confirms that the SIM card is abnormal before outputting a reminder message and / or performing power consumption control, which improves the accuracy of SIM card abnormality judgment, prevents the power consumption error control from affecting the normal operation of electronic equipment, and further improves user experience.

[0163] In another embodiment, when the identification result of the SIM identification module card is identification failure, the above step S107 may not be performed. Specifically, in the SIM card management method, before S107, the following may also be included:

[0164] a. The SIM identification module identifies and reads the information of the SIM card.

[0165] b. When the SIM identification module fails to identify, the SIM identification module sends an identification failure message to Dubai.

[0166] c. Dubai sends the recognition failure message to the Power Saving Wizard.

[0167] The above step S107 may include:

[0168] The power saving wizard responds to the card abnormality message and confirms whether it has received the identification failure message sent by Dubai;

[0169] If a recognition failure message sent by Dubai is received, step S108 is executed;

[0170] If the recognition failure message sent by Dubai is not received, step S107 is executed.

[0171] In this embodiment, after the SIM identification module fails to identify and Dubai sends a card abnormality message to the power saving wizard (i.e., Dubai preliminarily determines that the SIM card has an abnormality), the power saving wizard no longer confirms whether the SIM card meets the second preset condition, but directly outputs a reminder message and / or performs power consumption. In this way, on the one hand, the problem of increased standby power consumption caused by the SIM card being unable to be identified is solved, the standby power consumption is reduced, the standby time of the device is extended, and the user experience is improved; on the other hand, the SIM identification module can already confirm that there is an abnormality that the SIM card cannot be identified, and the power saving wizard does not need to repeat the confirmation according to the preset detection strategy, which saves the algorithm process, simplifies the algorithm, and further saves the power consumption of the electronic device.

[0172] The following further describes the implementation process of the SIM card management method in conjunction with the accompanying drawings, so as to explain in detail the specific methods of Dubai and Power Saving Wizard to determine whether the SIM card is abnormal, as well as power consumption control.

[0173] In order to facilitate understanding of the solution, we first analyze the reasons why SIM card abnormalities cause increased power consumption of electronic devices.

[0174] 1. SIM card network speed limit causes increased power consumption

[0175] For example, Figure 6 This is a schematic diagram of data flow in an electronic device based on a SIM card communication process provided in an embodiment of the present application. Figure 6 As shown, in the process of SIM card communication, the data transmission path of the electronic device is: antenna, MD and AP. Among them, the data can be transmitted between MD and AP through the DPMAIF data path. The AP side may include functional modules such as CCMNI, Linux network stack (net stack) and user (user) module. CCMNI is a raw IP type network device (raw IP netdevice). Optionally, the user module can be a module in the AP responsible for the operation of the application.

[0176] Taking the electronic device receiving data as an example, the specific data transmission process is as follows: 1) The antenna receives the data packet and sends the data packet to the MD; 2) The MD sends the data packet to the AP through DPMAIF; 3) The driver that controls DPMAIF on the AP side pushes the data packet to CCMNI; 4) CCMNI holds the wake-up lock (ccmni_md1) for a preset duration (for example, 1s) and sends the data packet to the Linux net stack; 5) The Linux net stack sends the data packet to the user module.

[0177] When an electronic device sends data, the data transmission process is opposite to the above process and will not be repeated here.

[0178] When the SIM card network is speed-limited, the data transmission rate is reduced. When transmitting data through the above path, the data packet will be split into multiple small data packets before transmission. As a result, compared with the network without speed limit, when the SIM card network is speed-limited, to complete the transmission of a data packet, CCMNI needs a longer lock time, which will cause the AP to work continuously, and the number of data packets sent by the MD increases, and the number of interrupt signals sent by the MD to the AP increases, that is, the MD frequently wakes up the AP. The continuous operation of the AP and the frequent awakening of the AP by the MD will increase the power consumption of electronic devices.

[0179] For example, Figure 7 This is a diagram of monitoring data for a SIM card network speed limit provided in an embodiment of the present application. When the power consumption of an electronic device increases at night, the network speed limit is detected, and the detection result is "FAIL", indicating that the SIM card network is speed-limited. Moreover, the detection result shows that the user was speed-limited 146 times during the use of the network. Figure 7 As shown in Figure (a) in . In view of this, the original information of frequent wake-up of electronic devices is retrieved and it is found that electronic devices frequently wake up at night, such as Figure 7 As shown in Figure (b) in the figure, the wake-up source is mainly MD waking up AP (denoted as DPMAIF_AP in the figure), that is, MD frequently wakes up AP.

[0180] That is to say, when the SIM network speed is limited, the MD frequently wakes up the AP, causing the AP to be unable to sleep, thereby increasing the power consumption of electronic equipment.

[0181] 2. The SIM card cannot communicate normally or cannot be recognized, causing increased power consumption

[0182] From the above analysis, it can be seen that in the process of electronic equipment communicating based on SIM cards, AP and MD need to communicate. AP and MD belong to different cores and need to communicate between cores. Inter-core communication generally uses inter-core interrupts or shared memory. The communication process of these two inter-core communication methods is as follows:

[0183] 1) Inter-core interrupt

[0184] During inter-core interrupt communication, the two cores use interrupt signals to wake up each other and implement data transmission through a preset protocol.

[0185] For example, Figure 8 The following is a schematic diagram of the principle of an example of inter-core interrupt communication provided in the embodiment of the present application. Figure 8As shown, when AP and MD perform inter-core interrupt communication, if the sender needs to send data, the sender sends an interrupt signal to the receiver. After the receiver receives the interrupt signal, it enters the data processing flow, the sender sends data, and the receiver receives the data sent by the sender.

[0186] 2) Shared Memory

[0187] During shared memory communication, the two cores share a memory space on the DDR side and remind the other end to read data through interrupts.

[0188] For example, Fig. 9 The following is a schematic diagram of a shared memory communication principle provided in an embodiment of the present application. Fig. 9 As shown, when the electronic device is initialized, a shared memory shared by the AP and MD is allocated on the DDR side; when data transmission is required, the sender first writes data to the shared memory; after the data is written to the shared memory, the sender sends an interrupt signal to the receiver to notify the receiver to read the data; after receiving the interrupt signal, the receiver reads the data from the shared memory.

[0189] It can be seen that both inter-core communication methods wake up the other end through interrupt signals. When the SIM card cannot communicate normally, the operator will frequently send signals (data packets) to the electronic device to confirm information such as user status due to management needs. This may cause the MD to frequently send interrupt signals to the AP and frequently wake up the AP, resulting in increased power consumption of the electronic device. When the SIM card cannot be recognized, the MD will frequently send instructions or signals (data packets) to the AP to obtain the card status, register the network, etc., which may also cause the MD to frequently send interrupt signals to the AP and frequently wake up the AP, resulting in increased power consumption of the electronic device.

[0190] It is worth noting that, when the SIM card cannot communicate normally and the SIM card cannot be identified, the recipient of the data packet sent by the MD to the AP is the protocol layer of the AP, not the user module of the AP, that is, in these two cases, the final recipient of the data packet is not the application. For the sake of convenience, in the following embodiments, among the data packets transmitted by the MD to the AP, the data packets whose data recipients are applications are called first-class data packets, which can also be called normal data packets, and the data packets whose data recipients are not applications are called second-class data packets, which can also be called abnormal data packets. In other words, when the SIM card cannot communicate normally and the SIM card cannot be identified, there is a phenomenon that the electronic device is frequently awakened by abnormal data packets.

[0191] In addition, when the shared memory mode is used for inter-core communication, when the SIM card cannot communicate normally, the operator frequently sends signals to the electronic device, or when the SIM card cannot be recognized, the MD frequently sends signals to the AP, which may not cause the MD to frequently wake up the AP, but cause the DDR to not be powered off for a long time. Specifically, as analyzed above, when the MD sends data to the AP through the shared memory mode, before the MD as the sender sends an interrupt signal to the receiving AP, the AP will first write data to the shared memory in the DDR. However, due to the abnormal SIM, the MD may not write data successfully when writing to the DDR, which in turn causes the MD to continuously write data to the DDR, so that the DDR is in working mode for a long time and cannot enter the low power mode, that is, the DDR is not powered off for a long time. Since the MD cannot successfully write data to the DDR, the MD will not send an interrupt signal to the AP, so the AP can sleep normally. In other words, the AP is in a dormant state, but the DDR is not powered off for a long time, which will increase the power consumption of the electronic equipment.

[0192] For example, Fig.10 The present invention provides an example of an example of a SIM card arrears leading to downtime, and a schematic diagram of the AP operation data and DDR frequency distribution in a certain period of time. Fig.10 As shown in Figure (a), the electronic device was off for 4h51m36s and was not charged. During this process, the AP was dormant for 4h49m9s and was awakened 116 times. During this period, the frequency distribution of DDR is shown in the figure below. Fig.10 As shown in Figure (b) in the figure. The DDR frequency shown on the horizontal axis in the figure is the possible operating frequency when DDR is in working mode. Fig.10 As shown in Figure (b), during the 4h51m36s when the screen of the electronic device was off, the total time for DDR to run in working mode was 4.86h, of which the time for running at the frequency index value of 1000 was 4.62h. This shows that during the standby period (AP is in sleep mode), DDR continues to run at a low frequency and does not enter the low power mode, which will increase the power consumption of the electronic device.

[0193] That is to say, when the SIM card cannot communicate normally and cannot be recognized, the MD frequently wakes up the AP, causing the AP to be unable to sleep, or the DDR is not powered off for a long time, thereby increasing the power consumption of electronic equipment.

[0194] Based on the above analysis, the SIM card management method provided in the embodiment of the present application detects whether the DDR is not powered off for a long time during standby, and detects whether the MD frequently wakes up the AP due to abnormal data packets or network speed limits during standby, so as to preliminarily confirm whether the SIM card is abnormal.

[0195] For example, Fig.11This is a flowchart of a SIM card management method provided by an embodiment of the present application. This embodiment focuses on the process of Dubai and Power Saving Wizard determining whether the SIM card is abnormal. The process of the data acquisition module, screen monitoring module, etc. reporting data to Dubai will not be described in detail. Figure 4 The embodiment shown. Fig.11 As shown, the SIM card management method includes:

[0196] S201. When Dubai receives AP wake-up data, it determines whether the duration of the most recent sleep period is greater than the preset sleep duration according to the AP sleep data; if so, step S202 is executed; if not, no processing is performed, and the detection is terminated.

[0197] Specifically, the AP wake-up data includes the AP wake-up time, and the AP sleep data includes the AP sleep time. The sleep period refers to the time period during which the AP is continuously in the sleep state, that is, the time period between the AP sleep time and the AP wake-up time that are adjacent in time sequence, and the AP sleep time is earlier than the AP wake-up time. It can be understood that one or more sleep periods can be determined based on the AP wake-up data and the AP sleep data. The most recent sleep period refers to the sleep period of the AP that is closest to the current time.

[0198] When Dubai receives the AP wake-up data, it can be determined that the AP is awakened. Then, Dubai obtains the AP sleep time closest to the AP wake-up time before the AP wake-up time according to the AP wake-up time in the AP wake-up data. The time period between the AP sleep time and the closest AP sleep time is the most recent sleep period. The time difference between the AP wake-up time and the most recent AP sleep time is the duration of the most recent sleep period. For example, Dubai receives the AP wake-up data sent by the data acquisition module, and the AP wake-up time contained in the AP wake-up data is T1. Then Dubai determines that the AP is awakened, and according to time T1, determines that the AP sleep time closest to T1 before T1 is T0. Therefore, it can be determined that the most recent sleep period is the time period from time T0 to time T1, and the duration of the most recent sleep period is T1-T0.

[0199] When Dubai determines that the duration of the most recent sleep period is greater than the preset sleep duration, the following step S202 is performed. Optionally, the preset sleep duration may be, for example, 60 seconds.

[0200] It should be noted that, in this embodiment, for steps S201 to S203, "this detection" is the SIM card abnormality detection process triggered by the event "Dubai receives AP wake-up data", including a preliminary detection process and a secondary detection process.

[0201] S202. Dubai obtains DDR frequency change data in a recent sleep period.

[0202] Specifically, the DDR frequency change data sent by the data acquisition module to Dubai may include the time when the DDR frequency changes each time and the frequency after the change, etc. For ease of description, the DDR frequency change data corresponding to one frequency change is called a set of DDR frequency change data. Dubai can obtain all DDR frequency change data in the most recent sleep period at the time when the DDR frequency changes, that is, Dubai obtains one or more sets of DDR frequency change data in the most recent sleep period at the time when the DDR frequency changes.

[0203] S203. Dubai determines whether the DDR power-on time in the most recent sleep period is greater than a preset time threshold based on the DDR frequency change data in the most recent sleep period; if so, execute step S211; if not, do nothing and end this detection.

[0204] The power-on time refers to the total time that DDR runs in working mode. Specifically, Dubai counts the frequency distribution of DDR in the most recent sleep period, determines the total time that DDR runs in working mode in the most recent sleep period, and obtains the power-on time of DDR. It can be understood that in working mode, DDR will switch between multiple working frequencies. Therefore, the working time corresponding to each working frequency in the DDR working mode in the most recent sleep period can be added to obtain the power-on time of DDR in the most recent sleep period.

[0205] Specifically, Dubai can calculate the working time corresponding to multiple working frequencies based on each two sets of DDR frequency change data that are adjacent in time sequence in the most recent sleep period. Then sum the time of each working frequency. For two sets of DDR frequency change data that are adjacent in time sequence, calculate the time difference between the first change moment and the second change moment, and obtain the working time of the changed frequency corresponding to the first change moment. Among them, the first change moment is earlier than the second change moment. For example, in the most recent sleep period, at 00:00:01 (0 hour 01 minute), the DDR frequency changes from F0 to F1, and at 00:00:02 (0 hour 02 minute), the DDR frequency changes from F1 to F2. Then, the DDR data in the most recent sleep period obtained by Dubai includes: the first change moment 00:00:01 and the corresponding changed frequency F1, the second change moment 00:00:02 and the corresponding changed frequency F2. The first change moment 00:00:01 and the second change moment 00:00:02 are two change moments that are adjacent in time sequence. Dubai calculates the time difference (1s) between the two moments and obtains the working time corresponding to frequency F1. That is, based on these two sets of DDR frequency change data with adjacent timing, it is calculated that the working time corresponding to frequency F1 is 1s. Similarly, based on each two sets of DDR frequency change data with adjacent timing, it can be obtained that one frequency corresponds to one working time. Afterwards, frequency statistics are performed on the obtained frequencies and working times, and the working times with the same frequency are added together to obtain the total working time corresponding to the frequency. The results of frequency statistics can be referred to Fig.10 The illustrated embodiments will not be described in detail here.

[0206] In one embodiment, the preset duration threshold may be a preset fixed duration.

[0207] In another embodiment, the preset duration threshold can also be determined based on the duration of the most recent sleep period. Optionally, the preset duration threshold can be the product of the duration of the most recent sleep period and a preset ratio. The preset ratio can be set according to actual conditions, for example, it can be 1 / 3 or 1 / 4, etc. In this case, Dubai can first determine the preset duration threshold based on the duration of the most recent sleep period and the preset ratio, and then compare the non-power-off duration of the DDR in the most recent sleep period with the preset duration threshold to determine whether the non-power-off duration of the DDR is greater than the preset duration threshold. Of course, Dubai can also first determine the ratio of the non-power-off duration to the duration of the most recent sleep period, obtain the duration ratio, and then determine whether the duration ratio is greater than the preset ratio; if so, determine that the non-power-off duration of the DDR in the most recent sleep period is greater than the preset duration threshold; if not, determine that the non-power-off duration of the DDR in the most recent sleep period is less than or equal to the preset duration threshold.

[0208] If the power-on time of the DDR in the most recent sleep period is greater than the preset time threshold, it means that the DDR has not entered the low power consumption mode for a long time (i.e., it has not been powered off for a long time), and it is preliminarily determined that there is an abnormality in the SIM card, and the following steps S211 are executed; if the power-on time of the DDR in the most recent sleep period is less than or equal to the preset time threshold, it means that the DDR has not been powered off for a long time in the most recent sleep period, and no processing is performed, i.e., this detection is ended.

[0209] As analyzed above, the inability of SIM to communicate normally or to be recognized may cause the problem that the DDR does not power off for a long time while the AP is in sleep mode. Therefore, in the above steps S201 to S203, when determining that the AP is awakened, the DDR frequency change data in the most recent sleep period is used to determine whether the DDR does not power off for a long time in the most recent sleep period is greater than the preset time threshold, so as to determine whether the DDR does not power off for a long time. In this way, a preliminary judgment of the abnormal situation of the SIM card can be made quickly and accurately, which facilitates the subsequent adoption of power consumption control and other measures, thereby saving power for electronic devices and improving user experience.

[0210] That is to say, in the above steps S201 to S203, when the duration of the most recent sleep period is longer than the preset sleep period, it is determined whether the SIM card is abnormal by judging whether the duration of the DDR power-on in the most recent sleep period is longer than the preset duration threshold. Figure 4 In the illustrated embodiment, the first preset condition in step S105 "Dubai determines whether the first preset condition is met based on the screen status change message and the target data" may include condition 1: the duration of the most recent sleep period is greater than the preset sleep duration, and the non-power-off time of the DDR in the most recent sleep period is greater than the preset duration threshold.

[0211] In addition, in addition to executing the above steps S201 to S203, Dubai can also execute the following steps S204 to S210 to determine whether there is an abnormal data packet or network speed limit caused by the MD frequently waking up the AP. It should be noted that steps S201 to S203 and steps S204 to S210 belong to two parallel branches for Dubai to determine whether the first preset condition (for preliminarily confirming whether the SIM card is abnormal) is met. The steps of these two branches can be executed independently without a time sequence.

[0212] S204. Dubai receives the screen-off message.

[0213] S205. Dubai starts timing from the current time.

[0214] That is, Dubai takes the current time as the starting point and starts the timing.

[0215] S206. During the timing process, if a screen-lit message is received before the timing reaches the preset detection cycle length, Dubai stops timing and ends this detection.

[0216] The preset detection cycle duration can be set according to actual needs, for example, it can be 60 seconds (s) or 80 seconds.

[0217] It should be noted that, in this embodiment, for steps S204 to S210, "this detection" is a detection process triggered by the event "Dubai receives screen-off message", including a preliminary detection process and a secondary detection process.

[0218] S207. If the timing reaches the preset detection cycle time, Dubai stops timing and obtains the MD interruption data within the timing period.

[0219] The timing time period is a continuous time period starting from the timing start time and lasting for the preset detection cycle length.

[0220] Taking the preset detection cycle length of 60s as an example, steps S204 to S207 are illustrated as follows: Dubai receives a screen-off message at time A, then Dubai starts timing from time A. If Dubai receives a screen-on message before the timing reaches 60s (that is, before time A+60s), the timing is stopped. For example, if the timing reaches 30s, that is, the screen-on message is received at time A+30s, the timing is stopped. If the timing reaches 60s, it means that no screen-on message is received during the timing process, then the timing is stopped, and the MD interruption data in the time period from time A to time A+60s is obtained.

[0221] S208. Dubai determines whether the number of times the MD sends an interrupt signal to the AP is greater than a preset interruption number threshold according to the MD interruption data in the timing period; if so, execute step S209; if not, return to execute step S205.

[0222] As described in the above embodiment, the MD interruption data may include the time when the MD sends an interruption signal to the AP, etc. Dubai counts the number of interruption signals from the MD to the AP whose sending time is within the timing time period, that is, the number of times the MD sends interruption signals to the AP within the timing time period.

[0223] The preset interruption number threshold can be set according to actual needs. For example, when the preset detection cycle duration is 60 seconds, the preset interruption number threshold can be 10 times.

[0224] If the number of interrupt signals sent by the MD to the AP is greater than the preset interrupt threshold, it means that the MD frequently wakes up the AP during the timing period, and there may be a SIM card abnormality, and step S209 is executed. If the number of interrupt signals sent by the MD is less than or equal to the preset interrupt threshold, it means that the MD does not frequently wake up the AP during the timing period, and the process returns to step S205 to enter the next cycle of detection. It should be noted that the "current time" in step S205 is the time when this step is executed.

[0225] S209. Dubai determines, according to the data receiving object, whether the proportion of normal data packets in the data packets transmitted from the MD to the AP during the timing period is less than the preset proportion; if not, execute step S210; if so, execute step S211; normal data packets refer to data packets whose data receiving object is an application.

[0226] As analyzed above, when the SIM card cannot communicate normally and cannot be recognized, the data packets transmitted by the MD to the AP are abnormal data packets (data packets whose data recipient object is not an application). Therefore, in this step, when it is determined that the number of times the MD sends an interrupt signal is greater than the preset interruption number threshold, it is further determined whether the proportion of normal data packets in the data packets transmitted by the MD to the AP during the timing period is less than the preset proportion, so as to determine whether the frequent wake-ups are frequent wake-ups caused by abnormal data packets.

[0227] Specifically, Dubai obtains the receiving object of each data packet transmitted from MD to AP within the timing time period, and determines whether each data receiving object is an application installed in the electronic device. If the receiver or sender of the data packet is an application installed in the electronic device, the data packet is determined to be a normal data packet; otherwise, the data packet is determined to be an abnormal data packet. If the proportion of normal data packets in the data packets transmitted by MD within the timing time period is greater than or equal to the preset proportion, it means that MD frequently wakes up AP mostly due to the application running requirements, rather than abnormal data packets, and it is determined that there is no abnormality in the SIM card that cannot communicate normally or cannot be recognized, then step S210 is executed to further detect whether the frequent wake-up is caused by the network speed limit. If the proportion of normal data packets in the data packets transmitted from MD to AP within the timing time period is less than the preset proportion, it means that MD frequently wakes up AP mostly due to the application running requirements, but due to abnormal data packets, and it is preliminarily determined that there is an abnormality in the SIM card that cannot communicate normally or cannot be recognized, and step S211 is executed.

[0228] The preset proportion can be set according to actual needs. For example, when the preset detection cycle duration is 60 seconds, the preset proportion can be 60%.

[0229] S210. Dubai determines whether the number of normal data packets within the timing time period is greater than a preset number, and whether the data volume of each normal data packet is less than a preset data volume threshold; if the number of normal data packets is greater than the preset number, and the data volume of each normal data packet is less than the preset data volume threshold, execute step S211; otherwise, return to execute step S205.

[0230] Optionally, when the preset detection cycle duration is 60 seconds, the preset number may be, for example, 1000. The data volume of a data packet is also the size of the data packet. The preset data volume threshold is a threshold representing the size of the data packet, for example, may be 20 bytes.

[0231] If the number of normal data packets is greater than the preset number within the timing period, and the number of each normal data packet is less than the preset data volume threshold, it means that the electronic device has transmitted a large number of normal data packets within the timing period, and each data packet is small, indicating that the frequent awakening of the AP by the MD in the timing period is caused by the network speed limit of the SIM card, and then step S211 is executed. If the number of normal data packets is less than or equal to the preset number within the timing period, or the number of each normal data packet is not less than the preset data volume threshold, it means that the frequent awakening within the timing period is caused by the normal transmission of normal data packets, and there is no network speed limit on the SIM card, then the process returns to step S205 and enters the next cycle of detection.

[0232] In short, Dubai periodically detects the number of interruption signals sent by MD and the proportion of normal data packets in the data packets transmitted by MD to AP based on the screen status change message and when it determines that the electronic device is in the screen-off state. In one cycle, the number of interruption signals sent by MD is greater than the preset interruption threshold, and the proportion of normal data packets in the data packets transmitted by MD to AP is less than the preset proportion, indicating that the transmission of abnormal data packets in the cycle causes MD to frequently wake up AP. Dubai preliminarily determines that the SIM card may not be able to communicate normally or cannot be identified, and executes step S211. Among them, the periodic detection cycle duration is the above-mentioned preset detection cycle duration.

[0233] When the proportion of normal data packets is greater than or equal to the preset proportion, Dubai further detects the number and data volume of normal data packets, and determines whether the MD frequently wakes up the AP due to network speed limit through the number of interruption signals, the proportion of normal data packets, the number and data volume of normal data packets. Specifically, within a cycle, the number of interruption signals sent by the MD is greater than the preset interruption threshold, the proportion of normal data packets is greater than or equal to the preset proportion, the number of normal data packets is greater than the preset number, and the data volume of each normal data packet is less than the preset data volume threshold, indicating that the electronic device has a large number of normal data packet transmissions within the cycle, and each data packet is small, and the SIM card has a network speed limit. Dubai preliminarily determines that the SIM card may have a network speed limit, and executes step S211.

[0234] If neither of the above two situations is met, it means that the MD does not frequently wake up the AP in this cycle, or the frequent awakening of the AP by the MD is caused by the application running requirements. Dubai preliminarily determines that there is no abnormality in the SIM card, returns to step S205, and detects the next cycle.

[0235] That is to say, the above Figure 4 The first preset condition in step S105 "Dubai determines whether the first preset condition is satisfied based on the screen status change message and the target data" in the illustrated embodiment may also include condition 2: the number of times the MD sends an interrupt signal to the AP is greater than the preset interruption number threshold, and the proportion of normal data packets in the data packets transmitted by the MD to the AP is less than the preset proportion. The first preset condition may also include condition 3: the number of times the MD sends an interrupt signal to the AP is greater than the preset interruption number threshold, and the proportion of normal data packets in the data packets transmitted by the MD to the AP is greater than or equal to the preset proportion, and the number of normal data packets in the timing time period is greater than the preset number, and the data volume of each normal data packet is less than the preset data volume threshold.

[0236] S211, Dubai sends a card abnormality message to the power saving wizard.

[0237] S212. The power saving wizard responds to the card abnormality message and determines whether the SIM card has at least one of the abnormalities such as inability to communicate normally, inability to be identified, and network speed limit according to the preset detection strategy; if so, execute step S213; if not, do nothing and end this detection.

[0238] It should be noted that, in this embodiment, for step S212, "this detection" refers to a detection process triggered by at least one of the two events of "Dubai receives AP wake-up data" or "Dubai receives a screen-off message".

[0239] In one embodiment, the preset detection strategy may include at least one of the following strategies:

[0240] 1) Communication detection strategy

[0241] The communication detection strategy (also referred to as the first detection strategy) refers to a pre-set strategy for detecting whether the SIM card cannot communicate normally. In one embodiment, the communication detection strategy may include at least one of the following:

[0242] a. The power saving wizard detects the status of the SIM card by calling the communication detection interface of the MD to determine whether the SIM card cannot communicate normally.

[0243] The communication detection interface is an interface in the MD for detecting the communication status of the SIM card. Optionally, the communication detection interface can call the SMS application to send SMS, and / or call the call application to make a call to confirm whether the SIM card can communicate normally. If the SMS application is called to send SMS successfully, and / or the call application is called to make a call successfully, it is determined that the SIM card communication is normal, that is, there is no abnormality in the SIM card that cannot communicate. If the SMS application fails to send SMS, and / or the call application fails to make a call, it is determined that the SIM card cannot communicate normally.

[0244] b. Power Saver asks the operator corresponding to the SIM card whether the SIM card cannot communicate normally.

[0245] Optionally, a communication query channel can be pre-established between the power saving wizard and the operator, and the communication query channel can be used to query whether the SIM card cannot communicate normally. For example, the operator provides an interface for fee query. When it is necessary to determine whether the SIM card is abnormal, the power saving wizard calls the fee query interface to query whether the SIM card is down due to arrears, so as to determine whether the SIM card cannot communicate normally. For another example, the operator provides an interface for card status query. When it is necessary to determine whether the SIM card is abnormal, the power saving wizard calls the card status query interface to determine whether the card is locked, etc., to determine whether the SIM card cannot communicate normally.

[0246] Optionally, the Power Saving Wizard can also call a text message application to send a fee inquiry text message to the operator, or call a call application to call the operator's fee inquiry number to check whether the SIM card has any arrears causing the shutdown, thereby determining whether the SIM card cannot communicate normally.

[0247] In a specific embodiment, the Power Saving Wizard can obtain authorization from the user before calling the SMS application to send a fee inquiry SMS or calling the call application to make a fee inquiry call. Optionally, the Power Saving Wizard can output authorization acquisition information before each fee inquiry SMS or fee inquiry call, and the electronic device displays an authorization acquisition interface. After the user enters the information agreeing to the authorization in the authorization acquisition interface, the Power Saving Wizard sends the SMS or makes the call. Optionally, the Power Saving Wizard can also obtain user authorization when the user uses the Power Saving Wizard application for the first time, and no longer obtain authorization from the user when sending SMS or making calls subsequently.

[0248] 2) Card identification strategy

[0249] The card identification strategy refers to a pre-set strategy for detecting whether a SIM card cannot be identified. In one embodiment, the card identification strategy may be as follows: the power saving wizard detects the state of the SIM card by calling the card identification interface of the MD to determine whether the SIM card cannot be identified.

[0250] The card identification interface is used to detect whether the SIM card can be normally identified and read by the SIM card interface. Optionally, the card identification interface can be the above-mentioned SIM identification module. If the SIM card identification is successful by calling the card identification interface, it is determined that there is no unrecognizable abnormality in the SIM card. If the SIM card identification fails by calling the card identification interface, it is determined that the SIM card cannot be identified.

[0251] 3) Speed ​​limit detection strategy

[0252] The speed limit detection strategy (also referred to as the second detection strategy) refers to a pre-set strategy for detecting whether a SIM card has a network speed limit anomaly. In one embodiment, the speed limit detection strategy may include at least one of the following:

[0253] a. The power saving wizard detects the status of the SIM card by calling the speed limit detection interface of the MD to determine whether there is an abnormality in the network speed limit of the SIM card.

[0254] In a specific embodiment, if the network speed limit detection result is a failure, the SIM card network speed limit is determined. If the network speed limit detection result is a pass, it is determined that the SIM card does not have a network speed limit anomaly.

[0255] b. Power Saver asks the operator corresponding to the SIM card whether the network speed of the SIM card is limited.

[0256] Optionally, a communication query channel can be established between the power saving wizard and the operator in advance, and the communication query channel can be used to query whether the SIM card has a network speed limit anomaly. For example, the operator provides a flow query interface, and when it is necessary to determine whether the SIM card is abnormal, the power saving wizard calls the flow query interface to query the remaining flow of the SIM card to determine whether the SIM card has a network speed limit anomaly.

[0257] Optionally, the Power Saver can also call the SMS application to send a traffic SMS to the operator to query the remaining traffic of the SIM card to determine whether the SIM card has an abnormal network speed limit. Alternatively, the Power Saver can call the call application to query the remaining traffic of the SIM card by making a traffic query call to confirm whether the SIM card has an abnormal network speed limit.

[0258] c. Power Saver uses the ping command to test the network speed to determine whether there is an abnormality in the network speed limit of the SIM card.

[0259] Specifically, if after the network speed test, the network speed of the electronic device during data transmission is less than the preset network speed threshold and the duration is greater than the preset duration threshold, it is determined that the SIM card has a network speed limit; otherwise, it is determined that the SIM card has no network speed limit.

[0260] d. The Power Saver monitors the traffic of electronic devices by calling the device management software (such as Mobile Manager, etc.) installed in the electronic devices to determine whether there is any abnormality in the network speed limit of the SIM card.

[0261] Optionally, the power saving wizard can query the traffic usage of the electronic device within a preset time period through the device management software to determine whether the traffic usage of the SIM card exceeds a preset traffic threshold, so as to determine whether there is a network speed limit abnormality on the SIM card.

[0262] Optionally, the power saving wizard can also query the data transmission speed of the electronic device within a preset time period through the device management software to determine whether the data transmission speed is less than a preset speed threshold, so as to determine whether there is a network speed limit abnormality on the SIM card.

[0263] It should be noted that among the above-mentioned preset detection strategies, if the strategy includes multiple implementation methods, in actual application, one of them can be selected for execution, or multiple implementation methods can be combined for execution, as long as the detection purpose of the detection strategy can be achieved.

[0264] In addition, there is no limit on the order of execution between different detection strategies. Multiple strategies can be executed in sequence or simultaneously. When executing in sequence, if the execution result of a certain strategy is that there is an abnormality, the subsequent strategies may not be executed. For example, the communication detection strategy, card identification strategy and speed limit detection strategy can be executed in sequence. If the communication detection strategy is executed and the detection result is that the SIM card cannot communicate, the card identification strategy and the speed limit detection strategy may not be executed, and it is directly determined that there is an abnormality in the SIM card. If the detection result of the communication detection strategy is that the SIM card communication is normal, the card identification strategy will continue to be executed. Similarly, if the recognition result of the card identification strategy is that the SIM card cannot be recognized, the speed limit detection strategy will not be executed, and it is directly determined that there is an abnormality in the SIM card. If the recognition result of the card identification strategy is that the SIM card recognition is normal, the speed limit detection strategy will continue to be executed. If the detection result of the speed limit detection strategy is that the SIM card network speed is limited, it is determined that there is an abnormality in the SIM card. If the detection result of the speed limit detection strategy is that the SIM card network speed is normal, it is determined that there is no abnormality in the SIM card. Of course, the communication detection strategy, the card identification strategy and the speed limit detection strategy may also be executed simultaneously. As long as the detection result of at least one strategy is abnormal, it is determined that there is an abnormality in the SIM card.

[0265] S213: The power saving wizard outputs reminder information and / or performs power consumption control.

[0266] Optionally, the power consumption control method may include at least one of the following methods:

[0267] 1) Interrupt interception

[0268] Optionally, the power saving wizard can send a stop interruption instruction to the MD, and the stop interruption instruction is used to instruct the MD to stop sending interruption signals to the AP. In response to the stop interruption instruction, the MD stops sending interruption signals to the AP, thereby preventing frequent awakening of the AP, reducing power consumption, saving power, extending the standby time of the electronic device, and improving the user experience.

[0269] Optionally, the power saving wizard may also send a reduction interruption instruction to the MD, and the reduction interruption instruction is used to instruct the MD to reduce the number of interruption signals sent to the AP. Optionally, the reduction interruption instruction may carry a goal to be achieved by reducing the number of interruption signals. In one implementation, the goal may be that the number of interruption signals within a preset period is less than or equal to a preset number. The preset period and the preset number may be designed according to actual needs, for example, the preset period may be 10s, and the preset number may be 10 times. In a specific embodiment, the MD responds to the reduction interruption instruction, and counts the number of interruption signals sent by the MD to the AP according to a preset period. If the number of interruption signals within a period reaches a preset number, the interruption signals subsequently generated by the MD within the period are intercepted and not sent to the AP. In this way, the number of times the MD wakes up the AP is reduced, power consumption is reduced, electricity is saved, the standby time of the electronic device is extended, and the user experience is improved.

[0270] As a possible implementation, before the power saving wizard sends a stop interruption instruction or a reduce interruption instruction to the MD, it can first confirm whether the current time is within a preset time period. If so, the stop interruption instruction or the reduce interruption instruction is sent to the MD; if not, the stop interruption instruction or the reduce interruption instruction is not sent. The preset time period can be, for example, 00:00 to 06:00, etc. In other words, the interruption interception can be selected at night to reduce the impact on the user and improve the user experience.

[0271] 2) Disable SIM card

[0272] Specifically, the power saving wizard sends a SIM card disable command to the MD, and the SIM card command is used to indicate that the SIM card is prohibited from being used. The MD responds to the SIM card disable command and disables the SIM card. The MD stops sending and receiving data, so the MD no longer wakes up the AP, reduces power consumption, saves power, prolongs the standby time of the electronic device, and improves the user experience.

[0273] Optionally, before sending the SIM card disable instruction to the MD, the power saving wizard may also determine whether the current time is in a preset time period, and if so, send the SIM card disable instruction to the MD, and if not, do not send the SIM card disable instruction. The preset time period may be, for example, 00:00 to 06:00, etc. In other words, the SIM card may be disabled at night to reduce the impact on the user and improve the user experience.

[0274] It should be noted that the above steps S201 to S203 and steps S204 to S210 are parallel solutions for preliminarily determining whether the SIM card activation is abnormal, and the two can be executed at the same time. Moreover, in the above process, the order of execution of each step is not limited, and can be performed according to Fig.11 The steps can be executed in the order shown, or multiple steps can be executed simultaneously. Fig.11The order of execution can be changed based on the above, as long as it meets the implementation logic. For example, the above step S208 and the above step S209 can be performed by first performing step S208 and then performing step S209, or can be performed at the same time, or can be performed by first performing step S209 and then performing step S208, as long as the final judgment results of the two steps meet the following conditions: within the timing period, the number of interruption signals sent by the MD is greater than the preset number of interruptions, and the proportion of normal data packets in the data packets transmitted from the MD to the AP is less than the preset proportion, then step S211 is executed.

[0275] In another embodiment, after step S212, the SIM card management method further includes:

[0276] The Power Saver counts the number of times the screen was last turned off until the current time, when it outputs reminder messages and / or performs power consumption control (hereinafter referred to as control times).

[0277] Before the above step S211, the SIM card management method further includes:

[0278] The power saving wizard responds to the card abnormality message and obtains the control times; if the control times are greater than the preset control times threshold, the detection is terminated.

[0279] Depend on Fig.11 It can be seen from the embodiment shown that during the standby process of the electronic device, Dubai may perform one or more of the above steps S201 to S211 multiple times, that is, Dubai may preliminarily determine that the SIM card is abnormal multiple times and send card abnormality messages to the power saving wizard multiple times. In this embodiment, after the power saving wizard confirms the SIM card abnormality for the second time and outputs a reminder message or performs power consumption control, the number of controls is counted. In this way, after the power saving wizard receives the card abnormality message, if the number of controls is greater than the preset control number threshold, the second confirmation and related control steps will not be repeated (that is, steps S212 and S213 will not be repeated), so as to simplify the process and save power consumption of the electronic device.

[0280] Fig.11In the illustrated embodiment, when Dubai preliminarily determines whether the SIM card is abnormal, it not only detects whether the DDR is powered off during standby through steps S201 to S203, but also detects whether there are abnormal data packets during standby that cause the MD to frequently wake up the AP, and whether there are network speed limits that cause the MD to frequently wake up the AP. In the case where the result of any of the three tests is yes, it is preliminarily determined that the SIM card is abnormal, and Dubai sends a card abnormality message to the power saving wizard. That is to say, in step S105 of the above embodiment, "Dubai determines whether the first preset condition is met based on the screen status change message and the target data", the "first preset condition" includes the above condition 1, the above condition 2 and the above condition 3, and "meeting the first preset condition" means: meeting any one of the above conditions 1, the above conditions 2 and the above conditions 3.

[0281] It should be noted that in some other embodiments, only one or two of the above three tests may be performed. The embodiments of the present application do not impose any limitation on this. When only one of the above three tests is performed, the "first preset condition" is the condition corresponding to the test, and "satisfying the first preset condition" means: satisfying the condition corresponding to the test. For example, only steps S201 to S203 are used to detect whether the DDR is powered off during standby, that is, the above steps S204 to S210 are not performed, that is, the above "first preset condition" is the above condition 1, and satisfying the preset condition is satisfying condition 1.

[0282] When only two of the above three tests are performed, the "first preset condition" includes the conditions corresponding to the two tests, and "satisfying the first preset condition" means satisfying any one of the conditions corresponding to the two tests. For example, only steps S204 to S210 are used to detect whether there are abnormal data packets or network speed limits during standby that cause the MD to frequently wake up the AP, that is, the above steps S201 to S203 are not performed, then the above "first preset condition" includes the above condition 2 and the above condition 3, and "satisfying the first preset condition" means: satisfying the above condition 2 or the above condition 3.

[0283] The following is combined with actual scenarios. Fig.11 The process is further described.

[0284] 1. Application scenarios where SIM card has abnormalities

[0285] In this embodiment, the SIM card has an abnormality of network speed limitation or failure to communicate normally.

[0286] See also Fig.12 Specifically, the SIM card is shut down or there is a network speed limit. In this scenario, the electronic device can perform the following steps:

[0287] S301. In response to a screen-off operation by a user, the screen of an electronic device turns off.

[0288] The electronic device is provided with a SIM card 1, and the SIM card 1 is shut down or has a network speed limit. SIM card shutdown means that the electronic device (terminal device) cannot communicate normally with other terminal devices through the SIM card due to reasons such as arrears or user loss.

[0289] It should be noted that, if the SIM card is normal, the AP may enter a dormant state after the screen of the electronic device is turned off. The screen turning off includes two situations: the screen is completely turned off (no content is displayed) and the screen turning off interface is displayed.

[0290] S302: When the screen is off, the electronic device receives T data packets sent by the operator within a first time period. Within the first time period, the MD of the electronic device sends an interrupt signal to the AP T times.

[0291] S303: The electronic device executes at least one of the following strategies:

[0292] 1) Displaying a prompt message, which is used to indicate that there is an abnormality in SIM card 1;

[0293] 2) In the second time period, the electronic device receives N data packets sent by the operator, and the MD of the electronic device sends an interrupt signal to the AP M times; wherein M is less than N, the second time period is a time period after the first time period, and the screen of the electronic device remains off in the second time period and between the first time period and the second time period;

[0294] 3) In the fifth time period, the electronic device disables the SIM card 1; wherein the fifth time period is the time period after the first time period, the fifth time period is within the preset time period, and in the fifth time period, the screen of the electronic device remains off.

[0295] Specifically, based on the target data of the first time period, the electronic device performs the above Figure 4 and Fig.11 In the embodiment shown, Dubai and the power saving wizard perform the above S101 to S104 and steps S201 to S212, determine that SIM card 1 is abnormal, and based on step S213, perform at least one of "output reminder information", "interrupt interception" and "disable SIM card", so that the electronic device displays a prompt message, or the number of times M that MD sends a terminal interrupt signal to AP in the second time period is less than the number of data packets N received from the operator, or SIM card 1 is disabled. In this way, the number of times MD wakes up AP is reduced, or the problem of DDR not being powered off is solved, thereby reducing the power consumption of electronic devices, saving electricity, extending the standby time of electronic devices, and improving user experience.

[0296] 2. Normal application scenarios of SIM cards

[0297] In this embodiment, the SIM card is described as an example in which there is no network speed limit, normal communication, or any of the multiple abnormalities cannot be identified, that is, the SIM card is normal. Fig.12 After the above scenario 1, the electronic device can perform the following steps:

[0298] S304: After SIM card 1 is replaced with SIM card 2, in response to the user's screen-off operation, the screen of the electronic device is turned off.

[0299] Among them, SIM card 2 is a normal SIM card. A normal SIM card means that the SIM does not have any network speed limit or shutdown, and the electronic device (terminal device) can communicate normally with other terminal devices through the SIM card.

[0300] S305: When the screen is off, the electronic device receives I data packet sent by the operator within the third time period, and the MD of the electronic device sends an interrupt signal to the AP I times.

[0301] S306. In the fourth time period, the electronic device receives J data packets sent by the operator, and the MD of the electronic device sends an interrupt signal to the AP J times; the fourth time period is the time period after the third time period, and in the fourth time period, and between the third time period and the fourth time period, the screen of the electronic device remains off.

[0302] Specifically, during the third time period, the electronic device follows the above Figure 4 and Fig.11 In the embodiment shown, Dubai and the power saving wizard perform the above S101 to S104, and part or all of steps S201 to S212, and determine that there is no abnormality in SIM card 2. Therefore, the power saving wizard does not output a reminder message, nor does it perform power consumption control such as interrupt interception and disabling the SIM card. Therefore, the number of times the MD sends the terminal interrupt signal to the AP in the fourth time period is the same as the number of data packets sent by the electronic device to the operator, which is J.

[0303] The above describes in detail an example of a SIM card management method provided by an embodiment of the present application. It is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of the present application.

[0304] The embodiment of the present application can divide the functional modules of the electronic device according to the above method example. For example, each function can be divided into various functional modules, such as a detection unit, a processing unit, a display unit, etc., or two or more functions can be integrated into one module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0305] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0306] The electronic device provided in this embodiment is used to execute the above-mentioned SIM card management method, and thus can achieve the same effect as the above-mentioned implementation method.

[0307] In the case of an integrated unit, the electronic device may further include a processing module, a storage module and a communication module. The processing module may be used to control and manage the actions of the electronic device. The storage module may be used to support the electronic device to execute stored program codes and data, etc. The communication module may be used to support the electronic device to communicate with other devices.

[0308] Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logic boxes, modules and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, etc.

[0309] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment may be a Figure 2 Device of the structure shown.

[0310] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the processor executes the SIM card management method of any of the above embodiments.

[0311] The embodiment of the present application further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the SIM card management method in the above-mentioned embodiment.

[0312] In addition, an embodiment of the present application also provides a device, which may specifically be a chip, a component or a module, and the device may include a connected processor and a memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor may execute the computer-executable instructions stored in the memory so that the chip executes the SIM management method in the above-mentioned method embodiments.

[0313] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above and will not be repeated here.

[0314] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned 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.

[0315] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0316] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0317] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0318] If the integrated unit is implemented in the form of 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 solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0319] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for managing a SIM card, the method being executed by an electronic device, the electronic device comprising a modem processor MD, an application processor AP and a double data rate synchronous dynamic random access memory DDR, the electronic device being provided with a first SIM card, the first SIM card being shut down or having a network speed limit, It is characterized in that The method comprises: In response to a screen-off operation by a user, the screen of the electronic device turns off; In a first time period, the electronic device receives a first number of data packets sent by an operator, and the number of times the MD sends an interrupt signal to the AP is the first number; The electronic device determines, according to the first target data, that the first SIM card is shut down or that there is a network speed limit; the first target data includes at least one of AP sleep data, AP wake-up data, DDR frequency change data, MD interruption data, and data receiving objects within the first time period; In a second time period, the electronic device receives a second number of data packets sent by the operator, and the number of times the MD sends an interruption signal to the AP is a third number; wherein the third number is less than the second number, the second time period is a time period after the first time period, and the electronic device keeps the screen off during the first time period and the second time period, and between the first time period and the second time period; After the first SIM card is replaced with the second SIM card, in response to the user's screen-off operation, the screen of the electronic device is turned off; the second SIM card is not shut down and there is no network speed limit; In a third time period, the electronic device receives a fourth number of data packets sent by the operator, and the number of times the MD sends an interrupt signal to the AP is the fourth number; The electronic device determines, according to the second target data, that the second SIM card is not shut down and there is no network speed limit, wherein the second target data includes at least one of the AP sleep data, the AP wake-up data, the DDR frequency change data, the MD interruption data and the data receiving object within the third time period; During a fourth time period, the electronic device receives a fifth number of data packets sent by the operator, and the MD sends an interrupt signal to the AP for the fifth number of times; the fourth time period is a time period after the third time period, and during the third time period and the fourth time period, and between the third time period and the fourth time period, the electronic device keeps the screen off.

2. The method according to claim 1, It is characterized in that After the first time period and before replacing the first SIM card with a second SIM card, the method further includes: The electronic device displays a prompt message; the prompt message indicates that an abnormality exists in the first SIM card.

3. The method according to claim 1, It is characterized in that After the first time period and before replacing the first SIM card with a second SIM card, the method further includes: When the screen is off, the electronic device disables the first SIM card within a fifth time period; the fifth time period is a time period after the first time period, and the fifth time period is within a preset time period.

4. The method according to any one of claims 1 to 3, It is characterized in that Before the electronic device determines, according to the first target data, that the first SIM card is shut down or that there is a network speed limit, the method further includes: In the first time period, the electronic device acquires the first target data; The AP sleep data includes the time when the AP enters the sleep state, the AP wake-up data includes the time when the AP is awakened, the DDR frequency change data includes the time and frequency when the DDR operating frequency changes, the MD interrupt data includes the time when the MD sends an interrupt signal to the AP, and the data receiving object represents the receiving object of the data packet transmitted by the MD to the AP.

5. The method according to claim 1, It is characterized in that The electronic device determines, according to the first target data, that the first SIM card is shut down or has a network speed limit, including: According to the first target data, it is determined that a first preset condition is satisfied; the first preset condition includes: when the AP is in a dormant state, the non-power-off time of the DDR is greater than a preset time threshold, or the number of times the MD wakes up the AP caused by the first type of data packet is greater than a preset interruption number threshold, or the number of times the MD wakes up the AP caused by network speed limit is greater than the preset interruption number threshold; the non-power-off time of the DDR refers to the total time the DDR runs in the working mode, and the first type of data packet refers to a data packet whose data receiving object is an application; According to the preset detection strategy, when it is determined that the second preset condition is met, it is determined that the first SIM card is shut down or there is a network speed limit.

6. The method according to claim 5, It is characterized in that The first target data includes the AP wake-up data, the AP sleep data, and the DDR frequency change data within the first time period, and determining that the first preset condition is satisfied according to the first target data includes: Based on the AP wake-up data and the AP sleep data, determine whether the duration of a recent sleep period is greater than a preset sleep duration; the sleep period refers to a time period during which the AP is continuously in a sleep state, and the recent sleep duration refers to a sleep period closest to the current moment; If the duration of the most recent sleep period is greater than the preset sleep duration, determining whether the DDR power-on duration in the most recent sleep period is greater than the preset duration threshold based on the DDR frequency change data in the most recent sleep period; If the power-on time length of the DDR in the most recent sleep period is greater than the preset time length threshold, it is determined that the first preset condition is met.

7. The method according to claim 6, It is characterized in that The preset duration threshold is the product of the duration of the most recent sleep period and a preset ratio.

8. The method according to claim 5, It is characterized in that The first target data includes the MD interruption data and the data receiving object within the first time period, and determining that the first preset condition is satisfied according to the first target data includes: Determine, according to the MD interruption data in the timing time period, whether the number of interruptions of the MD in the timing time period is greater than the preset interruption number threshold; the timing time period is within the first time period, and the duration of the timing time period is the preset detection cycle duration; If the number of interruptions of the MD within the timing period is greater than the preset interruption number threshold, determining, according to the data receiving object, whether the proportion of the first type of data packets in the data packets transmitted from the MD to the AP within the timing period is less than a preset proportion; If the proportion of the first type of data packets is less than the preset proportion, it is determined that the first preset condition is met.

9. The method according to claim 8, It is characterized in that The method further comprises: If the proportion of the first category of data packets is greater than or equal to the preset proportion, determining whether the number of the first category of data packets within the timing time period is greater than the preset number, and whether the data volume of each of the first category of data packets is less than the preset data volume threshold; If the number of the first category data packets within the timing time period is greater than a preset number, and the data volume of each of the first category data packets is less than a preset data volume threshold, it is determined that the first preset condition is met.

10. The method according to claim 8, It is characterized in that Before determining, based on the MD interruption data within the timing period, whether the number of interruptions of the MD within the timing period is greater than the preset interruption number threshold, the method further includes: In response to the electronic device turning off the screen, starting the timing with the moment when the screen is turned off as the starting moment of the timing time period; If the timing reaches the preset detection cycle length, the timing is stopped and the MD interruption data within the timing time period is obtained.

11. The method according to any one of claims 5 to 10, It is characterized in that The preset detection strategy includes a first detection strategy and a second detection strategy; The first detection strategy includes at least one of the following strategies: Detecting the state of the first SIM card through the communication detection interface of the MD to determine whether the first SIM card is shut down; Querying the operator for the status of the first SIM card to determine whether the first SIM card is shut down; The second detection strategy includes at least one of the following strategies: Detecting the state of the first SIM card through the speed limit detection interface of the MD to determine whether the first SIM card has a network speed limit; Querying the operator for the status of the first SIM card to determine whether there is a network speed limit on the first SIM card; Performing a network speed test on the electronic device to determine whether the first SIM card has a network speed limit; Obtain a traffic monitoring result of the electronic device, and determine whether there is a network speed limit on the first SIM card according to the traffic monitoring result.

12. An electronic device, It is characterized in that include: Processors, memory, and interfaces; The processor, the memory and the interface cooperate with each other so that the electronic device executes the method as claimed in any one of claims 1 to 11.

13. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 11.