WO2021077260A1 - Power consumption information processing method, device, electronic apparatus and storage medium - Google Patents

Power consumption information processing method, device, electronic apparatus and storage medium Download PDF

Info

Publication number
WO2021077260A1
WO2021077260A1 PCT/CN2019/112316 CN2019112316W WO2021077260A1 WO 2021077260 A1 WO2021077260 A1 WO 2021077260A1 CN 2019112316 W CN2019112316 W CN 2019112316W WO 2021077260 A1 WO2021077260 A1 WO 2021077260A1
Authority
WO
WIPO (PCT)
Prior art keywords
power consumption
information
temperature
log
battery
Prior art date
Application number
PCT/CN2019/112316
Other languages
French (fr)
Chinese (zh)
Inventor
曾云清
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to PCT/CN2019/112316 priority Critical patent/WO2021077260A1/en
Priority to CN201980099288.3A priority patent/CN114222978A/en
Publication of WO2021077260A1 publication Critical patent/WO2021077260A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the field of computer technology, and more specifically, to a method, device, electronic device, and storage medium for processing power consumption information.
  • this application proposes a method, device, electronic device, and storage medium for processing power consumption information.
  • an embodiment of the present application provides a method for processing power consumption information, which is applied to an electronic device, the electronic device includes a main board and a battery, and the method includes: obtaining power consumption information for the battery; Acquire temperature information of the motherboard; generate a power consumption log for display according to the power consumption information and the temperature information.
  • an embodiment of the present application provides a device for processing power consumption information, which is applied to an electronic device.
  • the electronic device includes a motherboard and a battery.
  • the device includes: a power consumption acquisition module, a temperature acquisition module, and a log generation module , Wherein the power consumption acquisition module is configured to acquire power consumption information for the battery; the temperature acquisition module is configured to acquire temperature information of the main board; and the log generation module is configured to The power consumption information and the temperature information are used to generate a power consumption log for display.
  • an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and It is configured to be executed by the one or more processors, and the one or more application programs are configured to execute the power consumption information processing method provided in the first aspect described above.
  • an embodiment of the present application provides a computer-readable storage medium, and the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the power consumption provided in the first aspect.
  • the processing method of electric information is not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, but not limited to, and the program code can be invoked by a processor to execute the power consumption provided in the first aspect.
  • the processing method of electric information is not limited to execute the power consumption provided in the first aspect.
  • the solution provided by this application obtains the power consumption information of the battery power consumption and the temperature information of the main board to generate the power consumption log for display according to the power consumption information and the temperature information, so as to realize the main board
  • the temperature information is integrated into the battery power consumption log, so that the heating status of the electronic device can be obtained directly from the power consumption log, which is convenient for users to view and analyze the status of the electronic device.
  • Fig. 1 shows a flowchart of a method for processing power consumption information according to an embodiment of the present application.
  • Fig. 2 shows a flowchart of a method for processing power consumption information according to another embodiment of the present application.
  • Fig. 3 shows a flowchart of a method for processing power consumption information according to another embodiment of the present application.
  • Figure 4 shows a schematic diagram of a software framework flow diagram of a method for processing power consumption information.
  • Fig. 5 shows a flowchart of a method for processing power consumption information according to still another embodiment of the present application.
  • Fig. 6 shows a schematic diagram of the software framework flow diagram of another method for processing power consumption information.
  • Fig. 7 shows a block diagram of an apparatus for processing power consumption information according to an embodiment of the present application.
  • FIG. 8 is a block diagram of an electronic device for executing the method for processing power consumption information according to an embodiment of the present application according to an embodiment of the present application.
  • Fig. 9 is a storage unit for storing or carrying program code for implementing the method for processing power consumption information according to the embodiment of the present application according to an embodiment of the present application.
  • the heating condition of the electronic device is usually determined based on the battery temperature. If the temperature of the battery is too high, it is determined that the electronic device has a serious heating condition.
  • the inventor found through measurement verification that the battery temperature has a certain deviation from the housing temperature of the electronic device in certain scenarios, which cannot truly reflect the actual feelings of the user, and cannot truly express the actual heating of the electronic device.
  • the inventor proposes the power consumption information processing method, device, electronic device, and storage medium provided by the embodiments of the present application.
  • the power consumption information and the temperature information are used to generate a power consumption log for display.
  • the heating status of the electronic device can be determined more accurately through the temperature of the main board, and the temperature information of the main board can be integrated into the battery power consumption log, so that the heating status of the electronic device can be directly obtained from the power consumption log, which is convenient View and analyze the power consumption log to get the status of electronic equipment.
  • the specific power consumption information processing method will be described in detail in the subsequent embodiments.
  • FIG. 1 shows a schematic flowchart of a method for processing power consumption information according to an embodiment of the present application.
  • the power consumption information processing method is used to obtain the heating status of the electronic device from the power consumption log.
  • the power consumption information processing method is applied to the power consumption information processing device 400 as shown in FIG. 7 and the electronic equipment 100 equipped with the power consumption information processing device 400 (FIG. 8) .
  • the electronic device includes a motherboard and a battery.
  • the following will take an electronic device as an example to describe the specific process of this embodiment.
  • the electronic device applied in this embodiment may be a mobile terminal, a notebook, etc., which is not limited herein.
  • the process shown in FIG. 1 will be described in detail below, and the processing method of the power consumption information may specifically include the following steps:
  • Step S110 Obtain power consumption information for the battery power consumption.
  • the electronic device may monitor the power consumption of the battery to obtain the power consumption information of the battery in real time.
  • the power consumption information can come from multiple different power consumption sources.
  • the power consumption can be hardware modules such as display screen, Bluetooth, radio frequency, etc., or can be software-level applications (such as games, video applications), etc., which are not limited here.
  • the power consumption information may also be different types of information. For example, it can be the running time of a certain application (such as the screen on time), or it can be the power consumption value of a certain application (such as the power consumption value of the bright screen), which is not limited here.
  • the power consumption information changes over time, it is necessary to continuously update the power consumption information of the battery power consumption so that the power consumption information can match the latest state of the battery, so that it can be based on the latest power consumption information. Corresponding processing (such as entering the power saving mode).
  • the above power consumption information is only an example, and does not represent a limitation on the specific power consumption information.
  • the electronic device may periodically or irregularly obtain the power consumption information to be updated corresponding to multiple different power consumption sources. For example, the electronic device may obtain the power consumption information to be updated from multiple power consumption sources at preset intervals. For another example, the electronic device may obtain the power consumption information to be updated from the multiple power consumption sources in real time. In some other implementation manners, the electronic device may also directly obtain the power consumption information of the battery power consumption by multiple power consumption sources at the current moment according to the instructions input by the user.
  • Step S120 Obtain temperature information of the motherboard.
  • the electronic device in order to get close to the heating condition of the electronic device actually felt by the user, can obtain the temperature information of the main board of the electronic device, so that the heating condition of the electronic device can be more accurately determined through the temperature information of the main board.
  • the main board can be understood as the center or main circuit board of an electronic device.
  • the main board of the electronic device may be provided with a temperature sensor, and the electronic device may obtain the temperature information sensed by the temperature sensor as the temperature information of the main board.
  • the type of temperature sensor is not limited in the embodiment of the present application.
  • it may be an NTC (Negative Temperature Coefficient, negative temperature coefficient) temperature sensor.
  • Step S130 Generate a power consumption log for display according to the power consumption information and the temperature information.
  • the electronic device after obtaining the power consumption information and temperature information, the electronic device can generate a power consumption log for display based on the power consumption information and temperature information.
  • the electronic device after the electronic device obtains the power consumption information and the temperature information of the main board, it can record the temperature information and power consumption information in the form of a log to obtain the power consumption log. Therefore, relevant personnel can perform power consumption analysis of the above-mentioned electronic equipment and temperature analysis of the main board according to the power consumption log.
  • the power consumption information when the electronic device only obtains power consumption information, the power consumption information may also be recorded in the form of a log to obtain a power consumption log.
  • the power consumption information when the electronic device only obtains temperature information, the power consumption information may also be recorded in the form of a log to obtain a power consumption log.
  • the information recorded in the power consumption log may be determined according to the needs of the user. For example, when the user does not need to know the temperature of the motherboard, the electronic device may only record the power consumption information in the power consumption log.
  • the generated power consumption log can be determined according to the needs of the user whether to display, or the specific information that needs to be displayed can also be determined according to the needs of the user. For example, when a query command for temperature information is detected, the temperature information in the power consumption log can be displayed.
  • the method for processing power consumption information obtains power consumption information on battery power consumption and obtains temperature information of a main board to generate power consumption information for display according to the power consumption information and the temperature information.
  • Power log so as to integrate the temperature information of the motherboard into the power consumption log of the battery, so that the heating status of the electronic device can be obtained directly from the power consumption log, without the need to build a log for recording, reducing the staff’s need for software programs
  • Development time has also improved the convenience and comprehensiveness of information acquisition.
  • the real-time recording of the temperature information of the motherboard through the power consumption log can provide important data support and optimization directions for the power consumption analysis and judgment of market end users, and lay the foundation for the improvement of power consumption.
  • FIG. 2 shows a schematic flowchart of a method for processing power consumption information according to another embodiment of the present application.
  • the process shown in FIG. 2 will be described in detail below, and the processing method of the power consumption information may specifically include the following steps:
  • Step S210 Display a setting interface of the power consumption log, the setting interface includes a first control, the first control is used to turn on or off a designated function, and the designated function is used to record the temperature information of the main board in the power consumption log.
  • the electronic device generally does not record the temperature information of the motherboard in the power consumption log.
  • the electronic device can actively trigger the temperature information of the motherboard. record of.
  • the electronic device may display a setting interface of the power consumption log, and the user can select at least one function of the power consumption log required by the user according to the setting interface, for example, recording the temperature of the mainboard.
  • the setting interface may include a first control
  • the first control may be used to turn on or turn off a designated function
  • the designated function is used to record the temperature information of the mainboard in the power consumption log. Therefore, the user can determine whether to enable the specified function in the setting interface of the power consumption log according to their own needs.
  • the first control refers to a control that can be triggered by a touch operation, and can be a text control, a picture control, or a button control, which is not limited here.
  • the electronic device can determine whether to turn on or turn off the specified function according to the user's touch operation on the first control. For example, the electronic device may determine to turn on the designated function according to when the user clicks on the first control for the first time, and may determine to turn off the designated function according to when the user clicks on the first control for the second time.
  • the above-mentioned first control can be set in the setting interface according to the following path: "Settings” --> "Battery” --> “Log” --> “ntc temperature”, where "ntc temperature” is The control name of the first control, the user can click and select the "ntc temperature” control and other touch operations to complete the opening or closing of the specified function. It should be noted that the aforementioned control names are only examples, and are not limited in this application.
  • Step S220 When an opening operation on the first control is detected, control the designated function to be turned on.
  • the electronic device when the electronic device detects the user's opening operation of the above-mentioned first control, it can control the opening of the above-mentioned designated function, that is, record the temperature information of the mainboard and record it in the power consumption log.
  • the electronic device can control the above specified function to be closed, that is, stop recording the temperature information of the main board.
  • the opening operation and closing operation of the first control can be distinguished according to the number of clicks of the first control, or can be distinguished according to the left and right sliding direction of the first control, which is not limited here.
  • the electronic device may also control the above-mentioned designated function to be turned on when the designated command line is obtained.
  • the designated command line may be an input command for managing the operating system running on the electronic device, and may be input by the user.
  • the content of the designated command line can be reasonably set according to the specific application environment, and the content of the specific designated command line is not limited in the embodiments of the present application.
  • the designated command line can be the "adb shell dumpsys batterystats--enable-ntc" command, where ntc is the temperature sensor.
  • Step S230 Obtain power consumption information for the battery power consumption.
  • Step S240 Acquire temperature information of the motherboard when it is detected that the designated function is turned on.
  • Step S250 Generate a power consumption log for display according to the power consumption information and the temperature information.
  • step S230, step S240, and step S250 can refer to the content of the foregoing embodiment, and will not be repeated here.
  • the power consumption log when the user needs to view the power consumption log, the power consumption log may be exported.
  • the above setting interface may further include a second control for exporting the power consumption log.
  • the method for processing power consumption information may further include: when a trigger operation on the second control is detected, exporting the power consumption log and storing the power consumption log.
  • the trigger operation may be a click operation on the second control.
  • the above-mentioned second control can be set in the setting interface according to the following path: "Settings” --> "Battery” --> “Log” --> “Log Export”, where "Log Export” is The control name of the second control. It should be noted that the aforementioned control names are only examples, and are not limited in this application. Taking the Linux system as an example, when the user clicks the "Log Export” control in the electronic device loaded with the Linux system, the electronic device will execute the "dumpsys batterystats" command to get the power consumption log.
  • the electronic device can export the power consumption log in the default file format and store it in the preset storage path or the designated storage path, so that the user can view the power consumption log from the corresponding storage path, and use the electronic
  • the power consumption log is parsed locally on the device or on other devices, so as to perform power consumption analysis, mainboard temperature analysis, etc. of the above-mentioned electronic equipment based on the power consumption log.
  • the electronic device is a mobile terminal
  • the other device can be a PC (Personal Computer), and the user can copy the power consumption log file saved by the mobile terminal to the PC, and use the tool "log analysis" on the PC for processing ( Generate web page files).
  • the user may be prompted with the file name of the log file.
  • the file name is the current system time by default, so that the power consumption log corresponding to the time period that needs to be viewed can be determined directly based on the file name.
  • the log file with the file name 20170504221015.txt corresponds to the current system time at 22:10:15 on May 4th, 2017.
  • the user can also change the file name, which is not limited here.
  • the electronic device may also derive the corresponding power consumption log according to the time period range selected by the user.
  • exporting the power consumption log and storing the power consumption log may include: obtaining a viewing time period of the power consumption log; obtaining all power consumption logs corresponding to the viewing time period; and deriving the power consumption log. All power consumption logs and store all the power consumption logs.
  • the electronic device may display the time selection option before exporting the power consumption log.
  • the electronic device may determine the viewing time period of the power consumption log according to the viewing start time and end time specifically selected by the user, and then obtain and export all power consumption logs corresponding to the viewing time period. In this way, the user can view the corresponding motherboard temperature and power consumption information within the required time period.
  • the power consumption information processing method may further include: generating webpage information corresponding to the power consumption log, and using the webpage
  • the web page information is displayed in the form of an interface. Therefore, the motherboard temperature information in the power consumption log can be displayed in the shape of a web page interface.
  • the file format corresponding to the webpage information may be multiple, for example, webpage files in htm, html, asp, php and other formats, which are not limited here.
  • the above-mentioned webpage information may include a temperature change curve of the main board, so that the temperature of the main board of the electronic device (such as temperature, trend, etc.) can be expressed in the form of a curve. Therefore, before generating the web page information corresponding to the power consumption log and displaying the web page information in the form of a web interface, the power consumption information processing method may further include:
  • the web page information includes: generating web page information corresponding to the temperature state curve, and displaying the temperature state curve in the form of a web page interface. Therefore, it is possible to conveniently and accurately view the detailed motherboard temperature performance of the electronic device in different stages and different scenarios.
  • the electronic device After the electronic device obtains the time stamps corresponding to the multiple temperature information in the power consumption log, it can arrange the time stamps in chronological order on the time axis, and arrange each time stamp corresponding to each time stamp.
  • the temperature information is connected with lines to generate the temperature state curve of the motherboard.
  • the types of lines can be multiple, for example, broken lines, smooth curves, dashed lines, solid lines, and so on.
  • the electronic device After the electronic device generates the temperature state curve, it can generate web page information corresponding to the temperature state curve, and visually and intuitively display the temperature state curve in the form of a web interface. Further, the generated web page information can also be shared online through hyperlinks.
  • the electronic device may also send the power consumption log to other devices, and the other devices can analyze the temperature of the motherboard.
  • the method for processing power consumption information may further include: sending the power consumption log to a terminal device, where the terminal device is used for Generate web page information according to the power consumption log, and the web page information is used by the terminal device to display the power consumption log in the form of a web interface.
  • the terminal device can be a PC or other devices that can perform log analysis.
  • the electronic device may also delete the power consumption log according to an instruction input by the user.
  • the above-mentioned setting interface may further include a third control, which is used to trigger the function of clearing the power consumption log, and the power consumption information for display is generated according to the power consumption information and the temperature information.
  • the method further includes: when a trigger operation on the third control is detected, clearing the generated electricity consumption log. Therefore, the historical information of the power consumption log can be cleared according to the needs of the user, so as to reduce the occupation of the storage space by the temperature information and the power consumption information.
  • the above-mentioned third control can be set in the setting interface according to the following path: "Settings” -> "Battery” -> “Log” -> “Reset”, where "Reset” is the third The control name of the control. It should be noted that the aforementioned control names are only examples, and are not limited in this application. Further, when the user clicks the "reset” control, the electronic device can also clear all historical power consumption logs.
  • step 210 to step 250 may also be applied to other embodiments.
  • the setting interface of the power consumption log is displayed, and the setting interface includes a first control for turning on or off a specified function.
  • the specified function is used to record the temperature information of the mainboard in the power consumption log, and then When the opening operation of the first control is detected, the designated function can be controlled to be turned on, and when the designated function is detected to be turned on, the temperature information of the main board can be obtained. Then, according to the power consumption information and the temperature information, a power consumption log for display is generated. In this way, it is possible to enable the motherboard temperature recording function of the log only when the user needs to record the motherboard temperature information. Further, the power consumption log for a certain period of time can also be exported to realize the temperature query of the motherboard in a specified period of time. The temperature status curve of the motherboard can also be generated, which can conveniently and accurately view the detailed motherboard temperature performance of the electronic equipment in different stages and different scenarios.
  • FIG. 3 shows a schematic flowchart of a method for processing power consumption information according to another embodiment of the present application.
  • the following will elaborate on the process shown in FIG. 3, and the processing method of the power consumption information may specifically include the following steps:
  • Step S310 Obtain power consumption information for the battery power consumption.
  • step S310 can refer to the content of the foregoing embodiment, which will not be repeated here.
  • the electronic device when the electronic device runs a Linux operating system, the electronic device can obtain the power consumption information of the battery through the battery stats service (power statistics service) module.
  • the main function of the battery stats service module is to collect the power consumption of each module and application process in the system.
  • Step S320 Obtain temperature information of the motherboard.
  • step S320 can refer to the content of the foregoing embodiment, and will not be repeated here.
  • the electronic device may include a temperature sensor, and the temperature sensor may be arranged on the main board and far away from the heat source of the main board, so as to obtain a relatively accurate temperature of the main board.
  • the electronic device can use the temperature information sensed by the temperature sensor as the temperature information of the motherboard.
  • the heat source can be all components that can generate heat on the main board, such as high-voltage capacitors, switch tubes, batteries, chips, central processing units, etc., which are not limited here.
  • the heat source can also be a selected component on the main board that is easy to generate heat.
  • the processing method of the power consumption information may further include: controlling the thermal framework through a thermal framework module.
  • the temperature sensor is turned on.
  • the electronic device when the electronic device runs a Linux operating system, the electronic device has a thermal framework module.
  • the thermal framework module is used for resource integration and function realization of the entire temperature control requirement, and it also includes the drivers of various bottom-level temperature sensors, such as the temperature sensor set on the above-mentioned motherboard for detecting the temperature of the motherboard. Therefore, the electronic device can control the temperature sensor to be turned on through the thermal framework module to detect temperature information.
  • the temperature sensor on the motherboard is located in the thermal framework module with the identity of thermal zone (temperature control management zone), and the bottom layer of thermal zone can pass through adc (Analog-to-Digital Converter, analog/digital converter) Way to read the actual temperature value.
  • adc Analog-to-Digital Converter, analog/digital converter
  • the temperature information of the motherboard can be obtained through the corresponding interface of the thermal framework.
  • the electronic device when the electronic device runs the Linux operating system, the electronic device can also obtain the temperature information of the motherboard through the battery stats service module described above.
  • the electronic device can separately establish a local daemon process module that can be executed in the background to periodically obtain the temperature information of the motherboard, and upload the temperature information to the above battery stats service module, so that the electronic device can use the above battery stats service.
  • the module obtains the temperature information of the motherboard.
  • FIG. 4 shows a schematic diagram of a software framework flow chart of a method for processing power consumption information.
  • the temperature sensor in FIG. 4 is an NTC temperature sensor
  • the corresponding temperature control management zone is the ntc_thermal_zone (NTC temperature control management zone) module.
  • NTC temperature control management zone NTC temperature control management zone
  • obtaining the temperature information of the motherboard through the battery stats service module described above may include:
  • the temperature information of the motherboard detected by the temperature control management interval module is read from the sysfs interface through the power native daemon (power local daemon) module at a preset time interval; the power native daemon is received through the system power service (system power service) module The temperature information uploaded by the module; the temperature information uploaded by the system power service module is received through the battery stats service module.
  • power native daemon power local daemon
  • system power service system power service
  • the main function of the power native daemon module is to periodically read the temperature information of the motherboard detected by the temperature control management interval module through the sysfs interface downward, and transmit the temperature information upward to the system power service module.
  • the reading cycle of the power native daemon module can be configured in advance, and the specific cycle value can be set reasonably by relevant personnel according to the specific application environment, which is not limited here.
  • the period value can be set to 3 seconds.
  • the main function of the system power service module is to receive the temperature information uploaded by the power native daemon module, and finally push the information to the battery stats service module.
  • the main function of the batterystats service module is to receive the temperature information uploaded from the system power service module. Therefore, the electronic device can obtain the temperature information of the main board through the battery stats service module.
  • Step S330 Generate a power consumption log for display according to the power consumption information and the temperature information.
  • step S330 can refer to the content of the foregoing embodiment, which will not be repeated here.
  • the electronic device when the electronic device runs the Linux operating system, the electronic device can integrate the power consumption information and the temperature information of the motherboard through the battery stats service module described above, so as to obtain a power consumption log for display.
  • the native Battery stats service module of the Android system has some interfaces, the above-mentioned power consumption information and the temperature information of the motherboard can be recorded and saved through these interfaces, so that when it is used later, it can be directly obtained in the format agreed upon when saving. Power consumption information and temperature information are sufficient.
  • the processing method of the power consumption information may further include:
  • the processing and analysis of power consumption information and temperature information can be to analyze the average power consumption and total power consumption of each module and each application running on the electronic device, or to analyze the temperature trend of the motherboard, or It can be a comparative analysis of the temperature of the motherboard and the temperature of the battery, which is not limited here.
  • the electronic device After the electronic device obtains the processing analysis result, it can determine the power consumption speed and the motherboard temperature based on the processing analysis result. Then the electronic device can clean up the target process in the background when the power consumption speed is greater than the speed threshold and the temperature of the motherboard is greater than the temperature threshold, so as to reduce the power consumption of unnecessary application processes and prolong the use time of the electronic device.
  • to clean up the target process in the background may be to close all the applications in the background, or to close the applications outside the whitelist in the background.
  • the above-mentioned power consumption rate may be related to the power consumption per unit time of the battery, and the electronic device may obtain the power consumption rate in a variety of ways.
  • the electronic device can obtain multiple power consumption per unit time according to the change value of the battery power in the multiple power consumption logs corresponding to a certain time period and the corresponding time change interval, and consume multiple units of time.
  • the average value of power is used as the power consumption rate.
  • the aforementioned speed threshold is the minimum power consumption speed that the power consumption speed needs to meet when the electronic device performs automatic cleaning of the background target process. And when the power consumption rate is greater than the speed threshold, it can be considered that there are more processes currently running, resulting in greater power consumption.
  • the above temperature threshold is the minimum value that the temperature of the main board needs to meet when the electronic device performs automatic cleaning of the background target process. When the temperature of the main board is greater than the temperature threshold, it can be considered that the electronic device is running more processes and generates a lot of heat.
  • the speed threshold and the temperature threshold may be pre-stored in the electronic device and can be set by the user. The specific values of the speed threshold and the temperature threshold are not limited in this application.
  • the above-mentioned power consumption information further includes the remaining power of the battery
  • the processing method of the power consumption information may further include: when the remaining power is less than the power threshold, controlling the temperature sensor to turn off.
  • the power threshold may be the minimum power that the battery needs to meet when the temperature sensor is in the working state. The power threshold can be set by the user and can be pre-stored in the electronic device.
  • step S310 and step S330 in the embodiment of the present application can also be applied to other embodiments.
  • the temperature information of the motherboard detected by the temperature control management interval module can be read from the sysfs interface every preset time, and then the power native daemon module Upload temperature information to the system power service module, and then the system power service module uploads the temperature information to the battery stats service module, so that electronic devices can pass the battery stats service
  • the statistical service) module integrates power consumption information and temperature information, generates power consumption logs for display, and realizes automatic monitoring of motherboard temperature information.
  • FIG. 5 shows a schematic flowchart of a method for processing power consumption information provided by another embodiment of the present application.
  • the following will elaborate on the process shown in FIG. 5, and the processing method of the power consumption information may specifically include the following steps:
  • Step S410 Obtain power consumption information for the battery power consumption.
  • step S410 may refer to the content of the foregoing embodiment, which will not be repeated here.
  • Step S420 Acquire temperature information of the main board when it is detected that the state parameter of the battery has changed.
  • the electronic device may acquire the temperature information of the main board only when the battery status parameter changes and the power consumption information needs to be updated. Due to heat conduction, the temperature of the battery will often change the temperature of the motherboard, and the temperature of the motherboard will often also change the battery temperature. Since the battery temperature change is received and recorded by the native android system, the temperature of the motherboard can be read by this, and there is no need to create an additional thread to obtain the temperature of the motherboard separately. Therefore, it is not necessary to obtain the motherboard temperature in real time, and only obtain the motherboard temperature when the battery status parameter is updated, so as to update the motherboard temperature, and reduce the resource occupation of the CPU (central processing unit, central processing unit) when acquiring the motherboard temperature in real time.
  • CPU central processing unit, central processing unit
  • the state parameters of the battery can be temperature change, power change, charging and non-charging state, and so on.
  • the electronic device when the electronic device runs the Linux operating system, the electronic device can also obtain the temperature information of the motherboard through the battery stats service module described above.
  • the electronic device can obtain the temperature information of the motherboard through the original healthd module.
  • the healthd module detects that the battery status parameter changes, it obtains the temperature information of the motherboard through the healthd module, so that when the healthd module sends the updated battery status parameters to the upper layer, it can also upload the temperature information of the motherboard. Layer sent to update.
  • the main function of the healthd module is to listen to the battery events from the bottom layer, and transmit the battery data information upward to the battery Service module. Then the battery service module pushes the battery data information to the above battery stats service module.
  • the main function of the Battery Service module is to calculate battery power display, remaining power, power level and other information based on the data information of the battery that is passed. Therefore, once the healthd module detects a change in the status parameters of the battery, it will send the battery update information to the battery Service module.
  • the electronic device can use the healthd module to obtain the temperature information of the motherboard at this time, and send the temperature information and the update information of the battery to the Battery Service module, and then the battery service module pushes the temperature information and the update information of the battery to the above The battery stats service module, so that the electronic device can also obtain the temperature information of the motherboard through the above battery stats service module.
  • FIG. 6 shows a schematic diagram of a software framework flow diagram of another method for processing power consumption information.
  • the temperature sensor in FIG. 6 is an NTC temperature sensor
  • the corresponding temperature control management zone is the ntc_thermal_zone (NTC temperature control management zone) module.
  • the electronic device reads the temperature information of the motherboard detected by the temperature control management interval module from the sysfs interface through the healthd module, and then the healthd module uploads the temperature information to the battery service module, and the battery service module receives the temperature information uploaded by the healthd module Then, the temperature information is pushed to the battery stats service module, so that the electronic device can receive the temperature information uploaded by the battery service module through the battery stats service module.
  • Step S430 Generate a power consumption log for display according to the power consumption information and the temperature information.
  • step S430 can refer to the content of the foregoing embodiment, and will not be repeated here.
  • the electronic device when the electronic device runs the Linux operating system, the electronic device can integrate the power consumption information and the temperature information of the motherboard through the battery stats service module described above, so as to obtain a power consumption log for display.
  • step S410 and step S430 in the embodiment of the present application can also be applied to other embodiments.
  • the temperature control management interval module is read from the sysfs interface through the healthd module to detect Then use the healthd module to upload the temperature information and updated battery status parameters to the battery service module, and the battery service module uploads the temperature information to the battery stats service module, so that the electronic equipment can
  • the battery stats service module integrates power consumption information and temperature information to generate power consumption logs for display, so that the temperature of the motherboard is updated only when the battery status parameters change, reducing CPU Resource occupation.
  • FIG. 7 shows a structural block diagram of an apparatus 400 for processing power consumption information according to an embodiment of the present application.
  • the electronic equipment includes a motherboard and a battery.
  • the device 400 for processing power consumption information includes: a power consumption acquisition module 410, a temperature acquisition module 420, and a log generation module 430.
  • the power consumption acquisition module 410 uses To obtain the power consumption information of the battery; the temperature acquisition module 420 is used to obtain temperature information of the motherboard; the log generation module 430 is used to obtain the power consumption information and the temperature information To generate a power consumption log for display.
  • the device 400 for processing power consumption information may further include: an interface display module and a temperature start module.
  • the interface display module is used to display the setting interface of the power consumption log, the setting interface includes a first control, the first control is used to turn on or off a specified function, and the specified function is used to record the temperature of the mainboard in the power consumption log Information; the temperature opening module is used to control the designated function to be turned on when the opening operation of the first control is detected.
  • the temperature acquiring module 420 may be specifically configured to acquire the temperature information of the main board when it is detected that the specified function is turned on.
  • the above-mentioned setting interface may further include a second control for exporting the above-mentioned power consumption log
  • the apparatus 400 for processing power consumption information may further include: a log exporting module.
  • the log export module is configured to export the power consumption log and store the power consumption log when a trigger operation on the second control is detected.
  • the log export module may be specifically used to: obtain the viewing time period of the power consumption log; obtain all the power consumption logs corresponding to the viewing time period; export all the power consumption logs and store all the power consumption logs.
  • the power consumption log is stored.
  • the device 400 for processing power consumption information may further include: a webpage generation module.
  • the webpage generating module is used for generating webpage information corresponding to the power consumption log, and displaying the webpage information in the form of a webpage interface.
  • the device 400 for processing power consumption information may further include: a time acquisition module and a curve generation module.
  • the time acquisition module is configured to acquire multiple time stamps in the power consumption log, where the time stamp is the time node corresponding to the time when the temperature information is acquired;
  • the temperature information corresponding to the multiple time stamps generates a temperature state curve of the main board, and the temperature state curve is used to characterize the state change track of the temperature of the main board.
  • the webpage generating module may be specifically configured to generate webpage information corresponding to the temperature state curve, and display the temperature state curve in the form of a webpage interface.
  • the device 400 for processing power consumption information may further include a log sending module.
  • the log sending module is configured to send the power consumption log to a terminal device, and the terminal device is used to generate web page information according to the power consumption log, and the web page information is used by the terminal device to display the power consumption in the form of a web interface. Log.
  • the above-mentioned setting interface may further include a third control for triggering the function of clearing the power consumption log
  • the power consumption information processing device 400 may further include: a log clearing module.
  • the log clearing module is used for clearing the generated power consumption log when a trigger operation on the third control is detected.
  • the temperature acquiring module 420 may be specifically configured to acquire temperature information of the main board when it is detected that the state parameter of the battery changes.
  • the above-mentioned electronic device may further include a temperature sensor, which is arranged on the main board and far away from the heat source position of the main board, and the temperature acquisition module 420 may be specifically configured to: obtain information detected by the temperature sensor.
  • the temperature information is used as the temperature information of the motherboard.
  • the device 400 for processing power consumption information may further include a sensor activation module.
  • the sensor activation module is used to control the activation of the temperature sensor through a thermal framework module.
  • the above-mentioned power consumption information may include the remaining power of the battery, and the device 400 for processing the power consumption information may further include: a sensor shutdown module.
  • the sensor shutdown module is used to control the temperature sensor to shut down when the remaining power is less than the power threshold.
  • the power consumption obtaining module 410 may be specifically configured to obtain power consumption information on the battery power consumption through a battery stats service (power statistics service) module.
  • the temperature obtaining module 420 may be specifically configured to obtain the temperature information of the motherboard through the battery stats service module.
  • the power consumption acquisition module 410 acquires the power consumption information of the battery power consumption through the battery stats service module, which may include: through the power native daemon (power local daemon) module every scheduled time. Set the length of time to read the temperature information of the motherboard detected by the temperature control management interval module from the sysfs interface; receive the temperature information uploaded by the power native daemon module through the system power service module; use the battery stats service The module receives the temperature information uploaded by the system power service module.
  • the battery stats service module may include: through the power native daemon (power local daemon) module every scheduled time. Set the length of time to read the temperature information of the motherboard detected by the temperature control management interval module from the sysfs interface; receive the temperature information uploaded by the power native daemon module through the system power service module; use the battery stats service The module receives the temperature information uploaded by the system power service module.
  • the log generation module 430 may be specifically configured to integrate the power consumption information and the temperature information through the battery stats service module to obtain a power consumption log for display.
  • the device 400 for processing power consumption information may further include: an analysis and processing module and a process cleaning module.
  • the analysis processing module is configured to process and analyze the power consumption information and the temperature information according to the power consumption log to obtain a processing analysis result;
  • the process cleaning module is configured to determine that the power consumption rate is greater than When the speed threshold and the temperature of the motherboard are greater than the temperature threshold, the target process in the background is cleaned up.
  • the coupling between the modules may be electrical, mechanical or other forms of coupling.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software function modules.
  • the solution provided by this application obtains power consumption information on battery power consumption and obtains temperature information of the motherboard to generate power consumption logs for display based on the power consumption information and the temperature information , So as to realize the integration of the temperature information of the motherboard into the battery power consumption log, so that the heating status of the electronic device can be obtained directly from the power consumption log, without the need to create a separate log for recording, reducing the staff's development time for software programs , It also improves the convenience and comprehensiveness of information acquisition.
  • the real-time recording of the temperature information of the motherboard through the power consumption log can provide important data support and optimization directions for the power consumption analysis and judgment of market end users, and lay the foundation for the improvement of power consumption.
  • the electronic device 100 may be an electronic device capable of running application programs, such as a notebook, a PC computer, or a mobile terminal.
  • the electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, a battery (not shown), a motherboard (not shown), and one or more applications, of which one or more applications
  • the program may be stored in the memory 120 and configured to be executed by one or more processors 110, and one or more application programs are configured to execute the method described in the foregoing method embodiment.
  • the processor 110 may include one or more processing cores.
  • the processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120.
  • Various functions and processing data of the electronic device 100 may use at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 110 may be integrated with one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like.
  • the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
  • the memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 120 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions used to implement the following various method embodiments, etc.
  • the data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
  • FIG. 9 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 800 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
  • the computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 800 has storage space for the program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products.
  • the program code 810 may be compressed in a suitable form, for example.

