CN118112306A - Current detection circuit, electronic device and current detection method - Google Patents

Current detection circuit, electronic device and current detection method Download PDF

Info

Publication number
CN118112306A
CN118112306A CN202410346388.4A CN202410346388A CN118112306A CN 118112306 A CN118112306 A CN 118112306A CN 202410346388 A CN202410346388 A CN 202410346388A CN 118112306 A CN118112306 A CN 118112306A
Authority
CN
China
Prior art keywords
module
power supply
current
voltage
load
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410346388.4A
Other languages
Chinese (zh)
Inventor
张开卫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202410346388.4A priority Critical patent/CN118112306A/en
Publication of CN118112306A publication Critical patent/CN118112306A/en
Pending legal-status Critical Current

Links

Landscapes

  • Measurement Of Current Or Voltage (AREA)

Abstract

本申请公开了一种电流检测电路、电子设备及电流检测方法,属于电子设备技术领域。电流检测电路包括:采样控制单元和设置于负载供电通路上的第一分压模块;第一分压模块连接在供电模块和负载模块之间;采样控制单元的采样端分别与第一分压模块的两端连接,用于采集第一分压模块两端的第一电压,根据第一电压和第一分压模块的电阻值确定负载模块的第一供电电流,根据第一供电电流确定负载模块的第一耗电量。

The present application discloses a current detection circuit, an electronic device and a current detection method, which belong to the technical field of electronic devices. The current detection circuit includes: a sampling control unit and a first voltage divider module arranged on a load power supply path; the first voltage divider module is connected between the power supply module and the load module; the sampling end of the sampling control unit is respectively connected to the two ends of the first voltage divider module, for collecting the first voltage at the two ends of the first voltage divider module, determining the first power supply current of the load module according to the first voltage and the resistance value of the first voltage divider module, and determining the first power consumption of the load module according to the first power supply current.

Description

电流检测电路、电子设备及电流检测方法Current detection circuit, electronic device and current detection method

技术领域Technical Field

本申请属于电子设备技术领域,具体涉及一种电流检测电路、电子设备及电流检测方法。The present application belongs to the technical field of electronic equipment, and specifically relates to a current detection circuit, electronic equipment and a current detection method.

背景技术Background technique

随着电子设备和应用程序的发展,安装在电子设备的应用程序也越来越多,电子设备的耗电量也越来越大,电池剩余电量越来越低,影响用户对电子设备的使用。With the development of electronic devices and applications, more and more applications are installed in electronic devices, the power consumption of electronic devices is also increasing, and the remaining battery power is getting lower and lower, which affects users' use of electronic devices.

相关技术中,电子设备都配置有电量计,通过电量计可以采集电池的充电电流或放电电流,进而可以计算出电池的充电电量或放电电量以及电池的剩余电量。In the related art, electronic devices are equipped with a fuel meter, through which the charging current or discharging current of the battery can be collected, and then the charging capacity or discharging capacity of the battery and the remaining capacity of the battery can be calculated.

但是,无法检测出电池为各个负载模块(例如,显示模块、存储模块、网络模块等)提供的供电电流,无法确定出各个负载模块的耗电情况。However, it is impossible to detect the power supply current provided by the battery to each load module (for example, a display module, a storage module, a network module, etc.), and it is impossible to determine the power consumption of each load module.

发明内容Summary of the invention

本申请实施例的目的是提供一种电流检测电路、电子设备及电流检测方法,能够检测出各个负载模块的供电电流,确定出各个负载模块的耗电量。The purpose of the embodiments of the present application is to provide a current detection circuit, an electronic device and a current detection method, which can detect the power supply current of each load module and determine the power consumption of each load module.

第一方面,本申请实施例提供了一种电流检测电路,包括:采样控制单元和设置于负载供电通路上的第一分压模块;In a first aspect, an embodiment of the present application provides a current detection circuit, comprising: a sampling control unit and a first voltage dividing module arranged on a load power supply path;

第一分压模块连接在供电模块和负载模块之间;The first voltage dividing module is connected between the power supply module and the load module;

采样控制单元的采样端分别与第一分压模块的两端连接,用于采集第一分压模块两端的第一电压,根据第一电压和第一分压模块的电阻值确定负载供电通路上的第一供电电流,根据第一供电电流确定负载模块的第一耗电量。The sampling ends of the sampling control unit are respectively connected to the two ends of the first voltage divider module, and are used to collect the first voltage at the two ends of the first voltage divider module, determine the first power supply current on the load power supply path according to the first voltage and the resistance value of the first voltage divider module, and determine the first power consumption of the load module according to the first power supply current.

第二方面,本申请实施例提供了一种电子设备,包括:本申请实施例提供的电流检测电路。In a second aspect, an embodiment of the present application provides an electronic device, including: a current detection circuit provided by an embodiment of the present application.

第三方面,本申请实施例提供了一种电流检测方法,应用于第一电子设备,该电子设备为本申请实施例提供的电子设备;电流检测方法包括:In a third aspect, an embodiment of the present application provides a current detection method, which is applied to a first electronic device, and the electronic device is the electronic device provided in an embodiment of the present application; the current detection method includes:

通过采样控制单元采集第一分压模块两端的第一电压;Collecting a first voltage across the first voltage divider module by a sampling control unit;

根据第一电压和第一分压模块的电阻值,确定负载模块的第一供电电流;Determining a first power supply current of the load module according to the first voltage and the resistance value of the first voltage dividing module;

根据第一供电电流,确定负载模块的第一耗电量。A first power consumption of the load module is determined according to the first supply current.

第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现本申请实施例提供的电流检测方法的步骤。In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the current detection method provided in the embodiment of the present application are implemented.

第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现本申请实施例提供的电流检测方法的步骤。In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the current detection method provided in the embodiment of the present application.

第六方面,本申请实施例提供一种计算机程序产品,所述程序产品被存储在存储介质中,所述程序产品被至少一个处理器执行以实现本申请实施例提供的电流检测方法的步骤。In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the current detection method provided in the embodiment of the present application.

在本申请实施例中,电流检测电路包括采样控制单元和设置于负载供电通路上的第一分压模块;第一分压模块连接在供电模块和负载模块之间;采样控制单元的采样端分别与第一分压模块的两端连接,用于采集第一分压模块两端的第一电压,根据第一电压和第一分压模块的电阻值确定负载模块的第一供电电流,根据第一供电电流确定负载模块的第一耗电量。如此,通过该电流检测电路能够检测出各个负载模块的供电电流,进而能够确定出各个负载模块的耗电量。In the embodiment of the present application, the current detection circuit includes a sampling control unit and a first voltage divider module arranged on the load power supply path; the first voltage divider module is connected between the power supply module and the load module; the sampling end of the sampling control unit is respectively connected to the two ends of the first voltage divider module, and is used to collect the first voltage at the two ends of the first voltage divider module, determine the first power supply current of the load module according to the first voltage and the resistance value of the first voltage divider module, and determine the first power consumption of the load module according to the first power supply current. In this way, the power supply current of each load module can be detected by the current detection circuit, and then the power consumption of each load module can be determined.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1是本申请实施例提供的电流检测电路的第一种结构示意图;FIG1 is a schematic diagram of a first structure of a current detection circuit provided in an embodiment of the present application;

图2是本申请实施例提供的电流检测电路的第二种结构示意图;FIG2 is a second structural schematic diagram of a current detection circuit provided in an embodiment of the present application;

图3是本申请实施例提供的电流检测电路的第三种结构示意图;FIG3 is a third structural schematic diagram of a current detection circuit provided in an embodiment of the present application;

图4是本申请实施例提供的电流检测电路的第四种结构示意图;FIG4 is a fourth structural schematic diagram of a current detection circuit provided in an embodiment of the present application;

图5是本申请实施例提供的采样周期和电流采样间隙的示意图;FIG5 is a schematic diagram of a sampling period and a current sampling interval provided in an embodiment of the present application;

图6是本申请实施例提供的电流检测电路的第五种结构示意图;FIG6 is a fifth structural diagram of a current detection circuit provided in an embodiment of the present application;

图7是本申请实施例提供的电流检测电路的第六种结构示意图;FIG7 is a sixth structural diagram of a current detection circuit provided in an embodiment of the present application;

图8是本申请实施例提供的电流检测电路的第七种结构示意图;FIG8 is a seventh structural diagram of a current detection circuit provided in an embodiment of the present application;

图9是本申请实施例提供的电流检测方法的流程示意图;FIG9 is a schematic flow chart of a current detection method provided in an embodiment of the present application;

图10是本申请实施例提供的电子设备的结构示意图;FIG10 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

图11是实现本申请实施例的电子设备的硬件结构示意图。FIG. 11 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and/or" in the specification and claims represents at least one of the connected objects, and the character "/" generally indicates that the objects associated before and after are in an "or" relationship.

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的电流检测电路、电子设备及电流检测方法进行详细地说明。The current detection circuit, electronic device and current detection method provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.

本申请实施例提供的电流检测电路包括:采样控制单元和设置于负载供电通路上的第一分压模块;第一分压模块连接在供电模块和负载模块之间;采样控制单元的采样端分别与第一分压模块的两端连接,用于采集第一分压模块两端的第一电压,根据第一电压和第一分压模块的电阻值确定负载模块的第一供电电流,根据第一供电电流确定负载模块的第一耗电量。The current detection circuit provided in the embodiment of the present application includes: a sampling control unit and a first voltage divider module arranged on the load power supply path; the first voltage divider module is connected between the power supply module and the load module; the sampling end of the sampling control unit is respectively connected to the two ends of the first voltage divider module, for collecting the first voltage at the two ends of the first voltage divider module, determining the first power supply current of the load module according to the first voltage and the resistance value of the first voltage divider module, and determining the first power consumption of the load module according to the first power supply current.

当仅有一个负载供电通路时,本申请实施例提供的电流检测电路如图1所示,图1是本申请实施例提供的电流检测电路的第一种结构示意图。When there is only one load power supply path, the current detection circuit provided in the embodiment of the present application is shown in FIG1 , which is a schematic diagram of the first structure of the current detection circuit provided in the embodiment of the present application.

在图1中,电流检测电路10包括采样控制单元100和设置于负载供电通路101上的第一分压模块102,第一分压模块102连接在供电模块11和负载模块12之间,采样控制单元100的采样端分别与第一分压模块102的两端连接,采集第一分压模块102两端的第一电压,根据该第一电压和第一分压模块102的电阻值确定负载供电通路101上的供电电流,根据该供电电流确定负载模块12的耗电量。In Figure 1, the current detection circuit 10 includes a sampling control unit 100 and a first voltage divider module 102 arranged on a load power supply path 101. The first voltage divider module 102 is connected between the power supply module 11 and the load module 12. The sampling end of the sampling control unit 100 is respectively connected to the two ends of the first voltage divider module 102, and the first voltage at the two ends of the first voltage divider module 102 is collected. The power supply current on the load power supply path 101 is determined according to the first voltage and the resistance value of the first voltage divider module 102, and the power consumption of the load module 12 is determined according to the power supply current.

当存在多个负载供电通路时,本申请实施例提供的电流检测电路如图2所示,图2是本申请实施例提供的电流检测电路的第二种结构示意图。When there are multiple load power supply paths, the current detection circuit provided in the embodiment of the present application is shown in FIG. 2 , which is a second structural schematic diagram of the current detection circuit provided in the embodiment of the present application.

在图2中,电流检测电路10包括采样控制单元100和设置于n个负载供电通路上的第一分压模块。负载供电通路i上的分压模块i连接在供电模块11和负载供电通路i上的负载模块i之间,采样控制单元100采集分压模块i两端的第一电压,根据该第一电压和分压模块i的电阻值确定负载模块i的供电电流,根据该供电电流确定负载模块i的耗电量,其中,n为大于1的正整数,i为小于或等于n的正整数。In Fig. 2, the current detection circuit 10 includes a sampling control unit 100 and a first voltage divider module arranged on n load power supply paths. The voltage divider module i on the load power supply path i is connected between the power supply module 11 and the load module i on the load power supply path i. The sampling control unit 100 collects a first voltage across the voltage divider module i, determines the power supply current of the load module i according to the first voltage and the resistance value of the voltage divider module i, and determines the power consumption of the load module i according to the power supply current, wherein n is a positive integer greater than 1, and i is a positive integer less than or equal to n.

可以理解的是,在本实施例中,第一分压模块包括分压模块1至分压模块n。It can be understood that, in this embodiment, the first voltage dividing module includes voltage dividing module 1 to voltage dividing module n.

在本申请实施例中,电流检测电路包括采样控制单元和设置于负载供电通路上的第一分压模块;第一分压模块连接在供电模块和负载模块之间;采样控制单元采集第一分压模块两端的第一电压,根据第一电压和第一分压模块的电阻值确定负载模块的第一供电电流,根据第一供电电流确定负载模块的第一耗电量。如此,通过该电流检测电路能够检测出各个负载模块的供电电流,进而能够确定出各个负载模块的耗电量。In the embodiment of the present application, the current detection circuit includes a sampling control unit and a first voltage divider module disposed on the load power supply path; the first voltage divider module is connected between the power supply module and the load module; the sampling control unit collects the first voltage at both ends of the first voltage divider module, determines the first power supply current of the load module according to the first voltage and the resistance value of the first voltage divider module, and determines the first power consumption of the load module according to the first power supply current. In this way, the power supply current of each load module can be detected by the current detection circuit, and then the power consumption of each load module can be determined.

在本申请实施例的一些可能实现中,对于某一时刻某一负载模块的供电电流,可以将在该时刻采集到的设置在该负载供电通路上的第一分压模块两端的电压与第一分压模块的电阻值进行除法运算,得到该时刻该负载模块的供电电流。In some possible implementations of the embodiments of the present application, for the power supply current of a certain load module at a certain moment, the voltage across the first voltage divider module set on the load power supply path collected at that moment can be divided by the resistance value of the first voltage divider module to obtain the power supply current of the load module at that moment.

在本申请实施例的一些可能实现中,本申请实施例提供的电流检测电路还可以包括:设置于负载供电通路上且与第一分压模块并联的第一开关模块;第一开关模块的第一端与第一分压模块的第一端连接,第一开关模块的第二端与第一分压模块的第二端连接;第一开关模块的控制端与采样控制单元的控制信号输出端连接。In some possible implementations of the embodiments of the present application, the current detection circuit provided by the embodiments of the present application may also include: a first switch module arranged on the load power supply path and connected in parallel with the first voltage divider module; the first end of the first switch module is connected to the first end of the first voltage divider module, and the second end of the first switch module is connected to the second end of the first voltage divider module; the control end of the first switch module is connected to the control signal output end of the sampling control unit.

在本申请实施例的一些可能实现中,采样控制单元可以通过控制信号输出端输出的控制信号控制第一开关模块的导通和关断,由于第一开关模块与第一分压模块并联且第一开关模块的导通阻抗较小,当第一开关模块导通时,第一分压模块两端的电压趋近于0,此时,采样控制单元没有对负载模块进行电流采样;当第一开关模块断开时,采样控制单元对该负载模块进行电流采样。In some possible implementations of the embodiments of the present application, the sampling control unit can control the on and off of the first switch module by means of a control signal output from a control signal output terminal. Since the first switch module is connected in parallel with the first voltage divider module and the on-resistance of the first switch module is small, when the first switch module is turned on, the voltage across the first voltage divider module approaches 0. At this time, the sampling control unit does not perform current sampling on the load module; when the first switch module is disconnected, the sampling control unit performs current sampling on the load module.

在本申请实施例的一些可能实现中,采样控制单元可以通过一个控制信号输出端同时控制多个第一开关模块的导通和关断。In some possible implementations of the embodiments of the present application, the sampling control unit may simultaneously control the on and off of multiple first switch modules through a control signal output terminal.

如图3所示,图3是本申请实施例提供的电流检测电路的第三种结构示意图。在图3中,电流检测电路10包括采样控制单元100、设置于n个负载供电通路上的第一分压模块和设置于n个负载供电通路上且与第一分压模块并联的第一开关模块。负载供电通路i上的分压模块i连接在供电模块11和负载供电通路i上的负载模块i之间,开关模块i的第一端与分压模块i的第一端连接,开关模块i的第二端与分压模块i的第二端连接,分压模块i的控制端与采样控制单元100的控制信号输出端CTR连接。As shown in Figure 3, Figure 3 is a third structural schematic diagram of the current detection circuit provided in the embodiment of the present application. In Figure 3, the current detection circuit 10 includes a sampling control unit 100, a first voltage divider module arranged on n load power supply paths, and a first switch module arranged on the n load power supply paths and connected in parallel with the first voltage divider module. The voltage divider module i on the load power supply path i is connected between the power supply module 11 and the load module i on the load power supply path i, the first end of the switch module i is connected to the first end of the voltage divider module i, the second end of the switch module i is connected to the second end of the voltage divider module i, and the control end of the voltage divider module i is connected to the control signal output end CTR of the sampling control unit 100.

可以理解的是,在本实施例中,第一分压模块包括分压模块1至分压模块n,第一开关模块包括开关模块1至开关模块n。It can be understood that, in this embodiment, the first voltage dividing module includes voltage dividing modules 1 to voltage dividing modules n, and the first switch module includes switch modules 1 to switch modules n.

在本申请实施例中,采样控制单元可以通过一个控制信号输出端同时控制多个开关模块的导通和关断,实现同时对多个负载模块的供电电流进行采样。In the embodiment of the present application, the sampling control unit can simultaneously control the on and off of multiple switch modules through a control signal output terminal, thereby sampling the power supply current of multiple load modules at the same time.

在本申请实施例的一些可能实现中,采样控制单元可以通过多个控制信号输出端分别控制多个开关模块的导通和关断。In some possible implementations of the embodiments of the present application, the sampling control unit may respectively control the on and off of multiple switch modules through multiple control signal output terminals.

