CN117135731A - SIM card management method and electronic equipment - Google Patents

SIM card management method and electronic equipment Download PDF

Info

Publication number
CN117135731A
CN117135731A CN202310209681.1A CN202310209681A CN117135731A CN 117135731 A CN117135731 A CN 117135731A CN 202310209681 A CN202310209681 A CN 202310209681A CN 117135731 A CN117135731 A CN 117135731A
Authority
CN
China
Prior art keywords
sim card
data
period
preset
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310209681.1A
Other languages
Chinese (zh)
Inventor
赵和平
劳华剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310209681.1A priority Critical patent/CN117135731A/en
Publication of CN117135731A publication Critical patent/CN117135731A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0264Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by selectively disabling software applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0248Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal dependent on the time of the day, e.g. according to expected transmission activity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0274Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof
    • H04W52/028Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by switching on or off the equipment or parts thereof switching on or off only a part of the equipment circuit blocks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application provides a management method of a SIM card and electronic equipment, wherein the electronic equipment is provided with a first SIM card which stops or limits the speed of a network, and the method comprises the following steps: under the condition that the screen is extinguished, in a first time period, the electronic equipment receives a first number of data packets sent by an operator, and the number of times of sending interrupt signals to the AP by the MD is the first number; in a second time period, receiving a second number of data packets sent by an operator, wherein the number of times of sending interrupt signals to the AP by the MD is a third number; the third number is less than the second number; after the first SIM card is replaced by the second SIM card, in a third time period, receiving a fourth number of data packets sent by an operator, wherein the number of times of sending interrupt signals to the AP by the MD is the fourth number; and in the fourth time period, receiving a fifth number of data packets sent by the operator, wherein the number of times of sending interrupt signals to the AP by the MD is the fifth number. The method can reduce the power consumption of the equipment.

Description