Abstract

The present application discloses a power consumption information processing method, device, an electronic apparatus and a storage medium, which are applied to the electronic apparatus, the electronic apparatus includes a mainboard and a battery, the power consumption information processing method includes: acquiring the power consumption information for the battery power consumption; acquiring the temperature information of the mainboard; generating the power consumption log for display according to the power consumption information and the temperature information. This method can obtain the temperature information of the mainboard through the power consumption log.

Description

耗电信息的处理方法、装置、电子设备及存储介质Power consumption information processing method, device, electronic equipment and storage medium 技术领域Technical field
本申请涉及计算机技术领域,更具体地,涉及一种耗电信息的处理方法、装置、电子设备及存储介质。This application relates to the field of computer technology, and more specifically, to a method, device, electronic device, and storage medium for processing power consumption information.
背景技术Background technique
随着信息时代的日益发展,用户使用移动终端、笔记本等电子设备的频率逐渐增加,导致电子设备的使用时间逐渐延长。而在电子设备的使用过程中,随着应用的增多,也随着使用时间逐渐增加,导致电子设备也会慢慢发热。由于电子设备发热量的增加会严重影响电子设备的性能,因此,对电子设备的发热情况的监测就显得尤为重要。With the increasing development of the information age, the frequency that users use electronic devices such as mobile terminals and notebooks has gradually increased, resulting in the gradual extension of the use time of electronic devices. In the process of using electronic equipment, as the number of applications increases and the time of use gradually increases, the electronic equipment will gradually heat up. Since the increase in the heat generation of the electronic equipment will seriously affect the performance of the electronic equipment, it is particularly important to monitor the heat generation of the electronic equipment.
发明内容Summary of the invention
鉴于上述问题,本申请提出了一种耗电信息的处理方法、装置、电子设备及存储介质。In view of the foregoing problems, this application proposes a method, device, electronic device, and storage medium for processing power consumption information.
第一方面,本申请实施例提供了一种耗电信息的处理方法,应用于电子设备,所述电子设备包括主板以及电池,所述方法包括:获取对所述电池耗电的耗电信息;获取所述主板的温度信息;根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志。In the first aspect, an embodiment of the present application provides a method for processing power consumption information, which is applied to an electronic device, the electronic device includes a main board and a battery, and the method includes: obtaining power consumption information for the battery; Acquire temperature information of the motherboard; generate a power consumption log for display according to the power consumption information and the temperature information.
第二方面,本申请实施例提供了一种耗电信息的处理装置,应用于电子设备,所述电子设备包括主板以及电池,所述装置包括:耗电获取模块、温度获取模块以及日志生成模块,其中,所述耗电获取模块,用于获取对所述电池耗电的耗电信息;所述温度获取模块,用于获取所述主板的温度信息;所述日志生成模块,用于根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志。In a second aspect, an embodiment of the present application provides a device for processing power consumption information, which is applied to an electronic device. The electronic device includes a motherboard and a battery. The device includes: a power consumption acquisition module, a temperature acquisition module, and a log generation module , Wherein the power consumption acquisition module is configured to acquire power consumption information for the battery; the temperature acquisition module is configured to acquire temperature information of the main board; and the log generation module is configured to The power consumption information and the temperature information are used to generate a power consumption log for display.
第三方面,本申请实施例提供了一种电子设备,包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行上述第一方面提供的耗电信息的处理方法。In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and It is configured to be executed by the one or more processors, and the one or more application programs are configured to execute the power consumption information processing method provided in the first aspect described above.
第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述第一方面提供的耗电信息的处理方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, and the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the power consumption provided in the first aspect. The processing method of electric information.
本申请提供的方案,通过获取对电池耗电的耗电信息,以及获取主板的温度信息,以根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志,从而实现将主板的温度信息整合到电池的耗电日志中,使得可以 直接从耗电日志中得到电子设备的发热状态,便于用户查看和分析电子设备的状态。The solution provided by this application obtains the power consumption information of the battery power consumption and the temperature information of the main board to generate the power consumption log for display according to the power consumption information and the temperature information, so as to realize the main board The temperature information is integrated into the battery power consumption log, so that the heating status of the electronic device can be obtained directly from the power consumption log, which is convenient for users to view and analyze the status of the electronic device.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings that need to be used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
图1示出了根据本申请一个实施例的耗电信息的处理方法流程图。Fig. 1 shows a flowchart of a method for processing power consumption information according to an embodiment of the present application.
图2示出了根据本申请另一个实施例的耗电信息的处理方法流程图。Fig. 2 shows a flowchart of a method for processing power consumption information according to another embodiment of the present application.
图3示出了根据本申请又一个实施例的耗电信息的处理方法流程图。Fig. 3 shows a flowchart of a method for processing power consumption information according to another embodiment of the present application.
图4示出了一种耗电信息处理方法的软件框架流程示意图。Figure 4 shows a schematic diagram of a software framework flow diagram of a method for processing power consumption information.
图5示出了根据本申请再一个实施例的耗电信息的处理方法流程图。Fig. 5 shows a flowchart of a method for processing power consumption information according to still another embodiment of the present application.
图6示出了另一种耗电信息处理方法的软件框架流程示意图。Fig. 6 shows a schematic diagram of the software framework flow diagram of another method for processing power consumption information.
图7示出了根据本申请一个实施例的耗电信息的处理装置的一种框图。Fig. 7 shows a block diagram of an apparatus for processing power consumption information according to an embodiment of the present application.
图8是本申请实施例的用于执行根据本申请实施例的耗电信息的处理方法的电子设备的框图。FIG. 8 is a block diagram of an electronic device for executing the method for processing power consumption information according to an embodiment of the present application according to an embodiment of the present application.
图9是本申请实施例的用于保存或者携带实现根据本申请实施例的耗电信息的处理方法的程序代码的存储单元。Fig. 9 is a storage unit for storing or carrying program code for implementing the method for processing power consumption information according to the embodiment of the present application according to an embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application.
随着移动终端、笔记本等电子设备的使用越来越广泛,电子设备的使用体验越来越受到人们的重视。如果电子设备在使用过程中发热情况严重,会导致用户对使用体验的使用体验的下降。因此,需要对电子设备的发热情况进行监测,以便于后续分析处理和优化。With the increasing use of electronic devices such as mobile terminals and notebooks, the experience of using electronic devices has attracted more and more attention. If the electronic device heats up severely during use, it will lead to a decrease in the user experience of the user experience. Therefore, it is necessary to monitor the heating condition of the electronic equipment to facilitate subsequent analysis, processing and optimization.
在传统的技术中,通常是根据电池温度来确定电子设备的发热情况,电池的温度过高就判定为电子设备发热严重。In the traditional technology, the heating condition of the electronic device is usually determined based on the battery temperature. If the temperature of the battery is too high, it is determined that the electronic device has a serious heating condition.
然而,发明人经过测量验证发现,电池温度在某些场景下与电子设备的外壳温度存在一定的偏差,无法真实的反应用户的实际感受,并不能真实表达电子设备实际的发热情况。However, the inventor found through measurement verification that the battery temperature has a certain deviation from the housing temperature of the electronic device in certain scenarios, which cannot truly reflect the actual feelings of the user, and cannot truly express the actual heating of the electronic device.
针对上述问题,发明人提出了本申请实施例提供的耗电信息的处理方法、装置、电子设备以及存储介质,通过获取对电池耗电的耗电信息,以及获取主板的温度信息,以根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志。这样,通过主板温度可以较为准确地确定电子设备的发热情况,同时也实现了将主板的温度信息整合到电池的耗电日志中,使得可以直接从耗电日志中得到电子设备的发热状态,便于查看和分析耗电日志,获知电子设备的状态。其中,具体的耗电信息的处理方法在后续的 实施例中进行详细的说明。In response to the above-mentioned problems, the inventor proposes the power consumption information processing method, device, electronic device, and storage medium provided by the embodiments of the present application. The power consumption information and the temperature information are used to generate a power consumption log for display. In this way, the heating status of the electronic device can be determined more accurately through the temperature of the main board, and the temperature information of the main board can be integrated into the battery power consumption log, so that the heating status of the electronic device can be directly obtained from the power consumption log, which is convenient View and analyze the power consumption log to get the status of electronic equipment. Among them, the specific power consumption information processing method will be described in detail in the subsequent embodiments.
请参阅图1,图1示出了本申请一个实施例提供的耗电信息的处理方法的流程示意图。所述耗电信息的处理方法用于实现从耗电日志中得到电子设备的发热状态。在具体的实施例中,所述耗电信息的处理方法应用于如图7所示的耗电信息的处理装置400以及配置有所述耗电信息的处理装置400的电子设备100(图8)。该电子设备包括主板以及电池。下面将以电子设备为例,说明本实施例的具体流程,当然,可以理解的,本实施例所应用的电子设备可以为移动终端、笔记本等,在此不做限定。下面将针对图1所示的流程进行详细的阐述,所述耗电信息的处理方法具体可以包括以下步骤:Please refer to FIG. 1, which shows a schematic flowchart of a method for processing power consumption information according to an embodiment of the present application. The power consumption information processing method is used to obtain the heating status of the electronic device from the power consumption log. In a specific embodiment, the power consumption information processing method is applied to the power consumption information processing device 400 as shown in FIG. 7 and the electronic equipment 100 equipped with the power consumption information processing device 400 (FIG. 8) . The electronic device includes a motherboard and a battery. The following will take an electronic device as an example to describe the specific process of this embodiment. Of course, it is understandable that the electronic device applied in this embodiment may be a mobile terminal, a notebook, etc., which is not limited herein. The process shown in FIG. 1 will be described in detail below, and the processing method of the power consumption information may specifically include the following steps:
步骤S110:获取对所述电池耗电的耗电信息。Step S110: Obtain power consumption information for the battery power consumption.
在本申请实施例中,电子设备可以对电池的耗电情况进行监测,以实时获取对电池耗电的耗电信息。该耗电信息可以来源多个不同的耗电源。其中,耗电源可以为显示屏、蓝牙、射频等硬件模块,也可以是软件层面的应用程序(如游戏、视频类应用)等,在此不做限定。该耗电信息也可以是不同类型的信息。例如,可以是某个应用程序的运行时间(如亮屏时间),也可以是某个应用程序的耗电值(如亮屏耗电值),在此不做限定。由于耗电信息随着时间推移是在发生变化的,因此需要对电池耗电的耗电信息不断进行更新,以使耗电信息能与电池最新的状态匹配,从而能根据最新的耗电信息进行对应的处理(如进入省电模式)。当然,以上耗电信息仅为举例,并不代表对具体的耗电信息的限定。In the embodiment of the present application, the electronic device may monitor the power consumption of the battery to obtain the power consumption information of the battery in real time. The power consumption information can come from multiple different power consumption sources. Among them, the power consumption can be hardware modules such as display screen, Bluetooth, radio frequency, etc., or can be software-level applications (such as games, video applications), etc., which are not limited here. The power consumption information may also be different types of information. For example, it can be the running time of a certain application (such as the screen on time), or it can be the power consumption value of a certain application (such as the power consumption value of the bright screen), which is not limited here. As the power consumption information changes over time, it is necessary to continuously update the power consumption information of the battery power consumption so that the power consumption information can match the latest state of the battery, so that it can be based on the latest power consumption information. Corresponding processing (such as entering the power saving mode). Of course, the above power consumption information is only an example, and does not represent a limitation on the specific power consumption information.
在一些实施方式中,电子设备可以定时或者不定时地获取多个不同的耗电源对应的待进行更新的耗电信息。例如,电子设备可以按照预设间隔从多个耗电源获取待进行更新的耗电信息,又例如,电子设备可以实时地从多个耗电源获取待进行更新的耗电信息。在另一些实施方式中,电子设备也可以根据用户输入的指令,直接获取当前时刻多个耗电源对电池耗电的耗电信息。In some embodiments, the electronic device may periodically or irregularly obtain the power consumption information to be updated corresponding to multiple different power consumption sources. For example, the electronic device may obtain the power consumption information to be updated from multiple power consumption sources at preset intervals. For another example, the electronic device may obtain the power consumption information to be updated from the multiple power consumption sources in real time. In some other implementation manners, the electronic device may also directly obtain the power consumption information of the battery power consumption by multiple power consumption sources at the current moment according to the instructions input by the user.
步骤S120:获取所述主板的温度信息。Step S120: Obtain temperature information of the motherboard.
在本申请实施例中,为贴近用户实际感受到的电子设备的发热情况,电子设备可以获取电子设备的主板的温度信息,从而通过主板的温度信息可以较为准确地确定电子设备的发热情况。其中,主板可以理解为电子设备的中心或者主电路板。In the embodiment of the present application, in order to get close to the heating condition of the electronic device actually felt by the user, the electronic device can obtain the temperature information of the main board of the electronic device, so that the heating condition of the electronic device can be more accurately determined through the temperature information of the main board. Among them, the main board can be understood as the center or main circuit board of an electronic device.
在一些实施方式中,电子设备的主板上可设有温度传感器,电子设备可以获取温度传感器感应到的温度信息,作为主板的温度信息。需要说明的是,温度传感器的类型在本申请实施例中并不作限定。例如,可以是NTC(Negative Temperature Coefficient,负温度系数)温度传感器。In some embodiments, the main board of the electronic device may be provided with a temperature sensor, and the electronic device may obtain the temperature information sensed by the temperature sensor as the temperature information of the main board. It should be noted that the type of temperature sensor is not limited in the embodiment of the present application. For example, it may be an NTC (Negative Temperature Coefficient, negative temperature coefficient) temperature sensor.
步骤S130:根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志。Step S130: Generate a power consumption log for display according to the power consumption information and the temperature information.
在本申请实施例中,电子设备在得到耗电信息以及温度信息之后,可 以根据耗电信息以及温度信息,生成用于展示的耗电日志。也就是说,电子设备在得到耗电信息以及主板的温度信息之后,可以以日志的形式记录该温度信息和耗电信息,得到耗电日志。从而相关人员可以根据该耗电日志,对上述电子设备进行耗电分析以及主板的温度分析。In the embodiment of the present application, after obtaining the power consumption information and temperature information, the electronic device can generate a power consumption log for display based on the power consumption information and temperature information. In other words, after the electronic device obtains the power consumption information and the temperature information of the main board, it can record the temperature information and power consumption information in the form of a log to obtain the power consumption log. Therefore, relevant personnel can perform power consumption analysis of the above-mentioned electronic equipment and temperature analysis of the main board according to the power consumption log.
在一些实施方式中,当电子设备仅获取到耗电信息时,也可以以日志的形式记录该耗电信息,得到耗电日志。当电子设备仅获取到温度信息时,也可以以日志的形式记录该耗电信息,得到耗电日志。作为一种实施方式,可根据用户的需求确定耗电日志记录的信息。例如,当用户不需要了解主板温度时,电子设备可以仅将耗电信息记录到耗电日志中。In some embodiments, when the electronic device only obtains power consumption information, the power consumption information may also be recorded in the form of a log to obtain a power consumption log. When the electronic device only obtains temperature information, the power consumption information may also be recorded in the form of a log to obtain a power consumption log. As an implementation manner, the information recorded in the power consumption log may be determined according to the needs of the user. For example, when the user does not need to know the temperature of the motherboard, the electronic device may only record the power consumption information in the power consumption log.
在一些实施方式中,生成的耗电日志可以根据用户的需求确定是否进行展示,也可以根据用户的需求确定需要展示的具体信息。例如,当检测到对温度信息的查询指令时,可以将耗电日志中的温度信息进行显示。In some embodiments, the generated power consumption log can be determined according to the needs of the user whether to display, or the specific information that needs to be displayed can also be determined according to the needs of the user. For example, when a query command for temperature information is detected, the temperature information in the power consumption log can be displayed.
本申请实施例提供的耗电信息的处理方法,通过获取对电池耗电的耗电信息,以及获取主板的温度信息,以根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志,从而实现将主板的温度信息整合到电池的耗电日志中,使得可以直接从耗电日志中得到电子设备的发热状态,而无需另建日志进行记录,减少了工作人员对软件程序的开发时间,也提升了信息获取的方便快捷性和全面性。并且,通过耗电日志对主板的温度信息的实时记录,可以对市场终端用户的功耗分析和判断提供重要的数据支撑与优化方向,为功耗的改善奠定基础。The method for processing power consumption information provided by the embodiments of the present application obtains power consumption information on battery power consumption and obtains temperature information of a main board to generate power consumption information for display according to the power consumption information and the temperature information. Power log, so as to integrate the temperature information of the motherboard into the power consumption log of the battery, so that the heating status of the electronic device can be obtained directly from the power consumption log, without the need to build a log for recording, reducing the staff’s need for software programs Development time has also improved the convenience and comprehensiveness of information acquisition. In addition, the real-time recording of the temperature information of the motherboard through the power consumption log can provide important data support and optimization directions for the power consumption analysis and judgment of market end users, and lay the foundation for the improvement of power consumption.
请参阅图2,图2示出了本申请另一个实施例提供的耗电信息的处理方法的流程示意图。下面将针对图2所示的流程进行详细的阐述,所述耗电信息的处理方法具体可以包括以下步骤:Please refer to FIG. 2, which shows a schematic flowchart of a method for processing power consumption information according to another embodiment of the present application. The process shown in FIG. 2 will be described in detail below, and the processing method of the power consumption information may specifically include the following steps:
步骤S210:显示耗电日志的设置界面,所述设置界面包括第一控件,所述第一控件用于开启或者关闭指定功能,所述指定功能用于在耗电日志中记录主板的温度信息。Step S210: Display a setting interface of the power consumption log, the setting interface includes a first control, the first control is used to turn on or off a designated function, and the designated function is used to record the temperature information of the main board in the power consumption log.
在一些实施方式中,通常情况下电子设备并不会将主板的温度信息记录在耗电日志中,当用户需要电子设备的耗电日志记录主板的温度信息时,可以主动触发电子设备对主板温度的记录。作为一种实施方式,电子设备可以显示有耗电日志的设置界面,用户可根据该设置界面,选择自身需要的对耗电日志的至少一种功能,例如,对主板温度的记录。In some embodiments, the electronic device generally does not record the temperature information of the motherboard in the power consumption log. When the user needs the power consumption log of the electronic device to record the temperature information of the motherboard, the electronic device can actively trigger the temperature information of the motherboard. record of. As an implementation manner, the electronic device may display a setting interface of the power consumption log, and the user can select at least one function of the power consumption log required by the user according to the setting interface, for example, recording the temperature of the mainboard.
具体地,该设置界面可包括第一控件,该第一控件可用于开启或者关闭指定功能,该指定功能用于在耗电日志中记录主板的温度信息。从而,用户可根据自身需求确定是否在耗电日志的设置界面开启该指定功能。其中,第一控件指的是可以通过触控操作触发的控件,可以是文本控件,也可以是图片控件,还可以是按钮控件,在此并不作限定。电子设备可根据用户对第一控件的触控操作,确定是开启还是关闭上述指定功能。例如,电子设备可根据当用户对第一控件的第一次点击操作,确定开启指定功能,可根据当用户对第一控件的第二次点击操作,确定关闭指定功能。Specifically, the setting interface may include a first control, and the first control may be used to turn on or turn off a designated function, and the designated function is used to record the temperature information of the mainboard in the power consumption log. Therefore, the user can determine whether to enable the specified function in the setting interface of the power consumption log according to their own needs. Among them, the first control refers to a control that can be triggered by a touch operation, and can be a text control, a picture control, or a button control, which is not limited here. The electronic device can determine whether to turn on or turn off the specified function according to the user's touch operation on the first control. For example, the electronic device may determine to turn on the designated function according to when the user clicks on the first control for the first time, and may determine to turn off the designated function according to when the user clicks on the first control for the second time.
在一些实施方式中,上述第一控件在设置界面中可以按照如下路径设置:“设置”-->“电池”-->“日志”-->“ntc温度”,其中,“ntc温度”为第一控件的控件名称,用户可以对“ntc温度”控件进行点击选取等触控操作,从而完成对指定功能的开启或关闭。需要说明的是,上述控件名称仅为举例,在本申请中并不作限定。In some embodiments, the above-mentioned first control can be set in the setting interface according to the following path: "Settings" --> "Battery" --> "Log" --> "ntc temperature", where "ntc temperature" is The control name of the first control, the user can click and select the "ntc temperature" control and other touch operations to complete the opening or closing of the specified function. It should be noted that the aforementioned control names are only examples, and are not limited in this application.
步骤S220:当检测到对所述第一控件的开启操作时,控制所述指定功能开启。Step S220: When an opening operation on the first control is detected, control the designated function to be turned on.
在本申请实施例中,电子设备在检测到用户对上述第一控件的开启操作,可以控制上述指定功能开启,即记录主板的温度信息并记录到耗电日志中。当检测到对所述第一控件的关闭操作,电子设备可以控制上述指定功能关闭,即停止对主板温度信息的纪录。In the embodiment of the present application, when the electronic device detects the user's opening operation of the above-mentioned first control, it can control the opening of the above-mentioned designated function, that is, record the temperature information of the mainboard and record it in the power consumption log. When the closing operation of the first control is detected, the electronic device can control the above specified function to be closed, that is, stop recording the temperature information of the main board.
在一些实施方式中,对第一控件的开启操作和关闭操作的区分,可以根据第一控件的点击次数进行区分,也可以根据对第一控件的左右滑动方向进行区分,在此不做限定。In some embodiments, the opening operation and closing operation of the first control can be distinguished according to the number of clicks of the first control, or can be distinguished according to the left and right sliding direction of the first control, which is not limited here.
在一些实施方式中,电子设备也可以是在获取到指定命令行时,控制上述指定功能开启。其中,指定命令行可以是对电子设备运行的操作系统进行管理的输入命令,可由用户进行输入。指定命令行的内容可根据具体的应用环境进行合理设定,具体的指定命令行的内容在本申请实施例中并不作限定。例如,以Linux系统为例,装载Linux系统的电子设备中,指定命令行可以是"adb shell dumpsys batterystats--enable-ntc"命令,其中,ntc为温度传感器。In some embodiments, the electronic device may also control the above-mentioned designated function to be turned on when the designated command line is obtained. Wherein, the designated command line may be an input command for managing the operating system running on the electronic device, and may be input by the user. The content of the designated command line can be reasonably set according to the specific application environment, and the content of the specific designated command line is not limited in the embodiments of the present application. For example, taking the Linux system as an example, in an electronic device that loads the Linux system, the designated command line can be the "adb shell dumpsys batterystats--enable-ntc" command, where ntc is the temperature sensor.
步骤S230:获取对所述电池耗电的耗电信息。Step S230: Obtain power consumption information for the battery power consumption.
步骤S240:当检测到所述指定功能开启时,获取所述主板的温度信息。Step S240: Acquire temperature information of the motherboard when it is detected that the designated function is turned on.
步骤S250:根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志。Step S250: Generate a power consumption log for display according to the power consumption information and the temperature information.
在本申请实施例中,步骤S230、步骤S240以及步骤S250可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, step S230, step S240, and step S250 can refer to the content of the foregoing embodiment, and will not be repeated here.
在一些实施方式中,当用户需要查看耗电日志时,可以将该耗电日志进行导出。具体地,上述设置界面还可以包括第二控件,该第二控件用于导出所述耗电日志,在上述根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志之后,耗电信息的处理方法还可以包括:当检测到对所述第二控件的触发操作时,导出所述耗电日志并将所述耗电日志进行存储。其中,触发操作可以是对第二控件的点击操作。In some embodiments, when the user needs to view the power consumption log, the power consumption log may be exported. Specifically, the above setting interface may further include a second control for exporting the power consumption log. After the power consumption log for display is generated according to the power consumption information and the temperature information, The method for processing power consumption information may further include: when a trigger operation on the second control is detected, exporting the power consumption log and storing the power consumption log. Wherein, the trigger operation may be a click operation on the second control.
在一些实施方式中,上述第二控件在设置界面中可以按照如下路径设置:“设置”-->“电池”-->“日志”-->“日志导出”,其中,“日志导出”为第二控件的控件名称。需要说明的是,上述控件名称仅为举例,在本申请中并不作限定。以Linux系统为例,装载Linux系统的电子设备中,当用户点击“日志导出”控件时,电子设备则会执行"dumpsys batterystats"命令,得到耗电日志。同时电子设备可将该耗电日志以默认的文件格式导出 并存储在预设的存储路径或指定的存储路径中,从而用户可以从相应存储路径中查看到该耗电日志,并可通过在电子设备本地或其它设备上解析该耗电日志,以便基于该耗电日志对上述电子设备进行耗电分析、主板温度分析等。例如,电子设备为移动终端时,其他设备可以是PC(Personal Computer,个人计算机)端,用户可以将移动终端保存的耗电日志文件拷贝到PC端,使用PC端的工具“日志分析”进行处理(生成网页文件)。In some implementations, the above-mentioned second control can be set in the setting interface according to the following path: "Settings" --> "Battery" --> "Log" --> "Log Export", where "Log Export" is The control name of the second control. It should be noted that the aforementioned control names are only examples, and are not limited in this application. Taking the Linux system as an example, when the user clicks the "Log Export" control in the electronic device loaded with the Linux system, the electronic device will execute the "dumpsys batterystats" command to get the power consumption log. At the same time, the electronic device can export the power consumption log in the default file format and store it in the preset storage path or the designated storage path, so that the user can view the power consumption log from the corresponding storage path, and use the electronic The power consumption log is parsed locally on the device or on other devices, so as to perform power consumption analysis, mainboard temperature analysis, etc. of the above-mentioned electronic equipment based on the power consumption log. For example, when the electronic device is a mobile terminal, the other device can be a PC (Personal Computer), and the user can copy the power consumption log file saved by the mobile terminal to the PC, and use the tool "log analysis" on the PC for processing ( Generate web page files).
在一些实施方式中,电子设备将耗电日志导出前,可以将日志文件的文件名对用户进行提示。该文件名默认情况下为当前的系统时间,以便可以直接根据文件名,确定需要查看的时间段对应的耗电日志。例如,文件名为20170504221015.txt的日志文件,存储时对应的当前的系统时间2017年5月4日22点10分15秒。用户也可更改该文件名,在此并不作限定。In some embodiments, before the electronic device exports the power consumption log, the user may be prompted with the file name of the log file. The file name is the current system time by default, so that the power consumption log corresponding to the time period that needs to be viewed can be determined directly based on the file name. For example, the log file with the file name 20170504221015.txt corresponds to the current system time at 22:10:15 on May 4th, 2017. The user can also change the file name, which is not limited here.
在一些实施方式中,电子设备也可以根据用户选择的时间段范围导出对应的耗电日志。具体地,上述导出所述耗电日志并将所述耗电日志进行存储,可以包括:获取所述耗电日志的查看时间段;获取所述查看时间段对应的所有耗电日志;导出所述所有耗电日志并将所述所有耗电日志进行存储。In some embodiments, the electronic device may also derive the corresponding power consumption log according to the time period range selected by the user. Specifically, exporting the power consumption log and storing the power consumption log may include: obtaining a viewing time period of the power consumption log; obtaining all power consumption logs corresponding to the viewing time period; and deriving the power consumption log. All power consumption logs and store all the power consumption logs.
作为一种方式,电子设备将耗电日志导出前,可以对时间选择选项进行显示。电子设备可根据用户具体选择的查看的起始时间和结束时间,确定耗电日志的查看时间段,然后获取该查看时间段对应的所有耗电日志,并进行导出。从而可以使用户查看到所需的时间段内对应的主板温度和耗电信息。As a way, the electronic device may display the time selection option before exporting the power consumption log. The electronic device may determine the viewing time period of the power consumption log according to the viewing start time and end time specifically selected by the user, and then obtain and export all power consumption logs corresponding to the viewing time period. In this way, the user can view the corresponding motherboard temperature and power consumption information within the required time period.
在一些实施方式中,在上述导出所述耗电日志并将所述耗电日志进行存储之后,耗电信息的处理方法还可以包括:生成与所述耗电日志对应的网页信息,并通过网页界面的形式展示所述网页信息。从而可以以网页界面的形状展现耗电日志中的主板温度信息。在一些实施方式中,网页信息对应的文件格式可以是多种,例如,htm、html、asp、php等格式的网页文件等,在此并不作限定。In some embodiments, after the power consumption log is exported and stored, the power consumption information processing method may further include: generating webpage information corresponding to the power consumption log, and using the webpage The web page information is displayed in the form of an interface. Therefore, the motherboard temperature information in the power consumption log can be displayed in the shape of a web page interface. In some embodiments, the file format corresponding to the webpage information may be multiple, for example, webpage files in htm, html, asp, php and other formats, which are not limited here.
在一些实施方式中,上述网页信息可以包括主板的温度变化曲线,从而可以曲线的形式表达电子设备的主板温度情况(如温度的高低、走向趋势等)。因此,在所述生成与所述耗电日志对应的网页信息,并通过网页界面的形式展示所述网页信息之前,耗电信息的处理方法还可以包括:In some embodiments, the above-mentioned webpage information may include a temperature change curve of the main board, so that the temperature of the main board of the electronic device (such as temperature, trend, etc.) can be expressed in the form of a curve. Therefore, before generating the web page information corresponding to the power consumption log and displaying the web page information in the form of a web interface, the power consumption information processing method may further include:
获取所述耗电日志中的多个时间戳,所述时间戳为获取到所述温度信息时对应的时间节点;根据所述多个时间戳以及所述多个时间戳对应的所述温度信息,生成所述主板的温度状态曲线,所述温度状态曲线用于表征所述主板的温度的状态变化轨迹;所述生成与所述耗电日志对应的网页信息,并通过网页界面的形式展示所述网页信息,包括:生成与所述温度状态曲线对应的网页信息,并通过网页界面的形式展示所述温度状态曲线。从而能够方便、准确地查看电子设备在不同阶段、不同场景下详细的主板温度表现。Acquire multiple time stamps in the power consumption log, where the time stamp is the time node corresponding to when the temperature information is acquired; according to the multiple time stamps and the temperature information corresponding to the multiple time stamps , Generating a temperature state curve of the main board, the temperature state curve being used to characterize the state change track of the temperature of the main board; the generating web page information corresponding to the power consumption log, and displaying all information in the form of a web interface The web page information includes: generating web page information corresponding to the temperature state curve, and displaying the temperature state curve in the form of a web page interface. Therefore, it is possible to conveniently and accurately view the detailed motherboard temperature performance of the electronic device in different stages and different scenarios.
作为一种方式,电子设备在获取到耗电日志中的多个温度信息对应的时间戳后,可以在时间轴上将时间戳以时间先后顺序进行排列,并将与每个时间戳对应的每个温度信息用线条进行连接,从而生成主板的温度状态曲线。其中,线条的类型可以是多种,例如,折线、圆滑曲线、虚线、实线等。电子设备在生成温度状态曲线后,可以生成与温度状态曲线对应的网页信息,以网页界面的形式形象直观地展示该温度状态曲线。进一步地,生成的网页信息也可以通过超链接进行网络分享。As a way, after the electronic device obtains the time stamps corresponding to the multiple temperature information in the power consumption log, it can arrange the time stamps in chronological order on the time axis, and arrange each time stamp corresponding to each time stamp. The temperature information is connected with lines to generate the temperature state curve of the motherboard. Among them, the types of lines can be multiple, for example, broken lines, smooth curves, dashed lines, solid lines, and so on. After the electronic device generates the temperature state curve, it can generate web page information corresponding to the temperature state curve, and visually and intuitively display the temperature state curve in the form of a web interface. Further, the generated web page information can also be shared online through hyperlinks.
在一些实施方式中,电子设备也可以将耗电日志发送至其他设备,由其他设备进行主板温度的分析。具体地,在所述导出所述耗电日志并将所述耗电日志进行存储之后,耗电信息的处理方法还可以包括:将所述耗电日志发送至终端设备,所述终端设备用于根据所述耗电日志生成网页信息,所述网页信息用于终端设备以网页界面的形式展示所述耗电日志。其中,终端设备可以是PC,也可以是其他可以进行日志分析的设备。In some embodiments, the electronic device may also send the power consumption log to other devices, and the other devices can analyze the temperature of the motherboard. Specifically, after exporting the power consumption log and storing the power consumption log, the method for processing power consumption information may further include: sending the power consumption log to a terminal device, where the terminal device is used for Generate web page information according to the power consumption log, and the web page information is used by the terminal device to display the power consumption log in the form of a web interface. Among them, the terminal device can be a PC or other devices that can perform log analysis.
在一些实施方式中,电子设备还可以根据用户输入的指令,删除耗电日志。作为一种方式,上述设置界面还可以包括第三控件,该第三控件用于触发清除耗电日志的功能,在所述根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志之后,所述方法还包括:当检测到对所述第三控件的触发操作时,对生成的耗电日志进行清除。从而,可以按照用户的需求清除耗电日志的历史信息,以减少温度信息和耗电信息对存储空间的占用。In some embodiments, the electronic device may also delete the power consumption log according to an instruction input by the user. As a way, the above-mentioned setting interface may further include a third control, which is used to trigger the function of clearing the power consumption log, and the power consumption information for display is generated according to the power consumption information and the temperature information. After the electricity log, the method further includes: when a trigger operation on the third control is detected, clearing the generated electricity consumption log. Therefore, the historical information of the power consumption log can be cleared according to the needs of the user, so as to reduce the occupation of the storage space by the temperature information and the power consumption information.
在一些实施方式中,上述第三控件在设置界面中可以按照如下路径设置:“设置”-->“电池”-->“日志”-->“复位”,其中,“复位”为第三控件的控件名称。需要说明的是,上述控件名称仅为举例,在本申请中并不作限定。进一步地,当用户点击“复位”控件时,电子设备也可将历史的所有耗电日志清空。In some embodiments, the above-mentioned third control can be set in the setting interface according to the following path: "Settings" -> "Battery" -> "Log" -> "Reset", where "Reset" is the third The control name of the control. It should be noted that the aforementioned control names are only examples, and are not limited in this application. Further, when the user clicks the "reset" control, the electronic device can also clear all historical power consumption logs.
需要说明的是,本申请实施例中,步骤210~步骤250中的方式也可以适用于其他实施例中。It should be noted that, in the embodiment of the present application, the manner in step 210 to step 250 may also be applied to other embodiments.
在本申请实施例中,通过显示耗电日志的设置界面,该设置界面包括用于开启或者关闭指定功能的第一控件,该指定功能用于在耗电日志中记录主板的温度信息,然后当检测到对第一控件的开启操作,可控制指定功能开启,当检测到所述指定功能开启时,可获取主板的温度信息。再根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志。从而实现仅在用户需要记录主板温度信息时,开启日志的主板温度记录功能。进一步地,也可导出某个时间段的耗电日志,实现指定时间段的主板温度查询。还可生成主板的温度状态曲线,能够方便、准确地查看电子设备在不同阶段、不同场景下详细的主板温度表现。In the embodiment of the present application, the setting interface of the power consumption log is displayed, and the setting interface includes a first control for turning on or off a specified function. The specified function is used to record the temperature information of the mainboard in the power consumption log, and then When the opening operation of the first control is detected, the designated function can be controlled to be turned on, and when the designated function is detected to be turned on, the temperature information of the main board can be obtained. Then, according to the power consumption information and the temperature information, a power consumption log for display is generated. In this way, it is possible to enable the motherboard temperature recording function of the log only when the user needs to record the motherboard temperature information. Further, the power consumption log for a certain period of time can also be exported to realize the temperature query of the motherboard in a specified period of time. The temperature status curve of the motherboard can also be generated, which can conveniently and accurately view the detailed motherboard temperature performance of the electronic equipment in different stages and different scenarios.
请参阅图3,图3示出了本申请又一个实施例提供的耗电信息的处理方法的流程示意图。下面将针对图3所示的流程进行详细的阐述,所述耗电信息的处理方法具体可以包括以下步骤:Please refer to FIG. 3, which shows a schematic flowchart of a method for processing power consumption information according to another embodiment of the present application. The following will elaborate on the process shown in FIG. 3, and the processing method of the power consumption information may specifically include the following steps:
步骤S310:获取对所述电池耗电的耗电信息。Step S310: Obtain power consumption information for the battery power consumption.
在本申请实施例中,步骤S310可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, step S310 can refer to the content of the foregoing embodiment, which will not be repeated here.
在一些实施方式中,当电子设备运行有Linux的操作系统时,电子设备可以通过battery stats service(电量统计服务)模块获取到对所述电池耗电的耗电信息。其中,battery stats service模块的主要功能是收集系统中各模块和应用进程的耗电情况。In some embodiments, when the electronic device runs a Linux operating system, the electronic device can obtain the power consumption information of the battery through the battery stats service (power statistics service) module. Among them, the main function of the battery stats service module is to collect the power consumption of each module and application process in the system.
步骤S320:获取所述主板的温度信息。Step S320: Obtain temperature information of the motherboard.
在本申请实施例中,步骤S320可以参阅前述实施例的内容,在此不再赘述。In this embodiment of the present application, step S320 can refer to the content of the foregoing embodiment, and will not be repeated here.
在本申请实施例中,电子设备可以包括温度传感器,该温度传感器可以设置于主板上且远离主板的热源位置,以获取到比较准确的主板温度。电子设备可以将该温度传感器感应到的温度信息,作为主板的温度信息。In the embodiment of the present application, the electronic device may include a temperature sensor, and the temperature sensor may be arranged on the main board and far away from the heat source of the main board, so as to obtain a relatively accurate temperature of the main board. The electronic device can use the temperature information sensed by the temperature sensor as the temperature information of the motherboard.
在一些实施方式中,热源可以为主板上的所有可以发热的部件,例如,高压电容,开关管,电池、芯片、中央处理器等,在此不作限定。在另一些实施方式中,热源也可以为主板上的选取的容易发热的部件。In some embodiments, the heat source can be all components that can generate heat on the main board, such as high-voltage capacitors, switch tubes, batteries, chips, central processing units, etc., which are not limited here. In other embodiments, the heat source can also be a selected component on the main board that is easy to generate heat.
在一些实施方式中,当电子设备运行有Linux的操作系统时,在所述获取所述主板的温度信息之前,耗电信息的处理方法还可以包括:通过thermal framework(热框架)模块控制所述温度传感器开启。In some embodiments, when the electronic device is running the Linux operating system, before the acquiring the temperature information of the motherboard, the processing method of the power consumption information may further include: controlling the thermal framework through a thermal framework module. The temperature sensor is turned on.
具体地,当电子设备运行有Linux的操作系统时,电子设备存在thermal framework(热框架)模块。其中,thermal framework模块用于对整个温控需求的资源整合与功能实现,其中还包括各类底层的温度传感器的驱动,如上述主板上设置的用于检测主板温度的温度传感器。因此,电子设备可通过thermal framework模块控制所述温度传感器开启,进行温度信息的检测。Specifically, when the electronic device runs a Linux operating system, the electronic device has a thermal framework module. Among them, the thermal framework module is used for resource integration and function realization of the entire temperature control requirement, and it also includes the drivers of various bottom-level temperature sensors, such as the temperature sensor set on the above-mentioned motherboard for detecting the temperature of the motherboard. Therefore, the electronic device can control the temperature sensor to be turned on through the thermal framework module to detect temperature information.
需要说明的是,主板上的温度传感器是以thermal zone(温控管理区间)的身份处于thermal framework框架模块中,thermal zone底层可以通过adc(Analog-to-Digital Converter,模/数转换器)的方式读取实际的温度值。对于linux用户态而言,通过thermal框架的相应接口即可得到主板的温度信息。It should be noted that the temperature sensor on the motherboard is located in the thermal framework module with the identity of thermal zone (temperature control management zone), and the bottom layer of thermal zone can pass through adc (Analog-to-Digital Converter, analog/digital converter) Way to read the actual temperature value. For the Linux user mode, the temperature information of the motherboard can be obtained through the corresponding interface of the thermal framework.
在一些实施方式中,当电子设备运行有Linux的操作系统时,电子设备也可以通过上述battery stats service模块获取到主板的温度信息。In some embodiments, when the electronic device runs the Linux operating system, the electronic device can also obtain the temperature information of the motherboard through the battery stats service module described above.
作为一种方式,电子设备可以单独建立一个可后台执行的本地守护进程模块,以周期性获取主板的温度信息,并上传该温度信息至上述battery stats service模块,从而电子设备可以通过上述battery stats service模块获取到主板的温度信息。As a way, the electronic device can separately establish a local daemon process module that can be executed in the background to periodically obtain the temperature information of the motherboard, and upload the temperature information to the above battery stats service module, so that the electronic device can use the above battery stats service. The module obtains the temperature information of the motherboard.
请参阅图4,图4示出了一种耗电信息处理方法的软件框架流程示意图。假设图4中的温度传感器为NTC温度传感器,对应的温控管理区间即为ntc_thermal_zone(NTC温控管理区间)模块。具体地,上述通过所述 battery stats service模块获取所述主板的温度信息,可以包括:Please refer to FIG. 4, which shows a schematic diagram of a software framework flow chart of a method for processing power consumption information. Assuming that the temperature sensor in FIG. 4 is an NTC temperature sensor, the corresponding temperature control management zone is the ntc_thermal_zone (NTC temperature control management zone) module. Specifically, obtaining the temperature information of the motherboard through the battery stats service module described above may include:
通过power native daemon(电源本地守护进程)模块每隔预设时长从sysfs接口读取温控管理区间模块检测到的主板的温度信息;通过syetem power service(系统电源服务)模块接收所述power native daemon模块上传的所述温度信息;通过所述battery stats service模块接收所述syetem power service模块上传的所述温度信息。The temperature information of the motherboard detected by the temperature control management interval module is read from the sysfs interface through the power native daemon (power local daemon) module at a preset time interval; the power native daemon is received through the system power service (system power service) module The temperature information uploaded by the module; the temperature information uploaded by the system power service module is received through the battery stats service module.
其中,power native daemon模块的主要功能是,向下周期性地通过sysfs接口来读取温控管理区间模块检测到的主板的温度信息,向上将温度信息传递给system power service模块。其中,power native daemon模块的读取周期可预先进行配置,具体地的周期值可由相关人员根据具体的应用环境进行合理设定,在此并不作限定。例如,周期值可以设定为3秒。Among them, the main function of the power native daemon module is to periodically read the temperature information of the motherboard detected by the temperature control management interval module through the sysfs interface downward, and transmit the temperature information upward to the system power service module. Among them, the reading cycle of the power native daemon module can be configured in advance, and the specific cycle value can be set reasonably by relevant personnel according to the specific application environment, which is not limited here. For example, the period value can be set to 3 seconds.
syetem power service模块的主要功能是,接收power native daemon模块上传的温度信息,最终将该信息推送给battery stats service模块。The main function of the system power service module is to receive the temperature information uploaded by the power native daemon module, and finally push the information to the battery stats service module.
batterystats service模块的主要功能是,接收来自system power service模块上传的温度信息。从而电子设备可以通过所述battery stats service模块获取到主板的温度信息。The main function of the batterystats service module is to receive the temperature information uploaded from the system power service module. Therefore, the electronic device can obtain the temperature information of the main board through the battery stats service module.
步骤S330:根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志。Step S330: Generate a power consumption log for display according to the power consumption information and the temperature information.
在本申请实施例中,步骤S330可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, step S330 can refer to the content of the foregoing embodiment, which will not be repeated here.
在一些实施方式中,当电子设备运行有Linux的操作系统时,电子设备可以通过上述battery stats service模块对耗电信息以及主板的温度信息进行整合,从而获得用于展示的耗电日志。具体地,由于Android系统的原生Battery stats service模块会有一些接口,因此可通过这些接口将上述耗电信息以及主板的温度信息记录并保存,从而待后面使用时,按照保存时约定的格式直接获取耗电信息以及温度信息即可。In some embodiments, when the electronic device runs the Linux operating system, the electronic device can integrate the power consumption information and the temperature information of the motherboard through the battery stats service module described above, so as to obtain a power consumption log for display. Specifically, because the native Battery stats service module of the Android system has some interfaces, the above-mentioned power consumption information and the temperature information of the motherboard can be recorded and saved through these interfaces, so that when it is used later, it can be directly obtained in the format agreed upon when saving. Power consumption information and temperature information are sufficient.
在一些实施方式中,在上述根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志之后,耗电信息的处理方法还可以包括:In some embodiments, after the power consumption log for display is generated based on the power consumption information and the temperature information, the processing method of the power consumption information may further include:
根据所述耗电日志对所述耗电信息以及所述温度信息进行处理分析,获得处理分析结果;如果基于所述处理分析结果,确定出耗电速度大于速度阈值且所述主板的温度大于温度阈值时,对处于后台的目标进程进行清理。Process and analyze the power consumption information and the temperature information according to the power consumption log to obtain the processing analysis result; if based on the processing analysis result, it is determined that the power consumption speed is greater than the speed threshold and the temperature of the motherboard is greater than the temperature When the threshold is set, the target process in the background is cleaned up.
在一些实施方式,对耗电信息以及温度信息进行处理分析,可以是分析电子设备运行的各个模块和各个应用程序的平均耗电量及总耗电量,也可以是分析主板的温度趋势,还可以是对主板的温度和电池温度的比对分析,在此并不作限定。电子设备得到处理分析结果后,可以基于所述处理分析结果,确定出耗电速度,确定出主板温度。然后电子设备可在耗电速度大于速度阈值且主板的温度大于温度阈值时,对处于后台的目标进程进行清理,以减少不必要的应用进程的电量消耗,延长电子设备的使用时间。 在一些实施方式中,对处于后台的目标进程进行清理,可以是关闭处于后台的所有应用程序,也可以是关闭处于后台的白名单外的应用程序。In some embodiments, the processing and analysis of power consumption information and temperature information can be to analyze the average power consumption and total power consumption of each module and each application running on the electronic device, or to analyze the temperature trend of the motherboard, or It can be a comparative analysis of the temperature of the motherboard and the temperature of the battery, which is not limited here. After the electronic device obtains the processing analysis result, it can determine the power consumption speed and the motherboard temperature based on the processing analysis result. Then the electronic device can clean up the target process in the background when the power consumption speed is greater than the speed threshold and the temperature of the motherboard is greater than the temperature threshold, so as to reduce the power consumption of unnecessary application processes and prolong the use time of the electronic device. In some implementation manners, to clean up the target process in the background may be to close all the applications in the background, or to close the applications outside the whitelist in the background.
其中,上述耗电速度可与电池的单位时间耗电量相关,电子设备可通过多种方式获取到耗电速度。作为一种方式,电子设备可以根据某个时间段内对应的多个耗电日志中电池电量的变化值和对应的时间变化区间,获取到多个单位时间耗电量,将多个单位时间耗电量的均值作为耗电速度。The above-mentioned power consumption rate may be related to the power consumption per unit time of the battery, and the electronic device may obtain the power consumption rate in a variety of ways. As a way, the electronic device can obtain multiple power consumption per unit time according to the change value of the battery power in the multiple power consumption logs corresponding to a certain time period and the corresponding time change interval, and consume multiple units of time. The average value of power is used as the power consumption rate.
其中,上述速度阈值为电子设备进行后台目标进程的自动清理时,耗电速度需要满足的最小耗电速度。而当耗电速度大于速度阈值时,可认为当前运行的进程较多,产生了较大的电量消耗。上述温度阈值为电子设备进行后台目标进程的自动清理时,主板的温度需要满足的最低值。而当主板的温度大于温度阈值,可认为电子设备的运行的进程较多,产生了较大的热量。在一些实施方式种,速度阈值和温度阈值可以预先存储于电子设备,可由用户进行设定,在本申请并不对速度阈值和温度阈值的具体数值进行限定。Wherein, the aforementioned speed threshold is the minimum power consumption speed that the power consumption speed needs to meet when the electronic device performs automatic cleaning of the background target process. And when the power consumption rate is greater than the speed threshold, it can be considered that there are more processes currently running, resulting in greater power consumption. The above temperature threshold is the minimum value that the temperature of the main board needs to meet when the electronic device performs automatic cleaning of the background target process. When the temperature of the main board is greater than the temperature threshold, it can be considered that the electronic device is running more processes and generates a lot of heat. In some embodiments, the speed threshold and the temperature threshold may be pre-stored in the electronic device and can be set by the user. The specific values of the speed threshold and the temperature threshold are not limited in this application.
在一些实施方式中,当电池的电量过低时,为节省电量消耗,可以停止对主板温度的检测。因此,上述耗电信息还包括电池的剩余电量,该耗电信息的处理方法还可以包括:当所述剩余电量小于电量阈值时,控制所述温度传感器关闭。其中,电量阈值可以为温度传感器为工作状态时,电池需要满足的最低电量。该电量阈值可以由用户设定,可预存于电子设备。In some embodiments, when the power of the battery is too low, in order to save power consumption, the detection of the temperature of the motherboard can be stopped. Therefore, the above-mentioned power consumption information further includes the remaining power of the battery, and the processing method of the power consumption information may further include: when the remaining power is less than the power threshold, controlling the temperature sensor to turn off. Wherein, the power threshold may be the minimum power that the battery needs to meet when the temperature sensor is in the working state. The power threshold can be set by the user and can be pre-stored in the electronic device.
需要说明的是,本申请实施例中步骤S310以及步骤S330中的方式也可以适用于其他实施例中。It should be noted that the methods in step S310 and step S330 in the embodiment of the present application can also be applied to other embodiments.
在本申请实施例中,通过构建的power native daemon(电源本地守护进程)模块,可以每隔预设时长从sysfs接口读取温控管理区间模块检测到的主板的温度信息,然后power native daemon模块将温度信息上传至syetem power service(系统电源服务)模块,syetem power service(系统电源服务)模块再将温度信息上传至battery stats service(电量统计服务)模块,从而电子设备可以通过battery stats service(电量统计服务)模块对耗电信息以及温度信息进行整合,生成用于展示的耗电日志,实现了主板温度信息的自动化监测。In the embodiment of this application, through the built power native daemon (power local daemon) module, the temperature information of the motherboard detected by the temperature control management interval module can be read from the sysfs interface every preset time, and then the power native daemon module Upload temperature information to the system power service module, and then the system power service module uploads the temperature information to the battery stats service module, so that electronic devices can pass the battery stats service The statistical service) module integrates power consumption information and temperature information, generates power consumption logs for display, and realizes automatic monitoring of motherboard temperature information.
请参阅图5,图5示出了本申请再一个实施例提供的耗电信息的处理方法的流程示意图。下面将针对图5所示的流程进行详细的阐述,所述耗电信息的处理方法具体可以包括以下步骤:Please refer to FIG. 5, which shows a schematic flowchart of a method for processing power consumption information provided by another embodiment of the present application. The following will elaborate on the process shown in FIG. 5, and the processing method of the power consumption information may specifically include the following steps:
步骤S410:获取对所述电池耗电的耗电信息。Step S410: Obtain power consumption information for the battery power consumption.
在本申请实施例中,步骤S410可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, step S410 may refer to the content of the foregoing embodiment, which will not be repeated here.
步骤S420:当检测到所述电池的状态参数发生变化时,获取所述主板的温度信息。Step S420: Acquire temperature information of the main board when it is detected that the state parameter of the battery has changed.
在一些实施方式中,电子设备可以在电池的状态参数发生变化,需要进行耗电信息的更新时,才获取主板的温度信息。由于导热原因,电池温 度的变化往往主板的温度也会有些变化,主板的温度变化往往电池温度也会变化。由于电池温度变化的接收与记录原生android系统已经做好了,因此可以借此读取一下主板温度,无需额外去建立一个线程单独获取主板的温度。从而无需实时获取主板温度,仅在电池的状态参数更新时获取主板温度,以进行主板温度的更新,减少实时获取主板温度时CPU(central processing unit,中央处理单元)的资源占用。例如,CPU处于idle(空闲状态)时,将温度信息和电池的状态参数一起更新处理可以避免多次退出idle,增加CPU开销。其中,电池的状态参数可以是温度变化、电量变化、充电非充电状态等等。In some embodiments, the electronic device may acquire the temperature information of the main board only when the battery status parameter changes and the power consumption information needs to be updated. Due to heat conduction, the temperature of the battery will often change the temperature of the motherboard, and the temperature of the motherboard will often also change the battery temperature. Since the battery temperature change is received and recorded by the native android system, the temperature of the motherboard can be read by this, and there is no need to create an additional thread to obtain the temperature of the motherboard separately. Therefore, it is not necessary to obtain the motherboard temperature in real time, and only obtain the motherboard temperature when the battery status parameter is updated, so as to update the motherboard temperature, and reduce the resource occupation of the CPU (central processing unit, central processing unit) when acquiring the motherboard temperature in real time. For example, when the CPU is in idle (idle state), updating the temperature information and battery status parameters together can avoid multiple exits from idle and increase CPU overhead. Among them, the state parameters of the battery can be temperature change, power change, charging and non-charging state, and so on.
在一些实施方式中,当电子设备运行有Linux的操作系统时,电子设备也可以通过上述battery stats service模块获取到主板的温度信息。In some embodiments, when the electronic device runs the Linux operating system, the electronic device can also obtain the temperature information of the motherboard through the battery stats service module described above.
作为一种方式,当电子设备运行有Linux的操作系统时,电子设备可以通过原有的healthd模块来获取主板的温度信息。具体地,当healthd模块检测到电池的状态参数发生变化时,通过healthd模块获取所述主板的温度信息,以便healthd模块向上层发送的更新的电池的状态参数时,也可以将主板的温度信息向上层发送,以进行更新。As a way, when the electronic device runs the Linux operating system, the electronic device can obtain the temperature information of the motherboard through the original healthd module. Specifically, when the healthd module detects that the battery status parameter changes, it obtains the temperature information of the motherboard through the healthd module, so that when the healthd module sends the updated battery status parameters to the upper layer, it can also upload the temperature information of the motherboard. Layer sent to update.
在传统的技术中,healthd模块的主要功能是,向下监听来自底层的电池事件,向上传递电池的数据信息给battery Service(电量服务)模块。然后battery service模块再将电池的数据信息推送给上述battery stats service模块。其中,Battery Service模块的主要功能是,根据传递来的电池的数据信息来计算电池电量显示,剩余电量,电量级别等信息。因此,healthd模块一旦检测到电池的状态参数发生变化,就会向battery Service模块发送电池的更新信息。因此,电子设备可以在这个时候借助healthd模块获取主板的温度信息,并将该温度信息和电池的更新信息一起发送至Battery Service模块,然后battery service模块再将温度信息和电池的更新信息推送给上述battery stats service模块,从而电子设备也可以通过上述battery stats service模块获取到主板的温度信息。In traditional technology, the main function of the healthd module is to listen to the battery events from the bottom layer, and transmit the battery data information upward to the battery Service module. Then the battery service module pushes the battery data information to the above battery stats service module. Among them, the main function of the Battery Service module is to calculate battery power display, remaining power, power level and other information based on the data information of the battery that is passed. Therefore, once the healthd module detects a change in the status parameters of the battery, it will send the battery update information to the battery Service module. Therefore, the electronic device can use the healthd module to obtain the temperature information of the motherboard at this time, and send the temperature information and the update information of the battery to the Battery Service module, and then the battery service module pushes the temperature information and the update information of the battery to the above The battery stats service module, so that the electronic device can also obtain the temperature information of the motherboard through the above battery stats service module.
具体地,请参阅图6,图6示出了另一种耗电信息处理方法的软件框架流程示意图。假设图6中的温度传感器为NTC温度传感器,对应的温控管理区间即为ntc_thermal_zone(NTC温控管理区间)模块。电子设备通过healthd模块从sysfs接口读取温控管理区间模块检测到的主板的温度信息,然后healthd模块上传该温度信息至battery service(电量服务)模块,battery service模块接收到healthd模块上传的温度信息后,将该温度信息推送给上述battery stats service(电量统计服务)模块,从而电子设备可以通过上述battery stats service模块可以接收到battery service模块上传的温度信息。Specifically, please refer to FIG. 6, which shows a schematic diagram of a software framework flow diagram of another method for processing power consumption information. Assuming that the temperature sensor in FIG. 6 is an NTC temperature sensor, the corresponding temperature control management zone is the ntc_thermal_zone (NTC temperature control management zone) module. The electronic device reads the temperature information of the motherboard detected by the temperature control management interval module from the sysfs interface through the healthd module, and then the healthd module uploads the temperature information to the battery service module, and the battery service module receives the temperature information uploaded by the healthd module Then, the temperature information is pushed to the battery stats service module, so that the electronic device can receive the temperature information uploaded by the battery service module through the battery stats service module.
步骤S430:根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志。Step S430: Generate a power consumption log for display according to the power consumption information and the temperature information.
在本申请实施例中,步骤S430可以参阅前述实施例的内容,在此不再赘述。In the embodiment of the present application, step S430 can refer to the content of the foregoing embodiment, and will not be repeated here.
在一些实施方式中,当电子设备运行有Linux的操作系统时,电子设备可以通过上述battery stats service模块对耗电信息以及主板的温度信息进行整合,从而获得用于展示的耗电日志。In some embodiments, when the electronic device runs the Linux operating system, the electronic device can integrate the power consumption information and the temperature information of the motherboard through the battery stats service module described above, so as to obtain a power consumption log for display.
需要说明的是,本申请实施例中步骤S410以及步骤S430中的方式也可以适用于其他实施例中。It should be noted that the methods in step S410 and step S430 in the embodiment of the present application can also be applied to other embodiments.
本申请实施例提供的耗电信息的处理方法,当healthd模块检测到电池的状态参数发生变化时,需要向上层更新电池的状态参数时,通过healthd模块从sysfs接口读取温控管理区间模块检测到的主板的温度信息,然后借助healthd模块将温度信息和更新的电池的状态参数上传至battery service模块,battery service模块再将温度信息上传至battery stats service(电量统计服务)模块,从而电子设备可以通过battery stats service(电量统计服务)模块对耗电信息以及温度信息进行整合,生成用于展示的耗电日志,从而仅在电池的状态参数发生变化时才对主板的温度更新,减少了CPU的资源占用。In the method for processing power consumption information provided by the embodiments of the present application, when the healthd module detects that the state parameters of the battery have changed, when the state parameters of the battery need to be updated to the upper layer, the temperature control management interval module is read from the sysfs interface through the healthd module to detect Then use the healthd module to upload the temperature information and updated battery status parameters to the battery service module, and the battery service module uploads the temperature information to the battery stats service module, so that the electronic equipment can The battery stats service module integrates power consumption information and temperature information to generate power consumption logs for display, so that the temperature of the motherboard is updated only when the battery status parameters change, reducing CPU Resource occupation.
请参阅图7,其示出了本申请实施例提供的一种耗电信息的处理装置400的结构框图。应用于电子设备,该电子设备包括主板以及电池,该耗电信息的处理装置400包括:耗电获取模块410、温度获取模块420以及日志生成模块430,其中,所述耗电获取模块410,用于获取对所述电池耗电的耗电信息;所述温度获取模块420,用于获取所述主板的温度信息;所述日志生成模块430,用于根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志。Please refer to FIG. 7, which shows a structural block diagram of an apparatus 400 for processing power consumption information according to an embodiment of the present application. Applied to electronic equipment, the electronic equipment includes a motherboard and a battery. The device 400 for processing power consumption information includes: a power consumption acquisition module 410, a temperature acquisition module 420, and a log generation module 430. The power consumption acquisition module 410 uses To obtain the power consumption information of the battery; the temperature acquisition module 420 is used to obtain temperature information of the motherboard; the log generation module 430 is used to obtain the power consumption information and the temperature information To generate a power consumption log for display.
在一些实施方式中,该耗电信息的处理装置400还可以包括:界面显示模块以及温度开启模块。界面显示模块用于显示耗电日志的设置界面,所述设置界面包括第一控件,所述第一控件用于开启或者关闭指定功能,所述指定功能用于在耗电日志中记录主板的温度信息;温度开启模块用于当检测到对所述第一控件的开启操作时,控制所述指定功能开启。In some embodiments, the device 400 for processing power consumption information may further include: an interface display module and a temperature start module. The interface display module is used to display the setting interface of the power consumption log, the setting interface includes a first control, the first control is used to turn on or off a specified function, and the specified function is used to record the temperature of the mainboard in the power consumption log Information; the temperature opening module is used to control the designated function to be turned on when the opening operation of the first control is detected.
在一些实施方式中,温度获取模块420可以具体用于:当检测到所述指定功能开启时,获取所述主板的温度信息。In some embodiments, the temperature acquiring module 420 may be specifically configured to acquire the temperature information of the main board when it is detected that the specified function is turned on.
在一些实施方式中,上述设置界面还可以包括第二控件,该第二控件用于导出上述耗电日志,该耗电信息的处理装置400还可以包括:日志导出模块。日志导出模块用于当检测到对所述第二控件的触发操作时,导出所述耗电日志并将所述耗电日志进行存储。In some embodiments, the above-mentioned setting interface may further include a second control for exporting the above-mentioned power consumption log, and the apparatus 400 for processing power consumption information may further include: a log exporting module. The log export module is configured to export the power consumption log and store the power consumption log when a trigger operation on the second control is detected.
在该实施方式下,日志导出模块可以具体用于:获取所述耗电日志的查看时间段;获取所述查看时间段对应的所有耗电日志;导出所述所有耗电日志并将所述所有耗电日志进行存储。In this embodiment, the log export module may be specifically used to: obtain the viewing time period of the power consumption log; obtain all the power consumption logs corresponding to the viewing time period; export all the power consumption logs and store all the power consumption logs. The power consumption log is stored.
在一些实施方式中,该耗电信息的处理装置400还可以包括:网页生成模块。网页生成模块用于生成与所述耗电日志对应的网页信息,并通过网页界面的形式展示所述网页信息。In some embodiments, the device 400 for processing power consumption information may further include: a webpage generation module. The webpage generating module is used for generating webpage information corresponding to the power consumption log, and displaying the webpage information in the form of a webpage interface.
在该实施方式下,该耗电信息的处理装置400还可以包括:时间获取 模块以及曲线生成模块。时间获取模块用于获取所述耗电日志中的多个时间戳,所述时间戳为获取到所述温度信息时对应的时间节点;曲线生成模块用于根据所述多个时间戳以及所述多个时间戳对应的所述温度信息,生成所述主板的温度状态曲线,所述温度状态曲线用于表征所述主板的温度的状态变化轨迹。网页生成模块可以具体用于:生成与所述温度状态曲线对应的网页信息,并通过网页界面的形式展示所述温度状态曲线。In this embodiment, the device 400 for processing power consumption information may further include: a time acquisition module and a curve generation module. The time acquisition module is configured to acquire multiple time stamps in the power consumption log, where the time stamp is the time node corresponding to the time when the temperature information is acquired; The temperature information corresponding to the multiple time stamps generates a temperature state curve of the main board, and the temperature state curve is used to characterize the state change track of the temperature of the main board. The webpage generating module may be specifically configured to generate webpage information corresponding to the temperature state curve, and display the temperature state curve in the form of a webpage interface.
在一些实施方式中,该耗电信息的处理装置400还可以包括:日志发送模块。日志发送模块用于将所述耗电日志发送至终端设备,所述终端设备用于根据所述耗电日志生成网页信息,所述网页信息用于终端设备以网页界面的形式展示所述耗电日志。In some embodiments, the device 400 for processing power consumption information may further include a log sending module. The log sending module is configured to send the power consumption log to a terminal device, and the terminal device is used to generate web page information according to the power consumption log, and the web page information is used by the terminal device to display the power consumption in the form of a web interface. Log.
在一些实施方式中,上述设置界面还可以包括第三控件,该第三控件用于触发清除耗电日志的功能,该耗电信息的处理装置400还可以包括:日志清除模块。日志清除模块用于当检测到对所述第三控件的触发操作时,对生成的耗电日志进行清除。In some embodiments, the above-mentioned setting interface may further include a third control for triggering the function of clearing the power consumption log, and the power consumption information processing device 400 may further include: a log clearing module. The log clearing module is used for clearing the generated power consumption log when a trigger operation on the third control is detected.
在一些实施方式中,温度获取模块420可以具体用于:当检测到所述电池的状态参数发生变化时,获取所述主板的温度信息。In some embodiments, the temperature acquiring module 420 may be specifically configured to acquire temperature information of the main board when it is detected that the state parameter of the battery changes.
在一些实施方式中,上述电子设备还可以包括温度传感器,该温度传感器设置于所述主板上且远离所述主板的热源位置,温度获取模块420可以具体用于:获取所述温度传感器检测到的温度信息,作为所述主板的温度信息。In some embodiments, the above-mentioned electronic device may further include a temperature sensor, which is arranged on the main board and far away from the heat source position of the main board, and the temperature acquisition module 420 may be specifically configured to: obtain information detected by the temperature sensor. The temperature information is used as the temperature information of the motherboard.
在该实施方式下,该耗电信息的处理装置400还可以包括:传感器开启模块。传感器开启模块用于通过thermal framework(热框架)模块控制所述温度传感器开启。In this embodiment, the device 400 for processing power consumption information may further include a sensor activation module. The sensor activation module is used to control the activation of the temperature sensor through a thermal framework module.
在该实施方式下,上述耗电信息可以包括电池的剩余电量,该耗电信息的处理装置400还可以包括:传感器关闭模块。传感器关闭模块用于当所述剩余电量小于电量阈值时,控制所述温度传感器关闭。In this embodiment, the above-mentioned power consumption information may include the remaining power of the battery, and the device 400 for processing the power consumption information may further include: a sensor shutdown module. The sensor shutdown module is used to control the temperature sensor to shut down when the remaining power is less than the power threshold.
在一些实施方式中,耗电获取模块410可以具体用于:通过battery stats service(电量统计服务)模块获取对所述电池耗电的耗电信息。温度获取模块420可以具体用于通过所述battery stats service模块获取所述主板的温度信息。In some implementation manners, the power consumption obtaining module 410 may be specifically configured to obtain power consumption information on the battery power consumption through a battery stats service (power statistics service) module. The temperature obtaining module 420 may be specifically configured to obtain the temperature information of the motherboard through the battery stats service module.
在该实施方式下,耗电获取模块410通过battery stats service(电量统计服务)模块获取对所述电池耗电的耗电信息,可以包括:通过power native daemon(电源本地守护进程)模块每隔预设时长从sysfs接口读取温控管理区间模块检测到的主板的温度信息;通过syetem power service(系统电源服务)模块接收所述power native daemon模块上传的所述温度信息;通过所述battery stats service模块接收所述syetem power service模块上传的所述温度信息。In this embodiment, the power consumption acquisition module 410 acquires the power consumption information of the battery power consumption through the battery stats service module, which may include: through the power native daemon (power local daemon) module every scheduled time. Set the length of time to read the temperature information of the motherboard detected by the temperature control management interval module from the sysfs interface; receive the temperature information uploaded by the power native daemon module through the system power service module; use the battery stats service The module receives the temperature information uploaded by the system power service module.
在该实施方式下,日志生成模块430可以具体用于:通过所述battery stats service模块对所述耗电信息以及所述温度信息进行整合,获得用于展 示的耗电日志。In this embodiment, the log generation module 430 may be specifically configured to integrate the power consumption information and the temperature information through the battery stats service module to obtain a power consumption log for display.
在一些实施方式中,该耗电信息的处理装置400还可以包括:分析处理模块以及进程清理模块。分析处理模块用于根据所述耗电日志对所述耗电信息以及所述温度信息进行处理分析,获得处理分析结果;进程清理模块用于如果基于所述处理分析结果,确定出耗电速度大于速度阈值且所述主板的温度大于温度阈值时,对处于后台的目标进程进行清理。In some embodiments, the device 400 for processing power consumption information may further include: an analysis and processing module and a process cleaning module. The analysis processing module is configured to process and analyze the power consumption information and the temperature information according to the power consumption log to obtain a processing analysis result; the process cleaning module is configured to determine that the power consumption rate is greater than When the speed threshold and the temperature of the motherboard are greater than the temperature threshold, the target process in the background is cleaned up.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the device and module described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In the several embodiments provided in this application, the coupling between the modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or software function modules.
综上所述,本申请提供的方案,通过获取对电池耗电的耗电信息,以及获取主板的温度信息,以根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志,从而实现将主板的温度信息整合到电池的耗电日志中,使得可以直接从耗电日志中得到电子设备的发热状态,而无需另建日志进行记录,减少了工作人员对软件程序的开发时间,也提升了信息获取的方便快捷性和全面性。并且,通过耗电日志对主板的温度信息的实时记录,可以对市场终端用户的功耗分析和判断提供重要的数据支撑与优化方向,为功耗的改善奠定基础。In summary, the solution provided by this application obtains power consumption information on battery power consumption and obtains temperature information of the motherboard to generate power consumption logs for display based on the power consumption information and the temperature information , So as to realize the integration of the temperature information of the motherboard into the battery power consumption log, so that the heating status of the electronic device can be obtained directly from the power consumption log, without the need to create a separate log for recording, reducing the staff's development time for software programs , It also improves the convenience and comprehensiveness of information acquisition. In addition, the real-time recording of the temperature information of the motherboard through the power consumption log can provide important data support and optimization directions for the power consumption analysis and judgment of market end users, and lay the foundation for the improvement of power consumption.
请参考图8,其示出了本申请实施例提供的一种电子设备的结构框图。该电子设备100可以是笔记本、PC电脑、移动终端等能够运行应用程序的电子设备。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120、电池(未图示)、主板(未图示)以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个应用程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 8, which shows a structural block diagram of an electronic device provided by an embodiment of the present application. The electronic device 100 may be an electronic device capable of running application programs, such as a notebook, a PC computer, or a mobile terminal. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, a battery (not shown), a motherboard (not shown), and one or more applications, of which one or more applications The program may be stored in the memory 120 and configured to be executed by one or more processors 110, and one or more application programs are configured to execute the method described in the foregoing method embodiment.
处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。 其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120. Various functions and processing data of the electronic device 100. Optionally, the processor 110 may use at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). A kind of hardware form to realize. The processor 110 may be integrated with one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a modem, and the like. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储终端100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions used to implement the following various method embodiments, etc. The data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
请参考图9,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质800中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 9, which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable medium 800 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
计算机可读存储介质800可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质800包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质800具有执行上述方法中的任何方法步骤的程序代码810的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码810可以例如以适当形式进行压缩。The computer-readable storage medium 800 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 800 has storage space for the program code 810 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products. The program code 810 may be compressed in a suitable form, for example.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application, not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features thereof are equivalently replaced; these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种耗电信息的处理方法,其特征在于,应用于电子设备,所述电子设备包括主板以及电池,所述方法包括:A method for processing power consumption information, characterized in that it is applied to an electronic device, the electronic device includes a main board and a battery, and the method includes:
    获取对所述电池耗电的耗电信息;Acquiring power consumption information on the battery power consumption;
    获取所述主板的温度信息;Acquiring temperature information of the motherboard;
    根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志。According to the power consumption information and the temperature information, a power consumption log for display is generated.
  2. 根据权利要求1所述的方法,其特征在于,在所述获取对所述电池耗电的耗电信息之前,所述方法还包括:The method according to claim 1, wherein before said acquiring the power consumption information of the battery power consumption, the method further comprises:
    显示耗电日志的设置界面,所述设置界面包括第一控件,所述第一控件用于开启或者关闭指定功能,所述指定功能用于在耗电日志中记录主板的温度信息;A setting interface for displaying a power consumption log, the setting interface including a first control, the first control is used to turn on or off a specified function, and the specified function is used to record the temperature information of the mainboard in the power consumption log;
    当检测到对所述第一控件的开启操作时,控制所述指定功能开启。When an opening operation on the first control is detected, the designated function is controlled to be turned on.
  3. 根据权利要求2所述的方法,其特征在于,所述获取所述主板的温度信息,包括:The method according to claim 2, wherein the obtaining temperature information of the main board comprises:
    当检测到所述指定功能开启时,获取所述主板的温度信息。When it is detected that the specified function is turned on, the temperature information of the main board is acquired.
  4. 根据权利要求2或3所述的方法,其特征在于,所述设置界面还包括第二控件,所述第二控件用于导出所述耗电日志,在所述根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志之后,所述方法还包括:The method according to claim 2 or 3, wherein the setting interface further comprises a second control, and the second control is used to export the power consumption log. After the temperature information is generated and the power consumption log for display is generated, the method further includes:
    当检测到对所述第二控件的触发操作时,导出所述耗电日志并将所述耗电日志进行存储。When a trigger operation on the second control is detected, export the power consumption log and store the power consumption log.
  5. 根据权利要4所述的方法,其特征在于,所述导出所述耗电日志并将所述耗电日志进行存储,包括:The method according to claim 4, wherein the deriving the power consumption log and storing the power consumption log comprises:
    获取所述耗电日志的查看时间段;Acquiring the viewing time period of the power consumption log;
    获取所述查看时间段对应的所有耗电日志;Obtain all power consumption logs corresponding to the viewing time period;
    导出所述所有耗电日志并将所述所有耗电日志进行存储。Export all the power consumption logs and store all the power consumption logs.
  6. 根据权利要4或5所述的方法,其特征在于,在所述导出所述耗电日志并将所述耗电日志进行存储之后,所述方法还包括:The method according to claim 4 or 5, wherein after the exporting the power consumption log and storing the power consumption log, the method further comprises:
    生成与所述耗电日志对应的网页信息,并通过网页界面的形式展示所述网页信息。Generate web page information corresponding to the power consumption log, and display the web page information in the form of a web interface.
  7. 根据权利要求6所述的方法,其特征在于,在所述生成与所述耗电日志对应的网页信息,并通过网页界面的形式展示所述网页信息之前,所述方法还包括:The method according to claim 6, characterized in that, before said generating webpage information corresponding to said power consumption log and displaying said webpage information in a form of a webpage interface, said method further comprises:
    获取所述耗电日志中的多个时间戳,所述时间戳为获取到所述温度信息时对应的时间节点;Acquiring multiple timestamps in the power consumption log, where the timestamps are corresponding time nodes when the temperature information is acquired;
    根据所述多个时间戳以及所述多个时间戳对应的所述温度信息,生成所述主板的温度状态曲线,所述温度状态曲线用于表征所述主板的温度的状态变化轨迹;Generating a temperature state curve of the motherboard according to the multiple time stamps and the temperature information corresponding to the multiple time stamps, where the temperature state curve is used to characterize the temperature state change track of the motherboard;
    所述生成与所述耗电日志对应的网页信息,并通过网页界面的形式展示所述网页信息,包括:The generating web page information corresponding to the power consumption log and displaying the web page information in the form of a web interface includes:
    生成与所述温度状态曲线对应的网页信息,并通过网页界面的形式展示所述温度状态曲线。The web page information corresponding to the temperature state curve is generated, and the temperature state curve is displayed in the form of a web page interface.
  8. 根据权利要求4-7任一项所述的方法,其特征在于,在所述导出所述耗电日志并将所述耗电日志进行存储之后,所述方法还包括:The method according to any one of claims 4-7, wherein after the exporting the power consumption log and storing the power consumption log, the method further comprises:
    将所述耗电日志发送至终端设备,所述终端设备用于根据所述耗电日志生成网页信息,所述网页信息用于终端设备以网页界面的形式展示所述耗电日志。The power consumption log is sent to a terminal device, and the terminal device is configured to generate webpage information according to the power consumption log, and the webpage information is used for the terminal device to display the power consumption log in the form of a web interface.
  9. 根据权利要求2-8任一项所述的方法,其特征在于,所述设置界面还包括第三控件,所述第三控件用于触发清除耗电日志的功能,在所述根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志之后,所述方法还包括:The method according to any one of claims 2-8, wherein the setting interface further comprises a third control, and the third control is used to trigger the function of clearing the power consumption log. After the electricity information and the temperature information are generated for displaying the electricity consumption log, the method further includes:
    当检测到对所述第三控件的触发操作时,对生成的耗电日志进行清除。When a trigger operation on the third control is detected, the generated power consumption log is cleared.
  10. 根据权利要求1-9任一项所述的方法,其特征在于,所述获取所述主板的温度信息,包括:The method according to any one of claims 1-9, wherein the acquiring temperature information of the main board comprises:
    当检测到所述电池的状态参数发生变化时,获取所述主板的温度信息。When a change in the state parameter of the battery is detected, the temperature information of the main board is acquired.
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述电子设备还包括温度传感器,所述温度传感器设置于所述主板上且远离所述主板的热源位置,所述获取所述主板的温度信息,包括:The method according to any one of claims 1-10, wherein the electronic device further comprises a temperature sensor, the temperature sensor is arranged on the main board and far away from a heat source position of the main board, and the obtaining Describe the temperature information of the motherboard, including:
    获取所述温度传感器检测到的温度信息,作为所述主板的温度信息。The temperature information detected by the temperature sensor is acquired as temperature information of the motherboard.
  12. 根据权利要求11所述的方法,其特征在于,在获取所述温度传感器检测到的温度信息之前,所述方法还包括:The method according to claim 11, wherein before acquiring the temperature information detected by the temperature sensor, the method further comprises:
    通过thermal framework(热框架)模块控制所述温度传感器开启。The temperature sensor is controlled to be turned on through a thermal framework module.
  13. 根据权利要求11或12所述的方法,其特征在于,所述耗电信息包括所述电池的剩余电量,所述方法还包括:The method according to claim 11 or 12, wherein the power consumption information includes the remaining power of the battery, and the method further comprises:
    当所述剩余电量小于电量阈值时,控制所述温度传感器关闭。When the remaining power is less than the power threshold, the temperature sensor is controlled to turn off.
  14. 根据权利要求1-13任一项所述的方法,其特征在于,所述获取对所述电池耗电的耗电信息,包括:The method according to any one of claims 1-13, wherein the acquiring power consumption information of the battery power consumption comprises:
    通过battery stats service(电量统计服务)模块获取对所述电池耗电的耗电信息;Obtain the power consumption information of the battery power consumption through the battery stats service (power statistics service) module;
    所述获取所述主板的温度信息,包括:The acquiring temperature information of the motherboard includes:
    通过所述battery stats service模块获取所述主板的温度信息。Obtain the temperature information of the motherboard through the battery stats service module.
  15. 根据权利要求14所述的方法,其特征在于,所述通过所述battery stats service模块获取所述主板的温度信息,包括:The method according to claim 14, wherein the obtaining the temperature information of the main board through the battery stats service module comprises:
    通过power native daemon(电源本地守护进程)模块每隔预设时长从sysfs接口读取温控管理区间模块检测到的主板的温度信息;The power native daemon (power local daemon) module reads the temperature information of the motherboard detected by the temperature control management interval module from the sysfs interface at a preset time interval;
    通过syetem power service(系统电源服务)模块接收所述power native daemon模块上传的所述温度信息;Receive the temperature information uploaded by the power native daemon module through a system power service (system power service) module;
    通过所述battery stats service模块接收所述syetem power service模块上传的所述温度信息。The temperature information uploaded by the system power service module is received through the battery stats service module.
  16. 根据权利要求14或15所述的方法,其特征在于,所述根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志,包括:The method according to claim 14 or 15, wherein the generating a power consumption log for display according to the power consumption information and the temperature information comprises:
    通过所述battery stats service模块对所述耗电信息以及所述温度信息进行整合,获得用于展示的耗电日志。The power consumption information and the temperature information are integrated through the battery stats service module to obtain a power consumption log for display.
  17. 根据权利要求1-16任一项所述的方法,其特征在于,在所述根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志之后,所述方法还包括:The method according to any one of claims 1-16, wherein after generating a power consumption log for display according to the power consumption information and the temperature information, the method further comprises:
    根据所述耗电日志对所述耗电信息以及所述温度信息进行处理分析,获得处理分析结果;Processing and analyzing the power consumption information and the temperature information according to the power consumption log to obtain a processing analysis result;
    如果基于所述处理分析结果,确定出耗电速度大于速度阈值且所述主板的温度大于温度阈值时,对处于后台的目标进程进行清理。If it is determined based on the processing analysis result that the power consumption speed is greater than the speed threshold and the temperature of the motherboard is greater than the temperature threshold, the target process in the background is cleaned up.
  18. 一种耗电信息的处理装置,其特征在于,应用于电子设备,所述电子设备包括主板以及电池,所述装置包括:耗电获取模块、温度获取模块以及日志生成模块,其中,A processing device for power consumption information, characterized in that it is applied to an electronic device, the electronic device includes a main board and a battery, and the device includes: a power consumption acquisition module, a temperature acquisition module, and a log generation module, wherein:
    所述耗电获取模块,用于获取对所述电池耗电的耗电信息;The power consumption acquisition module is used to acquire power consumption information on the battery power consumption;
    所述温度获取模块,用于获取所述主板的温度信息;The temperature acquisition module is used to acquire temperature information of the motherboard;
    所述日志生成模块,用于根据所述耗电信息以及所述温度信息,生成用于展示的耗电日志。The log generation module is configured to generate a power consumption log for display according to the power consumption information and the temperature information.
  19. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    一个或多个处理器;One or more processors;
    存储器;Memory
    一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行如权利要求1-17任一项所述的方法。One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to execute The method of any one of claims 1-17.
  20. 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-17任一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium stores program code, and the program code can be called by a processor to execute the method according to any one of claims 1-17 .
