CN115017001B - Method for optimizing endurance performance and electronic equipment - Google Patents

Method for optimizing endurance performance and electronic equipment Download PDF

Info

Publication number
CN115017001B
CN115017001B CN202111526198.3A CN202111526198A CN115017001B CN 115017001 B CN115017001 B CN 115017001B CN 202111526198 A CN202111526198 A CN 202111526198A CN 115017001 B CN115017001 B CN 115017001B
Authority
CN
China
Prior art keywords
current
abnormal
electronic device
information
activity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111526198.3A
Other languages
Chinese (zh)
Other versions
CN115017001A (en
Inventor
卢衍鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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
Publication of CN115017001A publication Critical patent/CN115017001A/en
Application granted granted Critical
Publication of CN115017001B publication Critical patent/CN115017001B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • 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
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Telephone Function (AREA)

Abstract

The application relates to the field of terminals, and provides a method for optimizing endurance performance and electronic equipment, wherein the method is applied to the electronic equipment and comprises the following steps: acquiring current information of the electronic equipment in an idle state and process information of the electronic equipment in the idle state; acquiring a corresponding relation between a current waveform and system time according to the current information and the system time of the electronic equipment, wherein the current waveform comprises abnormal current burrs; according to the process information and the system time of the electronic equipment, obtaining the corresponding relation between the process activity and the system time; according to the system time, matching abnormal current burrs with process activities, and screening a target abnormal process; the target exception process is terminated. According to the method, the problem that the endurance of the electronic equipment is poor in the idle state due to frequent activities of the process can be solved by screening the target abnormal process which causes high power consumption of the electronic equipment in the idle state according to the process information and the current burr corresponding to the system time.

Description

Method for optimizing endurance performance and electronic equipment
The present application claims priority from the chinese patent application filed on month 02 of 2021, 12, filed with the national intellectual property agency, application number 202111461644.7, application name "method for optimizing cruising performance and electronic device", the entire contents of which are incorporated herein by reference.
Technical Field
The application relates to the field of terminals, in particular to a method for optimizing endurance performance and electronic equipment.
Background
With the development of electronic devices, users have put higher demands on the cruising ability of the electronic devices. Generally, when an electronic device is in some idle state (such as an off-screen standby state, a bright-screen idle state, etc.), some application (App) or system services do not need to run, the corresponding process is terminated or frozen, and the current waveform output by the electronic device should be relatively smooth in theory. However, in practical applications, some processes may still keep frequent activities in the background (such as process registration, process awakening, frequent abnormal restarting of processes, etc.) in an idle state, so that abnormal burrs are generated in the current waveform output by the electronic device, which results in multiple dormancy awakenings and increased power consumption of the electronic device.
Therefore, how to solve the problem that the electronic device has poor endurance performance in the idle state due to abnormal activities of the process so as to improve the endurance experience of the user is a current urgent problem to be solved.
Disclosure of Invention
The application provides a method for optimizing endurance performance and electronic equipment, which can solve the problem of poor endurance of the electronic equipment in an idle state caused by frequent activities of processes by screening target abnormal processes which cause high power consumption of the electronic equipment in the idle state according to time information and current information.
In a first aspect, a method for optimizing endurance performance is provided, which is applied to an electronic device, and includes:
acquiring current information of the electronic equipment in an idle state and process information of the electronic equipment;
acquiring a corresponding relation between a current waveform and the system time according to the current information and the system time of the electronic equipment, wherein the current waveform comprises at least one abnormal current burr; fitting the process information and the system time of the electronic equipment, and acquiring a corresponding relation between at least one process activity and the system time;
according to the system time, matching at least one abnormal current burr with the at least one process activity, and screening a target abnormal process; and terminating the target abnormal process.
Alternatively, the process activity may be varied and may include, for example, process registration, process wakeup, and the like. The process activity may be periodic; for another example, different types of process activities may be included, such as a process activity corresponding to a first application, a process activity corresponding to a second application, and so on.
The abnormal current spike may be a spike, in which a difference between a current peak corresponding to the spike and a current reference value of a current waveform is greater than a preset threshold, and is shown on a current waveform diagram, and may be a relatively obvious current spike.
According to the method for optimizing the endurance performance, the corresponding relation between the process activity and the system time is acquired through fitting the process activity to the system time line, the change of the current waveform along with the system time line is acquired through fitting the current to the system time line, then the abnormal current burrs in the process activity and the current waveform are matched based on the system time line, and the target abnormal process which causes the abnormal current burrs is screened and terminated, so that the problem of high power consumption in an idle state is effectively positioned, and the problem of endurance deterioration of electronic equipment in the idle state caused by frequent activities of the process can be solved.
With reference to the first aspect, in some implementations of the first aspect, the matching the at least one abnormal current spike and the at least one process activity according to the system time, screening a target abnormal process specifically includes:
acquiring at least one occurrence time period corresponding to the at least one abnormal current burr on the current waveform according to the system time; and, in addition, the processing unit,
acquiring at least one starting time corresponding to the at least one process activity respectively according to the system time;
And respectively matching the at least one occurrence time period and the at least one starting time, and screening the target abnormal process.
With reference to the first aspect, in some implementations of the first aspect, the matching the at least one abnormal current spike and the at least one process activity according to the system time respectively, and screening the target abnormal process specifically includes:
acquiring at least one occurrence time period corresponding to the at least one abnormal current burr on the current waveform according to the system time; and, in addition, the processing unit,
acquiring at least one activity time period corresponding to the at least one process activity respectively according to the system time;
and respectively matching the at least one occurrence time period and the at least one activity time period, and screening the target abnormal process.
With reference to the first aspect, in certain implementation manners of the first aspect, the screening the target abnormal process includes:
matching the at least one occurrence period and the at least one activity period, respectively;
and when the abnormal current burr exists in the process activity period, determining the process corresponding to the process activity as the target abnormal process.
With reference to the first aspect, in certain implementation manners of the first aspect, the active time period corresponds to a first start time and a first end time, and the occurrence time period corresponds to a second start time and a second end time;
and when the abnormal current burr exists during the process activity, determining the process corresponding to the process activity as the target abnormal process, wherein the method specifically comprises the following steps of:
when the first starting time is earlier than the second starting time, and the first ending time is later than the second ending time; and, in addition, the processing unit,
and when the difference value between the second starting time and the first starting time is in a first error range and the difference value between the first ending time and the second ending time is in a second error range, determining the process corresponding to the active time period as the target abnormal process.
With reference to the first aspect, in some implementation manners of the first aspect, when the abnormal current burr exists during the process activity, determining the process corresponding to the process activity as the target abnormal process specifically includes:
when the abnormal current burr exists during the process activity period, determining the process corresponding to the process activity as a candidate abnormal process;
Acquiring a first comparison result of an active period of the candidate abnormal process and an occurrence period of the abnormal current burr;
when the first comparison result indicates that the activity period and the occurrence period are equal, determining that the candidate abnormal process is the target abnormal process; or alternatively, the process may be performed,
and when the first comparison result indicates that the difference value between the active period and the occurrence period is smaller than a third error range, determining that the candidate abnormal process is the target abnormal process.
According to the method for optimizing the endurance performance, which is provided by the implementation mode, the process activity existing during the occurrence period of the abnormal current burr is determined according to the occurrence period of the abnormal current burr, the corresponding process is determined to be the candidate abnormal process, then the activity interval (such as the activity period) of the candidate abnormal process and the occurrence interval of the abnormal current burr are compared, and the target abnormal process causing the abnormal current burr can be screened out more accurately, so that the endurance performance of the electronic equipment is effectively improved.
With reference to the first aspect, in some implementation manners of the first aspect, when the types of the abnormal current glitches are multiple, and when the abnormal current glitches exist during the process activity, determining the process corresponding to the process activity as the target abnormal process specifically includes:
When the abnormal current burr exists during the process activity period, determining the process corresponding to the process activity as a candidate abnormal process;
combining the active periods of the plurality of candidate abnormal processes in pairs, and acquiring the overlapped active periods of the processes combined in pairs;
obtaining a second comparison result between the superposition active period and the occurrence period of the abnormal current burr;
when the second comparison result indicates that the superposition active period is equal to the occurrence period, determining that the candidate abnormal processes respectively corresponding to the superposition active period are the target abnormal processes; or alternatively, the process may be performed,
and when the second comparison result indicates that the difference value between the superposition active period and the occurrence period is smaller than a fourth error range, determining that the candidate abnormal processes respectively corresponding to the superposition active period are the target abnormal processes.
With reference to the first aspect, in certain implementation manners of the first aspect, the method further includes:
acquiring a difference value between a current peak value corresponding to the current burr in the current waveform and a current reference value of the current waveform;
and when the difference value is larger than a preset threshold value, determining that the current burr is abnormal current burr.
With reference to the first aspect, in certain implementation manners of the first aspect, the idle state includes at least:
an off-screen standby state, an off-screen display standby state, a state in which the screen is on but the user is not using the electronic device.
With reference to the first aspect, in some implementations of the first aspect, the acquiring current information of the electronic device in an idle state and process information of the electronic device specifically includes:
acquiring power consumption information of the electronic equipment;
acquiring the power consumption of the electronic equipment according to the power consumption information;
and when the power consumption is higher than a target threshold value, acquiring current information of the electronic equipment in an idle state and process information of the electronic equipment.
With reference to the first aspect, in certain implementation manners of the first aspect, the power consumption information includes:
current information output by a power supply of the electronic equipment; or alternatively, the process may be performed,
and voltage information output by a power supply of the electronic equipment.
With reference to the first aspect, in certain implementation manners of the first aspect, the method further includes:
displaying a first interface, wherein the first interface comprises first prompt information for prompting a user that the electronic equipment is in a high power consumption state in the idle state;
And receiving a first operation input by the user, wherein the first operation is used for indicating screening of the target abnormal process.
With reference to the first aspect, in certain implementation manners of the first aspect, the method further includes:
displaying a second interface, wherein the second interface comprises second prompt information which is used for prompting the user to terminate the target abnormal process;
and receiving a second operation input by a user, wherein the second operation is used for indicating to terminate the target abnormal process.
In a second aspect, there is provided an electronic device comprising: one or more processors; one or more memories; the one or more memories store one or more computer programs comprising instructions that, when executed by the one or more processors, cause the electronic device to perform the method as described in any of the implementations of the first aspect above.
In a third aspect, there is provided a computer readable storage medium storing a computer executable program which, when invoked by a computer, causes the electronic device to perform a method as described in any implementation of the first aspect.
In a fourth aspect, there is provided a computer program product containing instructions which, when run on an electronic device, cause the electronic device to perform the method as described in any of the implementations of the first aspect above.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application.
Fig. 2 is a block diagram of a software architecture of an electronic device 100 according to an embodiment of the present application.
Fig. 3A to 3F are schematic diagrams of some GUIs according to embodiments of the present application.
Fig. 4 is a schematic structural diagram of another electronic device 100 according to an embodiment of the present application.
Fig. 5 is a schematic flowchart of a method for optimizing cruising performance according to an embodiment of the present application.
Fig. 6 is a schematic diagram of a normal current waveform of an off-screen standby according to an embodiment of the present application.
Fig. 7 is a schematic diagram of a current waveform after current and system time fitting according to an embodiment of the present application.
Fig. 8A and 8B are schematic diagrams of some periodic activity processes according to an embodiment of the present application after fitting to a system time.
Fig. 9A and 9B are integrated graphs after matching the system time lines of some currents and the system time lines of processes provided by the embodiments of the present application.
Fig. 10A to 10C are schematic diagrams of current waveforms after fitting current and system time when there are some progress of multiple periodic activities according to embodiments of the present application.
FIG. 11 is an integrated graph of the current system time line and the process system time line after matching when there are a plurality of periodically active processes according to the present application.
Fig. 12 is a schematic flowchart of another method for optimizing cruising performance according to an embodiment of the present application.
Detailed Description
It should be noted that the terms used in the implementation section of the embodiment of the present application are only used to explain the specific embodiment of the present application, and are not intended to limit the present application. 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 one association relationship describing an associated obstacle, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, unless otherwise indicated, "a plurality" means two or more, and "at least one", "one or more" means one, two or more.
The terms "first" and "second" 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 definition of "a first", "a second" feature may explicitly or implicitly include one or more of such features.
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.
By combining the introduction of the background technology, aiming at the problems of increased power consumption and poor cruising performance of the electronic equipment caused by frequent activities of background processes in an idle state, the most intuitive experience of a common user is that the power consumption of the electronic equipment in the idle state is increased, but the real reason of the poor cruising performance cannot be obtained. To solve such power consumption abnormality problems, users often need to feed back the problems to professionals, and provide usage information and log information (log) of electronic devices, where the causes are located by professionals based on the relevant information. The process is complex, inconvenience is brought to users, and the problem that professional staff cannot accurately position abnormal reasons due to large investigation difficulty is easy to occur.
Taking into account process activities (e.g., process registration, process awakening, frequent and very heavy process starts, etc.), power consumption resources may increase. The method is characterized in that the current waveform is characterized in that obvious current burrs usually appear when a process is active (especially when the process is started), so that the embodiment of the application provides a method for optimizing the cruising performance.
The method for optimizing endurance performance provided by the embodiment of the application can be applied to various types of electronic equipment, such as smart phones, tablet computers, wearable equipment, vehicle-mounted equipment, enhanced display (AR)/virtual display (VR) equipment, notebook computers, ultra-mobile personal computer (UMPC), netbooks, personal digital assistants (personal digital assistant, PDA) and the like, and the specific types of the electronic equipment are not limited in the embodiment of the application.
Exemplary, as shown in fig. 1, a schematic structural diagram of an electronic device 100 according to an embodiment of the present application is provided.
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 subscriber identity module (subscriber identification module, 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 can be called directly from the 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 subscriber identity module (subscriber identity module, 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 terminals, 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 terminal 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. 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. The wireless communication techniques may include the 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 display screen 194 is used to display images, videos, and the like.
The electronic device 100 may implement photographing functions through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like. Video codecs are used to compress or decompress digital video. The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning.
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 including instructions.
The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. The gyro sensor 180B may be used to determine a motion gesture of the electronic device 100. The magnetic sensor 180D includes a hall sensor. The electronic device 100 may detect the opening and closing of the flip cover using the magnetic sensor 180D. The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the electronic device 100 is stationary. The method can also be used for identifying the gesture of the terminal, and is applied to the applications such as horizontal and vertical screen switching, pedometers and the like. The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The ambient light sensor 180L is used to sense ambient light level. The electronic device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The fingerprint sensor 180H is used to collect a fingerprint. The temperature sensor 180J is for detecting temperature. The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The bone conduction sensor 180M may acquire a vibration signal.
In addition, the electronic device 100 further includes a barometric pressure sensor 180C and a distance sensor 180F. Wherein the air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude from barometric pressure values measured by barometric pressure sensor 180C, aiding in positioning and navigation.
A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, the electronic device 100 may range using the distance sensor 180F to achieve quick focus.
For example, the software system of the electronic device 100 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service 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. 2 is a software configuration block diagram of the electronic device 100 according to the embodiment of the present application.
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. 2, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
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. 2, 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 terminal vibrates, and an indicator light blinks.
Android run time includes a core library 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 obstacle life cycle management, stack management, thread management, security and abnormality management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (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.
The method for optimizing the cruising performance provided by the embodiment of the application can be applied to various scenes of increased power consumption and reduced cruising performance of the electronic equipment caused by abnormal current burrs when the electronic equipment is in an idle state. The abnormal current burr may be generated for various reasons, such as frequent abnormal restarting of the background process, frequent awakening of the process or frequent registration of the process, which is not limited in the application. In order to better understand the method for optimizing the cruising performance provided by the embodiment of the application, taking an electronic device as an example of a mobile phone, and taking an example of poor cruising ability of the mobile phone in an idle state caused by abnormal current burrs caused by frequent activities of a background application process, man-machine interaction in the process of optimizing the cruising performance is introduced by combining a graphical user interface (graphical user interface, GUI) possibly involved. Exemplary, as shown in fig. 3A to 3D, a GUI schematic diagram in a cruising performance optimization process according to an embodiment of the present application is provided.
Taking the example that the idle state of the mobile phone is the screen-off standby state at present, when the mobile phone detects that the power consumption of the mobile phone is higher than a preset threshold value in the screen-off standby state, the mobile phone is indicated that abnormal power consumption activity possibly exists, and at the moment, the mobile phone can be switched from the screen-off state to the screen-on state to carry out high power consumption prompt on a user.
Exemplary, as shown in fig. 3A, a screen locking interface is displayed after the mobile phone is on screen. The lock screen interface may include a status bar display area 10, a main display area 20, and an unlock control display area 30. The status bar display area 10 may include: one or more signal strength indicators for mobile communication signals (or cellular signals), one or more signal strength indicators for wireless fidelity (wireless fidelity, wi-Fi) signals, power indicators for handsets, time indicators, etc. The main display area 20 may be used to display unlock indication information (e.g., fingerprint or slide up to unlock), time information (e.g., year, month, day, and current specific time, etc.); the main display area 20 may also be used to display system prompt information, application (App) prompt information of a mobile phone, or information sent by other communication devices (such as prompt information sent by other communication devices through an instant messaging App, a short message, etc.). The unlock control display area 30 includes a fingerprint unlock control for receiving a fingerprint press of a user to unlock the mobile phone; optionally, the unlock control display area 30 may further include other shortcut application icons, such as a camera icon, so that the user can take a picture through a shortcut operation in the locked state.
It should be noted that, the unlocking interface shown in fig. 3A is merely an example, and in practical application, because the page layout, the unlocking mode, and the like of different mobile phones are different, the unlocking interface may include more or less information, for example, when the mobile phone is in the face recognition unlocking mode, the unlocking interface may not include a fingerprint unlocking control; for example, when the mobile phone is in the password unlock mode, the main display area may display a numeric keypad, which is not limited in the embodiment of the present application.
In some embodiments, after detecting that the mobile phone is in the high power consumption state in the off-screen state, a high power consumption state prompt message may be displayed on the unlocking interface. For example, as shown in fig. 3B, the high power consumption state prompting message may be displayed in the main display area 20 of the interface Yu Suobing, so as to prompt the user that the mobile phone is currently in a high power consumption state, and if an abnormal power consumption process may exist, query the user about whether the abnormal power consumption process needs to be detected. When the user needs to perform high power consumption abnormal process detection, a selection operation 301 for the determination icon (e.g., clicking the determination icon) may be input. In response to the user selecting the determined operation 301, the handset may initiate a detection and identification process for the abnormal process.
In some embodiments, after the detection and identification of the bottom algorithm provided by the endurance performance optimization method provided by the embodiment of the application, the mobile phone determines that the power consumption of the mobile phone is abnormally increased due to frequent activities of the process of the video A in the background, so that the mobile phone can display the abnormal power consumption process prompt information. Illustratively, as shown in fig. 3C, the abnormal progress prompt message may be displayed in the main display area 20 of the Yu Suobing interface, and the abnormal progress prompt message may be, for example: is it detected that frequent activity of the a video process results in high power consumption of the mobile phone, and whether to terminate the abnormal power consumption process to improve endurance? Indication icons with different operations can be displayed below the abnormal power consumption progress prompt message, for example: automatic termination, manual termination, cancellation. Below these icons, there may also be displayed related instructions for different indication icons, such as: automatically terminating: the mobile phone automatically terminates the related process without manual operation of a user; manual termination: the high power consuming application may be manually exited and the associated process terminated.
In one possible implementation, if the user selects to employ an autostop mode, the user may enter a selection operation 302 (e.g., an operation to click on an autostop icon) for the autostop icon. In response to operation 302 in which the user selects the automatic termination mode, the handset may automatically terminate the detected abnormal process. After the abnormal process is terminated, the mobile phone can prompt the user that the abnormal process is terminated. Illustratively, as shown in fig. 3D, the abnormal process terminated information may be displayed in the main display area 20 of the lock screen interface, and the abnormal process terminated information may be, for example: and the abnormal power consumption process is terminated, and the endurance performance is optimized. A close icon may also be displayed below the information, and when the user inputs a selection operation 303 (e.g., clicks the close icon) for the close icon, the mobile phone may close the abnormal process terminated information on the lock screen interface in response to the selection operation 303.
In one possible implementation, if the user chooses to use a manual termination mode, the user may unlock the handset and manually exit the a video application, thereby terminating the abnormal power consumption process.
It should be noted that, the GUI diagrams described in the foregoing embodiments are merely examples, and in practical applications, the related GUI display prompt information may be other contents, which is not limited in the embodiments of the present application.
It should be noted that, the GUI diagrams shown in fig. 3A to 3D are interfaces that may be involved in an application scenario where an application process frequently moves in the background of the mobile phone to cause high power consumption in an idle state. However, in practical applications, the embodiments of the present application are not limited to application scenarios that result in high power consumption in background processes. For example, the method and the device can be applied to high-power consumption scenes caused by system services, applications, functions and the like, and the embodiment of the application is not limited to specific scenes.
In other scenarios, the cause of high power consumption may be due to abnormal activity of system processes. At this time, other types of GUI interface display may be involved in the corresponding scene, or GUI interface display may not be involved. For example, in another application scenario, when the mobile phone is in a screen-off display state or a screen-on idle state, the mobile phone may periodically call an ambient light sensor (sensor) to collect surrounding information, and the background process frequently moves to calculate the brightness of the environment, so as to realize a function of automatically adjusting the brightness of the screen, and at this time, the mobile phone may prompt the user for prompt information corresponding to the scenario (such as prompt information shown in fig. 3E); alternatively, the mobile phone may not display the related prompt information to the user at this time, but may automatically turn off the light sensor. For another example, in another application scenario, if in the idle state, a process is frequently activated (e.g. started) periodically due to a startup state of the mobile phone or a probabilistic abnormality in the use process, so that a periodic current is large and burrs are caused, at this time, the mobile phone may prompt a user with prompt information (such as the prompt information shown in fig. 3F) that matches the power consumption cause; or, at this time, the mobile phone may not display related prompt information to the user, but automatically terminate an abnormal process that causes power consumption.
According to the method for optimizing the cruising performance, when the electronic equipment detects that the power consumption is too high in the idle state, the process causing the high power consumption can be detected and identified, and the identified abnormal power consumption process is terminated, so that the cruising performance of the electronic equipment is improved. The process can remind the user in a prompting information mode and the like, and the user can intuitively know the reason of the increase of power consumption, so that the participation of the user is enhanced, and the cruising experience of the user is improved.
In order to more clearly understand the method for optimizing the cruising performance provided by the embodiment of the application, the mode of acquiring the current information by the electronic equipment in the implementation process of the method for optimizing the cruising performance is described below with reference to fig. 4.
Exemplary, as shown in fig. 4, a schematic structural diagram of another electronic device according to an embodiment of the present application is provided. The electronic device may correspond to the electronic device 100 above, which may include a power supply 401, a sampling resistor 402, an electricity meter 403, a power chip 404, and a software and hardware load management system 405.
The power supply 401 may correspond to the battery 142 in fig. 1 above, and is used to supply power to the electronic device, so as to ensure that software and/or hardware in the electronic device operates normally.
The sampling resistor 402 and the electricity meter 403 are used to detect current information of the electronic device. Wherein a sampling resistor 402 is connected in series between the power supply 401 and the software and hardware load system 405. The fuel gauge 403 is connected in parallel to two ends of the sampling resistor R, and can obtain current information (such as charging current and/or discharging current) of the power supply by measuring the voltage U on two sides of the sampling resistor R. Alternatively, the fuel gauge 403 may also acquire the battery temperature from the voltage across the sampling resistor R, thereby estimating the battery state of charge, the full charge capacity of the battery, and the like. As shown in fig. 4, the electricity meter 403 may further include a register 4031 for temporarily storing current information acquired by the electricity meter 403. Considering that the method for optimizing endurance performance provided in the embodiment of the present application is mainly used for improving the problem of high power consumption of the electronic device, in the embodiment of the present application, the fuel gauge 403 may only calculate and acquire the discharge current information, without paying attention to the charge current information, but the embodiment of the present application is not limited thereto. For ease of understanding, the following embodiments will mainly describe a process in which the electricity meter 403 detects and stores the discharge current of the power source 401.
In some embodiments, the process of the fuel gauge 403 detecting the power source 401 discharge current information may include: the fuel gauge 403 may detect voltages U1 and U2 across the sampling resistor R, where U1 may be the voltage of the power input sampling resistor R (which may correspond to the voltage on the left side of the sampling resistor in fig. 4) and U2 may be the output voltage of the sampling resistor R (which may correspond to the voltage on the right side of the sampling resistor in fig. 4). Thereafter, the electricity meter 403 determines whether the power supply is charging or discharging based on the voltage difference across the resistor R, specifically: if U1 > U2, the current 401 flows from the power supply 401 to the software and hardware load management system 405, and at this time, the power supply 401 discharges; if U1 < U2, current flows from the software/hardware load management system 405 to the power supply 401, and the power supply 401 is charging. For a power discharge situation, the electricity meter 403 may calculate a current magnitude from the voltage across the sampling resistor R, where the current magnitude may be calculated according to the following equation (1-1):
The fuel gauge 403 may obtain the real-time current magnitude at the time of power discharge according to the above formula (1-1), and may store the current information into a register 4031 inside the fuel gauge 403.
In some embodiments, sampling resistor 402 and fuel gauge 403 may be located in power management module 141 as shown in FIG. 1.
Optionally, in some embodiments, the electronic device may further include a power chip 404 (e.g., a charge IC), and the power chip 404 may be used to control battery charging and adjust the charging mode as desired to prevent battery breakage.
In some embodiments, the software and hardware load management system 405 may be used to balance, split, and execute loads (work tasks) across multiple processes. The software/hardware load management system 405 may also be used to detect and analyze power consumption situations of an electronic device, for example, power consumption situations of different software or hardware may be obtained. In some embodiments, the software and hardware load management system 405 may read current information from the registers 4031 of the fuel gauge 403 based on the IIC communication protocol. In addition, the software and hardware load system management 405 may have an application programming interface (application programming interface, API) with a process management module (not shown in fig. 4) through which the activity status of different processes (e.g., process registration, process wakeup) can be queried; the software and hardware load system management 405 may also have an API with a system time module (not shown in fig. 4) through which the system time of the electronic device may be queried.
In some embodiments, the software and hardware load management system 405 may also be configured to fit a current glitch system timeline based on current information and system time obtained from the fuel gauge 403, or may fit a system timeline of a registration process based on process registration information and system time obtained from a process management module, and then match the system timeline of the current glitch with the system timeline of the registration process to obtain a target abnormal power consumption process that results in an abnormal current glitch (the abnormal current glitch results in high power consumption).
It should be noted that the structure illustrated in the embodiment of the present application does not constitute a specific limitation of 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 implementation process of the method for optimizing the endurance performance is described below with reference to the accompanying drawings. Exemplary, as shown in fig. 5, a schematic flowchart of a method for optimizing cruising performance according to an embodiment of the present application is provided. The flow may be performed by an electronic device as a main body, the electronic device may correspond to the electronic device 100 described above, and the flow may include the steps of:
S501, determining that the electronic device is in an idle state.
The idle state in the embodiment of the present application may also be described as a dormant state, which refers to some states of the mobile phone when the user is not using the mobile phone, for example, may include an off-screen standby state and an on-screen idle (such as an AOD is always on) state.
It should be noted that, in the embodiment of the present application, the bright screen in the bright screen idle state may include a bright screen (i.e. the AOD is always bright) when the bright screen is displayed in an off-screen mode, and may also refer to a bright screen after the electronic device is unlocked. When the bright screen is the bright screen after the electronic device is unlocked, the bright screen idle state may correspond to a state without a foreground process running, for example, after the user unlocks the electronic device, the display screen of the electronic device is switched from the unlocking interface to the main interface, and if the user does not perform any operation (such as opening a certain application program) on the electronic device within a certain period of time after the unlocking, the electronic device may be considered to be in the bright screen idle state at this time.
It should be further noted that, in the off-screen standby state or the on-screen idle state, since the electronic device does not run the foreground process, and the screen does not consume power (for example, in the off-screen standby state) or consumes less power (for example, in the off-screen display state or the on-screen idle state), the discharge current of the battery is small at this time, and the current waveform corresponding to the discharge current theoretically has a stable fluctuation trend (as shown in fig. 6) as a whole, that is, no obvious abnormal current burr usually occurs on the waveform.
In some embodiments, the electronic device may determine that it is in an idle state in a variety of ways, for example, if the electronic device detects that its display screen is turned off, it may determine that the electronic device is in an idle state; for another example, the electronic device detects that the foreground process is not operated within a preset time, and can determine that the electronic device is in an idle state currently, and the like; for another example, the electronic device may determine that the electronic device is currently in an idle state, or the like, by detecting that no operation by the user has been received within a preset time.
It should be noted that the above-listed manner in which the electronic device determines that it is currently in the idle state is merely an example, and in other embodiments, the electronic device may also obtain that it is in the idle state in other manners, which is not limited in the embodiments of the present application.
S502, monitoring power consumption information of the electronic equipment in an idle state.
The power consumption information may include current information output by the power supply, or may also include voltage information output by the power supply.
In some embodiments, after the electronic device acquires that it is in an idle state, power consumption information in the idle state may be monitored. For example, the monitoring of the power consumption information may be performed by the electricity meter, or may be based on information collected by the electricity meter. For example, when the power consumption information is a current corresponding to a current detected by the fuel gauge, the electronic device may monitor the power consumption information based on the current information collected by the fuel gauge. For another example, when the power consumption information is a voltage, the voltage may correspond to a voltage detected by the fuel gauge (i.e., a voltage across the sampling resistor), and the electronic device may implement monitoring of the power consumption information based on the voltage information detected by the fuel gauge. For example, when the power consumption information is power, the power may be obtained by calculating based on current information and voltage information acquired by the fuel gauge, and at this time, the electronic device may obtain the corresponding power based on the current information (or voltage information) acquired by the fuel gauge, the resistance value of the sampling resistor, and the like, so as to realize monitoring of the power consumption information.
The above-mentioned monitoring method of the power consumption information is merely an example, and the power consumption information may be monitored by other methods in practical application, which is not limited in the embodiment of the present application.
S503, screening abnormal processes when the electronic equipment is in a high power consumption state according to the power consumption information.
Various ways for acquiring the high power consumption state of the electronic equipment according to the power consumption information are available, for example, the high power consumption state of the electronic equipment can be acquired by comparing the current output by the power supply with a corresponding target threshold value; or, the electronic equipment can be obtained to be in a high power consumption state by comparing the voltage output by the power supply with a corresponding target threshold value; alternatively, the power consumption of the electronic device may be calculated according to the power consumption information, and the electronic device may be obtained in a high power consumption state by comparing the power consumption with a corresponding target threshold.
In some embodiments, the electronic device may compare the monitored result of the power consumption information with a target threshold value, so as to determine whether the electronic device is in a high power consumption state. Specifically, when the monitoring result of the power consumption information is smaller than or equal to the target threshold, the electronic device is not in a high power consumption state, that is, no abnormal power consumption process is active in the background at the moment; when the monitoring result of the power consumption information is greater than the target threshold, the electronic equipment is in a high power consumption state, namely that an abnormal power consumption process can be frequently activated in the background at the moment. The target threshold may be flexibly set according to requirements, which is not limited in the embodiment of the present application.
In some embodiments, the electronic device may compare the monitored result of the power consumption information with the target threshold according to a preset manner, where the preset manner may be flexibly set according to needs, and the embodiment of the present application is not limited to this.
For example, taking the power consumption information as the current as an example, the electronic device may compare the monitored result of the power consumption information with the target threshold value in various manners, for example, the comparing process may include: mode 1, a discharge current of a power supply is monitored by an electricity meter (denoted as I), and a maximum value of the discharge current is obtained from the discharge current (denoted as I max May correspond to a peak of the current waveform), comparison I max And a target threshold, when I max When the power consumption of the electronic equipment is larger than the target threshold value, the electronic equipment can be considered to be in a high power consumption state; mode 2, the discharge current I of the power supply is monitored by the electricity meter, after which the current average value (denoted as I ave ) Thereafter, the current average value I is compared ave And a target threshold, when I ave When the power consumption of the electronic equipment is larger than the target threshold value, the electronic equipment can be considered to be in a high power consumption state; mode 3, monitoring the discharge current I of the power supply by means of an electricity meter, and then obtaining the maximum discharge current I within a preset time period according to the discharge current I max Times greater than the target threshold, when the discharge current I max When the number of times greater than the target threshold exceeds the target number of times, the electronic device can be considered to be in a high power consumption state.
It should be noted that, when the information for determining the high power consumption state is different types of parameters (such as current, voltage, etc.), the corresponding target thresholds may be different. In other words, when the current is assumed as a parameter for measuring whether the electronic device is in a high power consumption state, the corresponding target threshold may be the first threshold; when the voltage is used as a parameter for measuring whether the electronic device is in a high power consumption state, the corresponding target threshold value may be a second threshold value, where the first threshold value and the second threshold value may be different.
It should be noted that, in the embodiment of the present application, the electronic device monitors the power consumption information, and then determines whether the electronic device is in a high power consumption state according to the power consumption information. However, in practical applications, the electronic device may also monitor power consumption (consumed power) of the electronic device, and determine whether the electronic device is in a high power consumption state according to the power consumption. When the power consumption is a parameter for measuring whether the electronic device is in a high power consumption state, the corresponding target threshold may be a third threshold, where the first threshold, the second threshold, and the third threshold may be different. The embodiment of the present application is not limited thereto.
In some embodiments, when it is determined that the electronic device is in a high power consumption state, the electronic device may perform screening of the abnormal process to obtain a target abnormal process that causes high power consumption. The process of the electronic device for screening the target power consumption process may include the following steps:
s504a, current information of the power supply is acquired in response to the electronic equipment being in a high power consumption state.
Here, the current information may specifically refer to discharge current information, and may specifically refer to a discharge current magnitude.
In the embodiment of the application, the current information is taken as an example, and the process of screening the target abnormal process is introduced. However, in practical application, the target abnormal process can also be screened by using similar implementation process through the voltage information of the electronic equipment. The embodiment of the present application is not limited thereto.
In some embodiments, the process of the electronic device obtaining the current information output by the power supply may be referred to the above description in the embodiment of fig. 4, which is not repeated herein.
In some embodiments, the current device may acquire the system time at the same time as the current device acquires the current information.
S505a, fitting the current information and the system time line, and acquiring a current waveform including abnormal current spike.
In some embodiments, the electronic device may obtain the system time through a software and hardware load management system. Specifically, the software and hardware load management system of the electronic device can query the system time through an API between the software and hardware load management system and the system time management module.
In some embodiments, the electronic device may fit the change of the current waveform with the system time based on the acquired current information and the system time, i.e., acquire the correspondence of the current waveform with the system time. For example, a schematic diagram of current waveforms after fitting current information and a system timeline may be shown in fig. 7, where the current waveform diagram is used to indicate a change situation of a current of a power supply with system time, and when an electronic device is in an idle state and a background has a target abnormal process activity that causes high power consumption, abnormal current glitches (such as current glitches 1 to 6 shown in fig. 7) may occur on the current waveform diagram.
In some embodiments, the electronic device may determine the abnormal current spike based on the current waveform map. For example, the process of determining the abnormal current spike may include: determining the base current value (denoted as I) of the current waveform from the current information 0 ) The base current value may be an average value according to a normal current in an idle state; determining a current peak value (I) corresponding to a peak of each current spike in the fitted current waveform max ) And a substrate current value I 0 The difference Δi between them (Δi=i max -1 0 ) Or the absolute value of the difference; if Δi is greater than a preset threshold, it may be determined that the spike corresponding to Δi is an abnormal current spike.
In some embodiments, the electronic device may also determine a time period for occurrence of the abnormal current spike from the current waveform map after the current and system time fitting. Specifically, the electronic device may determine a start time of the abnormal current burr and an end time of the abnormal current burr according to a change in the current value, and then acquire an occurrence time period corresponding to the abnormal current burr according to the start time and the end time.
Taking the abnormal current burr 1 shown in fig. 7 as an example, the manner in which the electronic device determines the start timing of the abnormal current burr may be: the time at which the current value starts to be greater than the reference value may be the start time at which the abnormal current burr 1 occurs, taking the base current value corresponding to the normal current waveform as the reference value. For example, at t, according to the normal current waveform variation trend 1 The current value at the moment should be I t1 However, in the fitted current waveform, if t 1 Starting at a moment, the current value starts to be larger than I t1 And at I t1 After that, there is abnormal current burr, then the starting time of the abnormal current burr is I t1 . Then, the end time corresponding to the abnormal current burr 1 can be analyzed and obtained in a similar manner, for example, according to the normal current waveform change trend, at t 2 The current value at the moment should be I t2 When the current value corresponding to the abnormal current burr is t 2 The time is restored to the normal current value I t2 If the current is the same, the abnormal current burr is ended, and the ending time is t 2 Time of day. Thereafter, the electronic device can be based on the start time t 1 And end time t 2 Acquiring an occurrence time period T corresponding to abnormal current burrs 1 I.e. T 1 =t 2 -t 1 . The occurrence period corresponding to each abnormal current burr can be acquired in a similar manner as described above.
In some embodiments, after fitting the current information and the system time, the obtained current waveforms may be stored to a memory space of the electronic device for subsequent screening for the target abnormal process. For convenience of description, the space storing the current waveform may be referred to as a first storage space, for example.
It should be noted that, in the embodiment of the present application, the fitting current information and the system time line may be to integrate the acquired current information and the system time to acquire a time-dependent change relationship (i.e. a current waveform) of the current in a certain system time period.
S504b, in response to the electronic device being in a high power consumption state, process information of periodic activities is acquired.
The process information may include, among other things, an identification of the process (e.g., a name of the process, a process number (pid), etc.), a system time period of the process activity (e.g., a start time of the process activity, an end time of the process activity).
In some embodiments, the electronic device may obtain process information that is periodically active in the background of the electronic device in an idle state. By way of example, a periodically active process may refer to a process that requires periodic invocation of resources such as a central processor (center processing unit, CPU) and/or graphics processor (graphics processing unit, GPU), and may include, for example, a periodically registered process, a periodically awakened process, and the like.
In some embodiments, the electronic device may obtain process information for periodic activities from the kernel side. It should be appreciated that when the electronic device is in an idle state, if there is periodic process activity, the process activity may participate in the CPU or GPU scheduling of the kernel, so that the electronic device may obtain information of the active process from the kernel side. The method for obtaining the process information may be implemented by using a function tracker (ftrace) principle of an existing user space program, and specifically, reference may be made to an existing flow, which is not described herein.
S505b, fitting the process information and the system time.
In some embodiments, the electronic device may fit the acquired process information to a system time of the electronic device, and acquire a system time line corresponding to the process activity, where the system time line of the process may be used to indicate a correspondence between the process activity and the system time, and at least includes a start time of the process activity. By way of example, the system timeline of a process may be as shown in FIG. 8A.
In some embodiments, when there are multiple periodically active processes while the electronic device is in an idle state, then the fitted system timeline of processes may be used to indicate the starting times of the multiple process activities. As shown in fig. 8B, assuming that the periodically active processes of the electronic device include process 1 and process 2 while in the idle state, the electronic device may fit the process 1, process 2 and the system time to the same system time line, and at this time, the system time line may indicate the start time of the activity of process 1 and the start time of the activity of process 2 at the same time.
It should be noted that, in the embodiment of the present application, only the current and system timeline fitting is described by way of example, and then the periodic activity process and system timeline fitting are performed, but in practical applications, there may be multiple execution sequences of the current and system timeline fitting and the periodic activity process and system timeline fitting, for example, the current and system timeline fitting may be performed simultaneously, or the periodic activity process and system timeline fitting may also occur before the current and system timeline fitting, that is, the execution sequences of step S504a and step S505a, and step S504b and step S505b are not limited.
In some embodiments, after fitting the current information and the system time, the obtained correspondence between the process activity and the system time may be stored in a memory space of the electronic device for use in subsequent screening of the target abnormal process. For convenience of description, a space storing a correspondence between process activities and system time may be referred to as a second storage space, for example.
It should be noted that, in the embodiment of the present application, the steps of acquiring the current information and fitting the current information and the system time (i.e., steps S504a and S505 a) and the steps of acquiring the process activity and fitting the process activity and the system time (i.e., steps S504b and S505 b) are not limited in implementation order, in other words, the steps S504a and S505a and the steps S504b and S505b may be performed simultaneously or may be performed alternately in time, which is not limited in the embodiment of the present application.
It should be noted that, the fitting process information and the system time in the embodiment of the present application may be to integrate the acquired process information and the system time to acquire a start time, an end time, an activity time period, etc. corresponding to a process activity in a certain system time period. After the process information and the system time are fitted, a time line marked with the starting time of the process activity can be obtained; alternatively, the time line marked with the start time and the end time of the process activity may be obtained after the process information and the system time are fitted.
S506, matching the system time line of the current and the system time line of the process.
In some embodiments, the electronic device may obtain the correspondence between the current waveform and the system time from the first storage space (as shown in fig. 7 or fig. 10C), and may also obtain the correspondence between the process activity and the system time from the second storage space (as shown in fig. 8A or fig. 8B).
In some embodiments, the electronic device may match the system time line of the current and the system time line of the process to obtain an integrated graph capable of indicating the current waveform and the process activity moment at the same time. By way of example, the way the electronic device matches the system timeline of the current and the system timeline of the process may include: and aligning a system time line corresponding to the process activity in a certain time period and a system time line corresponding to the current in the time terminal by taking the system time as a matching reference.
For example, the matched integrated graphics may be shown in fig. 9A or fig. 9B, respectively, depending on the number of processes that are periodically active during the idle state of the electronic device. The corresponding matched integrated graphic schematic diagram is shown in fig. 9A when the process of periodic activity is one, and the corresponding matched integrated graphic schematic diagram is shown in fig. 9B when the process of periodic activity is a plurality of (two or more).
S507, screening candidate abnormal processes according to the system time corresponding to the process activity and the system time corresponding to the current burr.
In some embodiments, the electronic device may screen candidate abnormal processes based on the time period during which the current spike occurs and the start and end times of the process. For example, the electronic device may screen the candidate abnormal process according to a preset screening condition, where the screening condition may be, for example: the system time period (denoted as an active time period) corresponding to the process activity can include an occurrence time period (denoted as an occurrence time period) corresponding to the abnormal current spike, and a difference between a second start time corresponding to the occurrence time period and a first start time corresponding to the active time period is within a first error range, and a difference between a first end time corresponding to the active time period and a second end time corresponding to the occurrence time period is within a second error range. For example, taking an active period corresponding to a certain process activity as T1 to T2 (i.e., a start time (i.e., a first start time) of the process activity is T1, an end time (i.e., a first end time) is T2), and an occurrence period corresponding to a certain abnormal current burr as T1 to T2 (i.e., an occurrence time (i.e., a second start time) of the current burr as T1, and a second vanishing time (i.e., a second binding time) as T2) as an example, the screening condition may also be described as: the starting time T1 of the process activity is earlier than the occurrence time T1 of the current burr, and the difference between the T1 and the T1 is in a first error range; meanwhile, the process activity end time T2 is later than the time T2 when the current burr disappears, and the difference between the T2 and the T2 is within a second error range.
The first error range and the second error range may be flexibly set according to needs, and the first error range and the second error range may be the same or different, which is not limited by the embodiment of the present application.
Taking the integrated graph shown in fig. 9A as an example, if the system time corresponding to the activity of the process and the occurrence time period corresponding to the abnormal current burr meet the above screening conditions, it may be determined that the process is a candidate abnormal process, which means that the activity of the process may be a possible cause of high power consumption of the electronic device in the idle state.
Taking the integrated graph shown in fig. 9B as an example, if the system time corresponding to the current burr and the system time corresponding to the activity of the process 1 meet the above screening conditions, and the system time corresponding to the current burr and the system time corresponding to the process 2 does not meet the above screening conditions, it may be determined that the process 1 is a candidate abnormal process, and the process 2 does not belong to the candidate abnormal process. This means that the activity of the process 1 may be a possible cause of high power consumption of the electronic device in the idle state, and the activity of the process 2 has no influence on this, and further analysis and identification can be performed on the process 1 to obtain whether the process 1 is a determined cause of high power consumption of the electronic device in the idle state (i.e. a target abnormal process), without performing analysis and identification on the process 2.
It should be understood that, by first screening the candidate process (i.e., the process that may cause high power consumption of the electronic device in the idle state) according to the system time corresponding to the process and the occurrence time period corresponding to the abnormal current burr, the screening range can be narrowed when the periodic process is active in multiple, so that the real cause that causes high power consumption can be acquired more accurately later.
S508, screening the target abnormal process from the candidate abnormal process according to the active period of the candidate abnormal process and the occurrence period of the abnormal current burr.
In some embodiments, the electronic device may screen the target abnormal process from the obtained candidate abnormal processes according to the activity period of the process and the occurrence period of the abnormal current burr. The active period of the target abnormal process is equal to the occurrence period of the current burr.
In some embodiments, the process of the electronic device for screening the target abnormal process from the obtained candidate abnormal processes according to the activity period of the process and the occurrence period of the abnormal current burr may include: acquiring a first comparison result of an active period of a candidate abnormal process and an occurrence period of abnormal current burrs; when the first comparison result indicates that the activity period and the occurrence period are equal, determining that the candidate abnormal process is a target abnormal process; or when the first comparison result indicates that the difference value between the active period and the occurrence period is smaller than the third error range, determining that the candidate abnormal process is the target abnormal process.
It should be noted that, in consideration of fitting current information and system time, and/or fitting process activity and system time, errors may exist; or, there may be errors in matching the system time line of the current and the system time line of the process, where the errors may cause a certain error in the active period of the process and the occurrence period of the abnormal current spike, so when the active period and the occurrence period indicated by the first comparison result are not completely equal and the difference value is smaller than the third error range, it may also be determined that the candidate abnormal process is the target abnormal process.
In some embodiments, the electronic device may calculate the occurrence period of the obtained abnormal current spike in a variety of ways, for example, may include: the electronic equipment can calculate the occurrence period of the abnormal current burr according to the occurrence time corresponding to the abnormal current burr with the same shape twice in succession respectively; or, the electronic device may calculate the occurrence period of the abnormal current burr according to the corresponding vanishing time of the abnormal current burr of the same type (e.g. the same shape) twice in succession; or, the electronic device may calculate the occurrence period of the abnormal current burr according to the time corresponding to the two consecutive burr peaks of the same type.
The following description is directed to a process how to match the active period of the candidate abnormal process and the occurrence period of the abnormal current burr in the case of different numbers of candidate abnormal processes, respectively.
For the case where there is only one candidate exception process:
continuing with the illustration of fig. 9A, the electronic device may obtain an activity period corresponding to the candidate abnormal process based on the process information. The activity period may have a plurality of acquisition modes, for example, may include: the electronic equipment can calculate the activity period according to the starting time corresponding to the continuous two activities of the candidate abnormal process; or, the electronic device may calculate the activity period according to the end time corresponding to the two continuous activities of the candidate abnormal process. Then, the electronic device may match the active period corresponding to the candidate abnormal process with the occurrence period of the abnormal current burr according to a preset matching condition, and if the active period corresponding to the candidate abnormal process and the occurrence period of the abnormal current burr can meet the preset matching condition (that is, the active period of the process and the occurrence period of the abnormal current burr are equal), the candidate abnormal process may be confirmed as the target abnormal process, that is, the candidate abnormal process is confirmed to be the cause of high power consumption of the electronic device in the idle state.
There are multiple scenarios for candidate abnormal processes:
please refer to the current waveforms shown in fig. 10A to 10C. By way of example, one possible current waveform may be as shown in fig. 10A (denoted as a first current waveform) and another possible current waveform may be as shown in fig. 10B (denoted as a second current waveform). The current information detected at this time is the current information obtained by fitting the first current information and the second current information, and the obtained current waveform is the current waveform obtained by superimposing the first current waveform and the second current waveform (as shown in fig. 10C). The abnormal current burr in the fitted current waveform can comprise the following steps: (1) Abnormal current burr (noted as a first type of abnormal current burr) contained in the first current waveform: (2) Abnormal current burrs (noted as second type abnormal current burrs) contained in the second current waveform; (3) The abnormal current burr after the first type abnormal current burr and the second type abnormal current burr are superimposed (noted as a third type abnormal current burr). The peak values of the burrs corresponding to the different types of abnormal current burrs may be different, and the occurrence periods corresponding to the different types of abnormal current burrs may be different.
The different types of abnormal current glitches shown in fig. 10C are caused by a plurality of periodic process activities, respectively, assuming that the plurality of processes have been screened as candidate abnormal processes in the manner described in step S507. In some embodiments, the electronic device may perform matching according to the activity periods of the plurality of candidate abnormal processes and the occurrence periods of the current glitches according to a preset matching manner, so as to screen the target abnormal process that causes high power consumption of the electronic device in the idle state.
Specifically, the matching process may include: when the candidate abnormal processes are multiple, the electronic equipment firstly respectively performs pairwise combination on the multiple candidate abnormal processes, and then calculates the overlapped active periods of the two processes included in each combination, wherein the overlapped active periods can be a common multiple (such as a least common multiple) of the active periods of each process; then, the electronic device may compare whether the superimposed active period corresponding to each combination is the same as the occurrence period corresponding to the abnormal current burr of a certain type, and if so, may screen out that two processes included in the combination are all target abnormal processes.
For ease of understanding, the following description will be given by taking an example in which the number of candidate abnormal processes is 2.
For example, as shown in connection with fig. 11, assuming that the candidate abnormal processes are process a and process B, the current values corresponding to the spike peaks of the abnormal current spike 10, the abnormal current spike 20, the abnormal current spike 30, and the abnormal current spike 40 included in the current waveform are larger than the other current spikes, and thus the abnormal current spike 10 to the abnormal current spike 40 may be caused by a plurality of process activities together. In this case, the electronic device may screen the target abnormal process by matching the activity period and the occurrence period of the process, and the process may include: the electronic equipment acquires an activity period (denoted as RA) corresponding to the process A according to the process information of the process A, and acquires an activity period (denoted as RB) corresponding to the process B according to the process information of the process B; then, the electronic device can calculate a superposition activity period of process a and process B, which can be the least common multiple of RA and RB; then, whether the common multiple of the activity period is the same as the occurrence period corresponding to the current burr 10-40 is judged, if so, the process A and the process B can be determined to be the target abnormal processes.
Alternatively, in order to more accurately screen out the target abnormal process that causes high power consumption, when the above-mentioned superimposed active period is the same as the occurrence period corresponding to a certain type of abnormal current burr, two processes included in the combination may be determined as candidate abnormal processes. Then, the candidate abnormal process is further verified in the following matching manner: the electronic equipment can traverse different types of abnormal current burrs and acquire the occurrence periods corresponding to the different types of abnormal current burrs; then, the electronic device can compare the activity period corresponding to each candidate abnormal process with the occurrence period corresponding to each type of abnormal current burr, if the activity period of the candidate abnormal process is the same as the occurrence period corresponding to one type of abnormal current burr, the candidate abnormal process can be screened out to verify correctly, and the candidate abnormal process is confirmed to be the target abnormal process causing high power consumption; if the active period of the candidate abnormal process is different from the occurrence period corresponding to any one type of abnormal current burr, the verification error of the target abnormal process can be determined, and the verification error is not taken as the target abnormal process.
S509, terminating the target abnormal process and optimizing the endurance performance of the electronic equipment.
In some embodiments, the manner in which the target exception process is terminated may include: the electronic device automatically terminates the target abnormal process (corresponding to the automatic termination mode shown in fig. 3C); or the electronic device prompts the user, and then the user manually terminates the target abnormal process (corresponding to the manual termination mode shown in fig. 3C).
According to the method for optimizing the cruising performance, provided by the embodiment of the application, the corresponding relation between the process activity and the system time is obtained by fitting the system time line to the process of the periodic activity, the change of the current waveform along with the system time line is obtained by fitting the system time line to the current, then the process activity and the current burr in the current waveform are matched based on the system time line, and the target abnormal process causing the current burr is screened and terminated, so that the problem of effectively positioning the problem is realized, and the problem of cruising deterioration of the electronic equipment in an idle state caused by frequent activity of the process can be solved.
Exemplary, as shown in fig. 12, a schematic flowchart of another method for optimizing cruising performance according to an embodiment of the present application is provided. The method can be executed by the electronic device as a main body, and specifically can comprise the following steps:
S1201, current information of the electronic device in the idle state and process information of the electronic device in the idle state are acquired.
The idle state may refer to a state in which the electronic device is not used by a user. The idle state may include, for example: an off-screen standby state, an off-screen display standby state, a state in which the screen is on but the user is not using the electronic device, and the like.
In some embodiments, the electronic device may obtain current information of the electronic device in an idle state through the fuel gauge. The specific process of obtaining the current information may be referred to the related description in the embodiment of fig. 4, which is not repeated here.
In some embodiments, the process of acquiring the process information by the electronic device may be implemented by any existing procedure, for example, capturing the process information from a file stored in the electronic device by a Shell instruction, which is not limited in the embodiments of the present application.
It should be noted that, the time period corresponding to the current information acquired by the electronic device and the time period corresponding to the process information acquired by the electronic device may be the same time period, for example, the current information and the process information corresponding to the same system time period.
It should be noted that, the electronic device obtains the current information and the process information so as to obtain the target abnormal process matched with the abnormal current burr, that is, the target abnormal process causing the abnormal current burr to generate, so as to find the reason for high power consumption of the electronic device in the idle state. Thus, in some embodiments, a trigger event may be acquired before the electronic device acquires the electronic device current information and the process information, such as: the electronic equipment can acquire the power consumption information of the electronic equipment; then, acquiring the power consumption of the electronic equipment according to the power consumption information; when the power consumption is higher than a target threshold (i.e., the electronic device is in a high power consumption state), the electronic device is triggered to acquire current information of the electronic device in an idle state and process information of the electronic device in the idle state (i.e., the electronic device is triggered to perform endurance optimization). The target threshold value for which the power consumption corresponds here may correspond to the third threshold value above.
By way of example, the power consumption information may include, for example, current information of a power supply output of the electronic device; or voltage information output by a power supply of the electronic device. Power consumption may refer to power consumed by an electronic device, and the like.
In some embodiments, when the power consumption is detected to be higher than the target threshold, the electronic device may further display a first interface, where the first interface includes first prompt information, where the first prompt information is used to prompt a user that the electronic device is in a high power consumption state in the idle state; thereafter, the electronic device may receive a first operation of the user input, the first operation being for indicating a screening target abnormal process. The first interface may correspond to the interface shown in fig. 3B, for example, and the first prompt information may correspond to the high power consumption prompt information shown in fig. 3B, for example.
S1202, acquiring a corresponding relation between a current waveform and system time according to the current information and the system time of the electronic equipment, wherein the current waveform comprises at least one abnormal current burr; and acquiring the corresponding relation between at least one process activity and the system time according to the process information and the system time of the electronic equipment.
The process activities may be varied, and may include process registration, process wakeup, and the like, for example. The process activity may be periodic.
The abnormal current spike may refer to a current peak corresponding to the current spike, and a spike having a difference value greater than a preset threshold value with a current reference value of a current waveform, which is represented on a current waveform diagram and may be a relatively obvious current spike. In some embodiments, the manner of determining the abnormal current spike may include: acquiring a difference value between a current peak value corresponding to a current burr peak in a current waveform and a current reference value of the current waveform; and when the difference value is larger than a preset threshold value, determining the current burr as an abnormal current burr.
The process of acquiring the current information and the system time in this step and the process of acquiring the process information and the system time may correspond to the step S504a and the step S504b in the embodiment of fig. 5, and are specifically referred to the related description in the embodiment of fig. 5, and are not repeated here. However, in the embodiment of the present application, any existing feasible manner may be adopted to obtain the corresponding relationship between the current waveform and the system time according to the current information and the system time, and obtain the corresponding relationship between the process activity and the system time according to the process information and the system time of the electronic device.
S1203, matching at least one abnormal current burr with at least one process activity according to the system time, and screening a target abnormal process.
In some embodiments, the electronic device matches the abnormal current burr and the process activity according to the system time, and screens the target abnormal process, which may specifically include: the electronic equipment acquires at least one occurrence time period corresponding to at least one abnormal current burr on the current waveform according to the system time; the electronic equipment acquires at least one activity time period corresponding to at least one process activity respectively according to the system time; then, the target abnormal process is screened according to at least one occurrence time period and at least one activity time period respectively corresponding to the abnormal current burrs and the process activity, specifically, the electronic device can match the at least one occurrence time period and the at least one activity time period respectively, and the target abnormal process is screened. The occurrence time period corresponding to the abnormal current burr refers to a time period when the abnormal current burr occurs on the current waveform; the activity time period corresponding to the process activity refers to a time period from the start time to the end time of a certain process activity.
In some embodiments, the means for the electronic device to match the at least one occurrence period and the at least one activity period, respectively, and the means for screening the target abnormal process may include: matching at least one occurrence period with at least one activity period; and when the abnormal current burr exists during the process activity, determining the process corresponding to the process activity as a target abnormal process.
In some embodiments, the active time period of the process activity may correspond to a first start time and a first end time, and the occurrence time period of the abnormal current spike may correspond to a second start time and a second end time. The process of screening the target abnormal process according to the activity time period and the occurrence time period comprises the following steps: when the first starting time is earlier than the second starting time, and the first ending time is later than the second ending time; and when the difference value between the second starting time and the first starting time is within a first error range and the difference value between the first ending time and the second ending time is within a second error range, determining the process corresponding to the active time period as a target abnormal process.
Alternatively, the process of screening the target abnormal process may further include: according to the activity time periods respectively corresponding to the process activities and the occurrence time periods respectively corresponding to the abnormal current burrs, when the abnormal current burrs exist during the process activities, determining the process corresponding to the process activities as a candidate abnormal process; then, a first comparison result of an active period of the candidate abnormal process and an occurrence period of abnormal current burrs is obtained; when the first comparison result indicates that the activity period and the occurrence period are equal, determining that the candidate abnormal process is a target abnormal process; or when the first comparison result indicates that the difference value between the active period and the occurrence period is smaller than the third error range, determining that the candidate abnormal process is the target abnormal process.
In some embodiments, when there are multiple types of abnormal current burrs, meaning that there may be multiple target abnormal processes that cause the abnormal current burrs, the process of screening the target abnormal processes may include: when abnormal current burrs exist during the process activity, determining the process corresponding to the process activity as a candidate abnormal process; combining the active periods of the plurality of candidate abnormal processes in pairs, and acquiring the overlapped active periods of the processes combined in pairs; obtaining a second comparison result between the superposition active period and the occurrence period of the abnormal current burr; when the second comparison result indicates that the superposition active period is equal to the occurrence period, determining candidate abnormal processes respectively corresponding to the superposition active periods as target abnormal processes; or when the second comparison result indicates that the difference value between the superposition active period and the occurrence period is smaller than a fourth error range, determining that the candidate abnormal processes respectively corresponding to the superposition active period are the target abnormal processes.
The process of screening the target abnormal process may be referred to the description in the embodiment of fig. 5, and will not be described herein.
S1204, terminating the target abnormal process.
In some embodiments, the manner in which the electronic device terminates the target abnormal process may include: the user manually instructs the electronic device to terminate the target abnormal process; or the electronic device automatically terminates the target abnormal process, etc. The process of terminating the target abnormal process may be: and searching and killing and/or cleaning the target abnormal process.
When the manner of terminating the target abnormal process is that the user manually instructs the electronic device to terminate the target abnormal process, it may include: the electronic device may display a second interface, where the second interface includes second prompt information, where the second prompt information may be used to prompt a user for a terminated target abnormal process; then, the electronic device receives a second operation input by the user, wherein the second operation is used for indicating to terminate the target abnormal process. The second operation may be, for example, exiting an application corresponding to the target abnormal process, or the like. The second interface may correspond to the interface shown in fig. 3C, 3E, or 3F, for example.
According to the method for optimizing the cruising performance, provided by the embodiment of the application, the corresponding relation between the process activity and the system time is obtained by fitting the system time line to the process of the periodic activity, the change of the current waveform along with the system time line is obtained by fitting the system time line to the current, then the process activity and the current burr in the current waveform are matched based on the system time line, and the target abnormal process causing the current burr is screened and terminated, so that the problem of effectively positioning the problem is realized, and the problem of cruising deterioration of the electronic equipment in an idle state caused by frequent activity of the process can be solved.
Based on the same technical concept, the embodiment of the application also provides electronic equipment, which comprises: a display; one or more processors; one or more memories; the one or more memories store one or more computer programs comprising instructions that, when executed by the one or more processors, cause the electronic device to perform one or more steps of any of the methods described above.
Based on the same technical idea, an embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored, which when run on a computer or a processor, cause the computer or the processor to perform one or more steps of any one of the methods described above.
Based on the same technical concept, the embodiment of the application also provides a computer program product containing the instructions. The computer program product, when run on a computer or processor, causes the computer or processor to perform one or more steps of any of the methods described above.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted across a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.
The foregoing is merely a specific implementation of the embodiment of the present application, but the protection scope of the embodiment of the present application is not limited to this, and any changes or substitutions within the technical scope disclosed in the embodiment of the present application should be covered in the protection scope of the embodiment of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (12)

1. The method for optimizing the endurance performance is characterized by being applied to electronic equipment and comprising the following steps of:
acquiring current information of the electronic equipment in an idle state and process information of the electronic equipment in the idle state;
acquiring a corresponding relation between a current waveform and the system time according to the current information and the system time of the electronic equipment, wherein the current waveform comprises at least one abnormal current burr; and, in addition, the processing unit,
Acquiring a corresponding relation between at least one process activity and the system time according to the process information and the system time of the electronic equipment;
when the first starting time of the process activity is earlier than the second starting time of the abnormal current burr, and the difference value between the first starting time and the second starting time is within a first error range; the method comprises the steps of,
when the first end time of the process activity is later than the second end time of the abnormal current burr and the difference value between the first end time and the second end time is within a second error range, acquiring candidate abnormal process activity;
combining the active periods of the plurality of candidate abnormal processes in pairs, and acquiring the overlapped active periods of the processes combined in pairs;
obtaining a second comparison result between the superposition active period and the occurrence period of the abnormal current burr;
when the second comparison result indicates that the superposition active period is equal to the occurrence period, determining candidate abnormal processes respectively corresponding to the superposition active periods as target abnormal processes;
and terminating the target abnormal process.
2. The method according to claim 1, wherein the method further comprises:
Acquiring at least one occurrence time period corresponding to the at least one abnormal current burr on the current waveform according to the system time; and, in addition, the processing unit,
acquiring at least one activity time period corresponding to the at least one process activity respectively according to the system time;
and respectively matching the at least one occurrence time period and the at least one activity time period, and screening the target abnormal process.
3. The method according to claim 2, wherein said matching said at least one occurrence period and said at least one activity period, respectively, filters said target abnormal process, in particular comprising:
matching the at least one occurrence period and the at least one activity period, respectively;
and when the abnormal current burr exists in the process activity period, determining the process corresponding to the process activity as the target abnormal process.
4. A method according to any one of claims 1-3, characterized in that the method further comprises:
when the abnormal current burr exists during the process activity period, determining the process corresponding to the process activity as a candidate abnormal process;
acquiring a first comparison result of an active period of the candidate abnormal process and an occurrence period of the abnormal current burr; wherein,
And when the first comparison result indicates that the activity period and the occurrence period are equal, determining that the candidate abnormal process is the target abnormal process.
5. A method according to any one of claims 1-3, characterized in that the method further comprises:
acquiring a difference value between a current peak value corresponding to a peak of the current burr in the current waveform and a current reference value of the current waveform;
and when the difference value is larger than a preset threshold value, determining that the current burr is abnormal current burr.
6. A method according to any of claims 1-3, characterized in that the idle state comprises at least:
an off-screen standby state, an off-screen display standby state, a state in which the screen is on but the user is not using the electronic device.
7. A method according to any of claims 1-3, characterized in that said obtaining current information of said electronic device in an idle state and process information of said electronic device in said idle state, in particular comprises:
acquiring power consumption information of the electronic equipment;
acquiring the power consumption of the electronic equipment according to the power consumption information;
and when the power consumption is higher than a target threshold value, acquiring current information of the electronic equipment in an idle state and process information of the electronic equipment in the idle state.
8. The method of claim 7, wherein the power consumption information comprises:
current information output by a power supply of the electronic equipment; or alternatively, the process may be performed,
and voltage information output by a power supply of the electronic equipment.
9. A method according to any one of claims 1-3, characterized in that the method further comprises:
displaying a first interface, wherein the first interface comprises first prompt information for prompting a user that the electronic equipment is in a high power consumption state in the idle state;
and receiving a first operation input by the user, wherein the first operation is used for indicating screening of the target abnormal process.
10. A method according to any one of claims 1-3, characterized in that the method further comprises:
displaying a second interface, wherein the second interface comprises second prompt information which is used for prompting the user to terminate the target abnormal process;
and receiving a second operation input by a user, wherein the second operation is used for indicating to terminate the target abnormal process.
11. An electronic device, comprising:
one or more processors;
one or more memories;
The one or more memories store one or more computer programs comprising instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-10.
12. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer executable program which, when called by a computer, causes the computer to perform the method according to any one of claims 1 to 10.
CN202111526198.3A 2021-12-02 2021-12-14 Method for optimizing endurance performance and electronic equipment Active CN115017001B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2021114616447 2021-12-02
CN202111461644 2021-12-02

Publications (2)

Publication Number Publication Date
CN115017001A CN115017001A (en) 2022-09-06
CN115017001B true CN115017001B (en) 2023-10-20

Family

ID=83064356

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111526198.3A Active CN115017001B (en) 2021-12-02 2021-12-14 Method for optimizing endurance performance and electronic equipment

Country Status (1)

Country Link
CN (1) CN115017001B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109343991A (en) * 2018-09-26 2019-02-15 Oppo广东移动通信有限公司 The detection method of electronic equipment and its power consumption exception, storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109343991A (en) * 2018-09-26 2019-02-15 Oppo广东移动通信有限公司 The detection method of electronic equipment and its power consumption exception, storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
秦建平.《Android编程宝典》.《北京航空航天大学出版社》,2013,第24页. *

Also Published As

Publication number Publication date
CN115017001A (en) 2022-09-06

Similar Documents

Publication Publication Date Title
CN114449599B (en) Network link switching method based on electronic equipment position and electronic equipment
CN111095723B (en) Wireless charging method and electronic equipment
WO2020073288A1 (en) Method for triggering electronic device to execute function and electronic device
CN115696483B (en) Network link switching method based on electronic equipment state and electronic equipment
CN114079893B (en) Bluetooth communication method, terminal device and computer readable storage medium
KR20150025609A (en) Apparatas and method for measuring a charge of location in the way of low power in an electronic device
CN116070035B (en) Data processing method and electronic equipment
CN115333941B (en) Method for acquiring application running condition and related equipment
CN116156417A (en) Equipment positioning method and related equipment thereof
CN113224804B (en) Charging control method and electronic equipment
CN116315667B (en) Data transmission method, device, equipment and storage medium
CN115655310A (en) Data calibration method, electronic device and readable storage medium
WO2020063386A1 (en) Charging management method, graphical user interface and related apparatus
CN114610419B (en) Method and device for adding widget and computer readable storage medium
CN111104209B (en) Task processing method and related equipment
CN114384465A (en) Azimuth angle determination method and device
CN114123364A (en) Charging method for electronic device, electronic device and medium
CN115017001B (en) Method for optimizing endurance performance and electronic equipment
CN114173286B (en) Method and device for determining test path, electronic equipment and readable storage medium
CN114828098B (en) Data transmission method and electronic equipment
CN117348894A (en) Software upgrading method, terminal equipment and system
CN116095223B (en) Notification display method and terminal device
CN115513571B (en) Control method of battery temperature and terminal equipment
CN117082170B (en) On-off test method, test system and shared host
CN117154900B (en) Charging control 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
GR01 Patent grant
GR01 Patent grant