SIM card management method and electronic equipment
Technical Field
The application relates to the technical field of electronics, in particular to a management method of a SIM card and electronic equipment.
Background
The subscriber identity module (subscriber identity module, SIM) is also called a smart card, a subscriber identity module card, etc., and is used for being inserted into an electronic device to realize the functions of communication, data communication, etc. of the device.
In practical application, it is found that when the SIM card is abnormal, for example, due to arrearage, shutdown, network speed limit, etc., standby power consumption of the electronic device increases.
Disclosure of Invention
The application provides a management method of a SIM card and electronic equipment, which can solve the problem of increased standby power consumption caused by abnormal SIM card and effectively save the electric quantity of the equipment.
In a first aspect, the present application provides a method of managing a SIM card, the method being performed by an electronic device, the electronic device comprising a Modem (MD) and an application processor (application processor, AP), the electronic device being provided with a first SIM card, the first SIM card being down or there being a network speed limit, the method comprising:
responding to the screen-off operation of a user, and extinguishing the screen of the electronic equipment; in a first time period, the electronic equipment receives a first number of data packets sent by an operator, and the number of times of sending interrupt signals to the AP by the MD is the first number; in a second time period, the electronic equipment receives a second number of data packets sent by an operator, and the number of times of sending interrupt signals to the AP by the MD is a third number; the third number is smaller than the second number, the second time period is a time period after the first time period, and the electronic equipment keeps the screen extinguished in 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 by the second SIM card, responding to the screen-off operation of the user, and extinguishing the screen of the electronic equipment; the second SIM card is not stopped and no network speed limit exists; in the third time period, the electronic equipment receives a fourth number of data packets sent by an operator, and the number of times of sending interrupt signals to the AP by the MD is the fourth number; in a fourth time period, the electronic equipment receives a fifth number of data packets sent by an operator, and the number of times of sending interrupt signals to the AP by the MD is the fifth number; the fourth time period is a time period after the third time period, and the electronic device keeps the screen extinguished in the third time period and the fourth time period and between the third time period and the fourth time period.
Alternatively, screen extinction may include screen complete extinction and display of an extinction screen interface.
It can be understood that, in the case of the normal second SIM card installed in the electronic device, when the screen is turned off, the electronic device receives a data packet, and the MD wakes up the AP once through the interrupt signal, so that the electronic device receives the number of data packets sent by the operator in the third and fourth time periods, which is the same as the number of times the MD wakes up the AP (i.e., the number of times the MD sends the interrupt signal to the AP).
In the SIM card management method provided in the first aspect of the present application, in a first period of time during which a screen is turned off when a first SIM card installed in an electronic device is turned off or when there is a network speed limit, the number of data packets sent by an operator received by the electronic device is the same as the number of times that an MD sends an interrupt signal to an AP, and the number is the first number. In the second period, the electronic device intercepts the interrupt signal, so that the number of times (third number) of sending the final interrupt signal to the AP by the MD is smaller than the number (second number) of data packets sent by the receiving operator of the electronic device. Therefore, the number of times that the MD wakes up the AP is reduced, the problem of equipment power consumption increase caused by the shutdown of the SIM card or the abnormality of network speed limit is solved, the electric quantity is saved, the standby time of the electronic equipment is prolonged, and the user experience is improved.
With reference to the first aspect, in some implementations of the first aspect, after the first period of time, before replacing the first SIM card with the second SIM card, the method further includes: the electronic equipment displays prompt information; the prompt information indicates that the first SIM card is abnormal.
In the implementation mode, the first SIM card of the user is reminded of being abnormal by displaying the reminding information, so that the user can solve the problem of abnormal card in time, the problem of increased standby power consumption caused by abnormal SIM card is solved, and the user experience is improved.
In a possible implementation manner, after the first period of time, before replacing the first SIM card with the second SIM card, the method further includes: under the condition that the screen is extinguished, the electronic equipment disables the first SIM card in a fifth time period; the fifth time period is within a preset time period.
In the implementation mode, the first SIM card is disabled, and the MD stops receiving and transmitting data, so that the MD does not wake up the AP any more, and the power consumption is reduced; and the first SIM card is forbidden, so that the problem that DDR caused by the abnormality of the first SIM card is not powered down can be solved, the power consumption is reduced, the electric quantity is saved, the standby time of the electronic equipment is prolonged, and the user experience is improved.
Alternatively, the preset time period may be, for example, a night time period, for example, 00:00 to 06:00, or the like. That is, the first SIM card may be disabled at night. Therefore, the influence of the forbidden SIM card on the user can be reduced, and the user experience is improved.
In a possible implementation manner, the electronic device further includes a double rate synchronous dynamic random access memory DDR, and the method further includes: in a first time period, the electronic equipment acquires target data, wherein the target data comprises 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 dormancy data comprise the time of the AP entering the dormancy state, the AP awakening data comprise the time of the AP awakening, the DDR frequency change data comprise the time and the frequency of the change of the DDR working frequency, the MD interrupt data comprise the time of the MD sending an interrupt signal to the AP, and the data receiving object represents the receiving object of a data packet transmitted to the AP by the MD; and according to the target data, determining that the first SIM card is stopped or the network speed limit exists.
The network speed limit or the shutdown of the first SIM card can possibly cause the DDR not to be powered down or the MD to wake up the AP frequently, and the like, so that the method provided by the implementation manner can intuitively and accurately determine whether the SIM card is shut down or has the abnormality of the network speed limit, namely, the accuracy of detecting the abnormality of the SIM card is improved by acquiring at least one of the AP sleep data, the AP wake-up data, the DDR frequency change data, the MD interrupt data and the data receiving object.
In a possible implementation manner, determining that the first SIM card is down or there is a network speed limit according to the target data includes: determining that a first preset condition is met according to the target data; the first preset condition includes: when the AP is in a dormant state, the time length without power-down of the DDR is larger than a preset time length threshold, or the number of times of MD awakening the AP caused by a first type of data packet is larger than a preset interruption number threshold, or the number of times of MD awakening the AP caused by network speed limit is larger than a preset interruption number threshold; the time without power-down of the DDR is the total time when the DDR operates in a working mode, and the first type of data packet is a data packet with a data receiving object as an application program; and according to a preset detection strategy, when the second preset condition is met, the first SIM card is stopped or network speed limit exists.
In the implementation manner, after the first preset condition is confirmed to be met through the target data and the abnormality of the SIM card is confirmed, whether the second preset condition is met or not is further confirmed according to a preset detection strategy, and whether the first SIM card is stopped or abnormal of network speed limit is confirmed. Therefore, through two-stage abnormality detection, the accuracy of SIM card abnormality detection is improved, and further, the influence of power consumption error control on the normal operation of the electronic equipment is prevented, and the user experience is further improved.
In a possible implementation manner, the target data includes AP wake-up data, AP sleep data and DDR frequency change data, and determining that the first preset condition is met according to the target data includes: based on the AP wake-up data and the AP sleep data, determining whether the duration of the last sleep period is longer than a preset sleep duration; the sleep period refers to a period of time when the AP is continuously in a sleep state, and the last sleep period refers to a sleep period nearest to the current time; if the time length of the last sleep period is longer than the preset sleep period, determining whether the power-off time length of the DDR in the last sleep period is longer than a preset time length threshold or not based on DDR frequency change data in the last sleep period; and if the power-off time length of the DDR in the last sleep period is greater than the preset time length threshold, determining that the first preset condition is met.
In one possible implementation, the preset duration threshold is a product of the duration of the last sleep period and a preset ratio. In this way, the preset duration threshold value is associated with the duration of the last sleep period, so that the condition of judging whether the DDR is not powered down is more accurate, and the abnormal detection result of the SIM card is more accurate.
In a possible implementation manner, the target data includes MD interrupt data and a data receiving object, and determining that the first preset condition is met according to the target data includes: determining whether the number of times of MD interruption in the timing period is greater than a preset interruption number threshold value according to the MD interruption data in the timing period; the timing time period is in the first time period, and the duration of the timing time period is the duration of a preset detection period; if the number of interruption times of the MD in the timing period is larger than a preset interruption time threshold, determining whether the duty ratio of a first type of data packet in the data packets transmitted from the MD to the AP in the timing period is smaller than a preset duty ratio according to the data receiving object; if the duty ratio of the first type of data packet is smaller than the preset duty ratio, the first preset condition is determined to be met.
In a possible implementation manner, the method further includes: if the duty ratio of the first type data packets is larger than or equal to the preset duty ratio, determining whether the number of the first type data packets in the timing period is larger than the preset number, and whether the data volume of each first type data packet is smaller than a preset data volume threshold value; if the number of the first type data packets in the timing time period is larger than the preset number and the data quantity of each first type data packet is smaller than the preset data quantity threshold value, determining that the first preset condition is met.
In a possible implementation manner, according to the MD interrupt data in the timing period, before determining whether the number of interrupts of the MD in the timing period is greater than a preset threshold of the number of interrupts, the method further includes: responding to the screen extinction of the electronic equipment, taking the moment of screen extinction as the starting moment of a timing time period, and starting timing; and if the timing reaches the preset detection period duration, stopping timing and acquiring MD interrupt data in the timing period.
In a possible implementation manner, the method further includes: if the number of the first type data packets in the timing time period is smaller than or equal to the preset number, or the data amount of at least one first type data packet is larger than or equal to the preset data amount threshold, restarting timing by taking the current moment as the starting moment of the timing time period, and returning to execute the timing, if the timing reaches the preset detection period duration, stopping the timing, and acquiring MD interrupt data in the timing time period.
That is, if the number of times that the first type of data packet causes the MD to wake up the AP is not greater than the preset interruption number threshold in the timing period, and the number of times that the network speed limit causes the MD to wake up the AP is not greater than the preset interruption number threshold, the timing is re-performed, the above-mentioned judging process is repeatedly executed, and the next detecting period is judged.
In a possible implementation manner, the preset detection strategy includes a first detection strategy and a second detection strategy;
the first detection strategy comprises at least one of the following strategies: detecting the state of the first SIM card through a communication detection interface of the MD, and determining whether the first SIM card is stopped; inquiring the state of the first SIM card from an operator, and determining whether the first SIM card is stopped;
the second detection strategy comprises at least one of the following strategies: detecting the state of the first SIM card through a speed limit detection interface of the MD, and determining whether the first SIM card has network speed limit; inquiring the state of the first SIM card from an operator, and determining whether the first SIM card has network speed limit; network speed testing is carried out on the electronic equipment, and whether network speed limit exists on the first SIM card is determined; and acquiring a flow monitoring result of the electronic equipment, and determining whether the first SIM card has network speed limit according to the flow monitoring result.
In the case that the preset detection policy is the first detection policy, the second preset condition may be: the first SIM card is deactivated.
In the case that the preset detection policy is the second detection policy, the second preset condition may be: the first SIM card has network speed limits.
In a second aspect, the present application provides an apparatus, which is included in an electronic device, the apparatus having a function of implementing the above first aspect and the behavior of the electronic device in the possible implementation manners of the above first aspect. The functions may be realized by hardware, or may be realized by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the functions described above. Such as a receiving module or unit, a processing module or unit, etc.
In a third aspect, the present application provides an electronic device, including: a processor, a memory, and an interface; the processor, the memory and the interface cooperate with each other such that the electronic device performs any one of the methods of the technical solutions of the first aspect.
In a fourth aspect, the present application provides a chip comprising a processor. The processor is configured to read and execute a computer program stored in the memory to perform the method of the first aspect and any possible implementation thereof.
Optionally, the chip further comprises a memory, and the memory is connected with the processor through a circuit or a wire.
Further optionally, the chip further comprises a communication interface.
In a fifth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored, which when executed by a processor causes the processor to perform any one of the methods of the first aspect.
In a sixth aspect, the application provides a computer program product comprising: computer program code which, when run on an electronic device, causes the electronic device to perform any one of the methods of the solutions of the first aspect.
Drawings
FIG. 1 is a diagram of an example of power monitoring data provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an example of an electronic device according to an embodiment of the present application;
FIG. 3 is a block diagram illustrating an example of an electronic device according to an embodiment of the present application;
fig. 4 is a timing diagram of an exemplary SIM card management method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an interface including a reminder according to an embodiment of the present application;
fig. 6 is a schematic diagram of a data flow in a SIM card based communication process of an electronic device according to an embodiment of the present application;
fig. 7 is a schematic diagram of monitoring data under a SIM card network speed limit condition according to an embodiment of the present application;
FIG. 8 is a schematic diagram illustrating an example of inter-core interrupt communication according to an embodiment of the present application;
FIG. 9 is a schematic diagram of an example of shared memory communication according to an embodiment of the present application;
fig. 10 is a schematic diagram of running data and DDR frequency distribution of an AP in a certain period of time under a condition that an arrearage of a SIM card results in a shutdown according to an embodiment of the present application;
fig. 11 is a flowchart illustrating an exemplary method for managing a SIM card according to an embodiment of the present application;
fig. 12 is a flowchart of another method for managing a SIM card according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "plurality" means two or more than two.
The terms "first," "second," "third," and the like, are used below for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first", "a second", or a third "may explicitly or implicitly include one or more such feature.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
For a better understanding of embodiments of the present application, terms or concepts that may be referred to in the embodiments are explained below.
1. Double rate synchronous dynamic random access memory
The English of the double rate synchronous dynamic random access memory is called double data rate synchronous dynamic random access memory, and the English is abbreviated as DDR SDRAM. DDR SDRAM is SDRAM with double data rate, which is twice the system clock frequency. It is common practice to refer DDR SDRAM to DDR, and in the embodiment of the application, DDR is also referred to simply.
The DDR has a plurality of working frequencies (also called working frequency points), the running modes are different, and the DDR working frequencies are different; and the data amount of the stored or read data is different, and the DDR working frequency is also different. In particular, DDR may operate in a Low Power Mode (LPM) and an operational mode (also referred to as a non-low power mode). In the low power mode, the DDR operates at a predetermined frequency (the frequency may be different for DDR of different specification types). In the operating mode, the DDR switches between several preset frequencies according to the difference of the data amount of the stored or read data. In a specific embodiment, the frequency of the DDR may be represented by index values (index), each corresponding to an actual frequency of the DDR. The frequency index value of the DDR may be set according to actual needs, for example, the index value of the frequency of the DDR in the working mode may include one or more of 10000, 10001, 10002, … … and 10009.
2. Modem processor
The modem processor is a modem, abbreviated MD. The MD may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal.
The MD is required to process both signals received and transmitted by the electronic device. Specifically, the signals received by the electronic device through the antenna are demodulated by the MD and then sent to other modules (such as an application processor) of the device for processing. When the electronic equipment needs to send signals, the signals are modulated by the MD, amplified and converted into electromagnetic waves through the antenna to radiate.
3. Application processor
The application processor is known in full english as application processor and in english as AP. An AP is an important part of the processor of an electronic device, and the system operation and Application (APP) operation of the electronic device are all responsible for the AP. The MD demodulated signal of the electronic device is transmitted to the AP for processing.
The running state of the AP may include an operating state, a sleep state, and the like. When the AP is in the dormant state, if a preset trigger condition is met, the AP enters the working state from the dormant state, which is called that the AP is awakened.
4. Inter-core communication
The English of inter-core communication is called inter-process communication, and the English is abbreviated as IPC. IPC refers to communication between different cores in a multi-core processor due to the needs of the application. Inter-core communication modes of the multi-core processor comprise modes of inter-core interrupt, shared memory and the like. When communication is performed by adopting the mode of inter-core interrupt and shared memory, the cores wake up the opposite end by sending interrupt signals (also called interrupt notification, interrupt reminding and the like).
5. Abnormal SIM card
The abnormal SIM card means that the SIM cannot work normally. The abnormality of the SIM card related to the embodiment of the application mainly comprises the following steps:
in the embodiment of the application, normal communication refers to communication based on the SIM card between terminal equipment and terminal equipment, including telephone, short message, data transmission through mobile data function and the like. The fact that the SIM card cannot normally communicate means that the SIM card cannot normally realize all communication functions. The failure of the SIM card to communicate normally includes two cases that the communication function of part of the SIM card is abnormal and all the communication functions of the SIM card are abnormal.
Failure of the SIM card to communicate normally includes a SIM card down condition. The SIM card is turned off, that is, the normal communication function of the electronic device is limited due to arrears, user loss, and the like, that is, normal communication with other terminal devices cannot be performed based on the SIM card.
It should be noted that table 1 is only for illustrating the case of SIM card abnormality, and is not limited in any way. In practical applications, the type of abnormality of the SIM card, the cause of the abnormality, the abnormal performance, etc. may include more or less contents than table 1.
The technical problems of the present application will be described below.
The inventors have found that in the process of using an electronic device mounted with a SIM card, the electronic device may suffer from a phenomenon of fast standby power consumption in some cases. The standby power consumption refers to the consumption of electric power when the electronic device is in a standby state. The standby state refers to the electronic device being in a turned-on state, but the user does not operate the electronic device, and the electronic device does not perform processing of a task designated by the user. In general, after a screen of an electronic device is turned off, the electronic device enters a standby state.
Fig. 1 is a diagram of power monitoring data according to an embodiment of the present application. Taking an electronic device as an example of a mobile phone, fig. 1 (a) shows part of data obtained by continuously monitoring power consumption in a standby state of the mobile phone. The power consumption corresponding to each sampling time is shown as 101 in the figure. It can be seen that in the standby state, the mobile phone continuously consumes power, and the power consumption is high. Fig. 1 (b) shows the statistics of the cell phone during standby for 4 hours 51 min 38 seconds (i.e. 4h51m38 s). As can be seen from the change in the power and the total power consumption shown in the graph 102, the power was reduced from 540 milliamperes (mAh) (11%) to 180mAh (2%) and the total power consumption was 3360mAh (9%) within the 4h51m38 s. In summary, as can be seen from the diagrams (a) and (b) in fig. 1, the mobile phone consumes relatively fast power in the standby state.
With respect to the phenomenon shown in fig. 1, the inventor analyzes and checks to find that the abnormal communication function of the SIM card part is caused by the shutdown caused by arrearage of the SIM card installed on the mobile phone.
In another case, after the user feeds back that the SIM card is replaced on a certain day, the power consumption of the mobile phone increases at night. The inventor analyzes and checks to find that the monthly usage flow of the replaced SIM card exceeds the limited flow of the operator, and the operator limits the network speed of the SIM card, namely the network speed of the SIM card is limited.
In addition to the above two cases, the inventor also found that the problem of increasing the power consumption of the mobile phone occurs in the situations that the SIM card cannot be identified, such as the SIM card identity information is invalid, the SIM card hardware is damaged, and the SIM card is in poor contact with the SIM card interface, and the SIM card can be identified but cannot communicate.
In short, when the SIM card is abnormal, standby power consumption of the electronic device increases, which causes a problem of increasing standby power consumption. The increase of standby power consumption can seriously affect user experience, especially in the scene that the current electronic equipment supports a plurality of SIM cards, one of the SIM cards is abnormal, the electronic equipment can be automatically switched to other SIM cards to carry out data communication, so that a user does not perceive the abnormal SIM cards, and only can perceive that the electric quantity of the equipment is rapidly reduced, and the bad experience of the user is further aggravated.
In view of the above technical problems, an embodiment of the present application provides a method for managing a SIM card, which is configured to detect whether the SIM card is abnormal, and output a reminder when the SIM card is abnormal, so as to facilitate a user to solve the problem of card abnormality 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 be performed, and the problem of increased standby power consumption caused by the abnormality of the SIM card is solved, so that the standby power consumption is reduced, the standby time of the equipment is prolonged, and the user experience is improved.
The management method of the SIM card provided by the embodiments of the present application may be applied to an electronic device that may be provided with a SIM card, such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (augmented reality, AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (personal digital assistant, PDA), and the like, where the electronic device may be a terminal device.
Fig. 2 is a schematic structural diagram of an electronic device 100 according to 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 (universal serial bus, USB) interface 130, a charge 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, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, and a SIM card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 100, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a SIM interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, such that the processor 110 communicates with the touch sensor 180K through an I2C bus interface to implement a touch function of the electronic device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing functions of electronic device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display functionality of the electronic device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may 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, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transfer data between the electronic device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other electronic devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only illustrative, and is not meant to limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also employ different interfacing manners in the above embodiments, or a combination of multiple interfacing manners.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. The structures of the antennas 1 and 2 in fig. 2 are only one example. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating 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. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., as applied to the electronic device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of electronic device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that electronic device 100 may communicate with a network and other devices through wireless communication techniques. Wireless communication techniques may include global system for mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to enable expansion of the memory capabilities of the electronic device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer-executable program code that includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 100 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 195 or removed from the SIM card interface 195 to enable contact and separation with the electronic device 100. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, 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.
The software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. In the embodiment of the application, taking an Android system with a layered architecture as an example, a software structure of the electronic device 100 is illustrated.
Fig. 3 is a block diagram of the electronic device 100 according to an embodiment of the present application, which shows the structure of software and hardware of the electronic device 100. Wherein, the software adopts a layered architecture. The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively. The application layer may include a series of application packages.
As shown in fig. 3, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc. Among these, navigation, bluetooth, video are shown in fig. 3.
In the embodiment of the application, the application program layer can also comprise application programs such as anomaly detection, power consumption management and the like. The abnormality detection application program is used for determining whether a first preset condition is met according to the target data and the screen state information so as to preliminarily determine whether the SIM card is abnormal. In a specific embodiment, the anomaly detection application may be Dubai. The target data and screen status message are described later.
The power consumption management application is used to manage power consumption of the electronic device. In the embodiment of the application, the power consumption management application program is further used for determining whether the SIM card meets the second preset condition or not under the condition that the abnormality detection application program determines that the first preset condition is met (namely, the SIM card is initially determined to be abnormal), determining whether the SIM card is abnormal or not, and outputting reminding information and/or performing power consumption management and control when the SIM card is determined to be abnormal. The reminding information is used for reminding the user that the SIM card is abnormal. In one particular embodiment, the power consumption management application may be a power saving puck.
For convenience of explanation, in the following embodiments, the abnormality detection application is Dubai, and the power consumption management application is a power saving wizard.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 3, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the electronic device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the electronic device vibrates, and an indicator light blinks, etc.
In the embodiment of the application, the application framework layer can also comprise a screen monitoring module. The screen monitoring module is used for monitoring the state of the screen. The state of the screen may include a bright screen state, an off screen state, and the like. The screen monitoring module is also used for sending a screen state change message to the Dubai when the screen state is changed. Specifically, when the screen enters an off-screen state from a bright-screen state, the screen monitoring module sends an off-screen message to the Dubai. The screen-off message characterizes that the screen enters the screen-off state from the screen-on state. When the screen enters a bright screen state from a screen-off state, the screen monitoring module sends a bright screen message to the Dubai. The bright screen message characterizes that the screen enters a bright screen state from a bright screen state.
It should be noted that, in other embodiments, the screen monitor module may also be located at other layers of the software architecture layer, for example, an application layer or a kernel layer, which is not limited in any way in the embodiments of the present application.
Android runtimes include core libraries and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media library (media library), three-dimensional graphics processing library (e.g., openGL ES), 2D graphics engine (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
In the embodiment of the application, the kernel layer further comprises a data acquisition module. The data acquisition module is used for acquiring target data and reporting the target data to the Dubai. The target data may include one or more of AP sleep data, AP wake data, DDR frequency change data, MD interrupt data, and a data reception object, among others. The AP sleep data is related data that the AP enters a sleep state. The AP wake-up data is related data of the AP wake-up, the DDR frequency change data is related data of change of the DDR working frequency, and the MD interrupt data is related data of an interrupt signal sent to the AP by the MD.
The AP sleep data includes, but is not limited to, a time when the AP enters a sleep state (hereinafter, referred to as AP sleep time), and the like. The AP wake-up data includes, but is not limited to, a time when the AP is woken up (hereinafter referred to as an AP wake-up time), and the like. The DDR frequency change data is also referred to as DDR frequency point change data, including, but not limited to, a timing when the DDR frequency changes, a frequency after the change, and the like. MD interrupt data includes, but is not limited to, the time at which the MD sends an interrupt signal to the AP, and the like. Alternatively, the device operation data may be acquired and reported in the form of an event (event). That is, the data acquisition module acquires the sleep event of the AP, the wake event of the AP, the frequency change event of the DDR, the interrupt event of the MD, the time stamps of these events, and the like, and reports these events and time stamps to the Dubai of the application layer.
The data reception object refers to a final reception object of a packet transmitted to the AP via the MD, that is, a transmission destination of the packet. The final receiving object of the data packet may be an application program in the electronic device, or a protocol layer of the AP, etc.
In addition, the kernel layer may also include a SIM identification module. The SIM identification module is used for reading and identifying user identity information associated with the SIM card. The recognition result of the SIM recognition module may include recognition success and recognition failure. The successful identification means that the SIM card can normally identify and read the user identity information of the SIM card. The identification failure refers to that the SIM card cannot identify and read the user identity information of the SIM card. Under the conditions of invalid SIM card identity information, damaged SIM card hardware, poor contact between the SIM card and an SIM card interface and the like, the SIM identification module fails to read the card. When the identification result of the SIM identification module is identification failure, the SIM identification module may report the identification result to Dubai. Optionally, the triggering of the SIM identification module identifying action may be triggered by inserting the SIM card into the SIM card interface, or may be triggered by other software operations, for example, periodically triggering the SIM identification module action according to a preset program, etc.
It will be appreciated that in some embodiments, the SIM identification module may also be located at other layers of the software architecture, such as the application architecture layer, etc.
The hardware layer at least comprises devices such as AP, DDR, MD and the like.
For easy understanding, the following embodiments of the present application will take an electronic device having a structure shown in fig. 2 and fig. 3 as an example, and specifically describe a method for managing a SIM card provided by the embodiments of the present application with reference to the drawings and application scenarios.
Fig. 4 is a timing diagram of an exemplary method for managing a SIM card according to an embodiment of the present application, where the method includes:
s101, a data acquisition module of a kernel layer acquires target data, wherein the target data comprises at least one of AP dormant data, AP wake-up data, DDR frequency change data, MD interrupt data, a data receiving object and the like.
S102, the data acquisition module of the kernel layer reports the target data to the Dubai of the application program layer.
S103, a screen monitoring module of the application program framework layer monitors the screen state.
And S104, when the screen state changes, the screen monitoring module of the application program framework layer sends a screen state change message to the Dubai.
The steps S101 and S103 may be continuously performed. Moreover, the steps S101-S102 and the steps S103-S104 are not sequenced, and the two groups of steps can be synchronously performed.
S105, determining whether a first preset condition is met or not according to the screen state change message and the target data by Dubai; if yes, executing step S106; if not, the detection is ended.
The first preset condition is a condition that Dubai determines that the SIM card is abnormal.
According to the screen state change message and the target data, if the first preset condition is determined to be met, the Dubai preliminarily determines that the SIM card is abnormal, and then step S106 is executed; if the first preset condition is not met, the Dubai initially determines that the SIM card is not abnormal, no processing is performed, and the detection is finished.
It can be appreciated that in this embodiment, for the abnormality detection of the SIM card (i.e. detecting whether the SIM card has an abnormality), the primary detection process may include a primary detection process and a secondary detection process. The steps S105 to S107 are preliminary detection processes for preliminarily detecting whether the SIM card is abnormal. In practical application, the abnormality detection of the SIM card may be triggered by a preset event. The event triggering detection may be, for example, a screen entering an off-screen state, or the like. Every time a preset event occurs, an abnormality detection flow of the SIM card is triggered once. In the embodiment of the application, the detection refers to a detection flow triggered by the occurrence of a preset event, and the detection includes a primary detection flow and a secondary detection flow. Ending the detection refers to ending the detection flow triggered by the preset event.
Specific implementation of this step may refer to steps S201 to S210 described below.
S106, the Dubai sends a card abnormality message to the power-saving eidolon of the application program layer, wherein the card abnormality message indicates that the SIM is abnormal.
Alternatively, the card anomaly message may be embodied by assigning a preset value to the flag bit, or may be embodied by an event, or may be embodied by other preset data information, which is not limited in the embodiment of the present application.
S107, the power-saving eidolon responds to the card abnormality message and determines whether the SIM card meets a second preset condition according to a preset detection strategy; if yes, step S108 is executed, and if no, the detection is ended.
The step is a secondary detection flow in the SIM card abnormality detection flow, namely, the step is used for secondarily confirming whether the SIM card has abnormality or not.
The preset detection strategy is used for detecting whether at least one of abnormality such as incapacity of normal communication, incapacity of recognition and network speed limit exists in the SIM card.
The second preset condition is a condition that the power-saving eidolon determines that the SIM card is abnormal.
If the SIM card meets the second preset condition according to the preset detection strategy, which means that the power saving eidolon determines that the SIM card is abnormal, executing step S108; if the SIM card is determined not to meet the second preset condition, the power-saving eidolon determines that the SIM card is not abnormal, no processing is performed, and the detection is ended.
S108, the power-saving eidolon outputs reminding information and/or performs power consumption management and control, wherein the reminding information is used for reminding a user that the SIM is abnormal.
That is, when the power saving eidolon determines that the SIM card is abnormal, the power saving eidolon outputs the reminding information, or performs power consumption control, or outputs the reminding information and performs power consumption control.
Optionally, the reminding information can be voice reminding information, or interface reminding information such as popup window and notification information. In a specific embodiment, the alert information output by the power saving puck may be as shown in fig. 5.
Optionally, the power consumption management includes, but is not limited to, intercepting an interrupt signal sent by the MD, disabling at least one of the SIM card, and the like. See specifically step S213 of the following embodiment.
In this embodiment, whether the first preset condition is satisfied is determined based on the AP sleep data, the AP wake-up data, the DDR frequency change data, the MD interrupt data, the data receiving object, the screen state change message, and the like, and whether the SIM card satisfies the second preset condition is determined based on a preset detection policy, so as to determine whether the SIM card is abnormal. Under the condition that the SIM card is abnormal, outputting reminding information and/or performing power consumption management and control. Therefore, the abnormal SIM card can be timely detected, and a user is reminded of timely solving the problem of abnormal SIM card, so that the problem of increased standby power consumption caused by abnormal SIM card is solved. Moreover, the problem of standby power consumption increase caused by abnormal SIM card can be solved through power consumption control, so that the standby power consumption is reduced, the standby time of the equipment is prolonged, and the user experience is improved. In addition, when the first preset condition is met and the abnormality of the SIM card is preliminarily determined by the Dubai, the reminding information is further output and/or the power consumption management and control is carried out when the abnormality of the SIM card is confirmed by the power saving eidolon, so that the accuracy of judging the abnormality of the SIM card is improved, the influence of the power consumption error management and control on the normal operation of the electronic equipment is prevented, and the user experience is further improved.
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 method for managing a SIM card, before S107, the method may further include:
a. the SIM identification module identifies and reads information of the SIM card.
b. When the SIM identification module fails to identify, the SIM identification module sends an identification failure message to the Dubai.
c. Dubai sends an identification failure message to the power saving puck.
The step S107 may include:
the power saving eidolon responds to the card abnormality message to confirm whether the recognition failure message sent by the Dubai is received;
if the recognition failure message sent by Dubai is received, step S108 is executed;
if the recognition failure message sent by Dubai is not received, step S107 is performed.
In this embodiment, after the recognition by the SIM recognition module fails and the Dubai sends the card exception message to the power saving eidolon (i.e., the Dubai initially determines that the SIM card is abnormal), the power saving eidolon does not confirm whether the SIM card meets the second preset condition any more, but directly outputs the reminding information and/or performs power consumption. Therefore, on one hand, the problem that the standby power consumption is increased due to the fact that the SIM card cannot recognize the scene is solved, the standby power consumption is reduced, the standby time of the equipment is prolonged, and the user experience is improved; on the other hand, the SIM identification module can confirm that the abnormality which cannot be identified by the SIM card exists, the power-saving eidolon does not need to repeatedly confirm according to a preset detection strategy, the algorithm flow is saved, the algorithm is simplified, and the power consumption of the electronic equipment is further saved.
The implementation process of the management method of the SIM card is further described below with reference to the accompanying drawings, so as to describe in detail specific methods of determining whether the SIM card is abnormal or not, managing and controlling power consumption, etc. by the Dubai and the power saving eidolon.
In order to facilitate the understanding of the scheme, the reason why the power consumption of the electronic device increases due to the abnormality of the SIM card is first analyzed.
1. SIM card network speed limit causes power consumption increase
Fig. 6 is a schematic diagram illustrating a data flow in a SIM card based communication process of an electronic device according to an embodiment of the present application. As shown in fig. 6, in the SIM card communication process, the electronic device has a data transmission path as follows: an antenna, MD and AP. Wherein transmission between MD and AP may be via DPMAIF data paths. The AP side may include functional modules such as CCMNI, linux network stack (net stack), and user (user) modules. CCMNI is a network device (raw IP net device) of the native IP type. Alternatively, the user module may be a module in the AP that is responsible for running the application.
Taking the example of receiving data by the electronic device, the specific transmission process of the data is as follows: 1) The antenna receives a data packet (packet) and transmits the data packet to the MD; 2) The MD sends the data packet to the AP through the DPMAIF; 3) The AP side controls a driver of the DPMAIF to push the data packet to the CCMII; 4) CCMNI holds a wake lock (ccmni_md1) for a preset duration (e.g., 1 s), and sends the data packet to Linux net stack; 5) And the Linux net stack sends the data packet to the user module.
When the electronic device sends data, the transmission process of the data is opposite to the above process, and will not be described again.
When the SIM card network limits the speed, the data transmission rate is reduced, and when data is transmitted through the paths, the data packet is split into a plurality of small data packets and then transmitted. In this way, compared with the network without speed limit, when the SIM card network is speed-limited, the CCMNI needs a longer lock time to complete the transmission of one data packet, which can lead to continuous operation of the AP, and the number of data packets sent by the MD increases, and the number of times that the MD sends interrupt signals to the AP increases, i.e., the MD wakes up the AP frequently. The continued operation of the AP and frequent waking up of the AP by the MD may result in increased power consumption of the electronic device.
Fig. 7 is a schematic diagram of monitoring data under an exemplary SIM card network speed limit condition according to an embodiment of the present application. And under the condition that the power consumption of the electronic equipment is increased at night, detecting the network speed limit condition, wherein the detection result is FAIL, which indicates that the network of the SIM card is speed-limited. Further, the detection result shows that the user is speed-limited 146 times during the use of the network, as shown in fig. 7 (a). In this regard, the frequent wake-up original information discovery of the electronic device is invoked, and the electronic device is frequently woken up at night, as shown in fig. 7 (b). Also, the wake-up source is mainly MD wake-up AP (shown as dpmaif_ap in the figure), that is, MD frequently wakes up AP.
That is, in the case of SIM network speed limitation, MD wakes up AP frequently, which causes AP to be unable to sleep, and thus causes power consumption of electronic device to increase.
2. The power consumption is increased due to the fact that the SIM card cannot normally communicate and cannot be identified
From the above analysis, it is clear that the electronic device needs to communicate between the AP and the MD in the SIM card based process. The AP and the MD belong to different cores and need to perform inter-core communication. The inter-core communication generally adopts an inter-core interrupt or shared memory mode, and the communication process of the inter-core communication mode is as follows:
1) Inter-core interrupt
When the inter-core communication is interrupted, an interrupt signal is used between the two cores to wake up the opposite terminal, and data transmission is realized through a preset protocol.
Fig. 8 is a schematic diagram illustrating an example of inter-core interrupt communication according to an embodiment of the present application. As shown in fig. 8, when inter-core interrupt communication is performed between the AP and the MD, if the sender needs to send data, the sender sends an interrupt signal to the receiver, and after receiving the interrupt signal, the receiver enters a data processing flow, the sender sends data, and the receiver receives the data sent by the sender.
2) Shared memory
When the shared memory is communicated, a memory space is shared between the two cores at the DDR side, and the opposite terminal is reminded to read data in an interrupt mode.
Fig. 9 is a schematic diagram illustrating an example of shared memory communication according to an embodiment of the present application. As shown in fig. 9, at the time of initializing the electronic device, a shared memory common to an AP and an MD is divided at the DDR side; when data transmission is needed, a sender writes data into a shared memory; after the data is written into the shared memory, the sending party sends an interrupt signal to the receiving party to inform the receiving party to read the data; and after receiving the interrupt signal, the receiver reads the data from the shared memory.
It can be seen that both inter-core communication modes wake up the peer by means of an interrupt signal. When the SIM card cannot normally communicate, an operator frequently sends signals (data packets) to the electronic device to confirm information such as a user state due to a management requirement, so that the MD may frequently send an interrupt signal to the AP and wake up the AP frequently, thereby increasing power consumption of the electronic device. When the SIM card cannot recognize, the MD may frequently send an instruction or a signal (data packet) to the AP to acquire a card status, register a network, etc., so that the MD may also frequently send an interrupt signal to the AP, and frequently wake up the AP, thereby increasing power consumption of the electronic device.
It should be noted that, in the case where the SIM card cannot normally communicate and the SIM card cannot recognize, the receiving object of the data packet sent by the MD to the AP is a protocol layer of the AP, but not a user module of the AP, that is, in both cases, the final receiving object of the data packet is not an application program. For convenience of description, in the following embodiments, among the packets transmitted from the MD to the AP, the packets whose data receiving object is an application are referred to as first-class packets, may also be referred to as normal packets, and the packets whose data receiving object is not an application are referred to as second-class packets, may also be referred to as abnormal packets. That is, in the case that the SIM card cannot normally communicate and the SIM card cannot be identified, the electronic device has a phenomenon that an abnormal data packet causes frequent wake-up.
In addition, when the inter-core communication is performed by adopting the shared memory mode, an operator frequently transmits signals to the electronic equipment when the SIM card cannot normally communicate, or the MD frequently transmits signals to the AP when the SIM card cannot identify, and the MD may not wake up the AP frequently, so that the DDR does not power down for a long time. Specifically, as analyzed above, when the MD sends data to the AP in the shared memory manner, the AP writes the data to the shared memory in the DDR before the MD as the sender sends the interrupt signal to the AP as the receiver. However, since the SIM is abnormal, writing may not be successful when the MD writes data to the DDR, and thus the MD continues to write data to the DDR, so that the DDR is in the operation mode for a long time, and cannot enter the low power consumption mode, that is, the DDR is not powered down for a long time. And the MD cannot successfully write data into the DDR, so that the MD cannot send an interrupt signal to the AP, and the AP can sleep normally. That is, the AP is in a sleep state, but the DDR is not powered down for a long time, which may result in an increase in power consumption of the electronic device.
Fig. 10 is a schematic diagram of running data and DDR frequency distribution of an AP in a certain period of time when an arrearage of a SIM card results in a shutdown according to an embodiment of the present application. As shown in fig. 10 (a), the electronic apparatus is turned off for 4h51m36s and is not charged. In this process, the AP wakes up 116 times for a sleep period of 4h49m9 s. During this period, the frequency distribution diagram of the DDR is shown in fig. 10 (b). The DDR frequency shown on the abscissa in the figure is the possible operating frequency when the DDR is in the operating mode. As can be seen from fig. 10 (b), the total duration of DDR operation in the operation mode is 4.86h within 4h51m36s of the electronic device off-screen, wherein the duration of DDR operation in the 1000 frequency index value is 4.62h. It follows that during standby (AP in sleep state) DDR continues to run at low frequency without entering low power mode, which can lead to increased power consumption of the electronic device.
That is, in the case where the SIM cannot normally communicate and the SIM card cannot recognize, the MD frequently wakes up the AP, resulting in the AP failing to sleep, or the DDR does not power down for a long time, thus resulting in an increase in power consumption of the electronic device.
Based on the analysis, the management method of the SIM card provided by the embodiment of the application preliminarily confirms whether the SIM card is abnormal by detecting whether DDR is not powered down for a long time in the standby period and detecting whether an abnormal data packet exists in the standby period or MD caused by network speed limit wakes up an AP frequently.
Fig. 11 is a flowchart illustrating an exemplary method for managing a SIM card according to an embodiment of the present application. The present embodiment focuses on the process of determining whether the SIM card is abnormal by the Dubai and the power saving wizard, and the process of reporting data to the Dubai by the data acquisition module, the screen monitoring module, and the like will not be described in detail, and may be referred to the embodiment shown in fig. 4. As shown in fig. 11, the management method of the SIM card includes:
s201, when the Dubai receives AP wake-up data, determining whether the duration of the last sleep period is longer than a preset sleep duration according to the AP sleep data; if yes, go to step S202; if not, the detection is ended without any processing.
Specifically, the AP wakeup data includes an AP wakeup time, and the AP sleep data includes an AP sleep time. The sleep period refers to a period of time when the AP is continuously in a sleep state, that is, a period of time between an AP sleep time and an AP wake time, which are adjacent in time sequence, and the AP sleep time is earlier than the AP wake time. It is appreciated that one or more sleep periods may be determined based on the AP wake data and the AP sleep data. The last sleep period refers to one of the sleep periods of the AP that is closest to the current time.
When the Dubai receives the AP wake-up data, the Dubai can determine that the AP is woken up, and the Dubai obtains an 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 period between the AP sleep time and the last AP sleep time is the last sleep period. The time difference between the AP wakeup time and the last AP sleep time is the duration of the last sleep period. For example, the Dubai receives the AP wakeup data sent by the data acquisition module, where the AP wakeup time included in the AP wakeup data is T1. The Dubai determines that the AP is awake and determines that, based on time T1, the AP sleep time closest to T1 is T0 before T1. Thus, it is possible to determine the period from the time T0 to the time T1 as the last sleep period, and the duration of the last sleep period is T1 to T0.
When the Dubai determines that the time length of the last sleep period is longer than the preset sleep period, step S202 described below is performed. Alternatively, the preset sleep time period may be, for example, 60s.
It should be noted that, in this embodiment, for steps S201 to S203, the "current detection" is an event triggered SIM card anomaly detection process, including a primary detection process and a secondary detection process, in which "Dubai receives AP wake-up data".
S202, dubai acquires DDR frequency change data in the last sleep period.
Specifically, the DDR frequency change data sent to the Dubai by the data acquisition module may include a time when each frequency change of the DDR occurs, a frequency after the change, and the like. For convenience of description, DDR frequency change data corresponding to one frequency change is referred to as a set of DDR frequency change data. The Dubai may acquire all DDR frequency change data in the last sleep period at the time when the DDR frequency is changed, i.e., the Dubai acquires one or more sets of DDR frequency change data in the last sleep period at the time when the DDR frequency is changed.
S203, the Dubai determines whether the power-off duration of the DDR in the last sleep period is greater than a preset duration threshold according to the DDR frequency change data in the last sleep period; if yes, go to step S211; if not, the detection is ended without any processing.
The power-off duration refers to the total duration of DDR operation in the working mode. Specifically, the Dubai counts the DDR frequency distribution in the last sleep period, and determines the total duration of the DDR operating in the working mode in the last sleep period, thereby obtaining the duration of the DDR not powering down. It will be appreciated that in the operating mode, the DDR will switch between multiple operating frequencies. Therefore, the corresponding working time length of each working frequency in the DDR working mode in the last sleep period can be added to obtain the non-power-on time length of the DDR in the last sleep period.
Specifically, the Dubai may calculate, based on the DDR frequency change data of every two groups adjacent in time sequence in the last sleep period, a working time period corresponding to the plurality of working frequencies. And summing the duration of each operating frequency. And calculating the time difference between the first occurrence change time and the second occurrence change time for two groups of DDR frequency change data with adjacent time sequences, and obtaining the working time length of the changed frequency corresponding to the first occurrence change time. The first occurrence change time is earlier than the second occurrence change time, for example, in the last sleep period, the DDR frequency is changed from F0 to F1 at a time of 00:00:01 (0 time 01 minutes), and the DDR frequency is changed from F1 to F2 at a time of 00:00:02 (0 time 02 minutes). Then, the DDR data in the last sleep period acquired by Dubai includes: the first occurrence of the change time 00:00:01 and the corresponding frequency F1 after the change, and the second occurrence of the change time 00:00:02 and the corresponding frequency F2 after the change. The first change time 00:00:01 and the second change time 00:00:02 are two adjacent time sequence change times. Dubai calculates the time difference (1 s) between the two moments to obtain the corresponding working time length of the frequency F1. That is, according to the DDR frequency variation data adjacent to the two sets of time sequences, the working time length corresponding to the frequency F1 is calculated to be 1s. Similarly, according to the DDR frequency change data adjacent to each two groups of time sequences, one frequency can be obtained to correspond to one working time length. And then, carrying out frequency statistics on the obtained frequency and the working time length, and adding the working time lengths of the same frequency to obtain the total working time length corresponding to the frequency. The result of the frequency statistics may refer to the embodiment shown in fig. 10, and will not be described herein.
In one embodiment, the preset duration threshold may be a preset fixed duration.
In another embodiment, the preset duration threshold may also be determined according to the duration of the last sleep period. Alternatively, the preset duration threshold may be a product of the duration of the last sleep period and a preset ratio. The preset ratio can be set according to practical situations, for example, can be 1/3 or 1/4, etc. In this case, the Dubai may determine a preset duration threshold according to the duration of the last sleep period and the preset ratio, and then compare the power-off duration of the DDR in the last sleep period with the preset duration threshold to determine whether the power-off duration of the DDR is greater than the preset duration threshold. Of course, the Dubai may determine the ratio of the duration of no power-down to the duration of the last sleep period to obtain a duration ratio, and determine whether the duration ratio is greater than a preset ratio; if yes, determining that the power-off duration of the DDR in the last sleep period is greater than a preset duration threshold; if not, determining that the power-off duration of the DDR in the last sleep period is smaller than or equal to a preset duration threshold.
If the power-off time length of the DDR in the last sleep period is greater than the preset time length threshold, indicating that the DDR does not enter the low power consumption mode for a long time (i.e., does not power off for a long time), initially determining that the SIM card has an abnormality, and executing the following step S211; if the non-power-on duration of the DDR in the last sleep period is smaller than or equal to the preset duration threshold, the DDR in the last sleep period is not powered on for a long time, no processing is performed, and the detection is finished.
As analyzed above, the inability of the SIM to communicate properly or identify problems that may result in the DDR not powering down for long periods of time during the AP is in sleep state. Therefore, in steps S201 to S203, when it is determined that the AP is awakened, it is determined whether the DDR power-off duration in the last sleep period is greater than the preset duration threshold value by the DDR frequency change data in the last sleep period, so as to determine whether the DDR is not powered on for a long time. Therefore, the abnormal condition of the SIM card can be quickly and accurately judged preliminarily, and measures such as power consumption management and control can be taken conveniently subsequently, so that the electric quantity of the electronic equipment is saved, and the user experience is improved.
That is, in the above steps S201 to S203, in the case where the time length of the last sleep period is longer than the preset sleep period, it is determined whether the SIM card is abnormal by determining whether the power-off period of the DDR in the last sleep period is longer than the preset period threshold. In other words, step S105"Dubai in the embodiment shown in fig. 4 described above determines whether the first preset condition of the first preset condition" is satisfied according to the screen state change message and the target data may include condition 1: the time length of the last sleep period is longer than the preset sleep period, and the time length of the DDR in the last sleep period without power-down is longer than a preset time length threshold.
In addition, in addition to performing the above steps S201 to S203, dubai may perform the following steps S204 to S210 to determine whether there is an abnormal packet or MD frequent wake up of the AP caused by network speed limit. 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 satisfied, and the steps of the two branches may be independently performed without sequential order.
S204, the Dubai receives the off-screen message.
S205, dubai starts timing from the current time.
That is, dubai starts the timer with the current time as the timer start point.
S206, in the timing process, if the screen-on message is received before the timing reaches the preset detection period duration, the Dubai stops timing and ends the detection.
The preset detection period duration can be set according to actual requirements, for example, 60 seconds(s) or 80 s.
It should be noted that, in the present embodiment, for steps S204 to S210, the detection process triggered by the event of "Dubai receives the off-screen message" includes a primary detection process and a secondary detection process.
S207, if the timing reaches the preset detection period duration, the Dubai stops timing and acquires MD interrupt data in the timing period.
The timing period is that: and taking the timing starting time as a starting point, wherein the duration is a continuous time period of the preset detection period duration.
Taking the preset detection period duration of 60S as an example, the following steps S204 to S207 are illustrated as follows: dubai receives the off-screen message at time A, dubai starts timing from time A. If Dubai receives a bright screen message before the timer reaches 60s (i.e., before time A+60 s), the timer is stopped. For example, the timer reaches 30s, i.e. a bright screen message is received at time a+30s, and the timer is stopped. If the timing reaches 60s, the timing is stopped and MD interrupt data in a time period from the time A to the time A+60s are acquired if the timing process is indicated that the bright screen message is not received.
S208, the Dubai determines whether the number of times of sending interrupt signals to the AP by the MD is larger than a preset interrupt number threshold value according to the MD interrupt data in the timing period; if yes, go to step S209; if not, the process returns to step S205.
As in the above embodiments, the MD interrupt data may include the timing at which the MD transmits the interrupt signal to the AP, and the like. And the Dubai counts the number of signals with the transmission time in the timing period in the interrupt signals of the MD to the AP, and the number of times of the MD transmitting the interrupt signals to the AP in the timing period is obtained.
The preset interruption frequency threshold may be set according to actual requirements, for example, in the case where the preset detection period duration is 60s, the preset interruption frequency threshold may be 10 times.
If the number of times that the MD sends the interrupt signal to the AP is greater than the preset interrupt number threshold, which indicates that the MD wakes up the AP frequently in the timing period, there may be an abnormality of the SIM card, and step S209 is performed. If the number of times the MD sends the interrupt signal is less than or equal to the preset interrupt number threshold, which indicates that the MD does not wake up the AP frequently in the timing period, the process returns to step S205, and the next cycle of detection is entered. The "current time" in step S205 is the time when this step is performed.
S209, determining whether the duty ratio of a normal data packet is smaller than a preset duty ratio in a data packet transmitted from the MD to the AP in a timing period according to the data receiving object; if not, executing step S210; if yes, go to step S211; the normal data packet is a data packet in which the data receiving object is an application program.
As described above, in the case where the SIM card cannot normally communicate and the SIM card cannot recognize, the data packet transmitted from the MD to the AP is an abnormal data packet (the data receiver object is not a data packet of the application). Therefore, in this step, if it is determined that the number of times the MD transmits the interrupt signal is greater than the preset interrupt number threshold, it is further determined whether the duty ratio of the normal packet in the packets transmitted from the MD to the AP in the timing period is less than the preset duty ratio, and whether the frequent wakeup is the frequent wakeup caused by the abnormal packet.
Specifically, dubai acquires the reception object of each data packet transmitted by MD to AP in the timer period, and determines whether each data reception object is an application installed in the electronic device. If the receiving party or the transmitting party of the data packet is a certain application program installed in the electronic equipment, determining that the data packet is a normal data packet; otherwise, determining the data packet as an abnormal data packet. If the duty ratio of the normal data packet in the data packets transmitted by the MD in the timing period is greater than or equal to the preset duty ratio, which indicates that the MD frequently wakes up the AP mostly is caused by the running requirement of the application program, but not by the abnormal data packet, and it is determined that the SIM card has no abnormal condition that cannot normally communicate or cannot be identified, step S210 is executed, and it is further detected whether the frequent wakeup is the frequent wakeup caused by the network speed limit. If the duty ratio of the normal data packet in the data packet transmitted from the MD to the AP in the timing period is smaller than the preset duty ratio, it is indicated that the frequent wake-up of the AP by the MD is mostly not caused by the running requirement of the application program, but caused by the non-constant data packet, it is preliminarily determined that the SIM card has an abnormality that cannot be normally communicated or recognized, and step S211 is executed.
The preset duty ratio may be set according to actual requirements, for example, in the case where the preset detection period duration is 60s, the preset duty ratio may be 60%.
S210, determining whether the number of normal data packets in a timing period is larger than a preset number or not and whether the data quantity of each normal data packet is smaller than a preset data quantity threshold or not by Dubai; if the number of the normal data packets is greater than the preset number, and the data amount of each normal data packet is smaller than the preset data amount threshold, step S211 is executed; otherwise, the process returns to step S205.
Alternatively, in the case where the preset detection period duration is 60s, the preset number may be 1000, for example. The data amount of the data packet, i.e. the size of the data packet. The preset data amount threshold is a threshold characterizing the size of the data packet, and may be, for example, 20 bytes (byte).
If the number of normal data packets is greater than the preset number in the timing period and the number of each normal data packet is less than the preset data amount threshold, the electronic device generates more times of normal data packet transmission in the timing period and each data packet is smaller, which indicates that the MD frequent wake-up of the AP in the timing period is caused by the SIM card at the network speed limit, step S211 is executed. If the number of the normal data packets is less than or equal to the preset number in the timing period, or the number of the normal data packets is not less than the preset data amount threshold, which indicates that the frequent wakeup in the timing period is the normal transmission initiation of the normal data packets, and the SIM card has no network speed limit, the method returns to execute step S205, and enters the detection of the next period.
In short, dubai periodically detects the number of times the MD transmits the interrupt signal and the duty ratio of a normal packet among packets transmitted from the MD to the AP in the case where it is determined that the electronic device is in the off-screen state according to the screen state change message. In a period, the number of times that the MD sends the interrupt signal is greater than the preset interrupt number threshold, and the duty ratio of the normal data packet in the data packet transmitted to the AP by the MD is less than the preset duty ratio, which indicates that the MD is frequently awakened by the MD due to the abnormal data packet transmitted in the period, and the Dubai initially determines that the SIM card may have abnormal communication or cannot be identified, and step S211 is performed. The period duration of the periodic detection is the preset detection period duration.
Under the condition that the duty ratio of the normal data packets is larger than or equal to the preset duty ratio, the Dubai further detects the number and the data volume of the normal data packets, and determines whether the MD frequently wakes up the AP due to network speed limit through the number of interrupt signals, the duty ratio of the normal data packets, the number and the data volume of the normal data packets. Specifically, in a period, the number of times that the MD sends the interrupt signal is greater than a preset interrupt number threshold, the duty ratio of the normal data packets is greater than or equal to the preset duty ratio, the number of normal data packets is greater than the preset number, and the data amount of each normal data packet is smaller than the preset data amount threshold, which indicates that the electronic device has occurred more times of normal data packet transmission in the period, each data packet is smaller, the SIM card has a network speed limit, the Dubai initially determines that the SIM card may have a network speed limit, and step S211 is executed.
If the two conditions are not met, the MD does not wake up the AP frequently in the period, or the MD wakes up the AP frequently in the period, which is the wake-up caused by the running requirement of the application program, the Dubai preliminarily determines that the SIM card is not abnormal, and returns to execute the step S205 to detect the next period.
That is, step S105"Dubai in the embodiment shown in fig. 4 described above determines whether the first preset condition of the first preset condition" is satisfied according to the screen state change message and the target data may further include condition 2: the number of times that the MD sends the interrupt signal to the AP is larger than a preset interrupt number threshold, and the duty ratio of a normal data packet in the data packets transmitted to the AP by the MD is smaller than a preset duty ratio. The first preset condition may further include condition 3: the number of times that the MD sends interrupt signals to the AP is larger than a preset interrupt number threshold, the duty ratio of normal data packets in data packets transmitted to the AP by the MD is larger than or equal to a preset duty ratio, the number of the normal data packets in a timing period is larger than the preset number, and the data quantity of each normal data packet is smaller than a preset data quantity threshold.
S211, the Dubai sends a card abnormality message to the power saving eidolon.
S212, the power-saving eidolon responds to the card abnormality message and determines whether at least one of abnormality such as incapacity of normal communication, incapacity of recognition and network speed limit exists in the SIM according to a preset detection strategy; if yes, go to step S213; if not, the detection is ended without any processing.
In this embodiment, for step S212, "this detection" refers to a detection procedure triggered by at least one of the two events, i.e., "Dubai received AP wake-up data" or "Dubai received off-screen message".
In one embodiment, the preset detection policy may include at least one of the following policies:
1) Communication detection strategy
The communication detection policy (also referred to as a first detection policy) refers to a policy set in advance for detecting whether the SIM card cannot normally communicate. In one embodiment, the communication detection policy may include at least one of the following:
a. the power saving eidolon detects the state of the SIM card by calling the communication detection interface of the MD, and determines whether the SIM card cannot normally communicate.
The communication detection interface is an interface used for detecting the communication state of the SIM card in the MD. Optionally, the communication detection interface may invoke a sms application to send a sms message, and/or invoke a call application to make a call to confirm whether the SIM card is capable of normal communication. If the call of the short message application program is successful in sending the short message and/or the call of the telephone application program is successful in making a call, the SIM card is determined to be normal, namely the SIM card has no abnormal communication failure. If the call of the short message application program fails to send the short message and/or the call of the call application program fails to call, the SIM card is determined to be unable to normally communicate.
b. The power saving eidolon inquires an operator corresponding to the SIM card whether the SIM card cannot normally communicate.
Optionally, a communication inquiry channel between the power saving eidolon and the operator may be pre-established, and whether the SIM card cannot normally communicate is inquired through the communication inquiry channel. For example, an operator provides an interface for inquiring the cost, and when it is required to determine whether the SIM card is abnormal, the power saving eidolon calls the cost inquiry interface to inquire whether the SIM card is arrears and stops, so as to determine whether the SIM card cannot normally communicate. For another example, the operator provides an interface for inquiring the status of the card, and when it is required to determine whether the SIM card is abnormal, the power saving eidolon invokes the card status inquiry interface, determines whether the card is locked, and so on, so as to determine whether the SIM card cannot normally communicate.
Optionally, the electricity-saving eidolon may also call a short message application program, send a fee inquiry short message to the operator, or call a call application program, dial a fee inquiry call of the operator, inquire whether the SIM card has arrears and stops, thereby determining whether the SIM card cannot normally communicate.
In a specific embodiment, the power saving puck may first obtain authorization from the user before invoking the sms application to send a fee inquiry sms, or invoking the call application to place a fee inquiry call. Optionally, the power saving eidolon may output authorization acquisition information before sending the fee inquiry message or making a fee inquiry call each time, and the electronic device displays an authorization acquisition interface. After the user inputs the information of agreeing to the authorization in the authorization acquisition interface, the electricity-saving eidolon sends a short message or makes a call. Optionally, the power saving smart may also obtain user authorization when the user uses the power saving smart application for the first time, and no authorization is obtained for the user when a short message is subsequently sent or a call is placed.
2) Card identification policy
The card identification policy refers to a preset policy for detecting whether the SIM card cannot be identified. In one embodiment, the card identification policy may be as follows: the power saving eidolon detects the state of the SIM card by calling a card identification interface of the MD, and determines whether the SIM card cannot be identified.
The card identification interface is used for detecting whether the SIM card can be identified and read by the SIM card interface normally. Alternatively, the card identification interface may be the SIM identification module described above. If the SIM card is successfully identified by calling the card identification interface, the fact that the SIM card has no unrecognizable abnormality is determined. If the SIM card identification interface is called, the SIM card identification fails, and the SIM card is determined to be unable to be identified.
3) Speed limit detection strategy
The speed limit detection policy (also referred to as a second detection policy) refers to a preset policy for detecting whether the SIM card has network speed limit abnormality. In one embodiment, the speed limit detection strategy may include at least one of the following:
a. the power saving eidolon detects the state of the SIM card by calling a speed limit detection interface of the MD, and determines whether the SIM card has network speed limit abnormality.
In a specific embodiment, if the network speed limit detection result is that the detection fails (i.e. fails), the SIM card network speed limit is determined. If the network speed limit detection result is a pass detection result, determining that the SIM card has no abnormality of network speed limit.
b. The power saving eidolon inquires an operator corresponding to the SIM card whether the SIM card limits the speed of the network.
Optionally, a communication inquiry channel between the power saving eidolon and the operator may be pre-established, and whether the SIM card has abnormal network speed limit is inquired through the communication inquiry channel. For example, an operator provides an interface for flow inquiry, and when it is required to determine whether the SIM card is abnormal, the power saving eidolon invokes the flow inquiry interface to inquire the remaining flow of the SIM card, so as to determine whether the SIM card has an abnormality of network speed limit.
Optionally, the power saving eidolon may also call a short message application program, send a flow short message to the operator, and query the remaining flow of the SIM card to determine whether the SIM card has an abnormality of network speed limit. Or the power saving eidolon can call a call application program, and inquire the residual flow of the SIM card by dialing an inquiry flow telephone so as to confirm whether the SIM card has network speed limit abnormality.
c. The power saving eidolon performs network speed test through the ping command to determine whether the SIM card has abnormality of network speed limit.
Specifically, if the network speed test is passed, when the electronic equipment performs data transmission, the network speed is smaller than a preset network speed threshold value, and the duration time is longer than a preset duration time threshold value, then the existence of the network speed limit of the SIM card is determined; otherwise, determining that the SIM card does not have network speed limit.
d. The power saving eidolon monitors the flow of the electronic equipment by calling equipment management software (such as a mobile phone manager and the like) installed in the electronic equipment so as to determine whether the SIM card has the abnormality of network speed limit.
Optionally, the power saving eidolon may query, by the device management software, a usage flow of the electronic device in a time period of a preset duration, and determine whether the usage flow of the SIM card exceeds a preset flow threshold, so as to determine whether the SIM card has a network speed limit abnormality.
Optionally, the power saving eidolon may also query, by using the device management software, a data transmission speed of the electronic device in a time period of a preset duration, and determine whether the data transmission speed is less than a preset speed threshold, so as to determine whether the SIM card has a network speed limit abnormality.
It should be noted that, in the above several preset detection strategies, if the strategy includes multiple implementation manners, in practical application, one of the implementation manners may be selected for execution, or multiple implementation manners may be combined for execution, so long as the detection purpose of the detection strategy can be achieved.
In addition, the sequence of execution is not limited between different detection strategies, and multiple strategies can be executed sequentially or simultaneously, and when the execution result of a certain strategy is abnormal during the sequential execution, the subsequent strategy can not be executed any more. For example, it may be sequentially executed in the order of the communication detection policy, the card recognition policy, and the speed limit detection policy. 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 can be not executed any more, and the fact that the SIM card is abnormal can be directly determined. If the detection result of the communication detection strategy is that the SIM card is normal, continuing to execute the card identification strategy. Similarly, if the identification result of the card identification strategy is that the SIM card cannot be identified, the speed limit detection strategy is not executed any more, and the fact that the SIM card is abnormal is directly determined. If the identification result of the card identification strategy is that the SIM card identification is normal, continuing to execute the speed limit detection strategy. If the detection result of the speed limit detection strategy is the speed limit of the SIM card network, determining that the SIM card is abnormal. If the detection result of the speed limit detection strategy is that the network speed of the SIM card is normal, determining that the SIM card is not abnormal. Of course, the communication detection policy, the card identification policy and the speed limit detection policy may be executed simultaneously, so long as the detection result of at least one policy is abnormal, that is, it is determined that the SIM card is abnormal.
S213, the power-saving eidolon outputs reminding information and/or performs power consumption management and control.
Optionally, the power consumption management manner may include at least one of the following manners:
1) Interrupt interception
Alternatively, the power saving puck may send a stop interrupt instruction to the MD, the stop interrupt instruction being used to instruct the MD to stop sending the interrupt signal to the AP. And the MD responds to the interrupt stopping instruction to stop sending an interrupt signal to the AP, so that frequent awakening of the AP is prevented, the power consumption is reduced, the electric quantity is saved, the standby time of the electronic equipment is prolonged, and the user experience is improved.
Optionally, the power saving puck may also send a reduce interrupt instruction to the MD, where the reduce interrupt instruction is used to instruct the MD to reduce the number of times that an interrupt signal is sent to the AP. Alternatively, the reduction interrupt instruction may carry the target to be achieved by reducing the number of interrupt signals. In one implementation, the target may be that the number of interrupt signals in the preset period is less than or equal to a preset number. The preset period and the preset times can be designed according to actual requirements, for example, the preset period can be 10s, and the preset times can be 10 times. In a specific embodiment, in response to the interrupt reduction instruction, the MD counts the number of times of sending interrupt signals to the AP by the MD according to a preset period, and if the number of times of the interrupt signals in one period reaches the preset number of times, intercepts interrupt signals generated by the MD in the period and does not send the interrupt signals to the AP. Therefore, the number of times that the MD wakes up the AP is reduced, the power consumption is reduced, the electric quantity is saved, the standby time of the electronic equipment is prolonged, and the user experience is improved.
As a possible implementation manner, before sending the stopping interrupt instruction or the interrupt reducing instruction to the MD, the power saving eidolon may first confirm whether the current time is within a preset period of time, and if yes, send the stopping interrupt instruction or the interrupt reducing instruction to the MD; if not, the stop interrupt instruction or the interrupt instruction reduction instruction is not sent. The preset time period may be, for example, 00:00 to 06:00, etc. That is, interrupt interception at night can be selected to reduce the influence on the user and improve the user experience.
2) Disabling SIM card
Specifically, the power saving puck sends a disable SIM card instruction to the MD, the SIM card instruction being for indicating that use of the SIM card is disabled. The MD disables the SIM card in response to the disable SIM card instruction. The MD stops receiving and transmitting data, so that the MD does not wake up the AP any more, power consumption is reduced, electric quantity is saved, standby time of the electronic equipment is prolonged, and user experience is improved.
Optionally, before sending the instruction for disabling the SIM card to the MD, the power saving eidolon may further determine whether the current time is in a preset period of time, if so, send the instruction for disabling the SIM card to the MD, and if not, not send the instruction for disabling the SIM card. The preset time period may be, for example, 00:00 to 06:00, etc. That is, the SIM card may be selectively disabled during the night to reduce the impact on the user and improve the user experience.
It should be noted that, steps S201 to S203 and steps S204 to S210 described above belong to a parallel scheme for preliminarily determining whether the SIM card opening is abnormal, and may be performed simultaneously. In the above-described process, the order of execution of the steps is not limited, and the steps may be executed in the order shown in fig. 11, may be executed simultaneously in a plurality of steps, or may be executed in a changed order based on fig. 11, as long as the implementation logic is satisfied. For example, the step S208 and the step S209 may be performed first, then the step S208 may be performed, or the step S209 may be performed simultaneously, or the step S209 may be performed first, then the step S208 may be performed, as long as the final determination results of the two steps are consistent: in the timing period, the number of times the MD sends the interrupt signal is greater than the preset number of times of interrupt, and the duty ratio of the normal packet in the packets transmitted from the MD to the AP is less than the preset duty ratio, then step S211 is executed.
In another embodiment, after step S212, the method for managing a SIM card further includes:
counting the number of times of outputting reminding information and/or performing power consumption control (hereinafter referred to as control times) from the last screen-off to the current moment by the power-saving eidolon;
before the step S211, the method for managing a SIM card further includes:
The power saving eidolon responds to the card abnormal message to obtain the control times; if the control times are larger than the preset control times threshold, ending the detection.
As can be seen from the embodiment shown in fig. 11, during standby of the electronic device, dubai may perform one or more of the steps S201 to S211 above multiple times, that is, dubai may preliminarily determine that there is an abnormality in the SIM card multiple times, and send a card abnormality message to the power saving puck multiple times. In this embodiment, after the power saving eidolon secondarily confirms that the SIM card is abnormal, outputs a reminding message or performs power consumption management and control, the management and control times are counted, so that after the subsequent power saving eidolon receives the card abnormal message, if the management and control times are greater than a preset management and control times threshold, the secondary confirmation and related management and control steps are not repeatedly performed (i.e. steps S212 and S213 are not repeatedly performed), so as to simplify the flow and save the power consumption of the electronic device.
In the embodiment shown in fig. 11, dubai detects whether the MD frequently wakes up the AP not only by detecting whether the DDR is powered down during standby in steps S201 to S203, but also by detecting whether the MD frequently wakes up the AP by an abnormal packet during standby in steps S204 to S210 and whether the MD frequently wakes up the AP by network speed limit in the preliminary determination of whether the SIM card is abnormal. And under the condition that the result of any one of the three detection is yes, initially determining that the SIM card is abnormal, and sending a card abnormality message to the power-saving eidolon by Dubai. That is, step S105"Dubai of the above embodiment determines whether the" first preset condition "of the first preset condition" is satisfied or not, including the above condition 1, the above condition 2, and the above condition 3, based on the screen state change message and the target data, and the "first preset condition is satisfied" is satisfied: any one of the above condition 1, the above condition 2, and the above condition 3 is satisfied.
It should be noted that in other embodiments, only one or two of the above three tests may be performed. The embodiment of the present application is not limited in any way. When only one of the above three types of detection is performed, the "first preset condition" is a condition corresponding to the detection, and the "satisfying the first preset condition" is: the conditions corresponding to such detection are satisfied. For example, only steps S201 to S203 are used to detect whether the DDR is powered down during standby, i.e., steps S204 to S210 are not performed, i.e., the "first preset condition" is the condition 1, and the satisfaction of the preset condition is the satisfaction of the condition 1.
When only two of the above three kinds of detection are performed, the "first preset condition" includes conditions corresponding to the two kinds of detection, and the "satisfying the first preset condition" is to satisfy any one of the conditions corresponding to the two kinds of detection. For example, if it is detected in steps S204 to S210 that there is an abnormal packet during standby or that the network speed limit causes the MD to wake up the AP frequently, that is, steps S201 to S203 are not performed, the "first preset condition" includes the condition 2 and the condition 3, and the "meeting the first preset condition" is: the above condition 2 or the above condition 3 is satisfied.
The process described in fig. 11 is further described below in connection with the actual scenario.
1. Application scene with abnormal SIM card
In this embodiment, the SIM card has an abnormality in network speed limit or abnormal communication.
Referring to fig. 12, a specific example will be given of a SIM card shutdown or network speed limit. In this scenario, the electronic device may perform the following steps:
s301, responding to a screen-off operation of a user, and extinguishing a screen of the electronic equipment.
The electronic equipment is provided with the SIM card 1, and the SIM card 1 is stopped or network speed limit exists. The SIM card is turned off, which means that the electronic device (terminal device) cannot normally communicate with other terminal devices through the SIM card due to arrearages, user loss, and the like.
It should be noted that, under the condition that the SIM card is normal, after the screen of the electronic device is extinguished, the AP may enter a sleep state. Wherein, the screen extinction includes both the complete extinction of the screen (without displaying any content) and the display of the screen extinction interface.
And S302, under the condition that the screen is extinguished, the electronic equipment receives T data packets sent by an operator in a first time period, and the number of times of sending interrupt signals to the AP by the MD of the electronic equipment in the first time period is T.
S303, the electronic equipment executes at least one of the following strategies:
1) Displaying prompt information, wherein the prompt information is used for prompting that the SIM card 1 is abnormal;
2) In a second time period, the electronic equipment receives N data packets sent by an operator, and the number of times of sending interrupt signals to the AP by the MD of the electronic equipment is M; wherein M is smaller than N, the second time period is a time period after the first time period, and the screen of the electronic device remains extinguished in the second time period and between the first time period and the second time period;
3) In a fifth time period, the electronic device disables the SIM card 1; the fifth time period is a time period after the first time period, the fifth time period is within a preset time period, and the screen of the electronic device remains extinguished in the fifth time period.
Specifically, based on the target data in the first period, the electronic device executes the steps S101 to S104 and steps S201 to S212 through Dubai and the power saving genius according to the embodiments shown in fig. 4 and 11, determines that the SIM card 1 is abnormal, and based on step S213, performs at least one of "outputting the reminding information", "interrupting interception" and "disabling the SIM card", so that the electronic device displays the reminding information, or the number M of times of MD sending the final interrupting signal to the AP in the second period is less than the number N of data packets sent by the receiving operator, or the SIM card 1 is disabled. Therefore, the number of times that the MD wakes up the AP is reduced, or the problem that the DDR is not powered down is solved, so that the power consumption of the electronic equipment is reduced, the electric quantity is saved, the standby time of the electronic equipment is prolonged, and the user experience is improved.
2. Normal application scene of SIM card
In this embodiment, description is given by taking an example that the SIM card does not have network speed limit, cannot normally communicate, and cannot identify any one of a plurality of abnormalities, that is, the SIM card is normal. With continued reference to fig. 12, after scenario 1 described above, the electronic device may perform the following steps:
s304, after the SIM card 1 is replaced by the SIM card 2, the screen of the electronic equipment is extinguished in response to the screen-off operation of the user.
The SIM card 2 is a normal SIM card. The normal SIM card means that the SIM does not have any network speed limit or shutdown, and the electronic equipment (terminal equipment) can normally communicate with other terminal equipment through the SIM card.
And S305, under the condition that the screen is extinguished, the electronic equipment receives I data packets sent by the operator in a third time period, and the number of times that the MD of the electronic equipment sends an interrupt signal to the AP is I times.
S306, in a fourth time period, the electronic equipment receives J data packets sent by an operator, and the times of sending interrupt signals to the AP by the MD of the electronic equipment are J times; the fourth time period is a time period after the third time period, and the screen of the electronic device remains extinguished in the fourth time period and between the third time period and the fourth time period.
Specifically, in the third period, according to the embodiments shown in fig. 4 and 11, the electronic device executes the steps S101 to S104 and part or all of the steps S201 to S212 through Dubai and the power saving puck, so that it is determined that the SIM card 2 is not abnormal, and therefore, the power saving puck does not output the reminding information, and does not interrupt interception, disable power consumption management and control of the SIM card, and the like. Therefore, the number of times that the MD sends the termination interrupt signal to the AP in the fourth period is the same as the number of data packets sent by the electronic device to the operator, which are both J.
The above describes in detail an example of the management method of the SIM card provided by the embodiment of the present application. It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the application can divide the functional modules of the electronic device according to the method example, for example, each function can be divided into each functional module, for example, a detection unit, a processing unit, a display unit, and the like, and two or more functions can be integrated into one module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
It should be noted that, all relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The electronic device provided in this embodiment is configured to execute the method for managing a SIM card, so that the same effect as that of the implementation method can be achieved.
In case an integrated unit is employed, the electronic device may further comprise a processing module, a storage module and a communication module. The processing module can be used for controlling and managing the actions of the electronic equipment. The memory module may be used to support the electronic device to execute stored program code, data, etc. And the communication module can be used for supporting the communication between the electronic device and other devices.
Wherein the processing module may be a processor or a controller. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. A processor may also be a combination that performs computing functions, e.g., including one or more microprocessors, digital signal processing (digital signal processing, DSP) and microprocessor combinations, and the like. The memory module may be a memory. The communication module can be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip and other equipment which interact with other electronic equipment.
In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device according to this embodiment may be a device having the structure shown in fig. 2.
The embodiment of the application also provides a computer readable storage medium, in which a computer program is stored, which when executed by a processor, causes the processor to execute the method for managing the SIM card according to any of the above embodiments.
The embodiment of the application also provides a computer program product, which when running on a computer, causes the computer to execute the related steps so as to realize the method for managing the SIM card in the embodiment.
In addition, embodiments of the present application also provide an apparatus, which may be embodied as a chip, component or module, which may include a processor and a memory coupled to each other; the memory is used for storing computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory, so that the chip executes the management method of the SIM in each method embodiment.
The electronic device, the computer readable storage medium, the computer program product or the chip provided in this embodiment are used to execute the corresponding method provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding method provided above, and will not be described herein.
It will be appreciated by those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (13)