如图4所示,图4是本申请实施例提供的电流检测电路的第三种结构示意图。在图4中,电流检测电路10包括采样控制单元100、设置于n个负载供电通路上的第一分压模块和设置于n个负载供电通路上且与第一分压模块并联的第一开关模块。负载供电通路i上的分压模块i连接在供电模块11和负载供电通路i上的负载模块i之间,开关模块i的第一端与分压模块i的第一端连接,开关模块i的第二端与分压模块i的第二端连接,开关模块i的控制端与采样控制单元100的控制信号输出端CTRi连接。As shown in Figure 4, Figure 4 is a third structural schematic diagram of the current detection circuit provided in an embodiment of the present application. In Figure 4, the current detection circuit 10 includes a sampling control unit 100, a first voltage divider module arranged on n load power supply paths, and a first switch module arranged on the n load power supply paths and connected in parallel with the first voltage divider module. The voltage divider module i on the load power supply path i is connected between the power supply module 11 and the load module i on the load power supply path i, the first end of the switch module i is connected to the first end of the voltage divider module i, the second end of the switch module i is connected to the second end of the voltage divider module i, and the control end of the switch module i is connected to the control signal output end CTRi of the sampling control unit 100.

可以理解的是,在本实施例中,第一分压模块包括分压模块1至分压模块n,第一开关模块包括开关模块1至开关模块n。It can be understood that, in this embodiment, the first voltage dividing module includes voltage dividing modules 1 to voltage dividing modules n, and the first switch module includes switch modules 1 to switch modules n.

采样控制单元100通过CTRi控制开关模块i的导通和关断,进而实现对负载模块i的供电电流的采样。The sampling control unit 100 controls the on and off of the switch module i through CTRi, thereby sampling the power supply current of the load module i.

在本申请实施例的一些可能实现中,采样控制单元可以通过多个控制信号输出端分别控制多个开关模块的导通和关断,分别对多个负载模块的供电电流进行采样。In some possible implementations of the embodiments of the present application, the sampling control unit can control the on and off of multiple switch modules respectively through multiple control signal output terminals, and sample the power supply current of multiple load modules respectively.

在本申请实施例的一些可能实现中,采样控制单元可以控制各个负载模块的供电电流的采样周期和电流采样间隙,在采样周期的电流采样间隙内对负载模块的供电电流进行采样。如图5所示,图5是本申请实施例提供的采样周期和电流采样间隙的示意图。在图5中,T为采样周期,Ts为电流采样间隙。In some possible implementations of the embodiments of the present application, the sampling control unit can control the sampling period and current sampling interval of the power supply current of each load module, and sample the power supply current of the load module within the current sampling interval of the sampling period. As shown in Figure 5, Figure 5 is a schematic diagram of the sampling period and current sampling interval provided by the embodiments of the present application. In Figure 5, T is the sampling period and Ts is the current sampling interval.

在本申请实施例的一些可能实现中,本申请实施例中的负载供电通路包括无线传输供电通路,无线传输供电通路的负载模块为无线传输模块;无线传输供电通路中还包括第二分压模块;第二分压模块的第一端与无线传输供电通路上的第一分压模块的第一端连接,第二分压模块的第二端与采样控制单元连接;采样控制单元还用于采集第二分压模块两端的第二电压,根据第二电压和第二分压模块的电阻值确定采样控制单元的第二供电电流,根据第二供电电流确定采样控制单元的第二耗电量。In some possible implementations of the embodiments of the present application, the load power supply path in the embodiments of the present application includes a wireless transmission power supply path, and the load module of the wireless transmission power supply path is a wireless transmission module; the wireless transmission power supply path also includes a second voltage divider module; the first end of the second voltage divider module is connected to the first end of the first voltage divider module on the wireless transmission power supply path, and the second end of the second voltage divider module is connected to the sampling control unit; the sampling control unit is also used to collect the second voltage at both ends of the second voltage divider module, determine the second power supply current of the sampling control unit according to the second voltage and the resistance value of the second voltage divider module, and determine the second power consumption of the sampling control unit according to the second supply current.

如图6所示,图6是本申请实施例提供的电流检测电路的第五种结构示意图。在图6中,电流检测电路10包括采样控制单元100、设置于n个负载供电通路上的第一分压模块和设置于n个负载供电通路上且与第一分压模块并联的第一开关模块。负载供电通路i上的分压模块i连接在供电模块11和负载供电通路i上的负载模块i之间。负载供电通路n为无线传输供电通路。第二分压模块13的第一端与分压模块n的第一端连接,第二分压模块13的第二端与采样控制单元100连接。As shown in Figure 6, Figure 6 is a fifth structural schematic diagram of the current detection circuit provided in an embodiment of the present application. In Figure 6, the current detection circuit 10 includes a sampling control unit 100, a first voltage divider module arranged on n load power supply paths, and a first switch module arranged on n load power supply paths and connected in parallel with the first voltage divider module. The voltage divider module i on the load power supply path i is connected between the power supply module 11 and the load module i on the load power supply path i. The load power supply path n is a wireless transmission power supply path. The first end of the second voltage divider module 13 is connected to the first end of the voltage divider module n, and the second end of the second voltage divider module 13 is connected to the sampling control unit 100.

采样控制单元100采集第二分压模块两端的第二电压,根据第二电压和第二分压模块的电阻值确定采样控制单元的第二供电电流,根据第二供电电流确定采样控制单元的第二耗电量。The sampling control unit 100 collects a second voltage across the second voltage divider module, determines a second power supply current of the sampling control unit according to the second voltage and a resistance value of the second voltage divider module, and determines a second power consumption of the sampling control unit according to the second power supply current.

可以理解的是,在本实施例中,第一分压模块包括分压模块1至分压模块n,第一开关模块包括开关模块1至开关模块n。It can be understood that, in this embodiment, the first voltage dividing module includes voltage dividing modules 1 to voltage dividing modules n, and the first switch module includes switch modules 1 to switch modules n.

在本申请实施例中,通过该电流检测电路还能够检测出采样控制单元自身的耗电量。In the embodiment of the present application, the current detection circuit can also detect the power consumption of the sampling control unit itself.

在本申请实施例的一些可能实现中,采样控制单元可以与无线传输模块通信连接,可以通过无线传输模块将各个负载模块的耗电数据(例如,耗电量、耗电比等)传输给其他电子设备,或通过无线传输模块接收其他电子设备发送的耗电数据。In some possible implementations of the embodiments of the present application, the sampling control unit can be communicatively connected to the wireless transmission module, and the power consumption data (for example, power consumption, power consumption ratio, etc.) of each load module can be transmitted to other electronic devices through the wireless transmission module, or the power consumption data sent by other electronic devices can be received through the wireless transmission module.

在本申请实施例的一些可能实现中,无线传输供电通路中还可以包括与二分压模块并联的第二开关模块;第二开关模块的第一端与第二分压模块的第一端连接,第二开关模块的第二端与第二分压模块的第二端连接,第二开关模块的控制端与采样控制单元的控制信号输出端连接。In some possible implementations of the embodiments of the present application, the wireless transmission power supply path may also include a second switch module connected in parallel with the two-voltage divider module; the first end of the second switch module is connected to the first end of the second voltage divider module, the second end of the second switch module is connected to the second end of the second voltage divider module, and the control end of the second switch module is connected to the control signal output end of the sampling control unit.

如图7所示,图7是本申请实施例提供的电流检测电路的第六种结构示意图。在图7中,电流检测电路10包括采样控制单元100、设置于n个负载供电通路上的第一分压模块和设置于n个负载供电通路上且与第一分压模块并联的第一开关模块。负载供电通路n为无线传输供电通路。第二分压模块13的第一端与分压模块n的第一端连接,第二分压模块13的第二端与采样控制单元100连接。第二开关模块14的第一端与第二分压模块13的第一端连接,第二开关模块14的第二端与第二分压模块13的第二端连接,第二开关模块14的控制端与控制信号输出端CTRx连接。As shown in Figure 7, Figure 7 is a sixth structural schematic diagram of the current detection circuit provided in an embodiment of the present application. In Figure 7, the current detection circuit 10 includes a sampling control unit 100, a first voltage divider module arranged on n load power supply paths, and a first switch module arranged on n load power supply paths and connected in parallel with the first voltage divider module. The load power supply path n is a wireless transmission power supply path. The first end of the second voltage divider module 13 is connected to the first end of the voltage divider module n, and the second end of the second voltage divider module 13 is connected to the sampling control unit 100. The first end of the second switch module 14 is connected to the first end of the second voltage divider module 13, the second end of the second switch module 14 is connected to the second end of the second voltage divider module 13, and the control end of the second switch module 14 is connected to the control signal output end CTRx.

可以理解的是,在本实施例中,第一分压模块包括分压模块1至分压模块n,第一开关模块包括开关模块1至开关模块n。It can be understood that, in this embodiment, the first voltage dividing module includes voltage dividing modules 1 to voltage dividing modules n, and the first switch module includes switch modules 1 to switch modules n.

