CN112243060B - Power consumption estimation method of processor, mobile terminal and computer storage medium - Google Patents

Power consumption estimation method of processor, mobile terminal and computer storage medium Download PDF

Info

Publication number
CN112243060B
CN112243060B CN202011197547.7A CN202011197547A CN112243060B CN 112243060 B CN112243060 B CN 112243060B CN 202011197547 A CN202011197547 A CN 202011197547A CN 112243060 B CN112243060 B CN 112243060B
Authority
CN
China
Prior art keywords
power consumption
processor
factor data
correlation
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011197547.7A
Other languages
Chinese (zh)
Other versions
CN112243060A (en
Inventor
洪成文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202011197547.7A priority Critical patent/CN112243060B/en
Publication of CN112243060A publication Critical patent/CN112243060A/en
Application granted granted Critical
Publication of CN112243060B publication Critical patent/CN112243060B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R19/00Arrangements for measuring currents or voltages or for indicating presence or sign thereof
    • G01R19/0092Arrangements for measuring currents or voltages or for indicating presence or sign thereof measuring current only
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R21/00Arrangements for measuring electric power or power factor
    • G01R21/006Measuring power factor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Telephone Function (AREA)
  • Power Sources (AREA)

Abstract

The application discloses a power consumption estimation method of a processor, a mobile terminal and a computer storage medium. The power consumption estimation method includes: acquiring a plurality of power consumption factor data of a processor; and obtaining current data of the processor; an estimated power consumption of the processor is determined based on the current data and the plurality of power consumption factor data. By means of the method, the power consumption of the processor can be effectively estimated, and the power consumption of the processor can be accurately estimated in real time, so that the power consumption of the processor can be estimated and optimized.

Description

Power consumption estimation method of processor, mobile terminal and computer storage medium
Technical Field
The present application relates to the field of power consumption technologies, and in particular, to a power consumption estimation method for a processor, a mobile terminal, and a computer storage medium.
Background
With the development of network technology and related technologies, smart phones are more and more popular, hardware processing capability is stronger and software applications are supported more and more. In terms of performance, users have new requirements on data transmission speed and standby time of the smart phone, and in terms of machine type, higher requirements on the light and thin degree of the body of the smart phone are provided.
However, the accommodating space for storing the battery of the smart phone is limited, and how to improve the standby time and the endurance time is significant and very challenging for the limited battery capacity. The current power consumption scheme mainly solves the power consumption situation of the smart phone from a scheme at a software level by adjusting the brightness or switching the power consumption mode of the smart phone, such as a method for switching between a power saving mode, an emergency power consumption mode and a normal power consumption mode.
At present, for the power consumption condition of a processor, actual measurement needs to be performed by equipment, which often needs to disassemble a smart phone, so that the internal structure of the smart phone is damaged, and therefore, the power consumption of hardware such as the processor cannot be tested in real time, real-time power consumption data cannot be obtained, and further power consumption optimization of the processor on the basis is limited.
Disclosure of Invention
A first aspect of an embodiment of the present application provides a power consumption estimation method for a processor, including: acquiring a plurality of power consumption factor data of a processor; and obtaining current data of the processor; an estimated power consumption of the processor is determined based on the current data and the plurality of power consumption factor data.
A second aspect of an embodiment of the present application provides a mobile terminal, including: the acquisition module is used for acquiring a plurality of power consumption factor data of the processor; the acquisition module is also used for acquiring current data of the processor; and the determining module is connected with the acquiring module and used for determining the estimated power consumption of the processor according to the current data and the plurality of power consumption factor data.
A third aspect of an embodiment of the present application provides a mobile terminal, including: the apparatus includes a processor, a memory, and a computer program stored in the memory and running on the processor, the processor being configured to execute the computer program to implement the method provided by the first aspect of the embodiments of the present application.
A fourth aspect of embodiments of the present application provides a computer storage medium storing a computer program, which is capable of implementing the method provided by the first aspect of embodiments of the present application when executed by a processor.
The beneficial effect of this application is: different from the situation of the prior art, the method and the device for determining the estimated power consumption of the processor acquire a plurality of power consumption factor data and current data of the processor in real time aiming at the power consumption of the processor, and determine the estimated power consumption of the processor according to the plurality of power consumption factor data and the current data acquired in real time. By means of the method, the power consumption of the processor can be effectively determined, and the power consumption of the processor can be accurately estimated in real time, so that the power consumption of the processor can be estimated and optimized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram illustrating a first embodiment of a power consumption estimation method for a processor according to the present application;
FIG. 2 is a flow chart of a second embodiment of a power consumption estimation method of a processor according to the present application;
FIG. 3 is a flowchart illustrating an embodiment of step S21 shown in FIG. 2;
FIG. 4 is a flowchart illustrating one embodiment of step S22 shown in FIG. 2;
FIG. 5 is a flow chart illustrating a power consumption estimation method according to a third embodiment of the present application;
FIG. 6 is a schematic block diagram of an embodiment of a mobile terminal of the present application;
FIG. 7 is a schematic block diagram of another embodiment of a mobile terminal of the present application;
FIG. 8 is a schematic block diagram of one embodiment of a computer storage medium of the present application;
fig. 9 is a schematic block diagram of a hardware architecture of a mobile terminal of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Referring to fig. 1, fig. 1 is a schematic flowchart of a first embodiment of a power consumption estimation method for a processor according to the present application, where the method provided in this embodiment specifically includes the following steps:
s11: acquiring a plurality of power consumption factor data of a processor;
theoretically, with the development of smart phones, the power consumption of the smart phones is increased by factors such as larger display screens, more processors with more cores, and more diversified wireless connection technologies. Meanwhile, the functions of the mobile phone are more and more, and the frequency of the use of the mobile phone is more and more frequent, so that the optimization and management of the power consumption performance of the mobile phone are more important. Such as going to sleep more quickly when not operating the handset, transmitting wireless signals in a pulsed manner, discontinuous reception and discontinuous transmission, etc.
In order to optimize and improve the power consumption of the mobile phone processor, it is necessary to know the power consumption characteristics of the mobile phone processor or to find out which power consumption performance defects exist in the mobile phone, which is a goal. The power factor data of the processor is multiple, and mainly includes various factors such as the number of cores, frequency, screen, manufacturing process, resolution and the like. To study the characteristics of these power consumption factors, a plurality of power consumption factor data for the processor may be obtained.
It should be noted that, although the types of the multiple power consumption factors of the processor are generally fixed, the sizes of the multiple power consumption factors are allowed to change in real time, that is, the sizes of the multiple power consumption factors of the processor can change with time. Therefore, in order to more accurately acquire the power consumption factor data, acquisition of a plurality of power consumption factors is in real time.
S12: acquiring current data of a processor;
the processor at least comprises: a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processor (DSP), and a core computing Unit (Computer DSP, CDSP) of the DSP.
Typically, current data of the processor is obtained, which may be a reference current at a reference frequency. By its nature, the current data of a processor is actually both tied to and distinct from the plurality of power consumption factors, in part, the current data exists in dependence on the other plurality of power consumption factors, and changes in real time as the type of processor differs. In addition, the power consumption adjustment of the processor mainly comprises methods of temperature rise, sleep, frame falling, brightness adjustment and the like, and all the factors also have certain influence on the current data of the processor.
Therefore, to ensure the accuracy of the current data of the processor, the current data of the processor may be acquired while acquiring the plurality of power consumption factor data of the processor or the time interval between acquiring the plurality of power consumption factor data of the processor and acquiring the current data of the processor may be set to be short, such as 1 second. Of course, the selection of the operation according to the actual needs is fully conceivable by those skilled in the art in the light of the teachings of the present application, and is not limited herein.
S13: an estimated power consumption of the processor is determined based on the current data and the plurality of power consumption factor data.
For a processor, the power consumption, i.e., power, of the processor is generally related to its operating state, so that when the handset is in standby, power is generally available for when the handset is not operating. If the program is running at full load, the power consumption of the processor is higher than the standby power, as is the case for the CDSP. From steps S11 and S12, a plurality of power consumption factors and current data are closely coupled to the estimated power consumption of the processor.
In general, the power consumption of a processor includes two types: one is dynamic power consumption, which is consumed in logic conversion, wherein the current data is equivalent to the dynamic power consumption; the other is static power consumption, such as leakage existing in a transistor, wherein a plurality of power consumption factors are equivalent to the static power consumption, and the proportion of the static power consumption is larger and larger with the continuous refinement of the process.
For the calculation of the estimated power consumption of the processor, there often exists a corresponding formula, and the estimated power consumption of the processor may be determined according to the current data and the plurality of power consumption factor data, and specifically, the estimated power consumption of the processor may be obtained by inputting the current data and the plurality of power consumption factor data into the corresponding calculation formula for calculation processing.
Therefore, the method and the device can acquire a plurality of power consumption factor data and current data of the processor in real time aiming at the power consumption of the processor, and determine the estimated power consumption of the processor according to the plurality of power consumption factor data and the current data acquired in real time. By means of the method, the power consumption of the processor can be effectively determined, and the power consumption of the processor can be accurately estimated in real time, so that the power consumption of the processor can be estimated and optimized.
Referring to fig. 2, fig. 2 is a flowchart illustrating a power consumption estimation method of a processor according to a second embodiment of the present application. The method provided by this embodiment specifically includes the following steps in addition to the contents included in steps S11 to S13 in fig. 1:
s21: determining a preset number of power consumption factor data meeting the correlation requirement from the plurality of power consumption factor data;
as can be seen from step S11 in fig. 1, the acquired power consumption factor data includes a plurality of factors, such as core number, frequency, screen, process, resolution, etc., and in order to more accurately estimate the power consumption of the processor, the power consumption factor most closely related to the power consumption of the processor may be selected.
Specifically, a preset number of power consumption factor data satisfying the correlation requirement is determined from the plurality of power consumption factor data. Specifically, for example, the power consumption factors with a preset number include an effective frequency (effeq) of the processor in an operating state, a number of instructions per second (MPPS) processed, and a Total data bandwidth (Total Band Width, totalBW), where the MPPS represents millions of packets per second, and indicates a packet forwarding rate, that is, a port throughput.
S22: collecting a preset number of power consumption factor data;
generally, a performance detection unit for monitoring power consumption factor data is arranged on a processor, the performance detection unit can be connected with a data storage unit through an interface, and can count a plurality of monitored power consumption factor data through a counter and store the corresponding data in the data storage unit.
For example, for a digital signal processor, acquiring a preset number of power consumption factor data may specifically include: reading a count value corresponding to a power consumption factor in a counter of the DSP through an interface of a performance monitoring unit of the processor; and inputting conversion formulas corresponding to the count values respectively to convert the count values so as to reach the corresponding power consumption factors.
S23: and determining the estimated power consumption of the processor according to the current data and the preset number of power consumption factor data.
The power consumption of the processor is determined based on the current data and the plurality of power consumption factor data. Specifically, three power consumption factors, namely effective frequency, instruction number processed per second and data bandwidth, are selected through analysis of current data and preset quantity of power consumption factor data, calculation and analysis are performed by adopting a formula according to correlation requirements, specifically, hardware running conditions are collected through software embedded points, namely the power consumption factors are collected through the software embedded points, software energy calculation is performed, namely the power consumption is subjected to fitting calculation, and therefore the power consumption of the processor is determined.
In addition, of course, it is fully conceivable for those skilled in the art to process the current data and the preset number of power consumption factor data to obtain the estimated power consumption of the processor according to actual needs, and the details are not limited herein.
Referring to fig. 3, regarding determining a preset number of power consumption factor data satisfying the correlation requirement from the plurality of power consumption factor data, fig. 3 is a flowchart illustrating an embodiment of step S21 shown in fig. 2; the method specifically comprises the following steps:
s31: determining a first correlation of every two power consumption factor data in the plurality of power consumption factor data, and selecting a first number of power consumption factor data of which the correlation meets a preset correlation requirement;
for example, a correlation threshold, such as 0.1, 0.05, 0.005, etc., is preset in the processor for determining a correlation between every two power consumption factors, and when a preset correlation requirement is met, if the preset correlation threshold is smaller than the set correlation threshold, the correlation between the two power consumption factors is considered to be small, that is, the two power consumption factors are independent of each other.
Then, a plurality of power consumption factors are obtained, each power consumption factor has a fixed formula based on consideration of the type and the number of the power consumption factors, the power consumption factors can be converted into data with the unit same as that of the current data through the fixed formulas, so that the first correlation of every two power consumption factor data in the power consumption factor data is determined, and then the first power consumption factor data with the correlation smaller than a set correlation threshold value is selected, specifically, the first correlation can be calculated by adopting the following formula:
Figure BDA0002754437610000071
where x, y represent two different power consumption factors,
Figure BDA0002754437610000072
respectively, the mean values of x and y, correl (x, y) epsilon [0,1]Representing the correlation coefficient of the variables x, y.
S32: determining a second correlation between each power consumption factor data in the first quantity of power consumption factor data and the set power consumption parameter, and selecting a second quantity of power consumption factor data of which the correlation meets preset correlation requirements;
the preset power consumption parameter can be current data, is used for giving a reference for selecting the power consumption factor, and provides a prerequisite for selecting the power consumption factor with high correlation with the power consumption of the processor.
Then, a first number of power consumption factors are obtained, each power consumption factor has a fixed formula based on consideration of the type and the number of the power consumption factors, the first number of power consumption factors can be converted into data with the unit same as that of the current data through the fixed formulas, so that a second correlation between each power consumption factor data in the first number of power consumption factor data and a set power consumption parameter is determined, a second number of power consumption factor data with the correlation meeting preset correlation requirements is selected, and the second correlation is calculated by specifically adopting the following formula:
Figure BDA0002754437610000073
wherein a represents a plurality of different power consumption factors, b represents the set power consumption parameter,
Figure BDA0002754437610000074
represents the mean of a, b, respectively, correl (a, b) e [0,1]Representing the correlation coefficient of the variables a, b.
According to the requirement of the correlation of the power consumption factors, three power consumption factors aiming at effective frequency, the number of instructions processed per second and data bandwidth can be selected, independence between every two power consumption factors can be kept, the calculated second correlation data are sequenced, and then the power consumption factor corresponding to the larger correlation is selected, so that the degree of relation with the power consumption of the processor is improved, and the accuracy of the calculated power consumption of the processor is improved.
It should be noted that the sequence between step S31 and step S32 is not limited, for example, step S32 may precede step S31, and if step S32 is preceded by step S31, the calculation degree of formula (1) may be greatly reduced, but the sequence between step S31 and step S32 may be arranged anyway, so long as the power consumption factor meeting the requirement is selected.
S33: an estimated power consumption of the processor is determined based on the current data and the second quantity of power consumption factor data.
Before calculating the estimated power consumption of the processor, the current data and the second number of power consumption factor data should be collected, actually, the collected power consumption factor is a count value corresponding to the collected power consumption factor, and with respect to collecting the preset number of power consumption factor data, please refer to fig. 4, where fig. 4 is a flowchart of an embodiment of step S22 shown in fig. 2, and specifically includes the following steps:
s41: acquiring a count value of at least one counter in a processor;
it should be noted that, to obtain these counter values, the events (events) need to be registered in advance, and after the registration is successful, the corresponding counter values can be read into the corresponding registers. A count value of at least one counter in a processor is obtained, wherein each counter counts based on an operation of the processor.
Wherein, the value of counter that can be read from the DSP at least includes: the Number of packets Executed (Number _ pkts _ Executed), AXI _4_Beat _Rd _Req (40), AXI _4_Beat _Rd _Req (41), AXI _ Wr _ Req (42), and AXI _4_Beat _Wr _Req (43). Take AXI _ Rd _ Req (40) as an example: (40) Refers to the registration ID of this counter event, the previous AXI _ Rd _ Req is the event name.
S42: determining a preset number of power consumption factor data according to the count value;
the preset number of power consumption factors at least comprises at least one of effective frequency of the processor under a reference frequency, instruction number processed per second and data bandwidth;
the effective frequency is calculated using the following formula:
effeFeq=(#processorcycles)/(times×10 6 ) (3)
the processor cycles represent the frequency in the processor cycle, wherein a rising edge and a falling edge are denoted as a cycle (cycles), and the effeq may also represent the Average frequency (MHz) of the processor, including the AllWait state (Average frequency of the processor (MHz)).
Or
Calculating the number of instructions processed per second using the following formula:
MPPS=Number_pkts_Executed(3)/Times(s)×10 6 (4)
wherein, MPPS represents Millions of Packets Per Second (MPPS), and Number _ pkts _ Executed (3) represents packet forwarding rate;
or
Calculating the data bandwidth using the following formula
TotalBW=AXI_Rd_BW+AXI_Wr_BW (5)
Wherein AXI _ Rd _ BW represents the data bandwidth read by the processor as follows:
Figure BDA0002754437610000091
and AXI _ Wr _ BW indicates that the data bandwidth written by the processor is expressed as follows:
Figure BDA0002754437610000092
where AXI _ Rd _ Req (40) represents All read requests issued by the primary AXI device, including full lines and partial lines (All read requests issued by primary AXI master. AXI _4_Beat _Rd _Req (41) represents a 32-byte line read request issued by a master AXI master (32-byte line read requests issued by primary AXI master). AXI _ Wr _ Req (42) represents All write requests issued by the master AXI master, including full and partial lines (All write requests issued by primary AXI master. AXI _4_Beat _Wr _Req (43) represents a 32 byte line write request issued by a master AXI master, all bytes being valid (32-byte line write requests issued by y primary AXI master, all bytes valid.). AXI _ RD _ BW, in (MB/s), represents the AXI Read Bandwidth, including all buffered and Uncached traffic (AXI Read Bandwidth including Cached and Uncached traffic). AXI _ WR _ BW, in (MB/s), represents AXI Write Bandwidth, including all buffered and Uncached traffic (AXI Write Bandwidth including Cached and Uncached traffic).
Thus, determining an estimated power consumption of the processor from the current data and the plurality of power consumption factor data, in particular, the estimated power consumption of the processor may be determined, for example, from the power data and the second number of power consumption factors, in particular comprising:
inputting the current data and the plurality of power consumption factor data to the following power consumption model to calculate an estimated power consumption of the processor:
P=(a 1 ×ΔFeq+a 2 ×ΔMPPS+a 3 ×ΔBW)+BaseCur)×T (8)
wherein P represents power consumption, T represents time, a 1 ,a 2 ,a 3 The effective frequency, the number of instructions processed per second, the data bandwidth and the reference current are respectively represented by Δ Feq = effeq-BaseFeq, Δ MPPS = MPPS-BaseMPPS, Δ BW = TotalBW-BaseBW, effeq, MPPS and TotalBW respectively represent the effective frequency, the number of instructions processed per second and the data bandwidth at the operating frequency of the processor, and BaseFeq, basepps, baseBW and BaseCur respectively represent the effective frequency, the number of instructions processed per second, the data bandwidth and the reference current at the reference frequency.
Further, before inputting the current data and the plurality of power consumption factor data into the following power consumption model, calculating a 1 ,a 2 ,a 3 . Because the count value and the current value which are used as the original data are often fluctuated greatly, the power consumption model does not need too abrupt input parameters, the input parameters are kept in certain relation with the previous parameters, the original data need to be processed by using a sliding average, namely, the count value and the current value are processed by smoothing, so that the suppression of the parameters on the abrupt change factors is kept, wherein the sliding average processing is that the original data are weighted and averaged by using the previous data and the next data, and the processed data curve is smoother.Then fitting the power consumption model by using a least square method to obtain a coefficient a 1 ,a 2 ,a 3 The formula specifically adopted is as follows:
Figure BDA0002754437610000101
wherein θ = [ Δ Feq, Δ MPPS, Δ BW],
Figure BDA0002754437610000102
C = baseCur, Y = current, before the smart phone leaves the factory, Y is that the power consumption machine is read through a port in the model training stage, and after the power consumption model training is finished, current data can be predicted by only reading a count value, calculating a power consumption factor and multiplying the power consumption factor by a corresponding multiple, and the current data can be used as an actual current value.
Obtaining coefficient a by inversion of the rank sum of the matrix 1 ,a 2 ,a 3 The following formula is used:
Figure BDA0002754437610000111
wherein,
Figure BDA0002754437610000112
θ=[ΔFeq,ΔMPPS,ΔBW],θ T for a transition rank of θ, C = BaseCur, Y = current represents the actual current at the processor operating frequency.
For the obtained second preset number of power consumption factors, such as the effective frequency, the number of instructions processed per second and the data bandwidth, the coefficient a corresponding to the effective frequency, the number of instructions processed per second and the data bandwidth can be calculated by the equations (9) and (10) 1 ,a 2 ,a 3 And further, a power consumption ratio corresponding to each power consumption factor is obtained, and a further theoretical basis is provided for optimizing the DSP power consumption of the mobile phone.
Referring to fig. 5, fig. 5 is a schematic flow chart of a third embodiment of a power consumption estimation method for a processor according to the present application, where the method provided in this embodiment specifically includes the following steps in addition to the first embodiment and the second embodiment:
s51: acquiring actual power consumption information of a processor and estimated power consumption of the processor;
for the smart phone, historical power consumption information of the processor can be actually obtained from big data, power consumption condition data of the processor is collected, the big data is used for analyzing, actual power consumption of the same type of processor can be obtained, then estimated power consumption of the processor is obtained, and analysis can be carried out through comparison: for example, whether the power consumption of the CDSP is abnormal.
Of course, the actual power consumption information of the processor and the estimated power consumption of the processor may be obtained by other means known in the art, and are not limited herein.
S52: judging whether the error between the actual power consumption information and the estimated power consumption is smaller than a preset threshold value or not;
usually, for the comparison between the actual power consumption information and the estimated power consumption, a threshold of the error may be set, for example, a preset threshold of 5% may be set, and of course, the preset threshold may also be set to 4%, 3%, 2%, or 1%.
Through further comparison, whether the error between the actual power consumption information and the estimated power consumption is smaller than a preset threshold value or not is judged, so that whether the power consumption of the processor is normal or reasonable or not can be judged. Specifically, if the difference is smaller than the preset threshold, it indicates that the error between the actual power consumption information and the estimated power consumption is smaller than the preset threshold, then the process proceeds to step S53: namely determining that the processor consumes normal power; if the error between the actual power consumption information and the estimated power consumption is greater than or equal to the preset threshold, the step S54 is performed: i.e. to determine that the processor is consuming normal power.
For example, ten thousand user data are provided, wherein 9999 user data are normal, if the preset threshold is set to be 5%, the error between one of the actual power consumption information and the estimated power consumption is 10%, and if the error exceeds 5%, the CDSP corresponding to the user is proved to be in an incorrect running state, and the power consumption is abnormal. Therefore, the method provides an idea and a theoretical basis for optimizing the abnormal power consumption conditions, and has direct help for analyzing the standby abnormal problem and improving the endurance time of the system.
Therefore, the power consumption of the hardware can be accurately estimated in real time by modeling the power consumption of the hardware and collecting the running condition of the hardware by the software embedded point. By collecting power consumption data and analyzing big data, pain points of power consumption can be found, so that the pain points can be optimized in performance and power consumption in a targeted manner, the power consumption of a system is reduced, and the competitiveness of products is improved.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application. The embodiment of the present application provides a mobile terminal 6, including:
an obtaining module 61, configured to obtain multiple power consumption factor data of a processor; and
the acquisition module 61 is further configured to acquire current data of the processor;
and the determining module 62 is connected to the obtaining module 61 and is used for determining the estimated power consumption of the processor according to the current data and the plurality of power consumption factor data.
Therefore, the method and the device can acquire a plurality of power consumption factor data and current data of the processor in real time aiming at the power consumption of the processor, and determine the estimated power consumption of the processor according to the plurality of power consumption factor data and the current data acquired in real time. By means of the method, the power consumption of the processor can be effectively determined, and the power consumption of the processor can be accurately estimated in real time, so that the power consumption of the processor can be estimated and optimized.
Further, please refer to fig. 7, where fig. 7 is a schematic structural diagram of another mobile terminal according to an embodiment of the present application. The embodiment of the present application provides a mobile terminal 7, including: the processor 71, the memory 72, and the computer program 721 stored in the memory and running on the processor, the processor 71 is configured to execute the computer program 721 to implement the steps of the method provided in the first aspect of the embodiment of the present application, which are not described herein again.
Referring to fig. 8, fig. 8 is a schematic circuit block diagram of an embodiment of the device with memory function according to the present application. If implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in the means 80 with storage function. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage device and includes instructions (computer program 81) for causing a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. The aforementioned storage device includes: various media such as a usb disk, a portable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and electronic devices such as a computer, a mobile phone, a notebook computer, a tablet computer, and a camera having the storage medium.
The description of the execution process of the computer program 81 in the device with a storage function may refer to the embodiment of the power consumption estimation method of the processor in the present application, and will not be described herein again.
Referring to fig. 9, fig. 9 is a schematic block diagram of a hardware architecture of a mobile terminal according to the present application, where the mobile terminal device may be a mobile phone, a tablet computer, a notebook computer, a wearable device, and the like, and the mobile terminal device is illustrated in the present embodiment by taking a mobile phone as an example. The terminal apparatus 900 may be configured to include a Radio Frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a WiFi (wireless fidelity) module 970, a processor 980, a power supply 990, and the like. Wherein the RF circuit 910, the memory 920, the input unit 930, the display unit 940, the sensor 950, the audio circuit 960, and the WiFi module 970 are respectively connected to the processor 980; the power supply 990 is used to supply power to the entire terminal apparatus 900.
Specifically, the RF circuit 910 is used for transmitting and receiving signals; the memory 920 is used for storing data instruction information; the input unit 930 is used for inputting information, and may specifically include a touch screen 931 and other input devices 932 such as operation keys; the display unit 940 may include a display panel or the like; the sensor 950 includes an infrared sensor, a laser sensor, etc. for detecting a user approach signal, a distance signal, etc.; a speaker 961 and a microphone (or microphone) 962 are coupled to the processor 980 via the audio circuit 960 for receiving and transmitting sound signals; the WiFi module 970 is configured to receive and transmit WiFi signals, and the processor 980 is configured to process data information of the mobile terminal device.
The above description is only a part of the embodiments of the present application, and not intended to limit the scope of the present application, and all equivalent devices or equivalent processes performed by the contents of the specification and the drawings, or applied directly or indirectly to other related technical fields, are all included in the scope of the present application.

Claims (8)

1. A method for power consumption estimation of a processor, the method comprising:
acquiring a plurality of power consumption factor data of the processor;
determining a first correlation of every two power consumption factor data in the plurality of power consumption factor data, and selecting a first number of power consumption factor data of which the first correlation meets a preset correlation requirement;
determining a second correlation between each power consumption factor data in the first quantity of power consumption factor data and a set power consumption parameter, and selecting a second quantity of power consumption factor data of which the second correlation meets a preset correlation requirement; and
acquiring current data of the processor;
determining an estimated power consumption of the processor based on the current data and the second quantity of power consumption factor data;
the plurality of power consumption factor data have correlation, and the plurality of power consumption factor data have correlation with set power consumption parameters;
the determining a first correlation for every two power consumption factor data of the plurality of power consumption factor data comprises:
calculating the first correlation using the following formula:
Figure FDA0003719063550000011
where x, y represent two different power consumption factors,
Figure FDA0003719063550000012
respectively, the mean values of x and y, correl (x, y) epsilon [0,1]A correlation coefficient representing the variables x, y;
the determining a second correlation between each power consumption factor data of the first number of power consumption factor data and the set power consumption parameter includes:
calculating the second correlation using the following formula:
Figure FDA0003719063550000013
wherein a represents a plurality of different power consumption factors, b represents the set power consumption parameter,
Figure FDA0003719063550000014
denotes the mean of a, b, correl (a, b) ∈ [0,1]Representing the correlation coefficient of the variables a, b.
2. The method of claim 1,
the obtaining a plurality of power consumption factor data of the processor comprises:
acquiring a count value of at least one counter in the processor, wherein each counter counts based on the operation of the processor;
determining the plurality of power consumption factor data from the count value, wherein the plurality of power consumption factor data includes at least one of an effective frequency of the processor at a reference frequency, a number of instructions processed per second, and a data bandwidth.
3. The method of claim 2,
said determining an estimated power consumption of said processor based on said current data and said second quantity of power consumption factor data, comprising:
inputting the current data and the second quantity of power consumption factor data to the following power consumption model to calculate an estimated power consumption of the processor:
P=(a 1 ×ΔFeq+a 2 ×ΔMPPS+a 3 ×ΔBW)+BaseCur)×T
wherein P represents power consumption, T represents time, a 1 ,a 2 ,a 3 The effective frequency, the instruction number per second and the reference current are respectively represented by Δ Feq = effeq-BaseFeq, Δ MPPS = MPPS-BaseMPPS, Δ BW = TotalBW-BaseBW, effeq, MPPS and TotalBW respectively represent the effective frequency, the instruction number per second and the data bandwidth at the operating frequency of the processor, and BaseFeq, basepps, baseBW and BaseCur respectively represent the effective frequency, the instruction number per second, the data bandwidth and the reference current at the reference frequency.
4. The method of claim 3,
prior to said inputting said current data and said second quantity of power consumption factor data into a power consumption model comprising: calculating the a 1 ,a 2 ,a 3 The following formula is adopted:
Figure FDA0003719063550000021
wherein,
Figure FDA0003719063550000022
θ=[ΔFeq,ΔMPPS,ΔBW],θ T for a transition rank of θ, C = BaseCur, Y = current represents the actual current at the operating frequency of the processor.
5. The method of any one of claims 1 to 4, further comprising:
acquiring actual power consumption information of a processor and estimated power consumption of the processor;
judging whether the error between the actual power consumption information and the estimated power consumption is smaller than a preset threshold value or not;
and if the power consumption is smaller than the preset threshold value, determining that the processor consumes normal power.
6. A mobile terminal, comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a plurality of power consumption factor data of a processor, determining the first correlation of every two power consumption factor data in the plurality of power consumption factor data, and selecting a first number of power consumption factor data of which the first correlation meets the preset correlation requirement; then determining a second correlation between each power consumption factor data in the first quantity of power consumption factor data and a set power consumption parameter, and selecting a second quantity of power consumption factor data of which the second correlation meets a preset correlation requirement; the plurality of power consumption factor data have correlation, and the plurality of power consumption factor data have correlation with the set power consumption parameter; calculating the first correlation using the following formula:
Figure FDA0003719063550000031
where x, y represent two different power consumption factors,
Figure FDA0003719063550000032
respectively, the mean values of x and y, correl (x, y) epsilon [0,1]A correlation coefficient representing the variable x, y;
calculating the second correlation using the following formula:
Figure FDA0003719063550000033
wherein a represents a numberA number of different power consumption factors, b representing the set power consumption parameter,
Figure FDA0003719063550000034
represents the mean of a, b, respectively, correl (a, b) e [0,1]A correlation coefficient representing the variables a, b; and
the acquisition module is further used for acquiring current data of the processor;
and the determining module is connected with the acquiring module and used for determining the estimated power consumption of the processor according to the current data and the second quantity of power consumption factor data.
7. A mobile terminal, comprising: a processor and a memory, the memory having stored therein a computer program for executing the computer program to implement the method of any of claims 1-5.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when being executed by a processor, carries out the method according to any one of claims 1-5.
CN202011197547.7A 2020-10-30 2020-10-30 Power consumption estimation method of processor, mobile terminal and computer storage medium Active CN112243060B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011197547.7A CN112243060B (en) 2020-10-30 2020-10-30 Power consumption estimation method of processor, mobile terminal and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011197547.7A CN112243060B (en) 2020-10-30 2020-10-30 Power consumption estimation method of processor, mobile terminal and computer storage medium

Publications (2)

Publication Number Publication Date
CN112243060A CN112243060A (en) 2021-01-19
CN112243060B true CN112243060B (en) 2022-10-21

Family

ID=74169465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011197547.7A Active CN112243060B (en) 2020-10-30 2020-10-30 Power consumption estimation method of processor, mobile terminal and computer storage medium

Country Status (1)

Country Link
CN (1) CN112243060B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114879832A (en) * 2022-05-20 2022-08-09 昆仑芯(北京)科技有限公司 Power consumption control method, device, chip, apparatus, and medium for arithmetic device
CN115361586B (en) * 2022-10-19 2022-12-20 深圳市欣喜连连科技有限公司 Method, system and storage medium for automatically managing power consumption of HDMI (high-definition multimedia interface) of intelligent photo frame

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103033767A (en) * 2011-10-06 2013-04-10 鸿富锦精密工业(深圳)有限公司 Test method and test device for central processing unit parameters
CN103455132A (en) * 2013-08-20 2013-12-18 西安电子科技大学 Embedded system power consumption estimation method based on hardware performance counter
CN110308782A (en) * 2018-03-22 2019-10-08 阿里巴巴集团控股有限公司 Power consumption prediction, control method, equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9020770B2 (en) * 2011-06-27 2015-04-28 International Business Machines Corporation Estimating component power usage from aggregate power usage

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103033767A (en) * 2011-10-06 2013-04-10 鸿富锦精密工业(深圳)有限公司 Test method and test device for central processing unit parameters
CN103455132A (en) * 2013-08-20 2013-12-18 西安电子科技大学 Embedded system power consumption estimation method based on hardware performance counter
CN110308782A (en) * 2018-03-22 2019-10-08 阿里巴巴集团控股有限公司 Power consumption prediction, control method, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN112243060A (en) 2021-01-19

Similar Documents

Publication Publication Date Title
US11244672B2 (en) Speech recognition method and apparatus, and storage medium
US20230251702A1 (en) Optimizing power usage by factoring processor architectural events to pmu
US9460735B2 (en) Intelligent ancillary electronic device
CN112243060B (en) Power consumption estimation method of processor, mobile terminal and computer storage medium
JP6955092B2 (en) Methods for reducing terminal power consumption, and terminals
Han et al. E3: Energy-efficient engine for frame rate adaptation on smartphones
CN111475384B (en) Shell temperature calculation method and device, storage medium and electronic equipment
CN108664367B (en) Power consumption control method and device based on processor
CN108196482B (en) Power consumption control method and device, storage medium and electronic equipment
WO2019085754A1 (en) Application cleaning method and apparatus, and storage medium and electronic device
WO2023197933A1 (en) Signal processing method and apparatus, and electronic device and medium
CN112289336A (en) Audio signal processing method and device
JP7272694B2 (en) Method and terminal for reducing power consumption of terminal
CN112863545B (en) Performance test method, device, electronic equipment and computer readable storage medium
WO2016180241A1 (en) Energy-conservation management method and apparatus for terminal and terminal
CN112672405A (en) Power consumption calculation method and device, storage medium, electronic device and server
US20170075589A1 (en) Memory and bus frequency scaling by detecting memory-latency-bound workloads
US20160342540A1 (en) Low latency memory and bus frequency scaling based upon hardware monitoring
CN114444333B (en) Ecological water level analysis method and device, electronic equipment and storage medium
CN107547742B (en) Wake-up lock release method and device for mobile terminal
US8539132B2 (en) Method and system for dynamically managing a bus of a portable computing device
US9213585B2 (en) Controlling sprinting for thermal capacity boosted systems
WO2019085742A1 (en) Background application cleaning method and apparatus, and storage medium and electronic device
CN110418245B (en) Method and device for reducing reaction delay of Bluetooth sound box and terminal equipment
CN112102821B (en) Data processing method, device, system and medium applied to electronic equipment

Legal Events

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