CN111431247A - Charging control method, charging control device, electronic device and medium - Google Patents

Charging control method, charging control device, electronic device and medium Download PDF

Info

Publication number
CN111431247A
CN111431247A CN202010418863.6A CN202010418863A CN111431247A CN 111431247 A CN111431247 A CN 111431247A CN 202010418863 A CN202010418863 A CN 202010418863A CN 111431247 A CN111431247 A CN 111431247A
Authority
CN
China
Prior art keywords
charging
electric quantity
period
animation
control method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010418863.6A
Other languages
Chinese (zh)
Inventor
倪锦苹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oppo Chongqing Intelligent Technology Co Ltd
Original Assignee
Oppo Chongqing Intelligent 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 Oppo Chongqing Intelligent Technology Co Ltd filed Critical Oppo Chongqing Intelligent Technology Co Ltd
Priority to CN202010418863.6A priority Critical patent/CN111431247A/en
Publication of CN111431247A publication Critical patent/CN111431247A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0047Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with monitoring or indicating devices or circuits

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application discloses a charging control method, a charging control device, electronic equipment and a medium, wherein the method comprises the following steps: monitoring a target action in a charging state; if the target action is not monitored, displaying a charging animation on a screen locking interface according to the charging electric quantity; and if the target action is monitored, stopping displaying the charging animation on the screen locking interface, and after the target action is executed, restoring to display the charging animation on the screen locking interface, so that the perception of quick charging can be greatly improved.

Description