1. A method for managing a SIM card, the method being performed by an electronic device comprising a modem processor MD and an application processor AP, the electronic device being provided with a first SIM card, the first SIM card being down or there being a network speed limit, the method comprising:
responding to the screen-off operation of a user, wherein the screen of the electronic equipment is extinguished;
in a first time period, the electronic equipment receives a first number of data packets sent by an operator, and the number of times of sending interrupt signals to the AP by the MD is the first number;
in a second time period, the electronic equipment receives a second number of data packets sent by the operator, and the number of times of sending interrupt signals to the AP by the MD 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 extinguished within 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 by the second SIM card, responding to the screen-off operation of a user, and extinguishing the screen of the electronic equipment; the second SIM card is not stopped and no network speed limit exists;
in a third time period, the electronic equipment receives a fourth number of data packets sent by the operator, and the number of times of sending interrupt signals to the AP by the MD is the fourth number;
in a fourth time period, the electronic equipment receives a fifth number of data packets sent by the operator, and the number of times of sending interrupt signals to the AP by the MD is the fifth number; the fourth period of time is a period of time after the third period of time, and the electronic device keeps the screen extinguished within the third period of time and the fourth period of time, and between the third period of time and the fourth period of time.
2. The method of claim 1, wherein after the first period of time, before replacing the first SIM card with a second SIM card, the method further comprises:
the electronic equipment displays prompt information; and the prompt information indicates that the first SIM card is abnormal.
3. The method according to claim 1 or 2, characterized in that after the first period of time, before replacing the first SIM card with a second SIM card, the method further comprises:
Under the condition that the screen is extinguished, in a fifth time period, the electronic equipment disables the first SIM card; the fifth time period is within a preset time period.
4. A method according to any one of claims 1 to 3, wherein the electronic device further comprises a double rate synchronous dynamic random access memory DDR, the method further comprising:
in the first time period, the electronic device acquires target data, wherein the target data comprises 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 dormancy data comprise the time of the AP entering the dormancy state, the AP wakeup data comprise the time of the AP being awakened, the DDR frequency change data comprise the time and the frequency of the change of the DDR working frequency, the MD interrupt data comprise the time of the MD sending interrupt signals to the AP, and the data receiving object represents the receiving object of the data packet transmitted to the AP by the MD;
and determining that the first SIM card is stopped or network speed limit exists according to the target data.
5. The method of claim 4, wherein determining that the first SIM card is down or there is a network speed limit based on the target data comprises:
Determining that a first preset condition is met according to the target data; the first preset condition includes: when an AP is in a dormant state, the time length without power-down of the DDR is larger than a preset time length threshold, or the number of times of the MD awakening the AP, which is caused by a first type of data packet, is larger than a preset interruption number threshold, or the number of times of the MD awakening the AP, which is caused by network speed limit, is larger than the preset interruption number threshold; the time length without power-down of the DDR is the total time length of the DDR running in a working mode, and the first type of data packet is a data packet with a data receiving object as an application program;
and according to a preset detection strategy, when the second preset condition is met, determining that the first SIM card is stopped or network speed limit exists.
6. The method of claim 5, wherein the target data includes the AP wake-up data, the AP sleep data, and DDR frequency change data, and wherein determining that a first preset condition is satisfied according to the target data comprises:
determining whether the duration of the last sleep period is longer than a preset sleep duration or not based on the AP wake-up data and the AP sleep data; the sleep period refers to a period of time when the AP is continuously in a sleep state, and the last sleep period refers to a sleep period nearest to the current moment;
If the time length of the last sleep period is longer than the preset sleep period, determining whether the power-off time length of the DDR in the last sleep period is longer than the preset time length threshold or not based on the DDR frequency change data in the last sleep period;
and if the time length of the DDR which is not powered down in the last sleep period is greater than the preset time length threshold, determining that the first preset condition is met.
7. The method of claim 6, wherein the predetermined duration threshold is a product of a duration of the last sleep period and a predetermined ratio.
8. The method according to any one of claims 5 to 7, wherein the target data includes the MD interrupt data and the data receiving object, and wherein determining that the first preset condition is satisfied based on the target data includes:
determining whether the number of the MD interruption times in the timing time period is larger than the preset interruption times threshold value according to the MD interruption data in the timing time period; the timing time period is in the first time period, and the duration of the timing time period is the duration of a preset detection period;
If the interruption times of the MD in the timing period is greater than the preset interruption times threshold, determining, according to the data receiving object, whether the duty ratio of the first type data packet in the data packets transmitted from the MD to the AP in the timing period is smaller than a preset duty ratio;
and if the duty ratio of the first type of data packet is smaller than the preset duty ratio, determining that the first preset condition is met.
9. The method of claim 8, wherein the method further comprises:
if the duty ratio of the first type data packets is greater than or equal to the preset duty ratio, determining whether the number of the first type data packets in the timing period is greater than a preset number, and whether the data volume of each first type data packet is smaller than a preset data volume threshold;
and if the number of the first type data packets in the timing period is larger than the preset number and the data quantity of each first type data packet is smaller than a preset data quantity threshold value, determining that the first preset condition is met.
10. The method according to claim 8 or 9, wherein the determining, based on the MD interrupt data during the timer period, whether the number of interrupts of the MD during the timer period is greater than the preset number of interrupts threshold value, further comprises:
Responding to the screen extinction of the electronic equipment, taking the moment of screen extinction as the starting moment of the timing time period, and starting timing;
and stopping the timing and acquiring the MD interrupt data in the timing time period if the timing reaches the preset detection period duration.
11. The method according to any one of claims 5 to 10, wherein the preset detection strategy comprises a first detection strategy and a second detection strategy;
the first detection strategy comprises at least one of the following strategies:
detecting the state of the first SIM card through the communication detection interface of the MD, and determining whether the first SIM card is stopped;
inquiring the state of the first SIM card from the operator, and determining whether the first SIM card is stopped;
the second detection strategy comprises at least one of the following strategies:
detecting the state of the first SIM card through the speed limit detection interface of the MD, and determining whether the first SIM card has network speed limit;
inquiring the state of the first SIM card from the operator, and determining whether the first SIM card has network speed limit;
performing network speed test on the electronic equipment to determine whether the first SIM card has network speed limit;
And acquiring a flow monitoring result of the electronic equipment, and determining whether the first SIM card has network speed limit according to the flow monitoring result.
12. An electronic device, comprising: a processor, a memory, and an interface;
the processor, the memory and the interface cooperate to cause the electronic device to perform the method of any one of claims 1 to 11.
13. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, causes the processor to perform the method of any of claims 1 to 11.
CN202310209681.1A 2023-02-27 2023-02-27 SIM card management method and electronic equipment Pending CN117135731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310209681.1A CN117135731A (en) 2023-02-27 2023-02-27 SIM card management method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310209681.1A CN117135731A (en) 2023-02-27 2023-02-27 SIM card management method and electronic equipment

