CN114441848A - Power consumption determination method and device, electronic equipment and storage medium - Google Patents
Power consumption determination method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114441848A CN114441848A CN202210103250.2A CN202210103250A CN114441848A CN 114441848 A CN114441848 A CN 114441848A CN 202210103250 A CN202210103250 A CN 202210103250A CN 114441848 A CN114441848 A CN 114441848A
- Authority
- CN
- China
- Prior art keywords
- power consumption
- target
- target object
- electronic device
- fitting
- 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.)
- Withdrawn
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R21/00—Arrangements for measuring electric power or power factor
- G01R21/14—Compensating for temperature change
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Power Sources (AREA)
Abstract
Description
技术领域technical field
本申请涉及计算机技术领域,特别是涉及一种功耗确定方法、装置、电子设备、存储介质和计算机程序产品。The present application relates to the field of computer technology, and in particular, to a method, apparatus, electronic device, storage medium and computer program product for determining power consumption.
背景技术Background technique
快稳省是电子设备的重要指标,影响着用户在续航、发热、性能等方面的体验,而快稳省的基础参数即功耗,是衡量以上体验的重要指标。Fast, stable and economical is an important indicator of electronic equipment, which affects the user's experience in terms of battery life, heat generation, performance, etc., and the basic parameter of fast, stable and economical, namely power consumption, is an important indicator to measure the above experience.
在传统技术中,对于电子设备的功耗的确定方法,通常是在需要检测功耗的位置安装硬件检测设备,通过硬件检测设备检测电子设备的功耗。In the conventional technology, for a method for determining the power consumption of an electronic device, a hardware detection device is usually installed at a position where power consumption needs to be detected, and the power consumption of the electronic device is detected by the hardware detection device.
然而,电子设备中的电流、电压数值波动非常大,即使在同一场景下的不同时间进行检测,基于电流电压等数据检测出来的功耗仍差别很大,存在功耗检测不准确的问题。However, the current and voltage values in electronic devices fluctuate greatly. Even if the detection is performed at different times in the same scene, the power consumption detected based on data such as current and voltage is still very different, and there is a problem of inaccurate power consumption detection.
发明内容SUMMARY OF THE INVENTION
本申请提供一种能够更准确检测功耗的功耗确定方法、装置、电子设备、计算机可读存储介质和计算机程序产品。The present application provides a power consumption determination method, apparatus, electronic device, computer-readable storage medium, and computer program product capable of detecting power consumption more accurately.
第一方面,本申请提供了一种功耗确定方法。所述方法包括:In a first aspect, the present application provides a method for determining power consumption. The method includes:
获取电子设备的目标对象产生的实际功耗,以及获取关联到所述目标对象的各个关联对象的温度值;Obtain the actual power consumption generated by the target object of the electronic device, and obtain the temperature value of each associated object associated with the target object;
以所述实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,确定各个关联对象的拟合参数;Taking the actual power consumption as the fitting target value, performing fitting based on the temperature values of each associated object, and determining the fitting parameters of each associated object;
基于所述拟合参数,生成所述目标对象的功耗函数;所述功耗函数用于确定出所述目标对象的目标功耗。Based on the fitting parameters, a power consumption function of the target object is generated; the power consumption function is used to determine the target power consumption of the target object.
第二方面,本申请还提供了一种功耗确定装置。所述装置包括:In a second aspect, the present application further provides an apparatus for determining power consumption. The device includes:
获取模块,用于获取电子设备的目标对象产生的实际功耗,以及获取关联到所述目标对象的各个关联对象的温度值;an acquisition module, used for acquiring the actual power consumption generated by the target object of the electronic device, and acquiring the temperature value of each associated object associated with the target object;
拟合模块,用于以所述实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,确定各个关联对象的拟合参数;a fitting module, configured to take the actual power consumption as a fitting target value, perform fitting based on the temperature value of each associated object, and determine the fitting parameter of each associated object;
生成模块,用于基于所述拟合参数,生成所述目标对象的功耗函数;所述功耗函数用于确定出所述目标对象的目标功耗。A generating module is configured to generate a power consumption function of the target object based on the fitting parameters; the power consumption function is used to determine the target power consumption of the target object.
第三方面,本申请还提供了一种电子设备。所述电子设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:In a third aspect, the present application also provides an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
获取电子设备的目标对象产生的实际功耗,以及获取关联到所述目标对象的各个关联对象的温度值;Obtain the actual power consumption generated by the target object of the electronic device, and obtain the temperature value of each associated object associated with the target object;
以所述实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,确定各个关联对象的拟合参数;Taking the actual power consumption as the fitting target value, performing fitting based on the temperature values of each associated object, and determining the fitting parameters of each associated object;
基于所述拟合参数,生成所述目标对象的功耗函数;所述功耗函数用于确定出所述目标对象的目标功耗。Based on the fitting parameters, a power consumption function of the target object is generated; the power consumption function is used to determine the target power consumption of the target object.
第四方面,本申请还提供了一种计算机可读存储介质。所述计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium has a computer program stored thereon, and when the computer program is executed by the processor, the following steps are implemented:
获取电子设备的目标对象产生的实际功耗,以及获取关联到所述目标对象的各个关联对象的温度值;Obtain the actual power consumption generated by the target object of the electronic device, and obtain the temperature value of each associated object associated with the target object;
以所述实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,确定各个关联对象的拟合参数;Taking the actual power consumption as the fitting target value, performing fitting based on the temperature values of each associated object, and determining the fitting parameters of each associated object;
基于所述拟合参数,生成所述目标对象的功耗函数;所述功耗函数用于确定出所述目标对象的目标功耗。Based on the fitting parameters, a power consumption function of the target object is generated; the power consumption function is used to determine the target power consumption of the target object.
第五方面,本申请还提供了一种计算机程序产品。所述计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现以下步骤:In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the following steps:
获取电子设备的目标对象产生的实际功耗,以及获取关联到所述目标对象的各个关联对象的温度值;Obtain the actual power consumption generated by the target object of the electronic device, and obtain the temperature value of each associated object associated with the target object;
以所述实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,确定各个关联对象的拟合参数;Taking the actual power consumption as the fitting target value, performing fitting based on the temperature values of each associated object, and determining the fitting parameters of each associated object;
基于所述拟合参数,生成所述目标对象的功耗函数;所述功耗函数用于确定出所述目标对象的目标功耗。Based on the fitting parameters, a power consumption function of the target object is generated; the power consumption function is used to determine the target power consumption of the target object.
上述功耗确定方法、装置、电子设备、存储介质和计算机程序产品,获取电子设备的目标对象产生的实际功耗,以及获取关联到目标对象的各个关联对象的温度值,可以理解的是,由于物体具有热容这一特点,获取的温度值具有较小的波动性,即使在不同的采集周期下,仍能保持较好的精度。那么,以实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,可以确定出更加准确的各个关联对象的拟合参数,再基于拟合参数生成目标对象的功耗函数,可以避免采用波动性较大的电流电压值确定出某一时刻的功耗而造成该确定的功耗误差较大的问题,该功耗函数所生成的功耗更加平滑和稳定,可以更准确地确定出目标对象的目标功耗。The above power consumption determination method, device, electronic device, storage medium and computer program product obtain the actual power consumption generated by the target object of the electronic device, and obtain the temperature value of each associated object associated with the target object. It can be understood that due to The object has the characteristic of heat capacity, and the acquired temperature value has small fluctuation, and can still maintain good accuracy even under different acquisition cycles. Then, taking the actual power consumption as the fitting target value, and performing fitting based on the temperature value of each associated object, more accurate fitting parameters of each associated object can be determined, and then the power consumption function of the target object can be generated based on the fitting parameters, It can avoid the problem that the power consumption at a certain moment is determined by using the current and voltage values with large fluctuations, resulting in a large error in the determined power consumption. The power consumption generated by the power consumption function is smoother and more stable, and can be more accurately The target power consumption of the target object is determined.
附图说明Description of drawings
图1为一个实施例中电子设备的示意图;1 is a schematic diagram of an electronic device in one embodiment;
图2为一个实施例中功耗确定方法的流程示意图;2 is a schematic flowchart of a method for determining power consumption in one embodiment;
图3为一个实施例中功耗函数的数据示意图;3 is a data schematic diagram of a power consumption function in one embodiment;
图4为另一个实施例中电量计的功耗数据和拟合的功耗数据的对比图;4 is a comparison diagram of power consumption data of a fuel gauge and fitted power consumption data in another embodiment;
图5为一个实施例中功耗确定装置的结构框图;5 is a structural block diagram of an apparatus for determining power consumption in one embodiment;
图6为一个实施例中电子设备的内部结构图。FIG. 6 is an internal structure diagram of an electronic device in one embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
在一个实施例中,如图1所示,本申请应用于图1中的电子设备102,电子设备102中包括电池、器件1和器件2,还可以包括电池、板温、CPU(central processing unit,中央处理器)或摄像头等器件。在电子设备中,还设置有各个NTC(Negative TemperatureCoefficient)节点,在工作时产生热功耗。其中,NTC是指随温度上升电阻呈指数关系减小、具有负温度系数的热敏电阻现象和材料,可制成具有负温度系数(NTC)的热敏电阻。In one embodiment, as shown in FIG. 1 , the present application is applied to the
电子设备可以是终端或服务器。其中,终端可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑、物联网设备和便携式可穿戴设备,物联网设备可为智能音箱、智能电视、智能空调、智能车载设备等。便携式可穿戴设备可为智能手表、智能手环、头戴设备等。服务器可以用独立的服务器或者是多个服务器组成的服务器集群来实现。在一个实施例中,电子设备具有非强迫对流散热的特性。The electronic device can be a terminal or a server. Wherein, the terminal can be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, IoT devices and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, and smart vehicle-mounted devices. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, or the like. The server can be implemented as an independent server or a server cluster composed of multiple servers. In one embodiment, the electronic device has the characteristics of unforced convection heat dissipation.
在一个实施例中,如图1所示,提供了一种功耗确定方法,应用于电子设备中,包括以下步骤:In one embodiment, as shown in FIG. 1 , a method for determining power consumption is provided, which is applied to an electronic device and includes the following steps:
步骤102,获取电子设备的目标对象产生的实际功耗,以及获取关联到目标对象的各个关联对象的温度值。Step 102: Acquire the actual power consumption generated by the target object of the electronic device, and acquire the temperature value of each associated object associated with the target object.
目标对象指的是用于确定功耗的对象。电子设备的目标对象可以是电子设备自身或电子设备中的器件。可以理解的是,电子设备为了进行温控,在PCB(Printed CircuitBoard,印刷电路板)上的主要器件上均设置了温度传感器,故可以同构温度传感器获取到各个关联对象的温度值。The target object refers to the object used to determine the power consumption. The target object of the electronic device can be the electronic device itself or a device in the electronic device. It can be understood that, in order to control the temperature of the electronic device, temperature sensors are set on the main components on the PCB (Printed Circuit Board, printed circuit board), so the temperature value of each associated object can be obtained by the isomorphic temperature sensor.
关联对象是与目标对象存在关联关系的对象。关联关系可以是处于同一个电路中、处于同个预设物理范围内或处于目标对象的内部等,不限于此。An associated object is an object that has an associated relationship with the target object. The association relationship may be in the same circuit, in the same preset physical range, or in the interior of the target object, etc., which is not limited thereto.
电子设备对目标对象进行检测,获得目标对象产生的实际功耗,以及确定关联到目标对象的关联对象;其中,各个关联对象上设置有温度传感器;通过温度传感器检测各个关联对象的温度值,电子设备通过各个温度传感器对应的应用程序获取到各个关联对象的温度值。The electronic device detects the target object, obtains the actual power consumption generated by the target object, and determines the associated object associated with the target object; wherein, each associated object is provided with a temperature sensor; the temperature value of each associated object is detected by the temperature sensor, and the electronic The device obtains the temperature value of each associated object through the application program corresponding to each temperature sensor.
步骤104,以实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,确定各个关联对象的拟合参数。Step 104 , taking the actual power consumption as the fitting target value, performing fitting based on the temperature values of each associated object, and determining the fitting parameters of each associated object.
拟合目标值指的是各个关联对象的温度值进行拟合所对应的目标值。拟合参数是关联对象在拟合过程中所对应的系数。The fitting target value refers to the target value corresponding to the fitting of the temperature values of each associated object. Fitting parameters are the coefficients corresponding to the associated objects during the fitting process.
具体地,电子设备获取处于多组拟合数据,每个拟合数据包括一个实际功耗作为拟合目标值,还包括各个关联对象的温度值;在待求解函数中,针对每组拟合数据,以实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,确定各个关联对象的拟合参数。其中,拟合数据的组数大于或等于关联对象的数量,每组拟合数据中的拟合目标值的时间戳和各个关联对象的温度值的时间戳均相匹配。Specifically, the electronic device acquires multiple sets of fitting data, each fitting data includes an actual power consumption as the fitting target value, and also includes the temperature value of each associated object; in the function to be solved, for each set of fitting data , take the actual power consumption as the fitting target value, perform fitting based on the temperature value of each associated object, and determine the fitting parameters of each associated object. The number of groups of fitting data is greater than or equal to the number of associated objects, and the timestamps of the fitting target values in each group of fitting data and the timestamps of the temperature values of each associated object match.
待求解函数可以根据需要进行设置。如图3所示,待求解函数为The function to be solved can be set as required. As shown in Figure 3, the function to be solved is
y=β1X1+β2X2+β3X3+β4X4+β5X5+β6 y=β 1 X 1 +β 2 X 2 +β 3 X 3 +β 4 X 4 +β 5 X 5 +β 6
其中,y为拟合目标值也即实际功耗,X1、X2、X3、X4和X5分别为关联对象PA、电池、Charger IC、BB和板温的温度值,β1、β2、β3、β4和β5为拟合参数,β6为预设的常数。电子设备获取至少5组拟合数据,则可以求解出拟合参数β1、β2、β3、β4和β5。Among them, y is the fitting target value, that is, the actual power consumption, X 1 , X 2 , X 3 , X 4 and X 5 are the temperature values of the associated objects PA, battery, Charger IC, BB and board temperature, respectively, β 1 , β 2 , β 3 , β 4 and β 5 are fitting parameters, and β 6 is a preset constant. If the electronic device obtains at least 5 sets of fitting data, the fitting parameters β 1 , β 2 , β 3 , β 4 and β 5 can be solved.
需要说明的是,待求解函数可以为线性函数,也可以为其他算法的函数,如人工智能算法等,在此不做限定。若待求解函数为线性函数,即简单的线性算法,无需复杂的计算、功耗代价低,具有实时计算的可行性,可以更节约资源即可确定出拟合参数,从而生成功耗函数。It should be noted that the function to be solved may be a linear function, or may be a function of other algorithms, such as an artificial intelligence algorithm, etc., which is not limited here. If the function to be solved is a linear function, that is, a simple linear algorithm, no complex calculation is required, the power consumption cost is low, and it is feasible for real-time calculation, and the fitting parameters can be determined with more resource saving, thereby generating the power consumption function.
步骤106,基于拟合参数,生成目标对象的功耗函数;功耗函数用于确定出目标对象的目标功耗。Step 106 , based on the fitting parameters, generate a power consumption function of the target object; the power consumption function is used to determine the target power consumption of the target object.
功耗函数为用于计算出功耗的函数。目标功耗为目标对象采用功耗函数确定出的功耗。The power consumption function is a function used to calculate the power consumption. The target power consumption is the power consumption determined by the target object using the power consumption function.
具体地,将拟合参数作为自变量的系数代入待求解函数中,生成目标对象的功耗函数;待求解函数中的自变量为各个关联对象的温度值,待求解函数中的因变量为目标对象的目标功耗。目标功耗也即热功耗。Specifically, the fitting parameters are substituted into the function to be solved as the coefficient of the independent variable to generate the power consumption function of the target object; the independent variable in the function to be solved is the temperature value of each associated object, and the dependent variable in the function to be solved is the target The target power consumption of the object. The target power consumption is also the thermal power consumption.
上述功耗确定方法,获取电子设备的目标对象产生的实际功耗,以及获取关联到目标对象的各个关联对象的温度值,可以理解的是,由于物体具有热容这一特点,获取的温度值具有较小的波动性,即使在不同的采集周期下,仍能保持较好的精度。那么,以实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,可以确定出更加准确的各个关联对象的拟合参数,再基于拟合参数生成目标对象的功耗函数,可以避免采用波动性较大的电流电压值确定出某一时刻的功耗而造成该确定的功耗误差较大的问题,该功耗函数所生成的功耗更加平滑和稳定,可以更准确地确定出目标对象的目标功耗。其中,当一系统由于加给一微小的热量dQ而温度升高dT时,dQ/dT这个量即是该系统的热容。The above power consumption determination method obtains the actual power consumption generated by the target object of the electronic device, and obtains the temperature value of each associated object associated with the target object. It has less volatility and can maintain good accuracy even under different acquisition cycles. Then, taking the actual power consumption as the fitting target value, and performing fitting based on the temperature value of each associated object, more accurate fitting parameters of each associated object can be determined, and then the power consumption function of the target object can be generated based on the fitting parameters, It can avoid the problem that the power consumption at a certain moment is determined by using the current and voltage values with large fluctuations, resulting in a large error in the determined power consumption. The power consumption generated by the power consumption function is smoother and more stable, and can be more accurately The target power consumption of the target object is determined. Among them, when the temperature of a system increases by dT due to the addition of a small amount of heat dQ, the quantity dQ/dT is the heat capacity of the system.
并且,在本实施例中,基于热-功的转换原理和能量守恒,利用温度值进行功耗拟合,能灵活、高效的对不同区域的目标对象确定出功耗。上述的功耗确定方法,利用电子设备中已有的温度传感器,无需新增硬件,硬件成本低,即可对电子设备的目标对象进行功耗建模,获得该目标对象的目标功耗。在避免了数据波动的同时,上述基于温度值进行功耗计算方式,具有可微可积的数学性能,能进行总耗电量、功耗速率的计算。Moreover, in this embodiment, based on the heat-work conversion principle and energy conservation, the power consumption is fitted by using the temperature value, and the power consumption can be determined flexibly and efficiently for target objects in different areas. The above-mentioned method for determining the power consumption can model the power consumption of the target object of the electronic device and obtain the target power consumption of the target object by using the existing temperature sensor in the electronic device without adding new hardware and with low hardware cost. While avoiding data fluctuations, the above-mentioned method for calculating power consumption based on temperature values has differentiable and integrable mathematical performance, and can calculate total power consumption and power consumption rate.
可选地,在电子设备的封装器件内部,设置温度传感器,即可获取到该封装器件的温度值,也可以对该封装器件的功耗进行拟合计算。Optionally, by setting a temperature sensor inside a packaged device of the electronic device, the temperature value of the packaged device can be obtained, and the power consumption of the packaged device can be fitted and calculated.
可选地,上述的功耗确定方法,还可以用于对电子设备的本地电量监控、异常耗电监控、软硬件功耗分析、器件发热贡献度计算等。Optionally, the above-mentioned power consumption determination method can also be used for local power monitoring, abnormal power consumption monitoring, software and hardware power consumption analysis, and device heating contribution calculation of electronic devices.
可选地,上述的功耗确定方法,还可以进行可靠性诊断,如短路、断路、漏电等的研究。Optionally, the above-mentioned power consumption determination method can also perform reliability diagnosis, such as research on short circuit, open circuit, leakage and the like.
在一个实施例中,获取电子设备的目标对象产生的实际功耗,包括:检测电子设备的目标对象的电力数据;基于电力数据确定目标对象产生的实际功耗。In one embodiment, acquiring the actual power consumption generated by the target object of the electronic device includes: detecting power data of the target object of the electronic device; and determining the actual power consumption generated by the target object based on the power data.
电力数据为电力的相关数据。电力数据可以包括电流、电压、耗电量和电阻等其中一个或多个。The power data is data related to power. Power data may include one or more of current, voltage, power consumption, and resistance.
在目标对象上设置电力监控工具,通过该电力监控工具检测电子设备的目标对象的电力数据,并将电力数据发送至处理器,通过处理器基于电力数据确定出目标对象产生的实际功耗。其中,电力监控工具具体可以是电量计。电量计可以检测电流、电压和耗电量等。A power monitoring tool is set on the target object, the power monitoring tool detects the power data of the target object of the electronic device, and sends the power data to the processor, and the processor determines the actual power consumption generated by the target object based on the power data. The power monitoring tool may specifically be an electricity meter. Fuel gauges can detect current, voltage, power consumption, etc.
可以理解的是,电力数据与实际功耗成正相关,即电力数据越大,则该目标对象产生的实际功耗也越大。那么,电子设备可以基于电力数据和实际功耗之间的正相关关系,将电力数据转换成目标对象产生的实际功耗。其中,正相关关系可以根据经验数据获取得到。It can be understood that the power data is positively correlated with the actual power consumption, that is, the larger the power data, the greater the actual power consumption generated by the target object. Then, the electronic device can convert the power data into the actual power consumption generated by the target object based on the positive correlation between the power data and the actual power consumption. Among them, the positive correlation can be obtained according to empirical data.
在本实施例中,检测电子设备的目标对象的电力数据,则可以基于电力数据准确地确定目标对象产生的实际功耗。In this embodiment, the power data of the target object of the electronic device is detected, and the actual power consumption generated by the target object can be accurately determined based on the power data.
在一个实施例中,检测目标对象的电力数据,包括:若目标对象为电子设备自身且电子设备处于充电状态,则获取充电设备的输出功率和电子设备中电池的充电功率;基于电力数据确定目标对象产生的实际功耗,包括:基于输出功率和充电功率,确定电子设备产生的实际功耗。In one embodiment, detecting the power data of the target object includes: if the target object is the electronic device itself and the electronic device is in a charging state, acquiring the output power of the charging device and the charging power of the battery in the electronic device; determining the target based on the power data The actual power consumption generated by the object, including: determining the actual power consumption generated by the electronic device based on the output power and charging power.
充电设备是提供电能的设备。例如,充电设备可以为固定充电设备或移动充电设备,还可以是充电适配器等。充电设备的输出功率是输出至电子设备的功率。电池的充电功率是充电至电池中的功率。A charging device is a device that provides electrical energy. For example, the charging device may be a stationary charging device or a mobile charging device, or a charging adapter or the like. The output power of the charging device is the power output to the electronic device. The charging power of the battery is the power charged into the battery.
在充电设备上安装电量监控工具,通过该电量监控工具可以计算出充电设备的输出功率,电子设备可以从电量监控工具中获取充电设备的输出功率。A power monitoring tool is installed on the charging device, and the power monitoring tool can calculate the output power of the charging device, and the electronic device can obtain the output power of the charging device from the power monitoring tool.
可以理解的是,电子设备处于充电状态时,充电设备的输出功率大于电池的充电功率,即充电过程中存在损耗功率。该损耗功率也可以为热损耗功率。It can be understood that, when the electronic device is in a charging state, the output power of the charging device is greater than the charging power of the battery, that is, there is power loss during the charging process. This power loss may also be heat loss power.
具体地,若目标对象为电子设备自身,可以检测电子设备是否处于充电状态,若处于充电状态,则获取充电设备的输出功率和电子设备中电池的充电功率,基于预设的功率确定方式,基于输出功率和充电功率,确定出电子设备产生的实际功耗。Specifically, if the target object is the electronic device itself, it can be detected whether the electronic device is in a charging state, and if it is in a charging state, the output power of the charging device and the charging power of the battery in the electronic device are obtained, based on the preset power determination method, based on The output power and charging power determine the actual power consumption generated by the electronic device.
在一种实施方式中,电子设备将充电设备的输出功率减去电池的充电功率,确定出电子设备产生的实际功耗。在另一种实施方式中,电子设备将充电设备的输出功率乘以对应的权重因子得到第一功率,将电池的充电功率乘以对应的权重因子得到第二功率,再将第一功率减去第二功率确定出电子设备产生的实际功率。In one embodiment, the electronic device subtracts the charging power of the battery from the output power of the charging device to determine the actual power consumption generated by the electronic device. In another embodiment, the electronic device multiplies the output power of the charging device by the corresponding weighting factor to obtain the first power, multiplies the charging power of the battery by the corresponding weighting factor to obtain the second power, and then subtracts the first power from the first power. The second power determines the actual power produced by the electronic device.
在本实施例中,若目标对象为电子设备自身且电子设备处于充电状态,则获取充电设备的输出功率和电子设备中电池的充电功率,并基于输出功率和充电功率,可以准确地确定出处于充电场景下的电子设备产生的实际功耗。In this embodiment, if the target object is the electronic device itself and the electronic device is in the charging state, the output power of the charging device and the charging power of the battery in the electronic device are obtained, and based on the output power and the charging power, it can be accurately determined that the electronic device is in the charging state. The actual power consumption generated by the electronic device in the charging scenario.
在一个实施例中,检测目标对象的电力数据,包括:若目标对象为电子设备自身且电子设备处于非充电状态,则获取电子设备的耗电量;基于电力数据确定目标对象产生的实际功耗,包括:将电子设备的耗电量转换成电子设备产生的实际功耗。In one embodiment, detecting the power data of the target object includes: if the target object is the electronic device itself and the electronic device is in a non-charging state, acquiring the power consumption of the electronic device; determining the actual power consumption generated by the target object based on the power data , including: converting the power consumption of the electronic device into the actual power consumption produced by the electronic device.
具体地,若目标对象为电子设备自身,可以检测电子设备是否处于充电状态,若处于非充电状态,则通过电子设备上设置的电量计检测电子设备的耗电量,再采用预设的功率转换方式,将电子设备的耗电量转换成电子设备产生的实际功耗。Specifically, if the target object is the electronic device itself, it can be detected whether the electronic device is in a charging state; if it is in a non-charging state, the power consumption of the electronic device is detected by the electricity meter set on the electronic device, and then the preset power conversion is used. way to convert the power consumption of the electronic device into the actual power consumption generated by the electronic device.
可以理解的是,电子设备的耗电量越大,则电子设备产生的实际功耗越大,即电子设备的耗电量和产生的实际功耗成正相关。电子设备基于电子设备的耗电量和产生的实际功耗之间的正相关关系,将电子设备的耗电量转换成电子设备产生的实际功耗。其中,正相关关系可以根据经验数据获取得到。It can be understood that the greater the power consumption of the electronic device, the greater the actual power consumption generated by the electronic device, that is, the power consumption of the electronic device is positively correlated with the actual power consumption generated. The electronic device converts the power consumption of the electronic device into the actual power consumption generated by the electronic device based on the positive correlation between the power consumption of the electronic device and the actual power consumption generated. Among them, the positive correlation can be obtained according to empirical data.
在本实施例中,若目标对象为电子设备自身且电子设备处于非充电状态,则获取电子设备的耗电量,那么,将电子设备的耗电量进行转换,可以准确地得到电子设备处于非充电场景下产生的实际功耗。In this embodiment, if the target object is the electronic device itself and the electronic device is in a non-charging state, the power consumption of the electronic device is obtained. Then, by converting the power consumption of the electronic device, it can be accurately obtained that the electronic device is in a non-charging state. Actual power consumption in charging scenarios.
在一个实施例中,检测目标对象的电力数据,包括:若目标对象为电子设备中的目标器件,则检测目标器件的耗电量;基于电力数据确定目标对象产生的实际功耗,包括:将目标器件的耗电量转换成目标器件产生的实际功耗。In one embodiment, detecting the power data of the target object includes: if the target object is a target device in an electronic device, detecting the power consumption of the target device; determining the actual power consumption generated by the target object based on the power data, including: The power consumption of the target device is converted into the actual power consumption produced by the target device.
目标器件为电子设备内部中需要确定功耗的器件。The target device is a device inside an electronic device whose power consumption needs to be determined.
具体地,若目标对象为电子设备中的目标器件,可以通过目标器件上设置的电量计检测目标器件的耗电量,再采用预设的功率转换方式,将目标器件的耗电量转换成目标器件产生的实际功耗。Specifically, if the target object is a target device in an electronic device, the power consumption of the target device can be detected by a fuel gauge set on the target device, and then a preset power conversion method is used to convert the power consumption of the target device into the target device. The actual power consumption generated by the device.
可以理解的是,目标器件的耗电量越大,则目标器件产生的实际功耗越大,即目标器件的耗电量和产生的实际功耗成正相关。电子设备基于目标器件的耗电量和产生的实际功耗之间的正相关关系,将目标器件的耗电量转换成目标器件产生的实际功耗。其中,正相关关系可以根据经验数据获取得到。It can be understood that the greater the power consumption of the target device, the greater the actual power consumption generated by the target device, that is, the power consumption of the target device is positively correlated with the actual power consumption generated. The electronic device converts the power consumption of the target device into the actual power consumption generated by the target device based on the positive correlation between the power consumption of the target device and the actual power consumption generated. Among them, the positive correlation can be obtained according to empirical data.
在本实施例中,若目标对象为目标器件,则获取目标器件的耗电量,那么,将目标器件的耗电量进行转换,可以准确地得到目标器件产生的实际功耗。In this embodiment, if the target object is the target device, the power consumption of the target device is obtained, and then the actual power consumption generated by the target device can be accurately obtained by converting the power consumption of the target device.
在一个实施例中,获取关联到目标对象的各个关联对象的温度值,包括:若目标对象为电子设备自身,则通过温度传感器,获取电子设备中各个器件的温度值;各个器件均属于电子设备的关联对象;若目标对象为电子设备中的目标器件,则通过温度传感器,获取关联到目标器件的各个关联器件的温度值;各个关联器件均属于目标器件的关联对象。In one embodiment, acquiring the temperature value of each associated object associated with the target object includes: if the target object is the electronic device itself, acquiring the temperature value of each device in the electronic device through a temperature sensor; each device belongs to the electronic device If the target object is the target device in the electronic device, the temperature value of each associated device associated with the target device is obtained through the temperature sensor; each associated device belongs to the associated object of the target device.
在各个关联对象上均设置有温度传感器,可以通过温度传感器获取到各个关联对象的温度值。关联器件是与目标器件相关联的器件。例如,关联器件可以为与目标器件处于同一个电路中的器件,也可以是目标器件的预设物理范围内的器件,还可以是目标器件使用过程中存在数据交互的器件,不限于此。A temperature sensor is provided on each associated object, and the temperature value of each associated object can be obtained through the temperature sensor. An associated device is a device that is associated with a target device. For example, the associated device may be a device in the same circuit as the target device, or a device within a preset physical range of the target device, or a device with data interaction during use of the target device, but not limited to this.
在本实施例中,若目标对象为电子设备自身,则通过温度传感器,获取电子设备中各个器件的温度值,各个电子设备中的器件均属于电子设备的关联对象,可以准确地从各个器件的温度值拟合出电子设备的功耗函数。若目标对象为电子设备中的目标器件,则通过温度传感器,获取关联到目标器件的各个关联器件的温度值,从而准确地从各个关联器件的温度值拟合出目标器件的功耗函数。In this embodiment, if the target object is the electronic device itself, the temperature value of each device in the electronic device is obtained through the temperature sensor. The devices in each electronic device belong to the associated objects of the electronic device, and the temperature values of each device can be accurately obtained from the electronic device. The temperature values fit the power consumption function of the electronic device. If the target object is a target device in an electronic device, the temperature value of each associated device associated with the target device is obtained through the temperature sensor, thereby accurately fitting the power consumption function of the target device from the temperature value of each associated device.
在一个实施例中,上述方法还包括:获取目标时刻的各个关联对象的目标温度值;将各个关联对象的目标温度值代入目标对象的功耗函数,输出目标对象的目标功耗。In one embodiment, the above method further includes: acquiring the target temperature value of each associated object at the target moment; substituting the target temperature value of each associated object into the power consumption function of the target object, and outputting the target power consumption of the target object.
目标温度值为关联对象在目标时刻的温度值。The target temperature value is the temperature value of the associated object at the target time.
可以理解的是,由于物体具有热容这一特点,获取的目标时刻的关联对象的温度值具有较小的波动性,即使在不同的采集周期下,仍能保持较好的精度,那么,基于各个关联对象的目标温度值,则可以更准确地计算出目标对象在目标时刻的目标功耗,避免由于其他数据的较大波动性,而在不同周期的同一时间点确定的功耗差别较大的问题,从而可以更准确地、更稳定地确定出目标对象在目标时刻的目标功耗。It can be understood that, due to the characteristics of the heat capacity of the object, the acquired temperature value of the associated object at the target moment has a small fluctuation, and even in different acquisition periods, it can still maintain a good accuracy, then, based on The target temperature value of each associated object can more accurately calculate the target power consumption of the target object at the target time, avoiding the large difference in the power consumption determined at the same time point in different cycles due to the large fluctuation of other data. Therefore, the target power consumption of the target object at the target moment can be determined more accurately and stably.
在一个实施例中,如图4所示,纵轴为功耗数据,横轴为时间轴。可以理解的是,通过电量计得到的功耗数据波动非常大,导致得到的功耗数据误差较大的问题。而通过本申请的功耗函数统计出的各个目标功耗,在时间轴上较为平滑和稳定,避免由于电流电压值的较大波动而造成误差较大的问题,可以更准确地确定出目标功耗。In one embodiment, as shown in FIG. 4 , the vertical axis is the power consumption data, and the horizontal axis is the time axis. It can be understood that the power consumption data obtained by the fuel gauge fluctuates greatly, which leads to a problem that the obtained power consumption data has a large error. However, each target power consumption calculated by the power consumption function of the present application is relatively smooth and stable on the time axis, avoiding the problem of large errors caused by large fluctuations in the current and voltage values, and the target power consumption can be determined more accurately. consumption.
在一个实施例中,提供了一种功耗确定方法,应用于电子设备中,包括以下步骤:In one embodiment, a method for determining power consumption is provided, which is applied to an electronic device and includes the following steps:
若目标对象为电子设备自身且电子设备处于充电状态,则执行步骤A1;若目标对象为电子设备自身且电子设备处于非充电状态,则执行步骤B1;若目标对象为电子设备中的目标器件,则执行步骤C1。If the target object is the electronic device itself and the electronic device is in a charging state, then execute step A1; if the target object is the electronic device itself and the electronic device is in a non-charging state, execute step B1; if the target object is the target device in the electronic device, Then go to step C1.
步骤A1:获取充电设备的输出功率和电子设备中电池的充电功率;基于输出功率和充电功率,确定电子设备产生的实际功耗。继续执行步骤A2。Step A1: Obtain the output power of the charging device and the charging power of the battery in the electronic device; determine the actual power consumption generated by the electronic device based on the output power and the charging power. Proceed to step A2.
步骤B1:获取电子设备的耗电量;将电子设备的耗电量转换成电子设备产生的实际功耗。继续执行步骤A2。Step B1: Obtain the power consumption of the electronic device; convert the power consumption of the electronic device into the actual power consumption generated by the electronic device. Proceed to step A2.
步骤C1:检测目标器件的耗电量;将目标器件的耗电量转换成目标器件产生的实际功耗。继续执行步骤B2。Step C1: Detect the power consumption of the target device; convert the power consumption of the target device into the actual power consumption generated by the target device. Proceed to step B2.
步骤A2:通过温度传感器,获取电子设备中各个器件的温度值;各个器件均属于电子设备的关联对象,然后执行步骤D3。Step A2: Obtain the temperature value of each device in the electronic device through the temperature sensor; each device belongs to the associated object of the electronic device, and then step D3 is performed.
步骤B2:通过温度传感器,获取关联到目标器件的各个关联器件的温度值;各个关联器件均属于目标器件的关联对象,然后执行步骤D3。Step B2: Obtain the temperature value of each associated device associated with the target device through the temperature sensor; each associated device belongs to the associated object of the target device, and then step D3 is performed.
步骤D3:以实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,确定各个关联对象的拟合参数。Step D3: Taking the actual power consumption as the fitting target value, fitting is performed based on the temperature value of each associated object, and the fitting parameter of each associated object is determined.
步骤D4:基于拟合参数,生成目标对象的功耗函数。Step D4: Based on the fitting parameters, a power consumption function of the target object is generated.
步骤D5:获取目标时刻的各个关联对象的目标温度值。Step D5: Obtain the target temperature value of each associated object at the target time.
步骤D6:将各个关联对象的目标温度值代入目标对象的功耗函数,输出目标对象的目标功耗。Step D6: Substitute the target temperature value of each associated object into the power consumption function of the target object, and output the target power consumption of the target object.
应该理解的是,虽然如上所述的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上所述的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the steps in the flowcharts involved in the above embodiments are sequentially displayed according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but may be performed at different times The execution order of these steps or phases is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of the steps or phases in the other steps.
基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的功耗确定方法的功耗确定装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个功耗确定装置实施例中的具体限定可以参见上文中对于功耗确定方法的限定,在此不再赘述。Based on the same inventive concept, an embodiment of the present application further provides a power consumption determination apparatus for implementing the above-mentioned power consumption determination method. The implementation solution for solving the problem provided by the device is similar to the implementation solution described in the above method, so the specific limitations in the embodiments of one or more power consumption determination apparatuses provided below may refer to the above section on the power consumption determination method limitations, which are not repeated here.
在一个实施例中,如图5所示,提供了一种功耗确定装置,包括:获取模块502、拟合模块504和生成模块506,其中:In one embodiment, as shown in FIG. 5 , an apparatus for determining power consumption is provided, including: an acquiring
获取模块502,用于获取电子设备的目标对象产生的实际功耗,以及获取关联到目标对象的各个关联对象的温度值。The obtaining
拟合模块504,用于以实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,确定各个关联对象的拟合参数。The
生成模块506,用于基于拟合参数,生成目标对象的功耗函数;功耗函数用于确定出目标对象的目标功耗。The
上述功耗确定装置,获取电子设备的目标对象产生的实际功耗,以及获取关联到目标对象的各个关联对象的温度值,可以理解的是,由于物体具有热容这一特点,获取的温度值具有较小的波动性,即使在不同的采集周期下,仍能保持较好的精度。那么,以实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,可以确定出更加准确的各个关联对象的拟合参数,再基于拟合参数生成目标对象的功耗函数,可以避免采用波动性较大的电流电压值确定出某一时刻的功耗而造成该确定的功耗误差较大的问题,该功耗函数所生成的功耗更加平滑和稳定,可以更准确地确定出目标对象的目标功耗。The above-mentioned power consumption determination device obtains the actual power consumption generated by the target object of the electronic device, and obtains the temperature value of each associated object associated with the target object. It has less volatility and can maintain good accuracy even under different acquisition cycles. Then, taking the actual power consumption as the fitting target value, and performing fitting based on the temperature value of each associated object, more accurate fitting parameters of each associated object can be determined, and then the power consumption function of the target object can be generated based on the fitting parameters, It can avoid the problem that the power consumption at a certain moment is determined by using the current and voltage values with large fluctuations, resulting in a large error in the determined power consumption. The power consumption generated by the power consumption function is smoother and more stable, and can be more accurately The target power consumption of the target object is determined.
在一个实施例中,上述获取模块502还用于检测电子设备的目标对象的电力数据;基于电力数据确定目标对象产生的实际功耗。In one embodiment, the above-mentioned obtaining
在一个实施例中,上述获取模块502还用于若目标对象为电子设备自身且电子设备处于充电状态,则获取充电设备的输出功率和电子设备中电池的充电功率;基于输出功率和充电功率,确定电子设备产生的实际功耗。In one embodiment, the above obtaining
在一个实施例中,上述获取模块502还用于若目标对象为电子设备自身且电子设备处于非充电状态,则获取电子设备的耗电量;将电子设备的耗电量转换成电子设备产生的实际功耗。In one embodiment, the above obtaining
在一个实施例中,上述获取模块502还用于若目标对象为电子设备中的目标器件,则检测目标器件的耗电量;将目标器件的耗电量转换成目标器件产生的实际功耗。In one embodiment, the obtaining
在一个实施例中,上述获取模块502还用于若目标对象为电子设备自身,则通过温度传感器,获取电子设备中各个器件的温度值;各个器件均属于电子设备的关联对象;若目标对象为电子设备中的目标器件,则通过温度传感器,获取关联到目标器件的各个关联器件的温度值;各个关联器件均属于目标器件的关联对象。In one embodiment, the obtaining
在一个实施例中,上述装置还包括功耗确定模块;该功耗确定模块还用于获取目标时刻的各个关联对象的目标温度值;将各个关联对象的目标温度值代入目标对象的功耗函数,输出目标对象的目标功耗。In one embodiment, the above-mentioned apparatus further includes a power consumption determination module; the power consumption determination module is further configured to obtain the target temperature value of each associated object at the target moment; and substitute the target temperature value of each associated object into the power consumption function of the target object , output the target power consumption of the target object.
上述功耗确定装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于电子设备中的处理器中,也可以以软件形式存储于电子设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above-mentioned apparatus for determining power consumption may be implemented in whole or in part by software, hardware and combinations thereof. The above modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or stored in the memory in the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
在一个实施例中,提供了一种电子设备,该电子设备可以是终端,其内部结构图可以如图6所示。该电子设备包括处理器、存储器、输入/输出接口、通信接口、显示单元和输入装置。其中,处理器、存储器和输入/输出接口通过系统总线连接,通信接口、显示单元和输入装置通过输入/输出接口连接到系统总线。其中,该电子设备的处理器用于提供计算和控制能力。该电子设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该电子设备的输入/输出接口用于处理器与外部设备之间交换信息。该电子设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、移动蜂窝网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种功耗确定方法。该电子设备的显示单元用于形成视觉可见的画面,可以是显示屏、投影装置或虚拟现实成像装置,显示屏可以是液晶显示屏或电子墨水显示屏,该电子设备的输入装置可以是显示屏上覆盖的触摸层,也可以是电子设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, an electronic device is provided, the electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. 6 . The electronic device includes a processor, a memory, an input/output interface, a communication interface, a display unit and an input device. Wherein, the processor, the memory and the input/output interface are connected through the system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The nonvolatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The input/output interface of the electronic device is used for exchanging information between the processor and external devices. The communication interface of the electronic device is used for wired or wireless communication with an external terminal, and the wireless communication can be realized by WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. The computer program, when executed by a processor, implements a power consumption determination method. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device, the display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a display screen The touch layer covered on the top may also be keys, trackballs or touchpads provided on the housing of the electronic device, or may be an external keyboard, touchpad or mouse.
本领域技术人员可以理解,图6中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 6 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may be Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
在一个实施例中,提供了一种电子设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现以下步骤:获取电子设备的目标对象产生的实际功耗,以及获取关联到目标对象的各个关联对象的温度值;以实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,确定各个关联对象的拟合参数;基于拟合参数,生成目标对象的功耗函数;功耗函数用于确定出目标对象的目标功耗。In one embodiment, an electronic device is provided, comprising a memory and a processor, a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: acquiring the actual power consumption generated by a target object of the electronic device, and Obtain the temperature value of each associated object associated with the target object; take the actual power consumption as the fitting target value, perform fitting based on the temperature value of each associated object, and determine the fitting parameters of each associated object; based on the fitting parameters, generate a target The power consumption function of the object; the power consumption function is used to determine the target power consumption of the target object.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:检测电子设备的目标对象的电力数据;基于电力数据确定目标对象产生的实际功耗。In one embodiment, the processor further implements the following steps when executing the computer program: detecting power data of the target object of the electronic device; and determining actual power consumption generated by the target object based on the power data.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:若目标对象为电子设备自身且电子设备处于充电状态,则获取充电设备的输出功率和电子设备中电池的充电功率;基于输出功率和充电功率,确定电子设备产生的实际功耗。In one embodiment, the processor further implements the following steps when executing the computer program: if the target object is the electronic device itself and the electronic device is in a charging state, acquiring the output power of the charging device and the charging power of the battery in the electronic device; based on the output power and charging power to determine the actual power consumption generated by the electronic device.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:若目标对象为电子设备自身且电子设备处于非充电状态,则获取电子设备的耗电量;将电子设备的耗电量转换成电子设备产生的实际功耗。In one embodiment, the processor further implements the following steps when executing the computer program: if the target object is the electronic device itself and the electronic device is in a non-charging state, acquiring the power consumption of the electronic device; converting the power consumption of the electronic device into The actual power consumption produced by the electronic device.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:若目标对象为电子设备中的目标器件,则检测目标器件的耗电量;将目标器件的耗电量转换成目标器件产生的实际功耗。In one embodiment, the processor further implements the following steps when executing the computer program: if the target object is a target device in the electronic device, detecting the power consumption of the target device; converting the power consumption of the target device into the power consumption generated by the target device actual power consumption.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:若目标对象为电子设备自身,则通过温度传感器,获取电子设备中各个器件的温度值;各个器件均属于电子设备的关联对象;若目标对象为电子设备中的目标器件,则通过温度传感器,获取关联到目标器件的各个关联器件的温度值;各个关联器件均属于目标器件的关联对象。In one embodiment, the processor also implements the following steps when executing the computer program: if the target object is the electronic device itself, obtain the temperature value of each device in the electronic device through a temperature sensor; each device belongs to the associated object of the electronic device; If the target object is the target device in the electronic device, the temperature value of each associated device associated with the target device is obtained through the temperature sensor; each associated device belongs to the associated object of the target device.
在一个实施例中,处理器执行计算机程序时还实现以下步骤:获取目标时刻的各个关联对象的目标温度值;将各个关联对象的目标温度值代入目标对象的功耗函数,输出目标对象的目标功耗。In one embodiment, the processor further implements the following steps when executing the computer program: acquiring the target temperature value of each associated object at the target moment; substituting the target temperature value of each associated object into the power consumption function of the target object, and outputting the target object's target temperature power consumption.
在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:获取电子设备的目标对象产生的实际功耗,以及获取关联到目标对象的各个关联对象的温度值;以实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,确定各个关联对象的拟合参数;基于拟合参数,生成目标对象的功耗函数;功耗函数用于确定出目标对象的目标功耗。In one embodiment, a computer-readable storage medium is provided on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining the actual power consumption generated by a target object of the electronic device, and obtaining the actual power consumption associated with the target object of the electronic device. The temperature value of each associated object of the target object; taking the actual power consumption as the fitting target value, fitting is performed based on the temperature value of each associated object, and the fitting parameters of each associated object are determined; based on the fitting parameters, the power consumption of the target object is generated. Power consumption function; the power consumption function is used to determine the target power consumption of the target object.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:检测电子设备的目标对象的电力数据;基于电力数据确定目标对象产生的实际功耗。In one embodiment, the computer program, when executed by the processor, further implements the following steps: detecting power data of a target object of the electronic device; determining actual power consumption generated by the target object based on the power data.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:若目标对象为电子设备自身且电子设备处于充电状态,则获取充电设备的输出功率和电子设备中电池的充电功率;基于输出功率和充电功率,确定电子设备产生的实际功耗。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if the target object is the electronic device itself and the electronic device is in a charging state, obtain the output power of the charging device and the charging power of the battery in the electronic device; Power and charging power, to determine the actual power consumption generated by electronic devices.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:若目标对象为电子设备自身且电子设备处于非充电状态,则获取电子设备的耗电量;将电子设备的耗电量转换成电子设备产生的实际功耗。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if the target object is the electronic device itself and the electronic device is in a non-charging state, acquiring the power consumption of the electronic device; converting the power consumption of the electronic device The actual power consumption generated by the electronic device.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:若目标对象为电子设备中的目标器件,则检测目标器件的耗电量;将目标器件的耗电量转换成目标器件产生的实际功耗。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if the target object is a target device in the electronic device, detecting the power consumption of the target device; converting the power consumption of the target device into the target device to generate actual power consumption.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:若目标对象为电子设备自身,则通过温度传感器,获取电子设备中各个器件的温度值;各个器件均属于电子设备的关联对象;若目标对象为电子设备中的目标器件,则通过温度传感器,获取关联到目标器件的各个关联器件的温度值;各个关联器件均属于目标器件的关联对象。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if the target object is the electronic device itself, the temperature value of each device in the electronic device is obtained through a temperature sensor; each device belongs to the associated object of the electronic device ; If the target object is a target device in an electronic device, the temperature value of each associated device associated with the target device is obtained through a temperature sensor; each associated device belongs to the associated object of the target device.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:获取目标时刻的各个关联对象的目标温度值;将各个关联对象的目标温度值代入目标对象的功耗函数,输出目标对象的目标功耗。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: acquiring the target temperature value of each associated object at the target moment; substituting the target temperature value of each associated object into the power consumption function of the target object, and outputting the target temperature value of the target object. target power consumption.
在一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现以下步骤:获取电子设备的目标对象产生的实际功耗,以及获取关联到目标对象的各个关联对象的温度值;以实际功耗为拟合目标值,基于各个关联对象的温度值进行拟合,确定各个关联对象的拟合参数;基于拟合参数,生成目标对象的功耗函数;功耗函数用于确定出目标对象的目标功耗。In one embodiment, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the steps of: obtaining actual power consumption generated by a target object of an electronic device, and obtaining individual power consumption associated with the target object. The temperature value of the associated object; using the actual power consumption as the fitting target value, fitting is performed based on the temperature value of each associated object, and the fitting parameters of each associated object are determined; based on the fitting parameters, the power consumption function of the target object is generated; The power consumption function is used to determine the target power consumption of the target object.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:检测电子设备的目标对象的电力数据;基于电力数据确定目标对象产生的实际功耗。In one embodiment, the computer program, when executed by the processor, further implements the following steps: detecting power data of a target object of the electronic device; determining actual power consumption generated by the target object based on the power data.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:若目标对象为电子设备自身且电子设备处于充电状态,则获取充电设备的输出功率和电子设备中电池的充电功率;基于输出功率和充电功率,确定电子设备产生的实际功耗。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if the target object is the electronic device itself and the electronic device is in a charging state, obtain the output power of the charging device and the charging power of the battery in the electronic device; Power and charging power, to determine the actual power consumption generated by electronic devices.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:若目标对象为电子设备自身且电子设备处于非充电状态,则获取电子设备的耗电量;将电子设备的耗电量转换成电子设备产生的实际功耗。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if the target object is the electronic device itself and the electronic device is in a non-charging state, acquiring the power consumption of the electronic device; converting the power consumption of the electronic device The actual power consumption generated by the electronic device.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:若目标对象为电子设备中的目标器件,则检测目标器件的耗电量;将目标器件的耗电量转换成目标器件产生的实际功耗。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if the target object is a target device in the electronic device, detecting the power consumption of the target device; converting the power consumption of the target device into the target device to generate actual power consumption.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:若目标对象为电子设备自身,则通过温度传感器,获取电子设备中各个器件的温度值;各个器件均属于电子设备的关联对象;若目标对象为电子设备中的目标器件,则通过温度传感器,获取关联到目标器件的各个关联器件的温度值;各个关联器件均属于目标器件的关联对象。In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the target object is the electronic device itself, the temperature value of each device in the electronic device is obtained through a temperature sensor; each device belongs to the associated object of the electronic device ; If the target object is a target device in an electronic device, the temperature value of each associated device associated with the target device is obtained through a temperature sensor; each associated device belongs to the associated object of the target device.
在一个实施例中,计算机程序被处理器执行时还实现以下步骤:获取目标时刻的各个关联对象的目标温度值;将各个关联对象的目标温度值代入目标对象的功耗函数,输出目标对象的目标功耗。In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: obtaining the target temperature value of each associated object at the target moment; substituting the target temperature value of each associated object into the power consumption function of the target object, and outputting the target temperature value of the target object. target power consumption.
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准。It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all It is the information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-OnlyMemory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic RandomAccess Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图形处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to a memory, a database or other media used in the various embodiments provided in this application may include at least one of a non-volatile memory and a volatile memory. Non-volatile memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetic variable memory (Magnetoresistive Random Memory) Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene memory, and the like. Volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory, and the like. As an illustration and not a limitation, the RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM). The database involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a blockchain-based distributed database, etc., but is not limited thereto. The processors involved in the various embodiments provided in this application may be general-purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., and are not limited to this.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but should not be construed as a limitation on the scope of the patent of the present application. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the present application should be determined by the appended claims.
Claims (11)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210103250.2A CN114441848A (en) | 2022-01-27 | 2022-01-27 | Power consumption determination method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210103250.2A CN114441848A (en) | 2022-01-27 | 2022-01-27 | Power consumption determination method and device, electronic equipment and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN114441848A true CN114441848A (en) | 2022-05-06 |
Family
ID=81370313
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210103250.2A Withdrawn CN114441848A (en) | 2022-01-27 | 2022-01-27 | Power consumption determination method and device, electronic equipment and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114441848A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114818365A (en) * | 2022-05-17 | 2022-07-29 | 中国南方电网有限责任公司超高压输电公司检修试验中心 | Method and device for determining central temperature of discharge channel and computer equipment |
| CN114912390A (en) * | 2022-05-10 | 2022-08-16 | 上海金脉电子科技有限公司 | Method, device, device and storage medium for calculating chip power consumption |
| CN116009675A (en) * | 2022-12-26 | 2023-04-25 | 哲库科技(上海)有限公司 | Method, device, storage medium and electronic equipment for determining power consumption |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112148475A (en) * | 2020-08-21 | 2020-12-29 | 安徽中科龙安科技股份有限公司 | Task scheduling method and system of loongson big data all-in-one machine integrating load and power consumption |
| CN113260231A (en) * | 2021-05-17 | 2021-08-13 | 长沙集智创新工业设计有限公司 | Adaptive cooling method and device for frequency converter |
| CN113720494A (en) * | 2021-08-09 | 2021-11-30 | Oppo广东移动通信有限公司 | Temperature detection method, device, equipment and storage medium |
-
2022
- 2022-01-27 CN CN202210103250.2A patent/CN114441848A/en not_active Withdrawn
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112148475A (en) * | 2020-08-21 | 2020-12-29 | 安徽中科龙安科技股份有限公司 | Task scheduling method and system of loongson big data all-in-one machine integrating load and power consumption |
| CN113260231A (en) * | 2021-05-17 | 2021-08-13 | 长沙集智创新工业设计有限公司 | Adaptive cooling method and device for frequency converter |
| CN113720494A (en) * | 2021-08-09 | 2021-11-30 | Oppo广东移动通信有限公司 | Temperature detection method, device, equipment and storage medium |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114912390A (en) * | 2022-05-10 | 2022-08-16 | 上海金脉电子科技有限公司 | Method, device, device and storage medium for calculating chip power consumption |
| CN114818365A (en) * | 2022-05-17 | 2022-07-29 | 中国南方电网有限责任公司超高压输电公司检修试验中心 | Method and device for determining central temperature of discharge channel and computer equipment |
| CN114818365B (en) * | 2022-05-17 | 2024-05-24 | 中国南方电网有限责任公司超高压输电公司检修试验中心 | Method, device and computer equipment for determining center temperature of discharge channel |
| CN116009675A (en) * | 2022-12-26 | 2023-04-25 | 哲库科技(上海)有限公司 | Method, device, storage medium and electronic equipment for determining power consumption |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN114441848A (en) | Power consumption determination method and device, electronic equipment and storage medium | |
| CN116295902B (en) | Method and device for detecting environmental temperature of electronic equipment | |
| WO2022116037A1 (en) | Battery life prediction method and device | |
| CN116359653A (en) | Method, device, computer equipment and storage medium for determining cable ampacity | |
| CN116166511B (en) | Methods, apparatus, equipment, and storage media for assessing the service life of electrical connectors | |
| CN112818535B (en) | Method and device for establishing electrothermal simulation model and obtaining electrothermal simulation value | |
| CN117078480A (en) | Carbon emission monitoring methods, devices, equipment, storage media and computer products | |
| CN115808622A (en) | Battery fault identification method, device, equipment and storage medium | |
| CN115907307B (en) | Power grid real-time data interaction-oriented online analysis method for carbon emission flow of power system | |
| CN116227249A (en) | New energy long-term power forecasting method and system for intelligent migration of power meteorological data | |
| CN120195611A (en) | Fault determination method, device, computer equipment, storage medium and program product | |
| CN118431623A (en) | Control method and device of energy storage system, computer equipment, medium and product | |
| CN116885824A (en) | Charging methods, devices, equipment, storage media and program products | |
| CN115983100A (en) | Extra-high voltage direct current optical transformer health degree prediction model training method | |
| CN116047296A (en) | Prediction method, terminal equipment and storage medium of battery cut-off capacity | |
| CN116644262A (en) | Chip temperature distribution determination method, device and electronic equipment | |
| CN110399901B (en) | Method, device, equipment and medium for acquiring temperature consumption of water | |
| CN114721903A (en) | Shell temperature obtaining method and device, electronic equipment and storage medium | |
| CN115879610B (en) | Contactor service life prediction method, device, equipment and storage medium | |
| CN115854495B (en) | Air conditioner electric quantity determining method, device, computer equipment and storage medium | |
| CN116227727B (en) | Methods, apparatus, and computer equipment for assessing grease replacement intervals | |
| CN115021395B (en) | Method, device, smart meter and storage medium for processing electricity information | |
| CN120855664A (en) | A charging and discharging equipment monitoring system and control method thereof | |
| CN118836995A (en) | Temperature acquisition method and device of thin film capacitor, computer equipment and storage medium | |
| CN120314833A (en) | Transformer short circuit fault moment detection method, readable storage medium and program product |
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 | ||
| WW01 | Invention patent application withdrawn after publication |
Application publication date: 20220506 |
|
| WW01 | Invention patent application withdrawn after publication |