CN113049968B - Method, device, electronic equipment and storage medium for determining average current of battery - Google Patents
Method, device, electronic equipment and storage medium for determining average current of battery Download PDFInfo
- Publication number
- CN113049968B CN113049968B CN202110267818.XA CN202110267818A CN113049968B CN 113049968 B CN113049968 B CN 113049968B CN 202110267818 A CN202110267818 A CN 202110267818A CN 113049968 B CN113049968 B CN 113049968B
- Authority
- CN
- China
- Prior art keywords
- battery
- average current
- battery management
- management information
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 238000004364 calculation method Methods 0.000 claims abstract description 35
- 238000005070 sampling Methods 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 10
- 238000004590 computer program Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 238000004891 communication Methods 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 5
- 238000012544 monitoring process Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
- G01R31/36—Arrangements for testing, measuring or monitoring the electrical condition of accumulators or electric batteries, e.g. capacity or state of charge [SoC]
- G01R31/385—Arrangements for measuring battery or accumulator variables
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Charge And Discharge Circuits For Batteries Or The Like (AREA)
- Secondary Cells (AREA)
- Power Sources (AREA)
Abstract
The embodiment of the disclosure discloses a method, a device, electronic equipment and a storage medium for determining average current of a battery, wherein the method comprises the following steps: acquiring first battery management information of the battery at a first moment and acquiring second battery management information of the battery at a second moment; determining a target average current calculation method according to the attributes of the first battery management information and the second battery management information; an average current of the battery between the first time and the second time is determined based on the target average current calculation method, the first battery management information, and the second battery management information. According to the technical scheme provided by the embodiment of the disclosure, the average current of the battery can be accurately obtained only by obtaining the battery management information twice, and the current sampling times are reduced, so that the disturbance to the battery management system is reduced, and the load of the battery management system is not increased.
Description
Technical Field
The present disclosure relates to the field of information technologies, and in particular, to a method, an apparatus, an electronic device, and a storage medium for determining an average current of a battery.
Background
In the actual use process of the electronic equipment, the power consumption needs to be monitored. One important indicator of monitoring is, among other things, the average current of the battery. The existing method for determining the average CURRENT of the battery is to call an API (application programming interface) at regular time to obtain the current_now attribute of the battery manager (CURRENT charging/discharging CURRENT milliamperes) so as to obtain a real-time CURRENT value, and then sum and average the obtained real-time CURRENT value to obtain the average CURRENT of the battery. This approach is overly intrusive to the battery management system, increases the existing load on the battery management system, and requires a high enough current sampling rate to make the resulting average current data of the battery reliable enough, rather increasing the load on the battery management system.
Disclosure of Invention
To solve or at least partially solve the above technical problems, embodiments of the present disclosure provide a method, an apparatus, an electronic device, and a storage medium for determining an average current of a battery.
Embodiments of the present disclosure provide a method of determining an average current of a battery installed in an electronic device, the method comprising:
acquiring first battery management information of a battery at a first moment and acquiring second battery management information of the battery at a second moment;
determining a target average current calculation method according to the attributes of the first battery management information and the second battery management information;
an average current of the battery between the first time and the second time is determined based on the target average current calculation method, the first battery management information, and the second battery management information.
The embodiment of the disclosure also provides an apparatus for determining an average current of a battery, the battery being mounted in an electronic device, the apparatus comprising:
the battery management information acquisition module is used for acquiring first battery management information of the battery at a first moment and acquiring second battery management information of the battery at a second moment;
a calculation method determining module, configured to determine a target average current calculation method according to the attributes of the first battery management information and the second battery management information;
and an average current determining module configured to determine an average current of the battery between the first time and the second time based on the target average current calculating method, the first battery management information, and the second battery management information.
The embodiment of the disclosure also provides an electronic device, in which a battery is mounted, comprising: a processor and a memory;
the processor is operable to perform the steps of the method of determining average current of a battery as described above by invoking a program or instruction stored in the memory.
The disclosed embodiments also provide a non-transitory computer-readable storage medium storing a program or instructions that cause a computer to perform the steps of the method of determining average current of a battery as described above.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has at least the following advantages: according to the technical scheme provided by the embodiment of the disclosure, the average current of the battery can be accurately obtained only by obtaining the battery management information twice, and the current sampling times are reduced, so that the disturbance to the battery management system is reduced, and the load of the battery management system is not increased.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is an exemplary application scenario diagram provided by an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method of determining average current of a battery provided by an embodiment of the present disclosure;
FIG. 3 is a flowchart of a method for implementing S130 according to an embodiment of the present disclosure;
FIG. 4 is a flowchart of another method for implementing S130 provided by an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of an apparatus for determining average current of a battery in an embodiment of the disclosure;
fig. 6 is a schematic structural diagram of an electronic device in an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
Fig. 1 is an exemplary application scenario diagram provided in an embodiment of the present disclosure, which may be suitable for power consumption monitoring of an electronic device. In fig. 1, a battery is mounted in an electronic apparatus, and a battery management system is provided in the electronic apparatus. Here, the battery management system is part of an operating system installed in the electronic device, and, for example, if the android operating system is installed in the electronic device, the battery management system is part of the android operating system. If the IOS operating system is installed in the electronic device, the battery management system is part of the IOS operating system. In some embodiments of the present invention, in some embodiments,
the battery management system may detect status information of the battery in real time, including but not limited to: the remaining capacity of the battery, the average charge/discharge current milliamperes for a period of time, and the current charge/discharge current milliamperes. The battery management system may provide an API interface to the outside for querying battery management information, including but not limited to: the interface is used for inquiring the percentage of the residual electric quantity: BATTERY_PROPERTY_CAPACITY; an interface for querying an average charge/discharge current milliampere for a period of time: BATTERY_PROPERTY_CURRENT_AVERAGE; interface for inquiring present charge/discharge current milliamperes: BATTERY_PROPERTY_CURRENT_NOW.
In fig. 1, the electronic device may further comprise means for determining the average current of the battery, which may be implemented as part of the battery management system or as a separate device from the battery management system. The two dashed boxes in fig. 1 represent two embodiments of the device for determining the average current of the battery. In some embodiments, the means for determining the average current of the battery is implemented in software, hardware, or a combination of software.
The device for determining the average current of the battery can acquire first battery management information of the battery from the battery management system at a first moment and acquire second battery management information of the battery at a second moment through a preconfigured battery management interface, and further can determine the average current of the battery between the first moment and the second moment by utilizing the first battery management information and the second battery management information. Therefore, the device for determining the average current of the battery can accurately acquire the average current of the battery only by acquiring the battery management information twice, and reduces the current sampling times, so that the disturbance to the battery management system is reduced, and the load of the battery management system is not increased.
In some embodiments, the battery management interface is, for example, a battery remaining capacity interface, such as an interface for querying a percentage of remaining power: BATTERY_PROPERTY_CAPACITY.
In some embodiments, the battery management interface is, for example, an average current interface, such as an interface for querying an average charge/discharge current milliamp over a period of time: BATTERY_PROPERTY_CURRENT_AVERAGE.
Fig. 2 is a flowchart of a method for determining average current of a battery according to an embodiment of the present disclosure, where the method may be applicable to a case of monitoring power consumption of an electronic device, where the method may be performed by a device for determining average current of a battery, where the device may be implemented in software and/or hardware, and where the device may be configured in an electronic device, for example, a terminal, and specifically includes, but is not limited to, a smart phone, a palm top computer, a tablet computer, a wearable device with a display screen, a desktop computer, a notebook computer, an all-in-one machine, a smart home device, and so on. Alternatively, the embodiment may be applied to a case where power consumption monitoring is performed in a server, where the method may be performed by a device for determining an average current of a battery, where the device may be implemented in software and/or hardware, and where the device may be configured in an electronic device, such as a server.
Referring to fig. 2, the method of determining the average current of the battery includes:
s110, acquiring first battery management information of a battery at a first moment and acquiring second battery management information of the battery at a second moment.
In some embodiments, first battery management information for a battery may be obtained from a battery management system at a first time and second battery management information for the battery may be obtained from the battery management system at a second time based on a preconfigured battery management interface.
Alternatively, in this step, the battery management interface may be a battery remaining capacity interface and/or an average current interface.
Illustratively, if the battery management interface is a battery remaining capacity interface; the first battery management information is first battery remaining capacity information; the second battery management information is second battery remaining capacity information.
If the battery management interface is an average current interface; the first battery management information includes first average current information and a first time; the second battery management information includes second average current information and a second time.
S120, determining a target average current calculation method according to the attributes of the first battery management information and the second battery management information.
In some embodiments, determining the target average current calculation method as a residual capacity method according to the attribute as the residual capacity; the first battery management information is first battery remaining capacity information; the second battery management information is second battery remaining capacity information.
In some embodiments, the target average current calculation method is determined to be an average current method according to the attribute being an average current; the first battery management information includes first average current information and a first time; the second battery management information includes second average current information and a second time.
S130, determining the average current of the battery between the first moment and the second moment based on the target average current calculation method, the first battery management information and the second battery management information.
The specific implementation method of this step is various, and optionally, an appropriate calculation method may be selected according to the specific content of the first battery management information and the second battery management information, so as to determine the average current of the battery between the first time and the second time.
In some embodiments, the battery management system is part of an operating system in which the electronic device is installed. Whether the scheme is adopted or not, the battery management system can detect the battery state of the electronic equipment in real time in the running process of the electronic equipment. In some embodiments, the detection result of the battery state of the electronic device by the battery management system can be "directly taken" and used to find the average current. So that it does not disturb the system. In the prior art, the API is an external interface, which is an interface used by a programmer in programming, through which a system and an application program can access resources in the system or obtain services of the OS in execution, and is the only way for the program to obtain services of the operating system. It will only output data when called. Acquiring data through an API can be intrusive to the system.
Therefore, the technical scheme can accurately acquire the average current of the battery only by acquiring the battery management information twice, and reduces the current sampling times, so that the disturbance to the battery management system is reduced, and the load of the battery management system is not increased.
Fig. 3 is a flowchart of a method for implementing S130 according to an embodiment of the disclosure. On the basis of the technical scheme, if the target average current calculation method is a residual capacity method; the first battery management information is first battery remaining capacity information; the second battery management information is second battery remaining capacity information, optionally, referring to fig. 3, the method for implementing S130 includes:
s1301, determining a battery capacity loss based on the first battery remaining capacity information and the second battery remaining capacity information.
S1302, determining an average current based on the time interval and the battery capacity loss. The time interval is a preset time interval or a calculated time interval. The calculated time interval is a time interval calculated based on the first time instant and the second time instant.
In some embodiments, the battery capacity satisfies the following formula:
battery capacity per hour (mAh) =average current (mA) ×1h (1)
If the remaining battery capacity information is acquired every a seconds, the first time is A1, and the second time is A2. The first battery remaining capacity information at the first time A1 is B1 (in nanoampere-hour nAh), and the second battery remaining capacity information at the second time A2 is B2 (in nanoampere-hour nAh). It is assumed that the average current during this period is c from the first time A1 to the second time A2.
The first battery remaining capacity information B1 and the second battery remaining capacity information B2 are converted into units of milliampere hours (mAh) by dividing B1 by 1000 and dividing B2 by 1000.
When the time interval a is converted into a unit (h), the conversion method is to divide a by 3600.
The first battery remaining capacity information B1, the second battery remaining capacity information B2, and the time interval a after the unit conversion are taken into formula (1), and the result is obtained:
(B2–B1)/1000=c×a/(3600) (2)
performing term transfer on the formula (2) to obtain
c=18×(B1-B2)/(5×a) (3)
Thus, alternatively, the average current is determined by equation (3):
wherein c is average current in milliamperes; B1-B2 are battery capacity loss, B1 is first battery residual capacity information, and B2 is second battery residual capacity information when the unit is nanoamperes, and the unit is nanoamperes; a is a time interval in seconds.
The essence of the technical scheme is that the current value in a period of time is reversely pushed based on the residual capacity of the battery, the average current of the battery can be accurately obtained only by obtaining the battery management information twice, and the current sampling times are reduced, so that the disturbance to the battery management system is reduced, and the load of the battery management system is not increased.
In the above technical solution, if the time interval a is short enough, the average current calculated by the above formula (3) may be directly used as the real-time current value.
Fig. 4 is a flowchart of another method for implementing S130 according to an embodiment of the disclosure. On the basis of the technical scheme, if the target average current calculation method is an average current method; the first battery management information includes first average current information and a first time; the second battery management information includes second average current information and a second time, and optionally, referring to fig. 4, the method of implementing S130 includes:
s1311, determining an average current difference value based on first average current information and second average current information;
s1312 determines an average current of the battery between the first time and the second time based on the first time, the time interval, the second average current information, and the average current difference. The time interval is a calculated time interval or a preset time interval. Wherein the calculated time interval is a time interval calculated based on the first time instant and the second time instant.
In some embodiments, the average current satisfies the following formula:
battery consumption/time=average current (4)
If starting from a certain time x0, the first average current information from x0 to a first time x1 is c1; the first average current information from x0 to the second instant x2 is c. Wherein x0 is earlier than x1, x1 is earlier than x2; and the time interval between the first time x1 and the second time x2 is a, namely
x2=x1+a。 (5)
Assume that from x0 to a first time x1, the battery consumption amount is y1; from x0 to a second time x2, the battery consumption is y2; the battery consumption is y2-y1 from the first time x1 to the second time x 2.
For the convenience of calculation, let x0 take the electronic device on time, x0=0.
Bringing the above parameters into the above formula (4) yields:
c1=y1/x1 (6)
c2=y2/x2 (7)
the average current information c from the first time x1 to the second time x2 is:
c=(y2-y1)/(x2-x1)=(y2-y1)/a (8)
solving the equation yields:
c=(c2-c1)×t1/a+c2。 (9)
thus, optionally, the average current of the battery between the first time and the second time is set to be determined by the above formula (9);
wherein c is the average current between the first time and the second time; c2-c1 is the average current difference, c2 is the second average current information, and c1 is the first average current information; t1 is a first moment; a is the time interval.
The essence of the technical scheme is that the current value in a period of time is reversely deduced based on the total average current value, the average current of the battery can be accurately obtained only by obtaining the battery management information twice, and the current sampling times are reduced, so that the disturbance to the battery management system is reduced, and the load of the battery management system is not increased.
Fig. 5 is a schematic structural view of an apparatus for determining an average current of a battery in an embodiment of the present disclosure. The device for determining the average current of the battery provided by the embodiment of the disclosure can be configured in the client or can be configured in the server. The battery is installed in electronic equipment, and a battery management system is arranged in the electronic equipment and detects state information of the battery in real time. Referring to fig. 5, the apparatus includes:
a battery management information obtaining module 310, configured to obtain first battery management information of a battery at a first moment and obtain second battery management information of the battery at a second moment;
a calculation method determining module 320 for determining a target average current calculation method according to the attributes of the first battery management information and the second battery management information
An average current determining module 330, configured to determine an average current of the battery between the first time and the second time based on the target average current calculating method, the first battery management information, and the second battery management information.
In some embodiments, the calculation method determining module 320 is configured to determine, according to the attribute being a residual capacity, that the target average current calculation method is a residual capacity method; the first battery management information is first battery remaining capacity information; the second battery management information is second battery remaining capacity information.
In some embodiments, the average current determination module 330 determining an average current of the battery between the first time and the second time comprises:
determining a battery capacity loss based on the first battery remaining capacity information and the second battery remaining capacity information;
and determining an average current based on a time interval and the battery capacity loss, wherein the time interval is a preset time interval or a calculated time interval.
In some embodiments, the average current is determined by:
c=18×(B1-B2)/(5×a)
wherein c is the average current in milliamperes; B1-B2 are the battery capacity loss, B1 is the first battery residual capacity information, and B2 is the second battery residual capacity information when the unit is nanoamperes and the unit is nanoamperes; a is the time interval in seconds.
In some embodiments, the calculation method determining module 320 is configured to determine that the target average current calculation method is an average current method according to the attribute being an average current; the first battery management information includes first average current information and the first time; the second battery management information includes second average current information and the second time.
In some embodiments, the average current determination module 330 determining an average current of the battery between the first time and the second time comprises:
determining an average current difference based on the first average current information and the second average current information;
determining an average current of the battery between the first time instant and the second time instant based on the first time instant, the time interval, the second average current information, and the average current difference; the time interval is a calculated time interval or a preset time interval.
In some embodiments, the average current of the battery between the first time instant and the second time instant is determined by:
c=(c2-c1)×t1/a+c2
wherein c is the average current between the first time instant and the second time instant; c2-c1 is the average current difference, c2 is the second average current information, and c1 is the first average current information; t1 is the first moment; a is the time interval.
The device for average current of the battery provided by the embodiment of the present disclosure may execute steps executed by the client or the server in the method for average current of the battery provided by the embodiment of the present disclosure, and the execution steps and the beneficial effects are not described herein.
Fig. 6 is a schematic structural diagram of an electronic device in an embodiment of the disclosure. The electronic equipment is internally provided with a battery, and a battery management system is arranged in the electronic equipment and detects state information of the battery in real time. Referring now in particular to fig. 6, a schematic diagram of an electronic device 500 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device 500 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, and the like, and fixed terminals such as digital TVs, desktop computers, smart home devices, and the like. The electronic device shown in fig. 6 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 6, the electronic device 500 may include a processing means (e.g., a central processor, a graphics processor, etc.) 501 that may perform various suitable actions and processes to implement the method of determining the average current of a battery according to the program stored in a Read Only Memory (ROM) 502 or the program loaded from a storage means 508 into a Random Access Memory (RAM) 503, as described in the present disclosure. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart, thereby implementing the method of determining average current of a battery as described above. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to:
acquiring first battery management information of a battery at a first moment and acquiring second battery management information of the battery at a second moment;
determining a target average current calculation method according to the attributes of the first battery management information and the second battery management information;
an average current of the battery between the first time and the second time is determined based on the target average current calculation method, the first battery management information, and the second battery management information.
Alternatively, the electronic device may perform other steps described in the above embodiments when the above one or more programs are executed by the electronic device.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The present disclosure provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method of determining average current of a battery as any one of the methods provided by the present disclosure.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.
Claims (6)
1. A method of determining an average current of a battery, wherein the battery is installed in an electronic device, the method comprising:
acquiring first battery management information of a battery at a first moment and acquiring second battery management information of the battery at a second moment;
determining a target average current calculation method according to the attributes of the first battery management information and the second battery management information;
determining an average current of the battery between the first time and the second time based on the target average current calculation method, the first battery management information, and the second battery management information;
the attributes of the first battery management information and the second battery management information include a remaining capacity or an average current;
the method for determining the target average current according to the attributes of the first battery management information and the second battery management information comprises the following steps: determining a target average current calculation method as a residual capacity method according to the attribute of the first battery management information and the second battery management information as residual capacity, wherein the first battery management information is first battery residual capacity information, and the second battery management information is second battery residual capacity information; determining an average current of the battery between the first time instant and the second time instant based on the target average current calculation method, the first battery management information, and the second battery management information includes: determining battery capacity loss based on the first battery remaining capacity information and the second battery remaining capacity information, and determining average current based on a time interval and the battery capacity loss, wherein the time interval is a preset time interval or a calculated time interval;
or alternatively, the first and second heat exchangers may be,
the method for determining the target average current according to the attributes of the first battery management information and the second battery management information comprises the following steps: determining a target average current calculation method as an average current method according to the average current of the first battery management information and the second battery management information, wherein the first battery management information comprises first average current information and the first time, and the second battery management information comprises second average current information and the second time; determining an average current of the battery between the first time instant and the second time instant based on the target average current calculation method, the first battery management information, and the second battery management information includes: and determining an average current difference value based on the first average current information and the second average current information, and determining an average current of the battery between the first time and the second time based on the first time, the time interval, the second average current information and the average current difference value, wherein the time interval is a calculated time interval or a preset time interval.
2. The method of claim 1, wherein the determining an average current based on the time interval and the battery capacity loss is determined by:
c=18×(B1-B2)/(5×a)
wherein c is the average current in milliamperes; B1-B2 are the battery capacity loss, B1 is the first battery residual capacity information, and B2 is the second battery residual capacity information when the unit is nanoamperes and the unit is nanoamperes; a is the time interval in seconds.
3. The method of claim 1, wherein determining the average current of the battery between the first time instant and the second time instant based on the first time instant, the time interval, the second average current information, and the average current difference value is determined by:
c=(c2-c1)×t1/a+c2
wherein c is the average current between the first time instant and the second time instant; c2-c1 is the average current difference, c2 is the second average current information, and c1 is the first average current information; t1 is the first moment; a is the time interval.
4. An apparatus for determining an average current of a battery, wherein the battery is mounted in an electronic device, the apparatus comprising:
the battery management information acquisition module is used for acquiring first battery management information of the battery at a first moment and acquiring second battery management information of the battery at a second moment;
a calculation method determining module, configured to determine a target average current calculation method according to the attributes of the first battery management information and the second battery management information;
an average current determination module configured to determine an average current of the battery between the first time and the second time based on the target average current calculation method, the first battery management information, and the second battery management information;
the attributes of the first battery management information and the second battery management information include a remaining capacity or an average current;
the calculation method determining module is specifically used for: determining a target average current calculation method as a residual capacity method according to the attribute of the first battery management information and the second battery management information as residual capacity, wherein the first battery management information is first battery residual capacity information, and the second battery management information is second battery residual capacity information; the average current determining module is specifically configured to: determining battery capacity loss based on the first battery remaining capacity information and the second battery remaining capacity information, and determining average current based on a time interval and the battery capacity loss, wherein the time interval is a preset time interval or a calculated time interval;
or alternatively, the first and second heat exchangers may be,
the calculation method determining module is specifically used for: determining a target average current calculation method as an average current method according to the average current of the first battery management information and the second battery management information, wherein the first battery management information comprises first average current information and the first time, and the second battery management information comprises second average current information and the second time; the average current determining module is specifically configured to: and determining an average current difference value based on the first average current information and the second average current information, and determining an average current of the battery between the first time and the second time based on the first time, the time interval, the second average current information and the average current difference value, wherein the time interval is a calculated time interval or a preset time interval.
5. An electronic device, wherein a battery is installed in the electronic device, and a battery management system is provided in the electronic device, the battery management system detecting state information of the battery in real time, the electronic device comprising: a processor and a memory;
the processor is adapted to perform the steps of the method according to any one of claims 1 to 3 by invoking a program or instruction stored in the memory.
6. A non-transitory computer readable storage medium storing a program or instructions that cause a computer to perform the steps of the method of any one of claims 1 to 3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110267818.XA CN113049968B (en) | 2021-03-11 | 2021-03-11 | Method, device, electronic equipment and storage medium for determining average current of battery |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110267818.XA CN113049968B (en) | 2021-03-11 | 2021-03-11 | Method, device, electronic equipment and storage medium for determining average current of battery |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113049968A CN113049968A (en) | 2021-06-29 |
CN113049968B true CN113049968B (en) | 2023-11-14 |
Family
ID=76511633
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110267818.XA Active CN113049968B (en) | 2021-03-11 | 2021-03-11 | Method, device, electronic equipment and storage medium for determining average current of battery |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113049968B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013148510A (en) * | 2012-01-20 | 2013-08-01 | Saxa Inc | Battery-driven electronic apparatus and battery voltage monitoring method for the same |
CN105527577A (en) * | 2015-12-24 | 2016-04-27 | 惠州市蓝微新源技术有限公司 | Battery management system based on electric energy measurement and average current and ampere hour calculating method |
CN106501734A (en) * | 2016-12-29 | 2017-03-15 | 东莞钜威动力技术有限公司 | The voltage acquisition fault handling method of battery management system and device |
CN111142030A (en) * | 2019-12-30 | 2020-05-12 | Oppo广东移动通信有限公司 | Method, device and equipment for detecting internal short-circuit current and readable storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11073563B2 (en) * | 2017-12-18 | 2021-07-27 | Samsung Electronics Co., Ltd. | Method and apparatus for estimating state of battery |
-
2021
- 2021-03-11 CN CN202110267818.XA patent/CN113049968B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013148510A (en) * | 2012-01-20 | 2013-08-01 | Saxa Inc | Battery-driven electronic apparatus and battery voltage monitoring method for the same |
CN105527577A (en) * | 2015-12-24 | 2016-04-27 | 惠州市蓝微新源技术有限公司 | Battery management system based on electric energy measurement and average current and ampere hour calculating method |
CN106501734A (en) * | 2016-12-29 | 2017-03-15 | 东莞钜威动力技术有限公司 | The voltage acquisition fault handling method of battery management system and device |
CN111142030A (en) * | 2019-12-30 | 2020-05-12 | Oppo广东移动通信有限公司 | Method, device and equipment for detecting internal short-circuit current and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113049968A (en) | 2021-06-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111475298B (en) | Task processing method, device, equipment and storage medium | |
CN112379982B (en) | Task processing method, device, electronic equipment and computer readable storage medium | |
CN113034059B (en) | Abnormal power information positioning method and device, electronic equipment and computer medium | |
CN111625422B (en) | Thread monitoring method, thread monitoring device, electronic equipment and computer readable storage medium | |
CN110768861A (en) | Method, device, medium and electronic equipment for obtaining overtime threshold | |
CN111258582B (en) | Window rendering method and device, computer equipment and storage medium | |
CN116388112B (en) | Abnormal supply end power-off method, device, electronic equipment and computer readable medium | |
CN113049968B (en) | Method, device, electronic equipment and storage medium for determining average current of battery | |
CN114579401B (en) | Task detection method and device, electronic equipment and storage medium | |
CN111596992A (en) | Navigation bar display method and device and electronic equipment | |
CN111274104B (en) | Data processing method, device, electronic equipment and computer readable storage medium | |
CN114745276B (en) | Switch bandwidth adjusting method and device, electronic equipment and computer readable medium | |
CN113792869B (en) | Video processing method and device based on neural network chip and electronic equipment | |
CN111898061B (en) | Method, apparatus, electronic device and computer readable medium for searching network | |
CN112162682A (en) | Content display method and device, electronic equipment and computer readable storage medium | |
CN111404824B (en) | Method, apparatus, electronic device, and computer-readable medium for forwarding request | |
CN115827415B (en) | System process performance test method, device, equipment and computer medium | |
CN113672675B (en) | Data detection method and device and electronic equipment | |
CN116755889B (en) | Data acceleration method, device and equipment applied to server cluster data interaction | |
CN114006880B (en) | Method and device for acquiring message receipt, electronic equipment and storage medium | |
CN114398233B (en) | Load abnormality detection method and device, server and storage medium | |
CN117527648A (en) | Bandwidth detection method, device, equipment and storage medium | |
CN117009168A (en) | Application index acquisition method, device, equipment and medium | |
CN117953123A (en) | Filter special effect processing method, device, equipment and storage medium | |
CN117194140A (en) | Method, apparatus, device, medium and product for determining extreme environment judgment conditions |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |