CN117639155A - Charging control method, device, terminal and computer readable storage medium - Google Patents

Charging control method, device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN117639155A
CN117639155A CN202311495892.2A CN202311495892A CN117639155A CN 117639155 A CN117639155 A CN 117639155A CN 202311495892 A CN202311495892 A CN 202311495892A CN 117639155 A CN117639155 A CN 117639155A
Authority
CN
China
Prior art keywords
current
terminal
charging current
adapter
determining
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.)
Pending
Application number
CN202311495892.2A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202311495892.2A priority Critical patent/CN117639155A/en
Publication of CN117639155A publication Critical patent/CN117639155A/en
Pending legal-status Critical Current

Links

Classifications

    • 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 relates to a charging control method, a charging control device, a terminal and a computer readable storage medium. The method comprises the following steps: under the condition that a charging passage of a terminal is closed, if a power-on data packet sent by an adapter is received, controlling the charging passage to be conducted; adjusting initial charging current according to a preset current step length, and determining target charging current; and controlling a power management chip of the terminal to charge a battery of the terminal according to the target charging current. The method can avoid the problem of intermittent charging in the process of quick charging of the terminal.

Description

Charging control method, device, terminal and computer readable storage medium
Technical Field
The present disclosure relates to the field of fast charging technologies, and in particular, to a charging control method, a charging control device, a charging control terminal, and a computer readable storage medium.
Background
The USB power transfer (USB Power Delivery, USB PD) protocol is one of the current mainstream fast-charging protocols, which is a USB charging standard and technology established by the USB IF association, and the maximum power supply capability of the USB power transfer (USB Power Delivery, USB PD) protocol can reach 100W, and the USB power transfer protocol is applied to the power supplies of various devices.
In the conventional technology, when a USB PD protocol is used for fast charging, in the process of applying voltage and current to a PD adapter, a power management chip of the terminal maintains a current value set before, and after the terminal receives an acceptance message of the PD adapter, the charging voltage and current of the power management chip are adjusted to be the voltage and current applied to the adapter. However, in the conventional art, a problem of charge interruption may occur.
Disclosure of Invention
The embodiment of the application provides a charging control method, a charging control device, a terminal and a computer readable storage medium, which can avoid the problem of intermittent charging in the process of quick charging of the terminal.
In a first aspect, an embodiment of the present application provides a charging control method, including:
under the condition that a charging passage of a terminal is closed, if a power-on data packet sent by an adapter is received, controlling the charging passage to be conducted;
adjusting initial charging current according to a preset current step length, and determining target charging current;
and controlling a power management chip of the terminal to charge a battery of the terminal according to the target charging current.
In a second aspect, an embodiment of the present application provides a charging control device, including:
the first control module is used for controlling the charging passage to be conducted if a power-on data packet sent by the adapter is received under the condition that the charging passage of the terminal is closed;
the first determining module is used for adjusting the initial charging current according to a preset current step length and determining a target charging current;
and the second control module is used for controlling the power management chip of the terminal to charge the battery of the terminal according to the target charging current.
In a third aspect, an embodiment of the present application provides a terminal, including a memory and a processor, where the memory stores a computer program, where the computer program when executed by the processor causes the processor to perform the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method according to the first aspect.
According to the charging control method, the device, the terminal and the computer readable storage medium, before the power-on data packet sent by the adapter is received, the charging channel of the terminal is closed, the charging channel between the adapter and the terminal is not conducted, but the charging circuit is controlled to be conducted under the condition that the power-on data packet sent by the adapter is received, the initial charging current is adjusted according to the preset current step length, the target charging current is determined, the power management chip of the terminal is controlled to charge the battery of the terminal according to the determined target charging current, so that the initial charging current is gradually adjusted according to the preset current step length in the process of determining the target charging current, and the final target charging current gradually approaches to the application current of the terminal, thereby avoiding the problem that the terminal is interrupted in the process of quick charging due to unstable direct current pulling in the process of determining the target charging current.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a diagram of an application environment for a charge control method in one embodiment;
FIG. 2 is a flow chart of a method of charge control in one embodiment;
FIG. 3 is a flow chart of a method of charge control in another embodiment;
FIG. 4 is a flow chart of a method of charge control in another embodiment;
FIG. 5 is a flow chart of a method of charge control in another embodiment;
FIG. 6 is a flow chart of a method of charge control in one embodiment;
FIG. 7 is a block diagram of a charge control device in one embodiment;
fig. 8 is a block diagram showing a structure of a charge control device in another embodiment;
fig. 9 is a block diagram showing a structure of a charge control device in another embodiment;
fig. 10 is a block diagram showing a structure of a charge control device in another embodiment;
Fig. 11 is a block diagram showing a structure of a charge control device in another embodiment;
fig. 12 is a schematic diagram of an internal structure of a terminal in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
Fig. 1 is a schematic view of an application environment of a charging control method in an embodiment. As shown in fig. 1, the application environment includes a terminal 102 and an adapter 104, the terminal 102 communicates with the adapter 104 through a network, and the adapter 104 can charge the terminal 102. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices, the adapter 104 may be a charger of various models, a mobile power supply, or various terminals such as notebook computers and tablet computers, and it will be understood that if the adapter 104 is a terminal, for example, when the adapter 104 is a notebook computer and the terminal 102 is a smartphone, the adapter 104 may charge the smartphone through the notebook computer, and, for example, when the adapter 104 is a notebook computer and the terminal 102 is a smartwatch, the adapter may charge the smartwatch through the notebook computer. In addition, it should be noted that, in the embodiment of the present application, the adapter 104 is an adapter supporting fast charging, and the charging control method provided in the embodiment of the present application is applicable to a fast charging scenario.
In one embodiment, as shown in fig. 2, a charging control method is provided, and the method is applied to the terminal in fig. 1 for illustration, and includes the following steps:
s201, when the charging path of the terminal is closed, if a power-on packet sent by the adapter is received, the charging path is controlled to be turned on.
Firstly, it should be noted that when the terminal charges through the adapter, the communication connection needs to be established between the terminal and the adapter, and the flow of establishing the communication connection between the terminal and the adapter may be: the method comprises the steps that an adapter sends an output power data packet capability source to a terminal, the terminal analyzes the data packet according to USBPD specifications to obtain all voltage and current list pairs supported by the adapter, then the terminal replies an adapter reply signal packet GoodCRC (cyclic redundancy check) to indicate that the terminal receives the data packet sent by the adapter, the terminal selects one voltage and current pair from the capability source according to own power configuration and adds the voltage and current pair to a payload of a request message, then a strategy manager of the terminal couples a modulation-demodulation signal to a VBUS (digital versatile) DC level to send to the adapter, the adapter replies a terminal reply signal after receiving the message, the adapter checks whether the applied voltage of the terminal is reasonable or not, if so, the adapter sends a communication packet to the terminal, the terminal replies the adapter reply signal packet GoodCRC, and when the direct voltage and current output of an adapter adjust the power supply reaches the voltage and current requirements in the request message sent before the terminal, the terminal sends a power-on data packet to the terminal, and the terminal replies the adapter reply signal packet GoodCRC.
In this embodiment, the terminal may control the charging circuit of the terminal to be turned off when receiving the communication packet sent by the adapter, and the terminal will prevent the output of the adapter, further, if the adapter checks that the voltage applied by the terminal is reasonable when the charging path is turned off, the adapter will send a power-on data packet to the terminal when the direct-current voltage and current output of the adapter adjusting power supply reach the voltage and current requirements in the request message sent before the terminal, and if the terminal receives the power-on data packet sent by the adapter, the terminal will control the charging path to be turned on to charge the battery of the terminal through the charging path.
S202, adjusting initial charging current according to a preset current step length, and determining target charging current.
In this embodiment, after the terminal controls the charging path to be turned on, the self-adaptive adjustment action of the charging current is started, that is, the initial charging current of the terminal is adjusted according to the preset current step, and it should be noted that the self-adaptive adjustment of the charging current of the terminal is performed because cables are further arranged between the adapter and the terminal, the impedance of different cables is different, and the lengths of different cables are also different, so that the voltage drop from the adapter to the terminal is different, and if the voltage drop is too low, undervoltage (UVP) protection between the adapter and the terminal is triggered. In addition, in this embodiment, the initial charging current of the terminal may be limited to the lowest charging current, for example, the initial charging current may be 500MA, or the initial charging current may be another low current value, which is not limited herein.
Alternatively, in this embodiment, the preset current step may be determined according to the initial charging current, for example, the initial charging current may be determined as a preset current step, and, for example, assuming that the initial charging current is 500MA, the preset current step may also be taken as 500MA, and further, the terminal may adjust the initial charging current step by step according to the determined preset current step, to determine the target charging current of the terminal.
And S203, controlling the power management chip of the terminal to charge the battery of the terminal according to the target charging current.
In this embodiment, the terminal adjusts the initial charging current of the terminal according to the preset current step, after determining the target charging current, the terminal may send the target charging current to the power management chip of the terminal, and control the power management chip to charge the battery of the terminal with the target charging current, so as to realize quick charging of the terminal.
In the charging control method, before the power-on data packet sent by the adapter is received, the charging channel of the terminal is closed, the charging channel between the adapter and the terminal is not conducted, but the charging circuit is controlled to be conducted under the condition that the power-on data packet sent by the adapter is received, the initial charging current is adjusted according to the preset current step length, the target charging current is determined, and the power management chip of the terminal is controlled to charge the battery of the terminal according to the determined target charging current, so that the initial charging current which is gradually adjusted according to the preset current step length is adopted in the process of determining the target charging current, and the final target charging current gradually approaches to the application current of the terminal, so that the problem that the terminal is charged intermittently in the process of quick charging due to unstable direct current in the process of determining the target charging current is avoided.
A detailed procedure of determining the target charging current by the terminal will be described in this embodiment. In one embodiment, as shown in fig. 3, S202 includes:
s301, obtaining the current sum of the initial charging current and the current step.
In this embodiment, the terminal may determine the initial charging current of the battery and the preset current step, and then sum the initial charging current of the terminal and the preset current step to obtain a current sum of the initial charging current of the terminal and the preset current step.
S302, determining a target charging current according to the magnitude relation between the current and the application current.
Firstly, it should be noted that after the terminal establishes a communication connection with the adapter, the terminal may analyze an output power data packet sent by the adapter, and analyze a list of all voltage-current pairs supported by the adapter, for example, the list of all voltage-current pairs supported by the adapter may be: cap 0:mV:5000MA:3000; cap 1 mV:9000MA:3000; cap 2 mV:12000mA:5000; cap 3 mV:15000mA:4330; cap 4:mV:20000MA:3250. It can be seen that the adapter supports 5 voltage-current pairs in total, if the voltage-current required by the terminal is 9V2A at this time, the terminal will match the table, the application voltage is equal to 9V, the voltage of cap 1 will be found, then the current is looked at again, the application current is equal to 2A, less than 3000ma in cap 1, so that the voltage-current of cap 1 can meet the power requirement of the terminal, and therefore the terminal will assemble the application voltage and the application current into a request communication packet to be sent to the adapter.
In this embodiment, the terminal may determine the application current of the terminal based on the request communication packet sent to the adapter, and further determine the target charging current according to the initial charging current and the magnitude relation between the current sum of the preset current step and the application current. Optionally, in this embodiment, the terminal may directly determine the initial charging current as the target charging current according to the magnitude relation between the current and the application current, or may determine the target charging current after adjusting the initial charging current according to the magnitude relation between the current and the application current.
In this embodiment, the terminal first obtains the current sum of the initial charging current and the preset current step length, so that the target charging current of the terminal can be determined according to the magnitude relation between the current sum and the application current, and because the magnitude relation between the initial charging current and the preset current step length and the magnitude relation between the current sum and the application current are considered in the process of determining the target charging current, the initial charging current of the terminal can be adjusted gradually, so that the finally determined target charging current is gradually approaching to the application current of the terminal, and the problem that the terminal is charged intermittently in the process of performing quick charging due to unstable direct current pulling in the process of determining the target charging current is avoided.
In the above scenario of determining the target charging current according to the initial charging current of the terminal and the current sum of the preset current step and the magnitude relation of the application current, the current sum may be greater than the application current and may be less than or equal to the application current, and in this embodiment, a detailed process of determining the target charging current by the terminal according to the current sum and the magnitude relation of the application current will be described. In one embodiment, the step S302 includes:
and S401, if the sum of the currents is larger than the application current, determining the initial charging current as a target charging current.
In this embodiment, if the sum of the initial charging current of the terminal and the preset current step is greater than the application current, it is indicated that the initial charging current meets the charging requirement of the terminal, and at this time, the terminal may determine the initial charging current as the target charging current of the terminal.
And S402, if the sum of the currents is smaller than or equal to the application current, determining a target charging current according to the output voltage of the adapter and a preset voltage threshold.
In this embodiment, if the sum of the initial charging current of the terminal and the current of the preset current step is smaller than or equal to the application current, it is indicated that the initial charging current cannot meet the charging requirement of the terminal, and at this time, the terminal can determine the target charging current of the terminal according to the output voltage of the adapter and the preset voltage threshold. As an alternative implementation manner, in this embodiment, if the terminal determines that the output voltage of the adapter is less than the preset voltage threshold, it is indicated that the charging wire between the terminal and the adapter can only carry such a large current at this time, so the terminal may determine the initial charging current as the target charging current of the terminal. As another alternative implementation manner, in this embodiment, if the terminal determines that the output voltage of the adapter is greater than or equal to the preset voltage threshold, it indicates that the voltage drop consumed by the charging wire between the terminal and the adapter is not too large at this time, and the initial charging current of the terminal may be continuously increased at this time.
In this embodiment, the terminal can determine the initial charging current of the terminal as the target charging current according to the magnitude relation between the initial charging current and the preset current step length and the application current of the terminal, and in the case that the current sum is greater than the application current of the terminal, the voltage drop of the cable between the adapter and the terminal is considered by combining the output voltage of the adapter and the preset voltage threshold value under the condition that the current sum is less than or equal to the application current, and the initial charging current is adjusted step by the preset current step length, so as to avoid the problem that the terminal is charged intermittently in the process of quick charging due to unstable direct current pulling in the process of determining the target charging current.
When the charging path of the terminal is closed and the power-on data packet transmitted from the adapter is received and the charging path is controlled to be on, the charging path of the terminal is controlled to be closed first. In one embodiment, as shown in fig. 4, the method further includes:
s501, in a case where it is determined that the output power of the adapter satisfies the charging power of the terminal, a request communication packet is transmitted to the adapter.
In this embodiment, after the terminal establishes communication connection with the adapter, the terminal may determine whether the output power of the adapter meets the charging power of the terminal by analyzing the output power data packet sent by the adapter, and send a request communication packet to the adapter and request an application voltage and an application current to the adapter when determining that the output power of the adapter meets the charging power of the terminal based on the output power data packet sent by the adapter.
S502, when receiving an acceptance communication packet sent by the adapter based on the request communication packet, the charging path is controlled to be closed by the power management chip.
In this embodiment, after the terminal sends the request communication packet to the adapter, the adapter determines whether the application voltage and the application current applied by the terminal can be satisfied after receiving the request communication packet sent by the terminal, and sends the accept communication packet to the terminal when confirming that the power of the adapter can satisfy the application voltage and the application current of the terminal.
In this embodiment, since the request communication packet sent by the terminal to the adapter is sent by the terminal under the condition that the output power of the adapter meets the charging power of the terminal, which means that the charging requirements of the adapter and the terminal are matched, the reliability of the request communication packet sent by the terminal is ensured, so that the charging channel can be accurately controlled to be closed through the power management chip of the terminal under the condition that the receiving communication packet sent by the adapter based on the request communication packet is received, and the situation that the charging channel is closed by mistake due to the false triggering of triggering is avoided.
At present, the maximum time for voltage and current regulation of the adapter is specified in the fast charging protocol, so that the terminal can receive the power-on data packet sent by the adapter within a certain time interval. In one embodiment, as shown in fig. 5, the method further includes:
s601, when the charging path is closed, a response communication packet for accepting the communication packet is transmitted to the adapter.
In this embodiment, when determining that the charging path is closed, the terminal responds to the reception communication packet transmitted from the adapter, and transmits a response communication packet of the reception communication packet to the adapter through the communication connection with the adapter.
S602, acquiring a time interval between the receiving time of the power-on data packet and the transmitting time of the response communication packet; the power-on data packet is sent by the adapter based on the response communication packet.
In this embodiment, after the terminal sends the response communication packet to the adapter, the adapter may send the power-on data packet to the terminal in response to the response communication packet within a certain time interval, and in this embodiment, the terminal may obtain, after sending the response communication packet, a time interval between a receiving time of the power-on data packet sent by the response communication packet and a sending time of the response communication packet, and determine whether the terminal receives the power-on data packet within a preset time interval.
And S603, if the time interval is smaller than the preset time interval, executing the step of adjusting the initial charging current according to the preset current step length and determining the target charging current.
In this embodiment, if the time interval between the time when the terminal receives the power-on data packet and the time when the terminal transmits the response communication packet is smaller than the preset time interval, it is indicated that the terminal is the power-on data packet received in the preset time interval, the terminal will control the charging path to be turned on, and adjust the initial charging current according to the preset current step, so as to determine the target charging current of the terminal.
In this embodiment, as another alternative implementation manner, if the time interval between the time when the terminal receives the power-on data packet and the time when the terminal sends the response communication packet is greater than the preset time interval, this indicates that the terminal is the power-on data packet that is external to the preset time interval, the time interval when the terminal receives the power-on data packet is longer, the terminal processes the power-on data packet according to the non-standard fast charging adapter, controls the charging path of the terminal to be turned on, determines the initial charging current of the terminal as the target charging current, limits the charging current of the terminal to be the minimum, for example, when the initial charging current of the terminal is 500MA, the terminal may determine the target charging current to be 500MA.
In this embodiment, when the charging path is closed, the terminal sends a response communication packet for receiving the communication packet to the adapter, so that the adapter can send a power-on data packet to the terminal based on the response communication packet, so that the terminal can obtain a time interval between a receiving time of the power-on data packet and a sending time of the response communication packet, and if the time interval between the receiving time of the power-on data packet received by the terminal and the sending time of the response communication packet sent by the terminal is smaller than a preset time interval, the adapter is a standard fast charging adapter, so that accuracy of fast charging of the terminal is ensured, and accordingly initial charging current is adjusted according to a preset current step length, target charging current of the terminal can be accurately determined, and accuracy of target charging current determined by the terminal is ensured.
For easy understanding by those skilled in the art, as shown in fig. 6, the following describes in detail the charge control method provided in the present application in connection with a complete embodiment:
s1, initializing a power transmission adapter Ethernet PD PHY chip in a terminal starting process, judging whether an FSK communication packet is coupled to a vbus or not by the PD PHY chip when the adapter is to be inserted, if not, the PD adapter is not coupled, then running other charging protocols of non-PD, and when the PD PHY is identified, the power management chip and the adapter are identified as a standard external power supply by the power management chip through the BC1.2 general charging protocol by a data line, and setting the charging parameters of the management chip to initial charging current by the terminal.
S2, after the terminal determines that the adapter is the PD adapter, analyzing the output power data packet sent by the adapter, and determining all voltage and current pair lists supported by the adapter.
S3, the terminal determines whether the adapter meets the power requirement of the terminal based on the required voltage and current, under the condition that the adapter meets the power requirement of the terminal, the application voltage and the application current are assembled into a request communication packet and sent to the adapter, the adapter receives the request communication packet and replies a terminal reply signal packet, meanwhile, whether the voltage and the current applied by the mobile phone can be met or not is judged, and if the voltage and the current can be met, the request communication packet is sent to the terminal.
And S4, before the terminal receives the received communication packet sent by the adapter and sends a reply signal packet to the adapter, the terminal stops completely closing a charging channel of the terminal by controlling the power management chip (which can be understood as that the terminal stops the output of the adapter), then the terminal replies the adapter reply signal packet, then the terminal waits for a power-on data packet sent by the adapter, a charging protocol prescribes the voltage of the voltage regulating current of the adapter at the level of 9V, the maximum voltage regulating time is 120ms, the terminal can reserve the waiting time of 200ms, because the terminal has stopped the charging channel, the adapter cannot pull the adapter in the unstable time because the terminal does not pull the load during the time of regulating the voltage and the current, the terminal receives the power-on data packet after the adapter regulates the voltage, if the terminal does not wait for the power-on data packet sent by the adapter in 200ms, the terminal processes according to the non-standard PD adapter, and determines the initial charging current as the target charging current of the terminal.
And S5, if the terminal receives a power-on data packet sent by the adapter in a specified time, the adapter can be determined to be a standard PD adapter, a charging channel is controlled to be conducted, the charging current is limited to the lowest initial charging current, the self-adaptive adjustment action of the charging current is started, for example, the initial charging current ICL is 500MA, then ICL is increased every 500MA, ICL=original ICL+500MA, if ICL is larger than the application current, the final input current of the power management chip is limited to ICL=original ICL-500MA, if ICL < = request_current, whether the VBUS voltage of the terminal is larger than 7.5V is judged, if the VBUS voltage is larger than 7.5V, the wire consumption voltage drop is proved to be too large, the ICL current can be continuously increased at the moment, if the ICL is smaller than or equal to 7.5V, the current which indicates that the charging wire can only carry such large current at the moment, therefore the target charging current of the terminal is limited to ICL=original ICL-500MA, and the initial charging current is determined to be the target charging current of the terminal.
It should be noted that, for the description in the above S1-S5, reference may be made to the description related to the above embodiment, and the effects thereof are similar, which is not repeated here.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a charging control device for realizing the charging control method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in one or more embodiments of the charge control device provided below may refer to the limitation of the charge control method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 7, there is provided a charge control device including: a first control module 10, a first determination module 11 and a second control module 12, wherein:
the first control module 10 is configured to control, when receiving a power-on data packet sent by the adapter and when the charging path of the terminal is closed, the charging path to be turned on.
The first determining module 11 is configured to adjust the initial charging current according to a preset current step, and determine the target charging current.
And a second control module 12 for controlling the power management chip of the terminal to charge the battery of the terminal according to the target charging current.
The charge control device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effects are similar, and will not be described herein.
On the basis of the above embodiment, as shown in fig. 8, optionally, the above first determining module 11 includes: an acquisition unit 111 and a determination unit 112, wherein:
an acquisition unit 111 for acquiring a current sum of the initial charging current and the current step.
And a determining unit 112 for determining a target charging current according to the current and the magnitude relation with the application current.
The charge control device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effects are similar, and will not be described herein.
On the basis of the above embodiment, optionally, the above determining unit 112 is configured to determine the initial charging current as the target charging current if the sum of the currents is greater than the application current; if the sum of the currents is smaller than or equal to the application current, determining a target charging current according to the output voltage of the adapter and a preset voltage threshold.
The charge control device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effects are similar, and will not be described herein.
On the basis of the above embodiment, optionally, the above determining unit 112 is configured to determine the initial charging current as the target charging current if the output voltage is smaller than the voltage threshold; if the output voltage is greater than or equal to the voltage threshold, determining the sum of the currents as a new initial charging current, and repeatedly executing the step of adjusting the initial charging current according to a preset current step size to determine a target charging current.
The charge control device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effects are similar, and will not be described herein.
On the basis of the above embodiment, as shown in fig. 9, optionally, the above apparatus further includes: a first transmission module 13 and a third control module 14, wherein:
A first transmitting module 13, configured to transmit a request communication packet to the adapter when it is determined that the output power of the adapter meets the charging power of the terminal.
And a third control module 14, configured to control, by using the power management chip, the charging path to be closed when receiving an acceptance communication packet sent by the adapter based on the request communication packet.
The charge control device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effects are similar, and will not be described herein.
On the basis of the above embodiment, as shown in fig. 10, optionally, the above apparatus further includes: a second sending module 15, an obtaining module 16 and an executing module 17, wherein:
the second transmitting module 15 is configured to transmit a response communication packet for accepting the communication packet to the adapter when the charging path is closed.
An acquisition module 16 for acquiring a time interval between a reception time of the power-on packet and a transmission time of the response communication packet; the power-on data packet is sent by the adapter based on the response communication packet.
The execution module 17 is configured to execute the step of adjusting the initial charging current according to the preset current step and determining the target charging current if the time interval is smaller than the preset time interval.
The charge control device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effects are similar, and will not be described herein.
On the basis of the above embodiment, as shown in fig. 11, optionally, the above apparatus further includes: a second determination module 18, wherein:
the second determining module 18 is configured to determine the initial charging current as the target charging current if the time interval is greater than or equal to the time interval.
The charge control device provided in this embodiment may execute the above method embodiment, and its implementation principle and technical effects are similar, and will not be described herein.
Each of the modules in the above-described charge control device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a terminal is provided, the internal structure of which may be as shown in fig. 12. The terminal includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input device. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the terminal is adapted to provide computing and control capabilities. The memory of the terminal includes a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the terminal is used for exchanging information between the processor and the external device. The communication interface of the terminal is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a charge control method. The display unit of the terminal is used for forming a visual picture and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the terminal can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the terminal shell, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 12 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a terminal is provided, including a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
under the condition that a charging path of the terminal is closed, if a power-on data packet sent by the adapter is received, the charging path is controlled to be conducted;
adjusting initial charging current according to a preset current step length, and determining target charging current;
and controlling the power management chip of the terminal to charge the battery of the terminal according to the target charging current.
In one embodiment, the processor when executing the computer program further performs the steps of:
acquiring a current sum of an initial charging current and a current step length;
and determining the target charging current according to the magnitude relation between the current and the application current.
In one embodiment, the processor when executing the computer program further performs the steps of:
if the sum of the currents is larger than the application current, determining the initial charging current as a target charging current;
if the sum of the currents is smaller than or equal to the application current, determining a target charging current according to the output voltage of the adapter and a preset voltage threshold.
In one embodiment, the processor when executing the computer program further performs the steps of:
if the output voltage is less than the voltage threshold, determining the initial charging current as a target charging current;
if the output voltage is greater than or equal to the voltage threshold, determining the sum of the currents as a new initial charging current, and repeatedly executing the step of adjusting the initial charging current according to a preset current step size to determine a target charging current.
In one embodiment, the processor when executing the computer program further performs the steps of:
transmitting a request communication packet to the adapter under the condition that the output power of the adapter is determined to meet the charging power of the terminal;
and when receiving an acceptance communication packet sent by the adapter based on the request communication packet, controlling the charging path to be closed through the power management chip.
In one embodiment, the processor when executing the computer program further performs the steps of:
When the charging path is closed, a response communication packet for receiving the communication packet is sent to the adapter;
acquiring a time interval between the receiving time of the power-on data packet and the transmitting time of the response communication packet; the power-on data packet is sent by the adapter based on the response communication packet;
if the time interval is smaller than the preset time interval, executing the step of adjusting the initial charging current according to the preset current step length and determining the target charging current.
In one embodiment, the processor when executing the computer program further performs the steps of:
if the time interval is greater than or equal to the time interval, the initial charging current is determined to be the target charging current.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
under the condition that a charging path of the terminal is closed, if a power-on data packet sent by the adapter is received, the charging path is controlled to be conducted;
adjusting initial charging current according to a preset current step length, and determining target charging current;
and controlling the power management chip of the terminal to charge the battery of the terminal according to the target charging current.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a current sum of an initial charging current and a current step length;
and determining the target charging current according to the magnitude relation between the current and the application current.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the sum of the currents is larger than the application current, determining the initial charging current as a target charging current;
if the sum of the currents is smaller than or equal to the application current, determining a target charging current according to the output voltage of the adapter and a preset voltage threshold.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the output voltage is less than the voltage threshold, determining the initial charging current as a target charging current;
if the output voltage is greater than or equal to the voltage threshold, determining the sum of the currents as a new initial charging current, and repeatedly executing the step of adjusting the initial charging current according to a preset current step size to determine a target charging current.
In one embodiment, the computer program when executed by the processor further performs the steps of:
transmitting a request communication packet to the adapter under the condition that the output power of the adapter is determined to meet the charging power of the terminal;
And when receiving an acceptance communication packet sent by the adapter based on the request communication packet, controlling the charging path to be closed through the power management chip.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the charging path is closed, a response communication packet for receiving the communication packet is sent to the adapter;
acquiring a time interval between the receiving time of the power-on data packet and the transmitting time of the response communication packet; the power-on data packet is sent by the adapter based on the response communication packet;
if the time interval is smaller than the preset time interval, executing the step of adjusting the initial charging current according to the preset current step length and determining the target charging current.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the time interval is greater than or equal to the time interval, the initial charging current is determined to be the target charging current.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
under the condition that a charging path of the terminal is closed, if a power-on data packet sent by the adapter is received, the charging path is controlled to be conducted;
Adjusting initial charging current according to a preset current step length, and determining target charging current;
and controlling the power management chip of the terminal to charge the battery of the terminal according to the target charging current.
In one embodiment, the computer program when executed by the processor further performs the steps of:
acquiring a current sum of an initial charging current and a current step length;
and determining the target charging current according to the magnitude relation between the current and the application current.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the sum of the currents is larger than the application current, determining the initial charging current as a target charging current;
if the sum of the currents is smaller than or equal to the application current, determining a target charging current according to the output voltage of the adapter and a preset voltage threshold.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the output voltage is less than the voltage threshold, determining the initial charging current as a target charging current;
if the output voltage is greater than or equal to the voltage threshold, determining the sum of the currents as a new initial charging current, and repeatedly executing the step of adjusting the initial charging current according to a preset current step size to determine a target charging current.
In one embodiment, the computer program when executed by the processor further performs the steps of:
transmitting a request communication packet to the adapter under the condition that the output power of the adapter is determined to meet the charging power of the terminal;
and when receiving an acceptance communication packet sent by the adapter based on the request communication packet, controlling the charging path to be closed through the power management chip.
In one embodiment, the computer program when executed by the processor further performs the steps of:
when the charging path is closed, a response communication packet for receiving the communication packet is sent to the adapter;
acquiring a time interval between the receiving time of the power-on data packet and the transmitting time of the response communication packet; the power-on data packet is sent by the adapter based on the response communication packet;
if the time interval is smaller than the preset time interval, executing the step of adjusting the initial charging current according to the preset current step length and determining the target charging current.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the time interval is greater than or equal to the time interval, the initial charging current is determined to be the target charging current.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (11)