在本申请实施例的一些可能实现中,本申请实施例提供的电流检测电路还可以包括:设置于供电模块的总供电通路上的第三分压模块;采样控制单元还用于采集第三分压模块两端的第三电压,根据第三电压和第三分压模块的电阻值确定总供电通路的总电流,根据总电流确定负载供电通路的总耗电量。In some possible implementations of the embodiments of the present application, the current detection circuit provided by the embodiments of the present application may also include: a third voltage divider module arranged on the total power supply path of the power supply module; the sampling control unit is also used to collect the third voltage across the third voltage divider module, determine the total current of the total power supply path according to the third voltage and the resistance value of the third voltage divider module, and determine the total power consumption of the load power supply path according to the total current.

如图8所示,图8是本申请实施例提供的电流检测电路的第七种结构示意图。在图8中,电流检测电路10包括采样控制单元100、设置于n个负载供电通路上的第一分压模块、设置于n个负载供电通路上且与第一分压模块并联的第一开关模块和设置于供电模块11的总供电通路上的第三分压模块15。负载供电通路n为无线传输供电通路。As shown in Figure 8, Figure 8 is a seventh structural schematic diagram of the current detection circuit provided in the embodiment of the present application. In Figure 8, the current detection circuit 10 includes a sampling control unit 100, a first voltage divider module arranged on n load power supply paths, a first switch module arranged on the n load power supply paths and connected in parallel with the first voltage divider module, and a third voltage divider module 15 arranged on the total power supply path of the power supply module 11. The load power supply path n is a wireless transmission power supply path.

负载供电通路i上的分压模块i连接在供电模块11和负载供电通路i上的负载模块i之间。The voltage divider module i on the load power supply path i is connected between the power supply module 11 and the load module i on the load power supply path i.

第二分压模块13的第一端与分压模块n的第一端连接,第二分压模块13的第二端与采样控制单元100连接。第二开关模块14的第一端与第二分压模块13的第一端连接,第二开关模块14的第二端与第二分压模块13的第二端连接,第二开关模块14的控制端与控制信号输出端CTRx连接。The first end of the second voltage divider module 13 is connected to the first end of the voltage divider module n, and the second end of the second voltage divider module 13 is connected to the sampling control unit 100. The first end of the second switch module 14 is connected to the first end of the second voltage divider module 13, the second end of the second switch module 14 is connected to the second end of the second voltage divider module 13, and the control end of the second switch module 14 is connected to the control signal output end CTRx.

采样控制单元采集第三分压模块15两端的第三电压,根据第三电压和第三分压模块15的电阻值确定总供电通路的总电流,根据总电流确定负载供电通路的总耗电量。The sampling control unit collects the third voltage across the third voltage divider module 15, determines the total current of the total power supply path according to the third voltage and the resistance value of the third voltage divider module 15, and determines the total power consumption of the load power supply path according to the total current.

可以理解的是,在本实施例中,第一分压模块包括分压模块1至分压模块n,第一开关模块包括开关模块1至开关模块n。It can be understood that, in this embodiment, the first voltage dividing module includes voltage dividing modules 1 to voltage dividing modules n, and the first switch module includes switch modules 1 to switch modules n.

在本申请实施例的一些可能实现中,当根据第三电压和第三分压模块的电阻值计算出的电流值大于或等于电流阈值时,可以将该电流值确定为总供电通路的总电流,根据总电流确定负载模块的总耗电量。当根据第三电压和第三分压模块的电阻值计算出的电流值小于电流阈值时,可以将各个负载模块的供电电流的和作为总供电通路的总电流,进而根据总电流确定负载模块的总耗电量。In some possible implementations of the embodiments of the present application, when the current value calculated based on the third voltage and the resistance value of the third voltage divider module is greater than or equal to the current threshold, the current value can be determined as the total current of the total power supply path, and the total power consumption of the load modules can be determined based on the total current. When the current value calculated based on the third voltage and the resistance value of the third voltage divider module is less than the current threshold, the sum of the power supply currents of the various load modules can be used as the total current of the total power supply path, and the total power consumption of the load modules can be determined based on the total current.

在本申请实施例中,当根据第三电压和第三分压模块的电阻值计算出的电流值小于电流阈值时,表示通过第三分压模块采样得到的电流值精度较差,此时通过将各个负载模块的供电电流的和作为总供电通路的总电流,能够提高总供电通路的总电流的精度,进而提高确定负载模块的总耗电量的准确度。In an embodiment of the present application, when the current value calculated based on the third voltage and the resistance value of the third voltage divider module is less than the current threshold, it indicates that the accuracy of the current value sampled by the third voltage divider module is poor. At this time, by taking the sum of the power supply currents of each load module as the total current of the total power supply path, the accuracy of the total current of the total power supply path can be improved, thereby improving the accuracy of determining the total power consumption of the load modules.

在本申请实施例的一些可能实现中,本申请实施例中的分压模块可以包括分压器、电阻或具有特定阻值的线圈等,本申请实施例中的供电模块包括但不限于:电池、电容等,本申请实施例中的负载模块包括但不限于:显示模块、存储模块、网络模块等,本申请实施例中的开关模块可以为三极开关管,其中,三极开关管包括但不限于:绝缘栅双极晶体管(Insulate-Gate Bipolar Transistor,IGBT)和金属-氧化物半导体场效应晶体管(Metal-Oxide-Semiconductor Field-Effect Transistor,MOSFET)等。In some possible implementations of the embodiments of the present application, the voltage divider module in the embodiments of the present application may include a voltage divider, a resistor or a coil with a specific resistance value, etc. The power supply module in the embodiments of the present application includes but is not limited to: a battery, a capacitor, etc. The load module in the embodiments of the present application includes but is not limited to: a display module, a storage module, a network module, etc. The switch module in the embodiments of the present application can be a triode switch tube, wherein the triode switch tube includes but is not limited to: an insulated gate bipolar transistor (Insulate-Gate Bipolar Transistor, IGBT) and a metal-oxide semiconductor field-effect transistor (Metal-Oxide-Semiconductor Field-Effect Transistor, MOSFET), etc.

本申请实施例的一些可能实现中,可以通过如下公式(1)计算负载模块的耗电量:In some possible implementations of the embodiments of the present application, the power consumption of the load module can be calculated by the following formula (1):

其中,在公式(1)中,Cn为负载模块n在t0至t1时间段的耗电量,In(t)为随时间变化的负载模块n的供电电流。In formula (1), Cn is the power consumption of load module n during the time period from t0 to t1, and In(t) is the power supply current of load module n that changes with time.

本申请实施例的一些可能实现中,可以通过如下公式(2)计算各个负载模块的总耗电量:In some possible implementations of the present application, the total power consumption of each load module can be calculated by the following formula (2):

其中,在公式(2)中,C为各个负载模块在t0至t1时间段的耗电量,I(t)为随时间变化的总电流。Wherein, in formula (2), C is the power consumption of each load module in the time period from t0 to t1, and I(t) is the total current that changes with time.

本申请实施例还提供一种电子设备,包括本申请实施例提供的电流检测电路。An embodiment of the present application also provides an electronic device, including the current detection circuit provided by the embodiment of the present application.

本申请实施例中的电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digitalassistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (MID), an augmented reality (AR)/virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It may also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiments of the present application are not specifically limited.

本申请实施例中的电子设备可以为具有操作系统的电子设备。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The electronic device in the embodiment of the present application may be an electronic device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

本申请实施例还提供一种电流检测方法,应用于第一电子设备,其中,该第一电子设备为本申请实施例提供的电子设备。An embodiment of the present application also provides a current detection method, which is applied to a first electronic device, wherein the first electronic device is the electronic device provided by the embodiment of the present application.

图9是本申请实施例提供的电流检测方法的流程示意图。电流检测方法可以包括:FIG9 is a flow chart of a current detection method provided in an embodiment of the present application. The current detection method may include:

步骤801:通过采样控制单元采集第一分压模块两端的第一电压;Step 801: collecting a first voltage at two ends of a first voltage dividing module through a sampling control unit;

步骤802:根据第一电压和第一分压模块的电阻值,确定负载模块的第一供电电流;Step 802: determining a first supply current of a load module according to a first voltage and a resistance value of a first voltage dividing module;

在本申请实施例的一些可能实现中,对于某一时刻负载模块的第一供电电流,可以将在该时刻采集到的第一分压模块两端的电压与第一分压模块的电阻值进行除法运算,得到该时刻负载模块的第一供电电流。In some possible implementations of the embodiments of the present application, for the first power supply current of the load module at a certain moment, the voltage across the first voltage divider module collected at that moment can be divided by the resistance value of the first voltage divider module to obtain the first power supply current of the load module at that moment.

步骤803:根据第一供电电流,确定负载模块的第一耗电量。Step 803: Determine a first power consumption of the load module according to the first power supply current.

在本申请实施例的一些可能实现中,可以得到t0至t1时间段内任意一个时刻负载模块的第一供电电流,进而得到负载模块在t0至t1时间段随时间变化的供电电流,然后通过上述公式(1)可以计算出t0至t1时间段负载模块的耗电量。In some possible implementations of the embodiments of the present application, the first power supply current of the load module at any time in the time period from t0 to t1 can be obtained, and then the power supply current of the load module that changes with time in the time period from t0 to t1 can be obtained, and then the power consumption of the load module in the time period from t0 to t1 can be calculated by the above formula (1).

