CN109596989B - Method and device for displaying electric quantity of electronic equipment and electronic equipment - Google Patents

Method and device for displaying electric quantity of electronic equipment and electronic equipment Download PDF

Info

Publication number
CN109596989B
CN109596989B CN201811647404.4A CN201811647404A CN109596989B CN 109596989 B CN109596989 B CN 109596989B CN 201811647404 A CN201811647404 A CN 201811647404A CN 109596989 B CN109596989 B CN 109596989B
Authority
CN
China
Prior art keywords
electric quantity
electronic equipment
displaying
current
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811647404.4A
Other languages
Chinese (zh)
Other versions
CN109596989A (en
Inventor
吴韶祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mobvoi Information Technology Co Ltd
Original Assignee
Mobvoi Information Technology 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 Mobvoi Information Technology Co Ltd filed Critical Mobvoi Information Technology Co Ltd
Priority to CN201811647404.4A priority Critical patent/CN109596989B/en
Publication of CN109596989A publication Critical patent/CN109596989A/en
Application granted granted Critical
Publication of CN109596989B publication Critical patent/CN109596989B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention provides a method and a device for displaying electric quantity of electronic equipment and the electronic equipment. The method comprises the following steps: when the electronic equipment is detected not to be in a charging state, detecting the maximum electric quantity, the first electric quantity and the current electric quantity of the electronic equipment, and determining a reference electric quantity based on the maximum electric quantity and the first electric quantity; then determining the display electric quantity corresponding to the current electric quantity according to the relation between the current electric quantity and the reference electric quantity; and displaying the display electric quantity. The invention realizes the effect of displaying the residual electric quantity in a smoother way, solves the problem that the head of the electric quantity falls off the cliff, and improves the user experience.

Description

Method and device for displaying electric quantity of electronic equipment and electronic equipment
Technical Field
The invention relates to the technical field of electronic equipment, in particular to a method and a device for displaying electric quantity of electronic equipment and the electronic equipment.
Background
At present, electronic equipment is more and more popularized and deeply enters the aspect of life, and a great deal of convenience is brought to the life of people.
The electronic equipment is generally powered by a lithium battery, and the monitoring and displaying of the electric quantity of the battery are very important. The method and the device can enable a user to timely and accurately acquire the residual electric quantity information of the battery, and avoid loss caused by sudden shutdown. At present, the electric quantity of the battery is detected by various methods, such as a voltage detection method, a coulometry detection method, a battery modeling method and the like.
Since the current battery technology has not been broken through and the electronic devices (such as mobile phones) are frequently used, users are very sensitive to the amount of electricity. However, in the specific implementation process, the inventor finds that the existing battery electric quantity measuring methods have certain problems, such as electric quantity jump, head cliff and the like.
Disclosure of Invention
The invention provides a method and a device for displaying electric quantity of electronic equipment and the electronic equipment, which can solve the problem that a head falls off a cliff in a battery display process. The technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for displaying an electric quantity of an electronic device, where the method includes:
when the electronic equipment is detected not to be in a charging state, detecting the maximum electric quantity, the first electric quantity and the current electric quantity of the electronic equipment, and determining a reference electric quantity based on the maximum electric quantity and the first electric quantity;
determining the display electric quantity corresponding to the current electric quantity according to the relation between the current electric quantity and the reference electric quantity;
and displaying the displayed electric quantity.
In a second aspect, an embodiment of the present invention further provides a device for displaying an electric quantity of an electronic device, where the device includes:
the electric quantity detection module is used for detecting the maximum electric quantity, the first electric quantity and the current electric quantity of the electronic equipment and determining a reference electric quantity based on the maximum electric quantity and the first electric quantity;
the determining module is used for determining the display electric quantity corresponding to the current electric quantity according to the relation between the current electric quantity and the reference electric quantity;
and the display module is used for displaying the display electric quantity determined by the determination module.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
a processor; and
a memory configured to store machine-readable instructions, which when executed by the processor, cause the processor to perform a method for displaying power of an electronic device according to the first aspect of the embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where the computer-readable storage medium is used for storing computer instructions, and when the computer instructions are executed on a computer, the computer is enabled to execute the method for displaying the power of the electronic device shown in the first aspect of the embodiment of the present invention.
The technical scheme provided by the embodiment of the invention at least has the following beneficial effects:
compared with the prior art, the method and the device have the advantages that the maximum electric quantity, the first electric quantity and the current electric quantity of the electronic equipment are detected when the electronic equipment is detected not to be in the charging state, and the reference electric quantity is determined based on the maximum electric quantity and the first electric quantity; then determining the display electric quantity corresponding to the current electric quantity according to the relation between the current electric quantity and the reference electric quantity; and finally, the display electric quantity is displayed, so that the effect of displaying the residual electric quantity in a relatively smooth mode is realized, the problem that the head of the electric quantity falls off the cliff is solved, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly described below.
FIG. 1 is a schematic diagram of a voltage detection principle in the prior art;
fig. 2 is a flowchart illustrating a method for displaying power of an electronic device according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a principle of determining a display electric quantity corresponding to a current electric quantity according to a relationship between the current electric quantity and a reference electric quantity according to another embodiment of the present invention;
fig. 4 is a schematic diagram of remaining power variation under the conditions of the preset reserved capacity and the non-preset reserved capacity respectively according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of an apparatus for displaying power of an electronic device according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to still another embodiment of the invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The invention will be described and explained with reference to several terms:
SOC: state of Charge (State of Charge), also known as the amount of remaining Charge, represents the ratio of the remaining capacity of a battery after it has been used for a period of time or left unused for a long period of time to its capacity in a fully charged State, expressed in percent; usually, one byte, namely a hexadecimal system of two bits is used for representing, the value range is 0-100, and the meaning is that the residual electric quantity is 0-100%; when the SOC is 0, it indicates that the battery is fully discharged, and when the SOC is 1, it indicates that the battery is fully charged.
The head falls off the cliff: after the battery is fully charged, the charging circuit is cut off, the electric quantity shows 100% at the moment, the battery voltage slightly drops back due to the characteristics of the lithium battery, for a power supply loop without a PowerPath, the battery starts to supply power to the system at the moment, when the battery voltage drops to a back charging voltage threshold value, the charging circuit restarts working to charge the battery until the battery is fully charged, and then the process is circulated. That is, when the battery is charged to 100%, the battery starts to discharge until the battery voltage reaches the recharge threshold after the charging circuit is turned off. In this process, the battery is actually discharged, and the actual capacity of the battery is reduced, but in order to maintain the user experience, many solutions currently exist in which after the electronic device is charged to 100% on the charger, the display of 100% is maintained as long as the electronic device is still on the charger, and even if the battery starts to supply power to the system after the charging circuit is cut off, the actual remaining capacity is less than 100%. This results in the user, after removing the electronic device from the charger, jumping directly to the actual current remaining power value, for example 92%, which is the head falling off the cliff.
The tail part falls off the cliff: the system generally sets the lowest working voltage, when the battery voltage is lower than the lowest working voltage, the system shuts down at low voltage, reports that the SOC is 0%, and then executes shutdown action. Due to the characteristics of the lithium battery, when the residual electric quantity of the battery is low, the internal resistance of the battery is high, the output capacity is poor, the voltage drop is high, the lowest working voltage of the system is easily triggered, the residual electric quantity is directly jumped to 0% (for example, 5% is directly jumped to 0%) to cause the shutdown of the system, and the tail part falls off the cliff.
Fig. 1 is a schematic diagram of a voltage detection principle in the prior art. As shown in fig. 1, the upper curve is a battery voltage (Vcell) curve, and the lower curve is a current remaining capacity (SOC) curve of the battery, it can be seen that in the whole detection process, the battery voltage of 3.81V may respectively correspond to the current actual remaining capacity of the battery being 2%, 72%, 50%, and the maximum difference is as high as 70%. Therefore, the accuracy of detecting the current remaining capacity of the battery by using the battery voltage method is poor, and when the electronic device suddenly switches from a light load to a heavy load, the battery voltage jumps down, and at this time, the voltage detection method calculates the current remaining capacity by sampling the battery voltage, so that the SOC jumps down (for example, from 50% to 45%). Similarly, when the electronic device suddenly switches from a heavy load to a light load, the battery voltage jumps up, and at this time, the voltage detection method calculates the current remaining power by sampling the battery voltage, so that the SOC jumps up (for example, from 40% to 50%).
The invention provides a method and a device for displaying electric quantity of electronic equipment, the electronic equipment and a computer readable storage medium, and aims to solve the technical problems in the prior art.
The following describes the technical solution of the present invention and how to solve the above technical problems with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
An embodiment of the present invention provides a method for displaying power of an electronic device, as shown in fig. 2, the method includes the following steps S101 to S103:
s101, when the electronic equipment is detected not to be in a charging state, detecting the maximum electric quantity, the first electric quantity and the current electric quantity of the electronic equipment, and determining reference electric quantity based on the maximum electric quantity and the first electric quantity.
The power of the electronic device in the embodiment of the invention is characterized by the residual power (SOC). The maximum power, the first power and the current power of the electronic device are all characterized by the actual remaining power of the electronic device, and the display power is characterized by the remaining power displayed on the electronic device.
Specifically, the maximum charge amount is SOC equal to 100%; after the first electric quantity is the electric quantity of the battery and is charged to 100%, cutting off a charging circuit, starting discharging the battery until the voltage of the battery reaches a recharging threshold, and before the voltage of the battery of the electronic equipment reaches the recharging threshold, taking down the electronic equipment from a charger to obtain the actual residual electric quantity of the battery, namely, the first electric quantity represents the actual residual electric quantity of the battery when the head cliff phenomenon occurs; the current electric quantity is the actual residual electric quantity of the electronic equipment detected at the current moment when the electronic equipment is not in the charging state.
Optionally, determining the reference power amount based on the maximum power amount and the first power amount includes: determining a reference power amount based on the maximum power amount and the first power amount within a range of:
the first electric quantity-maximum electric quantity x (15 +/-1)% -reference electric quantity is less than or equal to the first electric quantity.
In the embodiment of the invention, the reference electric quantity is set for improving the head cliff.
Optionally, the reference electrical quantity is not greater than the first electrical quantity.
Alternatively, the reference power amount may be in the following range: (first electric quantity-maximum electric quantity x (15 +/-1)%) is less than or equal to reference electric quantity and less than or equal to first electric quantity.
And S102, determining the display electric quantity corresponding to the current electric quantity according to the relation between the current electric quantity and the reference electric quantity.
For the embodiment of the present invention, the relationship between the current electric quantity and the reference electric quantity is determined according to the current electric quantity detected in step S101 and the set reference electric quantity, and the display electric quantity corresponding to the current electric quantity is determined according to the determination result.
Optionally, determining the display electric quantity corresponding to the current electric quantity according to the relationship between the current electric quantity and the reference electric quantity, including: judging whether the current electric quantity is larger than the reference electric quantity; when the current electric quantity is larger than the reference electric quantity, dynamically fitting and displaying the incidence relation between the electric quantity and the time according to the load related parameters of the electronic equipment, and determining the display electric quantity corresponding to the current electric quantity according to the time and the incidence relation of the current electric quantity; and when the current electric quantity is smaller than the reference electric quantity, determining the current electric quantity as the display electric quantity.
In the embodiment of the present invention, after the reference electric quantity is determined, a relationship between the current electric quantity and the reference electric quantity may be determined, for example, whether the current electric quantity is greater than the reference electric quantity is determined. Optionally, when the current electric quantity is judged to be smaller than the reference electric quantity, displaying according to the actual remaining electric quantity, namely determining the current electric quantity as the display electric quantity.
Optionally, when it is determined that the current electric quantity is greater than the reference electric quantity, dynamically fitting an incidence relation between the displayed electric quantity and time according to load related parameters of the electronic device, and determining the displayed electric quantity corresponding to the current electric quantity according to the time and the incidence relation where the current electric quantity is located, including: according to the load related parameters of the electronic equipment, a first time period from a first electric quantity to a reference electric quantity is estimated; according to the first time period and the electric quantity difference between the maximum electric quantity and the reference electric quantity, dynamically fitting and displaying the linear relation between the electric quantity and the moment; and determining the display electric quantity corresponding to the current electric quantity according to the moment of the current electric quantity and the linear relation.
Fig. 3 is a schematic diagram illustrating a principle of determining a display electric quantity corresponding to a current electric quantity according to a relationship between the current electric quantity and a reference electric quantity according to another embodiment of the present invention. As shown in fig. 3, the solid line is the actual remaining capacity (actual SOC), and the dotted line is the remaining capacity (display SOC) displayed by the electronic device according to the embodiment of the present invention.
In the prior art, when the electronic device is removed from the charger before the battery voltage of the electronic device reaches the recharge threshold, the power displayed by the electronic device is rapidly changed from 100% to the actual remaining power, such as 92% (point a), and a head cliff appears, as shown by the solid line in fig. 3.
In accordance with an embodiment of the present inventionSetting a point B (the distance between the point B and the point A is not more than 15%, if the point B is set to be 90%), when the electronic equipment is taken off from the charger, not immediately reporting the current actual residual capacity, but estimating the time period (t) from the point A to the point B of the SOC according to the load related parameters of the electronic equipment1-t2) Then according to the time period (t) from point A to point B1-t2) And the electric quantity difference from 100% to the point B (namely 10%), and the dynamic fitting displays the correlation of the electric quantity and the time. Then according to the moment (t) of the current electric quantity (C point)C) And determining the display electric quantity corresponding to the current electric quantity, namely the SOC at the point D (for example, the SOC at the point D is 95%).
Fig. 3 illustrates a straight line, and since the real-time load of the electronic device may change during the use process, the time when the actual remaining power reaches the reference power needs to be evaluated in real time so as to dynamically adjust the display SOC of the reporting system (from 100% to the reference power) to ensure that the actual remaining power is consistent with the remaining power displayed by the reporting system at the reference power point.
And S103, displaying the display electric quantity.
After the display electric quantity corresponding to the current electric quantity is determined according to the relation between the current electric quantity and the reference electric quantity, the determined display electric quantity is displayed on the electronic equipment. The display mode can be displayed in a mode of a progress bar or a battery icon and the like, and the display mode of the electric quantity of the electronic equipment is not limited by the invention.
Compared with the prior art, the embodiment of the invention detects the maximum electric quantity, the first electric quantity and the current electric quantity of the electronic equipment when the electronic equipment is detected not to be in the charging state, and determines the reference electric quantity based on the maximum electric quantity and the first electric quantity; then determining the display electric quantity corresponding to the current electric quantity according to the relation between the current electric quantity and the reference electric quantity; and finally, the display electric quantity is displayed, so that the effect of displaying the residual electric quantity in a relatively smooth mode is realized, the problem that the head of the electric quantity falls off the cliff is solved, and the user experience is improved.
In another possible implementation manner of the embodiment of the present invention, the method for displaying the electric quantity of the electronic device further includes: a reserved Capacity (Reserve Capacity) is set in advance for the electronic device.
Optionally, presetting reserved capacity for the electronic device includes: determining the total capacity of the electronic equipment, and presetting the reserved capacity within the following range according to the total capacity:
the reserved capacity is more than or equal to 0 and less than or equal to the total capacity x (10 +/-1)%.
In the embodiment of the present invention, the system may reserve a certain amount of capacity according to the total capacity (for example, a battery with a total capacity of 400mah, a system reserves a capacity of 10mah, and a remaining power amount of 390 mah). Therefore, when the SOC is low and the system has a large load, the battery voltage is higher than that when the reserved capacity is not available due to the existence of the reserved capacity, and the electronic equipment can dynamically adjust the SOC to approach 0% speed according to the current load condition.
Fig. 4 is a schematic diagram of remaining power variation under the conditions of the preset reserved capacity and the non-preset reserved capacity respectively according to another embodiment of the present invention. As shown in fig. 4, when the total capacity of the battery is 400mah, the reserved capacity is 10mah, and the current SOC is 5%, the real capacity is 390 × 5% +10 ═ 29.5 mah; and when the total capacity of the battery is 400mah, no reserved capacity exists, and the current SOC is 5%, the real capacity is 400 × 5%, which is 20 mah. That is, when the SOC is 5% in the same load environment, the remaining capacity of the battery without the reserved capacity is only 20mah, the remaining capacity of the battery with the reserved capacity is 29.5mah, and the SOC of the electronic device with the reserved capacity approaches 0% slower than that without the reserved capacity (i.e., t2>t1) Further, the tail cliff of the SOC is greatly improved.
Compared with the prior art, the embodiment of the invention improves the tail cliff falling phenomenon when the SOC is lower by presetting a certain amount of reserved capacity, thereby improving the user experience.
In another possible implementation manner of the embodiment of the present invention, the method for displaying the electric quantity of the electronic device further includes: when the electronic equipment is in a charging state, neglecting to send a residual capacity reduction event to an application layer in the electronic equipment; and when the electronic equipment is not in the charging state, ignoring the event of sending the residual capacity to the application layer.
In the embodiment of the invention, the problem of residual capacity jump in the electric quantity display process as shown in fig. 1 is solved by not reporting the residual capacity reduction event in the charging process of the electronic equipment and not reporting the residual capacity rising event in the non-charging process of the electronic equipment, so that the user experience is improved.
Still another embodiment of the present invention provides an apparatus 50 for displaying power of an electronic device, as shown in fig. 5, the apparatus comprising: the device comprises an electric quantity detection module 501, a determination module 502 and a display module 503.
The power detection module 501 is configured to detect a maximum power, a first power, and a current power of the electronic device, and determine a reference power based on the maximum power and the first power.
The determining module 502 is configured to determine a display electric quantity corresponding to the current electric quantity according to a relationship between the current electric quantity and the reference electric quantity.
The display module 503 is configured to display the display power determined by the determination module.
Optionally, the power detecting module 501 is further configured to determine the reference power within the following range based on the maximum power and the first power:
the first electric quantity-maximum electric quantity x (15 +/-1)% -reference electric quantity is less than or equal to the first electric quantity.
The first electric quantity is the actual residual electric quantity of the electronic equipment when the electronic equipment stops charging.
Optionally, the determining module 502 comprises: a judging unit and a determining unit.
The judging unit is used for judging whether the current electric quantity is larger than the reference electric quantity.
The determining unit is used for dynamically fitting and displaying the incidence relation between the electric quantity and the time according to the load related parameters of the electronic equipment when the current electric quantity is larger than the reference electric quantity, and determining the display electric quantity corresponding to the current electric quantity according to the time and the incidence relation of the current electric quantity.
The determining unit is further configured to determine the current electric quantity as a display electric quantity when the current electric quantity is less than the reference electric quantity.
Optionally, the determining unit includes: a fitting subunit and a determining subunit.
The fitting subunit is used for predicting a first time period from the first electric quantity to the reference electric quantity according to the load related parameters of the electronic equipment; and dynamically fitting and displaying the linear relation between the electric quantity and the moment according to the first time period and the electric quantity difference between the maximum electric quantity and the reference electric quantity.
The determining subunit is configured to determine, according to the time at which the current electric quantity is located and the linear relationship, a display electric quantity corresponding to the current electric quantity.
Optionally, the apparatus further comprises: and presetting a module.
The preset module is used for presetting reserved capacity aiming at the electronic equipment.
Optionally, the preset module is further configured to determine a total capacity of the electronic device, and preset the reserved capacity within the following range according to the total capacity:
the reserved capacity is more than or equal to 0 and less than or equal to the total capacity x (10 +/-1)%.
Optionally, the power detecting module 501 is further configured to ignore sending the remaining power reduction event to an application layer in the electronic device when the electronic device is in the charging state.
Optionally, the power detecting module 501 is further configured to ignore the event of sending the remaining power to the application layer when the electronic device is not in the charging state.
The display apparatus for displaying electric quantity of electronic equipment of this embodiment can execute the display method for displaying electric quantity of electronic equipment provided by one embodiment of the present invention, and the implementation principles are similar, and are not described herein again.
Compared with the prior art, the display device for the electric quantity of the electronic equipment, provided by the embodiment of the invention, has the advantages that the effect of displaying the residual electric quantity in a smooth mode is realized, the problem that the head of the electric quantity falls off a cliff is solved, and the user experience is improved.
Yet another embodiment of the present invention provides an electronic apparatus including:
a processor; and
the storage is configured to store machine readable instructions, and the instructions when executed by the processor cause the processor to execute the method for displaying the power of the electronic equipment provided by one embodiment of the invention.
Fig. 6 is a schematic structural diagram of an electronic device according to still another embodiment of the invention. As shown in fig. 6, the electronic device 60 includes: a processor 601 and a memory 603. The processor 601 is coupled to the memory 603, such as via a bus 602. Optionally, the electronic device 60 may also include a transceiver 604. It should be noted that the transceiver 604 is not limited to one in practical applications, and the structure of the electronic device 60 is not limited to the embodiment of the present invention.
The Processor 601 may be a Central Processing Unit (CPU), a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 601 may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs and microprocessors, and the like.
Bus 602 may include a path that transfers information between the above components. The bus 602 may be a Peripheral Component Interface (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 602 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 6, but this is not intended to represent only one bus or type of bus.
The Memory 603 may be, but is not limited to, a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Erasable Programmable Read-Only Memory (EEPROM), a CD-ROM (Compact Disc-ROM) or other optical disk storage, optical disk storage (including Compact disk, laser disk, optical disk, digital versatile disk, blu-ray disk, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 603 is used for storing application program code for performing the inventive arrangements and is controlled in execution by the processor 601. The processor 601 is configured to execute the application program codes stored in the memory 603 to implement the actions of the display device for power of the electronic device provided by the embodiment shown in fig. 5.
The electronic device of this embodiment may perform the method for displaying the power of the electronic device according to an embodiment of the present invention, and the implementation principles thereof are similar and will not be described herein again.
Compared with the prior art, the electronic equipment provided by the embodiment of the invention realizes the effect of displaying the residual electric quantity in a smooth mode, solves the problem that the head of the electric quantity falls off a cliff, and improves the user experience.
Still another embodiment of the present invention further provides a computer-readable storage medium for storing computer instructions, which, when executed on a computer, enable the computer to perform the method for displaying the power of an electronic device according to an embodiment of the present invention. Compared with the prior art, the computer-readable storage medium of the embodiment of the invention realizes the effect of displaying the residual electric quantity in a smoother mode, solves the problem that the head of the electric quantity falls off a cliff, and thus improves the user experience.
The computer-readable storage medium provided in this embodiment may execute the method for displaying the power of the electronic device provided in one embodiment of the present invention, which is similar to the principle, and is not described herein again.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The foregoing is only a partial embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (9)

1. A method for displaying electric quantity of electronic equipment is characterized by comprising the following steps:
when the electronic equipment is detected not to be in a charging state, detecting the maximum electric quantity, the first electric quantity and the current electric quantity of the electronic equipment, and determining a reference electric quantity based on the maximum electric quantity and the first electric quantity;
determining the display electric quantity corresponding to the current electric quantity according to the relation between the current electric quantity and the reference electric quantity, wherein the method comprises the following steps:
judging whether the current electric quantity is larger than the reference electric quantity;
when the current electric quantity is larger than the reference electric quantity, dynamically fitting and displaying an incidence relation between the electric quantity and time according to load related parameters of the electronic equipment, and determining the display electric quantity corresponding to the current electric quantity according to the time of the current electric quantity and the incidence relation;
when the current electric quantity is smaller than the reference electric quantity, determining the current electric quantity as a display electric quantity;
and displaying the display electric quantity, wherein the first electric quantity is the actual residual electric quantity of the electronic equipment when the electronic equipment stops charging.
2. The method for displaying power of an electronic device according to claim 1, wherein the determining a reference power based on the maximum power and a first power comprises:
determining the reference electric quantity to be in the following range based on the maximum electric quantity and the first electric quantity:
the first electric quantity-maximum electric quantity x (15 +/-1)% -reference electric quantity is less than or equal to the first electric quantity.
3. The method for displaying the electric quantity of the electronic device according to claim 1, wherein the dynamically fitting an association relationship between a display electric quantity and time according to the load related parameters of the electronic device, and determining the display electric quantity corresponding to the current electric quantity according to the time of the current electric quantity and the association relationship comprises:
according to the load related parameters of the electronic equipment, a first time period from the first electric quantity to the reference electric quantity is estimated; according to the first time period and the electric quantity difference between the maximum electric quantity and the reference electric quantity, dynamically fitting and displaying a linear relation between the electric quantity and the moment;
and determining the display electric quantity corresponding to the current electric quantity according to the moment of the current electric quantity and the linear relation.
4. The method for displaying the electric quantity of the electronic equipment according to claim 1, further comprising:
and presetting reserved capacity for the electronic equipment.
5. The method for displaying the electric quantity of the electronic equipment according to claim 4, wherein the presetting of the reserved capacity for the electronic equipment comprises:
determining the total capacity of the electronic equipment, and presetting the reserved capacity within the following range according to the total capacity:
the reserved capacity is more than or equal to 0 and less than or equal to the total capacity x (10 +/-1)%.
6. The method for displaying the electric quantity of the electronic equipment according to any one of claims 1-5, wherein the method further comprises:
when the electronic equipment is in a charging state, ignoring the event of sending the remaining power reduction to an application layer in the electronic equipment;
and when the electronic equipment is not in the charging state, ignoring the event of sending the residual capacity to the application layer.
7. An apparatus for displaying power of an electronic device, comprising:
the electric quantity detection module is used for detecting the maximum electric quantity, the first electric quantity and the current electric quantity of the electronic equipment and determining a reference electric quantity based on the maximum electric quantity and the first electric quantity;
the determining module comprises: a judging unit and a determining unit, wherein,
the judging unit is used for judging whether the current electric quantity is larger than the reference electric quantity;
the determining unit is used for dynamically fitting and displaying the incidence relation between the electric quantity and the time according to the load related parameters of the electronic equipment when the current electric quantity is greater than the reference electric quantity, and determining the display electric quantity corresponding to the current electric quantity according to the time and the incidence relation of the current electric quantity;
the determining unit is further configured to determine the current electric quantity as a display electric quantity when the current electric quantity is less than the reference electric quantity;
and the display module is used for displaying the display electric quantity determined by the determination module, wherein the first electric quantity is the actual residual electric quantity of the electronic equipment when the electronic equipment stops charging.
8. An electronic device, comprising:
a processor; and
a memory configured to store machine readable instructions which, when executed by the processor, cause the processor to perform the method of displaying power of an electronic device of any of claims 1-6.
9. A computer-readable storage medium storing computer instructions for causing a computer to perform the method of displaying power of an electronic device according to any one of claims 1 to 6 when the computer instructions are executed on the computer.
CN201811647404.4A 2018-12-29 2018-12-29 Method and device for displaying electric quantity of electronic equipment and electronic equipment Active CN109596989B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811647404.4A CN109596989B (en) 2018-12-29 2018-12-29 Method and device for displaying electric quantity of electronic equipment and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811647404.4A CN109596989B (en) 2018-12-29 2018-12-29 Method and device for displaying electric quantity of electronic equipment and electronic equipment

Publications (2)

Publication Number Publication Date
CN109596989A CN109596989A (en) 2019-04-09
CN109596989B true CN109596989B (en) 2021-01-01

Family

ID=65965746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811647404.4A Active CN109596989B (en) 2018-12-29 2018-12-29 Method and device for displaying electric quantity of electronic equipment and electronic equipment

Country Status (1)

Country Link
CN (1) CN109596989B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110177171A (en) * 2019-04-30 2019-08-27 Oppo广东移动通信有限公司 Mobile terminal and its electric quantity display method and computer readable storage medium
CN110579712B (en) * 2019-10-14 2022-02-08 北京云迹科技有限公司 Electric quantity display method and device and electronic equipment
CN114441976A (en) * 2020-11-04 2022-05-06 中移物联网有限公司 Battery capacity detection device and method and computer readable storage medium
CN114047449A (en) * 2021-11-16 2022-02-15 深圳市广和通无线股份有限公司 Battery power display method and device, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520364A (en) * 2011-12-20 2012-06-27 广东欧珀移动通信有限公司 Method utilizing battery voltage to display electric quantity
JP2014230447A (en) * 2013-05-24 2014-12-08 本田技研工業株式会社 Remaining capacity display device of power storage device and control device of hybrid vehicle
CN104270499A (en) * 2014-09-01 2015-01-07 广东欧珀移动通信有限公司 State monitoring method and device for Bluetooth earphone and mobile terminal
CN104280686A (en) * 2014-10-13 2015-01-14 电子科技大学 Storage battery residual electric quantity detection method
CN104833927A (en) * 2015-05-15 2015-08-12 惠州Tcl移动通信有限公司 Battery capacity display method, system thereof and mobile terminal
CN106133540A (en) * 2014-03-07 2016-11-16 雷诺两合公司 The method including the state of charge of the battery of multiple battery unit with variable state of charge range for assessment
CN107356881A (en) * 2017-07-19 2017-11-17 深圳天珑无线科技有限公司 A kind of control method of terminal, device and terminal
CN107656209A (en) * 2017-08-25 2018-02-02 北京智行鸿远汽车有限公司 The battery SOC display methods and system of a kind of electric automobile

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520364A (en) * 2011-12-20 2012-06-27 广东欧珀移动通信有限公司 Method utilizing battery voltage to display electric quantity
JP2014230447A (en) * 2013-05-24 2014-12-08 本田技研工業株式会社 Remaining capacity display device of power storage device and control device of hybrid vehicle
CN106133540A (en) * 2014-03-07 2016-11-16 雷诺两合公司 The method including the state of charge of the battery of multiple battery unit with variable state of charge range for assessment
CN104270499A (en) * 2014-09-01 2015-01-07 广东欧珀移动通信有限公司 State monitoring method and device for Bluetooth earphone and mobile terminal
CN104280686A (en) * 2014-10-13 2015-01-14 电子科技大学 Storage battery residual electric quantity detection method
CN104833927A (en) * 2015-05-15 2015-08-12 惠州Tcl移动通信有限公司 Battery capacity display method, system thereof and mobile terminal
CN107356881A (en) * 2017-07-19 2017-11-17 深圳天珑无线科技有限公司 A kind of control method of terminal, device and terminal
CN107656209A (en) * 2017-08-25 2018-02-02 北京智行鸿远汽车有限公司 The battery SOC display methods and system of a kind of electric automobile

Also Published As

Publication number Publication date
CN109596989A (en) 2019-04-09

Similar Documents

Publication Publication Date Title
CN109596989B (en) Method and device for displaying electric quantity of electronic equipment and electronic equipment
EP3674728A1 (en) Method and apparatus for estimating soc-ocv profile
CN102231551B (en) Battery charger combining charging time and service life of battery
WO2015196641A1 (en) Battery charging method and device, and computer storage medium
JP7107495B2 (en) Apparatus and method for balancing battery packs connected in parallel
CN102868001B (en) Lithium ion cell electric quantity displaying method and lithium ion cell electric quanity displaying device
KR20130126085A (en) Apparatus and method for balancing of battery cell's charging capacity
JP2001281306A (en) Chargeable battery residual capacity detector
CN111679206A (en) Electric quantity detection method and device, and storage medium
KR101646570B1 (en) Method for estimating life cycle of battery cell and battery management system usint it
CN116008827A (en) Determination method and device for lithium ion battery lithium precipitation potential and electronic equipment
CN110687458A (en) Terminal battery electric quantity determination method and device
CN110031766B (en) Battery allowable power estimation method and module, and battery power management method and system
CN112858938A (en) Electric quantity calculation method and device, storage medium and electronic equipment
CN109256825B (en) Charging method and electronic device
CN110365084B (en) Charging control method, device, terminal and storage medium
CN113612295B (en) Emergency energy storage battery electric energy management method, device and medium
CN111146837A (en) Charging method and device, electronic device and storage medium
CN114954105A (en) Battery replacement method and device, electronic equipment and storage medium
CN114545241A (en) Freezing capacity-based SOC estimation method and electronic equipment
CN109148986B (en) Charging method and device
JP3634612B2 (en) Secondary battery charge completion time prediction method, secondary battery charge completion time prediction device, battery pack, and electronic device
JP4178141B2 (en) Charging apparatus and charging method
CN114744713B (en) Charging method, device, equipment and medium of energy storage power supply
CN113507154B (en) Charging method and device, charger and electronic equipment

Legal Events

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