Disclosure of Invention
The present disclosure provides a charging control method, apparatus, terminal device, electronic device, and computer-readable storage medium, to at least solve the problem in the related art that it is difficult to dynamically configure a charging cutoff function, and it is not possible to flexibly implement charging control. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a charge control method including: when the terminal equipment is in a charging state, acquiring the current charging current of the terminal equipment; and if the charging current is smaller than a first current threshold value, controlling the terminal equipment to be switched from a charging state to a non-charging state, wherein the first current threshold value is determined according to the state information of the battery of the terminal equipment.
In one embodiment of the present disclosure, the method further comprises: determining a first current threshold value through a preset corresponding relation between state information and the first current threshold value based on the state information, wherein the state information at least comprises one of the following: the temperature of the battery and the battery vendor identification.
In an embodiment of the present disclosure, the controlling the terminal device to switch from the charging state to the non-charging state if the charging current is smaller than a first current threshold includes: and if the charging current is smaller than the first current threshold, controlling a power management integrated circuit chip of the terminal equipment to stop outputting the charging current so as to control the terminal equipment to be switched from a charging state to a non-charging state.
In an embodiment of the present disclosure, the controlling, if the charging current is smaller than the first current threshold, the power management integrated circuit chip of the terminal device to stop outputting the charging current includes: and if the charging current is smaller than the first current threshold and the cutoff zone bit of the electricity meter of the terminal equipment is obtained, controlling the power management integrated circuit chip to stop outputting the charging current.
In an embodiment of the present disclosure, the controlling the terminal device to switch from the charging state to the non-charging state if the charging current is smaller than a first current threshold includes: and if the charging current is smaller than the first current threshold value and the power management integrated circuit chip of the terminal equipment does not stop outputting the charging current, controlling the power management integrated circuit chip to disconnect a charging loop of the battery when the charging current is lower than a second current threshold value so as to control the terminal equipment to be switched from a charging state to an uncharged state.
In one embodiment of the present disclosure, the second current threshold is a maximum current threshold set by the power management integrated circuit chip.
In an embodiment of the present disclosure, before controlling the terminal device to switch from the charging state to the non-charging state if the charging current is smaller than the first current threshold, the method further includes: judging whether the terminal equipment is in a constant current charging mode or not according to the charging current; and if the terminal equipment is in a constant current charging mode, judging whether the charging current is smaller than the first current threshold value.
According to a second aspect of the embodiments of the present disclosure, there is provided a charge control device including: the terminal equipment comprises an acquisition module, a charging module and a charging module, wherein the acquisition module is configured to acquire the current charging current of the terminal equipment when the terminal equipment is in a charging state; the charging control module is configured to execute the step of controlling the terminal device to be switched from a charging state to a non-charging state if the charging current is smaller than a first current threshold value, wherein the first current threshold value is determined according to the state information of the terminal device battery.
In one embodiment of the present disclosure, the apparatus further comprises: a determining module configured to perform determining a first current threshold value through a correspondence between preset state information and the first current threshold value based on the state information, wherein the state information includes at least one of: the temperature of the battery and the battery vendor identification.
In one embodiment of the present disclosure, the charging control module is configured to perform: and if the charging current is smaller than the first current threshold, controlling a power management integrated circuit chip of the terminal equipment to stop outputting the charging current so as to control the terminal equipment to be switched from a charging state to a non-charging state.
In an embodiment of the present disclosure, the charging control module is further configured to perform: and if the charging current is smaller than the first current threshold and the cutoff zone bit of the electricity meter of the terminal equipment is obtained, controlling the power management integrated circuit chip to stop outputting the charging current.
In an embodiment of the present disclosure, the charging control module is further configured to perform: if the charging current is smaller than the first current threshold value and the power management integrated circuit chip of the terminal equipment does not stop outputting the charging current, the power management integrated circuit chip is controlled to disconnect the charging loop of the battery when the charging current is lower than the second current threshold value so as to control the terminal equipment to be switched from a charging state to an uncharged state.
In one embodiment of the present disclosure, the second current threshold is a maximum current threshold set by the power management integrated circuit chip.
In one embodiment of the present disclosure, the charging control module is further configured to perform: judging whether the terminal equipment is in a constant current charging mode or not according to the charging current; and if the terminal equipment is in a constant current charging mode, judging whether the charging current is smaller than the first current threshold value.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to execute the instructions to implement the charging control method according to the first aspect of the embodiment of the disclosure.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, wherein instructions of the computer-readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the charging control method according to the first aspect of the embodiments of the present disclosure.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: the second current threshold value can be determined according to the acquired temperature of the battery and the characteristic parameters of the battery, and when the charging current of the battery is detected to be lower than the second current threshold value, the power management integrated circuit chip is controlled to stop outputting the charging current. Therefore, the second current threshold value can be dynamically adjusted according to the temperature of the battery and the characteristic parameters of the battery, so that the charging control is flexibly realized, and the charging cut-off function is dynamically configured.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a charging control method according to an exemplary embodiment, and as shown in fig. 1, the charging control method according to the embodiment of the present disclosure may include the following steps.
S101, when the terminal equipment is in a charging state, the current charging current of the terminal equipment is obtained.
It should be noted that the execution subject of the charging control method according to the embodiment of the present disclosure is the charging control device according to the embodiment of the present disclosure, and the device may be disposed in an electronic device, such as a terminal device, to execute the charging control method according to the embodiment of the present disclosure.
The embodiment of the disclosure can be applied to a scene of high-power charging or charging batteries of multiple suppliers, so as to flexibly realize charging control, dynamically configure a charging cut-off function, avoid the risk of overcharging of the batteries, and avoid the safety problems of influencing the service life of the batteries and even leading to battery explosion and the like due to overcharging.
According to the embodiment of the disclosure, when the terminal device is in a charging state, the charging current of the terminal device is acquired, so that charging control is performed according to the charging current.
In some embodiments, when the terminal device is in a charging state, a charging current may be output through a Power Management Integrated Circuit (PMIC) chip to charge a battery of the terminal device.
In some embodiments, the charging current may be obtained by an electricity meter in the battery pack.
And S102, if the charging current is smaller than a first current threshold value, controlling the terminal equipment to be switched from a charging state to a non-charging state, wherein the first current threshold value is determined according to the state information of the battery of the terminal equipment.
The technical personnel in the field can understand that when the battery is charged, the constant current charging mode is firstly started, along with the continuous rise of the voltage, when the cut-off voltage of the battery is reached, the constant voltage charging mode needs to be switched to, at the moment, the current is continuously reduced until the charging is finished, and in order to avoid the overcharge of the battery, the current threshold value needs to be set as the cut-off current to stop the charging in time when the charging is finished.
In the embodiment of the disclosure, the acquired charging current is determined in the process of charging the battery, so that the terminal device is controlled to be switched from the charging state to the non-charging state when the charging current is smaller than the first current threshold.
The first current threshold is determined according to state information of the terminal device battery, where the state information may include, but is not limited to, a temperature of the battery, a vendor identifier of the battery, a charge cut-off voltage of the battery, a cell type, and the like, and the disclosure is not limited thereto. Each battery supplier has a corresponding supplier identifier, and the suppliers of the battery can be distinguished through the supplier identifiers.
It is easy to understand that in the process of charging the battery, the temperature of the battery, the supplier identification of the battery, the type of the battery core and other information can be used as important parameters for charging control, so that the charging control can be conveniently carried out in the normal working state of the battery, and the problem that the service life of the battery is influenced and even potential safety hazards are caused due to continuous charging of the battery when the temperature is too high is avoided.
In an embodiment, when the terminal device detects that a charger is inserted, the terminal device may obtain a supplier identifier of the battery by identifying the identifier of the battery, and may further send a request to a fuel gauge in the battery pack to obtain status information of the battery, such as the temperature of the battery, where in this embodiment, the status information may include, but is not limited to, at least one of: the temperature of the battery and the vendor identification of the battery.
In some embodiments, the first current threshold may be determined by a correspondence between preset state information and the first current threshold based on the state information.
For example, a first current threshold configuration table may be searched according to the temperature and the supplier identifier, and an appropriate first current threshold may be selected as the cutoff current of the charging, as shown in table 1, the first current threshold configuration table may include a correspondence relationship between the temperature-the supplier identifier-the first current threshold, and the first current threshold table may be obtained through history accumulation or data sharing and stored in a database in advance.
TABLE 1 first Current threshold configuration Table
For example, if the temperature of the battery is 20 degrees at the present moment and the battery supplier identifier is a, 850mA may be selected as the first current threshold.
According to the charging control method provided by the embodiment of the disclosure, when the terminal device is in a charging state, the current charging current of the terminal device is obtained, and if the charging current is smaller than a first current threshold value, the terminal device is controlled to be switched from the charging state to an uncharged state, wherein the first current threshold value is determined according to the state information of the battery of the terminal device. Therefore, the high cut-off current required by high-power charging can be provided, the first current threshold value, namely the cut-off current, is dynamically adjusted according to the temperature difference of the batteries at different time points, the difference of different battery suppliers and other state information, the charging is finished in time when the charging is finished, the charging control is flexibly realized, the charging cut-off function is dynamically configured, and the possible battery service life loss and the possible battery explosion risk caused by the overcharge phenomenon are effectively avoided.
In one embodiment, the first current threshold may be dynamically adjusted by periodically acquiring the temperature, that is: in the charging process, the temperature of the battery is cyclically obtained based on a preset time interval, and the first current threshold is dynamically adjusted according to the current temperature, as shown in fig. 2, the charging control method may include the following steps:
s201, acquiring the temperature of the battery.
S202, adjusting the first current threshold according to the temperature of the battery.
S203, judging whether the charging current of the battery is smaller than a first current threshold value.
If yes, go to step S204; if not, go to step S205;
and S204, controlling the power management integrated circuit chip to stop outputting the charging current.
And S205, judging whether a preset time interval is reached.
If yes, returning to the step S201; if not, the process returns to step S203.
It should be noted that, for implementation of the embodiments of the present disclosure, reference may be made to the explanation of the embodiments, and details are not described here.
Further, on the basis of any of the above embodiments, the step S102 of controlling the terminal device to switch from the charging state to the non-charging state if the charging current is smaller than the first current threshold may specifically include: if the charging current is smaller than the first current threshold, a Power Management Integrated Circuit (PMIC) chip of the control terminal device stops outputting the charging current, so that the control terminal device is switched from a charging state to a non-charging state.
As a possible implementation, a current threshold of the electricity meter may be set on the electricity meter of the terminal device before the charging current is acquired, when the electricity meter detects that the charging current is smaller than the current threshold of the electricity meter, the electricity meter updates the cut-off flag bit, so that the present disclosure obtains the cut-off flag bit of the electricity meter by reading when the charging current is smaller than the first current threshold, verifies whether the charging current is smaller than the current threshold of the electricity meter according to the cut-off flag bit, and controls the power management integrated circuit chip to stop outputting the charging current if it is determined that the charging current is smaller than the current threshold of the electricity meter through the cut-off flag bit.
In some embodiments, as shown in table 1, assuming that the temperature of the battery at a certain time is 30 degrees, the supplier is supplier a, 850mA may be selected as the first current threshold, and a maximum 1000mA of the first current thresholds of different suppliers and different temperatures is selected as the current threshold of the current meter, when the charging enters the constant voltage mode, the charging current is gradually decreased, and when the charging current is lower than the current threshold 1000mA of the current meter, the cut-off flag of the current meter is set to 1, and when the charging current continues to decrease to the first current threshold 850mA, the cut-off flag is obtained, and if the cut-off flag is set to 1, the power management integrated circuit chip is controlled to stop outputting the charging current.
Further, in addition to any of the above embodiments, the step S102 of controlling the terminal device to switch from the charging state to the non-charging state if the charging current is smaller than the first current threshold may further include: if the charging current is smaller than the first current threshold and the power management integrated circuit chip does not stop outputting the charging current, the power management integrated circuit chip of the control terminal device disconnects a charging loop of the battery when the charging current is lower than the second current threshold so as to control the terminal device to be switched from a charging state to an uncharged state.
Optionally, a second current threshold of the power management integrated circuit chip may be set before the charging current is obtained, so that when the charging current is smaller than the first current threshold but the power management integrated circuit chip fails to stop outputting the charging current, the power management integrated circuit chip is controlled to disconnect the charging loop of the battery when the charging current is lower than the second current threshold, thereby implementing hardware power-off through the second current threshold of the power management integrated circuit chip, and preventing overcharge of the battery.
In one embodiment, the second current threshold may be a maximum current threshold set by the power management integrated circuit chip.
Therefore, the embodiment of the disclosure realizes three aspects of charge cut-off by using the first current threshold in combination with the current threshold of the ammeter and the second current threshold of the power management integrated circuit chip, ensures that the cut-off current can be dynamically selected according to the state information of the terminal device battery, and simultaneously uses the ammeter and the power management integrated circuit chip as the guarantee of charge control, thereby enhancing the effect and reliability of charge control.
Further, on the basis of the above embodiment, before the step S102 of "if the charging current is smaller than the first current threshold, controlling the terminal device to switch from the charging state to the non-charging state" the embodiment of the present disclosure may further include a determination process of the charging current, and specifically, the method may include the following steps:
and a, judging whether the terminal equipment is in a constant current charging mode or not according to the charging current.
In some embodiments, whether the terminal device is in the constant current charging mode, that is, whether the charging current changes, is determined according to the acquired charging current.
And b, if the terminal equipment is in the constant current charging mode, judging whether the charging current is smaller than a first current threshold value.
In some embodiments, if the terminal device is in the constant current charging mode, it is determined whether the charging current is smaller than a preset current threshold, so that when the charging current is smaller than the preset current threshold, the terminal device is controlled to switch from the charging state to the non-charging state, and the battery is prevented from being overcharged. And if the terminal equipment is not in the constant current charging mode, continuously detecting the charging current of the terminal equipment, and judging whether the charging current of the terminal equipment is in the constant current charging mode.
As a possible embodiment, the charging current of the terminal device battery in the charging state may be cyclically detected and determined by setting a time interval, for example, the charging current may be determined in a constant current charging mode and a constant voltage charging mode.
Fig. 3 is a block diagram illustrating a charge control device according to an exemplary embodiment. As shown in fig. 3, the charge control device 400 according to the embodiment of the present disclosure includes: an acquisition module 401 and a charging control module 402.
The obtaining module 401 is configured to obtain a current charging current of the terminal device when the terminal device is in a charging state.
And a charging control module 402 configured to perform control of switching the terminal device from the charging state to the non-charging state if the charging current is less than a first current threshold, wherein the first current threshold is determined according to the state information of the terminal device battery.
In one embodiment of the present disclosure, the charge control device further includes: a determining module configured to perform determining the first current threshold value through a preset correspondence between the state information and the first current threshold value based on the state information, wherein the state information includes at least one of: the temperature of the battery and the battery vendor identification.
In one embodiment of the present disclosure, the charging control module 402 is configured to perform: and if the charging current is smaller than the first current threshold, controlling the power management integrated circuit chip of the terminal device to stop outputting the charging current so as to control the terminal device to be switched from the charging state to the non-charging state.
In an embodiment of the present disclosure, the charging control module 402 is further configured to perform: and if the charging current is smaller than the first current threshold and the cutoff zone bit of the electricity meter of the terminal equipment is obtained, controlling the power management integrated circuit chip to stop outputting the charging current.
In an embodiment of the present disclosure, the charging control module 402 is further configured to perform: and if the charging current is smaller than the first current threshold and the power management integrated circuit chip of the terminal equipment does not stop outputting the charging current, controlling the power management integrated circuit chip to disconnect the charging loop of the battery when the charging current is lower than the second current threshold so as to control the terminal equipment to be switched from the charging state to the non-charging state.
In one embodiment of the present disclosure, the second current threshold is a maximum current threshold set by the power management integrated circuit chip.
In one embodiment of the present disclosure, the charging control module 402 is further configured to perform: judging whether the terminal equipment is in a constant current charging mode or not according to the charging current; and if the terminal equipment is in the constant current charging mode, judging whether the charging current is smaller than a first current threshold value.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The charging control apparatus provided in the embodiment of the present disclosure obtains a current charging current of the terminal device when the terminal device is in a charging state, and controls the terminal device to switch from the charging state to an uncharged state if the charging current is smaller than a first current threshold, where the first current threshold is determined according to state information of a battery of the terminal device. Therefore, the high cut-off current required by high-power charging can be provided, the first current threshold value, namely the cut-off current, is dynamically adjusted according to the temperature difference of the batteries at different time points, the difference of different battery suppliers and other state information, the charging is finished in time when the charging is finished, the charging control is flexibly realized, the charging cut-off function is dynamically configured, and the possible battery service life loss and the possible battery explosion risk caused by the overcharge phenomenon are effectively avoided.
Fig. 4 is a block diagram illustrating an electronic device 500 in accordance with an example embodiment.
As shown in fig. 4, the electronic device 500 includes:
a memory 501 and a processor 502, a bus 503 connecting different components (including the memory 501 and the processor 502), wherein the memory 501 stores a computer program, and when the processor 502 executes the program, the charging control method according to the embodiment of the present disclosure is implemented.
Bus 503 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The electronic device 500 typically includes a variety of electronic device readable media. Such media may be any available media that is accessible by electronic device 500 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 501 may also include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)504 and/or cache memory 505. The electronic device 500 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 506 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 4, and commonly referred to as a "hard drive"). Although not shown in FIG. 4, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 503 by one or more data media interfaces. Memory 501 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the disclosure.
A program/utility 508 having a set (at least one) of program modules 507 may be stored, for example, in memory 501, such program modules 507 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 507 generally perform the functions and/or methods of the embodiments described in this disclosure.
The electronic device 500 may also communicate with one or more external devices 509 (e.g., keyboard, pointing device, display 510, etc.), with one or more devices that enable a user to interact with the electronic device 500, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 500 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 512. Also, the electronic device 500 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 513. As shown in FIG. 4, the network adapter 513 communicates with the other modules of the electronic device 500 via the bus 503. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor 502 executes various functional applications and data processing by executing programs stored in the memory 501.
It should be noted that, for the implementation process and the technical principle of the electronic device of the embodiment, reference is made to the foregoing explanation of the charging control method of the embodiment of the present disclosure, and details are not described herein again.
The electronic device provided by the embodiment of the present disclosure may execute the charging control method as described above, and when the terminal device is in the charging state, obtain the current charging current of the terminal device, and if the charging current is smaller than a first current threshold, control the terminal device to switch from the charging state to the non-charging state, where the first current threshold is determined according to the state information of the terminal device battery. Therefore, the high cut-off current required by high-power charging can be provided, the first current threshold value, namely the cut-off current, is dynamically adjusted according to the temperature difference of the batteries at different time points and the difference of state information of different battery suppliers and the like, and the charging is finished in time when the charging is finished, so that the charging control is flexibly realized, the charging cut-off function is dynamically configured, and the possible loss of the service life of the batteries and the explosion risk of the batteries caused by the overcharge phenomenon are effectively avoided.
In order to implement the above embodiments, the present disclosure also proposes a computer-readable storage medium.
Wherein the instructions in the computer readable storage medium, when executed by a processor of the electronic device, enable the electronic device to perform the charging control method as previously described. Alternatively, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.