在本申请实施例中,能够检测出负载模块的供电电流,确定出负载模块的耗电量。In the embodiment of the present application, the power supply current of the load module can be detected to determine the power consumption of the load module.

在本申请实施例的一些可能实现中,在步骤801之前,本申请实施例提供的电流检测方法还可以包括:通过采样控制单元控制设置于负载供电通路上的第一开关模块断开第一时长;相应地,步骤801可以包括:在第一时长内,通过采样控制单元采集第一电压。In some possible implementations of the embodiments of the present application, before step 801, the current detection method provided by the embodiments of the present application may also include: controlling the first switch module arranged on the load power supply path to disconnect for a first time length through the sampling control unit; accordingly, step 801 may include: within the first time length, collecting the first voltage through the sampling control unit.

在本申请实施例的一些可能实现中,可以通过采样控制单元上的控制信号输出端向第一开关模块的控制端输出控制信号来控制第一开关模块的导通和断开。当第一开关模块导通时,第一分压模块两端的电压趋近于0,此时,采样控制单元没有对负载模块进行电流采样;当第一开关模块断开时,采样控制单元对负载模块进行电流采样。In some possible implementations of the embodiments of the present application, the first switch module can be controlled to be turned on and off by outputting a control signal from a control signal output terminal on the sampling control unit to a control terminal of the first switch module. When the first switch module is turned on, the voltage across the first voltage divider module approaches 0, and at this time, the sampling control unit does not perform current sampling on the load module; when the first switch module is turned off, the sampling control unit performs current sampling on the load module.

在本申请实施例的一些可能实现中,本申请实施例提供的电流检测方法还可以包括:在第一时长内,通过采样控制单元采集第三分压模块两端的第三电压,其中,第三分压模块为设置于供电模块的总供电通路上的分压模块;根据第三电压和第三分压模块的电阻值,确定流经第三分压模块的电流;在流经第三分压模块的电流大于或等于电流阈值的情况下,将流经第三分压模块的电流,确定为总供电通路的总电流;在流经第三分压模块的电流小于电流阈值的情况下,将第一供电电流之和,确定为总电流;根据总电流,确定负载模块在第一时长内的总耗电量。In some possible implementations of the embodiments of the present application, the current detection method provided by the embodiments of the present application may further include: within a first time period, collecting a third voltage across the third voltage divider module through a sampling control unit, wherein the third voltage divider module is a voltage divider module arranged on a total power supply path of the power supply module; determining the current flowing through the third voltage divider module according to the third voltage and the resistance value of the third voltage divider module; when the current flowing through the third voltage divider module is greater than or equal to a current threshold, determining the current flowing through the third voltage divider module as the total current of the total power supply path; when the current flowing through the third voltage divider module is less than the current threshold, determining the sum of the first supply currents as the total current; and determining the total power consumption of the load module within the first time period according to the total current.

在本申请实施例的一些可能实现中,当根据第三电压和第三分压模块的电阻值计算出的电流值大于或等于电流阈值时,可以将该电流值确定为总供电通路的总电流,根据总电流确定负载模块的总耗电量。当根据第三电压和第三分压模块的电阻值计算出的电流值小于电流阈值时,可以将各个负载模块的供电电流的和作为总供电通路的总电流,进而根据总电流确定负载模块的总耗电量。In some possible implementations of the embodiments of the present application, when the current value calculated based on the third voltage and the resistance value of the third voltage divider module is greater than or equal to the current threshold, the current value can be determined as the total current of the total power supply path, and the total power consumption of the load modules can be determined based on the total current. When the current value calculated based on the third voltage and the resistance value of the third voltage divider module is less than the current threshold, the sum of the power supply currents of the various load modules can be used as the total current of the total power supply path, and the total power consumption of the load modules can be determined based on the total current.

在本申请实施例的一些可能实现中,当得到在t0至t1时间段随时间变化的总供电通路的总电流,然后通过上述公式(2)可以计算出t0至t1时间段负载模块的总耗电量。In some possible implementations of the embodiments of the present application, when the total current of the total power supply path that changes with time in the time period from t0 to t1 is obtained, the total power consumption of the load module in the time period from t0 to t1 can be calculated by the above formula (2).

在本申请实施例中,当根据第三电压和第三分压模块的电阻值计算出的电流值小于电流阈值时,表示通过第三分压模块采样得到的电流值精度较差,此时通过将各个负载模块的供电电流的和作为总供电通路的总电流,能够提高总供电通路的总电流的精度,进而提高确定负载模块的总耗电量的准确度。In an embodiment of the present application, when the current value calculated based on the third voltage and the resistance value of the third voltage divider module is less than the current threshold, it indicates that the accuracy of the current value sampled by the third voltage divider module is poor. At this time, by taking the sum of the power supply currents of each load module as the total current of the total power supply path, the accuracy of the total current of the total power supply path can be improved, thereby improving the accuracy of determining the total power consumption of the load modules.

在本申请实施例的一些可能实现中,本申请实施例提供的电流检测方法还可以包括:根据第一耗电量和总耗电量,确定负载模块在第一时长内的第一耗电比;获取第二电子设备中负载模块在第一时长的第二耗电比;根据第一耗电比和第二耗电比,确定平均耗电比,其中,平均耗电比用于衡量负载模块对用户使用电子设备的耗电影响。In some possible implementations of the embodiments of the present application, the current detection method provided in the embodiments of the present application may also include: determining a first power consumption ratio of the load module within a first time period based on the first power consumption and the total power consumption; obtaining a second power consumption ratio of the load module in the second electronic device in the first time period; and determining an average power consumption ratio based on the first power consumption ratio and the second power consumption ratio, wherein the average power consumption ratio is used to measure the impact of the load module on the power consumption of the user using the electronic device.

需要说明的是,第二电子设备为与第一电子设备型号相同且配置相同的电子设备。It should be noted that the second electronic device is an electronic device of the same model and configuration as the first electronic device.

在本申请实施例的一些可能实现中,可以根据如下公式(3)计算耗电比:In some possible implementations of the embodiments of the present application, the power consumption ratio may be calculated according to the following formula (3):

kj=Cj/C (3)kj=Cj/C (3)

其中,在公式(3)中,kj为负载模块j在第一时长内的耗电比,Cj为负载模块j的耗电量,C为总耗电量。Wherein, in formula (3), kj is the power consumption ratio of load module j in the first time period, Cj is the power consumption of load module j, and C is the total power consumption.

当得到每个电子设备的负载模块j在第一时长内的耗电比之后,可以根据如下公式(4)计算出平均耗电比:After the power consumption ratio of the load module j of each electronic device in the first time period is obtained, the average power consumption ratio can be calculated according to the following formula (4):

其中,在公式(4)中,AVGj为平均耗电比,K0-j为第一电子设备的负载模块j在第一时长内的耗电比,Ki-j为电子设备i的负载模块j在第一时长内的耗电比,i为小于或等于n的正整数,第二电子设备包括电子设备1至电子设备n。Wherein, in formula (4), AVGj is the average power consumption ratio, K0 -j is the power consumption ratio of load module j of the first electronic device within the first time length, Kij is the power consumption ratio of load module j of electronic device i within the first time length, i is a positive integer less than or equal to n, and the second electronic device includes electronic device 1 to electronic device n.

当第一电子设备的负载模块j在第一时长内的耗电比大于该平均耗电比,可以认为该负载模块j对用户使用第一电子设备的耗电影响较大。When the power consumption ratio of the load module j of the first electronic device within the first period is greater than the average power consumption ratio, it can be considered that the load module j has a greater impact on the power consumption of the user when using the first electronic device.

在本申请实施例中,能够衡量出负载模块对用户使用电子设备的耗电影响。In the embodiment of the present application, the impact of the load module on the power consumption of the user's use of the electronic device can be measured.

在本申请实施例的一些可能实现中,本申请实施例提供的电流检测方法还可以包括:获取第三电子设备中负载模块在第一时长的第三耗电量;显示第一耗电量与第三耗电量的比较结果。In some possible implementations of the embodiments of the present application, the current detection method provided by the embodiments of the present application may also include: obtaining a third power consumption of a load module in a third electronic device in a first time period; and displaying a comparison result between the first power consumption and the third power consumption.

需要说明的是,第三电子设备为与第一电子设备型号相同且配置相同的电子设备。It should be noted that the third electronic device is an electronic device of the same model and configuration as the first electronic device.

示例性地,假设获取到100个电子设备的负载模块j在第一时长的耗电量,其中,第一电子设备的负载模块j在第一时长的耗电量比上述100个电子设备中的87个电子设备的负载模块j在第一时长的耗电量大,显示提示信息“负载模块j的耗电量完败87%的电子设备,需要控制负载模块j的耗电量”。Exemplarily, assuming that the power consumption of load module j of 100 electronic devices in the first time period is obtained, among which the power consumption of load module j of the first electronic device in the first time period is greater than the power consumption of load module j of 87 electronic devices among the above 100 electronic devices in the first time period, a prompt message is displayed: "The power consumption of load module j exceeds 87% of the electronic devices, and the power consumption of load module j needs to be controlled."

