CN110225167B - Terminal and processing method - Google Patents

Terminal and processing method Download PDF

Info

Publication number
CN110225167B
CN110225167B CN201910630822.0A CN201910630822A CN110225167B CN 110225167 B CN110225167 B CN 110225167B CN 201910630822 A CN201910630822 A CN 201910630822A CN 110225167 B CN110225167 B CN 110225167B
Authority
CN
China
Prior art keywords
battery
terminal
main battery
target application
power consumption
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
CN201910630822.0A
Other languages
Chinese (zh)
Other versions
CN110225167A (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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications 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
Priority claimed from CN201910047190.5A external-priority patent/CN109802457A/en
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Publication of CN110225167A publication Critical patent/CN110225167A/en
Application granted granted Critical
Publication of CN110225167B publication Critical patent/CN110225167B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components
    • H04M1/0262Details of the structure or mounting of specific components for a battery compartment
    • 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/36Arrangements using end-cell switching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/026Details of the structure or mounting of specific components

Abstract

The invention discloses a terminal and a processing method, wherein the terminal comprises the following steps: an input unit configured to receive a touch operation from a user; a display unit configured to display a user interface; and a processor coupled with the input unit and the display unit, the terminal further including a host and a main battery, the terminal being connected with a sub-battery, the processor being configured to: determining that a target application program is started; if the main battery is determined to supply power to the host, calculating the power consumption of the target application program on the main battery; if the secondary battery is determined to supply power to the host, calculating the power consumption of the target application program on the secondary battery; and displaying the power consumption of the target application program on the main battery and the auxiliary battery respectively on a user interface. According to the invention, the user can visually see the power consumption of the target application program on the main battery and the auxiliary battery, and the experience of the user in operating the terminal is improved.

Description

Terminal and processing method
The application claims priority of chinese patent application filed in 2019 on 18 th month, 1 and 201910047190.5, entitled "an electronic device and a charging method thereof", and chinese patent application filed in 2019 on 26 th month, 4 and 26 th month, 201910346383.0, entitled "terminal and processing method", the entire contents of which are incorporated herein by reference.
Technical Field
The present invention relates to the field of communications, and in particular, to a terminal and a processing method.
Background
With the technical development and wide use of various intelligent terminals, the dependence degree of users on the intelligent terminals is higher and higher, and the use frequency is higher and higher. Because the energy density of the battery is not a major breakthrough all the time, the method for charging the intelligent terminal by utilizing the mobile power supplies such as the charger and the like becomes a common method for improving the endurance of the intelligent terminal.
Disclosure of Invention
The exemplary embodiment of the invention provides a terminal and a processing method, which can improve the user experience of using the terminal.
According to an aspect of the exemplary embodiments, there is provided a terminal including:
an input unit configured to receive a touch operation from a user;
a display unit configured to display a user interface; and
a processor coupled with the input unit and the display unit; the terminal also comprises a host and a main battery, the terminal is connected with an auxiliary battery,
the processor is configured to:
determining that a target application program is started;
if the main battery is determined to supply power to the host, calculating the power consumption of the target application program on the main battery;
if the secondary battery is determined to supply power to the host, calculating the power consumption of the target application program on the secondary battery;
and displaying the power consumption of the target application program on the main battery and the auxiliary battery respectively on a user interface.
In some exemplary embodiments, the calculating the power consumption of the target application on the main battery specifically includes:
determining a hardware module called by the target application program during running;
and calculating the power consumption of the target application program on the main battery according to the called time length of the hardware module and the power consumption of the hardware module in unit time.
In some exemplary embodiments, the calculating the power consumption of the target application on the secondary battery specifically includes:
determining a hardware module called by the target application program during running;
and calculating the power consumption of the target application program on the secondary battery according to the called time length of the hardware module and the power consumption of the hardware module per unit time.
In some exemplary embodiments, the target application invokes at least two hardware modules during runtime.
In some exemplary embodiments, the hardware module is a CPU, a camera module, a bluetooth module, a WIFI module, or an audio module.
In some exemplary embodiments, the target application is a system application.
In some exemplary embodiments, the target application is a third party application.
In some exemplary embodiments, the terminal is connected to the secondary battery through a rear pin contact interface.
According to another aspect of the exemplary embodiments, there is provided a processing method including: at a terminal having one or more processors, a memory, an input unit, a display unit, a main battery, and a host:
determining that a target application program is started;
if the main battery is determined to supply power to the host, calculating the power consumption of the target application program on the main battery;
if the secondary battery connected with the terminal is determined to supply power to the host, calculating the power consumption of the target application program on the secondary battery;
and displaying the power consumption of the target application program on the main battery and the auxiliary battery respectively on a user interface.
According to a further aspect of the exemplary embodiments, there is provided a computer storage medium having stored therein computer program instructions which, when run on a computer, cause the computer to perform a processing method as described above.
On the basis of the common knowledge in the field, the above preferred conditions can be combined randomly to obtain the preferred embodiments of the invention.
The positive progress effects of the invention are as follows: in the invention, the target application program is determined to be started; if the main battery is determined to supply power to the host, calculating the power consumption of the target application program on the main battery; if the secondary battery is determined to supply power to the host, calculating the power consumption of the target application program on the secondary battery; and the power consumption of the target application program on the main battery and the auxiliary battery respectively is displayed on a user interface, so that a user can visually see the power consumption of the target application program on the main battery and the auxiliary battery, and the experience of the user in operating the terminal is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 schematically illustrates a structure of a terminal according to an embodiment of the present invention.
Fig. 2 is a schematic diagram illustrating a user interface on a terminal provided by an embodiment of the present invention.
Fig. 3 (a) schematically shows a structure diagram of a back side of a terminal provided by an embodiment of the present invention.
Fig. 3 (b) schematically shows a structural diagram of the front side of the terminal provided by the embodiment of the invention.
Fig. 4 (a) schematically illustrates a structural diagram of a front side of a back-clip battery provided by an embodiment of the invention.
Fig. 4 (b) schematically shows a structural diagram of the back side of the back-clip battery provided by the embodiment of the invention.
Fig. 5 (a) is a schematic structural view schematically illustrating the front side of a terminal with a mounted back-clip battery provided by an embodiment of the present invention.
Fig. 5 (b) is a schematic structural view schematically illustrating the back surface of the terminal with the back-clip-mounted battery provided by the embodiment of the present invention.
Fig. 6 exemplarily shows a schematic diagram in which the display unit 140 displays a dual battery management interface.
Fig. 7 is a flowchart illustrating a processing method according to an embodiment of the present invention.
Fig. 8 is a flow chart illustrating a processing method according to another embodiment of the present invention.
Fig. 9 illustrates a schematic diagram of a user interface showing power consumption of the display unit 140 application on the sub-battery.
Fig. 10 illustrates a schematic diagram of a user interface showing power consumption of the display unit 140 application on the sub-battery.
Detailed Description
To make the objects, technical solutions and advantages of the exemplary embodiments of the present application clearer, the technical solutions in the exemplary embodiments of the present application will be clearly and completely described below with reference to the drawings in the exemplary embodiments of the present application, and it is obvious that the described exemplary embodiments are only a part of the embodiments of the present application, but not all the embodiments.
All other embodiments, which can be derived by a person skilled in the art from the exemplary embodiments shown in the present application without inventive effort, shall fall within the scope of protection of the present application. Moreover, while the disclosure herein has been presented in terms of exemplary one or more examples, it is to be understood that each aspect of the disclosure can be utilized independently and separately from other aspects of the disclosure to provide a complete disclosure.
It should be understood that the terms "first," "second," "third," and the like in the description and in the claims of the present application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used are interchangeable under appropriate circumstances and can be implemented in sequences other than those illustrated or otherwise described herein with respect to the embodiments of the application, for example.
Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or device that comprises a list of elements is not necessarily limited to those elements explicitly listed, but may include other elements not expressly listed or inherent to such product or device.
The term "unit" as used herein refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and/or software code that is capable of performing the functionality associated with that element.
A block diagram of a hardware configuration of the terminal 100 according to an exemplary embodiment is exemplarily shown in fig. 1. As shown in fig. 1, the terminal 100 includes: a Radio Frequency (RF) circuit 110, a memory 120, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a Wireless Fidelity (Wi-Fi) module 170, a processor 180, a bluetooth module 181, and a power supply 190.
The RF circuit 110 may be used for receiving and transmitting signals during information transmission and reception or during a call, and may receive downlink data of a base station and then send the downlink data to the processor 180 for processing; the uplink data may be transmitted to the base station. Typically, the RF circuitry includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
The memory 120 may be used to store software programs and data. The processor 180 performs various functions of the terminal 100 and data processing by executing software programs or data stored in the memory 120. The memory 120 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. The memory 120 stores an operating system that enables the terminal 100 to operate. The memory 120 may store an operating system and various application programs, and may also store codes for performing the methods described in the embodiments of the present application.
The input unit 130, such as a touch screen, may be used to receive input numeric or character information, generate signal inputs related to user settings and function control of the terminal 100. Specifically, the input unit 130 may include a touch screen 131 disposed on a front surface of the terminal 100 and may collect a touch operation by a user thereon or nearby. The input unit 130 in this application may receive a touch operation of a user, such as clicking a button, dragging a scroll box, and the like.
The display unit 140 may be used to display information input by the user or information provided to the user and a Graphical User Interface (GUI) of various menus of the terminal 100. The display unit 140 may include a display screen 141 disposed on the front surface of the terminal 100. The display screen 141 may be configured in the form of a liquid crystal display, a light emitting diode, or the like. The display unit 140 may be used to display various graphical user interfaces described herein. The touch screen 131 may cover the display screen 141, or the touch screen 131 and the display screen 141 may be integrated to implement input and output functions of the terminal 100, and after the integration, the touch screen may be referred to as a touch display screen for short. In the present application, the display unit 140 may display the application programs and the corresponding operation steps.
The terminal 100 may also include at least one sensor 150, such as an acceleration sensor 155, a light sensor, a motion sensor. The terminal 100 may also be configured with other sensors such as a gyroscope, barometer, hygrometer, thermometer, infrared sensor, and the like.
Audio circuitry 160, speaker 161, and microphone 162 may provide an audio interface between a user and terminal 100. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161. The terminal 100 may also be provided with a volume button for adjusting the volume of the sound signal. On the other hand, the microphone 162 converts the collected sound signal into an electrical signal, converts the electrical signal into audio data after being received by the audio circuit 160, and outputs the audio data to the RF circuit 110 to be transmitted to, for example, another terminal or outputs the audio data to the memory 120 for further processing. In this application, the microphone 162 may capture the voice of the user.
Wi-Fi belongs to a short-distance wireless transmission technology, and the terminal 100 can help a user to send and receive e-mails, browse webpages, access streaming media, and the like through the Wi-Fi module 170, and provides wireless broadband internet access for the user.
The processor 180 is a control center of the terminal 100, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal 100 and processes data by running or executing software programs stored in the memory 120 and calling data stored in the memory 120. In some embodiments, processor 180 may include one or more processing units; the processor 180 may also integrate an application processor, which mainly handles operating systems, user interfaces, applications, etc., and a baseband processor, which mainly handles wireless communications. It will be appreciated that the baseband processor described above may not be integrated into the processor 180. In the present application, the processor 180 may run an operating system, an application program, a user interface display, and a touch response, and the processing method described in the embodiments of the present application. In addition, the processor 180 is coupled with the input unit 130 and the display unit 140.
And the bluetooth module 181 is configured to perform information interaction with other bluetooth devices having a bluetooth module through a bluetooth protocol. For example, the terminal 100 may establish a bluetooth connection with a wearable electronic device (e.g., a smart watch) having a bluetooth module via the bluetooth module 181, so as to perform data interaction.
The terminal 100 also includes a power supply 190 (e.g., a battery) to power the various components. The power supply may be logically connected to the processor 180 through a power management system to manage charging, discharging, power consumption, etc. through the power management system. The terminal 100 may also be configured with power buttons for powering the terminal on and off, and locking the screen.
Fig. 2 is a schematic diagram for illustrating a user interface on a terminal (e.g., terminal 100 of fig. 1). In some implementations, a user can open a corresponding application by touching an application icon on the user interface, or can open a corresponding folder by touching a folder icon on the user interface.
Fig. 3 (a) and 3 (b) are schematic structural views for illustrating the rear surface and the front surface of the terminal, respectively. Fig. 4 (a) and 4 (b) are schematic structural views for illustrating the front side of the back splint battery and the back side of the back splint battery, respectively. Fig. 5 (a) and 5 (b) are schematic structural views for illustrating the front and rear surfaces of the terminal to which the back-clip battery has been mounted, respectively.
With reference to fig. 3-5, in some implementations, a first pin contact interface 300 is disposed on the back surface of the terminal, a second pin contact interface 400 is disposed on the back-clip battery, and after the back-clip battery is mounted on the terminal, the first pin contact interface 300 and the second pin contact interface 400 are electrically connected, so that the electric quantity of the back-clip battery can be transmitted to the terminal.
In particular, table 1 below provides an interface definition for second thimble contact interface 400:
TABLE 1
Pin number Pin name Description of the function
1 VBUS The back splint battery outputs power to the terminal. 5V specification.
2 HDQ A one-wire electricity meter communication interface.
3 DET The terminal detects the loading and unloading of the back splint battery, and the back splint battery circuit is grounded through a resistor.
4 USB_D+ A USB data signal.
5 GND The power ground and the signal ground are common.
6 GND The power ground and the signal ground are common.
7 USB_D- A USB data signal.
8 EN The terminal enables the back-clip battery output VBUS.
9 USB_ID OTG function
10 VBUS The back splint battery outputs power to the terminal. 5V specification.
It should be noted that the terminal itself has a battery, and when the back-clip battery is not installed, the battery is used to supply power to the host of the terminal, and is collectively referred to as "main battery" in the following description, and correspondingly, the back-clip battery is collectively referred to as "sub battery" in the following description.
In an alternative embodiment, the terminal is connected to a second pin contact interface 400 on the back of the sub-battery via a first pin contact interface 300 on the back. In a specific implementation, whether to connect the secondary battery may be determined according to the level of the DET pin.
In one example, if a rising edge transition in the level of the DET pin is detected, an interrupt event is triggered to determine that the secondary battery is connected. In another example, if a falling edge transition in the level of the DET pin is detected, an interrupt event is triggered to determine that the secondary battery is connected.
In one example, if the DET pin is detected to be high, the charger insertion is determined. In another example, if the DET pin is detected to be low, it is determined that the secondary battery is connected.
In an alternative embodiment, the terminal is connected with the secondary battery in a wireless mode, namely, a thimble contact interface is not required to be arranged on the terminal and the secondary battery. Specifically, the terminal may be connected with the sub-battery by wireless means such as electromagnetic induction, magnetic resonance, radio waves, and the like.
In an alternative embodiment, the mode of supplying power to the terminal by the secondary battery includes the following two modes:
mode one, charging mode: the auxiliary battery directly provides electric quantity for the host computer in the terminal and simultaneously charges the main battery in the terminal. In the first mode, as long as the electric quantity of the main battery is not full, the auxiliary battery can charge the main battery while supplying power to the main machine.
In a specific implementation, a path for charging the main battery by the auxiliary battery is controlled to be opened, so that the auxiliary battery can charge the main battery while supplying power to the main machine.
Mode two, direct power supply mode: the auxiliary battery directly provides electric quantity for the host in the terminal and does not charge the main battery in the terminal. In the second mode, the auxiliary battery only supplies power to the main battery and does not charge the main battery no matter how much the main battery is charged. In the second mode, the auxiliary battery only supplies power to the host and does not charge the main battery, so that no electric quantity loss exists, the auxiliary battery can supply power to the host for a longer time, and the endurance time of the terminal is prolonged.
In a specific implementation, a path for charging the main battery by the auxiliary battery is controlled to be closed, so that the auxiliary battery only supplies power to the main battery and does not charge the main battery.
In another optional embodiment, the mode in which the secondary battery supplies power to the terminal further includes:
mode three, intelligent mode: automatically selecting a power supply mode according to the electric quantity of the main battery; specifically, when the electric quantity of the main battery is lower than a first preset threshold value, the mode is automatically switched to a charging mode.
It should be noted that the first preset threshold may be set according to the requirement of the user.
In one example, the first preset threshold is set to 15%. When the electric quantity of the main battery is detected to be lower than 15%, the charging mode is switched to, namely the main battery is charged while the auxiliary battery is used for supplying power to the main machine.
In the above example, the electric quantity of the main battery gradually increases while the sub-battery is charging the main battery. In an optional embodiment, if the electric quantity of the main battery gradually increases from below the first preset threshold to a second preset threshold, the charging mode is switched to the direct power supply mode, that is, a path for charging the main battery by the auxiliary battery is controlled to be closed, so that the auxiliary battery stops charging the main battery.
It should be noted that the second preset threshold may be set according to the requirement of the user.
In one example, the second preset threshold is set to 80%. For example, when the charge of the main battery gradually increases from 5% to 80%, the sub-battery stops charging the main battery.
In another optional embodiment, if the output voltage of the secondary battery is less than a preset voltage, a path for supplying power to the host from the primary battery is controlled to be opened, so that the primary battery supplies power to the host.
In the present embodiment, the electric energy of the sub-battery gradually decreases while the sub-battery supplies power to the main battery or charges the main battery. When the electric quantity of the auxiliary battery is reduced to a certain degree, the output voltage is reduced; when the output voltage of the auxiliary battery is reduced to a preset voltage, the auxiliary battery does not have the capability of supplying power to the main machine. At this time, a path for controlling the main battery to supply power to the host is opened, and the main battery is used for supplying power to the host.
Fig. 6 is a schematic diagram for illustrating the display unit 140 displaying a dual battery management interface. The user may select the charging mode or the smart mode through an interface as shown in fig. 6. In this embodiment, the first preset threshold is 15%. In this embodiment, only the display interface including the mode one (charging mode) and the mode three (smart mode) is provided.
In an embodiment where the intelligent mode is optional, when the charge level of the main battery rises to a second preset threshold, the mode one is automatically switched to the mode two, that is, the charging mode is automatically switched to the direct power supply mode.
Fig. 7 is a flowchart for illustrating a processing method provided by an embodiment of the present invention. Specifically, the processing method provided by the embodiment of the present invention includes: at a terminal having one or more processors, memory, an input unit, and a display unit:
step 901 determines that a secondary battery is inserted.
Step 902, in response to receiving a user input, determines a power mode in which the terminal is currently located.
If the mode is the smart mode, step 903 is executed, and if the mode is the charging mode, step 907 is executed.
Step 903, determining whether the electric quantity of the main battery is lower than a first preset threshold, if so, executing step 904, and if not, continuing to determine the electric quantity of the main battery.
And 904, controlling a path of the auxiliary battery to charge the main battery to be opened so that the auxiliary battery can charge the main battery while supplying power to the main battery.
Step 905, determining whether the electric quantity of the main battery is increased to a second preset threshold, if so, executing step 906, and if not, continuing to determine the electric quantity of the main battery.
And step 906, controlling the path of the auxiliary battery for charging the main battery to be disconnected, so that the auxiliary battery only supplies power to the main battery and does not charge the main battery.
Step 907, controlling a path for charging the main battery by the auxiliary battery to be opened so that the auxiliary battery can charge the main battery while supplying power to the main machine.
In a specific implementation, the operating system of the terminal is an Android system. The kernel layer can detect events such as whether the auxiliary battery is inserted, the electric quantity of the main battery and the auxiliary battery, whether the charger is inserted and the like through the interruption or the level of the I/O port.
In some implementations, the kernel layer registers the main battery and the sub-battery as separate devices under the sys/class/power-supply directory of the system, and names them, for example, the main battery is named as battery and the sub-battery is named as motion-battery.
When the information such as the electric quantity level and the charging and discharging state status (including the charging state charging, the discharging state discharging, and the non-charging state charging) of the main battery changes, the kernel layer writes the changed value into the battery directory.
When the information of the electric quantity motion _ level, the charge-discharge state motion _ status (including the charge state charging, the discharge state discharging, the uncharged state not charging), the insertion state motion _ present, etc. of the sub-battery changes, the kernel layer writes the changed value into the motion-basic directory.
And monitoring and reading the battery catalog and the motion-battery catalog through the health module, and reporting to the battery service. And if the BatteryService service receives the state change of the main battery and/or the auxiliary battery, sending a battery _ changed broadcast to the upper application program. The upper application program can analyze the information of the electric quantity, the charge and discharge state of the main battery, the electric quantity, the charge and discharge state, the insertion state and the like of the auxiliary battery from the received battery _ changed broadcast.
Fig. 8 is a flowchart for illustrating a processing method according to another embodiment of the present invention. Specifically, the processing method provided by the embodiment of the present invention includes: at a terminal having one or more processors, memory, an input unit, and a display unit:
step 1401, determining the target application program to start.
In an alternative embodiment, the target application is a system application.
In an alternative embodiment, the target application is a third-party application.
And 1402, if it is determined that the main battery supplies power to the host, calculating the power consumption of the main battery of the target application program.
In an optional embodiment, during the period that the main battery supplies power to the host, determining a hardware module called by the target application program during the running period; and calculating the power consumption of the target application program on the main battery according to the called time length of the hardware module and the power consumption of the hardware module in unit time.
And step 1403, if the secondary battery is determined to supply power to the host, calculating the power consumption of the target application program on the secondary battery.
In an alternative embodiment, during the period that the secondary battery supplies power to the host, determining a hardware module called by the target application program during the running process; and calculating the power consumption of the target application program on the secondary battery according to the called time length of the hardware module and the power consumption of the hardware module per unit time.
In an alternative embodiment, the target application invokes at least two hardware modules during runtime. Wherein, the hardware module is not limited to the following: CPU, camera module, bluetooth module, WIFI module, audio module.
In some implementations, the state changes of the hardware modules in the terminal are all transmitted from the unified battery usage information interface module. When the main battery supplies power to the host, recording power consumption of each hardware module and power consumption conditions caused by using the hardware modules by each application program into a main battery use information recording module; when the sub battery supplies power to the host, the power consumption of each hardware module and the power consumption of each application program caused by using the hardware modules are recorded in the sub battery use information recording module.
In the specific implementation, the Power consumption per unit time of each hardware module is obtained from Power _ Profile, and the duration of the hardware module called by the application program is obtained from batterystats impl.
For example, during T1-T2, the main battery supplies power to the host of the terminal, and the user calls the camera module and the bluetooth module during the use of the application a, so that the power consumption Q1 of the application a on the main battery = the time period of the CPU called by the application a + the time period of the camera called by the application a + the time period of the bluetooth called by the application a + the bluetooth power consumption per unit time. In this embodiment, the power consumption Q1 of the application a on the main battery is the sum of the power consumption of the application a on three hardware modules, namely the CPU, the camera module and the bluetooth module.
And in the period from T2 to T3, the auxiliary battery supplies power to the host computer of the terminal, the power consumption of the application program A on the main battery is stopped to be recorded, and the power consumption of the application program A on the auxiliary battery is started to be recorded. And during the period from T3 to T4, the main battery supplies power to the host of the terminal, and the power consumption of the application A on the main battery is continuously recorded, namely, the power consumption is accumulated and recorded on the basis of the power consumption Q1 recorded during the period from T1 to T2.
Step 1404, displaying the power consumption of the target application on the main battery and the auxiliary battery respectively on the user interface.
Fig. 9 is a schematic view of a user interface for showing the display unit 140 displaying power consumption of an application on a sub-battery. Fig. 10 is a schematic view of a user interface for showing the display unit 140 displaying power consumption of an application on the main battery.
The user can visually see the power consumption of the application on the primary and secondary batteries through the interfaces shown in fig. 9 and 10, specifically: the power consumption of the 'love art' application program on the auxiliary battery and the main battery is 22% and 5%, respectively, the power consumption of the 'game center' application program on the auxiliary battery and the main battery is 3% and 1%, respectively, the power consumption of the 'hundredth' application program on the auxiliary battery and the main battery is 2% and 1%, respectively, and the power consumption of the 'Haixin mall' application program on the auxiliary battery and the main battery is 2% and 1%, respectively.
An embodiment of the present invention further provides a computer storage medium, where computer program instructions are stored in the computer storage medium, and when the instructions are run on a computer, the instructions cause the computer to execute the processing method provided in the foregoing embodiment.
Since the terminal and the computer storage medium in the embodiment of the present invention may be applied to the processing method, reference may also be made to the method embodiment for obtaining technical effects, and details of the embodiment of the present invention are not described herein again.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that these are by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (10)

1. A terminal, comprising:
an input unit configured to receive a touch operation from a user;
a display unit configured to display a user interface; and
a processor coupled with the input unit and the display unit;
the terminal also comprises a host and a main battery, the terminal is connected with an auxiliary battery,
the processor is configured to:
determining that a target application program is started;
if the main battery is determined to supply power to the host, calculating the power consumption of the target application program on the main battery;
if the auxiliary battery directly provides electric energy for the host in the terminal and simultaneously charges the main battery in the terminal, the kernel layer registers and names the secondary battery as a separate device, and starts a secondary battery usage information recording module, calculates the power consumption of the target application program on the secondary battery, when the electric quantity of the main battery is lower than a first preset threshold value, the terminal is automatically switched to a charging mode, the auxiliary battery is used for supplying power to the terminal and simultaneously charging the main battery, in the process that the auxiliary battery charges the main battery, the electric quantity of the main battery is gradually increased, if the electric quantity of the main battery is gradually increased from a value lower than the first preset threshold value to a second preset threshold value, the charging mode is switched to a direct power supply mode, namely, a path for charging the main battery by the auxiliary battery is controlled to be closed, so that the auxiliary battery stops charging the main battery;
when the output voltage of the auxiliary battery is reduced to a preset voltage, a path for controlling the main battery to supply power to the terminal is opened, and the main battery is used for supplying power to the terminal;
and displaying the power consumption of the target application program on the main battery and the auxiliary battery respectively on a user interface.
2. The terminal of claim 1, wherein the calculating the power consumption of the target application on the main battery specifically comprises:
determining a hardware module called by the target application program during running;
and calculating the power consumption of the target application program on the main battery according to the called time length of the hardware module and the power consumption of the hardware module in unit time.
3. The terminal of claim 1, wherein the calculating the power consumption of the target application on the secondary battery specifically comprises:
determining a hardware module called by the target application program during running;
and calculating the power consumption of the target application program on the secondary battery according to the called time length of the hardware module and the power consumption of the hardware module per unit time.
4. A terminal as claimed in claim 2 or 3, characterised in that the target application invokes at least two hardware modules during runtime.
5. The terminal of claim 2 or 3, wherein the hardware module is a CPU, a camera module, a Bluetooth module, a WIFI module, or an audio module.
6. The terminal of claim 1, wherein the target application is a system application.
7. The terminal of claim 1, wherein the target application is a third party application.
8. A terminal as claimed in any one of claims 1 to 3, wherein the terminal is connected to the secondary battery via a rear pin contact interface.
9. A method of processing, comprising:
at a terminal having one or more processors, a memory, an input unit, a display unit, a main battery, and a host:
determining that a target application program is started;
if the main battery is determined to supply power to the host, calculating the power consumption of the target application program on the main battery;
if the auxiliary battery directly provides electric energy for the host in the terminal and simultaneously charges the main battery in the terminal, the kernel layer registers and names the secondary battery as a separate device, and starts a secondary battery usage information recording module, calculates the power consumption of the target application program on the secondary battery, when the electric quantity of the main battery is lower than a first preset threshold value, the terminal is automatically switched to a charging mode, the auxiliary battery is used for supplying power to the terminal and simultaneously charging the main battery, in the process that the auxiliary battery charges the main battery, the electric quantity of the main battery is gradually increased, if the electric quantity of the main battery is gradually increased from a value lower than the first preset threshold value to a second preset threshold value, the charging mode is switched to a direct power supply mode, namely, a path for charging the main battery by the auxiliary battery is controlled to be closed, so that the auxiliary battery stops charging the main battery;
when the output voltage of the auxiliary battery is reduced to a preset voltage, a path for controlling the main battery to supply power to the terminal is opened, and the main battery is used for supplying power to the terminal;
and displaying the power consumption of the target application program on the main battery and the auxiliary battery respectively on a user interface.
10. A computer storage medium having computer program instructions stored therein which, when run on a computer, cause the computer to perform the method of claim 9.
CN201910630822.0A 2019-01-18 2019-07-12 Terminal and processing method Active CN110225167B (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201910047190.5A CN109802457A (en) 2019-01-18 2019-01-18 A kind of electronic equipment and its charging method
CN2019100471905 2019-01-18
CN2019103463830 2019-04-26
CN201910346383 2019-04-26

Publications (2)

Publication Number Publication Date
CN110225167A CN110225167A (en) 2019-09-10
CN110225167B true CN110225167B (en) 2021-08-10

Family

ID=67495584

Family Applications (9)

Application Number Title Priority Date Filing Date
CN201910539435.6A Pending CN110113462A (en) 2019-01-18 2019-06-20 Terminal and processing method
CN201910538716.XA Pending CN111464672A (en) 2019-01-18 2019-06-20 Electronic equipment and charging method thereof
CN201910538609.7A Withdrawn CN110138942A (en) 2019-01-18 2019-06-20 Terminal and processing method
CN201910538621.8A Active CN110191215B (en) 2019-01-18 2019-06-20 Terminal and processing method
CN201910538715.5A Active CN111464671B (en) 2019-01-18 2019-06-20 Electronic equipment and charging method thereof
CN201910631700.3A Pending CN110225168A (en) 2019-01-18 2019-07-12 Terminal and processing method
CN201910630822.0A Active CN110225167B (en) 2019-01-18 2019-07-12 Terminal and processing method
CN201910895312.6A Active CN111464673B (en) 2019-01-18 2019-09-20 Electronic equipment and charging method thereof
CN201911245161.6A Active CN111464674B (en) 2019-01-18 2019-12-06 Electronic equipment and temperature control method thereof during charging

Family Applications Before (6)

Application Number Title Priority Date Filing Date
CN201910539435.6A Pending CN110113462A (en) 2019-01-18 2019-06-20 Terminal and processing method
CN201910538716.XA Pending CN111464672A (en) 2019-01-18 2019-06-20 Electronic equipment and charging method thereof
CN201910538609.7A Withdrawn CN110138942A (en) 2019-01-18 2019-06-20 Terminal and processing method
CN201910538621.8A Active CN110191215B (en) 2019-01-18 2019-06-20 Terminal and processing method
CN201910538715.5A Active CN111464671B (en) 2019-01-18 2019-06-20 Electronic equipment and charging method thereof
CN201910631700.3A Pending CN110225168A (en) 2019-01-18 2019-07-12 Terminal and processing method

Family Applications After (2)

Application Number Title Priority Date Filing Date
CN201910895312.6A Active CN111464673B (en) 2019-01-18 2019-09-20 Electronic equipment and charging method thereof
CN201911245161.6A Active CN111464674B (en) 2019-01-18 2019-12-06 Electronic equipment and temperature control method thereof during charging

Country Status (1)

Country Link
CN (9) CN110113462A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113285500B (en) * 2020-02-19 2022-10-14 青岛海信移动通信技术股份有限公司 Mobile terminal and charging method thereof
CN111756103B (en) * 2020-07-06 2022-03-04 青岛海信移动通信技术股份有限公司 Mobile terminal and charging method thereof
CN115833210B (en) * 2023-02-14 2023-05-26 深圳市德兰明海新能源股份有限公司 Multi-machine parallel energy storage system and charge and discharge control method thereof

Family Cites Families (73)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE2619735A1 (en) * 1976-04-30 1977-11-17 Heliowatt Werke Control circuit for electronic indicator - with protection against mains supply failure uses battery and switches off display if mains fails
JP3066246B2 (en) * 1994-05-26 2000-07-17 三洋電機株式会社 Battery display device for electrical equipment
JP2000267741A (en) * 1999-03-16 2000-09-29 Ricoh Co Ltd Power source device and electronic equipment
US7135837B2 (en) * 2003-12-19 2006-11-14 Motorola, Inc. Method and system for selectivly diverting current during charging of multiple batteries
JP4251117B2 (en) * 2004-07-02 2009-04-08 日本電気株式会社 Mobile communication terminal and heat generation countermeasure method thereof
TW200847581A (en) * 2007-05-28 2008-12-01 Erune Technology Corp Charging and discharging control method and device for dual-battery and portable electronic device containing the dual-battery charging and discharging control device
CN101378558A (en) * 2007-08-28 2009-03-04 希姆通信息技术(上海)有限公司 Mobile telephone set for intelligent double-battery electric power system
CN101771280B (en) * 2008-12-30 2013-08-28 登丰微电子股份有限公司 Battery charging controller and battery balance charging controller
CN201368909Y (en) * 2009-02-16 2009-12-23 上海华勤通讯技术有限公司 Device for detecting service time of battery
CN101651359B (en) * 2009-09-10 2011-07-27 惠州Tcl移动通信有限公司 Power supply unit and power supply switching method of mobile terminal
CN201608750U (en) * 2010-01-07 2010-10-13 福建考克电子科技有限公司 Battery-replaceable standby power supply of mobile phone
CN201717916U (en) * 2010-06-23 2011-01-19 宁波现代萨际通移动电话有限公司 Double-battery powered mobile phone
CN102299550A (en) * 2010-06-28 2011-12-28 英业达股份有限公司 Power supply method of electronic device
US9307495B2 (en) * 2011-09-12 2016-04-05 Apple Inc. Monitoring a battery in a portable electronic device
CN102570589A (en) * 2011-12-27 2012-07-11 南京理学工程数据技术有限公司 Electronic equipment with sleeping control circuit and sleeping control method of electronic equipment
CN103208825A (en) * 2012-01-17 2013-07-17 上海追日电气有限公司 Photovoltaic charging system and charging station
US9461484B2 (en) * 2012-01-30 2016-10-04 Nec Energy Devices, Ltd. Electricity storage system, method for controlling secondary battery packs, and secondary battery pack
CN103246335B (en) * 2012-02-13 2016-01-27 联想(北京)有限公司 Condition control method and electronic equipment
CN103247832B (en) * 2012-02-14 2015-03-25 联想(北京)有限公司 Charging method and electronic device
US9711962B2 (en) * 2012-07-09 2017-07-18 Davide Andrea System and method for isolated DC to DC converter
CN102801197B (en) * 2012-08-30 2015-07-22 东莞宇龙通信科技有限公司 Terminal and charge control method thereof
CN103779880A (en) * 2012-10-24 2014-05-07 神讯电脑(昆山)有限公司 Solar charger with electric quantity display and temperature protection
CN103887832B (en) * 2012-12-19 2017-08-04 比亚迪股份有限公司 A kind of portable power source and the system being in communication with
CN103002157A (en) * 2012-12-21 2013-03-27 广东欧珀移动通信有限公司 Remaining using time reminding method and device of mobile terminal
CN103914365B (en) * 2012-12-31 2017-03-15 北京金山安全软件有限公司 Method and device for acquiring power consumption of mobile terminal application
CN203445629U (en) * 2013-02-06 2014-02-19 上海盛本通讯科技有限公司 Multifunctional back clip system of intelligent mobile terminal
CN104158235B (en) * 2013-05-15 2017-07-21 华为终端有限公司 A kind of battery charging control method, equipment and system
CN103269098B (en) * 2013-05-21 2016-01-13 东莞宇龙通信科技有限公司 A kind of method and mobile terminal improving double-battery charge electrical efficiency
CN104810877B (en) * 2014-01-28 2016-12-14 广东欧珀移动通信有限公司 Battery charger and method
CN104079043B (en) * 2014-07-22 2017-07-14 上海斐讯数据通信技术有限公司 A kind of charge control system that can switch between a variety of charge modes
CN104600786B (en) * 2014-12-27 2017-12-29 小米科技有限责任公司 Portable power source and power information display methods
CN104701948B (en) * 2015-03-30 2017-11-07 北京中科盛康科技有限公司 A kind of charger for battery pack
US9941732B2 (en) * 2015-07-22 2018-04-10 Motorola Mobility Llc Controlling charging and/or discharging of batteries within a user device
CN106374154B (en) * 2015-07-24 2019-07-26 联想(北京)有限公司 A kind of charge control method and electronic equipment
CN204858671U (en) * 2015-08-12 2015-12-09 深圳市汇川技术股份有限公司 Direct current of low stand -by power consumption machine that charges
CN105207312A (en) * 2015-10-28 2015-12-30 湖南农业大学 External standby battery system for mobile phone
CN105490349B (en) * 2016-01-18 2018-10-26 青岛海信移动通信技术股份有限公司 The power supply system and method for mobile terminal
CN105680533A (en) * 2016-04-21 2016-06-15 苏州慧得赛物联网技术有限公司 Power supply device for supporting and heat radiation of mobile phone
CN106021155B (en) * 2016-05-25 2018-12-21 深圳市昂宇电子有限公司 A kind of USB power supply port that audio-visual video output can be achieved
CN105811543A (en) * 2016-05-27 2016-07-27 维沃移动通信有限公司 Electric quantity display method of mobile power source, mobile terminal and mobile power source
CN106374558A (en) * 2016-09-09 2017-02-01 北京小米移动软件有限公司 Charging control method and device of mobile terminal
CN106451612B (en) * 2016-09-21 2020-05-12 奇酷互联网络科技(深圳)有限公司 Charging method and charging device
CN106451614A (en) * 2016-09-26 2017-02-22 Tcl通讯(宁波)有限公司 Wireless charging device, system and method based on rear cover of mobile power supply
CN106385067A (en) * 2016-09-27 2017-02-08 Tcl通讯(宁波)有限公司 Double-battery-based charging system, method and mobile terminal
CN106451616B (en) * 2016-09-27 2020-03-06 Tcl通讯(宁波)有限公司 Mobile terminal and double-battery charging switching circuit, system and method thereof
CN106412337B (en) * 2016-11-21 2021-05-18 宇龙计算机通信科技(深圳)有限公司 Method and device for adjusting heating condition of mobile terminal and terminal
CN106454526A (en) * 2016-12-22 2017-02-22 深圳Tcl数字技术有限公司 Method and device for reducing standby power consumption of TV set
CN106786885A (en) * 2016-12-22 2017-05-31 捷开通讯(深圳)有限公司 The method of terminal and its monitoring main battery and reserve battery charging process
CN106454173A (en) * 2016-12-23 2017-02-22 深圳Tcl数字技术有限公司 Automatic TV standby method and apparatus
CN106786961B (en) * 2017-01-13 2019-05-24 Oppo广东移动通信有限公司 Charging method, device and terminal
KR20180085313A (en) * 2017-01-18 2018-07-26 삼성전자주식회사 Method for charging control and electronic device supporting the same
CN206370865U (en) * 2017-01-25 2017-08-01 深圳市维康宝技术有限公司 A kind of multi-functional charge mobile phone shell
CN206547012U (en) * 2017-02-13 2017-10-10 重庆零度智控智能科技有限公司 Charging circuit and electronic equipment
CN206471894U (en) * 2017-03-01 2017-09-05 上海卓易科技股份有限公司 A kind of battery charger and electronic equipment
CN107017684A (en) * 2017-06-06 2017-08-04 深圳天珑无线科技有限公司 A kind of method and device of charging
CN107294157B (en) * 2017-06-07 2021-07-13 惠州Tcl移动通信有限公司 Mobile terminal, self-charging method and storage device
JP7333756B2 (en) * 2017-06-14 2023-08-25 ハダル, インコーポレイテッド System and method for configurable battery charging
CN108733188A (en) * 2017-06-30 2018-11-02 北京猎户星空科技有限公司 A kind of electronic equipment control method, device, electronic equipment and storage medium
CN207099152U (en) * 2017-08-10 2018-03-13 南京机电职业技术学院 A kind of cell phone intelligent heat-dissipating casing
CN107508350B (en) * 2017-08-31 2020-01-24 Oppo广东移动通信有限公司 Electronic device, charging method thereof, and storage medium
CN207440561U (en) * 2017-09-15 2018-06-01 中国汽车技术研究中心 A kind of vehicle-mounted energy consumption data recording device for new-energy automobile
CN107508996B (en) * 2017-09-27 2020-07-31 Oppo广东移动通信有限公司 Safety positioning device, method, terminal equipment and storage medium
CN107749632B (en) * 2017-10-18 2020-06-02 珠海格力电器股份有限公司 Energy storage system and control method thereof
CN107832190B (en) * 2017-10-31 2020-09-22 维沃移动通信有限公司 Diagnosis method for power consumption abnormity, mobile terminal and storage medium
CN107968469B (en) * 2018-01-11 2023-11-03 厦门美图移动科技有限公司 Charging system, mobile terminal and charger
CN207967976U (en) * 2018-01-11 2018-10-12 厦门美图移动科技有限公司 Charging system, charging module and mobile terminal
CN108989548A (en) * 2018-06-21 2018-12-11 上海二三四五网络科技有限公司 A kind of control method and control device detecting mobile terminal application power consumption
CN108810226A (en) * 2018-06-22 2018-11-13 维沃移动通信有限公司 A kind of electricity method for early warning and mobile terminal
CN109149690B (en) * 2018-08-29 2021-01-12 Oppo广东移动通信有限公司 Charging control device and method and electronic equipment
CN109005262B (en) * 2018-08-30 2020-06-05 维沃移动通信有限公司 Camera control method, terminal and computer readable storage medium
CN109217409B (en) * 2018-08-31 2021-02-02 Oppo广东移动通信有限公司 Charging method and device and electronic equipment
CN109412240A (en) * 2018-12-20 2019-03-01 青岛海信移动通信技术股份有限公司 A kind of method and apparatus adjusting charging current
CN109884543B (en) * 2019-01-25 2021-12-14 努比亚技术有限公司 Method and equipment for predicting remaining service life of battery

Also Published As

Publication number Publication date
CN111464671A (en) 2020-07-28
CN110191215B (en) 2021-03-02
CN111464672A (en) 2020-07-28
CN110138942A (en) 2019-08-16
CN110225168A (en) 2019-09-10
CN111464673B (en) 2021-07-30
CN110191215A (en) 2019-08-30
CN110225167A (en) 2019-09-10
CN111464673A (en) 2020-07-28
CN110113462A (en) 2019-08-09
CN111464671B (en) 2021-07-30
CN111464674A (en) 2020-07-28
CN111464674B (en) 2021-07-30

Similar Documents

Publication Publication Date Title
AU2015347444B2 (en) Electronic device and battery charge/discharge control method thereof
EP3340422B1 (en) Charging control method for battery based on time and electronic device supporting the same
CN108899952B (en) Multi-battery charging and discharging device and mobile terminal
CN103500002B (en) The method of application program management, device and terminal unit
CN110225167B (en) Terminal and processing method
US20200212701A1 (en) Method for controlling multi-mode charging, mobile terminal, and storage medium
EP3570404B1 (en) Power supply control method and apparatus, storage medium, and electronic device
CN110912574B (en) SIM card detection method, device, storage medium and terminal
CN112311029B (en) Charging method, electronic device and storage medium
CN108155693B (en) Charging control method and device of mobile terminal, storage medium and mobile terminal
CN108834013A (en) A kind of wearable device electric quantity balancing method and Related product
CN108475097A (en) A kind of electric quantity managing method and terminal device
CN106451670A (en) Charge control method, device and terminal equipment
CN112542867A (en) Mobile terminal power supply control method and device, terminal equipment and storage medium
CN110611347A (en) Charging control method and related product
CN111343325B (en) Port detection method and device, mobile terminal and storage medium
CN111984107B (en) Method and device for processing power supply abnormity of terminal equipment
CN109561415B (en) NFC function detection method and device, storage medium and mobile terminal
CN111987764B (en) Discharge control method and device, storage medium and mobile terminal
CN112256610B (en) Connection control method, system, storage medium and mobile terminal
CN112558749A (en) Power supply control method and device, storage medium and mobile terminal

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
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder