Disclosure of Invention
The invention aims to provide a method, a device and mobile equipment for estimating available time of battery electric quantity, which can dynamically and accurately calculate the residual service time of the mobile phone electric quantity at a certain specific time point according to the current mobile phone electric quantity service condition of a user in real time.
To solve the above technical problem, an embodiment of the present invention provides a method for estimating available time of battery power, including:
obtaining sampling values of the battery electric quantity at different time points in the use process of the battery;
establishing an electric quantity change model according to the sampling values of the battery electric quantity at different time points and the variable quantity among the sampling values;
and obtaining the available time length of the residual electric quantity after the battery electric quantity is sampled at the last time point according to the electric quantity change model.
The method comprises the following steps of obtaining sampling values of the battery capacity at different time points in the using process of the battery, wherein the steps comprise: and obtaining the sampling values of the battery capacity at least two adjacent time points in the use process of the battery, wherein the sampling value of the last time point of the at least two adjacent time points is the latest sampling value.
The method comprises the following steps of obtaining sampled values of the battery capacity at least two adjacent time points in the using process of the battery, wherein the steps comprise:
acquiring a first sampling value of the battery capacity and a first time point when the first sampling value is acquired in the using process of the battery;
and acquiring a second sampling value of the battery capacity and a second time point when the second sampling value is acquired in the process of continuously using the battery.
The step of establishing an electric quantity change model according to the variation of the electric quantity of the battery between the sampling values of different time points and the variation of the sampling values comprises the following steps:
and establishing a connecting line connecting a first point determined by the first time point and the first sampling value and a second point determined by the second time point and the second sampling value in a coordinate system taking time as a horizontal axis and electric quantity as a vertical axis.
According to the electric quantity change model, the step of obtaining the available duration of the residual electric quantity after the last time point sampling of the electric quantity of the battery comprises the following steps:
acquiring an intersection point of the connecting line and the transverse axis according to the connecting line;
and obtaining the time length from the second time point to the time point corresponding to the intersection point.
Wherein, in the process of continuously using the battery, the steps of obtaining a second sampling value of the battery capacity and a second time point when the second sampling value is obtained further comprise:
and acquiring a third sampling value of the battery capacity and a third time point when the third sampling value is acquired in the process of continuously using the battery.
The step of establishing an electric quantity change model according to the variation of the electric quantity of the battery between the sampling values of different time points and the variation of the sampling values comprises the following steps:
and establishing a connecting line connecting a first point determined by the first time point and the first sampling value, a second point determined by the second time point and the second sampling value and a third point determined by the third time and the third sampling value in a coordinate system taking time as a horizontal axis and electric quantity as a vertical axis.
According to the electric quantity change model, the step of obtaining the available duration of the residual electric quantity after the last time point sampling of the electric quantity of the battery comprises the following steps:
acquiring an intersection point of the connecting line and the transverse axis according to the connecting line;
and obtaining the time length from the third time point to the time point corresponding to the intersection point.
An embodiment of the present invention further provides a device for estimating available time of battery power, including:
the first obtaining module is used for obtaining the sampling values of the battery capacity at different time points in the use process of the battery;
the establishing module is used for establishing an electric quantity change model according to the sampling values of the battery electric quantity at different time points and the variable quantity among the sampling values;
and the second obtaining module is used for obtaining the available duration of the residual electric quantity after the electric quantity of the battery is sampled at the last time point according to the electric quantity change model.
An embodiment of the present invention also provides a mobile device, including the apparatus as described above.
The technical scheme of the invention has the following beneficial effects:
in the scheme, sampling values of the electric quantity of the battery at different time points are obtained in the using process of the battery; establishing an electric quantity change model according to the sampling values of the battery electric quantity at different time points and the variable quantity among the sampling values; according to the electric quantity change model, the available time length of the residual electric quantity after the battery electric quantity is sampled at the last time point is obtained, namely, the residual use time of the mobile phone electric quantity at a certain specific time point of the mobile phone can be dynamically and accurately calculated in real time according to the current battery electric quantity use condition of a user.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments.
As shown in fig. 1, an embodiment of the present invention provides a method for estimating a time available for battery power, including:
step 11, obtaining sampling values of the battery capacity at different time points in the use process of the battery;
step 12, establishing an electric quantity change model according to the sampling values of the battery electric quantity at different time points and the variable quantity among the sampling values;
and step 13, obtaining the available duration of the residual electric quantity after the electric quantity of the battery is sampled at the last time point according to the electric quantity change model.
Sampling values of the electric quantity of the battery at different time points in the use process of the battery are obtained; establishing an electric quantity change model according to the sampling values of the battery electric quantity at different time points and the variable quantity among the sampling values; according to the electric quantity change model, the available time length of the residual electric quantity after the battery electric quantity is sampled at the last time point is obtained, namely, the residual use time of the mobile phone electric quantity at a certain specific time point of the mobile phone can be dynamically and accurately calculated in real time according to the current battery electric quantity use condition of a user.
In another embodiment of the present invention, on the basis of steps 11 to 13, step 11 may include: step 111, obtaining sampling values of the battery capacity at least two adjacent time points in the using process of the battery, wherein the sampling value of the last time point of the at least two adjacent time points is the latest sampling value, and the adjacent time points refer to the time points between which the sampling of the capacity value is not performed.
Fig. 2 is a diagram of a model of variation of battery capacity according to a first embodiment of the method for estimating available battery capacity time of the present invention; wherein, the time point and the adopted value are both 2, and step 111 includes:
step 1111, acquiring a first sampling value of the battery capacity and a first time point when the first sampling value is acquired in the using process of the battery;
step 1112, obtaining a second sampling value of the battery capacity and a second time point when the second sampling value is obtained in the process of continuously using the battery; accordingly, step 12 comprises:
step 121, establishing a connection line connecting a first point determined by the first time point and the first sampling value and a second point determined by the second time point and the second sampling value in a coordinate system taking time as a horizontal axis and electric quantity as a vertical axis; accordingly, step 13 comprises:
step 131, obtaining an intersection point of the connecting line and the transverse axis according to the connecting line;
step 132, obtaining the duration from the second time point to the time point corresponding to the intersection point.
Specifically, as shown in fig. 2, under the electric quantity variation model, the remaining electric quantity estimation method includes:
step 101, when the power of the smartphone system changes, receiving a notification sent by the system, at this time, recording a first data point a1, where the record information includes a current power (i.e., a first sampled value L1 of the power) and a current time point (i.e., the first time point T1);
step 102, when the power of the smartphone system changes again, receiving a notification sent by the system, and at this time, recording the current power (i.e. the second sampled value L2 of the power) and the current time point (i.e. the second time point T2) as a second data point a 2;
step 103, establishing an available time prediction model C1 (i.e. the above-mentioned electricity quantity change model) according to the two data points a1 and a2 in steps 101 and 102, wherein the specific form is a straight line, and the straight line is determined by a1 and a2, as shown in fig. 2:
the expression C1 is
Step 104, calculating a time point T3 when the electric quantity is 0, namely an intersection point of C1 and a horizontal axis according to the straight line model C1 in the step 103;
when Y =0, the time of A3 point can be obtained
The available duration of the remaining battery is the difference between T3 and T2:
fig. 3 is a diagram of a model of variation of battery capacity according to a second embodiment of the method for estimating available battery capacity according to the present invention; wherein, the time point and the adopted value are both 3, and step 111 includes:
step 1111, acquiring a first sampling value of the battery capacity and a first time point when the first sampling value is acquired in the using process of the battery;
step 1112, obtaining a second sampling value of the battery capacity and a second time point when the second sampling value is obtained in the process of continuously using the battery;
step 1113, obtaining a third sampling value of the battery capacity and a third time point when the third sampling value is obtained in the process of continuously using the battery; accordingly, step 12 comprises:
step 122, establishing a connection line connecting a first point determined by the first time point and the first sampling value, a second point determined by the second time point and the second sampling value, and a third point determined by the third time and the third sampling value in a coordinate system taking time as a horizontal axis and electric quantity as a vertical axis; accordingly, step 13 comprises:
step 133, obtaining an intersection point of the connecting line and the transverse axis according to the connecting line;
step 134 obtains the time length from the third time point to the time point corresponding to the intersection point.
Specifically, after the first point and the second point as shown in fig. 2 are recorded,
step 105, continuing to receive the message that the electric quantity changes, recording a data point A3 (corresponding to the third time point T3' and the third sampling value L3), and when three points are obtained, establishing an available time prediction model C2 according to a1, a2 and A3, where the model is in the form of a parabola, as shown in fig. 3:
step 106, calculating a time point when the electric quantity is 0, namely an intersection point T4 of C2 and a horizontal axis according to the parabolic model C2 in the step 105, wherein the data is latest data and is more accurate than the residual electric quantity estimated by a linear model; wherein,
the mathematical expression of C2, i.e. the parabolic equation, is Y ═ aX2+bX+c
Wherein <math>
<mrow>
<mi>a</mi>
<mo>=</mo>
<mo>-</mo>
<mfrac>
<mrow>
<mo>-</mo>
<mi>T</mi>
<mn>2</mn>
<mi>L</mi>
<mn>1</mn>
<mo>+</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mo>′</mo>
</msup>
<mi>L</mi>
<mn>1</mn>
<mo>+</mo>
<mi>T</mi>
<mn>1</mn>
<mi>L</mi>
<mn>2</mn>
<mo>-</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mo>′</mo>
</msup>
<mi>L</mi>
<mn>2</mn>
<mo>-</mo>
<mi>T</mi>
<mn>1</mn>
<mi>L</mi>
<mn>3</mn>
<mo>+</mo>
<mi>T</mi>
<mn>2</mn>
<mi>L</mi>
<mn>3</mn>
</mrow>
<mrow>
<mrow>
<mo>(</mo>
<mo>-</mo>
<mi>T</mi>
<mn>1</mn>
<mo>+</mo>
<mi>T</mi>
<mn>2</mn>
<mo>)</mo>
</mrow>
<mo>*</mo>
<mrow>
<mo>(</mo>
<mi>T</mi>
<mn>2</mn>
<mo>-</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mo>′</mo>
</msup>
<mo>)</mo>
</mrow>
<mo>*</mo>
<mrow>
<mo>(</mo>
<mo>-</mo>
<mi>T</mi>
<mn>1</mn>
<mo>+</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mo>′</mo>
</msup>
<mo>)</mo>
</mrow>
</mrow>
</mfrac>
</mrow>
</math>
<math>
<mrow>
<mi>b</mi>
<mo>=</mo>
<mo>-</mo>
<mfrac>
<mrow>
<msup>
<mrow>
<mi>T</mi>
<mn>2</mn>
</mrow>
<mn>2</mn>
</msup>
<mi>L</mi>
<mn>1</mn>
<mo>-</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mrow>
<mo>′</mo>
<mn>2</mn>
</mrow>
</msup>
<mi>L</mi>
<mn>1</mn>
<mo>-</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>1</mn>
</mrow>
<mn>2</mn>
</msup>
<mi>L</mi>
<mn>2</mn>
<mo>+</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mrow>
<mo>′</mo>
<mn>2</mn>
</mrow>
</msup>
<mi>L</mi>
<mn>2</mn>
<mo>+</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>1</mn>
</mrow>
<mn>2</mn>
</msup>
<mi>L</mi>
<mn>3</mn>
<mo>-</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>2</mn>
</mrow>
<mn>2</mn>
</msup>
<mi>L</mi>
<mn>3</mn>
</mrow>
<mrow>
<mrow>
<mo>(</mo>
<mi>T</mi>
<mn>1</mn>
<mo>-</mo>
<mi>T</mi>
<mn>2</mn>
<mo>)</mo>
</mrow>
<mo>*</mo>
<mrow>
<mo>(</mo>
<mi>T</mi>
<mn>1</mn>
<mo>-</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mo>′</mo>
</msup>
<mo>)</mo>
</mrow>
<mo>*</mo>
<mrow>
<mo>(</mo>
<mi>T</mi>
<mn>2</mn>
<mo>-</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mo>′</mo>
</msup>
<mo>)</mo>
</mrow>
</mrow>
</mfrac>
</mrow>
</math>
<math>
<mrow>
<mi>c</mi>
<mo>=</mo>
<mo>-</mo>
<mfrac>
<mrow>
<msup>
<mrow>
<mo>-</mo>
<mi>T</mi>
<mn>2</mn>
</mrow>
<mn>2</mn>
</msup>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mo>′</mo>
</msup>
<mi>L</mi>
<mn>1</mn>
<mo>+</mo>
<mi>T</mi>
<mn>2</mn>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mrow>
<mo>′</mo>
<mn>2</mn>
</mrow>
</msup>
<mi>L</mi>
<mn>1</mn>
<mo>+</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>1</mn>
</mrow>
<mn>2</mn>
</msup>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mo>′</mo>
</msup>
<mi>L</mi>
<mn>2</mn>
<mo>-</mo>
<mi>T</mi>
<mn>1</mn>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mrow>
<mo>′</mo>
<mn>2</mn>
</mrow>
</msup>
<mi>L</mi>
<mn>2</mn>
<mo>-</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>1</mn>
</mrow>
<mn>2</mn>
</msup>
<mi>T</mi>
<mn>2</mn>
<mi>L</mi>
<mn>3</mn>
<mo>+</mo>
<mi>T</mi>
<mn>1</mn>
<msup>
<mrow>
<mi>T</mi>
<mn>2</mn>
</mrow>
<mn>2</mn>
</msup>
<mi>L</mi>
<mn>3</mn>
</mrow>
<mrow>
<mrow>
<mo>(</mo>
<mi>T</mi>
<mn>2</mn>
<mo>-</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mo>′</mo>
</msup>
<mo>)</mo>
</mrow>
<mo>*</mo>
<mrow>
<mo>(</mo>
<msup>
<mrow>
<mi>T</mi>
<mn>1</mn>
</mrow>
<mn>2</mn>
</msup>
<mo>-</mo>
<mi>T</mi>
<mn>1</mn>
<mi>T</mi>
<mn>2</mn>
<mo>-</mo>
<mi>T</mi>
<mn>1</mn>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mo>′</mo>
</msup>
<mo>+</mo>
<mi>T</mi>
<mn>2</mn>
<msup>
<mrow>
<mi>T</mi>
<mn>3</mn>
</mrow>
<mo>′</mo>
</msup>
<mo>)</mo>
</mrow>
</mrow>
</mfrac>
</mrow>
</math>
According to the mathematical expression of C2, when Y =0, the value of X is the intersection of C2 and the horizontal axis, whose horizontal axis is the right root when the equation equals zero:
the difference between the abscissa T4 of the intersection of C2 and the abscissa and the current time T3' is the remaining usage time of the electric quantity.
In other modified embodiments of the present invention, as shown in fig. 4, on the basis of the embodiment shown in fig. 3, the method may further include:
step 107, continuously updating the recorded data points a4, a5, and a6.. and calculating the available time by using the three recently acquired points to update the parabolic model, and discarding the earlier data points, wherein the specific calculation method is the embodiment shown in fig. 3, such as the new parabolic model C3 determined by a2, A3, and a 4.
In the embodiment of the invention, the electric quantity and the time point are sampled, recorded and stored in the process of using the mobile phone by the user, the latest sampling point is always kept used in the sampling process, and the data point with relatively weak reference value which is initially collected is abandoned. Establishing different residual use time model curves according to the acquired data points, wherein if two points are acquired, the model curves are linear models; the three points are parabolic models, and then the time point when the electric quantity is reduced to 0 is predicted according to the established models, so that the available time of the current electric quantity can be known.
As shown in fig. 5, an embodiment of the present invention further provides a battery charge available time estimation apparatus 50, including:
a first obtaining module 51, configured to obtain sample values of battery power at different time points during a use process of the battery;
the establishing module 52 is configured to establish an electric quantity change model according to the sampling values of the battery electric quantity at different time points and the variation between the sampling values;
and a second obtaining module 53, configured to obtain, according to the electric quantity change model, an available duration of the remaining electric quantity after the battery electric quantity is sampled at the last time point.
The first obtaining module 51 is specifically configured to: and obtaining the sampling values of the battery capacity at least two adjacent time points in the use process of the battery, wherein the sampling value of the last time point of the at least two adjacent time points is the latest sampling value.
Wherein the first obtaining module 51 comprises:
the first obtaining submodule is used for obtaining a first sampling value of the battery electric quantity and a first time point when the first sampling value is obtained in the using process of the battery;
and the second obtaining submodule is used for obtaining a second sampling value of the battery capacity and a second time point when the second sampling value is obtained in the process of continuously using the battery.
Wherein the establishing module is specifically configured to: and establishing a connecting line connecting a first point determined by the first time point and the first sampling value and a second point determined by the second time point and the second sampling value in a coordinate system taking time as a horizontal axis and electric quantity as a vertical axis.
Wherein the second obtaining module is specifically configured to: acquiring an intersection point of the connecting line and the transverse axis according to the connecting line; and obtaining the time length from the second time point to the time point corresponding to the intersection point.
Wherein the first obtaining module 51 further comprises:
and the third obtaining submodule is used for obtaining a third sampling value of the battery capacity and a third time point when the third sampling value is obtained in the process of continuously using the battery.
Wherein the establishing module 52 is specifically configured to: and establishing a connecting line connecting a first point determined by the first time point and the first sampling value, a second point determined by the second time point and the second sampling value and a third point determined by the third time and the third sampling value in a coordinate system taking time as a horizontal axis and electric quantity as a vertical axis.
The second obtaining module 53 is specifically configured to: acquiring an intersection point of the connecting line and the transverse axis according to the connecting line; and obtaining the time length from the third time point to the time point corresponding to the intersection point.
It should be noted that: the embodiment of the apparatus corresponds to the method described above, and in the method described above, the power variation model and the corresponding calculation method of the remaining power shown in fig. 2, 3, and 4 are all applicable to the embodiment of the apparatus, and the same technical effect can be achieved, which is not described herein again.
In addition, the embodiment of the invention also provides a mobile device which comprises the device. The mobile device can be a smart phone, and the device is arranged in a battery power management module of the mobile device.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.