CN110687991B - Power supply method, device, equipment and storage medium - Google Patents

Power supply method, device, equipment and storage medium Download PDF

Info

Publication number
CN110687991B
CN110687991B CN201910834153.9A CN201910834153A CN110687991B CN 110687991 B CN110687991 B CN 110687991B CN 201910834153 A CN201910834153 A CN 201910834153A CN 110687991 B CN110687991 B CN 110687991B
Authority
CN
China
Prior art keywords
battery
time period
application program
electric quantity
electronic equipment
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
CN201910834153.9A
Other languages
Chinese (zh)
Other versions
CN110687991A (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.)
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 CN201910834153.9A priority Critical patent/CN110687991B/en
Publication of CN110687991A publication Critical patent/CN110687991A/en
Application granted granted Critical
Publication of CN110687991B publication Critical patent/CN110687991B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/263Arrangements for using multiple switchable power supplies, e.g. battery and AC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/30Means for acting in the event of power-supply failure or interruption, e.g. power-supply fluctuations

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Secondary Cells (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The embodiment of the application discloses a power supply method, which is applied to electronic equipment, wherein the electronic equipment comprises a first battery and a second battery; the method comprises the following steps: powering an electronic device using a first battery of the electronic device; determining the estimated power consumption of an application program on the electronic equipment in a preset time period; and when the estimated power consumption is larger than the electric quantity of the first battery and smaller than or equal to the electric quantity of a second battery of the electronic equipment, switching to use the second battery to supply power to the electronic equipment. The embodiment of the application also discloses a power supply device, equipment and a storage medium.

Description

Power supply method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to electronic technology, and relates to but is not limited to a power supply method, a power supply device, equipment and a storage medium.
Background
At present, with the wide use and development of various intelligent terminals, the dependence degree of a user on the intelligent terminal is higher and higher, and the use frequency of the terminal is also higher and higher. In order to increase the charging rate of the terminal and to increase the endurance of the terminal battery, a plurality of batteries may be provided in the terminal. With the emergence and development of the fast charging technology, two batteries arranged on a terminal generally include a fast charging battery and a common battery, the working parameters of the two batteries are different, and the charging rates are also different.
The graphene battery is a new energy battery developed by utilizing the characteristic that lithium ions rapidly shuttle in large quantities between the graphene surface and an electrode, and is called monoatomic layer graphite. The graphene battery has the characteristics of high conductivity, high strength, ultra-light weight and the like. Compared with a lithium battery, the graphene battery is much better than the lithium battery, especially in the aspects of dynamic characteristics, electric capacity, service life and the like of the battery.
However, when a user uses some functions of the terminal, for example, when watching a video, the power is often insufficient, so that the user cannot watch the entire video. Therefore, how to solve the problems of single battery power supply mode and poor operation performance of the terminal becomes a key point of attention of those skilled in the art.
Disclosure of Invention
In view of this, embodiments of the present application provide a power supply method and apparatus, a device, and a storage medium.
The technical scheme of the embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a power supply method, which is applied to an electronic device, where the electronic device includes a first battery and a second battery; the method comprises the following steps:
powering an electronic device using a first battery of the electronic device;
determining the estimated power consumption of an application program on the electronic equipment in a preset time period;
and when the estimated power consumption is larger than the electric quantity of the first battery and smaller than or equal to the electric quantity of a second battery of the electronic equipment, switching to use the second battery to supply power to the electronic equipment.
In this application example, the method further includes:
when the estimated power consumption is larger than the electric quantity of the first battery and larger than the electric quantity of the second battery, sending first prompt information, wherein the first prompt information is used for prompting a user to charge the second battery;
determining the power supply duration corresponding to the first battery at the current moment according to the estimated power consumption and the electric quantity of the first battery;
and when the running duration of the application program from the current moment is equal to the power supply duration, switching to use the second battery to supply power to the electronic equipment.
In this application example, the method further includes:
when the display screen of the electronic equipment is a folding screen, the application program is displayed on a first screen and a second screen of the folding screen together, the estimated power consumption is larger than the electric quantity of the first battery, and the estimated power consumption is larger than the electric quantity of the second battery, the application program is arranged on the first screen for display;
in an embodiment of the present application, the method further includes:
determining the electric quantity of the first battery and the second battery;
and powering the first screen by using the battery with higher electric quantity in the first battery and the second battery.
In this application example, the method further includes:
when the estimated power consumption is larger than the electric quantity of the first battery and larger than the electric quantity of the second battery, determining resource information of the application program;
determining a first operation time period and a second operation time period corresponding to the application program according to the resource information;
and if the application program runs in the running time period with larger unit power consumption in the first running time period and the second running time period, using the battery with higher power in the first battery and the second battery to supply power to the electronic equipment.
In this application example, the method further includes:
and if the application program runs in the running time period with smaller unit power consumption in the first running time period and the second running time period, using the battery with lower power in the first battery and the second battery to supply power to the electronic equipment.
In this embodiment, when the function corresponding to the application program is to play a video, the resource information at least includes one of the following: video name, video content, video memory and total video duration;
correspondingly, the determining a first operation time period and a second operation time period corresponding to the application program according to the resource information includes: and determining the playing time period information of the video corresponding to the application program under the first scene and the second scene respectively in a preset time period.
In this application example, the method further includes:
and when the power consumption of the application program is larger than a preset threshold value, the battery with higher electric quantity in the first battery and the second battery is used for supplying power to the electronic equipment.
In a second aspect, an embodiment of the present application provides a power supply apparatus, including:
a power supply unit for supplying power to an electronic device using a first battery of the electronic device;
the determining unit is used for determining the estimated power consumption of the application program on the electronic equipment in a preset time period;
and the power supply switching unit is used for switching to use the second battery to supply power to the electronic equipment when the estimated power consumption is larger than the electric quantity of the first battery and smaller than or equal to the electric quantity of the second battery of the electronic equipment.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program executable on the processor, and the processor implements the steps in the power supply method as described above when executing the program.
In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps in the power supply method as described above.
The embodiment of the application provides a power supply method, a power supply device, equipment and a storage medium, wherein power is supplied to electronic equipment by using a first battery of the electronic equipment; determining the estimated power consumption of an application program on the electronic equipment in a preset time period; when the estimated power consumption is larger than the electric quantity of the first battery and smaller than or equal to the electric quantity of the second battery of the electronic equipment, the second battery is switched to supply power to the electronic equipment, so that the use experience of a user can be improved through intelligent switching between the two batteries, the service life of the batteries is prolonged, and meanwhile the safety performance of the batteries is guaranteed.
Drawings
Fig. 1A is a schematic flow chart of a first implementation of a power supply method according to an embodiment of the present application;
fig. 1B is a schematic diagram of a flow chart of an implementation of the power supply method according to the embodiment of the present application;
fig. 1C is a schematic flow chart illustrating an implementation of the power supply method according to the embodiment of the present application;
fig. 2A is a schematic structural diagram of an electronic device in an embodiment of the present application;
fig. 2B is a schematic flow chart illustrating an implementation of the power supply method according to the embodiment of the present application;
fig. 3 is a schematic structural diagram of a power supply device according to an embodiment of the present application;
fig. 4 is a hardware entity diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will describe the specific technical solutions of the present application in further detail with reference to the accompanying drawings in the embodiments of the present application. The following examples are intended to illustrate the present application only and are not intended to limit the scope of the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning by themselves. Thus, "module", "component" or "unit" may be used mixedly.
The embodiment of the application provides a power supply method, which is applied to electronic equipment, wherein the electronic equipment comprises a first battery and a second battery; the functions implemented by the method can be implemented by calling program code by a processor in a server, but the program code can be stored in a computer storage medium. Fig. 1A is a first schematic flow chart of an implementation process of a power supply method according to an embodiment of the present application, and as shown in fig. 1A, the method includes:
step S101, supplying power to the electronic equipment by using a first battery of the electronic equipment;
here, the electronic device may be various types of devices having information processing capability, such as a mobile phone, a Personal Digital Assistant (PDA), a navigator, a Digital phone, a video phone, a smart watch, a smart band, a wearable device, a tablet computer, a kiosk, and the like.
Step S102, determining the estimated power consumption of an application program on the electronic equipment in a preset time period;
here, the preset time period may be time period information from a current operation time to an operation end time of the application program, for example, when the application program is a certain video type software, the preset time period may be time period information between a time when a user is watching a certain video and the video playing end time. The preset time period may also be time period information that has been preset on an application program, for example, when the application program is a certain chat software, the preset time period may be time period information that has been preset on the chat software by a user.
In this embodiment of the application, the application may be any application on the electronic device, and the estimated power consumption is estimated power consumption of the application within the preset time period. For example, when the application is a certain video type software, the estimated power consumption may be determined by a unit power consumption required by the video and information on a time period from a time when the user is watching the video to a time when the video is played.
And S103, when the estimated power consumption is larger than the electric quantity of the first battery and smaller than or equal to the electric quantity of a second battery of the electronic equipment, switching to use the second battery to supply power to the electronic equipment.
In the embodiment of the present application, the "first" of the "first battery" and the "second" of the "second battery" are only used to distinguish that the two batteries are different batteries, and there is no specific sequence or specific function. That is, in step S101, the first battery may be used to supply power to the electronic device, and the second battery may be used to supply power to the electronic device: if the first battery is used to supply power to the electronic device in step S101, when the estimated power consumption is larger than the power consumption of the first battery and smaller than or equal to the power consumption of the second battery, the second battery is switched to supply power to the electronic device. If the second battery is used to supply power to the electronic device in step S101, the first battery is switched to supply power to the electronic device when the estimated power consumption is larger than the power consumption of the second battery and smaller than or equal to the power consumption of the first battery.
For example, if the first battery is not sufficiently charged to support the viewing of the video, and the second battery is charged to support the viewing of the video, the electronic device is switched to be powered by the second battery. Of course, the first battery may be charged after the switching is completed. The two batteries are charged circularly and supply power, so that the power supply is avoided while charging, and the service life of the batteries is prolonged.
Here, in step S103, when the estimated power consumption amount is greater than the power amount of the first battery and less than or equal to the power amount of a second battery of the electronic device, after switching to supply power to the electronic device using the second battery, the method further includes: and sending prompt information, wherein the prompt information is used for prompting a user to charge the first battery.
In the embodiment of the application, the electronic equipment is powered by using a first battery of the electronic equipment; determining the estimated power consumption of an application program on the electronic equipment in a preset time period; when the estimated power consumption is larger than the electric quantity of the first battery and smaller than or equal to the electric quantity of the second battery of the electronic equipment, the second battery is switched to supply power to the electronic equipment, so that the use experience of a user can be improved through intelligent switching between the two batteries, the service life of the batteries is prolonged, and meanwhile the safety performance of the batteries is guaranteed.
Based on the foregoing embodiments, an embodiment of the present application further provides a power supply method, and fig. 1B is a schematic flow chart illustrating an implementation of the power supply method according to the embodiment of the present application, as shown in fig. 1B, the method includes:
step S111, supplying power to the electronic equipment by using a first battery of the electronic equipment;
step S112, determining the estimated power consumption of the application program on the electronic equipment in a preset time period;
step S113, when the estimated power consumption is larger than the electric quantity of the first battery and larger than the electric quantity of the second battery, sending first prompt information, wherein the first prompt information is used for prompting a user to charge the second battery;
here, when the estimated power consumption is larger than the power consumption of the first battery and the power consumption of the second battery, the electronic device sends a prompt message to prompt the user to charge the second battery. The prompt message can be a voice prompt message, a character prompt message or a light prompt message.
Step S114, determining the power supply duration corresponding to the first battery at the current moment according to the estimated power consumption and the electric quantity of the first battery;
in this embodiment of the application, the power supply duration corresponding to the current time of the first battery may be determined according to the estimated power consumption, the unit power consumption of the application program, and the power consumption of the first battery.
And step S115, when the running time of the application program from the current moment is equal to the power supply time, switching to use the second battery to supply power to the electronic equipment.
Here, the running duration of the application program from the current time is equal to the power supply duration, and may be that when the application program is not running yet, the electric quantity of the first battery is about to be consumed, and at this time, the second battery may be automatically switched to supply power to the electronic device. And simultaneously, finishing the charging of the second battery and starting to charge the first battery.
In the embodiment of the application, the electronic equipment is powered by using a first battery of the electronic equipment; determining the estimated power consumption of an application program on the electronic equipment in a preset time period; when the estimated power consumption is larger than the electric quantity of the first battery and larger than the electric quantity of the second battery, sending first prompt information, wherein the first prompt information is used for prompting a user to charge the second battery; determining the power supply duration corresponding to the first battery at the current moment according to the estimated power consumption and the electric quantity of the first battery; when the running time of the application program from the current moment is equal to the power supply time, the second battery is switched to supply power to the electronic equipment, so that the use experience of a user can be improved through intelligent switching between the two batteries, the service life of the batteries is prolonged, and meanwhile the safety performance of the batteries is guaranteed.
Based on the foregoing embodiment, an embodiment of the present application further provides a power supply method, and fig. 1C is a schematic flow chart illustrating an implementation of the power supply method according to the embodiment of the present application, as shown in fig. 1C, the method includes:
step S121, supplying power to the electronic equipment by using a first battery of the electronic equipment;
step S122, determining the estimated power consumption of the application program on the electronic equipment in a preset time period;
step S123, when the display screen of the electronic equipment is a folding screen, the application program is displayed on a first screen and a second screen of the folding screen together, the estimated power consumption is larger than the electric quantity of the first battery, and the estimated power consumption is larger than the electric quantity of the second battery, the application program is set on the first screen to be displayed;
in the embodiment of the application, the electronic device may be a mobile phone with a foldable screen, and the application program may be video playing software. Correspondingly, the application program is displayed on the first screen and the second screen of the folding screen together, and the video in the application program can be played on the spliced large screen after the first screen and the second screen are spliced into the large screen.
Here, when it is greater than to estimate power consumption the electric quantity of first battery just is greater than the electric quantity of second battery, that is to say, no matter use first battery or second battery right the large screen power supply after the concatenation, when can't having watched whole video, then can with the video playback interface setting that the application corresponds shows on the main screen of concatenation screen, and the suggestion user is automatic after with vice screen folding to it is right to choose for use the higher battery of electric quantity in first battery and the second battery first screen power supply.
Step S124, determining the electric quantity of the first battery and the second battery;
and step S125, supplying power to the first screen by using the battery with higher electric quantity in the first battery and the second battery.
Here, after the step S125 of supplying power to the first screen by using the battery with the higher power of the first battery and the second battery, the method further includes: and sending prompt information, wherein the prompt information is used for prompting a user to charge the battery with lower electric quantity in the first battery and the second battery.
In the embodiment of the application, the electronic equipment is powered by using a first battery of the electronic equipment; determining the estimated power consumption of an application program on the electronic equipment in a preset time period; when the display screen of the electronic equipment is a folding screen, the application program is displayed on a first screen and a second screen of the folding screen together, the estimated power consumption is larger than the electric quantity of the first battery, and the estimated power consumption is larger than the electric quantity of the second battery, the application program is arranged on the first screen for display; determining the electric quantity of the first battery and the second battery; the battery that the electric quantity is higher in using first battery and the second battery is right first screen power supply, so, can improve user's use through the intelligence switching between two batteries and experience, increase the life of battery, guarantee the security performance of battery simultaneously.
Based on the foregoing embodiment, an embodiment of the present application further provides a power supply method, where the method includes:
step S131, supplying power to the electronic equipment by using a first battery of the electronic equipment;
step S132, determining the estimated power consumption of the application program on the electronic equipment in a preset time period;
step S133, when the estimated power consumption is larger than the power of the first battery and larger than the power of the second battery, determining resource information of the application program;
here, when the application is video playing software, the resource information of the application may be a video name, video content, total duration of video, and the like corresponding to the video being watched by the user. When the application is a game application, the resource information of the application may be a game name, a game scene, game content, a game role, and the like corresponding to a game being operated by the user.
Step S134, determining a first operation time period and a second operation time period corresponding to the application program according to the resource information;
for example, when the user is watching a video, the first operation time period may be a time period in which the video content operates in a daytime scene, and the second operation time period may be a time period in which the video content operates in a nighttime scene, so that the nighttime scene requires low screen brightness and low power consumption, and the daytime scene requires high screen brightness and high power consumption.
And step S135, if the application program runs in the running time period with larger unit power consumption in the first running time period and the second running time period, using the battery with higher power consumption in the first battery and the second battery to supply power to the electronic equipment.
For example, when the content of the video playing is a daytime scene, the electronic device may be powered by the battery with the higher power of the first battery and the second battery.
In the embodiment of the application, the electronic equipment is powered by using a first battery of the electronic equipment; determining the estimated power consumption of an application program on the electronic equipment in a preset time period; when the estimated power consumption is larger than the electric quantity of the first battery and larger than the electric quantity of the second battery, determining resource information of the application program; determining a first operation time period and a second operation time period corresponding to the application program according to the resource information; if the application program runs in the running time period with larger unit power consumption in the first running time period and the second running time period, the electronic equipment is powered by the battery with higher power consumption in the first battery and the second battery, so that the use experience of a user can be improved through intelligent switching between the two batteries, the service life of the battery is prolonged, and meanwhile, the safety performance of the battery is guaranteed.
Based on the foregoing embodiment, an embodiment of the present application further provides a power supply method, where the method includes:
step S141, supplying power to the electronic equipment by using a first battery of the electronic equipment;
step S142, determining the estimated power consumption of the application program on the electronic equipment in a preset time period;
step S143, when the estimated power consumption is larger than the power of the first battery and larger than the power of the second battery, determining resource information of the application program;
here, when the application is video playing software, the resource information of the application may be a video name, video content, total duration of video, and the like corresponding to the video being watched by the user. When the application is a game application, the resource information of the application may be a game name, a game scene, game content, a game role, and the like corresponding to a game being operated by the user.
Step S144, determining a first operation time period and a second operation time period corresponding to the application program according to the resource information;
for example, when the user is watching a video, the first operation time period may be a time period in which the video content operates in a daytime scene, and the second operation time period may be a time period in which the video content operates in a nighttime scene, so that the nighttime scene requires low screen brightness and low power consumption, and the daytime scene requires high screen brightness and high power consumption.
And step S145, if the application program runs in the running time period with smaller unit power consumption in the first running time period and the second running time period, using the battery with lower power consumption in the first battery and the second battery to supply power to the electronic equipment.
For example, when the content of the video playing is a night scene, the electronic device may be powered by a battery with a lower power of the first battery and the second battery.
In some embodiments, when the function corresponding to the application program is to play a video, the resource information includes at least one of: video name, video content, video memory and total video duration;
correspondingly, the determining a first operation time period and a second operation time period corresponding to the application program according to the resource information includes: and according to the resource information, determining the playing time period information of the video corresponding to the application program under the first scene and the second scene respectively in a preset time period.
For example, when the user is watching a video, the first scene may be a scene in which the video content is day, and the second scene may be a scene in which the video content is night. At this time, the battery with the corresponding electric quantity can be selected to supply power to different scene playing moments according to the time period information of video operation.
In the embodiment of the application, the electronic equipment is powered by using a first battery of the electronic equipment; determining the estimated power consumption of an application program on the electronic equipment in a preset time period; when the estimated power consumption is larger than the electric quantity of the first battery and larger than the electric quantity of the second battery, determining resource information of the application program; determining a first operation time period and a second operation time period corresponding to the application program according to the resource information; if the application program runs in the running time period with smaller unit power consumption in the first running time period and the second running time period, the electronic equipment is powered by the battery with lower power consumption in the first battery and the second battery, so that the use experience of a user can be improved through intelligent switching between the two batteries, the service life of the battery is prolonged, and meanwhile, the safety performance of the battery is guaranteed.
Based on the foregoing embodiment, an embodiment of the present application further provides a power supply method, where the method includes:
step S151, supplying power to the electronic equipment by using a first battery of the electronic equipment;
step S152, determining the estimated power consumption of the application program on the electronic equipment in a preset time period;
step S153, when the estimated power consumption is larger than the power of the first battery and larger than the power of the second battery, determining resource information of the application program; when the function corresponding to the application program is playing a video, the resource information at least comprises one of the following: video name, video content, video memory and total video duration;
step S154, according to the resource information, determining the playing time period information of the video corresponding to the application program under the first scene and the second scene respectively in a preset time period;
for example, when the user is watching a video, the first scene may be a scene in which the video content is day, and the second scene may be a scene in which the video content is night. Correspondingly, in a preset time period, the playing time period information of the videos corresponding to the multiple applications in the first scene may be included, or the playing time period information of the videos corresponding to the multiple applications in the second scene may be included, and at this time, the battery corresponding to the electric quantity may be selected to supply power to the different scene playing time periods according to the playing time period information in the first scene and the playing time period information in the second scene.
And step S155, if the application program runs in the running time period with larger unit power consumption in the first running time period and the second running time period, using the battery with higher power consumption in the first battery and the second battery to supply power to the electronic equipment.
In some embodiments, the method further comprises: and if the application program runs in the running time period with smaller unit power consumption in the first running time period and the second running time period, using the battery with lower power in the first battery and the second battery to supply power to the electronic equipment.
In the embodiment of the application, the electronic equipment is powered by using a first battery of the electronic equipment; determining the estimated power consumption of an application program on the electronic equipment in a preset time period; when the estimated power consumption is larger than the electric quantity of the first battery and larger than the electric quantity of the second battery, determining resource information of the application program; when the function corresponding to the application program is playing a video, the resource information at least comprises one of the following: video name, video content, video memory and total video duration; according to the resource information, determining playing time period information of the video corresponding to the application program under a first scene and a second scene respectively in a preset time period; if the application program runs in the running time period with larger unit power consumption in the first running time period and the second running time period, the electronic equipment is powered by the battery with higher power consumption in the first battery and the second battery, so that the watching experience of a user can be improved through intelligent switching between the two batteries, the service life of the battery is prolonged, and meanwhile, the safety performance of the battery is guaranteed.
Based on the foregoing embodiments, a power supply method is further provided in an embodiment of the present application, where fig. 2A is a schematic diagram of a composition structure of an electronic device in an embodiment of the present application, and as shown in fig. 2A, a first battery 11 and a second battery 12 are disposed in the electronic device 200, and the first battery 11 and the second battery 12 may supply power to the electronic device 200 at different times or may supply power to different hardware facilities in the electronic device 200 at the same time. Fig. 2B is a schematic view of a fourth implementation flow of the power supply method according to the embodiment of the present application, as shown in fig. 2B, the method includes:
step S201, when the electronic equipment is used for watching a video, acquiring the remaining watching time length of the video and the current unit power consumption;
step S202, acquiring the residual capacity of a first battery for supplying power to the electronic equipment;
step S203, determining whether the residual electric quantity supports the completion of the watching of the video according to the residual watching time length, the unit electric consumption and the residual electric quantity;
step S204, if the residual capacity can not support the completion of the watching of the video, switching to use a second battery to supply power to the electronic equipment so as to complete the watching of the video;
here, if the remaining power can support the video being viewed, the video is continuously viewed normally.
And step S205, charging the first battery.
In some embodiments, the method further comprises:
step S21a, if the electric quantity of the second battery can not support the watching of the video, when the first battery is used for supplying power, the second battery is prompted to be charged first;
step S22a, determining a viewable duration corresponding to the first battery according to the remaining capacity of the first battery, and automatically switching to the second battery for supplying power when the viewable duration is over.
In some embodiments, the method further comprises:
step S21b, if the video is watched through the folding screen electronic equipment at present and the residual electric quantity of the two batteries can not watch the whole video, automatically folding the folding screen and putting the video on a main screen for watching;
step S22b, put the backstage application to vice screen, and adopt the more battery of electric quantity to right main screen power supply when the electric quantity of battery exhausts, adopt another piece of battery to right main screen power supply.
In some embodiments, the method further comprises:
step S21c, when watching the video, acquiring a video resource corresponding to the video;
for example, the video assets include: video name, video memory, total video duration, etc.
Step S22c, analyzing the video resource, and determining a plurality of first video frames corresponding to a first scene and a plurality of second video frames corresponding to a second scene, wherein the first scene is a day scene and the second scene is a night scene;
step S23c, determining a plurality of first time periods corresponding to the first scene based on the plurality of first video frames, and determining a plurality of second time periods corresponding to the second scene based on the plurality of second video frames;
step S24c, obtaining remaining capacities of the first battery and the second battery, and if the remaining capacity of the first battery is greater than the remaining capacity of the second battery, supplying power to the video segments corresponding to the first time periods by using the first battery, and supplying power to the video segments corresponding to the second time periods by using the second battery.
Here, because the screen luminance of night scene is low, so the low power dissipation can adopt the battery of low-power to supply power to the surplus electric quantity of rational utilization two batteries makes the utilization ratio of battery electric quantity reach the maximize.
In some embodiments, the method further comprises:
step S21d is to switch the charging mode to charge the first battery if the second battery is switched to supply power when charging the second battery.
Here, through to two blocks of batteries circulation charge, the power supply avoids supplying power while charging, improves the life of battery.
In some embodiments, the method further comprises:
step S21e, when the two batteries are fully charged, acquiring a current running program;
and step S22e, if the power consumption of the running program is larger than a preset threshold value, a battery with larger battery capacity is adopted for supplying power.
Here, the current running program may include a front-end running program and a background running program. The preset threshold may be set by a user, or may be set in advance by a manufacturer of the electronic device or a developer of the application program.
In the embodiment of the application, when watching a video, the residual capacity of the power supply battery is acquired, whether the residual capacity can support the video watching is determined, if not, the other battery is switched to supply power, so that the two batteries can be intelligently switched, the watching experience of a user is improved, the service life of the battery is prolonged, and meanwhile, the safety performance of the battery is guaranteed.
Based on the foregoing embodiments, the present application provides a power supply apparatus, which includes units, modules included in the units, and components included in the modules, and may be implemented by a processor in an electronic device; of course, the implementation can also be realized through a specific logic circuit; in the implementation process, the processor may be a Central Processing Unit (CPU), a Microprocessor Unit (MPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or the like.
Fig. 3 is a schematic structural diagram of a power supply apparatus according to an embodiment of the present application, and as shown in fig. 3, the apparatus 300 includes:
a power supply unit 301 for supplying power to an electronic apparatus using a first battery of the electronic apparatus;
a determining unit 302, configured to determine an estimated power consumption of an application on the electronic device within a preset time period;
and a power supply switching unit 303, configured to switch to use the second battery to supply power to the electronic device when the estimated power consumption is greater than the power consumption of the first battery and less than or equal to the power consumption of the second battery of the electronic device.
In some embodiments, the apparatus further comprises:
the prompting unit is used for sending first prompting information when the estimated power consumption is larger than the electric quantity of the first battery and larger than the electric quantity of the second battery, and the first prompting information is used for prompting a user to charge the second battery;
the time length determining unit is used for determining the power supply time length corresponding to the current time of the first battery according to the estimated power consumption and the electric quantity of the first battery;
the power supply switching unit 303 is further configured to switch to use the second battery to supply power to the electronic device when the running duration of the application program from the current time is equal to the power supply duration.
In some embodiments, the apparatus further comprises:
the setting unit is used for setting the application program on the first screen for display when the display screen of the electronic equipment is a folding screen, the application program is displayed on the first screen and the second screen of the folding screen together, the estimated power consumption is larger than the electric quantity of the first battery, and the estimated power consumption is larger than the electric quantity of the second battery;
the electric quantity determining unit is used for determining the electric quantities of the first battery and the second battery;
and the power supply selection unit is used for supplying power to the first screen by using the battery with higher electric quantity in the first battery and the second battery.
In some embodiments, the apparatus further comprises:
the resource determining unit is used for determining resource information of the application program when the estimated power consumption is larger than the power of the first battery and larger than the power of the second battery;
the time determining unit is used for determining a first operation time period and a second operation time period corresponding to the application program according to the resource information;
the power supply selection unit is further configured to use a battery with a higher electric quantity in the first battery and the second battery to supply power to the electronic device if the application program runs in the running time period with a higher unit electric quantity in the first running time period and the second running time period.
In some embodiments, the power supply selection unit is further configured to, if the application program runs in the running time period with smaller unit power consumption in the first running time period and the second running time period, use a battery with lower power consumption in the first battery and the second battery to supply power to the electronic device.
In some embodiments, when the function corresponding to the application program is to play a video, the resource information includes at least one of: video name, video content, video memory and total video duration;
correspondingly, the time determination unit includes:
and the time determining module is used for determining the playing time period information of the video corresponding to the application program under the first scene and the second scene respectively in a preset time period according to the resource information.
In some embodiments, the power supply selection unit is further configured to, when the power consumption of the application program is greater than a preset threshold, use a battery with a higher power of the first battery and the second battery to supply power to the electronic device.
The above description of the apparatus embodiments, similar to the above description of the method embodiments, has similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be noted that, in the embodiment of the present application, if the power supply method is implemented in the form of a software functional module and sold or used as a standalone product, the power supply method may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for causing an electronic device (which may be a personal computer, a server, etc.) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the present application are not limited to any specific combination of hardware and software.
Correspondingly, an embodiment of the present application provides an electronic device, which includes a memory and a processor, where the memory stores a computer program that can be executed on the processor, and the processor executes the computer program to implement the steps in the power supply method provided in the foregoing embodiment.
Correspondingly, the embodiment of the present application provides a readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps in the power supply method.
Here, it should be noted that: the above description of the storage medium and device embodiments is similar to the description of the method embodiments above, with similar advantageous effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and apparatus of the present application, reference is made to the description of the embodiments of the method of the present application for understanding.
It should be noted that fig. 4 is a schematic diagram of a hardware entity of an electronic device according to an embodiment of the present application, and as shown in fig. 4, the hardware entity of the electronic device 400 includes: a processor 401, a communication interface 402 and a memory 403, wherein
The processor 401 generally controls the overall operation of the electronic device 400.
The communication interface 402 may enable the electronic device 400 to communicate with other terminals or servers via a network.
The Memory 403 is configured to store instructions and applications executable by the processor 401, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by the processor 401 and modules in the electronic device 400, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all functional units in the embodiments of the present application may be integrated into one processing module, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit. Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable Memory device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk.
The methods disclosed in the several method embodiments provided in the present application may be combined arbitrarily without conflict to obtain new method embodiments.
Features disclosed in several of the product embodiments provided in the present application may be combined in any combination to yield new product embodiments without conflict.
The features disclosed in the several method or apparatus embodiments provided in the present application may be combined arbitrarily, without conflict, to arrive at new method embodiments or apparatus embodiments.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A power supply method is applied to electronic equipment, and the electronic equipment comprises a first battery and a second battery; the method comprises the following steps:
powering an electronic device using a first battery of the electronic device;
determining the estimated power consumption of an application program on the electronic equipment in a preset time period;
when the estimated power consumption is larger than the electric quantity of the first battery and smaller than or equal to the electric quantity of a second battery of the electronic equipment, switching to use the second battery to supply power to the electronic equipment;
when the estimated power consumption is larger than the electric quantity of the first battery and larger than the electric quantity of the second battery, determining resource information of the application program;
determining a first operation time period and a second operation time period corresponding to the application program according to the resource information;
and if the application program runs in the running time period with larger unit power consumption in the first running time period and the second running time period, using the battery with higher power in the first battery and the second battery to supply power to the electronic equipment.
2. The method of claim 1, further comprising:
when the estimated power consumption is larger than the electric quantity of the first battery and larger than the electric quantity of the second battery, sending first prompt information, wherein the first prompt information is used for prompting a user to charge the second battery;
determining the power supply duration corresponding to the first battery at the current moment according to the estimated power consumption and the electric quantity of the first battery;
and when the running duration of the application program from the current moment is equal to the power supply duration, switching to use the second battery to supply power to the electronic equipment.
3. The method of claim 1, further comprising:
when the display screen of the electronic equipment is a folding screen, the application program is displayed on a first screen and a second screen of the folding screen together, the estimated power consumption is larger than the electric quantity of the first battery, and the estimated power consumption is larger than the electric quantity of the second battery, the application program is set on the first screen for display.
4. The method of claim 3, further comprising:
determining the electric quantity of the first battery and the second battery;
and powering the first screen by using the battery with higher electric quantity in the first battery and the second battery.
5. The method of claim 1, further comprising:
and if the application program runs in the running time period with smaller unit power consumption in the first running time period and the second running time period, using the battery with lower power in the first battery and the second battery to supply power to the electronic equipment.
6. The method according to claim 1 or 5,
when the function corresponding to the application program is playing video, the resource information at least comprises one of the following: video name, video content, video memory and total video duration;
correspondingly, the determining a first operation time period and a second operation time period corresponding to the application program according to the resource information includes: and according to the resource information, determining the playing time period information of the video corresponding to the application program under the first scene and the second scene respectively in a preset time period.
7. The method of claim 1, further comprising:
and when the power consumption of the application program is larger than a preset threshold value, the battery with higher electric quantity in the first battery and the second battery is used for supplying power to the electronic equipment.
8. A power supply apparatus, characterized in that the apparatus comprises:
a power supply unit for supplying power to an electronic device using a first battery of the electronic device;
the determining unit is used for determining the estimated power consumption of the application program on the electronic equipment in a preset time period;
the power supply switching unit is used for switching to use a second battery to supply power to the electronic equipment when the estimated power consumption is larger than the electric quantity of the first battery and smaller than or equal to the electric quantity of the second battery of the electronic equipment;
the resource determining unit is used for determining resource information of the application program when the estimated power consumption is larger than the power of the first battery and larger than the power of the second battery;
the time determining unit is used for determining a first operation time period and a second operation time period corresponding to the application program according to the resource information;
the power supply selection unit is further configured to use a battery with a higher electric quantity in the first battery and the second battery to supply power to the electronic device if the application program runs in the running time period with a higher unit electric quantity in the first running time period and the second running time period.
9. An electronic device comprising a memory and a processor, the memory storing a computer program operable on the processor, wherein the processor implements the steps in the power supply method according to any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the power supply method according to any one of claims 1 to 7.
CN201910834153.9A 2019-09-04 2019-09-04 Power supply method, device, equipment and storage medium Active CN110687991B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910834153.9A CN110687991B (en) 2019-09-04 2019-09-04 Power supply method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910834153.9A CN110687991B (en) 2019-09-04 2019-09-04 Power supply method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110687991A CN110687991A (en) 2020-01-14
CN110687991B true CN110687991B (en) 2021-01-26

Family

ID=69107853

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910834153.9A Active CN110687991B (en) 2019-09-04 2019-09-04 Power supply method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110687991B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645979A (en) * 2008-08-06 2010-02-10 比亚迪股份有限公司 Method, system and mobile terminal for switching working modes of mobile terminal
KR20240069820A (en) * 2014-02-28 2024-05-20 가부시키가이샤 한도오따이 에네루기 켄큐쇼 Electronic device
CN106532902B (en) * 2016-10-14 2019-12-10 惠州Tcl移动通信有限公司 double-battery control device and method for mobile terminal
CN106774774B (en) * 2016-11-30 2020-01-10 北京小米移动软件有限公司 Method and device for displaying electric quantity of terminal battery
JP7148553B2 (en) * 2018-01-18 2022-10-05 ソニーセミコンダクタソリューションズ株式会社 Power control circuits and electronics
CN108810226A (en) * 2018-06-22 2018-11-13 维沃移动通信有限公司 A kind of electricity method for early warning and mobile terminal

Also Published As

Publication number Publication date
CN110687991A (en) 2020-01-14

Similar Documents

Publication Publication Date Title
CN102609237B (en) Extendible generating random number
CN105262155B (en) A kind of charging method and device
US20220311061A1 (en) Charging method, electronic device and storage medium
US20110109613A1 (en) Mobile device, battery pack, semiconductor device, display control method, and display control program
CN107425564B (en) Intelligent charging method and device and electronic equipment
EP3193179B1 (en) Electric quantity detection method and apparatus, terminal and storage medium
US10903665B2 (en) Usage data based battery charge or discharge time determination
CN102005620A (en) Terminal and method for managing electric quantity of terminal battery
CN108988467B (en) Power utilization strategy generation method and device
WO2022218046A1 (en) Battery charging method and electronic device
CN106210806A (en) The video broadcasting method of mobile terminal, device, processing method, background server
CN103731737B (en) A kind of video information update method and electronic equipment
EP3985627A1 (en) Shared charger cabinet and ejection control method therefor
CN110687991B (en) Power supply method, device, equipment and storage medium
CN104348140A (en) Low electric quantity prompting method and electronic equipment
CN111293748A (en) Method and device for monitoring electric quantity data
JP2020124059A (en) Charge control device and charge control system
CN111600355B (en) Charging control method, device and equipment
CN112448429B (en) Control method, terminal and computer storage medium
CN110427092B (en) Battery switching method, device, terminal and computer readable storage medium
CN110493857B (en) Battery using method, device, terminal and storage medium
CN114142110A (en) Battery control method, device, electronic equipment and storage medium
CN110676521B (en) Battery management method, device, storage medium and electronic equipment
CN110970944B (en) Power supply method and device of split terminal, terminal and storage medium
CN111431247A (en) Charging control method, charging control device, electronic device and 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
GR01 Patent grant
GR01 Patent grant