CN116865407A - Charging method and terminal equipment - Google Patents

Charging method and terminal equipment Download PDF

Info

Publication number
CN116865407A
CN116865407A CN202311129740.0A CN202311129740A CN116865407A CN 116865407 A CN116865407 A CN 116865407A CN 202311129740 A CN202311129740 A CN 202311129740A CN 116865407 A CN116865407 A CN 116865407A
Authority
CN
China
Prior art keywords
voltage threshold
terminal equipment
threshold value
terminal device
stage
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.)
Granted
Application number
CN202311129740.0A
Other languages
Chinese (zh)
Other versions
CN116865407B (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.)
Honor Device Co Ltd
Original Assignee
Honor Device 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202311129740.0A priority Critical patent/CN116865407B/en
Publication of CN116865407A publication Critical patent/CN116865407A/en
Application granted granted Critical
Publication of CN116865407B publication Critical patent/CN116865407B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J50/00Circuit arrangements or systems for wireless supply or distribution of electric power
    • H02J50/10Circuit arrangements or systems for wireless supply or distribution of electric power using inductive coupling
    • 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/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00036Charger exchanging data with battery
    • 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/0069Charging or discharging for charge maintenance, battery initiation or rejuvenation
    • 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/007Regulation of charging or discharging current or voltage
    • H02J7/00712Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters
    • 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/007Regulation of charging or discharging current or voltage
    • H02J7/00712Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters
    • H02J7/007182Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters in response to battery voltage
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Abstract

The application provides a charging method and terminal equipment, relates to the technical field of terminals, and aims to solve the problems that after the terminal equipment enters a starting flow of the terminal equipment, the terminal equipment repeatedly enters a Kernel stage, the service life of a battery is influenced, the hardware of the terminal equipment is damaged, and a software system of the terminal equipment is influenced; the method comprises the following steps: under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts charging and enters a starting flow of the terminal equipment; the starting process of the terminal equipment comprises an application program loading program ABL stage and a Kernel stage; after entering the ABL stage, when the battery voltage of the terminal equipment reaches a first voltage threshold value, not entering the Kernel stage; the battery voltage of the terminal equipment reaches a second voltage threshold value, enters a Kernel stage, and is started successfully; wherein the second voltage threshold is greater than the first voltage threshold.

Description