Publications (1)

Publication Number Publication Date
CN117135731A true CN117135731A (en) 2023-11-28

Family

ID=88851472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310209681.1A Pending CN117135731A (en) 2023-02-27 2023-02-27 SIM card management method and electronic equipment

Country Status (1)

Country Link
CN (1) CN117135731A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105025548A (en) * 2014-04-29 2015-11-04 中国移动通信集团河南有限公司 Connection control method and connection control device for SIM (Subscriber Identity Module) card
CN105142169A (en) * 2015-07-27 2015-12-09 小米科技有限责任公司 Method and device for processing abnormal operation
CN107396344A (en) * 2017-06-28 2017-11-24 珠海格力电器股份有限公司 Processing method, the device and system of data card
CN113179511A (en) * 2021-04-12 2021-07-27 青岛海信移动通信技术股份有限公司 Communication terminal with SIM card for abnormal processing of card and method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105025548A (en) * 2014-04-29 2015-11-04 中国移动通信集团河南有限公司 Connection control method and connection control device for SIM (Subscriber Identity Module) card
CN105142169A (en) * 2015-07-27 2015-12-09 小米科技有限责任公司 Method and device for processing abnormal operation
CN107396344A (en) * 2017-06-28 2017-11-24 珠海格力电器股份有限公司 Processing method, the device and system of data card
CN113179511A (en) * 2021-04-12 2021-07-27 青岛海信移动通信技术股份有限公司 Communication terminal with SIM card for abnormal processing of card and method thereof