Charging control method, charging control device, electronic device and medium
Technical Field
The present disclosure relates to the field of charging technologies, and in particular, to a charging control method, a charging control apparatus, an electronic device, and a non-transitory computer-readable storage medium.
Background
With the development of mobile phone charging technology, the mobile phone charging speed is faster and faster, for example, from VOOC (flash charging, a technology for charging a mobile phone quickly) of one hour in 5 minutes of charging, to super VOOC (super flash charging, faster than VOOC charging speed) of two hours in 5 minutes of charging, the maximum charging speed is 65W, and a battery of 400mAh is charged in 30 minutes.
In order to make the user perceive the charging speed, in the related art, when the mobile phone is connected with the charger, the charging effect is displayed on the screen for 10 s. However, in the related art, if the screen is clicked, turned off, or the like, the charging effect disappears, and thereafter, the charging effect is not shown in the charging process. If the user wants to see the charging effect again, the user can only pull out the charger and then connect again to see the charging effect, and the charging speed prompting effect is poor.
Disclosure of Invention
The charging control method can display the charging animation all the time when the target action is not monitored, stop displaying the charging animation when the target action is monitored, and resume displaying the charging animation after the target action is executed, so that the perception of charging speed can be improved to a great extent.
An embodiment of a first aspect of the present application provides a charging control method, where the method includes: monitoring a target action in a charging state; if the target action is not monitored, displaying a charging animation on a screen locking interface according to the charging electric quantity; and if the target action is monitored, stopping displaying the charging animation on the screen locking interface, and resuming to display the charging animation on the screen locking interface after the target action is executed.
According to the charging control method, the target action is monitored in the charging state, if the target action is not monitored, the charging animation is displayed on the screen locking interface all the time according to the charging electric quantity, if the target action is monitored, the display of the charging animation on the screen locking interface is stopped, and after the target action is executed, the display of the charging animation on the screen locking interface is recovered, so that the perception of charging speed can be improved to a great extent.
An embodiment of a second aspect of the present application provides a charging control apparatus, including: the monitoring module is used for monitoring target actions in a charging state; the display module is used for displaying the charging animation on a screen locking interface according to the charging electric quantity if the target action is not monitored; and the processing module is used for stopping displaying the charging animation on the screen locking interface if the target action is monitored, and resuming displaying the charging animation on the screen locking interface after the target action is executed.
According to the charging control device, in the charging state, the target action is monitored through the monitoring module, if the target action is not monitored, the charging animation is always displayed on the screen locking interface through the display module according to the charging quantity, if the target action is monitored, the charging animation is stopped being displayed on the screen locking interface through the processing module, and after the target action is executed, the charging animation is restored to be displayed on the screen locking interface, so that the perception of charging speed can be improved to a great extent.
In an embodiment of the third aspect of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the charging control method described above is implemented.
According to the electronic equipment provided by the embodiment of the application, the perception of quick charging can be greatly improved by implementing the charging control method.
A fourth aspect of the present application is directed to a non-transitory computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing the charging control method described above.
The non-transitory computer-readable storage medium according to the embodiment of the present application can greatly improve the perception of fast charging by executing the charging control method.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart of a charge control method according to an embodiment of the present application;
FIG. 2 is a flow chart of a charge control method according to one embodiment of the present application;
FIG. 3 is a diagram of charging dynamics, according to an embodiment of the present application;
FIG. 4 is an architectural diagram of an MVP employed by a charging campaign, according to one embodiment of the present application;
fig. 5 is a flowchart of predicting a charge capacity in a charge control method according to an embodiment of the present application;
fig. 6 is a flowchart of predicting a charge capacity in a charge control method according to another embodiment of the present application;
FIGS. 7-1 and 7-2 are flow diagrams of a complete charge calculation process according to one embodiment of the present application;
fig. 8 is a block schematic diagram of a charge control device according to an embodiment of the present application; and
fig. 9 is a block schematic diagram of a charge control device according to one embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, 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 exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
A charging control method, a charging control apparatus, an electronic device, and a non-transitory computer-readable storage medium according to embodiments of the present application are described below with reference to the drawings.
Fig. 1 is a flowchart of a charge control method according to an embodiment of the present application. As shown in fig. 1, a charging control method according to an embodiment of the present application includes:
and S1, monitoring the target action in the charging state.
In one embodiment of the present application, the target action includes: one or more combinations of displaying a lock screen notification, displaying a third party theme, and extinguishing the screen.
The screen locking notification is a message prompt of an activity notification of an operator such as WeChat, short message, microblog, incoming call, telecom communication mobile and the like when a terminal device such as a mobile phone is in a screen locking state; the third-party theme is a theme pack developed by a third-party company and can comprise styles, screensavers and the like; the screen-off can be automatically screen-off set by a user, for example, the screen-off can be automatically screen-off when the time of no operation of the mobile phone reaches a set time (such as 10s, 30s, 1min, and the like).
And S2, if the target action is not monitored, displaying the charging animation on the screen locking interface according to the charging electric quantity.
And S3, if the target action is monitored, stopping displaying the charging animation on the screen locking interface, and after the target action is executed, resuming to display the charging animation on the screen locking interface.
Specifically, the terminal device monitors whether a screen locking notification, a third party theme change or screen off actions are available in real time in a charging state. If the actions such as screen locking notification, third party theme change or screen off are not monitored, the charging animation containing the charging electric quantity is displayed on the screen locking interface all the time in the charging process; and if actions such as screen locking notification, third party theme change or screen off are monitored, temporarily not displaying the charging animation on the screen locking interface until the screen locking notification, the third party theme change or the screen off are completed, and resuming to display the charging animation on the screen locking interface.
For example, after the mobile phone is connected with the charger to start charging, a charging animation containing the charging capacity is displayed on the screen locking interface. In the charging process, if the mobile phone receives the WeChat message reminding, the WeChat message reminding notification is displayed on the screen locking interface, the charging animation is paused to be displayed at the moment, and the display of the charging animation on the screen locking interface is resumed after the WeChat message reminding notification time reaches the set time.
According to the charging control method, the target action is monitored in the charging state, if the target action is not monitored, the charging animation is displayed on the screen locking interface all the time according to the charging electric quantity, if the target action is monitored, the display of the charging animation on the screen locking interface is stopped, and after the target action is executed, the display of the charging animation on the screen locking interface is recovered, so that the perception of charging speed can be improved to a great extent.
Fig. 2 is a flowchart of a charge control method according to an embodiment of the present application. This embodiment is a further refinement or optimization of the above-described embodiments.
As shown in fig. 2, the method includes:
and S21, monitoring the target action in the charging state.
It should be noted that, for the explanation of the step S21, reference may be made to relevant portions of the foregoing embodiments, and details are not repeated here.
And S22, if the target action is not monitored, acquiring a special charging effect.
And S23, combining the charging electric quantity with the charging special effect to obtain the charging animation.
And S24, displaying the charging animation on the screen locking interface.
In the application, a plurality of charging special effects can be downloaded in the terminal equipment so as to be convenient for a user to select. For example, as shown in fig. 3, a combination of "electric charge circle" and "meteor" is selected to form a special charging effect. Specifically, when the terminal equipment is charged, if the target action is not monitored, a large number of meteors are always displayed to converge towards a central electric quantity circle on a screen locking interface, which indicates that the terminal equipment is being charged quickly, so that the whole charging effect is more cool and vivid.
It should be noted that, during the charging process, the charging icon at the power level in the status bar at the upper right corner of the lock screen interface may be changed from white to another color, such as blue, to be displayed so as to be distinguished from other colors of the interface, which is more conspicuous, so that the user can more quickly know that the terminal device is being charged.
And S25, if the target action is monitored, stopping displaying the charging animation on the screen locking interface, and after the target action is executed, resuming to display the charging animation on the screen locking interface.
It should be noted that, for the explanation of the step S25, reference may be made to relevant portions of the foregoing embodiments, and details are not repeated here.
According to the charging control method, the target action is monitored in the charging state, if the target action is not monitored, the charging special effect is obtained, the charging electric quantity and the charging special effect are combined to form the charging animation, the charging animation is displayed on the screen locking interface, if the target action is monitored, the display of the charging animation on the screen locking interface is stopped, and after the target action is executed, the display of the charging animation formed by the combination of the charging electric quantity and the charging special effect on the screen locking interface is recovered, so that the perception of charging speed can be improved to a great extent.
It should be noted that, in the embodiment of the present application, the charging animation may adopt an MVP architecture, as shown in fig. 4, which is called Model-View-Presenter all through MVP.
The Model is mainly responsible for monitoring a charging state, informing whether a screen is locked or not, changing a theme of a third party, turning off the screen, calculating electric quantity and the like; the View is responsible for View display and View event processing, and in the application, the View is responsible for displaying a charging animation formed by combining a charging special effect and a charging electric quantity; the Presensor serves as a bridge for interaction between the View and the Model, and in the present application, the Presensor serves as an abstract interface for interaction between the View and the Model. Therefore, the charging animation of the application adopts an MVP framework, is clear in structure and is convenient to reuse.
It is understood that in the embodiments of the present application, the charging special effect can be implemented by using a framed technique, i.e., playing a frame picture of a loop. Then the implementation logic for the lower charge capacity demonstration is described below.
Based on the above embodiment, as shown in fig. 5, the charging control method further includes:
and S51, periodically acquiring the charging current.
The duration of the period may be set according to the battery performance, the power of the charger, and the like, and may be 6s, for example.
And S52, predicting the charging electric quantity at each moment in the period according to the charging current acquired in the period.
That is, in the charging process, by obtaining the current charging current, the electric quantity that can be increased in the present period can be estimated according to the current charging current, for example, the increased electric quantity is the product of the charging current and the period duration, so that the electric quantity that is increased at each time relative to the previous time can be known, and the charging electric quantity at each time in the present period can be predicted.
In this embodiment, to preliminarily determine the charging capacity at each time of the present cycle, the step S52 may include, in combination with the increased capacity ratio of the cycle, preliminarily determining the charging capacity at each time of the present cycle: multiplying the charging current acquired in the period by the time length of the period to obtain the predicted increase electric quantity of the period; dividing the predicted increased electric quantity by the battery capacity to obtain an increased electric quantity ratio of the period; the charging capacity at each time of the cycle is determined based on the increased capacity ratio of the cycle.
Assume that the duration of one cycle is 6 s. Specifically, when the terminal device is connected to the charger, the bottom layer power node is read first to obtain the current charging current _ now and the battery capacity (total battery capacity) batt _ fcc. Then, the current charging current _ now (if it is a dual cell, it is multiplied by 2), multiplied by 6 seconds (6000 milliseconds), divided by 1 hour (1000 × 60) to predict the increased electric quantity in 6s, and divided by the battery capacity batt _ fcc to obtain the increased electric quantity ratio msixms included battery rate in 6s, i.e., msixms included battery rate (current _ now 2) 6000/(1000 × 60 batt _ fcc). And finally, according to the electricity quantity ratio mSixMsIncrementBatteryRate increased in the 6s period, preliminarily determining the charging electricity quantity at each moment in the period.
In an embodiment of the present application, to further determine the charging capacity at each time of the present cycle, the embodiment may combine the increased capacity ratio of each time of the present cycle with respect to the previous time and the initial charging capacity of the present cycle to determine the charging capacity at each time of the present cycle. As shown in fig. 6, the charge control method further includes:
and S61, periodically acquiring the charging current and the charging electric quantity.
And S62, multiplying the charging current acquired in the period by the time length of the period to obtain the predicted increased electric quantity of the period.
And S63, dividing the predicted increased electric quantity by the battery capacity to obtain the increased electric quantity ratio of the period.
S64, the increasing electric energy ratio of the present cycle is linearized to obtain the increasing electric energy ratio of each time of the present cycle to the previous time.
S65, the charge power obtained in this cycle is used as the initial power of this cycle.
S66, determining the charging capacity at each time of the present cycle based on the increasing capacity ratio of each time of the present cycle to the previous time and the initial charging capacity of the present cycle.
It is continuously assumed that the duration of one period is 6 s. Specifically, when the terminal device is connected to the charger, the bottom charge level node is read to obtain the current charging current _ now, the battery capacity (total battery capacity) batt _ fcc, and the current remaining charge (charging charge) current _ now, which is used as the initial charge of the present cycle, and then the current charging current _ now (if it is a dual cell, it needs to be multiplied by 2), multiplied by 6 seconds (6000 milliseconds), divided by 1 hour (1000 × 60) to predict the increased charge within 6s, and divided by the battery capacity batt _ fcc to obtain the increased charge ratio msixmsrescreent battterrate within 6s, i.e., msixmensincebattterbutterrate (current _ now 2)/(1000 × 60 batt _ fcc).
Then, making a linear change on the ratio of the electric quantity increased within 6s to the mSixMsIncrementBatteryRate, and continuously accumulating to generate decimal places, wherein the specific process of the linear change is as follows:
during the linear change, every generated value mSimothedBatteryRate (the value is the increased electric quantity ratio of each time in the period relative to the previous time) is added with the last value mEstimatedBatteryRate (the value is the sum of the initial charging electric quantity current _ now in the period and the increased electric quantity ratio mSixMsegment BatteryRate in the previous time) to obtain a new value result (the value is the current charging electric quantity), and the result is subjected to percentage processing, wherein an integer number is displayed as an integer part in the charging animation, and a decimal number two is displayed as a decimal part in the charging animation.
Finally, after the linear change of 6s is finished, updating the value of the charging capacity mEstimatedBatteryRate + mSimothedBatteryRate as the initial capacity of the next period, and repeating the above operation to calculate the next 6 s.
Based on the above embodiment, in order to ensure the accuracy of the calculation of the charging electric quantity, after the charging current obtained in the present period is multiplied by the time length of the present period to obtain the predicted increased electric quantity of the present period, the method further includes: and adjusting the predicted increased electric quantity of the period according to the error of the predicted increased electric quantity of the previous period.
Specifically, in the process of calculating the charging capacity, in order to ensure the accuracy of the calculation of the charging capacity, the predicted increase capacity of the previous cycle may be compared with the actual charging capacity, and the predicted increase capacity of the current cycle may be continuously calibrated. For example, the current remaining power current _ now is divided by the battery capacity batt _ fcc to obtain a current actual power ratio mcalculated battery rate, that is, mcalculated battery rate ═ batt _ rm/batt _ fcc, and then a difference between the predicted increased power ratio of the previous cycle and the current actual power ratio is calculated, and it is determined whether the difference is greater than 1%, and if the difference is less than or equal to 1%, the predicted increased power of the present cycle is not adjusted; if the predicted increase electric quantity is larger than 1%, the predicted increase electric quantity of the period is adjusted, and if the predicted increase electric quantity of the period is adjusted to be half of the predicted increase electric quantity of the previous period, the predicted increase electric quantity of the period is used as the predicted increase electric quantity of the period. That is, in the calculation process, the predicted increased electric quantity is continuously calibrated by comparing the predicted increased electric quantity with the actual charging electric quantity, so as to ensure the accuracy of the charging electric quantity calculation.
Based on the above embodiment, in order to realize the display of decimal place, after the charging electric quantity at each time in the present cycle is predicted according to the charging current obtained in the present cycle, the method further includes: monitoring decimal place of charging electric quantity; if the decimal place is monitored to be a set value, electric quantity broadcasting is sent; and the electric quantity broadcast is used for updating the charging electric quantity displayed by the status bar.
Specifically, when the result is subjected to the percentile processing, the integer number is displayed as the integer part in the charging animation, and the decimal number two is displayed as the decimal part in the charging animation. Meanwhile, the decimal place of the charging electric quantity is monitored, when the decimal place is monitored to be a set value (such as 0), an interface added by a system is actively called, electric quantity broadcasting is sent, and the charging electric quantity displayed by the status bar is updated.
In summary, the system of the terminal device calculates the percentage of the current remaining power and the total capacity of the battery, and then rounds the percentage upwards to report the power to the system layer every 6s, and then the system layer distributes the power to each upper application in a broadcast manner. For example, when the screen locking interface receives the power, the power is displayed through a charging animation. Therefore, the algorithm for generating the small digital electric quantity in the embodiment of the application is obtained by upper layer estimation under the condition of not changing the electric quantity framework of the system bottom layer, the influence is small, the small digital change is smooth, and the operation is stable.
The following whole calculation process of the charging capacity with reference to fig. 7-1 and 7-2 includes:
s101, start calculating startscalebatteryrate ().
S102, initialize precalculateBatteryRate ().
S103, reading readBatteryInfo () of the bottom-layer electric quantity node.
And S104, judging whether the estimated value is 0 or not. If yes, go to step S109; if not, step S105 is performed.
And S105, judging whether the charging time is within 3 minutes from the last charging time. If yes, go to step S106; if not, step S108 is performed.
And S106, calculating whether the change of the real electric quantity is within 0.2%. If yes, go to step S107; if not, step S108 is performed.
And S107, taking the variation value of the estimated electric quantity plus the real electric quantity as an initial value of the estimated electric quantity.
S108, determining whether the integer number of the estimated electric quantity is equal to the broadcast value. If yes, go to step S110; if not, step S109 is performed.
And S109, using the broadcast value as an estimated electric quantity initial value.
And S110, performing electric quantity circulating calculation by using Post one Runable to generate decimal places. That is, a linear numerical change is made to the added power, and decimal places are generated after continuous accumulation.
It should be noted that steps S101 to S110 are the first phase, which is the content executed in the first cycle after the charger is connected, and step S111 is followed by the second phase, which is the content executed in the second cycle and subsequent cycles. It will be appreciated that the second phase is performed after the first phase is performed.
And S111, calculating the electric quantity to calculate the calcalateBatteryRate ().
And S112, reading readBatteryInfo () of the bottom-layer electric quantity node.
S113, calculating a battery rate ().
S114, adjusting the estimated increment and the time adjust SixMsIncrementBatteryRate ().
And S115, judging whether the 6S electric quantity increment obtained by calculating the current is greater than 0.1%. If yes, go to step S116; if not, step S119 and step S120 are performed.
And S116, making a difference value between the estimated value and the true value, and judging whether the result is greater than 1%. If yes, go to step S117; if not, step S118 is performed.
And S117, adjusting half of the estimated increment to be used as the next estimated increment.
S118, obtaining the estimated increment.
S119, an empirical estimated increment value is given as an estimated increment.
And S120, making a difference between the estimated value and the true value, and judging whether the result is greater than 0.5%. If so, step S121 is performed.
And S121, adjusting two bits of the estimated time length to serve as the next estimated time length.
S122, obtaining the estimated time.
It should be noted that, before calculating the next cycle, the estimated increment (step length) and time are adjusted according to the current, the estimated deviation and other conditions, so that the small digit change is smooth, and the estimated precision can be ensured.
S123, the estimated increment is linearly changed within the estimated time, and the small digital electric quantity is generated by continuous accumulation.
And S124, displaying the electric quantity value showBatteryRate ().
S125, displaying the electric quantity value with decimal point to udpateBattery L evelView () in the charging dynamic effect.
S126, it is determined whether all the decimal places of the estimated value are 0. If so, step S127 is performed.
S127, call system interface through reflection to set broadcast power notifyBattery L evenchange ().
S128, the broadcast is sent to the upper layer application broadcastStickIntent ().
At S129, due to the variability of the current during charging, it cannot be guaranteed that the estimated value and the true value are completely consistent. In order to prevent the jump of the electric quantity display when the charging is disconnected, a certain evasion test is carried out in the system.
Because the current changes and deforms more in the whole charging process, for example, when the super-flash charger is connected, the current value gradually changes to a normal value, and when the super-flash charger is charged to more than 90%, the current value gradually changes to be smaller, and the like. These all result in a jump in the display of the charge when the charger is disconnected. In the class of system-level battteryservices, the following measures can be taken: firstly, when the report of the bottom layer is full, the estimated electric quantity is required to reach 100, and then the full state is sent to the upper layer application, otherwise, the report is also sent to the upper layer in the charging state; secondly, when the electric quantity reported by the recharging bottom layer is 2% less than the estimated electric quantity before disconnection, the estimated electric quantity is used for reporting to the upper layer within 5s, and electric quantity display jump is placed; and thirdly, when the electric quantity reported by the recharging bottom layer is 1% less than the estimated electric quantity before disconnection, the estimated electric quantity is used for reporting to the upper layer, and the electric quantity display jumping is prevented.
Based on the same inventive concept, the embodiment of the application also provides a device corresponding to the method in the embodiment.
Fig. 8 is a block schematic diagram of a charge control device according to an embodiment of the present application. As shown in fig. 8, the charge control device 100 according to the embodiment of the present application includes: a listening module 110, a display module 20 and a processing module 130.
The monitoring module 110 is configured to monitor a target action in a charging state. The display module 120 is configured to display the charging animation on the screen locking interface according to the charging amount if the target action is not monitored. The processing module 130 is configured to stop displaying the charging animation on the screen locking interface if the target action is monitored, and resume displaying the charging animation on the screen locking interface after the target action is executed.
According to an embodiment of the present application, the display module 120 displays a charging animation on the screen locking interface according to the charging capacity, including: and acquiring a charging special effect, combining the charging electric quantity with the charging special effect to obtain a charging animation, and displaying the charging animation on a screen locking interface.
Wherein the target action comprises: one or more combinations of displaying a lock screen notification, displaying a third party theme, and extinguishing the screen.
According to an embodiment of the present application, as shown in fig. 9, the charging control apparatus 100 described above further includes: an acquisition module 140 and a prediction module 150. The obtaining module 140 is configured to periodically obtain a charging current, and the predicting module 150 is configured to predict a charging amount at each time in the period according to the charging current obtained in the period.
According to an embodiment of the present application, the predicting module 150 predicts the charging electric quantity at each time in the present cycle according to the charging current obtained in the present cycle, and specifically includes: multiplying the charging current acquired in the period by the time length of the period to obtain the predicted increase electric quantity of the period; dividing the predicted increased electric quantity by the battery capacity to obtain an increased electric quantity ratio of the period; the charging capacity at each time of the cycle is determined based on the increased capacity ratio of the cycle.
According to an embodiment of the present application, the obtaining module 140 is further configured to periodically obtain the charging capacity. Correspondingly, the predicting module determines the charging capacity at each moment of the cycle according to the increased capacity ratio of the cycle, and specifically includes: carrying out linear processing on the increased electric quantity ratio of the period to obtain the increased electric quantity ratio of each moment of the period relative to the previous moment; taking the charging electric quantity obtained in the period as the initial electric quantity of the period; and determining the charging electric quantity at each moment in the period according to the increasing electric quantity ratio of each moment in the period to the previous moment and the initial charging electric quantity of the period.
According to an embodiment of the present application, the predicting module 150 is further configured to, after multiplying the charging current obtained in the present cycle by the duration of the present cycle to obtain the predicted increased power of the present cycle: and adjusting the predicted increased electric quantity of the period according to the error of the predicted increased electric quantity of the previous period.
According to an embodiment of the present application, after the predicting module 150 predicts the charging electric quantity at each time in the present cycle according to the charging current obtained in the present cycle, the predicting module is further configured to: monitoring decimal place of charging electric quantity; when the decimal place is monitored to be a set value, electric quantity broadcasting is sent; and the electric quantity broadcast is used for updating the charging electric quantity displayed by the status bar.
It should be understood that the above-mentioned apparatus is used for executing the method in the above-mentioned embodiments, and the implementation principle and technical effect of the apparatus are similar to those described in the above-mentioned method, and the working process of the apparatus may refer to the corresponding process in the above-mentioned method, and is not described herein again.
According to the charging control device, in the charging state, the target action is monitored through the monitoring module, if the target action is not monitored, the charging animation is always displayed on the screen locking interface through the display module according to the charging quantity, if the target action is monitored, the charging animation is stopped being displayed on the screen locking interface through the processing module, and after the target action is executed, the charging animation is restored to be displayed on the screen locking interface, so that the perception of charging speed can be improved to a great extent.
In order to implement the foregoing embodiments, the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the charging control method described above is implemented.
According to the electronic equipment provided by the embodiment of the application, the perception of quick charging can be greatly improved by implementing the charging control method.
In order to implement the above embodiments, the present application also proposes a non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the above charging control method.
The non-transitory computer-readable storage medium according to the embodiment of the present application can greatly improve the perception of fast charging by executing the charging control method.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.