Charging method and terminal equipment
Technical Field
The embodiment of the application relates to the technical field of terminals, in particular to a charging method and terminal equipment.
Background
Terminal equipment (such as mobile phones) adopting an Android system gradually becomes the main stream of the terminal market. In the current situation that the terminal equipment is powered off in a low power state, if the terminal equipment is connected with a charger, the starting flow of the terminal equipment can be entered. Typically, the start-up procedure of the terminal device includes an extended bootloader (extensible boot loader, XBL) phase, an application bootloader (application boot loader, ABL) phase, and a Kernel phase.
In the related art, the terminal device performs trickle charging in an XBL phase and an ABL phase, and when the battery voltage of the terminal device reaches a certain voltage, the terminal device enters a Kernel phase.
In some scenarios, the battery internal resistance of the terminal device increases due to the battery aging of the terminal device, and thus the internal voltage division of the battery of the terminal device increases, so that the voltage output from the terminal device to an Operating System (OS) decreases. Therefore, the terminal equipment returns to the ABL stage from the Kernel stage to carry out trickle charge again, when the battery voltage of the terminal equipment reaches a certain voltage, the terminal equipment enters the Kernel stage again, and after repeated times, the battery of the terminal equipment can be damaged, so that the service life of the battery is reduced. Furthermore, since the Kernel phase mainly loads each chip (integrated circuit chip, IC) of the terminal device, repeated entry of the terminal device into the Kernel phase also damages hardware of the terminal device, thereby affecting a software system of the terminal device.
Disclosure of Invention
The embodiment of the application provides a charging method and terminal equipment, which are used for solving the problems that after the terminal equipment enters a starting flow of the terminal equipment, the terminal equipment repeatedly enters a Kernel stage, the service life of a battery is influenced, the hardware of the terminal equipment is damaged, and a software system of the terminal equipment is influenced.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
in a first aspect, a charging method is provided, which can be applied in a terminal device. Specifically, the method comprises the following steps: under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts charging and enters a starting flow of the terminal equipment; the starting process of the terminal equipment comprises an application program loading program ABL stage and a Kernel stage; after entering the ABL stage, when the battery voltage of the terminal equipment reaches a first voltage threshold value, not entering the Kernel stage; the first voltage threshold value is a voltage threshold value when the ABL stage enters the Kernel stage and is preconfigured by the terminal equipment; the battery voltage of the terminal equipment reaches a second voltage threshold value, enters a Kernel stage, and is started successfully; wherein the second voltage threshold is greater than the first voltage threshold.
Based on the first aspect, under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts charging and enters a scene of a starting flow of the terminal equipment, and after the terminal equipment enters an ABL stage, when the battery voltage of the terminal equipment reaches a first voltage threshold value, the terminal equipment does not enter a Kernel stage; when the battery voltage of the terminal equipment reaches a second voltage threshold value, the terminal equipment enters a Kernel stage and is started successfully; because the second voltage threshold value is larger than the first voltage threshold value, namely the battery voltage is higher when the terminal equipment enters the Kernel stage, the voltage output by the terminal equipment to the operating system is increased, the problem that the terminal equipment returns to the ABL stage after entering the Kernel stage is avoided, and the problems that the battery of the terminal equipment is damaged, the service life of the battery is reduced, the hardware of the terminal equipment is damaged, the software system of the terminal equipment is affected and the like due to the fact that the terminal equipment repeatedly enters the Kernel stage are solved.
In addition, the scheme can avoid the terminal equipment from repeatedly entering the Kernel stage, so that when the user starts up, the problem of repeated restarting of the terminal equipment can be solved, and the user experience is improved.
Alternatively, the power of the terminal device being zero may be replaced by the battery voltage of the terminal device being less than the preset voltage value. Alternatively, the battery voltage of the terminal device may be mapped to zero power of the terminal device.
In an implementation manner of the first aspect, the battery voltage of the terminal device reaches a second voltage threshold value, and enters a Kernel phase, including: based on the battery voltage of the terminal equipment reaching a second voltage threshold value, wherein the second voltage threshold value is larger than the target voltage threshold value, entering a Kernel stage; the target voltage threshold value is a minimum voltage threshold value which is determined based on the charge-discharge period of the battery of the terminal equipment and is allowed to enter a Kernel stage.
In this implementation manner, since the target voltage threshold is a minimum voltage threshold determined based on the charge-discharge period of the battery of the terminal device and allowed to enter the Kernel phase, when the battery voltage of the terminal device reaches the second voltage threshold, and the second voltage threshold is greater than the target voltage threshold, the terminal device enters the Kernel phase, so that the voltage output to the operating system by the terminal device can be further improved, and the terminal device returns to the ABL phase after entering the Kernel phase.
In one implementation manner of the first aspect, the method further includes: the terminal equipment replaces a battery; and under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts to charge, and enters a Kernel stage when the battery voltage of the terminal equipment reaches a first voltage threshold value.
It will be appreciated that the reason for the repeated entry of the terminal device into the Kernel phase is due to the aging of the battery of the terminal device and the increase in internal resistance. Therefore, in this implementation manner, if the terminal device changes the battery, the terminal device may enter the Kernel phase when the battery voltage reaches the first voltage threshold, so that the problem that the terminal device repeatedly enters the Kernel phase does not occur.
In an implementation manner of the first aspect, determining the target voltage threshold value based on a charge-discharge period of a battery of the terminal device includes: acquiring a first voltage threshold value; determining a voltage adjustment value related to the charge-discharge period according to the charge-discharge period; and determining a target voltage threshold value according to the first voltage threshold value and the voltage adjustment value.
Optionally, the terminal device stores a correspondence between the charge-discharge period and the voltage adjustment value, and the terminal device may determine the voltage adjustment value related to the charge-discharge period based on the correspondence.
Optionally, the target voltage threshold is a sum of the first voltage threshold and the voltage adjustment value.
In one implementation manner of the first aspect, the method further includes: the terminal equipment acquires a third voltage threshold value, wherein the third voltage threshold value is the voltage threshold value of the Kernel stage of the starting flow of the terminal equipment in the last time; if the third voltage threshold is smaller than the target voltage threshold, the terminal equipment takes the target voltage threshold as the voltage threshold when the terminal equipment enters the Kernel stage of the starting flow of the terminal equipment.
In one implementation manner of the first aspect, the method further includes: if the third voltage threshold value is larger than or equal to the target voltage threshold value and smaller than the difference between the fourth voltage threshold value and the voltage adjustment stepping value, the second voltage threshold value is used as the voltage threshold value when the terminal equipment enters the Kernel stage of the starting flow of the terminal equipment;
the fourth voltage threshold is a preset maximum voltage threshold which allows entering a Kernel stage, and the second voltage threshold is the sum of the third voltage threshold and a voltage adjustment stepping value; the voltage adjustment stepping value is an adjustment interval of a voltage threshold value preset by the terminal equipment.
In the implementation manner, the terminal device can dynamically adjust the voltage threshold value when the terminal device enters the Kernel phase of the starting flow of the terminal device at this time based on the target voltage threshold value and the voltage threshold value of the Kernel phase of the starting flow of the terminal device at last time, so that the problem that the terminal device repeatedly enters the Kernel phase is further avoided.
In an implementation manner of the first aspect, the battery voltage of the terminal device reaches a second voltage threshold value, and enters a Kernel phase, including: detecting the reason of shutdown of the terminal equipment after the terminal equipment enters an ABL stage; if the reason for the shutdown of the terminal equipment is that the electric quantity of the terminal rod equipment is zero, the battery voltage of the terminal equipment reaches a second voltage threshold value, and a Kernel stage is entered.
Optionally, if the reason for shutting down the terminal device is not that the electric quantity of the terminal device is zero, the battery voltage of the terminal device reaches a first voltage threshold value, and enters a Kernel stage.
In one implementation manner of the first aspect, the terminal device includes a target storage partition, and determining the target voltage threshold value includes: the terminal equipment reads the charge-discharge period and the first voltage threshold value from the target storage partition; and the terminal equipment determines a target voltage threshold according to the charge-discharge period and the first voltage threshold.
In an implementation manner of the first aspect, the start-up procedure of the terminal device further includes a loading operating system stage, and the method further includes: responding to the starting operation of a user, and displaying a starting interface by the terminal equipment; or after entering the stage of loading the operating system, the terminal equipment displays a startup interface.
In a second aspect, a charging method is provided and applied to a terminal device, and the method includes: under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts charging and enters a starting flow of the terminal equipment; the starting process of the terminal equipment comprises an application program loading program ABL stage and a Kernel stage; at a first time point, the terminal equipment enters a Kernel stage; at a first time point, the battery voltage of the terminal equipment is a first voltage threshold value, wherein the first voltage threshold value is a voltage threshold value when the terminal equipment is preconfigured and the ABL stage enters the Kernel stage; at a second time point, the terminal equipment enters an ABL stage; at a third time point, when the battery voltage of the terminal equipment reaches a first voltage threshold value, the terminal equipment does not enter a Kernel stage; entering a Kernel stage at a fourth time point, and starting up successfully; and at a fourth time point, the battery voltage of the terminal equipment is a second voltage threshold value, and the second voltage threshold value is larger than the first voltage threshold value.
In one implementation manner of the second aspect, the terminal device enters a Kernel phase, including: based on the battery voltage of the terminal equipment reaching the second voltage threshold value, and the second voltage threshold value being larger than the target voltage threshold value, entering a Kernel stage; the target voltage threshold value is a minimum voltage threshold value which is determined based on the charge-discharge period of the battery of the terminal equipment and is allowed to enter a Kernel stage.
In one implementation manner of the second aspect, the method further includes: the terminal equipment replaces a battery; under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts charging and enters a starting flow of the terminal equipment; at a fifth time point, entering a Kernel phase; and at a fifth time point, the battery voltage of the terminal equipment is the first voltage threshold value.
In a third aspect, a terminal device is provided, which has the functionality according to any of the first aspects, and the functionality may be implemented by hardware, or by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
In a fourth aspect, there is provided a terminal device, the electronic device comprising: a memory for storing computer-executable instructions that, when executed by the terminal device, cause the terminal device to perform the method of any of the first aspects; or performing the method of any of the second aspects above.
In a fifth aspect, a chip system is provided, which is applied to a terminal device. The chip system comprises a processor and an interface, wherein the interface is used for receiving instructions and transmitting the instructions to at least one processor; at least one processor executing the instructions to cause a terminal device to perform the method according to any one of the first aspects above; or performing the method of any of the second aspects above.
In a sixth aspect, there is provided a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of any of the first aspects above; or performing the method of any of the second aspects above.
In a seventh aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the first aspects above; or performing the method of any of the second aspects above.
The technical effects caused by any implementation manner of the second aspect to the seventh aspect may refer to the technical effects caused by different implementation manners of the first aspect, which are not described herein.
Drawings
Fig. 1 is a schematic structural diagram of a charging system according to an embodiment of the present application;
fig. 2 is a schematic diagram of a composition structure of a terminal device according to an embodiment of the present application;
fig. 3 is a schematic diagram of a startup procedure of a terminal device according to an embodiment of the present application;
fig. 4 is a schematic diagram of a start-up procedure of another terminal device according to an embodiment of the present application;
fig. 5 is a schematic diagram of charging a terminal device according to an embodiment of the present application;
fig. 6 is a schematic diagram of an interface for starting up a terminal device according to an embodiment of the present application;
fig. 7 is a schematic hardware structure of a terminal device according to an embodiment of the present application;
fig. 8 is a schematic software structure of a terminal device according to an embodiment of the present application;
fig. 9 is a schematic diagram of a startup procedure of another terminal device according to an embodiment of the present application;
fig. 10 is a schematic flow chart of a charging method according to an embodiment of the present application;
fig. 11 is a schematic flow chart of another charging method according to an embodiment of the present application;
fig. 12 is a schematic diagram of an interface for starting up a terminal device according to an embodiment of the present application;
fig. 13 is a flow chart of another charging method according to an embodiment of the present application;
Fig. 14 is a schematic structural diagram of a chip system according to an embodiment of the present application.
Detailed Description
The method provided by the embodiment of the application is applied to the charging system shown in fig. 1. As shown in fig. 1, the charging system includes a terminal device 100 and a power supply device 200, the terminal device 100 and the power supply device 200 being electrically connected, the power supply device 200 may supply power to the terminal device 100 so that the terminal device 100 is charged.
Alternatively, as shown in fig. 1, the terminal device 100 may be electrically connected with the power supply device 200 through a charging data line. Alternatively, the terminal device 100 and the power supply device 200 may be electrically connected by wireless means (e.g., electromagnetic induction means), without limitation.
In the case where the terminal device 100 is electrically connected to the power supply device 200 through the charging data line, the power supply device 200 may transmit power to the terminal device 100 through the charging data line. The power supply device 200 may be, for example, an external power source (such as a household power source), a charging device (such as a charger, a power adapter, a vehicle device, etc.).
In the scenario that the terminal device 100 and the power supply device 200 are electrically connected through electromagnetic induction, a transmitting end coil is provided in the power supply device 200, a receiving end coil is provided in the terminal device 100, and the power supply device 200 and the terminal device 100 can transmit electric energy through magnetic field coupling action between the transmitting end coil and the receiving end coil, so that the power supply device 200 can transmit electric energy to the terminal device 100.
The method provided by the embodiment of the application can be applied to various types of terminal equipment, and the terminal equipment in the embodiment of the application can be any terminal equipment such as a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, a PDA), an enhanced display (augmented reality, AR)/a Virtual Reality (VR) and the like, and of course, in the following embodiments, the specific form of the terminal equipment is not limited.
In the embodiment of the application, the terminal equipment can comprise a hardware layer, an operating system layer running on the hardware layer and an application layer running on the operating system layer. As shown in fig. 2, the hardware layers may include hardware such as a central processing unit (central processing unit, CPU), a memory management unit (memory management unit, MMU), and a memory (also referred to as a main memory or storage device). The operating system may be any one or more computer operating systems that implement business processes through processes, such as an Android operating system, an iOS operating system, or a windows operating system. Fig. 2 is an example of an Android operating system as the operating system. The application layer may include applications such as a browser, desktop application, telephone, mail, etc.
In some embodiments, the terminal device may enter a startup procedure of the terminal device when the terminal device has a startup requirement. For example, the terminal equipment enters a starting flow of the terminal equipment when the terminal equipment performs the machine brushing; or the terminal equipment enters a starting flow of the terminal equipment when restarting; or the terminal equipment enters a starting flow of the terminal equipment when updating the operating system; or after the terminal equipment is powered off in a low power state, entering a starting process of the terminal equipment when the terminal equipment is connected with the power supply equipment.
Taking an operating system of the terminal device as an Android operating system as an example, a starting process of the terminal device can be divided into two stages, wherein the first stage is the start of Linux, and the second stage is the start of Android (which can be called as an upper starting process). Fig. 3 is a startup flow frame diagram based on an Android operating system. As shown in fig. 3, the starting process of the terminal device includes Boot ROM 01, boot loader 02, kernel 03, and Android 04. Boot ROM 01, boot loader 02 and Kernel 03 are the starting processes of the first stage, and Android 04 is the starting process of the second stage.
Illustratively, the Boot ROM may include a master Boot loader (primary Boot loader, PBL) phase. The PBL phase mainly directs the terminal device to start executing from a preset code cured in a read-only memory (ROM), and then loads a boot program into a random access memory (random access memory, RAM).
Boot loader is mainly used for preparing a hardware environment and guiding the start of Kernel. The Boot loader may include an XBL phase and an ABL phase. The XBL stage is used for guiding the initialization and starting of the memory. The ABL stage is mainly to guide the start of Kernel. For example, ABL includes a fastboot program for receiving initialization information of XBL and passing it to Kernel phase.
Illustratively, after the Kernel is loaded into the memory by the Kernel phase, the Kernel boot phase is first entered, and at the end of the Kernel boot phase, the start_kernel is called to enter the Kernel start phase, mainly to complete most of the initialization work of the Kernel. Such as setting up caches, memory, loading drivers, mounting root file systems, initializing input and output, etc.
For example, the Android phase may be referred to as a loading operating system phase or an upper boot flow, and is mainly used for starting a Linux kernel, a hardware abstraction layer (hardware abstraction layer, HAL), an Zhuoyun row (Android run) and system library of a terminal device, an application framework layer (framework), an application layer, and the like.
Alternatively, as shown in FIG. 3, the Android phase first starts an init process, either as the root file system or the first process. After the init process is started, the screen of the terminal device is lighted up, and the ICs in the terminal device are loaded.
After the init process is started, a local daemon process (native daemons) is also started, and a zygate process is started by running An Zhuoyun lines (Android run). The Zygote process is responsible for initializing a virtual machine, is the first process in the Android system, and runs a Dalvik VM virtual machine after the Zygote process is started, and the Dalvik VM virtual machine can run Java platform application programs.
Alternatively, as shown in FIG. 3, the Zygote process initiates a hypervisor process (system server) by running a Dalvik VM virtual machine, which is responsible for launching and managing the entire application framework layer, i.e., for managing the multiple managers (manager) included in the application framework layer.
For example, as shown in fig. 3, the system server process is responsible for starting and managing service managers (service manager), which are daemons of binding (binder), and when a binder server is created, the service manager is responsible for recording the correspondence between the domain name and the IP address of the binder server.
As an example, as shown in fig. 3, service manager may also be started by running An Zhuoyun line (android run) after the init process is started.
It should be noted that the above-described start-up procedure of the terminal device is merely an example of the present application, and it is understood that the principle of the start-up procedure of the terminal device is basically the same, and the start-up procedure of the terminal device may further include more or fewer steps than those described above, or a combination of the steps, which is not specifically limited in this aspect of the present application.
As an example, in the case that the terminal device is powered off at a low power and enters a start-up procedure of the terminal device after being connected to the power supply device, the terminal device performs trickle charging in an XBL phase and an ABL phase, the current is small, and after a period of charging, the terminal device completes initialization work of each IC in the ABL phase and interacts with the power supply device through a charging protocol to enter quick charging.
The terminal device and the power supply device support the same charging protocol, such as the terminal device and the power supply device support charging protocol (power delivery protocol, PDP), super fast charging protocol (super charging protocol, SCP), fast charging protocol (fast charging protocol, FCP), and the like. The charging protocol may also be divided into a private charging protocol and a public charging protocol. Proprietary charging protocols such as SCP, public charging protocols such as fusion rapid charging specification (universal fast charging specification, UFCS) and battery charging specification version 1.2 (battery charging specification revision 1.2, bc1.2).
In the embodiment of the application, when the terminal equipment enters the next stage from the current stage, a voltage threshold value is defined, and the voltage threshold value is the minimum voltage threshold value for allowing the terminal equipment to enter the next stage. When the battery voltage of the terminal device reaches the voltage threshold value, the terminal device enters the next stage.
Illustratively, as shown in fig. 4, when the terminal device enters the ABL phase from the XBL phase, a voltage threshold a is defined, where the voltage threshold a is a minimum voltage threshold that allows the terminal device to enter the ABL phase. For example, the voltage threshold value a may be 2.9V, or other values, without limitation.
For example, assuming that the voltage threshold value a is 2.9V, the terminal device circularly detects whether the battery voltage reaches 2.9V in the XBL phase, and if the battery voltage of the terminal device reaches 2.9V, the terminal device enters the ABL phase. If the battery voltage of the terminal equipment does not reach 2.9V, the terminal equipment does not enter the ABL stage, and trickle charging is continuously carried out in the XBL stage until the battery voltage of the terminal equipment reaches 2.9V, and the terminal equipment enters the ABL stage.
As an example, as also shown in fig. 4, when the terminal device enters the Kernel phase from the ABL phase, a voltage threshold B is defined, where the voltage threshold B is the minimum voltage threshold that allows the terminal device to enter the Kernel phase. For example, the voltage threshold B may be 3.45V, or other values, without limitation.
For example, assuming that the voltage threshold B is 3.45V, the terminal device circularly detects whether the battery voltage reaches 3.45V in the ABL stage, and if the battery voltage of the terminal device reaches 3.45V, the terminal device enters the Kernel stage. If the battery voltage of the terminal equipment does not reach 3.45V, the terminal equipment does not enter the Kernel stage, and continues trickle charging in the ABL stage until the battery voltage of the terminal equipment reaches 3.45V, and the terminal equipment enters the Kernel stage.
For example, the first time the terminal device detects the battery voltage of the terminal device in the ABL phase is: battery voltage=3449 mV, i.e. the battery voltage of the terminal device does not reach 3.45V, the terminal device does not enter the Kernel phase and continues trickle charging in the ABL phase. Further, the terminal device detects the battery voltage of the terminal device for the second time in the ABL stage as follows: battery voltage=3449 mV, i.e. the battery voltage of the terminal device does not reach 3.45V, the terminal device does not enter the Kernel phase and continues trickle charging in the ABL phase. Further, the terminal device detects the battery voltage of the terminal device for the third time in the ABL stage as follows: battery voltage=3450 mV, i.e. the battery voltage of the terminal device reaches 3.45V, the terminal device enters the Kernel phase.
After the terminal device enters the Kernel phase, the screen of the terminal device is lit up and the ICs are loaded so that the current output to the operating system of the terminal device increases. If the battery of the terminal device ages, it may also cause an increase in the internal resistance of the battery. As can be seen from the expression u=i×r, the internal resistance of the battery increases, resulting in an increase in the partial voltage in the battery, and further in a decrease in the voltage output from the terminal device to the operating system (such as Vsys voltage), the terminal device returns from the Kernel phase to the ABL phase to perform trickle charge again, and when the battery voltage of the terminal device reaches 3.45V again, the terminal device enters the Kernel phase again, and after repeated times, the battery of the terminal device may be damaged, and the service life of the battery may be reduced. In addition, since the Kernel phase is mainly used for loading each IC of the terminal equipment, the hardware of the terminal equipment can be damaged when the terminal equipment repeatedly enters the Kernel phase for a plurality of times in the process of entering the starting flow of the terminal equipment at the same time, and then the software system of the terminal equipment is affected.
Fig. 5 shows a schematic diagram of a terminal device charging. As shown in fig. 5, taking a power supply device as a power adapter (adapter) as an example, the power adapter may be connected to a terminal device through a Type C interface. The terminal device may include a Power Management Integrated Circuit (PMIC), a charger IC (charger IC), a battery, and the like.
As shown in fig. 5, the power adapter is coupled to the input of the PMIC and the input of the charger IC through a Type C interface, and the input of the PMIC is coupled to the input of the charger IC. The output of the PMIC is coupled to the output of the charger IC and to the battery, respectively. The output of the PMIC is also coupled to the operating system of the terminal device.
The power adapter is connected to an external power source (such as household electricity), and obtains electric energy from the external power source, and then inputs the obtained electric energy (such as direct current Vbus) into a charger IC of the terminal device. The charger IC is used to manage the charging process. For example, the charger IC is used to determine whether to supply power (e.g., DC power Vbus) received from an external power source to the PMIC or to the battery. The PMIC receives power input from the battery (e.g., vout voltage) and/or power input from the charger IC (e.g., vbat voltage) to power each hardware in the hardware layer of the terminal apparatus.
Illustratively, when the battery voltage of the terminal device reaches 3.45V, as the internal resistance of the battery (Rbat shown in fig. 5) increases, the voltage division inside the battery increases, which in turn results in a decrease in the power supply capability of the battery for each hardware, i.e., the voltage output from the battery to the PMIC (i.e., vbat voltage) decreases, which in turn results in a decrease in the voltage output from the PMIC to the operating system (Vsys voltage shown in fig. 5). Correspondingly, the battery voltage of the terminal device may also decrease, for example, the battery voltage is lower than 3.45V, which causes the terminal device to return from the Kernel phase to the ABL phase to recharge trickle.
Taking the mobile phone as an example of the terminal device, for a user, in a case where the mobile phone is powered off at a low power and is connected to the power adapter, as shown in fig. 6 (a), the mobile phone displays a charging interface 101, where the charging interface 101 is used to indicate that the current power of the mobile phone is low, for example, the charging interface includes a low power screen 102 (e.g. a red lightning identifier is displayed in a battery icon). In other embodiments, the charging interface further includes a prompt 103, where the prompt is used to prompt the user that the current power of the mobile phone is low, for example, the prompt 103 is "low power of the mobile phone".
In response to a user operating a power-on key (e.g., a power key), as shown in fig. 6 (b), the mobile phone displays a power-on interface 104, where the power-on interface 104 includes an identification of the manufacturer of the mobile phone. In other embodiments, the boot interface 104 is also used to display a boot animation, not shown in FIG. 6 (b).
In the embodiment of the present application, for the user, when the mobile phone returns to the ABL stage from the Kernel stage to perform trickle charging again, the mobile phone is switched from the power-on interface 104 to the charging interface 101, i.e. the power-on fails. Then, in response to the user continuing to operate the start-up button, the mobile phone is restarted and continuously switched from the start-up interface 104 to the charging interface 101, so that the repeated restarting phenomenon affects the use experience of the user, and simultaneously causes misunderstanding of the user, and the mobile phone is considered to be unable to start up.
In order to solve the above-mentioned problems, an embodiment of the present application provides a charging method, which dynamically adjusts a voltage threshold of a battery voltage of a terminal device, so as to avoid returning to an ABL stage after the terminal device enters a Kernel stage. Specifically, the method comprises the following steps: in the ABL stage, the terminal equipment dynamically adjusts the voltage threshold value when the terminal equipment enters the Kernel stage of the starting flow of the terminal equipment by acquiring the charge and discharge times of the battery of the terminal equipment and the voltage threshold value when the terminal equipment enters the Kernel stage of the starting flow of the terminal equipment last time. After the terminal device performs trickle charge and reaches the adjusted battery voltage threshold, the terminal device enters a Kernel phase.
In addition, the method can avoid the problem that the terminal equipment is restarted repeatedly when the user starts up for the user because the terminal equipment returns to the ABL stage after entering the Kernel stage, so that the user experience can be improved.
Embodiments of the present application will now be described with reference to the accompanying drawings, wherein it is to be understood that the embodiments described below are merely some, but not all embodiments of the present application.
The charging method provided by the embodiment of the present application may be applied to the terminal device 100 described above. The terminal device 100 may include hardware such as a charger IC, a PMIC, and a battery, which may be disposed in the hardware layers shown in fig. 2. The hardware layers of the terminal device are described below in connection with fig. 7: as shown in fig. 7, the hardware layers of the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a positioning module 181, keys 190, a motor 191, an indicator 192, a camera 193, a display 194, a subscriber identity module (subscriber identification module, SIM) card interface 195, and the like.
It is to be understood that the configuration illustrated in the present embodiment does not constitute a specific limitation on the terminal device 100. In other embodiments, terminal device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may be a central processor (central processing unit, CPU), the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor (modem), a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural-network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural and command center of the terminal device 100. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The store may hold instructions or data that has just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory, avoiding repeated access, reducing the latency of the processor 110 and thus improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a USB interface, among others.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a mini USB interface, a micro (micro) USB interface, a USB Type (USB Type C) interface, or the like. USB interface 130 may be used to connect a charger (e.g., a power adapter) to charge terminal device 100, or may be used to transfer data between terminal device 100 and a peripheral device. When the terminal device 100 is connected to the charger through the USB interface 130, the terminal device 100 may transmit power to the charger through the USB interface. Illustratively, the configuration signal lines (configuration channel, CC) in the USB interface 130 of the terminal device 100 detect the current sent by the charger, enabling current transfer between the terminal device 100 and the charger.
It should be understood that the connection relationship between the modules illustrated in this embodiment is only illustrative, and does not limit the structure of the terminal device. In other embodiments, the terminal device may also use different interfacing manners in the foregoing embodiments, or a combination of multiple interfacing manners.
In the embodiment of the application, under the condition that the terminal equipment is powered off in a low power mode and is connected with the power adapter, the terminal equipment enters a starting flow of the terminal equipment. Upon entering the PBL phase of the terminal device's boot flow, the terminal device boots the processor 110, such as to boot one of the processing cores in the CPU. At this time, the terminal device first supplies power to the processor 110, and accordingly, when the XBL phase and the ABL phase in the start-up procedure of the terminal device are entered, only one processing core of the CPU is also operating. Upon entering the Kernel phase of the terminal device's startup procedure, the terminal device starts up the other processing cores in the CPU and determines by the processor 110 (i.e., the CPU) to power the other hardware (such as the various hardware shown in fig. 7).
The charge management module 140 is configured to receive a charge input from a charger (e.g., the power adapter described above). The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. The charging management module 140 may also supply power to the terminal device 100 through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera, the wireless communication module 160, and the like. The power management module 141 may also be configured to detect parameters such as battery capacity, battery cycle number, battery health (leakage, impedance), etc. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
Illustratively, after the terminal device 100 is connected to an external power source through a charger (or a power adapter), the charging process of the terminal device 100 is as follows: after the charger finishes the power of the external power supply, the power is input to the charge management module 140 through the USB interface. The charge management module 140 charges the battery 142 on the one hand and provides the power management module 141 with electric power on the other hand; alternatively, the charge management module 140 only stores power for the battery 142, and the power management module 141 obtains power from the battery 142 to power the hardware.
Alternatively, the power management module 141 may be coupled to the processor 110, and the processor 110 may determine which components to power through the power management module 141.
In an embodiment of the present application, the charging management module 140 may include the charger IC shown in fig. 5, and the power management module 141 may include the PMIC shown in fig. 5. Of course, the charge management module 140 and the power management module 141 may also include other components, without limitation.
It will be appreciated that when the terminal device 100 is not connected to a charger, the terminal device 100 may power the respective hardware by the power stored in the battery 142.
The wireless communication function of the terminal device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The terminal device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The terminal device 100 may implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The terminal device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to realize expansion of the memory capability of the terminal device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, audio, video, etc. files are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The processor 110 executes various functional applications of the terminal device 100 and data processing by executing instructions stored in the internal memory 121. For example, in an embodiment of the present application, the processor 110 may include a storage program area and a storage data area by executing instructions stored in the internal memory 121.
The storage program area may store application programs (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system. The storage data area may store data (such as video files) created during use of the terminal device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The motor 191 may generate a vibration cue.
The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc. The SIM card interface 195 is used to connect a SIM card. The SIM card may be contacted and separated from the terminal apparatus 100 by being inserted into the SIM card interface 195 or by being withdrawn from the SIM card interface 195. The terminal device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like.
The methods in the following embodiments may be implemented in the terminal device 100 having the above-described hardware structure.
The software system of the terminal device 100 may adopt a layered architecture, an event initiation architecture, a microkernel architecture, a microservice architecture or a cloud architecture. In the embodiment of the application, taking an Android system with a layered architecture as an example, a software structure of the terminal device 100 is illustrated.
Fig. 8 is a software configuration block diagram of the terminal device 100 provided in the embodiment of the present application. The layered architecture may divide the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into six layers, from top to bottom, an application layer (application layer), an application framework layer (framework layer), an Zhuoyun row (Android run) and system library, a hardware abstraction layer (hardware abstraction layer, HAL), kernel layer, and Loader layer, respectively.
Application layer: a series of application packages may be included. For example, the application layer as shown in fig. 8 may include: browser (browser), desktop application (desktop), phone (phone), email (email), and like applications.
The framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. As shown in fig. 8, the framework layer may include an activity manager (activity manager), a window manager (window manager), a power manager (power manager), an input manager (input manager), and the like.
The activity manager is used for managing the life cycle of each application program and the navigation rollback function. And the main thread creation of the Android is responsible for maintaining the life cycle of each application program.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The power manager functions similarly to the power management module 141 described above, and reference is made to the above embodiment, and details are omitted.
The input manager is used for managing programs of the input device. For example, the input manager may determine an input operation such as a mouse click operation, a keyboard input operation, and a touch swipe.
Android runtimes include core libraries and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in virtual machines. The virtual machine executes java files of the application layer and the application framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The core library includes: init process, native daemon, service manager, startup animation service, etc. The core library also includes a media server (media server) responsible for launching and managing the entire c++ application. The media server includes an audio management system (audio player), a media play service (media player service), and the like.
The HAL layer may contain a plurality of library modules, which may be, for example, hardware Synthesizers (HWCs), camera library modules, etc. The Android system can load a corresponding library module for the equipment hardware, so that the purpose of accessing the equipment hardware by an application program framework layer is achieved. In some embodiments, the HAL layer is included in the core library.
The Kernel layer (i.e., kernel layer) is a layer between hardware and software. The kernel layer at least includes camera driver, binder driver, display driver, input driver, etc.
The Loader layer is used for initializing the ROM when the terminal device 100 enters a start-up procedure, and preparing to load a hardware environment to guide the start-up of Kernel. The Loader layer comprises a Boot ROM and a Boot Loader.
The following embodiments are described in conjunction with the software framework schematic diagram shown in fig. 8, and illustrate specific procedures after the terminal device enters the start-up procedure of the terminal device.
When the terminal equipment is in a shutdown state, responding to the operation of a user on a startup key, and enabling the terminal equipment to enter a startup flow of the terminal equipment. As shown in fig. 8, in the Loader layer, boot ROM Boot terminal device starts to execute from the preset code cured in ROM, and then loads the Boot program into RAM. Then, the Boot loader loads the hardware environment and guides the Kernel to start.
Optionally, as shown in fig. 8, after entering the Kernel phase, the terminal device first starts a virtual memory (swapper) process for initializing process management, memory management, and loading related works such as camera driver, binder driver, display driver, and input driver. After the swapper process has loaded the individual IC drives, the terminal device starts the HAL layer. The swapper process is also responsible for starting kthreadd processes for managing and scheduling other processes in the kernel. For example, kthreadd processes are used to manage kernel daemons (kernel daemons). So far, the terminal equipment completes the Kernel startup.
After the terminal equipment completely starts Kernel, the terminal equipment enters an Android stage. Optionally, as shown in fig. 8, after the terminal device enters the Android stage, an init process is started first. After the init process is started, on one hand, the init process is responsible for starting a local daemon (active daemons); on the other hand, the system is responsible for starting important services such as boot animation (bootanim), service manager (service manager) and the like. The init process is also responsible for launching a media server (media server) that is responsible for launching and managing audio related services, such as managing an audio management system (audio player) and media play services (media player service), etc. In yet another aspect, the init process is also responsible for starting a zygate process, which is responsible for running an android run time (android run) to initialize virtual machines, and for starting a hypervisor server, which is responsible for starting and managing the various service frameworks in the framework layer, including an activity manager, a window manager, a power manager, and an input manager, among others.
The zygate process is also used to be responsible for launching APP processes, such as launching desktop applications (i.e., desktops that a user sees after startup), through a system server. Accordingly, the zygate process also creates APP processes for browsers, phones, mails, etc. So far, the terminal equipment completes the starting process and the starting is successful.
In the embodiment of the application, after the terminal equipment is powered off in a low power mode and under the condition of being connected with the power adapter, the terminal equipment enters a starting flow of the terminal equipment. After the terminal device enters the Kernel phase, the terminal device returns from the Kernel phase to the ABL phase due to battery aging of the terminal device. The specific process of returning the terminal device from the Kernel phase to the ABL phase is described in detail below with reference to fig. 8.
For example, as shown in fig. 9, the return of the terminal device from the Kernel phase to the ABL phase may include the following steps. Optionally, the terminal device includes a first starting module, a first charging module, a battery module, a second starting module and a second charging module disposed on the Loader layer. The first starting module, the first charging module, the battery module and the preset storage partition are used for executing all steps after the terminal equipment enters the ABL stage; the second starting module and the second charging module are used for executing each step after the terminal equipment enters the Kernel stage.
Step a: under the condition that the terminal equipment is connected with the power adapter, the terminal equipment enters an XBL stage.
It can be understood that after the terminal device enters the start-up procedure of the terminal device, the terminal device first enters the PBL phase and then enters the XBL phase. For the illustration of the PBL stage, reference is made to the above embodiments, and no description is given.
Step b: and the terminal equipment circularly detects the battery voltage of the terminal equipment in the XBL stage, and continuously charges until the voltage threshold value A enters the ABL stage.
Optionally, if the battery voltage of the terminal device is less than the voltage threshold a (e.g., 2.9V), the terminal device performs trickle charging, and after continuously charging to 2.9V, the terminal device enters the ABL stage. If the battery voltage of the terminal equipment is greater than or equal to the voltage threshold value A, the terminal equipment enters the ABL stage.
Step c: the first starting module of the terminal equipment initializes the charging function of the first charging module.
Step d: the first charging module of the terminal device acquires a battery voltage from the battery module.
Accordingly, the battery module of the terminal device returns the battery voltage to the first charging module.
Step e: the first charging module of the terminal device continuously charges the battery voltage of the terminal device to a voltage threshold B (e.g., 3.45V).
Step f: and the first charging module of the terminal equipment returns the charging state to the first starting module.
The charging state is used for indicating the first charging module of the terminal equipment to charge the battery voltage to a voltage threshold value B.
Step g: the first starting module of the terminal equipment triggers the second starting module to enter the Kernel stage.
Step h: the second starting module of the terminal equipment initializes the charging function of the second charging module.
Step i: after the terminal equipment enters a Kernel stage, each hardware of the terminal equipment is loaded, and the current output to an operating system of the terminal equipment is increased; if the battery of the terminal equipment ages, the internal resistance of the battery increases, so that the partial pressure in the battery increases, and the voltage output to the operating system by the terminal equipment decreases, and the battery voltage of the terminal equipment continuously decreases and is lower than the voltage threshold value B.
Step j: the second charging module of the terminal equipment controls the terminal equipment to return to the ABL stage from the Kernel stage.
Alternatively, if the battery voltage of the terminal device continues to decrease to be less than the voltage threshold B and greater than the voltage threshold a, the terminal device returns from the Kernel phase to the ABL phase. If the battery voltage of the terminal equipment is continuously reduced to be smaller than the voltage threshold value A, the terminal equipment returns to the XBL stage from the Kernel stage.
The following embodiments describe the technical solutions provided by the embodiments of the present application in detail with reference to a start-up procedure of a terminal device.
Exemplary, the embodiment of the present application provides a charging method that may be applied to the terminal device 100 having the above-described hardware structure and software structure. And under the condition that the terminal equipment is powered off in a low power mode, the terminal equipment starts to charge and enters a starting flow of the terminal equipment. It will be appreciated that the start-up procedure of the terminal device comprises at least an ABL phase and a Kernel phase.
In some embodiments, the terminal device is powered down with a low power on condition that the power of the terminal device is zero. In other embodiments, the terminal device is powered down when the battery voltage of the terminal device is less than a preset voltage value (e.g., 3.45V or 2.9V).
Alternatively, the power of the terminal device being zero may be replaced by the battery voltage of the terminal device being less than the preset voltage value. Alternatively, the battery voltage of the terminal device may be mapped to zero power of the terminal device.
It should be noted that, in theory, the electric quantity of the terminal device is zero, and the terminal device is powered off with low electric quantity. When the method is actually implemented, the terminal equipment is powered off with low electric quantity under the condition that the electric quantity of the terminal equipment is not completely zero; for example, when the electric quantity of the terminal equipment is less than 2%, the terminal equipment is powered off with low electric quantity.
Referring to fig. 10, a flow chart of a charging method is shown. As shown in fig. 10, the method may include the following steps.
It can be understood that, in the related art, when the battery voltage of the terminal device reaches the first voltage threshold, the terminal device enters the Kernel phase from the ABL phase. The first voltage threshold value is preconfigured by the terminal equipment, and the battery voltage of the terminal equipment is obtained when the ABL stage enters the Kernel stage.
Optionally, the first voltage threshold may be preset by a manufacturer of the terminal device; alternatively, the first voltage threshold may be determined by an operating system of the terminal device, and is not limited.
For example, the first voltage threshold may be the voltage threshold B, for example, the first voltage threshold is 3.45V. Of course, since the manufacturers (or operating systems) of the different terminal devices are different, the first voltage threshold is not limited, as long as it is set in practical implementation.
Step 201: after the terminal equipment enters the ABL stage, when the battery voltage of the terminal equipment reaches a first voltage threshold value, the terminal equipment does not enter the Kernel stage.
As shown in fig. 9, the first charging module of the terminal device receives the power of the external power source and continuously charges the battery voltage of the terminal device to the first voltage threshold. After the first charging module of the terminal equipment continuously charges the battery voltage of the terminal equipment to the first voltage threshold value, the first charging module of the terminal equipment cannot return to the charging state to the first starting module, so that the first starting module of the terminal equipment cannot trigger the second starting module to enter a Kernel stage.
Step 202: and the battery voltage of the terminal equipment reaches a second voltage threshold value, enters a Kernel stage, and is started successfully. The second voltage threshold is greater than the first voltage threshold.
Illustratively, in connection with fig. 9, the first charging module of the terminal device receives power from the external power source and continuously charges the battery voltage of the terminal device to the second voltage threshold value. After the second charging module of the terminal equipment continuously charges the battery voltage of the terminal equipment to a second voltage threshold, the first charging module of the terminal equipment returns a charging state to the first starting module, and the first starting module of the terminal equipment is instructed to trigger the second starting module to enter a Kernel stage.
In summary, under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts to charge and enters a starting process of the terminal equipment, after the terminal equipment enters an ABL stage, when the battery voltage of the terminal equipment reaches a second voltage threshold value, the terminal equipment enters a Kernel stage, and the starting is successful. Because the battery voltage of the terminal equipment is the second voltage threshold value when the terminal equipment enters the Kernel stage and the second voltage threshold value is larger than the first voltage threshold value, the voltage output by the terminal equipment to the operating system is increased, so that the problem that the terminal equipment returns to the ABL stage after entering the Kernel stage, the battery damage of the terminal equipment, the service life of the battery is reduced, the hardware damage of the terminal equipment and the software system of the terminal equipment are affected due to the fact that the terminal equipment repeatedly enters the Kernel stage are solved.
In addition, the scheme can avoid the terminal equipment from repeatedly entering the Kernel stage, so that when the user starts up, the problem of repeated restarting of the terminal equipment can be solved, and the user experience is improved.
Optionally, the terminal device enters the Kernel phase based on the battery voltage of the terminal device reaching a second voltage threshold, and the second voltage threshold being greater than the target voltage threshold.
The target voltage threshold value may be preset by a terminal manufacturer; alternatively, the target voltage threshold value may be determined by an operating system of the terminal device; alternatively, the target voltage threshold may be determined by the terminal device based on the first voltage threshold and the number of times of charging and discharging (or called charging and discharging cycle), which is not limited.
In the following embodiment, with reference to fig. 8 and fig. 9, a specific implementation process of entering the Kernel stage after the battery of the terminal device is charged to the second voltage threshold is illustrated. As shown in fig. 11, the specific implementation process may include the following steps.
Step i: the terminal equipment enters the ABL stage from the XBL stage.
For an explanation of step i, reference may be made to step b, which is not repeated here.
Step ii: the first starting module of the terminal equipment initializes the charging function of the first charging module.
Step iii: the first charging module of the terminal device acquires a battery voltage from the battery module.
Optionally, the battery module of the terminal device returns the battery voltage to the first charging module.
Step iv: the first charging module of the terminal equipment detects the reason for shutdown of the terminal equipment.
Step v: if the reason for the shutdown of the terminal equipment is that the shutdown is performed under the condition that the electric quantity of the terminal equipment is zero, a first charging module of the terminal equipment acquires the charging and discharging times and a first voltage threshold value from a preset storage partition.
Optionally, if the reason for the terminal device shutdown is not low-power shutdown (i.e. shutdown under the condition that the power is not zero), the terminal device does not execute the following steps, that is, the terminal device does not need to acquire the charge and discharge times and the first voltage threshold value.
Optionally, the reason why the terminal device is powered off is not that the low battery power off may be: the user manually shuts down; or the terminal device is shut down at regular time, etc., without limitation.
It should be noted that, because the reason of battery aging of the terminal device may be caused by the charge and discharge times of the battery, the embodiment of the application can determine the target voltage threshold according to the charge and discharge times of the battery, that is, determine a new voltage threshold according to the charge and discharge times of the battery, and enable the terminal device to quickly enter the Kernel stage based on the new voltage threshold, thereby avoiding the terminal device from repeatedly entering the Kernel stage, damaging the battery of the terminal device, affecting the service life of the battery, and the like. Optionally, the terminal device may obtain the charge and discharge times from a preset storage partition; or the terminal equipment acquires the charge and discharge times from the battery; or the terminal device obtains the charge and discharge times from other memories without limitation.
For example, if the first charging module of the terminal device obtains the charge-discharge times from the preset storage partition, the corresponding preset storage partition of the terminal device returns the charge-discharge times and the first voltage threshold value to the first charging module.
The preset storage partition is a storage partition in an operating system of the terminal equipment and is used for storing some data of the terminal equipment in a production line testing stage. For example, the preset memory partition is used for storing some parameters, pictures and other data in the production line test. Under the condition that the terminal equipment is powered off in a low power mode, data stored in the preset storage partition cannot be lost. In some embodiments, when the terminal device resumes factory settings, the data in the preset memory partition may be deleted.
Alternatively, the preset memory partition may be an omeinfo partition, and in actual implementation, the preset memory partition may be another partition, which is not limited.
Step vi: the first charging module of the terminal equipment determines a target voltage threshold value according to the charging and discharging times and the first voltage threshold value.
Optionally, the first charging module of the terminal device determines a voltage adjustment value related to the charge and discharge times according to the charge and discharge times, and then determines the target voltage threshold according to the first voltage threshold and the voltage adjustment value. For example, the terminal device may store a correspondence relation between the charge and discharge times and the voltage adjustment value, and determine the voltage adjustment value related to the charge and discharge times based on the correspondence relation.
Optionally, the terminal device may store a correspondence between the charge and discharge times and the voltage adjustment value in the first charging module; or the terminal equipment can store the corresponding relation between the charge and discharge times and the voltage adjustment value in a preset storage partition, and the terminal equipment acquires the corresponding relation between the charge and discharge times and the voltage adjustment value stored in the preset storage partition while acquiring the charge and discharge times and the first voltage threshold value; or, the terminal device may also store the correspondence between the charge and discharge times and the voltage adjustment value in other storage partitions, without limitation.
For example, the terminal device may store the correspondence between the charge and discharge times and the voltage adjustment value in the form of a table or an array. By way of example, the correspondence may be as shown in table 1 below.
TABLE 1
Illustratively, as shown in the above table 1, if the number of times of charge and discharge of the battery of the terminal device is 300, the voltage adjustment value determined by the terminal device is 50mv based on the correspondence relationship corresponding to level1 in table 1. On the basis, the terminal device can take the sum of the first voltage threshold value and the voltage adjustment value as a target voltage threshold value. For example, the target voltage threshold is 3.45v+50mv=3.50v.
The above table 1 is merely an example of the present application, and does not limit the present application. In actual implementation, the correspondence may include more or less gears than table 1; alternatively, the correspondence relationship may not include the gear shown in table 1, and may include only the charge/discharge times and the voltage adjustment value, without limitation.
Optionally, the target voltage threshold is a minimum voltage threshold that allows the terminal device to enter the Kernel phase.
In some embodiments, after the first charging module of the terminal device determines the target voltage threshold, the target voltage threshold is stored in a preset storage partition, and electric energy of the external power supply is obtained to continuously charge the battery voltage of the terminal to the target voltage threshold.
Step vii: the first charging module of the terminal equipment stores the target voltage threshold value in a preset storage partition.
In the embodiment of the application, the first charging module of the terminal equipment stores the target voltage threshold value in a preset storage partition, so as to dynamically adjust the voltage threshold value when entering the Kernel phase based on the target voltage threshold value every time the Kernel phase is entered.
Step viii: the first charging module of the terminal device continuously charges the battery voltage of the terminal device to a second voltage threshold value.
It should be noted that, the embodiment of the present application does not limit the sequence of step vii and step viii, and step vii may be performed before step viii or may be performed after step viii; alternatively, step vii and step viii may be performed simultaneously, without limitation.
Step ix: and the first charging module of the terminal equipment returns the charging state to the first starting module.
The charging state is used for indicating that the battery voltage of the terminal equipment is charged to a second voltage threshold value.
Step x: the first starting module of the terminal equipment triggers the second starting module to enter the Kernel stage.
Optionally, in the embodiment of the present application, if the third voltage threshold is smaller than the target voltage threshold, the terminal device uses the target voltage threshold as the voltage threshold of the Kernel stage of the startup procedure of the terminal device; and then, the terminal equipment charges the battery voltage to a target voltage threshold value, and enters a Kernel stage. I.e. in this scheme the second voltage threshold value is equal to the target voltage threshold value.
Optionally, if the third voltage threshold is greater than or equal to the target voltage threshold and less than the difference between the fourth voltage threshold and the voltage adjustment step value, the terminal device uses the sum of the third voltage threshold and the voltage adjustment step value as the voltage threshold of the Kernel stage of the start-up procedure of the terminal device. And then, the terminal equipment charges the battery voltage to a second voltage threshold value, wherein the second voltage threshold value is larger than the target voltage threshold value, and the Kernel stage is entered. I.e. in this scenario the second voltage threshold value is larger than the target voltage threshold value.
The third voltage threshold is a voltage threshold of a Kernel stage of a startup procedure of the terminal equipment when the terminal equipment enters the terminal equipment last time. The fourth voltage threshold value is a maximum voltage threshold value which is preset by the terminal equipment and allows the Kernel stage to be entered; the voltage adjustment stepping value is an adjustment interval of a voltage threshold value preset by the terminal equipment.
Note that, the fourth voltage threshold value and the voltage adjustment step value are not limited to be specific. For example, the fourth voltage threshold may be 3.8V, 4.0V, etc., without limitation; the voltage adjustment step value may be 5mv, 10mv, or the like, and is not limited.
Taking the fourth voltage threshold value as 3.8V and the voltage adjustment step value as 10mv as an example, for example, if the third voltage threshold value is greater than or equal to the target voltage threshold value and less than (3.8V-10 mv) =3.79V, the terminal device takes the sum of the third voltage threshold value and 10mv as the voltage threshold value entering the Kernel stage at this time.
In some embodiments, since the terminal device records the voltage threshold value when entering the Kernel phase of the start-up procedure of the terminal device each time in the preset storage partition, the terminal device may read the voltage threshold value when entering the Kernel phase of the start-up procedure of the terminal device last time from the preset storage partition, and dynamically adjust the voltage threshold value when entering the Kernel phase of the start-up procedure of the terminal device this time based on the voltage threshold value when entering the Kernel phase of the start-up procedure of the terminal device last time and the target voltage threshold value determined by the charge and discharge times of the battery.
For example, assuming that the number of battery charge/discharge times of the terminal device is 300 times, the terminal device takes 3.45v+50mv=3.50v as the target voltage threshold value based on the voltage adjustment value corresponding to the number of battery charge/discharge times as shown in table 1 being 50 mv.
Optionally, if the voltage threshold value (i.e. the third voltage threshold value) obtained by the terminal device when the terminal device enters the Kernel phase of the start-up procedure of the terminal device last time is 3.45V, the terminal device uses 3.50V as the voltage threshold value of the Kernel phase of the start-up procedure of the terminal device this time. I.e. entering the Kernel phase of the start-up procedure of the terminal device when the battery voltage of the terminal device reaches 3.50V.
Optionally, if the voltage threshold (i.e., the third voltage threshold) obtained by the terminal device when the terminal device enters the Kernel phase of the start-up procedure of the terminal device last time is 3.55V, the terminal device uses 3.55v+10mv=3.56V as the voltage threshold of the Kernel phase of the start-up procedure of the terminal device this time. I.e. entering the Kernel phase of the start-up procedure of the terminal device when the battery voltage of the terminal device reaches 3.56V.
Step xi: the second start-up module of the terminal device loads the respective ICs in the terminal device in the Kernel phase.
Optionally, after entering a Kernel stage, the terminal equipment lights up a screen and loads each IC; and then, the terminal equipment continues to execute the starting flow of the terminal equipment, and enters a loading operating system stage (such as an Android stage, and executes an upper-layer starting flow).
Optionally, responding to a starting operation of a user, and displaying a starting interface when the terminal equipment is successfully started; or after entering the stage of loading the operating system, the terminal equipment is successfully started and a starting interface is displayed, which is not limited.
Taking a terminal device as a mobile phone as an example, as shown in fig. 12, in response to a startup operation of a user, the mobile phone is started successfully, and a main interface of the mobile phone is displayed after the startup is successful.
It can be understood that in the embodiment of the present application, the internal resistance of the terminal device increases due to the aging of the battery of the terminal device, so that the terminal device has a problem of repeatedly entering the Kernel phase. Based on this, after the terminal device changes the battery, the terminal device can restore the voltage threshold value that enters the Kernel phase. For example, the terminal device may store the first voltage threshold value in the preset storage partition, and subsequently, when the battery voltage of the terminal device reaches the first voltage threshold value, the terminal device enters the Kernel phase.
In the scheme, after the battery is replaced, the terminal equipment can enter a Kernel stage when the battery voltage of the terminal equipment reaches a first voltage threshold value, and a new voltage threshold value (namely a target voltage threshold value) is not required to be calculated, so that the power consumption of the terminal equipment can be reduced, and the service life of the terminal equipment is prolonged.
Fig. 13 is a schematic flow chart of a charging method according to an embodiment of the present application, and as shown in fig. 13, the method may include the following steps.
Step 301: under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts charging and enters a starting flow of the terminal equipment; the starting process of the terminal equipment comprises an ABL stage and a Kernel stage.
Step 302: entering a Kernel stage at a first time point; at a first time point, the battery voltage of the terminal equipment is a first voltage threshold value; the first voltage threshold value is a voltage threshold value when the ABL stage enters the Kernel stage and is preconfigured by the terminal equipment.
Step 303: at a second point in time, the ABL phase is entered.
Step 304: and at a third time point, when the battery voltage of the terminal equipment reaches the first voltage threshold value, the Kernel phase is not entered.
Step 305: entering a Kernel stage at a fourth time point, and starting up successfully; and at a fourth time point, the battery voltage of the terminal equipment is a second voltage threshold value, and the second voltage threshold value is larger than the first voltage threshold value.
The descriptions of steps 301 to 305 may refer to steps 201 to 202 and the descriptions of steps i to xi are not repeated herein.
In some embodiments, the method further comprises: the terminal equipment replaces a battery; and under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts to charge and enters a starting flow of the terminal equipment. At a fifth time point, entering a Kernel phase; and at a fifth time point, the battery voltage of the terminal equipment is the first voltage threshold value.
The content described in each embodiment of the present application can be explained and the technical solutions described in other embodiments of the present application can be applied to other embodiments, and the technical features described in each embodiment can be combined with the technical features in other embodiments to form a new solution.
The embodiment of the application provides a terminal device, which can comprise: a memory and one or more processors; the memory has stored therein computer program code comprising computer instructions which, when executed by the processor, cause the terminal device to perform the various functions or steps described above as being performed by the terminal device. The structure of the terminal device may refer to the structure of the terminal device 100 shown in fig. 7 described above.
The embodiment of the application also provides a chip system which is applied to the terminal equipment. As shown in fig. 14, the chip system 1100 includes at least one processor 1101 and at least one interface circuit 1102. The processor 1101 may be the processor 110 shown in fig. 7 in the above embodiment. The interface circuit 1102 may be, for example, an interface circuit between the processor 110 and an external memory; or as interface circuitry between the processor and the internal memory 121.
The processor 1101 and interface circuit 1102 may be interconnected by wires. For example, interface circuit 1102 may be used to receive signals from other devices (e.g., a memory of electronic device 100). For another example, the interface circuit 1102 may be used to send signals to other devices (e.g., the processor 1101). The interface circuit 1102 may, for example, read instructions stored in a memory and send the instructions to the processor 1101. The instructions, when executed by the processor 1101, may cause the electronic device to perform the various functions or steps performed by the handset in the above-described embodiments. Of course, the system-on-chip may also include other discrete devices, which are not particularly limited in accordance with embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium, which comprises computer instructions, when the computer instructions run on the terminal equipment, the terminal equipment is caused to execute the functions or steps executed by the terminal equipment in the embodiment of the method.
The embodiment of the application also provides a computer program product, which when run on a computer, causes the computer to execute the functions or steps executed by the terminal device in the above method embodiment.
It should be noted that the terms "first" and "second" and the like in the description, the claims and the drawings of the present application are used for distinguishing between different objects and not for describing a particular sequential order. The terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one (item)" means one or more. "plurality" means two or more. "at least two (items)" means two or three and more. And/or, for describing the association relationship of the association object, means that three relationships may exist. For example, "a and/or B" may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural. The terms "…" and "if" refer to a process that is performed under an objective condition, and are not intended to be limiting, nor are they intended to require a judgment in terms of implementation, nor are they intended to be limiting.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion that may be readily understood.
It will be apparent to those skilled in the art from this description that the above-described functional modules are merely illustrated in terms of division for convenience and brevity, and in practical applications, the above-described functional modules may be allocated to different functional modules according to the system, that is, the internal structure of the apparatus may be divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should 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 (15)

1. A charging method, applied to a terminal device, the method comprising:
under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts charging and enters a starting flow of the terminal equipment; the starting process of the terminal equipment comprises an application program boot loader ABL stage and a Kernel stage;
after entering the ABL stage, when the battery voltage of the terminal equipment reaches a first voltage threshold value, not entering the Kernel stage; the first voltage threshold value is a voltage threshold value which is preconfigured by the terminal equipment and is obtained when the ABL stage enters the Kernel stage;
the battery voltage of the terminal equipment reaches a second voltage threshold value, enters the Kernel stage, and is started successfully; wherein the second voltage threshold is greater than the first voltage threshold.
2. The method of claim 1, wherein the battery voltage of the terminal device reaches a second voltage threshold, entering the Kernel phase, comprising:
entering the Kernel stage based on the fact that the battery voltage of the terminal equipment reaches the second voltage threshold value, and the second voltage threshold value is larger than a target voltage threshold value;
the target voltage threshold value is a minimum voltage threshold value which is determined based on the charge-discharge period of the battery of the terminal equipment and is allowed to enter the Kernel stage.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
the terminal equipment replaces a battery;
and under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts to charge, and enters the Kernel stage when the battery voltage of the terminal equipment reaches the first voltage threshold value.
4. The method of claim 2, wherein determining the target voltage threshold based on a charge-discharge cycle of a battery of the terminal device comprises:
acquiring the first voltage threshold value;
determining a voltage adjustment value related to the charge-discharge period according to the charge-discharge period;
And determining the target voltage threshold value according to the first voltage threshold value and the voltage adjustment value.
5. The method according to claim 4, wherein the method further comprises:
acquiring a third voltage threshold, wherein the third voltage threshold is the voltage threshold of the Kernel stage of the starting flow of the terminal equipment entering last time;
and if the third voltage threshold value is smaller than the target voltage threshold value, taking the target voltage threshold value as the voltage threshold value when the Kernel stage of the starting flow of the terminal equipment is entered.
6. The method of claim 5, wherein the method further comprises:
if the third voltage threshold is greater than or equal to the target voltage threshold and is smaller than the difference between the fourth voltage threshold and the voltage adjustment stepping value, the second voltage threshold is used as the voltage threshold when the Kernel stage of the starting flow of the terminal equipment is entered this time;
the fourth voltage threshold is a preset maximum voltage threshold which is allowed to enter the Kernel stage, and the second voltage threshold is the sum of the third voltage threshold and a voltage adjustment stepping value; the voltage adjustment stepping value is an adjustment interval of a voltage threshold value preset by the terminal equipment.
7. The method of claim 1, wherein the battery voltage of the terminal device reaches a second voltage threshold, entering the Kernel phase, comprising:
detecting the reason that the terminal equipment is powered off after the terminal equipment enters an ABL stage;
if the shutdown reason of the terminal equipment is that the electric quantity of the terminal equipment is zero, the battery voltage of the terminal equipment reaches a second voltage threshold value, and the Kernel stage is entered.
8. The method according to any of claims 4-6, wherein the terminal device comprises a target memory partition, and wherein the determining the target voltage threshold value comprises:
reading the charge-discharge period and the first voltage threshold value from the target memory partition;
and determining the target voltage threshold according to the charge-discharge period and the first voltage threshold.
9. The method according to claim 1 or 2, wherein the start-up procedure of the terminal device further comprises a load operating system phase, the method further comprising:
responding to the starting operation of a user, and displaying a starting interface by the terminal equipment; or alternatively, the process may be performed,
and after entering the stage of loading the operating system, the terminal equipment displays a starting interface.
10. A charging method, applied to a terminal device, the method comprising:
under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts charging and enters a starting flow of the terminal equipment; the starting process of the terminal equipment comprises an application program boot loader ABL stage and a Kernel stage;
at a first point in time, entering the Kernel phase; the battery voltage of the terminal equipment at the first time point is a first voltage threshold value; the first voltage threshold value is a voltage threshold value which is preconfigured by the terminal equipment and is obtained when the ABL stage enters the Kernel stage;
at a second point in time, entering the ABL stage;
at a third time point, when the battery voltage of the terminal equipment reaches the first voltage threshold value, not entering the Kernel stage;
at a fourth time point, entering the Kernel stage, and starting up successfully; and the battery voltage of the terminal equipment is a second voltage threshold value at the fourth time point, wherein the second voltage threshold value is larger than the first voltage threshold value.
11. The method of claim 10, wherein the terminal device enters the Kernel phase, comprising:
Entering the Kernel stage based on the fact that the battery voltage of the terminal equipment reaches the second voltage threshold value, and the second voltage threshold value is larger than a target voltage threshold value;
the target voltage threshold value is a minimum voltage threshold value which is determined based on the charge-discharge period of the battery of the terminal equipment and is allowed to enter the Kernel stage.
12. The method according to claim 10 or 11, characterized in that the method further comprises:
the terminal equipment replaces a battery;
under the condition that the electric quantity of the terminal equipment is zero, the terminal equipment starts charging and enters a starting flow of the terminal equipment;
at a fifth point in time, entering the Kernel phase; and at the fifth time point, the battery voltage of the terminal equipment is a first voltage threshold value.
13. A terminal device, comprising:
a memory and one or more processors;
the memory has stored therein computer program code comprising computer instructions; the computer instructions, when executed by the processor, cause the terminal device to perform the method of any of claims 1-9; alternatively, the method of any of claims 10-12 is performed.
14. A chip system for application to a terminal device, the chip system comprising:
at least one processor and an interface;
the interface is used for receiving the instruction and transmitting the instruction to the at least one processor; the at least one processor executing the instructions to cause the terminal device to perform the method of any of claims 1-9; alternatively, the method of any of claims 10-12 is performed.
15. A computer readable storage medium comprising computer instructions which, when run on a terminal device, cause the terminal device to perform the method of any of claims 1-9; alternatively, the method of any of claims 10-12 is performed.
CN202311129740.0A 2023-09-04 2023-09-04 Charging method and terminal equipment Active CN116865407B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311129740.0A CN116865407B (en) 2023-09-04 2023-09-04 Charging method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311129740.0A CN116865407B (en) 2023-09-04 2023-09-04 Charging method and terminal equipment

Publications (2)

Publication Number Publication Date
CN116865407A true CN116865407A (en) 2023-10-10
CN116865407B CN116865407B (en) 2024-03-01

Family

ID=88222006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311129740.0A Active CN116865407B (en) 2023-09-04 2023-09-04 Charging method and terminal equipment

Country Status (1)

Country Link
CN (1) CN116865407B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130044135A (en) * 2011-10-21 2013-05-02 삼성전자주식회사 Method and apparatus for controlling charging in electronic device
CN107819934A (en) * 2017-10-12 2018-03-20 深圳天珑无线科技有限公司 Charge prompting method, apparatus, terminal and storage medium
CN112805987A (en) * 2018-11-21 2021-05-14 深圳市欢太科技有限公司 Starting-up process control method, starting-up process control device and terminal equipment
CN115514031A (en) * 2021-06-22 2022-12-23 Oppo广东移动通信有限公司 Charging control method and device, computer equipment and storage medium
CN115642674A (en) * 2022-11-10 2023-01-24 维沃移动通信有限公司 Charging control method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130044135A (en) * 2011-10-21 2013-05-02 삼성전자주식회사 Method and apparatus for controlling charging in electronic device
CN107819934A (en) * 2017-10-12 2018-03-20 深圳天珑无线科技有限公司 Charge prompting method, apparatus, terminal and storage medium
CN112805987A (en) * 2018-11-21 2021-05-14 深圳市欢太科技有限公司 Starting-up process control method, starting-up process control device and terminal equipment
CN115514031A (en) * 2021-06-22 2022-12-23 Oppo广东移动通信有限公司 Charging control method and device, computer equipment and storage medium
CN115642674A (en) * 2022-11-10 2023-01-24 维沃移动通信有限公司 Charging control method and device and electronic equipment

Also Published As

Publication number Publication date
CN116865407B (en) 2024-03-01

Similar Documents

Publication Publication Date Title
EP3355223B1 (en) Unlock method and mobile terminal
US9996142B2 (en) Selective power management for pre-boot firmware updates
US9098303B2 (en) Portable computing device providing operating system for host devices
CA2630282C (en) Method and system for carrying multiple suspended runtime images
CN106712179B (en) Method and device for realizing reverse charging
CN103491248B (en) A kind of method of low electricity start and subscriber equipment
EP3926466A1 (en) Electronic device which prefetches application and method therefor
US20120030454A1 (en) System and method for dynamically configuring processing speeds in a wireless mobile telecommunications device
GB2463809A (en) Peripheral device operation method, peripheral device and host
CN102135923A (en) Method for integrating operating system into BIOS (Basic Input/Output System) chip and method for starting operating system
CN116865407B (en) Charging method and terminal equipment
CN116315185B (en) Electronic device and battery management method
CN101727333A (en) Method for updating firmware in microprocessor and firmware updating system
CN115291951A (en) UEFI (unified extensible firmware interface) starting method and device, electronic equipment and storage medium
US10417030B2 (en) Apparatus and method for compile time construction of memory structures
CN116643778B (en) Application program optimization method and electronic equipment
CN117093278B (en) Kernel shutdown method, electronic device and storage medium
CN112701759B (en) Control method of terminal equipment, storage medium and terminal equipment
CN112821506B (en) Mobile terminal charging control method and device, storage medium and mobile terminal
CN111782286B (en) Control method and electronic equipment
CN107589820B (en) Mobile terminal, current setting method thereof, and computer-readable storage medium
CN108628724A (en) A kind of method and terminal of display charge information
CN115994346A (en) Fingerprint application program loading method and device, electronic equipment and medium
CN111966415A (en) Method for modifying starting item based on EEPROM
CN116126122A (en) Terminal warehouse time increasing method and device and electronic equipment

Legal Events

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