PCT/CN2019/112316 2019-10-21 2019-10-21 Power consumption information processing method, device, electronic apparatus and storage medium WO2021077260A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/112316 WO2021077260A1 (en) 2019-10-21 2019-10-21 Power consumption information processing method, device, electronic apparatus and storage medium
CN201980099288.3A CN114222978A (en) 2019-10-21 2019-10-21 Power consumption information processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/112316 WO2021077260A1 (en) 2019-10-21 2019-10-21 Power consumption information processing method, device, electronic apparatus and storage medium

Publications (1)

Publication Number Publication Date
WO2021077260A1 true WO2021077260A1 (en) 2021-04-29

Family

ID=75619811

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/112316 WO2021077260A1 (en) 2019-10-21 2019-10-21 Power consumption information processing method, device, electronic apparatus and storage medium

Country Status (2)

Country Link
CN (1) CN114222978A (en)
WO (1) WO2021077260A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11435914B2 (en) * 2020-03-30 2022-09-06 Western Digital Technologies, Inc. Dynamic ZNS open zone active limit

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114706602B (en) * 2022-04-01 2023-03-24 珠海读书郎软件科技有限公司 Android-based method for updating parameters of touch screen through app

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098392A (en) * 2011-01-25 2011-06-15 中兴通讯股份有限公司 Energy-saving device and method for portable terminal
CN107566624A (en) * 2017-08-25 2018-01-09 维沃移动通信有限公司 A kind of power consumption of terminal and the display methods of temperature and terminal
CN107797830A (en) * 2017-11-12 2018-03-13 佛山市百里洲科技有限公司 A kind of temperature controlled method of mobile terminal
CN107959314A (en) * 2016-10-17 2018-04-24 中兴通讯股份有限公司 A kind of trickle charge method for electrically and intelligent terminal
CN108009068A (en) * 2017-11-30 2018-05-08 广东欧珀移动通信有限公司 Information recording method, information record carrier and intelligent terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102098392A (en) * 2011-01-25 2011-06-15 中兴通讯股份有限公司 Energy-saving device and method for portable terminal
CN107959314A (en) * 2016-10-17 2018-04-24 中兴通讯股份有限公司 A kind of trickle charge method for electrically and intelligent terminal
CN107566624A (en) * 2017-08-25 2018-01-09 维沃移动通信有限公司 A kind of power consumption of terminal and the display methods of temperature and terminal
CN107797830A (en) * 2017-11-12 2018-03-13 佛山市百里洲科技有限公司 A kind of temperature controlled method of mobile terminal
CN108009068A (en) * 2017-11-30 2018-05-08 广东欧珀移动通信有限公司 Information recording method, information record carrier and intelligent terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11435914B2 (en) * 2020-03-30 2022-09-06 Western Digital Technologies, Inc. Dynamic ZNS open zone active limit