Similar Documents

Publication Publication Date Title
CN112789651B (en) Frequency adjustment method and device applied to terminal and electronic equipment
WO2020073288A1 (en) Method for triggering electronic device to execute function and electronic device
US11995317B2 (en) Method and apparatus for adjusting memory configuration parameter
WO2023005282A1 (en) Message pushing method and apparatus
CN116231815B (en) Method for controlling charging and electronic equipment
CN111381996B (en) Memory exception handling method and device
CN116679900B (en) Audio service processing method, firmware loading method and related devices
CN115017001B (en) Method for optimizing endurance performance and electronic equipment
CN117135731A (en) SIM card management method and electronic equipment
CN116780683A (en) Power supply control method and electronic equipment
CN116567132A (en) Power consumption control method and device
CN115206308A (en) Man-machine interaction method and electronic equipment
CN114697932A (en) Method for reducing power consumption and electronic equipment
CN117271170B (en) Activity event processing method and related equipment
CN116684520B (en) Shutdown method, electronic equipment, storage medium and chip
CN116736999B (en) Control method of electronic equipment and electronic equipment
CN116719376B (en) Voltage control method, device, equipment and storage medium
EP4130969B1 (en) Method and device for adjusting memory configuration parameter
CN117082170B (en) On-off test method, test system and shared host
CN116723384B (en) Process control method, electronic device and readable storage medium
CN116048544B (en) Processing method of popup advertisement, electronic equipment and readable storage medium
CN117707405A (en) Display screen control method and related equipment
CN116056190A (en) Method for managing terminal device, electronic device and computer readable storage medium
CN118069154A (en) Application compiling control method and related equipment
CN118277080A (en) Memory recycling method and electronic equipment

Legal Events

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