1. A charging control method, characterized by comprising:
under the condition that a charging passage of a terminal is closed, if a power-on data packet sent by an adapter is received, controlling the charging passage to be conducted;
adjusting initial charging current according to a preset current step length, and determining target charging current;
and controlling a power management chip of the terminal to charge a battery of the terminal according to the target charging current.
2. The method of claim 1, wherein the adjusting the initial charging current according to the preset current step to determine the target charging current comprises:
acquiring a current sum of the initial charging current and the current step length;
and determining the target charging current according to the magnitude relation between the current and the application current.
3. The method of claim 2, wherein determining the target charging current based on the current and a magnitude relationship with an application current comprises:
if the sum of the currents is larger than the application current, determining the initial charging current as the target charging current;
and if the sum of the currents is smaller than or equal to the application current, determining the target charging current according to the output voltage of the adapter and a preset voltage threshold.
4. A method according to claim 3, wherein said determining said target charging current from said adapter's output voltage and a preset voltage threshold comprises:
if the output voltage is less than the voltage threshold, determining the initial charging current as the target charging current;
and if the output voltage is greater than or equal to the voltage threshold, determining the current sum as a new initial charging current, and repeatedly executing the step of adjusting the initial charging current according to a preset current step length to determine a target charging current.
5. The method according to any one of claims 1-4, further comprising:
transmitting a request communication packet to the adapter under the condition that the output power of the adapter is determined to meet the charging power of the terminal;
and under the condition that an acceptance communication packet sent by the adapter based on the request communication packet is received, controlling the charging path to be closed through the power management chip.
6. The method of claim 5, wherein the method further comprises:
transmitting a response communication packet of the accept communication packet to the adapter in a case where the charging path is closed;
acquiring a time interval between the receiving time of the power-on data packet and the transmitting time of the response communication packet; the power-on data packet is sent by the adapter based on the response communication packet;
and if the time interval is smaller than the preset time interval, executing the step of adjusting the initial charging current according to the preset current step length and determining the target charging current.
7. The method of claim 6, wherein the method further comprises:
and if the time interval is greater than or equal to the time interval, determining the initial charging current as the target charging current.
8. A charge control device, characterized by comprising:
the first control module is used for controlling the charging passage to be conducted if a power-on data packet sent by the adapter is received under the condition that the charging passage of the terminal is closed;
the first determining module is used for adjusting the initial charging current according to a preset current step length and determining a target charging current;
and the second control module is used for controlling the power management chip of the terminal to charge the battery of the terminal according to the target charging current.
9. A terminal comprising a memory and a processor, the memory storing a computer program, wherein execution of the computer program by the processor causes the processor to perform the steps of the charge control method according to any one of claims 1 to 7.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN202311495892.2A 2023-11-09 2023-11-09 Charging control method, device, terminal and computer readable storage medium Pending CN117639155A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311495892.2A CN117639155A (en) 2023-11-09 2023-11-09 Charging control method, device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311495892.2A CN117639155A (en) 2023-11-09 2023-11-09 Charging control method, device, terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117639155A true CN117639155A (en) 2024-03-01