Also Published As

Publication number Publication date
CN114222978A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
EP3502880B1 (en) Method for preloading application, storage medium, and terminal device
CN109947496B (en) Application program preloading method and device, storage medium and mobile terminal
US9489067B2 (en) Scalable touchscreen processing with realtime role negotiation among asymmetric processing cores
CN111176960B (en) User operation behavior tracking method, device, equipment and storage medium
WO2018032581A1 (en) Method and apparatus for application program control
US10908920B2 (en) Method for preloading application, computer readable storage medium, and terminal device
JP6076501B2 (en) Method, apparatus, facility, system, program, and recording medium for controlling on / off of wireless network
CN106777009B (en) Intelligent equipment and task plan execution control method and device
US10564694B2 (en) Power management method and power management apparatus for user equipment
WO2021077260A1 (en) Power consumption information processing method, device, electronic apparatus and storage medium
JP5568689B2 (en) System and method for optimizing the composition of a set of performance scaling algorithms
CN107302633B (en) Application control method, device, storage medium and electronic equipment
WO2018086454A1 (en) Page data processing method and device
CN107544898A (en) Data capture method, device, equipment and storage medium
WO2017206918A1 (en) Terminal awakening accelerating method and related product
CN110032321A (en) Applied program processing method and device, electronic equipment, computer readable storage medium
CN107734618B (en) Application program closing method and device, storage medium and electronic equipment
TW201617984A (en) Electronic devices and service management methods thereof
CN107341094B (en) Method and device for measuring time consumed by starting item
WO2023123614A1 (en) Data processing method and apparatus, terminal, and storage medium
CN110876098A (en) Audio processing method and electronic equipment
CN108803857A (en) Application software energy consumption monitoring method, mobile terminal and readable storage medium storing program for executing
CN106843440B (en) A kind of mobile terminal restarts control method, device and mobile terminal
WO2017206889A1 (en) Sensor calling function shutdown method and apparatus, storage medium, and electronic device
WO2020103027A1 (en) Network power consumption adjustment method, network power consumption adjustment device, and mobile terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19949839

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19949839

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19949839

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 13.10.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19949839

Country of ref document: EP

Kind code of ref document: A1