Claims (11)

1. A charge control method, characterized in that the method comprises:
monitoring a target action in a charging state;
if the target action is not monitored, displaying a charging animation on a screen locking interface according to the charging electric quantity;
and if the target action is monitored, stopping displaying the charging animation on the screen locking interface, and resuming to display the charging animation on the screen locking interface after the target action is executed.
2. The charging control method according to claim 1, wherein the displaying a charging animation on the screen locking interface according to the charging capacity comprises:
acquiring a charging special effect;
combining the charging electric quantity with the charging special effect to obtain the charging animation;
and displaying the charging animation on the screen locking interface.
3. The charge control method according to claim 1, wherein the target action includes: one or more combinations of displaying a lock screen notification, displaying a third party theme, and extinguishing the screen.
4. The charge control method according to any one of claims 1 to 3, characterized by further comprising:
periodically acquiring a charging current;
and predicting the charging electric quantity at each moment in the period according to the charging current acquired in the period.
5. The charge control method according to claim 4, wherein the predicting the charge amount at each time in the present cycle based on the charge current acquired in the present cycle includes:
multiplying the charging current acquired in the period by the duration of the period to obtain the predicted increased electric quantity of the period;
dividing the predicted increased electric quantity by the battery capacity to obtain the increased electric quantity ratio of the period;
and determining the charging electric quantity at each moment of the period according to the increasing electric quantity ratio of the period.
6. The charge control method according to claim 5, characterized by further comprising:
periodically acquiring the charging electric quantity;
correspondingly, the determining the charging capacity at each moment of the period according to the increased capacity ratio of the period includes:
carrying out linear processing on the increased electric quantity ratio of the period to obtain the increased electric quantity ratio of each moment of the period relative to the previous moment;
taking the charging electric quantity obtained in the period as the initial electric quantity of the period;
and determining the charging electric quantity at each moment of the period according to the increasing electric quantity ratio of each moment of the period to the previous moment and the initial charging electric quantity of the period.
7. The charge control method according to claim 5, wherein after the step of multiplying the charging current obtained in the present cycle by the time length of the present cycle to obtain the predicted increased electric quantity of the present cycle, the method further comprises:
and adjusting the predicted increased electric quantity of the period according to the error of the predicted increased electric quantity of the previous period.
8. The charge control method according to claim 4, wherein, after predicting the charge amount at each time in the present cycle based on the charge current acquired in the present cycle, the method further comprises:
monitoring decimal places of the charging electric quantity;
when the decimal place is monitored to be a set value, electric quantity broadcasting is sent; and the electric quantity broadcast is used for updating the charging electric quantity displayed by the status bar.
9. A charge control device, characterized by comprising:
the monitoring module is used for monitoring target actions in a charging state;
the display module is used for displaying the charging animation on a screen locking interface according to the charging electric quantity if the target action is not monitored;
and the processing module is used for stopping displaying the charging animation on the screen locking interface if the target action is monitored, and resuming displaying the charging animation on the screen locking interface after the target action is executed.
10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the charging control method according to any one of claims 1 to 8 when executing the computer program.
11. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements the charging control method according to any one of claims 1 to 8.
CN202010418863.6A 2020-05-18 2020-05-18 Charging control method, charging control device, electronic device and medium Pending CN111431247A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010418863.6A CN111431247A (en) 2020-05-18 2020-05-18 Charging control method, charging control device, electronic device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010418863.6A CN111431247A (en) 2020-05-18 2020-05-18 Charging control method, charging control device, electronic device and medium