示例性地,假设获取到100个电子设备的负载模块j在第一时长的耗电量,其中,第一电子设备的负载模块j在第一时长的耗电量比上述100个电子设备中的87个电子设备的负载模块j在第一时长的耗电量小,显示提示信息“负载模块j的耗电量完胜87%的电子设备,请继续保持”。Exemplarily, assuming that the power consumption of load module j of 100 electronic devices in the first time period is obtained, among which the power consumption of load module j of the first electronic device in the first time period is less than the power consumption of load module j of 87 electronic devices among the above 100 electronic devices in the first time period, a prompt message "The power consumption of load module j beats 87% of the electronic devices, please keep up" is displayed.

在本申请实施例中,通过其他电子设备中负载模块在第一时长的第三耗电量,能够区分出负载模块的重度用户和轻度用户,其中,重度用户指使用电子设备时负载模块耗电量较大的用户,轻度用户指使用电子设备时负载模块耗电量较小的用户。In an embodiment of the present application, heavy users and light users of the load module can be distinguished through the third power consumption of the load module in the first time period in other electronic devices, wherein a heavy user refers to a user whose load module consumes more power when using an electronic device, and a light user refers to a user whose load module consumes less power when using an electronic device.

在本申请实施例的一些可能实现中,当获取到第三电子设备中负载模块在第一时长的第三耗电量之后,如果这些负载模块的耗电量大部分大于耗电量阈值,则可以对下一代电子设备进行优化,例如,电子设备的显示模块的耗电量大部分大于耗电量阈值,在生产下一代电子设备时,下一代电子设备的显示模块可以使用耗电小的屏幕或者下一代电子设备使用大容量电池。In some possible implementations of the embodiments of the present application, after obtaining the third power consumption of the load modules in the third electronic device in the first time period, if the power consumption of most of these load modules is greater than the power consumption threshold, the next-generation electronic device can be optimized. For example, the power consumption of the display modules of the electronic device is mostly greater than the power consumption threshold. When producing the next-generation electronic device, the display modules of the next-generation electronic device can use screens with low power consumption or the next-generation electronic device can use large-capacity batteries.

在本申请实施例的一些可能实现中,本申请实施例提供的电流检测方法还可以包括:根据第一电子设备的工作模式,确定总电流对应的第一电流范围;在总电流不在第一电流范围的情况下,显示第一异常信息,其中,第一异常信息用于表示负载模块中存在异常负载模块。In some possible implementations of the embodiments of the present application, the current detection method provided by the embodiments of the present application may also include: determining a first current range corresponding to the total current according to an operating mode of the first electronic device; when the total current is not within the first current range, displaying first abnormal information, wherein the first abnormal information is used to indicate the presence of an abnormal load module in the load module.

在本申请实施例的一些可能实现中,本申请实施例中的工作模式包括但不限于正常工作模式、灭屏待机工作模式和睡眠模式。在不同的工作模式下,总供电通路的总电流对应不同的电流范围。In some possible implementations of the embodiments of the present application, the working modes in the embodiments of the present application include but are not limited to normal working mode, screen-off standby working mode and sleep mode. In different working modes, the total current of the total power supply path corresponds to different current ranges.

可以获取第一电子设备的工作模式,再根据总电流对应的工作模式与电流范围的对应关系,确定出与获取到的工作模式对应的总电流的电流范围。当总供电通路的总电流不在该确定出的电流范围时,表示负载模块中存在异常负载模块,此时显示异常信息提醒用户负载模块中存在异常负载模块。The working mode of the first electronic device can be obtained, and then the current range of the total current corresponding to the obtained working mode can be determined according to the corresponding relationship between the working mode corresponding to the total current and the current range. When the total current of the total power supply path is not within the determined current range, it indicates that an abnormal load module exists in the load module, and at this time, abnormal information is displayed to remind the user that an abnormal load module exists in the load module.

在本申请实施例中,通过显示表示负载模块中存在异常负载模块的异常信息,使得用户能够获知有负载模块异常。In the embodiment of the present application, by displaying abnormal information indicating that there is an abnormal load module in the load module, the user can be informed that there is an abnormal load module.

在本申请实施例的一些可能实现中,本申请实施例提供的电流检测方法还可以包括:根据第一电子设备的工作模式,确定负载模块对应的第二电流范围;在第一供电电流不在第二电流范围的情况下,显示第二异常信息,其中,第二异常信息用于表示负载模块存在异常。In some possible implementations of the embodiments of the present application, the current detection method provided by the embodiments of the present application may also include: determining a second current range corresponding to the load module according to the working mode of the first electronic device; and displaying second abnormal information when the first power supply current is not within the second current range, wherein the second abnormal information is used to indicate that there is an abnormality in the load module.

在本申请实施例的一些可能实现中,本申请实施例中的工作模式包括但不限于正常工作模式、灭屏待机工作模式和睡眠模式。在不同的工作模式下,不同负载模块对应不同的电流范围。In some possible implementations of the embodiments of the present application, the working modes in the embodiments of the present application include but are not limited to normal working mode, screen-off standby working mode and sleep mode. In different working modes, different load modules correspond to different current ranges.

示例性地,下面以上述负载模块i为例进行说明。Exemplarily, the above-mentioned load module i is taken as an example for description below.

可以获取第一电子设备的工作模式,再根据负载模块i对应的工作模式与电流范围的对应关系,确定出与获取到的工作模式对应的负载模块i的电流范围。当负载模块i的供电电流不在该确定出的电流范围时,表示负载模块i存在异常,此时显示异常信息提醒用户负载模块i存在异常。The working mode of the first electronic device can be obtained, and then the current range of the load module i corresponding to the obtained working mode can be determined according to the corresponding relationship between the working mode corresponding to the load module i and the current range. When the power supply current of the load module i is not within the determined current range, it indicates that the load module i is abnormal, and the abnormal information is displayed to remind the user that the load module i is abnormal.

在本申请实施例中,通过显示表示负载模块存在异常的异常信息,使得用户能够直接获知负载模块存在异常。In the embodiment of the present application, by displaying abnormal information indicating that an abnormality exists in the load module, the user can directly learn that an abnormality exists in the load module.

可选地,如图10所示,本申请实施例还提供一种电子设备900,包括处理器901和存储器902,存储器902上存储有可在所述处理器901上运行的程序或指令,该程序或指令被处理器901执行时实现上述电流检测方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in Figure 10, an embodiment of the present application also provides an electronic device 900, including a processor 901 and a memory 902, and the memory 902 stores a program or instruction that can be executed on the processor 901. When the program or instruction is executed by the processor 901, the various steps of the above-mentioned current detection method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

图11是实现本申请实施例的电子设备的硬件结构示意图。FIG. 11 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.

该电子设备1000包括但不限于:射频单元1001、网络模块1002、音频输出单元1003、输入单元1004、传感器1005、显示单元1006、用户输入单元1007、接口单元1008、存储器1009、以及处理器1010等部件。The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.

该电子设备1000还包括本申请实施例提供电流检测电路。The electronic device 1000 also includes a current detection circuit provided in an embodiment of the present application.

本领域技术人员可以理解,电子设备1000还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图11中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 1000 can also include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 1010 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system. The electronic device structure shown in FIG11 does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than shown in the figure, or combine certain components, or arrange components differently, which will not be described in detail here.

其中,电流检测电路用于通过所述采样控制单元采集第一分压模块两端的第一电压;根据第一电压和第一分压模块的电阻值,确定负载模块的第一供电电流;根据第一供电电流,确定负载模块的第一耗电量。Among them, the current detection circuit is used to collect the first voltage at both ends of the first voltage divider module through the sampling control unit; determine the first power supply current of the load module according to the first voltage and the resistance value of the first voltage divider module; and determine the first power consumption of the load module according to the first power supply current.

在本申请实施例中,能够检测出负载模块的供电电流,确定出负载模块的耗电量。In the embodiment of the present application, the power supply current of the load module can be detected to determine the power consumption of the load module.

在本申请实施例的一些可能实现中,电流检测电路还用于通过采样控制单元控制设置于负载供电通路上的第一开关模块断开第一时长;在第一时长内,通过采样控制单元采集第一电压。In some possible implementations of the embodiments of the present application, the current detection circuit is also used to control the first switch module arranged on the load power supply path to disconnect for a first time period through a sampling control unit; within the first time period, the first voltage is collected through the sampling control unit.

在本申请实施例的一些可能实现中,电流检测电路还用于在第一时长内,通过采样控制单元采集第三分压模块两端的第三电压,其中,第三分压模块为设置于供电模块的总供电通路上的分压模块;根据第三电压和第三分压模块的电阻值确定流经第三分压模块的电流;在流经第三分压模块的电流大于或等于电流阈值的情况下,将流经所述第三分压模块的电流,确定为总供电通路的总电流;在流经第三分压模块的电流小于电流阈值的情况下,将第一供电电流之和,确定为总电流,根据总电流,确定负载模块在第一时长内的总耗电量。In some possible implementations of the embodiments of the present application, the current detection circuit is also used to collect a third voltage across the third voltage divider module through a sampling control unit within a first time period, wherein the third voltage divider module is a voltage divider module arranged on a total power supply path of the power supply module; the current flowing through the third voltage divider module is determined according to the third voltage and the resistance value of the third voltage divider module; when the current flowing through the third voltage divider module is greater than or equal to a current threshold, the current flowing through the third voltage divider module is determined as the total current of the total power supply path; when the current flowing through the third voltage divider module is less than the current threshold, the sum of the first supply currents is determined as the total current, and the total power consumption of the load module within the first time period is determined based on the total current.