Family

ID=90026129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311495892.2A Pending CN117639155A (en) 2023-11-09 2023-11-09 Charging control method, device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117639155A (en)

Similar Documents

Publication Publication Date Title
US11929635B2 (en) Charging method and charging device
CN105743158B (en) Apparatus and method for charging an electronic device having a battery
KR101742985B1 (en) The method of determining group owner in peer to peer network and the device thereof
US20150145468A1 (en) Device and chip for controlling charging, and user terminal
US11411422B2 (en) Battery charging method, battery charging apparatus and storage medium
KR20100072857A (en) Controlling method of interrupt and potable device using the same
US9985449B2 (en) Communication method, power adapter and terminal
JP2001186251A (en) Portable information terminal device and method for controlling power source power supply
KR20120028472A (en) Apparatus and method for charging of battery in portable terminal
CN112540304B (en) Battery power management method, electronic device and computer storage medium
JP2016531368A (en) Apparatus and method for changing current limit value
JP7228554B2 (en) BATTERY MODULE, CHARGE CONTROL METHOD AND DEVICE, ELECTRONIC DEVICE, STORAGE MEDIUM
JP2022500990A (en) Charge control method and device, computer storage medium
CN111491235A (en) Charging method and system, charging box and Bluetooth headset
CN112688373A (en) Charging method and device and data line
CN110768382A (en) Wireless charging method and device, storage medium and electronic equipment
US20170063105A1 (en) Charging method, charging controller and charging system
US8438412B1 (en) System, method, and computer program for enabling an amount of multitasking for use by an operating system
WO2024051563A1 (en) Electronic device, charging device, and charging control method
CN110401462B (en) Power management method and related device
CN117639155A (en) Charging control method, device, terminal and computer readable storage medium
CN113572210A (en) Charging method, device, equipment and storage medium
CN114666744B (en) Method, device, equipment, storage medium and product for connecting near field communication equipment
CN113672067B (en) Lightning docking station and configuration device
US10256642B2 (en) Power delivery controller

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