Publications (1)

Publication Number Publication Date
CN111431247A true CN111431247A (en) 2020-07-17

Family

ID=71558908

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010418863.6A Pending CN111431247A (en) 2020-05-18 2020-05-18 Charging control method, charging control device, electronic device and medium

Country Status (1)

Country Link
CN (1) CN111431247A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129215A (en) * 2021-03-26 2022-09-30 荣耀终端有限公司 Information screen display method and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1126320A (en) * 1994-09-16 1996-07-10 雅考埃普森株式会社 Battery capacity meter and battery capacity calculation method
CN102890594A (en) * 2012-09-29 2013-01-23 惠州Tcl移动通信有限公司 Method for prompting charge state of electronic equipment and electronic equipment
CN105611079A (en) * 2016-02-02 2016-05-25 广州市久邦数码科技有限公司 Fast charging method and system
CN106787011A (en) * 2017-03-03 2017-05-31 北京奇虎科技有限公司 Charge remaining time display methods, device and terminal device
CN108649660A (en) * 2018-06-15 2018-10-12 Oppo广东移动通信有限公司 Electric quantity display method and wireless transmitting-receiving equipments, charging equipment
CN110704279A (en) * 2019-10-09 2020-01-17 Oppo广东移动通信有限公司 Electric quantity display method and device, electronic equipment and computer storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1126320A (en) * 1994-09-16 1996-07-10 雅考埃普森株式会社 Battery capacity meter and battery capacity calculation method
CN102890594A (en) * 2012-09-29 2013-01-23 惠州Tcl移动通信有限公司 Method for prompting charge state of electronic equipment and electronic equipment
CN105611079A (en) * 2016-02-02 2016-05-25 广州市久邦数码科技有限公司 Fast charging method and system
CN106787011A (en) * 2017-03-03 2017-05-31 北京奇虎科技有限公司 Charge remaining time display methods, device and terminal device
CN108649660A (en) * 2018-06-15 2018-10-12 Oppo广东移动通信有限公司 Electric quantity display method and wireless transmitting-receiving equipments, charging equipment
CN110704279A (en) * 2019-10-09 2020-01-17 Oppo广东移动通信有限公司 Electric quantity display method and device, electronic equipment and computer storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129215A (en) * 2021-03-26 2022-09-30 荣耀终端有限公司 Information screen display method and electronic equipment
CN115129215B (en) * 2021-03-26 2023-11-03 荣耀终端有限公司 Screen-extinguishing display method and electronic equipment