在本申请实施例中,当根据第三电压和第三分压模块的电阻值计算出的电流值小于电流阈值时,表示通过第三分压模块采样得到的电流值精度较差,此时通过将各个负载模块的供电电流的和作为总供电通路的总电流,能够提高总供电通路的总电流的精度,进而提高确定负载模块的总耗电量的准确度。In an embodiment of the present application, when the current value calculated based on the third voltage and the resistance value of the third voltage divider module is less than the current threshold, it indicates that the accuracy of the current value sampled by the third voltage divider module is poor. At this time, by taking the sum of the power supply currents of each load module as the total current of the total power supply path, the accuracy of the total current of the total power supply path can be improved, thereby improving the accuracy of determining the total power consumption of the load modules.

在本申请实施例的一些可能实现中,处理器1010用于根据第一耗电量和总耗电量,确定负载模块在第一时长内的第一耗电比;获取第二电子设备中负载模块在第一时长的第二耗电比;根据第一耗电比和第二耗电比,确定平均耗电比,其中,平均耗电比用于衡量负载模块对用户使用电子设备的耗电影响。In some possible implementations of the embodiments of the present application, the processor 1010 is used to determine a first power consumption ratio of the load module within a first time period based on the first power consumption and the total power consumption; obtain a second power consumption ratio of the load module in the second electronic device during the first time period; and determine an average power consumption ratio based on the first power consumption ratio and the second power consumption ratio, wherein the average power consumption ratio is used to measure the impact of the load module on the power consumption of the user using the electronic device.

在本申请实施例的一些可能实现中,处理器1010还用于:获取第三电子设备中负载模块在第一时长的第三耗电量;In some possible implementations of the embodiments of the present application, the processor 1010 is further configured to: obtain a third power consumption of a load module in a third electronic device during a first time period;

显示单元1006用于:显示第一耗电量与第三耗电量的比较结果。The display unit 1006 is used to display a comparison result between the first power consumption and the third power consumption.

在本申请实施例中,通过其他电子设备中负载模块在第一时长的第三耗电量,能够区分出负载模块的重度用户和轻度用户,其中,重度用户指使用电子设备时负载模块耗电量较大的用户,轻度用户指使用电子设备时负载模块耗电量较小的用户。In an embodiment of the present application, heavy users and light users of the load module can be distinguished through the third power consumption of the load module in the first time period in other electronic devices, wherein a heavy user refers to a user whose load module consumes more power when using an electronic device, and a light user refers to a user whose load module consumes less power when using an electronic device.

在本申请实施例的一些可能实现中,处理器1010还用于:根据第一电子设备的工作模式,确定总电流对应的第一电流范围;In some possible implementations of the embodiments of the present application, the processor 1010 is further configured to: determine a first current range corresponding to the total current according to an operating mode of the first electronic device;

显示单元1006还用于:在总电流不在第一电流范围的情况下,显示第一异常信息,其中,第一异常信息用于表示负载模块中存在异常负载模块。The display unit 1006 is further used to display first abnormal information when the total current is not within the first current range, wherein the first abnormal information is used to indicate that an abnormal load module exists in the load modules.

在本申请实施例中,通过显示表示负载模块中存在异常负载模块的异常信息,使得用户能够获知有负载模块异常。In the embodiment of the present application, by displaying abnormal information indicating that there is an abnormal load module in the load module, the user can be informed that there is an abnormal load module.

在本申请实施例的一些可能实现中,处理器1010还用于:根据第一电子设备的工作模式,确定负载模块对应的第二电流范围;In some possible implementations of the embodiments of the present application, the processor 1010 is further configured to: determine a second current range corresponding to the load module according to an operating mode of the first electronic device;

显示单元1006还用于:在第一供电电流不在第二电流范围的情况下,显示第二异常信息,其中,第二异常信息用于表示负载模块存在异常。The display unit 1006 is further used to display second abnormality information when the first power supply current is not within the second current range, wherein the second abnormality information is used to indicate that an abnormality exists in the load module.

在本申请实施例中,通过显示表示负载模块存在异常的异常信息,使得用户能够直接获知负载模块存在异常。In the embodiment of the present application, by displaying abnormal information indicating that an abnormality exists in the load module, the user can directly learn that an abnormality exists in the load module.

应理解的是,本申请实施例中,输入单元1004可以包括图形处理器(GraphicsProcessing Unit,GPU)10041和麦克风10042,图形处理器10041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1006可包括显示面板10061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板10061。用户输入单元1007包括触控面板10071以及其他输入设备10072中的至少一种。触控面板10071,也称为触摸屏。触控面板10071可包括触摸检测装置和触摸控制器两个部分。其他输入设备10072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

存储器1009可用于存储软件程序以及各种数据。存储器1009可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器1009可以包括易失性存储器或非易失性存储器,或者,存储器1009可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器1009包括但不限于这些和任意其它适合类型的存储器。The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

处理器1010可包括一个或多个处理单元;可选的,处理器1010集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器1010中。The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.

本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述电流检测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned current detection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,计算机可读存储介质的示例包括非暂态计算机可读介质,如计算机只读存储器ROM、随机存取存储器RAM、磁碟或者光盘等。The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, and examples of computer-readable storage media include non-transitory computer-readable media, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

本申请实施例还提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述电流检测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application also provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned current detection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

本申请实施例还提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如上述电流检测方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application also provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the current detection method embodiment as described above, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims (13)

1.一种电流检测电路,其特征在于,所述电流检测电路包括:采样控制单元和设置于负载供电通路上的第一分压模块;1. A current detection circuit, characterized in that the current detection circuit comprises: a sampling control unit and a first voltage dividing module arranged on a load power supply path; 所述第一分压模块连接在供电模块和负载模块之间;The first voltage dividing module is connected between the power supply module and the load module; 所述采样控制单元的采样端分别与所述第一分压模块的两端连接,用于采集所述第一分压模块两端的第一电压,根据所述第一电压和所述第一分压模块的电阻值确定所述负载模块的第一供电电流,根据所述第一供电电流确定所述负载模块的第一耗电量。The sampling ends of the sampling control unit are respectively connected to the two ends of the first voltage divider module, and are used to collect the first voltage at the two ends of the first voltage divider module, determine the first power supply current of the load module according to the first voltage and the resistance value of the first voltage divider module, and determine the first power consumption of the load module according to the first power supply current. 2.根据权利要求1所述的电流检测电路,其特征在于,所述电流检测电路还包括:设置于所述负载供电通路上且与所述第一分压模块并联的第一开关模块;2. The current detection circuit according to claim 1, characterized in that the current detection circuit further comprises: a first switch module disposed on the load power supply path and connected in parallel with the first voltage divider module; 所述第一开关模块的第一端与所述第一分压模块的第一端连接,所述第一开关模块的第二端与所述第一分压模块的第二端连接;The first end of the first switch module is connected to the first end of the first voltage divider module, and the second end of the first switch module is connected to the second end of the first voltage divider module; 所述第一开关模块的控制端与所述采样控制单元的控制信号输出端连接。The control end of the first switch module is connected to the control signal output end of the sampling control unit. 3.根据权利要求2所述的电流检测电路,其特征在于,所述负载供电通路包括无线传输供电通路,所述无线传输供电通路的负载模块为无线传输模块;3. The current detection circuit according to claim 2, characterized in that the load power supply path includes a wireless transmission power supply path, and the load module of the wireless transmission power supply path is a wireless transmission module; 所述无线传输供电通路中还包括第二分压模块;所述第二分压模块的第一端与所述无线传输供电通路上的第一分压模块的第一端连接,所述第二分压模块的第二端与所述采样控制单元连接;The wireless transmission power supply path also includes a second voltage divider module; a first end of the second voltage divider module is connected to a first end of the first voltage divider module on the wireless transmission power supply path, and a second end of the second voltage divider module is connected to the sampling control unit; 所述采样控制单元还用于采集所述第二分压模块两端的第二电压,根据所述第二电压和所述第二分压模块的电阻值确定所述采样控制单元的第二供电电流,根据所述第二供电电流确定所述采样控制单元的第二耗电量。The sampling control unit is further used to collect a second voltage across the second voltage divider module, determine a second power supply current of the sampling control unit according to the second voltage and the resistance value of the second voltage divider module, and determine a second power consumption of the sampling control unit according to the second power supply current. 4.根据权利要求3所述的电流检测电路,其特征在于,所述无线传输供电通路中还包括与所述第二分压模块并联的第二开关模块;4. The current detection circuit according to claim 3, characterized in that the wireless transmission power supply path further comprises a second switch module connected in parallel with the second voltage dividing module; 所述第二开关模块的第一端与所述第二分压模块的第一端连接,所述第二开关模块的第二端与所述第二分压模块的第二端连接,所述第二开关模块的控制端与所述采样控制单元的控制信号输出端连接。The first end of the second switch module is connected to the first end of the second voltage divider module, the second end of the second switch module is connected to the second end of the second voltage divider module, and the control end of the second switch module is connected to the control signal output end of the sampling control unit. 5.根据权利要求1-4任一项所述的电流检测电路,其特征在于,所述电流检测电路还包括:设置于所述供电模块的总供电通路上的第三分压模块;5. The current detection circuit according to any one of claims 1 to 4, characterized in that the current detection circuit further comprises: a third voltage dividing module arranged on the total power supply path of the power supply module; 所述采样控制单元还用于采集所述第三分压模块两端的第三电压,根据所述第三电压和所述第三分压模块的电阻值确定所述总供电通路的总电流,根据所述总电流确定所述负载供电通路的总耗电量。The sampling control unit is also used to collect the third voltage across the third voltage divider module, determine the total current of the total power supply path according to the third voltage and the resistance value of the third voltage divider module, and determine the total power consumption of the load power supply path according to the total current. 6.一种电子设备,其特征在于,所述电子设备包括:6. An electronic device, characterized in that the electronic device comprises: 权利要求1至5任一项所述的电流检测电路。The current detection circuit according to any one of claims 1 to 5. 7.一种电流检测方法,其特征在于,应用于第一电子设备,所述第一电子设备为权利要求6所述的电子设备,所述方法包括:7. A current detection method, characterized in that it is applied to a first electronic device, the first electronic device is the electronic device according to claim 6, and the method comprises: 通过所述采样控制单元采集所述第一分压模块两端的第一电压;Collecting the first voltage at both ends of the first voltage dividing module by the sampling control unit; 根据所述第一电压和所述第一分压模块的电阻值,确定所述负载模块的第一供电电流;determining a first supply current of the load module according to the first voltage and the resistance value of the first voltage divider module; 根据所述第一供电电流,确定所述负载模块的第一耗电量。A first power consumption of the load module is determined according to the first supply current. 8.根据权利要求7所述的方法,其特征在于,所述通过所述采样控制单元采集设置于负载供电通路上的第一分压模块两端的第一电压之前,所述方法还包括:8. The method according to claim 7, characterized in that before the sampling control unit collects the first voltage across the first voltage divider module disposed on the load power supply path, the method further comprises: 通过所述采样控制单元控制设置于所述负载供电通路上的第一开关模块断开第一时长;Controlling, by the sampling control unit, a first switch module disposed on the load power supply path to be disconnected for a first time period; 所述通过所述采样控制单元采集设置于负载供电通路上的第一分压模块两端的第一电压,包括:The collecting of the first voltage at both ends of the first voltage dividing module disposed on the load power supply path by the sampling control unit includes: 在所述第一时长内,通过所述采样控制单元采集所述第一电压。During the first time period, the first voltage is collected by the sampling control unit. 9.根据权利要求8所述的方法,其特征在于,所述方法还包括:9. The method according to claim 8, characterized in that the method further comprises: 在所述第一时长内,通过所述采样控制单元采集第三分压模块两端的第三电压,其中,所述第三分压模块为设置于所述供电模块的总供电通路上的分压模块;During the first time period, a third voltage across two ends of a third voltage dividing module is collected by the sampling control unit, wherein the third voltage dividing module is a voltage dividing module provided on a total power supply path of the power supply module; 根据所述第三电压和所述第三分压模块的电阻值,确定流经所述第三分压模块的电流;Determining a current flowing through the third voltage dividing module according to the third voltage and a resistance value of the third voltage dividing module; 在所述流经所述第三分压模块的电流大于或等于电流阈值的情况下,将所述流经所述第三分压模块的电流,确定为总供电通路的总电流;在所述流经所述第三分压模块的电流小于所述电流阈值的情况下,将所述第一供电电流之和,确定为所述总电流;When the current flowing through the third voltage divider module is greater than or equal to the current threshold, the current flowing through the third voltage divider module is determined as the total current of the total power supply path; when the current flowing through the third voltage divider module is less than the current threshold, the sum of the first power supply currents is determined as the total current; 根据所述总电流,确定所述负载模块在所述第一时长内的总耗电量。The total power consumption of the load module within the first time period is determined according to the total current. 10.根据权利要求9所述的方法,其特征在于,所述方法还包括:10. The method according to claim 9, characterized in that the method further comprises: 根据所述第一耗电量和所述总耗电量,确定所述负载模块在所述第一时长内的第一耗电比;Determining a first power consumption ratio of the load module within the first time period according to the first power consumption and the total power consumption; 获取第二电子设备中所述负载模块在所述第一时长的第二耗电比;Acquire a second power consumption ratio of the load module in the second electronic device during the first time period; 根据所述第一耗电比和所述第二耗电比,确定平均耗电比,其中,所述平均耗电比用于衡量所述负载模块对用户使用电子设备的耗电影响。An average power consumption ratio is determined according to the first power consumption ratio and the second power consumption ratio, wherein the average power consumption ratio is used to measure the impact of the load module on the power consumption of the user using the electronic device. 11.根据权利要求8所述的方法,其特征在于,所述方法还包括:11. The method according to claim 8, characterized in that the method further comprises: 获取第三电子设备中所述负载模块在所述第一时长的第三耗电量;Acquire a third power consumption of the load module in the third electronic device during the first time period; 显示所述第一耗电量与所述第三耗电量的比较结果。The comparison result between the first power consumption and the third power consumption is displayed. 12.根据权利要求9所述的方法,其特征在于,所述方法还包括:12. The method according to claim 9, characterized in that the method further comprises: 根据所述第一电子设备的工作模式,确定所述总电流对应的第一电流范围;determining, according to the working mode of the first electronic device, a first current range corresponding to the total current; 在所述总电流不在所述第一电流范围的情况下,显示第一异常信息,其中,所述第一异常信息用于表示所述负载模块中存在异常负载模块。When the total current is not within the first current range, first abnormal information is displayed, wherein the first abnormal information is used to indicate that an abnormal load module exists in the load modules. 13.根据权利要求12所述的方法,其特征在于,所述方法还包括:13. The method according to claim 12, characterized in that the method further comprises: 根据所述第一电子设备的工作模式,确定所述负载模块对应的第二电流范围;Determining a second current range corresponding to the load module according to the working mode of the first electronic device; 在所述供电电流不在所述第二电流范围的情况下,显示第二异常信息,其中,所述第二异常信息用于表示所述负载模块存在异常。When the power supply current is not within the second current range, second abnormal information is displayed, wherein the second abnormal information is used to indicate that an abnormality exists in the load module.
CN202410346388.4A 2024-03-25 2024-03-25 Current detection circuit, electronic device and current detection method Pending CN118112306A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410346388.4A CN118112306A (en) 2024-03-25 2024-03-25 Current detection circuit, electronic device and current detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410346388.4A CN118112306A (en) 2024-03-25 2024-03-25 Current detection circuit, electronic device and current detection method

Publications (1)

Publication Number Publication Date
CN118112306A true CN118112306A (en) 2024-05-31

Family

ID=91208387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410346388.4A Pending CN118112306A (en) 2024-03-25 2024-03-25 Current detection circuit, electronic device and current detection method

Country Status (1)

Country Link
CN (1) CN118112306A (en)

Similar Documents

Publication Publication Date Title
CN108475935B (en) A battery charging management method and terminal
WO2024169905A1 (en) Ambient temperature measurement method and apparatus for electronic device
CN113012263B (en) Configuration method of layer synthesis mode and electronic equipment
CN102087575A (en) Electronic device and method for dynamic arrangement of icons
CN107843802A (en) Internal short-circuit detection method and device
CN114062957B (en) Battery remaining capacity acquisition method and device, electronic equipment and storage medium
CN107302633B (en) Application control method, device, storage medium and electronic equipment
WO2020156240A1 (en) Battery assembly and terminal
CN108663627A (en) A kind of self-discharge of battery detection method and self-discharge of battery detection device
US11686776B2 (en) Prediction method and apparatus of battery health, and storage medium
CN107423199A (en) Electronic equipment, temperature rise control method, control device, and storage medium
CN107402804A (en) Background process control method, device, storage medium and electronic device
CN108810226A (en) A kind of electricity method for early warning and mobile terminal
CN112711387B (en) Method, device, electronic device and readable storage medium for adjusting buffer capacity
CN114895188B (en) Automobile battery status detection method, system and computer readable storage medium thereof
CN112769201A (en) Charging method, charging device, electronic device, and readable storage medium
WO2023193731A1 (en) Signal acquisition method and electronic device
CN111666023A (en) Interface display method and device, electronic equipment and readable storage medium
CN112596598B (en) Display control method, display control device and electronic device
CN118112306A (en) Current detection circuit, electronic device and current detection method
WO2024222606A1 (en) Cache resource adjustment method and apparatus, and electronic device and readable storage medium
CN113676271B (en) Method and device for switching antenna
CN116609581A (en) Power consumption detection method, device, electronic equipment and storage medium
US20230261497A1 (en) Charging method, electronic equipment, non-transitory readable storage medium
CN117406906A (en) Screen processing method, device, electronic equipment and computer readable storage medium

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