Similar Documents

Publication Publication Date Title
CN109932661B (en) Battery state monitoring method and device
US20160064960A1 (en) User-behavior-driven battery charging
WO2015081868A1 (en) Charging method and electronic device
WO2012096383A1 (en) Device and method for calculating battery standby time of mobile device
EP3796511B1 (en) Charging method, charging device and readable storage medium
CN105262155A (en) Charging method and device
US20190219639A1 (en) Electricity storage device, electricity storage system, and power supply system
US20160159236A1 (en) Vehicle storage battery management device, vehicle power unit, and vehicle storage battery management method
JP2020092593A (en) Method of predicting charging state of battery
CN114977343A (en) Charging method, charging device, electronic equipment and storage medium
JP2019128346A (en) Prediction method of battery capacity
CN106848457A (en) A kind of charging method and electronic equipment
CN111431247A (en) Charging control method, charging control device, electronic device and medium
JP5696737B2 (en) Storage battery system, storage battery system status notification method and program
CN111212326A (en) Video playing method, electronic equipment and storage medium
CN110031766A (en) Battery nominal power evaluation method and module, power of battery management method and system, automobile and computer readable storage medium
CN114156968A (en) Charging and discharging control method and device of energy storage system, controller and energy storage system
JP2002315204A (en) Charge controller
CN116819335A (en) Battery life prediction method, device, computer equipment and storage medium
CN112477696A (en) Current control method and device for slow charging
CN108874107B (en) Control method and device for state of charge
CN111293748A (en) Method and device for monitoring electric quantity data
CN113829931B (en) Train charging control method and device and train
CN108199352B (en) Battery protecting method and device
CN114069799A (en) Charging control method, charging control device and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200717

RJ01 Rejection of invention patent application after publication