[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN114221403B - Charging method and charging device - Google Patents

Charging method and charging device Download PDF

Info

Publication number
CN114221403B
CN114221403B CN202111383964.5A CN202111383964A CN114221403B CN 114221403 B CN114221403 B CN 114221403B CN 202111383964 A CN202111383964 A CN 202111383964A CN 114221403 B CN114221403 B CN 114221403B
Authority
CN
China
Prior art keywords
charging
battery
characteristic value
value
current
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111383964.5A
Other languages
Chinese (zh)
Other versions
CN114221403A (en
Inventor
相超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Publication of CN114221403A publication Critical patent/CN114221403A/en
Application granted granted Critical
Publication of CN114221403B publication Critical patent/CN114221403B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00036Charger exchanging data with battery
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01MPROCESSES OR MEANS, e.g. BATTERIES, FOR THE DIRECT CONVERSION OF CHEMICAL ENERGY INTO ELECTRICAL ENERGY
    • H01M10/00Secondary cells; Manufacture thereof
    • H01M10/42Methods or arrangements for servicing or maintenance of secondary cells or secondary half-cells
    • H01M10/44Methods for charging or discharging
    • H01M10/443Methods for charging or discharging in response to temperature
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J50/00Circuit arrangements or systems for wireless supply or distribution of electric power
    • H02J50/10Circuit arrangements or systems for wireless supply or distribution of electric power using inductive coupling
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0029Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • H02J7/00712Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • H02J7/00712Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters
    • H02J7/00714Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters in response to battery charging or discharging current
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • H02J7/00712Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters
    • H02J7/007182Regulation of charging or discharging current or voltage the cycle being controlled or terminated in response to electric parameters in response to battery voltage
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/007Regulation of charging or discharging current or voltage
    • H02J7/007188Regulation of charging or discharging current or voltage the charge cycle being controlled or terminated in response to non-electric parameters
    • H02J7/007192Regulation of charging or discharging current or voltage the charge cycle being controlled or terminated in response to non-electric parameters in response to temperature
    • H02J7/007194Regulation of charging or discharging current or voltage the charge cycle being controlled or terminated in response to non-electric parameters in response to temperature of the battery
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Manufacturing & Machinery (AREA)
  • Chemical & Material Sciences (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Electrochemistry (AREA)
  • General Chemical & Material Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application relates to the field of terminals and provides a charging method and a charging device. The method comprises the following steps: the electronic equipment acquires a first charging characteristic value of the battery; the electronic equipment acquires a second charging characteristic value and an electrical characteristic value of the battery, wherein the second charging characteristic value is acquired after the first charging characteristic value is acquired; when the electrical characteristic value does not meet the safety requirement and when the first charging characteristic value is smaller than or equal to the second charging characteristic value, the electronic device determines that the charging characteristic value of the battery is a third charging characteristic value, and the third charging characteristic value is a value obtained by subtracting the first numerical value from the first charging characteristic value. The method can improve the safety of the battery in the charging process.

Description

充电方法和充电装置Charging method and charging device

技术领域technical field

本申请涉及终端领域,具体涉及一种充电方法和充电装置。The present application relates to the field of terminals, in particular to a charging method and a charging device.

背景技术Background technique

终端设备通常是便携性良好的电子设备,因此,当用户随身携带并使用终端设备时,需要通过电池为终端设备供电。一些终端设备的电池是可拆卸电池,终端设备上安装的电池的电量耗尽后,用户可以为终端设备更换一块满电的电池,从而可以保证终端设备在随身携带状态下继续工作。A terminal device is usually an electronic device with good portability. Therefore, when a user carries and uses the terminal device, the terminal device needs to be powered by a battery. The battery of some terminal devices is a detachable battery. After the power of the battery installed on the terminal device is exhausted, the user can replace a fully charged battery for the terminal device, thereby ensuring that the terminal device continues to work in the portable state.

用户为终端设备更换的新电池可能与原装电池不是同一个厂家生产的电池,终端设备无法按照原装电池的充电保护策略管理新电池的充电过程,因此,终端设备无法保证非原装电池在充电过程中的安全性。此外,当原装电池的充电保护策略失效时,按照原装电池的充电保护策略控制充电同样存在危险。因此,如何提高电池在充电过程中的安全性是当前需要解决的问题。The new battery replaced by the user for the terminal device may not be produced by the same manufacturer as the original battery, and the terminal device cannot manage the charging process of the new battery according to the charging protection strategy of the original battery. security. In addition, when the charging protection strategy of the original battery fails, it is also dangerous to control charging according to the charging protection strategy of the original battery. Therefore, how to improve the safety of the battery during charging is a problem that needs to be solved at present.

发明内容Contents of the invention

本申请实施例提供了一种充电方法、充电装置、计算机可读存储介质和计算机程序产品,能够提高提高电池在充电过程中的安全性。Embodiments of the present application provide a charging method, a charging device, a computer-readable storage medium, and a computer program product, which can improve the safety of a battery during charging.

第一方面,提供了一种充电方法,应用于电子设备,该电子设备包含电池,该方法包括:In the first aspect, a charging method is provided, which is applied to an electronic device, and the electronic device contains a battery, and the method includes:

电子设备获取电池的第一充电特征值;The electronic device obtains the first charging characteristic value of the battery;

电子设备获取电池的第二充电特征值和电学特征值,第二充电特征值是在获取第一充电特征值之后获取的;The electronic device obtains a second charging characteristic value and an electrical characteristic value of the battery, where the second charging characteristic value is obtained after obtaining the first charging characteristic value;

当电学特征值不满足安全要求时,并且,当第一充电特征值小于或等于第二充电特征值时,电子设备确定电池的充电特征值为第三充电特征值,第三充电特征值为第一充电特征值减去第一数值后得到的值。When the electrical characteristic value does not meet the safety requirements, and when the first characteristic charging value is less than or equal to the second characteristic charging value, the electronic device determines that the characteristic charging value of the battery is the third characteristic charging value, and the third characteristic charging characteristic value is the first A value obtained by subtracting the first value from the charging characteristic value.

上述方法可以由电子设备中的电源管理模块执行,示例性地,电源管理模块可以是嵌入式控制器(embeded controller,EC),电池插入电子设备后,EC可以周期性地获取电池的充电特征值和电学特征值。当电学特征值不满足安全要求时,说明电池处于危险状态;第一充电特征值和第二充电特征值是EC先后两次获取的充电特征值,当第一充电特征值小于或等于第二充电特征值时,说明电池的充电保护策略失效,或者,说明电池不存在充电保护策略;此时,EC可以降低电池的充电特征值,由于EC获取第一充电特征值时,电池的电学特征值满足安全要求,在第一充电特征值的基础上继续降低充电特征值可以保证第三充电特征值满足安全要求,从而提高了电池在充电过程中的安全性。The above method can be executed by a power management module in the electronic device. Exemplarily, the power management module can be an embedded controller (embedded controller, EC). After the battery is inserted into the electronic device, the EC can periodically obtain the charging characteristic value of the battery and electrical eigenvalues. When the electrical characteristic value does not meet the safety requirements, it means that the battery is in a dangerous state; the first charging characteristic value and the second charging characteristic value are the charging characteristic values acquired twice by the EC, when the first charging characteristic value is less than or equal to the second charging characteristic value When the eigenvalue is , it means that the charging protection strategy of the battery is invalid, or that there is no charging protection strategy for the battery; at this time, the EC can reduce the charging eigenvalue of the battery, because when the EC obtains the first charging eigenvalue, the electrical characteristic value of the battery satisfies Safety requirements, continuing to reduce the charging characteristic value on the basis of the first charging characteristic value can ensure that the third charging characteristic value meets the safety requirement, thereby improving the safety of the battery during charging.

在一种可选的实施方式中,该方法还包括:In an optional embodiment, the method also includes:

当电学特征值不满足安全要求时,并且,当第一充电特征值大于第二充电特征值时,电源管理模块确定电池是否支持充电保护策略;When the electrical characteristic value does not meet the safety requirements, and when the first charging characteristic value is greater than the second charging characteristic value, the power management module determines whether the battery supports the charging protection strategy;

当电池支持充电保护策略时,电子设备确定第一充电特征值与第二充电特征值的差值;When the battery supports the charging protection strategy, the electronic device determines the difference between the first charging characteristic value and the second charging characteristic value;

当差值大于阈值时,电源管理模块确定电池的充电特征值为第二充电特征值;When the difference is greater than the threshold, the power management module determines that the charging characteristic value of the battery is a second charging characteristic value;

当差值小于或等于阈值时,电源管理模块确定电池的充电特征值为第三充电特征值。When the difference is less than or equal to the threshold, the power management module determines that the charging characteristic value of the battery is a third charging characteristic value.

第一充电特征值大于第二充电特征值不能说明电池的充电保护策略正在生效,例如,当电子设备处于节能模式时,存在第一充电特征值大于第二充电特征值的可能性,因此,在这种情况下,EC需要确认电池是否支持充电保护策略。当电池支持充电保护策略时,EC还需要进一步确定充电保护策略是否生效,其中,当差值大于阈值时,说明充电特征值下降较大,EC确认电池的充电保护策略生效,可以继续按照第二充电特征值进行充电;当差值大于阈值时,说明充电特征值下降较小,EC无法确认电池的充电保护策略是否生效,保险起见,EC可以降低充电特征值,从而提高了电池在充电过程中的安全性。The first charging characteristic value being greater than the second charging characteristic value cannot indicate that the charging protection strategy of the battery is in effect. For example, when the electronic device is in the energy-saving mode, there is a possibility that the first charging characteristic value is greater than the second charging characteristic value. In this case, the EC needs to confirm whether the battery supports the charging protection strategy. When the battery supports the charging protection strategy, the EC needs to further determine whether the charging protection strategy is in effect. When the difference is greater than the threshold, it means that the charging characteristic value has dropped significantly. The EC confirms that the charging protection strategy of the battery is in effect, and can continue to follow the second Charging characteristic value is used for charging; when the difference is greater than the threshold value, it means that the charging characteristic value drops small, and EC cannot confirm whether the charging protection strategy of the battery is effective. To be on the safe side, EC can reduce the charging characteristic value, thereby improving the charging process security.

在一种可选的实施方式中,该方法还包括:In an optional embodiment, the method also includes:

当电学特征值不满足安全要求时,并且,当第一充电特征值大于第二充电特征值时,电源管理模块确定电池是否支持充电保护策略;When the electrical characteristic value does not meet the safety requirements, and when the first charging characteristic value is greater than the second charging characteristic value, the power management module determines whether the battery supports the charging protection strategy;

当电池不支持充电保护策略时,电源管理模块确定电池的充电特征值为第四充电特征,第四充电特征值为第二充电特征值减去第二数值后得到的值。When the battery does not support the charging protection strategy, the power management module determines that the charging characteristic value of the battery is a fourth charging characteristic value, and the fourth charging characteristic value is a value obtained by subtracting the second value from the second charging characteristic value.

第一充电特征值大于第二充电特征值不能说明电池的充电保护策略正在生效,例如,当电子设备处于节能模式时,存在第一充电特征值大于第二充电特征值的可能性,因此,在这种情况下,EC需要确认电池是否支持充电保护策略。当电池不支持充电保护策略时,EC可以直接降低第二充电特征值,从而提高了电池在充电过程中的安全性。The first charging characteristic value being greater than the second charging characteristic value cannot indicate that the charging protection strategy of the battery is in effect. For example, when the electronic device is in the energy-saving mode, there is a possibility that the first charging characteristic value is greater than the second charging characteristic value. In this case, the EC needs to confirm whether the battery supports the charging protection strategy. When the battery does not support the charging protection strategy, the EC can directly reduce the second charging characteristic value, thereby improving the safety of the battery during charging.

在一种可选的实施方式中,第二数值与第二充电特征值正相关。In an optional implementation manner, the second numerical value is positively correlated with the second charging characteristic value.

本实施例中,正相关指的是:第二数值随着第二充电特征值的增大而增大,或者,第二数值随着第二充电特征值的减小而减小。第二充电特征值是降低充电特征值的参考量,当第二充电特征值较大时,第二数值是一个较大的数值才能满足安全性要求。In this embodiment, the positive correlation means that the second value increases as the second characteristic value of charging increases, or the second value decreases as the second characteristic value of charging decreases. The second characteristic value of charging is a reference amount for reducing the characteristic value of charging. When the second characteristic value of charging is larger, the second value must be a larger value to meet the safety requirement.

在一种可选的实施方式中,第二数值与第二充电特征值正相关,包括:第二数值为第二充电特征值乘以第二系数后得到的数值,第二系数为大于0且小于1的数值。In an optional implementation manner, the second value is positively correlated with the second characteristic value of charging, including: the second value is a value obtained by multiplying the second characteristic value of charging by a second coefficient, and the second coefficient is greater than 0 and A value less than 1.

在一种可选的实施方式中,第一数值与第一充电特征值正相关。In an optional implementation manner, the first numerical value is positively correlated with the first charging characteristic value.

本实施例中,正相关指的是:第一数值随着第一充电特征值的增大而增大,或者,第一数值随着第一充电特征值的减小而减小。第一充电特征值是降低充电特征值的参考量,当第一充电特征值较大时,第一数值是一个较大的数值才能满足安全性要求。In this embodiment, the positive correlation means that: the first value increases with the increase of the first characteristic charging value, or the first numerical value decreases with the decrease of the first characteristic charging value. The first characteristic value of charging is a reference amount for reducing the characteristic value of charging. When the first characteristic value of charging is relatively large, the first value must be a large value to meet the safety requirement.

在一种可选的实施方式中,第一数值与第一充电特征值正相关,包括:第一数值为第一充电特征值乘以第一系数后得到的数值,第一系数为大于0且小于1的数值。In an optional implementation manner, the first value is positively correlated with the first characteristic value of charging, including: the first value is a value obtained by multiplying the first characteristic value of charging by a first coefficient, and the first coefficient is greater than 0 and A value less than 1.

在一种可选的实施方式中,第一充电特征值包括第一充电电压值,第二充电特征值包括第二充电电压值,电学特征值包括电池中任意两个电芯的电压差,电学特征值不满足安全要求,包括:电压差大于电压差阈值。In an optional implementation, the first characteristic value of charging includes a first charging voltage value, the second characteristic value of charging includes a second charging voltage value, the electrical characteristic value includes the voltage difference between any two cells in the battery, and the electrical characteristic value includes The characteristic value does not meet the safety requirements, including: the voltage difference is greater than the voltage difference threshold.

当电池包括多个电芯时,两个电芯之间的电压差过大会导致可拆卸电池的寿命降低,并带来安全隐患,因此,将电池中任意两个电芯的电压差作为电学特征值判断是否需要启动充电保护策略,能够减缓电池的寿命的降低,并提高电池的安全性能。When the battery includes multiple cells, the excessive voltage difference between the two cells will reduce the life of the removable battery and bring safety hazards. Therefore, the voltage difference between any two cells in the battery is used as an electrical characteristic The value determines whether to start the charging protection strategy, which can slow down the reduction of battery life and improve the safety performance of the battery.

在一种可选的实施方式中,第一充电特征值包括第一充电电流值,第二充电特征值包括第二充电电流值,电学特征值包括电池的电流值,电学特征值不满足安全要求,包括:电池的电流值大于电流阈值。In an optional implementation, the first characteristic value of charging includes the first charging current value, the second characteristic value of charging includes the second charging current value, the electrical characteristic value includes the current value of the battery, and the electrical characteristic value does not meet the safety requirements , including: the current value of the battery is greater than the current threshold.

电池的电流值过大会导致电池的寿命降低,并带来安全隐患,因此,将电池的电流值作为电学特征值判断是否需要启动充电保护策略,能够减缓电池的寿命的降低,并提高电池的安全性能。Excessive battery current will reduce the life of the battery and bring potential safety hazards. Therefore, using the current value of the battery as an electrical characteristic value to determine whether to start the charging protection strategy can slow down the life of the battery and improve battery safety. performance.

在一种可选的实施方式中,电子设备获取电池的第一充电特征值之前,上述方法还包括:电子设备读取充电器插入AC_IN信号和电池插入BAT_IN信号;电子设备根据AC_IN信号和BAT_IN信号的电平确定充电器和电池是否插入电子设备;电子设备获取电池的第一充电特征值,包括:当充电器和电池插入电子设备时,电子设备获取电池的第一充电特征值;电子设备获取电池的第二充电特征值和电学特征值,包括:电子设备获取电池的第二充电电压、第二充电电流和电池信息,其中,电池信息包括当前电池的电芯电压和电池电流。In an optional implementation manner, before the electronic device obtains the first charging characteristic value of the battery, the above method further includes: the electronic device reads the charger insertion AC_IN signal and the battery insertion BAT_IN signal; the electronic device reads the AC_IN signal and the BAT_IN signal The level determines whether the charger and the battery are inserted into the electronic device; the electronic device obtains the first charging characteristic value of the battery, including: when the charger and the battery are inserted into the electronic device, the electronic device obtains the first charging characteristic value of the battery; the electronic device obtains The second charging characteristic value and electrical characteristic value of the battery include: the electronic device acquires the second charging voltage, the second charging current and battery information of the battery, wherein the battery information includes the current cell voltage and battery current of the battery.

在一种可选的实施方式中,当电学特征值不满足安全要求时,并且,当第一充电特征值小于或等于第二充电特征值时,电子设备确定电池的充电特征值为第三充电特征值,包括:In an optional implementation manner, when the electrical characteristic value does not meet the safety requirements, and when the first charging characteristic value is less than or equal to the second charging characteristic value, the electronic device determines that the charging characteristic value of the battery is the third charging characteristic value. Characteristic values, including:

当电芯电压的差值大于电压差阈值时,电子设备确定第一充电电压是否大于第二充电电压;当第一充电电压小于或等于第二充电电压时,电子设备将电池的充电电压调整为第三充电电压;When the cell voltage difference is greater than the voltage difference threshold, the electronic device determines whether the first charging voltage is greater than the second charging voltage; when the first charging voltage is less than or equal to the second charging voltage, the electronic device adjusts the charging voltage of the battery to a third charging voltage;

和/或,and / or,

当电池电流大于电流阈值时,电子设备确定第一充电电流是否大于第二充电电流;当第一充电电流小于或等于第二充电电流时,电子设备将电池的充电电流调整为第三充电电流。When the battery current is greater than the current threshold, the electronic device determines whether the first charging current is greater than the second charging current; when the first charging current is less than or equal to the second charging current, the electronic device adjusts the charging current of the battery to a third charging current.

在一种可选的实施方式中,上述方法还包括:当电子设备确定电池的充电特征值为第三充电电压和/或第三充电电流时,电子设备控制充电管理器以第三充电电压和/或第三充电电流对电池进行充电;当电子设备确定电池的充电特征值为第四充电电压和/或第四充电电流时,电子设备控制充电管理器以第四充电电压和/或第四充电电流对电池进行充电。In an optional implementation manner, the above method further includes: when the electronic device determines that the charging characteristic value of the battery is a third charging voltage and/or a third charging current, the electronic device controls the charging manager to charge the battery with the third charging voltage and/or the third charging current. /or the third charging current to charge the battery; when the electronic device determines that the charging characteristic value of the battery is the fourth charging voltage and/or the fourth charging current, the electronic device controls the charging manager to use the fourth charging voltage and/or the fourth charging current The charging current charges the battery.

在一种可选的实施方式中,电子设备获取所述电池的第一充电特征值,包括:当电池未充满电时,电子设备获取电池的第一充电电压和第一充电电流。In an optional implementation manner, the electronic device obtaining the first charging characteristic value of the battery includes: when the battery is not fully charged, the electronic device obtaining the first charging voltage and the first charging current of the battery.

在一种可选的实施方式中,上述方法还包括:当电池充满电时,电子设备控制充电管理器停止对电池进行充电。In an optional implementation manner, the above method further includes: when the battery is fully charged, the electronic device controls the charging manager to stop charging the battery.

该实施例可以防止电池过充导致的电池损坏。This embodiment can prevent battery damage caused by battery overcharging.

第二方面,提供了一种充电装置,包括用于执行第一方面中任一种方法的单元。该装置可以是终端设备,也可以是终端设备内的芯片。该装置可以包括输入单元和处理单元。In a second aspect, a charging device is provided, including a unit for performing any one of the methods in the first aspect. The device may be a terminal device, or a chip in the terminal device. The device may comprise an input unit and a processing unit.

当该装置是终端设备时,该处理单元可以是处理器,该输入单元可以是通信接口;该终端设备还可以包括存储器,该存储器用于存储计算机程序代码,当该处理器执行该存储器所存储的计算机程序代码时,使得该终端设备执行第一方面中的任一种方法。When the device is a terminal device, the processing unit may be a processor, and the input unit may be a communication interface; the terminal device may also include a memory, which is used to store computer program codes, and when the processor executes the When the computer program code is used, the terminal device is made to execute any one of the methods in the first aspect.

当该装置是终端设备内的芯片时,该处理单元可以是芯片内部的逻辑处理单元,该输入单元可以是输出接口、管脚或电路等;该芯片还可以包括存储器,该存储器可以是该芯片内的存储器(例如,寄存器、缓存等),也可以是位于该芯片外部的存储器(例如,只读存储器、随机存取存储器等);该存储器用于存储计算机程序代码,当该处理器执行该存储器所存储的计算机程序代码时,使得该芯片执行第一方面的任一种方法。When the device is a chip in the terminal device, the processing unit may be a logic processing unit inside the chip, and the input unit may be an output interface, a pin or a circuit, etc.; the chip may also include a memory, and the memory may be the The internal memory (for example, register, cache, etc.), can also be located in the memory outside the chip (for example, read-only memory, random access memory, etc.); the memory is used to store computer program code, when the processor executes the The computer program code stored in the memory causes the chip to execute any method of the first aspect.

第三方面,提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机程序代码,当该计算机程序代码被充电装置运行时,使得该装置执行第一方面中的任一种方法。In the third aspect, a computer-readable storage medium is provided, the computer-readable storage medium stores computer program code, and when the computer program code is run by the charging device, the device executes any one of the methods in the first aspect .

第四方面,提供了一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当该计算机程序代码被充电装置运行时,使得该装置执行第一方面中的任一种方法。In a fourth aspect, a computer program product is provided, and the computer program product includes: computer program code, when the computer program code is run by a charging device, the device is made to execute any one of the methods in the first aspect.

附图说明Description of drawings

图1是一种适用于本申请的装置的硬件系统的示意图;Fig. 1 is a schematic diagram of a hardware system applicable to the device of the present application;

图2是本申请提供的一种笔记本电脑的充电流程的示意图;Fig. 2 is a schematic diagram of a charging process of a notebook computer provided by the present application;

图3是本申请提供的一种根据电芯电压差启动充电保护策略的方法的示意图;Fig. 3 is a schematic diagram of a method for starting a charging protection strategy according to the cell voltage difference provided by the present application;

图4是本申请提供的一种根据电池电流启动充电保护策略的方法的示意图;FIG. 4 is a schematic diagram of a method for starting a charging protection strategy according to battery current provided by the present application;

图5是本申请提供的充电方法的一个实施例的示意图。Fig. 5 is a schematic diagram of an embodiment of the charging method provided by the present application.

具体实施方式Detailed ways

下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

图1示出了一种适用于本申请的装置的硬件系统。Fig. 1 shows a hardware system applicable to the device of this application.

装置100可以是手机、智慧屏、平板电脑、可穿戴电子设备、车载电子设备、增强现实(augmented reality,AR)设备、虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)、投影仪等等,本申请实施例对装置100的具体类型不作任何限制。The device 100 may be a mobile phone, a smart screen, a tablet computer, a wearable electronic device, a vehicle electronic device, an augmented reality (augmented reality, AR) device, a virtual reality (virtual reality, VR) device, a notebook computer, an ultra mobile personal computer (ultra -mobile personal computer, UMPC), netbook, personal digital assistant (personal digital assistant, PDA), projector, etc. The embodiment of the present application does not impose any limitation on the specific type of the device 100 .

装置100可以包括处理器110,内部存储器121,充电接口130,充电管理模块140,电源管理模块141,电池142等。The device 100 may include a processor 110, an internal memory 121, a charging interface 130, a charging management module 140, a power management module 141, a battery 142, and the like.

需要说明的是,图1所示的结构并不构成对装置100的具体限定。在本申请另一些实施例中,装置100可以包括比图1所示的部件更多或更少的部件,或者,装置100可以包括图1所示的部件中某些部件的组合,或者,装置100可以包括图1所示的部件中某些部件的子部件。图1示的部件可以以硬件、软件、或软件和硬件的组合实现。It should be noted that the structure shown in FIG. 1 does not constitute a specific limitation on the device 100 . In other embodiments of the present application, the device 100 may include more or fewer components than those shown in FIG. 1 , or the device 100 may include a combination of some of the components shown in FIG. 100 may include subcomponents of some of the components shown in FIG. 1 . The components shown in FIG. 1 can be realized in hardware, software, or a combination of software and hardware.

处理器110可以包括一个或多个处理单元。例如,处理器110可以包括以下处理单元中的至少一个:应用处理器(application processor,AP)、调制解调处理器、图形处理器(graphics processing unit,GPU)、图像信号处理器(image signal processor,ISP)、控制器、视频编解码器、数字信号处理器(digital signal processor,DSP)、基带处理器、神经网络处理器(neural-network processing unit,NPU)。其中,不同的处理单元可以是独立的器件,也可以是集成的器件。Processor 110 may include one or more processing units. For example, the processor 110 may include at least one of the following processing units: an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor) , ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, neural network processor (neural-network processing unit, NPU). Wherein, different processing units may be independent devices or integrated devices.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.

内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能(例如,电源管理功能)所需的应用程序。存储数据区可存储装置100使用过程中所创建的数据(例如,电源管理策略)。The internal memory 121 may be used to store computer-executable program codes including instructions. The internal memory 121 may include an area for storing programs and an area for storing data. Wherein, the stored program area can store an operating system and an application program required by at least one function (for example, a power management function). The storage data area can store data created during the use of the device 100 (eg, power management policies).

此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如:至少一个磁盘存储器件、闪存器件和通用闪存存储器(universal flashstorage,UFS)等。处理器110通过运行存储在内部存储器121的指令和/或存储在设置于处理器中的存储器的指令,执行装置100的各种处理方法。In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, and universal flash storage (universal flash storage, UFS). The processor 110 executes various processing methods of the device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.

充电管理模块140用于从充电接口130接收电力。The charging management module 140 is used for receiving power from the charging interface 130 .

在一些有线充电的实施例中,充电接口130是通用串行总线(universal serialbus,USB)接口,充电管理模块140可以通过USB接口接收电流。USB接口是符合USB标准规范的接口,例如可以是迷你(Mini)USB接口、微型(Micro)USB接口或C型USB(USB Type C)接口。USB接口可以用于连接充电器为装置100充电,也可以用于装置100与外围设备之间传输数据,还可以用于连接耳机以通过耳机播放音频。In some wired charging embodiments, the charging interface 130 is a universal serial bus (universal serialbus, USB) interface, and the charging management module 140 can receive current through the USB interface. The USB interface is an interface conforming to the USB standard specification, for example, it may be a mini (Mini) USB interface, a micro (Micro) USB interface or a Type-C USB (USB Type C) interface. The USB interface can be used to connect a charger to charge the device 100 , can also be used to transmit data between the device 100 and peripheral devices, and can also be used to connect an earphone to play audio through the earphone.

在一些无线充电的实施例中,充电接口130可以是无线充电线圈,充电管理模块140可以通过无线充电线圈接收电磁波。In some wireless charging embodiments, the charging interface 130 may be a wireless charging coil, and the charging management module 140 may receive electromagnetic waves through the wireless charging coil.

充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为装置100供电。While the charging management module 140 is charging the battery 142 , it can also supply power to the device 100 through the power management module 141 .

电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110和内部存储器121等模块供电。电源管理模块141还可以用于监测电池容量、电池循环次数和电池健康状态(例如,漏电、阻抗)等参数。可选地,电源管理模块141可以设置于处理器110中,或者,电源管理模块141和充电管理模块140可以设置于同一个器件中。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives the input of the battery 142 and/or the charging management module 140 to supply power for modules such as the processor 110 and the internal memory 121 . The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (eg, leakage, impedance). Optionally, the power management module 141 may be set in the processor 110, or the power management module 141 and the charge management module 140 may be set in the same device.

图1所示的各模块间的连接关系只是示意性说明,并不构成对装置100的各模块间的连接关系的限定。The connection relationship between the modules shown in FIG. 1 is only a schematic illustration, and does not constitute a limitation on the connection relationship between the modules of the device 100 .

在一种可选的实施例中,装置100为笔记本电脑,电源管理模块141为笔记本电脑的主板上的EC,电源管理模块141为笔记本电脑的充电管理器(charger),电池142为笔记本电脑上安装的可拆卸电池。In an optional embodiment, the device 100 is a notebook computer, the power management module 141 is an EC on the motherboard of the notebook computer, the power management module 141 is a charging manager (charger) of the notebook computer, and the battery 142 is an Installed removable battery.

EC通常是一个16位的单片机,用于控制笔记本电脑的电池、风扇和指示灯等,通常被焊接在笔记本电脑的主板上。EC is usually a 16-bit single-chip microcomputer, which is used to control the battery, fan and indicator light of the notebook computer, and is usually welded on the motherboard of the notebook computer.

EC有自己的固件(firmware)和存储器,该存储器称为EC随机存取存储器(randomaccess memory,RAM)。EC RAM包含两个地址位置(0x62,0x66)和两个寄存器(EC_SC和EC_DATA)。地址位置和寄存器的对应关系如表1所示。EC has its own firmware (firmware) and memory, which is called EC random access memory (random access memory, RAM). EC RAM contains two address locations (0x62, 0x66) and two registers (EC_SC and EC_DATA). Table 1 shows the correspondence between address locations and registers.

表1Table 1

寄存器register 偏移/端口offset/port R/WR/W 说明illustrate EC_SCEC_SC 0x660x66 RR EC状态寄存器EC status register EC_SCEC_SC 0x660x66 WW EC命令寄存器EC command register EC_DATAEC_DATA 0x620x62 R/WR/W EC数据寄存器EC data register

EC_SC同时具备状态寄存和命令寄存功能,EC_DATA用于存储数据。偏移/端口指的是EC与基本输入输出系统(basic input output system,BIOS)相连的低引脚数(low pincount,LPC)总线的端口地址,R表示可读,W表示可写,BIOS可以通过0x66端口读取EC_SC中的值,也可以通过0x66端口发送命令给EC_SC;类似地,BIOS可以通过0x62端口读取EC_SC中的值,也可以通过0x66端口发送数据给EC_SC。EC_SC has both status register and command register functions, and EC_DATA is used to store data. Offset/port refers to the port address of the low pin count (LPC) bus connected to the EC and the basic input output system (BIOS). R means readable, W means writable, and BIOS can Read the value in EC_SC through port 0x66, or send commands to EC_SC through port 0x66; similarly, BIOS can read the value in EC_SC through port 0x62, or send data to EC_SC through port 0x66.

EC与电池之间可以通过系统管理总线(system management bus,SMBus)通信,SMBus的通信模式为主从模式,即,SMBus两端分别连接主设备(master设备)和从设备(slave设备),主设备通过SMBus向从设备发送命令,还可以通过SMBus从从设备采集数据。The EC and the battery can communicate through the system management bus (SMBus). The device sends commands to the slave device through SMBus, and can also collect data from the slave device through SMBus.

例如,当主设备为EC,从设备为电池时,EC可以通过SMBus的时钟线向电池发送命令,命令电池上报当前状态信息(当前的电池电压、电池电流和电池温度等信息);随后,电池可以通过SMBus的数据线向EC上报当前状态信息。For example, when the master device is an EC and the slave device is a battery, the EC can send commands to the battery through the SMBus clock line, ordering the battery to report current status information (current battery voltage, battery current, battery temperature, etc.); then, the battery can Report the current status information to the EC through the SMBus data line.

下面结合图2描述笔记本电脑的充电过程。The charging process of the notebook computer will be described below in conjunction with FIG. 2 .

S201,EC判断充电器和电池是否插入笔记本电脑。S201, the EC judges whether the charger and the battery are plugged into the notebook computer.

充电器插入笔记本电脑时,charger检测到5V电压,拉高AC_IN信号,EC检测到电平被拉高的AC_IN信号,从而确定充电器插入笔记本电脑,因此,EC可以根据AC_IN信号的电平高低判断充电器是否插入笔记本电脑。示例性地,当EC检测到AC_IN信号为高电平信号时,EC确定充电器插入笔记本电脑;当EC检测到AC_IN信号为低电平信号时,EC确定充电器未插入笔记本电脑。When the charger is plugged into the laptop, the charger detects the 5V voltage and pulls up the AC_IN signal, and the EC detects the AC_IN signal whose level is pulled up, thus confirming that the charger is plugged into the laptop. Therefore, the EC can judge according to the level of the AC_IN signal Is the charger plugged into the laptop. Exemplarily, when the EC detects that the AC_IN signal is a high-level signal, the EC determines that the charger is plugged into the laptop; when the EC detects that the AC_IN signal is a low-level signal, the EC determines that the charger is not plugged into the laptop.

电池插入笔记本电脑时,电池拉高BAT_IN信号,EC能够检测到电平被拉高的BAT_IN信号,因此,EC可以根据BAT_IN信号的电平高低判断电池是否插入笔记本电脑。示例性地,当EC检测到BAT_IN信号为高电平信号时,EC确定电池插入笔记本电脑;当EC检测到BAT_IN信号为低电平信号时,EC确定电池未插入笔记本电脑。When the battery is inserted into the laptop, the battery pulls up the BAT_IN signal, and the EC can detect the BAT_IN signal whose level is pulled up. Therefore, the EC can judge whether the battery is plugged into the laptop according to the level of the BAT_IN signal. Exemplarily, when the EC detects that the BAT_IN signal is a high-level signal, the EC determines that the battery is inserted into the notebook computer; when the EC detects that the BAT_IN signal is a low-level signal, the EC determines that the battery is not inserted into the notebook computer.

基于电池和充电器的插入情况,EC可以执行S202、S203和下文所述的S209。Based on the insertion of the battery and the charger, the EC may execute S202, S203 and S209 described below.

若EC确定电池插入笔记本电脑并且充电器未插入笔记本电脑,则EC可以控制电池进行放电,即,EC执行S202。If the EC determines that the battery is inserted into the notebook computer and the charger is not inserted into the notebook computer, the EC may control the battery to discharge, that is, the EC executes S202.

若EC确定电池未插入笔记本电脑并且充电器插入笔记本电脑,则EC可以控制充电器为笔记本电脑供电,并且确定充电电流为0,即,EC执行S209。If the EC determines that the battery is not inserted into the notebook computer and the charger is inserted into the notebook computer, the EC may control the charger to supply power to the notebook computer, and determine that the charging current is 0, that is, the EC executes S209.

若EC确定电池插入笔记本电脑并且充电器插入笔记本电脑,则EC可以执行S203。If the EC determines that the battery is inserted into the notebook computer and the charger is inserted into the notebook computer, the EC may execute S203.

S203,EC读取电池信息。S203, the EC reads battery information.

电池信息包括电池的电芯电压、电池电流、充电电压、充电电流和电池温度等信息,若电池信息不正常,EC无法保障笔记本电脑的安全,因此,EC需要检查电池信息是否正常。Battery information includes battery cell voltage, battery current, charging voltage, charging current, and battery temperature. If the battery information is abnormal, the EC cannot guarantee the safety of the laptop. Therefore, the EC needs to check whether the battery information is normal.

示例性地,EC可以通过SMBus地址0x16获取电池信息,并执行S204和S205。Exemplarily, the EC can obtain the battery information through the SMBus address 0x16, and execute S204 and S205.

S204,EC判断电池电压是否正常。S204, the EC judges whether the battery voltage is normal.

电池在电压过高时按照正常充电模式进行充电会导致电池损坏,因此,EC需要判断电池电压是否正常。Charging the battery according to the normal charging mode when the voltage is too high will cause damage to the battery. Therefore, the EC needs to judge whether the battery voltage is normal.

判断电压是否正常可以是根据电压阈值(如12.9V)进行判断,当电池电压大于或等于12.9V时,EC确定电池电压不正常;当电池电压小于12.9V时,EC确定电池电压正常。Judging whether the voltage is normal can be based on a voltage threshold (such as 12.9V). When the battery voltage is greater than or equal to 12.9V, the EC determines that the battery voltage is abnormal; when the battery voltage is less than 12.9V, the EC determines that the battery voltage is normal.

S205,EC判断电池电流是否正常。S205, the EC judges whether the battery current is normal.

电池在电池电流过高时按照正常充电模式进行充电会导致电池损坏,因此,EC需要判断电池电流是否正常。Charging the battery in the normal charging mode when the battery current is too high will cause damage to the battery. Therefore, the EC needs to judge whether the battery current is normal.

判断电池电流是否正常可以是根据电流阈值进行判断,当电池电流大于或等于电流阈值时,EC确定电池电流不正常;当电池电流小于电流阈值时,EC确定电池电流正常。Judging whether the battery current is normal can be based on the current threshold. When the battery current is greater than or equal to the current threshold, the EC determines that the battery current is abnormal; when the battery current is less than the current threshold, the EC determines that the battery current is normal.

需要说明的是,EC可以先执行S204再执行S205,也可以先执行S205再执行S204,还可以同时执行S204和S205,本申请对S204和S205的执行顺序不做限定。It should be noted that the EC may execute S204 first and then S205, or execute S205 first and then S204, or execute S204 and S205 at the same time. This application does not limit the execution order of S204 and S205.

S206,EC控制充电管理器(charger)以调整后的充电电压和/或充电电流对电池进行充电。S206, the EC controls the charging manager (charger) to charge the battery with the adjusted charging voltage and/or charging current.

当电池电流和电芯电压中的任意一个处于非正常范围内时,EC需要调整充电电压和/或充电电流,以避免充电过程中发生安全事故或者避免电池收到损坏。When any one of the battery current and cell voltage is within an abnormal range, the EC needs to adjust the charging voltage and/or charging current to avoid safety accidents or damage to the battery during charging.

示例性地,EC可以减小充电电压和/或充电电流,下文将详细介绍减小充电电压和/或充电电流的方法。Exemplarily, the EC may reduce the charging voltage and/or the charging current, and the method for reducing the charging voltage and/or the charging current will be described in detail below.

S207,EC控制充电管理器(charger)以S203中读取到的充电电流和充电电压对电池进行充电。S207, the EC controls the charging manager (charger) to charge the battery with the charging current and charging voltage read in S203.

当电池电流和电芯电压均处于正常范围内时,电池可以以S203读取的充电电流(如2A)进行充电,从而可以在保证安全的前提下快速充电。When the battery current and cell voltage are both within the normal range, the battery can be charged with the charging current (such as 2A) read by S203, so that it can be charged quickly under the premise of ensuring safety.

可选地,EC在执行S207之前还可以判断电池温度是否正常。Optionally, the EC may also determine whether the battery temperature is normal before performing S207.

电池在温度过高或者过低时按照正常充电模式进行充电会导致电池损坏甚至发生爆炸,因此,EC需要判断电池温度是否正常。Charging the battery in the normal charging mode when the temperature is too high or too low will cause the battery to be damaged or even explode. Therefore, the EC needs to judge whether the battery temperature is normal.

例如,电池的正常温度范围是[5℃,45℃],若当前电池温度位于[5℃,45℃]内,EC确定当前电池温度正常;若当前电池温度位于[5℃,45℃]外,EC确定当前电池温度不正常。For example, the normal temperature range of the battery is [5°C, 45°C]. If the current battery temperature is within [5°C, 45°C], EC determines that the current battery temperature is normal; if the current battery temperature is outside [5°C, 45°C]. , the EC determines that the current battery temperature is abnormal.

其中,当电池温度位于[0℃,45℃]之外时,EC执行S209;当电池温度位于[0℃,5℃]内时,EC确认当前电池温度偏低,但是未低于温度下限(0℃),此时,EC可以执行S206,控制充电管理器(charger)以小电流(如400mA)对电池充电,并在一段时间后再次从S203开始执行。Among them, when the battery temperature is outside [0°C, 45°C], the EC executes S209; when the battery temperature is within [0°C, 5°C], the EC confirms that the current battery temperature is low, but not lower than the temperature lower limit ( 0° C.), at this time, the EC may execute S206 to control the charging manager (charger) to charge the battery with a small current (such as 400mA), and start execution from S203 again after a period of time.

电流充电可导致电池温度上升,EC控制充电管理器以小电流对电池充电,能够使电池的温度逐渐上升至正常范围,从而在保证安全的前提下恢复电池的充电能力。Current charging can cause the temperature of the battery to rise. EC controls the charge manager to charge the battery with a small current, which can gradually increase the temperature of the battery to the normal range, thereby restoring the battery's charging capacity while ensuring safety.

S208,EC确定电池是否充满。S208, the EC determines whether the battery is fully charged.

当电池充未满电时,容量满状态位(如bit5)的状态为0;当电池充满电时,容量满状态位(如bit5)的状态为1。EC可以根据容量满状态位确定电池是否充满电。When the battery is not fully charged, the status of the full capacity status bit (such as bit5) is 0; when the battery is fully charged, the status of the full capacity status bit (such as bit5) is 1. EC can determine whether the battery is fully charged according to the full capacity status bit.

若电池已充满电,EC可以执行S209。If the battery is fully charged, the EC may execute S209.

S209,EC控制charger停止充电。S209, the EC controls the charger to stop charging.

电池充满后,EC可以控制charger停止充电,通过充电器为笔记本电脑供电,此时充电电流为0。After the battery is fully charged, the EC can control the charger to stop charging, and supply power to the laptop through the charger, and the charging current is 0 at this time.

上文详细介绍了笔记本电脑的充电过程,在对电池进行充电时,电池的状态不断变化,EC需要根据电池的当前状态对充电电压和充电电流进行调整,以保证电池能够安全地进行充电。The charging process of the notebook computer is introduced in detail above. When charging the battery, the state of the battery is constantly changing. The EC needs to adjust the charging voltage and charging current according to the current state of the battery to ensure that the battery can be charged safely.

对于一些存在充电保护策略的电池(如,原装电池),EC可以从这些电池中读取充电保护策略的参数,并根据这些参数控制电池的充电电压和充电电流。对于一些不存在充电保护策略的电池(如,非原装电池)或者一些充电保护策略失效的电池,EC无法获取这些电池的充电保护策略参数,可能导致充电过程发生危险。For some batteries with charging protection strategies (such as original batteries), the EC can read the parameters of the charging protection strategy from these batteries, and control the charging voltage and charging current of the battery according to these parameters. For some batteries that do not have a charging protection strategy (for example, non-original batteries) or some batteries whose charging protection strategy fails, the EC cannot obtain the charging protection strategy parameters of these batteries, which may lead to danger in the charging process.

下面结合图3和图4介绍本申请提供的充电方法,该充电方法能够提高不存在充电保护策略的电池或者充电保护策略失效的电池在充电过程中的安全性。The charging method provided by the present application will be described below with reference to FIG. 3 and FIG. 4 . The charging method can improve the safety of a battery without a charging protection strategy or a battery with a failed charging protection strategy during charging.

当笔记本中的电池是多电芯电池时,两个电芯之间的电压差过大会导致电池的寿命降低,并带来安全隐患;电池的电流值过大会同样会导致电池的寿命降低,并带来安全隐患。因此,将电池中任意两个电芯的电压差作为电学特征值判断是否需要启动充电保护策略,和/或,将电池的电流值作为电学特征值判断是否需要启动充电保护策略,能够减缓电池的寿命的降低,并提高电池的充电安全性。When the battery in the notebook is a multi-cell battery, the excessive voltage difference between the two cells will reduce the life of the battery and bring potential safety hazards; the large current value of the battery will also reduce the life of the battery and cause a safety hazard pose a safety hazard. Therefore, using the voltage difference between any two cells in the battery as the electrical characteristic value to judge whether it is necessary to start the charging protection strategy, and/or using the battery current value as the electrical characteristic value to judge whether it is necessary to start the charging protection strategy can slow down the battery. Life expectancy is reduced, and battery charging safety is improved.

首先介绍根据电芯之间的电压差启动充电保护策略的方法。Firstly, the method of starting the charging protection strategy according to the voltage difference between the cells is introduced.

如图3所示,在电池充电的过程中,EC获取到电池中电芯之间的电压差大于第一阈值,则EC确定需要对该电池进行防单电芯过充保护。As shown in FIG. 3 , during the battery charging process, the EC obtains that the voltage difference between the cells in the battery is greater than the first threshold, and then the EC determines that the battery needs to be protected against overcharging of a single cell.

例如,电池包含4个电芯,EC通过SMBus读取的4个电芯的电压值分别是4.2V、3.1V、4.1V和3.8V,最大的电压差为1.1V,第一阈值为0.9V,1.1V大于0.9V,说明电池的安全性和可靠性存在较大的风险,电池需要在具备充电保护功能的充电参数的控制下进行充电。For example, the battery contains 4 cells, the voltage values of the 4 cells read by the EC through the SMBus are 4.2V, 3.1V, 4.1V and 3.8V respectively, the maximum voltage difference is 1.1V, and the first threshold is 0.9V , 1.1V is greater than 0.9V, indicating that there is a greater risk in the safety and reliability of the battery, and the battery needs to be charged under the control of the charging parameters with the charging protection function.

EC可以先后获取两个充电电压,即,电压A和电压B,其中,电压B是在读取电芯电压时获取的充电电压,电压A是获取电压B之前获取的充电电压。The EC can successively obtain two charging voltages, namely, voltage A and voltage B, wherein voltage B is the charging voltage obtained when reading the cell voltage, and voltage A is the charging voltage obtained before obtaining voltage B.

情况1,电压A小于或等于电压B。Case 1, voltage A is less than or equal to voltage B.

若电压A小于或等于电压B,说明电池的充电电压经过一段时间后没有下降,电池正处于危险充电状态。EC可以指示charger,将充电电压设置为“电压A-a%*电压A”,即,在电压A的基础上降低充电电压,其中,a为大于0的自然数。If the voltage A is less than or equal to the voltage B, it means that the charging voltage of the battery has not dropped after a period of time, and the battery is in a dangerous charging state. The EC can instruct the charger to set the charging voltage as "voltage A-a%*voltage A", that is, reduce the charging voltage on the basis of voltage A, where a is a natural number greater than 0.

例如,电压A为20V,则EC可以将充电电压设置为20-20*10%=18V。For example, if the voltage A is 20V, then the EC can set the charging voltage to 20-20*10%=18V.

情况2,电压A大于电压B。Case 2, voltage A is greater than voltage B.

若电压A大于电压B,说明电池的充电电压经过一段时间后下降,电池可能处于安全充电状态。EC可以进一步判断电池是否存在充电保护策略。If the voltage A is greater than the voltage B, it means that the charging voltage of the battery drops after a period of time, and the battery may be in a safe charging state. EC can further judge whether there is a charging protection strategy for the battery.

EC可以从电池读取美国信息互换标准代码(American standard code forinformation interchange,ASCII),ASCII通常包含电池厂商的标识(identifier,ID),如ASCII的后两位字符。EC从ASCII中获取电池厂商的ID后,再根据表2确定电池是否存在充电保护策略。The EC can read the American standard code for information interchange (ASCII) from the battery. ASCII usually contains the battery manufacturer's identifier (identifier, ID), such as the last two characters of ASCII. After the EC obtains the battery manufacturer's ID from the ASCII, it determines whether the battery has a charging protection strategy according to Table 2.

表2Table 2

电池充电优化管理Optimized battery charge management 防单电芯过充Anti-single cell overcharge IR补偿IR compensation 电池厂商1Battery Manufacturer 1 支持support 不支持not support 不支持not support 电池厂商2Battery Manufacturer 2 支持support 不支持not support 支持support 电池厂商3Battery Manufacturer 3 支持support 支持support 支持support

表2是EC存储的电池厂商ID与电池充电保护策略的关系表。Table 2 is a relationship table between battery manufacturer IDs stored by the EC and battery charging protection policies.

若ASCII包含的厂商ID为电池厂商1的ID,EC可以根据表2确定电池不存在防单电芯过充的充电保护策略,以及不存在IR补偿的充电保护策略。If the manufacturer ID contained in ASCII is the ID of battery manufacturer 1, the EC can determine according to Table 2 that the battery does not have a charging protection strategy for preventing single-cell overcharging, and does not have a charging protection strategy for IR compensation.

若ASCII包含的厂商ID为电池厂商2的ID,EC可以根据表2确定电池不存在防单电芯过充的充电保护策略,以及存在IR补偿的充电保护策略。If the manufacturer ID contained in ASCII is the ID of battery manufacturer 2, the EC can determine according to Table 2 that the battery does not have a charging protection strategy for preventing single-cell overcharging, and that there is a charging protection strategy for IR compensation.

若ASCII包含的厂商ID为电池厂商3的ID,EC可以根据表2确定电池存在防单电芯过充的充电保护策略,以及存在IR补偿的充电保护策略。If the manufacturer ID contained in ASCII is the ID of battery manufacturer 3, the EC can determine from Table 2 that the battery has a charging protection strategy for preventing single-cell overcharging and a charging protection strategy for IR compensation.

情况2.1,电池不存在充电保护策略。In case 2.1, there is no charging protection strategy for the battery.

若电池不存在充电保护策略,EC可以指示charger,将充电电压设置为“电压B-a%*电压A”,即,在电压B的基础上降低充电电压。If there is no charging protection strategy for the battery, EC can instruct the charger to set the charging voltage as "voltage B-a%*voltage A", that is, reduce the charging voltage on the basis of voltage B.

例如,电压A为20V,电压B为19V,则EC可以将充电电压设置为19-20*10%=17V。For example, voltage A is 20V and voltage B is 19V, then the EC can set the charging voltage to 19-20*10%=17V.

由于情况2.1中电压B小于电压A,在电压B的基础上降低充电电压能够进一步提高电池的充电安全性。Since the voltage B is lower than the voltage A in the case 2.1, reducing the charging voltage on the basis of the voltage B can further improve the charging safety of the battery.

情况2.2,电池存在充电保护策略。In case 2.2, the battery has a charging protection strategy.

若电池存在充电保护策略,EC可以进一步判断充电电压的下降幅度是否足够大,即,判断电压A减电压B是否大于第二阈值,其中,第二阈值可以是a%*电压A。If there is a charging protection strategy for the battery, the EC can further judge whether the drop in the charging voltage is large enough, that is, judge whether the voltage A minus the voltage B is greater than the second threshold, where the second threshold can be a%*voltage A.

若电压A减电压B大于第二阈值,说明电池的充电电压的下降幅度较大,电池可以在当前的充电条件下安全充电,EC确定电压B无需调整。If the voltage A minus the voltage B is greater than the second threshold, it means that the charging voltage of the battery has dropped significantly, the battery can be safely charged under the current charging conditions, and the EC determines that the voltage B does not need to be adjusted.

若电压A减电压B小于或等于第二阈值,说明电池的充电电压的下降幅度较小,电池使用电压B进行充电存在安全风险,EC可以指示charger,将充电电压设置为“电压A-a%*电压A”,即,在电压A的基础上降低充电电压。If the voltage A minus the voltage B is less than or equal to the second threshold, it means that the drop of the battery charging voltage is small, and there is a safety risk in charging the battery with the voltage B, and the EC can instruct the charger to set the charging voltage as "voltage A-a%*voltage A", that is, the charging voltage is reduced on the basis of the voltage A.

下面介绍根据电池电流启动充电保护策略的方法。The following describes the method of starting the charging protection strategy according to the battery current.

如图4所示,在电池进行充电的过程中,EC获取到的电池电流值大于第三阈值,则EC确定需要对该电池进行IR电流保护。As shown in FIG. 4 , during the charging process of the battery, if the battery current value obtained by the EC is greater than the third threshold, the EC determines that the battery needs to be protected by IR current.

例如,EC获取到的电池电流值为10A,第一阈值为9.5A,10A大于9.5A,说明电池的安全性和可靠性存在较大的风险,电池需要在具备充电保护功能的充电参数的控制下进行充电。For example, the battery current value obtained by the EC is 10A, the first threshold is 9.5A, and 10A is greater than 9.5A, indicating that there is a greater risk in the safety and reliability of the battery, and the battery needs to be controlled under the charging parameters with the charging protection function. down to charge.

EC可以先后获取两个充电电流,即,电流A和电流B,其中,电流B是在获取电池的电流值时获取的充电电流,电流A是获取电流B之前获取的充电电流。The EC can successively obtain two charging currents, namely, current A and current B, wherein current B is the charging current obtained when obtaining the current value of the battery, and current A is the charging current obtained before obtaining current B.

情况3,电流A小于或等于电流B。Case 3, current A is less than or equal to current B.

若电流A小于或等于电流B,说明电池的充电电流经过一段时间后没有下降,电池正处于危险充电状态。EC可以指示charger,将充电电流设置为“电流A-a%*电流A”,即,在电流A的基础上降低充电电流,其中,a为大于0的自然数。If the current A is less than or equal to the current B, it means that the charging current of the battery does not drop after a period of time, and the battery is in a dangerous charging state. EC can instruct the charger to set the charging current as "current A-a%*current A", that is, reduce the charging current on the basis of current A, where a is a natural number greater than 0.

例如,电流A为8A,则EC可以将充电电流设置为8-8*10%=7.2A。For example, if the current A is 8A, then the EC can set the charging current to 8-8*10%=7.2A.

情况4,电流A大于电流B。Case 4, current A is greater than current B.

若电流A大于电流B,说明电池的充电电流经过一段时间后下降,电池可能处于安全充电状态。EC可以进一步判断电池是否存在充电保护策略。If the current A is greater than the current B, it means that the charging current of the battery drops after a period of time, and the battery may be in a safe charging state. EC can further judge whether there is a charging protection strategy for the battery.

EC可以从电池读取美国信息互换标准代码(American standard code forinformation interchange,ASCII),ASCII通常包含电池厂商的标识(identifier,ID),如ASCII的后两位字符。EC从ASCII中获取电池厂商的ID后,再根据表2确定电池是否存在充电保护策略。The EC can read the American standard code for information interchange (ASCII) from the battery. ASCII usually contains the battery manufacturer's identifier (identifier, ID), such as the last two characters of ASCII. After the EC obtains the battery manufacturer's ID from the ASCII, it determines whether the battery has a charging protection strategy according to Table 2.

若ASCII包含的厂商ID为电池厂商1的ID,EC可以根据表2确定电池不存在防单电芯过充的充电保护策略,以及不存在IR补偿的充电保护策略。If the manufacturer ID contained in ASCII is the ID of battery manufacturer 1, the EC can determine according to Table 2 that the battery does not have a charging protection strategy for preventing single-cell overcharging, and does not have a charging protection strategy for IR compensation.

若ASCII包含的厂商ID为电池厂商2的ID,EC可以根据表2确定电池不存在防单电芯过充的充电保护策略,以及存在IR补偿的充电保护策略。If the manufacturer ID contained in ASCII is the ID of battery manufacturer 2, the EC can determine according to Table 2 that the battery does not have a charging protection strategy for preventing single-cell overcharging, and that there is a charging protection strategy for IR compensation.

若ASCII包含的厂商ID为电池厂商3的ID,EC可以根据表2确定电池存在防单电芯过充的充电保护策略,以及存在IR补偿的充电保护策略。If the manufacturer ID contained in ASCII is the ID of battery manufacturer 3, the EC can determine from Table 2 that the battery has a charging protection strategy for preventing single-cell overcharging and a charging protection strategy for IR compensation.

情况4.1,电池不存在充电保护策略。In case 4.1, there is no charging protection strategy for the battery.

若电池不存在充电保护策略,EC可以指示charger,将充电电流设置为“电流B-a%*电流A”,即,在电流B的基础上降低充电电流。If the battery does not have a charging protection strategy, the EC can instruct the charger to set the charging current as "current B-a%*current A", that is, reduce the charging current on the basis of current B.

例如,电流A为8V,电流B为7.5V,则EC可以将充电电流设置为7.5-8*10%=6.7A。For example, if the current A is 8V and the current B is 7.5V, then the EC can set the charging current to 7.5-8*10%=6.7A.

由于情况4.1中电流B小于电流A,在电流B的基础上降低充电电流能够进一步提高电池的充电安全性。Since the current B is smaller than the current A in case 4.1, reducing the charging current on the basis of the current B can further improve the charging safety of the battery.

情况4.2,电池存在充电保护策略。In case 4.2, there is a charging protection strategy for the battery.

若电池存在充电保护策略,EC可以进一步判断充电电流的下降幅度是否足够大,即,判断电流A减电流B是否大于第四阈值,其中,第四阈值可以是a%*电流A。If the battery has a charging protection strategy, the EC can further determine whether the drop in charging current is large enough, that is, determine whether the current A minus the current B is greater than the fourth threshold, where the fourth threshold can be a%*current A.

若电流A减电流B大于第四阈值,说明电池的充电电流的下降幅度较大,电池可以在当前的充电条件下安全充电,EC确定电流B无需调整。If the current A minus the current B is greater than the fourth threshold, it means that the charging current of the battery has dropped significantly, the battery can be safely charged under the current charging conditions, and the EC determines that the current B does not need to be adjusted.

若电流A减电流B小于或等于第二阈值,说明电池的充电电流的下降幅度较小,电池使用电流B进行充电存在安全风险,EC可以指示charger,将充电电流设置为“电流A-a%*电流A”,即,在电流A的基础上降低充电电流。If the current A minus the current B is less than or equal to the second threshold, it means that the charging current of the battery has a small drop, and there is a safety risk in charging the battery with the current B. The EC can instruct the charger to set the charging current as "current A-a%*current A", that is, reduce the charging current on the basis of the current A.

需要说明的是,EC可以单独执行图3所示的方法,也可以单独执行图4所示的方法,还可以同时执行图3和图4所示的方法。It should be noted that the EC may execute the method shown in FIG. 3 alone, may also execute the method shown in FIG. 4 alone, and may also execute the methods shown in FIG. 3 and FIG. 4 simultaneously.

综上所述,当电学特征值(电芯的电压差,和/或,电池的电流)不满足安全要求时,说明电池处于危险状态;第一充电特征值和第二充电特征值是EC先后两次获取的充电特征值,当第一充电特征值小于或等于第二充电特征值时,说明电池的充电保护策略失效,或者,说明电池不存在充电保护策略;此时,EC可以降低电池的充电特征值(充电电压,和/或,充电电流),从而提高了电池在充电过程中的安全性。To sum up, when the electrical characteristic value (the voltage difference of the battery cell, and/or the current of the battery) does not meet the safety requirements, it means that the battery is in a dangerous state; the first charging characteristic value and the second charging characteristic value are EC successively The charging characteristic value obtained twice, when the first charging characteristic value is less than or equal to the second charging characteristic value, it means that the charging protection strategy of the battery is invalid, or that there is no charging protection strategy for the battery; at this time, the EC can reduce the charging protection strategy of the battery. Charging characteristic value (charging voltage, and/or, charging current), thereby improving the safety of the battery during charging.

下面结合图5介绍本发明提供的充电方法的另一实施例。该实施例包含以下步骤。Another embodiment of the charging method provided by the present invention will be introduced below with reference to FIG. 5 . This embodiment includes the following steps.

S510,电子设备获取电池的第一充电特征值。S510, the electronic device acquires a first charging characteristic value of the battery.

该电池可以是不可拆卸电池,也可以是可拆卸电池。The battery can be a non-removable battery or a removable battery.

在一种可选的实施方式中,该电池是可拆卸电池,电子设备获取电池的第一充电特征值之前,首先读取充电器插入AC_IN信号和电池插入BAT_IN信号;随后,电子设备根据AC_IN信号和BAT_IN信号的电平确定充电器和电池是否插入电子设备;当充电器和电池插入电子设备时,电子设备再获取电池的第一充电特征值。In an optional implementation, the battery is a removable battery, and before the electronic device obtains the first charging characteristic value of the battery, it first reads the charger insertion AC_IN signal and the battery insertion BAT_IN signal; then, the electronic device reads the AC_IN signal according to the AC_IN signal The levels of the and BAT_IN signals determine whether the charger and the battery are inserted into the electronic device; when the charger and the battery are inserted into the electronic device, the electronic device obtains the first charging characteristic value of the battery.

S520,电子设备获取电池的第二充电特征值和电学特征值,第二充电特征值是在获取第一充电特征值之后获取的。S520. The electronic device acquires a second charging characteristic value and an electrical characteristic value of the battery, where the second charging characteristic value is acquired after the first charging characteristic value is acquired.

S530,当电学特征值不满足安全要求时,并且,当第一充电特征值小于或等于第二充电特征值时,电子设备确定电池的充电特征值为第三充电特征值,第三充电特征值为第一充电特征值减去第一数值后得到的值。S530. When the electrical characteristic value does not meet the safety requirements, and when the first characteristic charging value is less than or equal to the second characteristic charging value, the electronic device determines that the characteristic charging value of the battery is a third characteristic charging value, and the third characteristic charging characteristic value is is a value obtained by subtracting the first numerical value from the first charging characteristic value.

图5所示的方法可以由电子设备中的电源管理模块执行,示例性地,电源管理模块可以是EC,EC可以周期性地获取电池的充电特征值和电学特征值。The method shown in FIG. 5 may be executed by a power management module in the electronic device. Exemplarily, the power management module may be an EC, and the EC may periodically obtain the charging characteristic value and the electrical characteristic value of the battery.

在一种可选的实施方式中,第一充电特征值包括第一充电电压值,第二充电特征值包括第二充电电压值,电学特征值包括电池中任意两个电芯的电压差,电学特征值不满足安全要求,包括:电压差大于电压差阈值。In an optional implementation, the first characteristic value of charging includes a first charging voltage value, the second characteristic value of charging includes a second charging voltage value, the electrical characteristic value includes the voltage difference between any two cells in the battery, and the electrical characteristic value includes The characteristic value does not meet the safety requirements, including: the voltage difference is greater than the voltage difference threshold.

在另一种可选的实施方式中,第一充电特征值包括第一充电电流值,第二充电特征值包括第二充电电流值,电学特征值包括电池的电流值,电学特征值不满足安全要求,包括:电池的电流值大于电流阈值。In another optional implementation manner, the first characteristic value of charging includes the first charging current value, the second characteristic value of charging includes the second charging current value, the electrical characteristic value includes the current value of the battery, and the electrical characteristic value does not meet the safety requirements. Requirements include: the current value of the battery is greater than the current threshold.

EC可以只判断电压差是否满足安全要求,也可以只判断电池的电流值是否满足安全要求(例如,电池只包含一个电芯),还可以同时判断电压差和电池的电流值是否满足安全要求。The EC can only judge whether the voltage difference meets the safety requirements, or only judge whether the current value of the battery meets the safety requirements (for example, the battery contains only one battery cell), or judge whether the voltage difference and the current value of the battery meet the safety requirements at the same time.

当电学特征值不满足安全要求时,说明电池处于危险状态;第一充电特征值和第二充电特征值是EC先后两次获取的充电特征值,当第一充电特征值小于或等于第二充电特征值时,说明电池的充电保护策略失效,或者,说明电池不存在充电保护策略;此时,EC可以降低电池的充电特征值,由于EC获取第一充电特征值时,电池的电学特征值满足安全要求,在第一充电特征值的基础上继续降低充电特征值可以保证第三充电特征值满足安全要求,从而提高了电池在充电过程中的安全性。When the electrical characteristic value does not meet the safety requirements, it means that the battery is in a dangerous state; the first charging characteristic value and the second charging characteristic value are the charging characteristic values acquired twice by the EC, when the first charging characteristic value is less than or equal to the second charging characteristic value When the eigenvalue is , it means that the charging protection strategy of the battery is invalid, or that there is no charging protection strategy for the battery; at this time, the EC can reduce the charging eigenvalue of the battery, because when the EC obtains the first charging eigenvalue, the electrical characteristic value of the battery satisfies Safety requirements, continuing to reduce the charging characteristic value on the basis of the first charging characteristic value can ensure that the third charging characteristic value meets the safety requirement, thereby improving the safety of the battery during charging.

在一种可选的实施方式中,第一数值与第一充电特征值正相关。In an optional implementation manner, the first numerical value is positively correlated with the first charging characteristic value.

例如,第一数值为第一充电特征值乘以第一系数后得到的数值,第一系数为大于0且小于1的数值。For example, the first value is a value obtained by multiplying the first charging characteristic value by a first coefficient, and the first coefficient is a value greater than 0 and less than 1.

本实施例中,正相关指的是:第一数值随着第一充电特征值的增大而增大,或者,第一数值随着第一充电特征值的减小而减小。第一充电特征值是降低充电特征值的参考量,当第一充电特征值较大时,第一数值是一个较大的数值才能满足安全性要求。In this embodiment, the positive correlation means that: the first value increases with the increase of the first characteristic charging value, or the first numerical value decreases with the decrease of the first characteristic charging value. The first characteristic value of charging is a reference amount for reducing the characteristic value of charging. When the first characteristic value of charging is relatively large, the first value must be a large value to meet the safety requirement.

在一种可选的实施方式中,图5所示的方法还包括:In an optional implementation manner, the method shown in FIG. 5 also includes:

当电学特征值不满足安全要求时,并且,当第一充电特征值大于第二充电特征值时,电源管理模块确定电池是否支持充电保护策略;When the electrical characteristic value does not meet the safety requirements, and when the first charging characteristic value is greater than the second charging characteristic value, the power management module determines whether the battery supports the charging protection strategy;

当电池支持充电保护策略时,电源管理模块确定第一充电特征值与第二充电特征值的差值;When the battery supports the charging protection strategy, the power management module determines the difference between the first charging characteristic value and the second charging characteristic value;

当差值大于阈值时,电源管理模块确定电池的充电特征值为第二充电特征值;When the difference is greater than the threshold, the power management module determines that the charging characteristic value of the battery is a second charging characteristic value;

当差值小于或等于阈值时,电源管理模块确定电池的充电特征值为第三充电特征值。When the difference is less than or equal to the threshold, the power management module determines that the charging characteristic value of the battery is a third charging characteristic value.

第一充电特征值大于第二充电特征值不能说明电池的充电保护策略正在生效,例如,当电子设备处于节能模式时,存在第一充电特征值大于第二充电特征值的可能性,因此,在这种情况下,EC需要确认电池是否支持充电保护策略。当电池支持充电保护策略时,EC还需要进一步确定充电保护策略是否生效,其中,当差值大于阈值时,说明充电特征值下降较大,EC确认电池的充电保护策略生效,可以继续按照第二充电特征值进行充电;当差值大于阈值时,说明充电特征值下降较小,EC无法确认电池的充电保护策略是否生效,保险起见,EC可以降低充电特征值,从而提高了电池在充电过程中的安全性。The first charging characteristic value being greater than the second charging characteristic value cannot indicate that the charging protection strategy of the battery is in effect. For example, when the electronic device is in the energy-saving mode, there is a possibility that the first charging characteristic value is greater than the second charging characteristic value. In this case, the EC needs to confirm whether the battery supports the charging protection strategy. When the battery supports the charging protection strategy, the EC needs to further determine whether the charging protection strategy is in effect. When the difference is greater than the threshold, it means that the charging characteristic value has dropped significantly. The EC confirms that the charging protection strategy of the battery is in effect, and can continue to follow the second Charging characteristic value is used for charging; when the difference is greater than the threshold value, it means that the charging characteristic value drops small, and EC cannot confirm whether the charging protection strategy of the battery is effective. To be on the safe side, EC can reduce the charging characteristic value, thereby improving the charging process security.

在一种可选的实施方式中,图5所示的方法还包括:In an optional implementation manner, the method shown in FIG. 5 also includes:

当电学特征值不满足安全要求时,并且,当第一充电特征值大于第二充电特征值时,电源管理模块确定电池是否支持充电保护策略;When the electrical characteristic value does not meet the safety requirements, and when the first charging characteristic value is greater than the second charging characteristic value, the power management module determines whether the battery supports the charging protection strategy;

当电池不支持充电保护策略时,电源管理模块确定电池的充电特征值为第四充电特征,第四充电特征值为第二充电特征值减去第二数值后得到的值。When the battery does not support the charging protection strategy, the power management module determines that the charging characteristic value of the battery is a fourth charging characteristic value, and the fourth charging characteristic value is a value obtained by subtracting the second value from the second charging characteristic value.

第一充电特征值大于第二充电特征值不能说明电池的充电保护策略正在生效,例如,当电子设备处于节能模式时,存在第一充电特征值大于第二充电特征值的可能性,因此,在这种情况下,EC需要确认电池是否支持充电保护策略。当电池不支持充电保护策略时,EC可以直接降低第二充电特征值,从而提高了电池在充电过程中的安全性。The first charging characteristic value being greater than the second charging characteristic value cannot indicate that the charging protection strategy of the battery is in effect. For example, when the electronic device is in the energy-saving mode, there is a possibility that the first charging characteristic value is greater than the second charging characteristic value. In this case, the EC needs to confirm whether the battery supports the charging protection strategy. When the battery does not support the charging protection strategy, the EC can directly reduce the second charging characteristic value, thereby improving the safety of the battery during charging.

在一种可选的实施方式中,第二数值与第二充电特征值正相关。In an optional implementation manner, the second numerical value is positively correlated with the second charging characteristic value.

例如,第二数值为第二充电特征值乘以第二系数后得到的数值,第二系数为大于0且小于1的数值。For example, the second value is a value obtained by multiplying the second charging characteristic value by a second coefficient, and the second coefficient is a value greater than 0 and less than 1.

本实施例中,正相关指的是:第二数值随着第二充电特征值的增大而增大,或者,第二数值随着第二充电特征值的减小而减小。第二充电特征值是降低充电特征值的参考量,当第二充电特征值较大时,第二数值是一个较大的数值才能满足安全性要求。In this embodiment, the positive correlation means that the second value increases as the second characteristic value of charging increases, or the second value decreases as the second characteristic value of charging decreases. The second characteristic value of charging is a reference amount for reducing the characteristic value of charging. When the second characteristic value of charging is larger, the second value must be a larger value to meet the safety requirement.

在一种可选的实施方式中,图5所示的方法还包括:当电子设备确定电池的充电特征值为第三充电特征值时,电子设备控制充电管理器以第三充电特征值对电池进行充电;当电子设备确定电池的充电特征值为第四充电特征值时,电子设备控制充电管理器以第四充电特征值对电池进行充电。In an optional implementation manner, the method shown in FIG. 5 further includes: when the electronic device determines that the charging characteristic value of the battery is the third charging characteristic value, the electronic device controls the charging manager to charge the battery with the third charging characteristic value. Charging; when the electronic device determines that the charging characteristic value of the battery is the fourth charging characteristic value, the electronic device controls the charging manager to charge the battery with the fourth charging characteristic value.

在一种可选的实施方式中,上述方法还包括:当电池充满电时,电子设备控制充电管理器停止对电池进行充电。In an optional implementation manner, the above method further includes: when the battery is fully charged, the electronic device controls the charging manager to stop charging the battery.

该实施例可以防止电池过充导致的电池损坏。This embodiment can prevent battery damage caused by battery overcharging.

本申请还提供了一种计算机程序产品,该计算机程序产品被处理器执行时实现本申请中任一方法实施例所述的方法。The present application also provides a computer program product, which implements the method described in any method embodiment in the present application when the computer program product is executed by a processor.

该计算机程序产品可以存储在存储器中,经过预处理、编译、汇编和链接等处理过程最终被转换为能够被处理器执行的可执行目标文件。The computer program product can be stored in a memory, and finally converted into an executable object file that can be executed by a processor after preprocessing, compiling, assembling, linking and other processing processes.

该计算机程序产品也可以固化在芯片中的代码。本申请对计算机程序产品的具体形式不做限定。The computer program product can also solidify the code in the chip. This application does not limit the specific form of the computer program product.

本申请还提供了一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被计算机执行时实现本申请中任一方法实施例所述的方法。该计算机程序可以是高级语言程序,也可以是可执行目标程序。The present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a computer, the method described in any method embodiment in the present application is implemented. The computer program may be a high-level language program or an executable object program.

该计算机可读存储介质可以是易失性存储器或非易失性存储器,或者,可以同时包括易失性存储器和非易失性存储器。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rateSDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(directrambus RAM,DR RAM)。The computer readable storage medium may be a volatile memory or a nonvolatile memory, or may include both a volatile memory and a nonvolatile memory. Among them, the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory. Volatile memory can be random access memory (RAM), which acts as external cache memory. By way of illustration and not limitation, many forms of RAM are available, such as static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rateSDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) And direct memory bus random access memory (directrambus RAM, DR RAM).

本领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的装置和设备的具体工作过程以及产生的技术效果,可以参考前述方法实施例中对应的过程和技术效果,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process and technical effects of the devices and equipment described above can refer to the corresponding processes and technical effects in the foregoing method embodiments, here No longer.

在本申请所提供的几个实施例中,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的方法实施例的一些特征可以忽略,或不执行。以上所描述的装置实施例仅仅是示意性的,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,多个单元或组件可以结合或者可以集成到另一个系统。另外,各单元之间的耦合或各个组件之间的耦合可以是直接耦合,也可以是间接耦合,上述耦合包括电的、机械的或其它形式的连接。In several embodiments provided in this application, the disclosed systems, devices and methods may be implemented in other ways. For example, some features of the method embodiments described above may be omitted, or not implemented. The device embodiments described above are only illustrative, and the division of units is only a logical function division. In actual implementation, there may be other division methods, and multiple units or components may be combined or integrated into another system. In addition, the coupling between the various units or the coupling between the various components may be direct coupling or indirect coupling, and the above coupling includes electrical, mechanical or other forms of connection.

应理解,在本申请的各种实施例中,各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。It should be understood that in various embodiments of the present application, the sequence numbers of the processes do not mean the order of execution, and the execution order of the processes should be determined by their functions and internal logic, rather than by the embodiments of the present application. The implementation process constitutes any limitation.

另外,本文中术语“系统”和“网络”在本文中常被可互换使用。本文中的术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。Additionally, the terms "system" and "network" are often used herein interchangeably. The term "and/or" in this article is just an association relationship describing associated objects, which means that there can be three relationships, for example, A and/or B, which can mean: A exists alone, A and B exist simultaneously, and A and B exist alone. There are three cases of B. In addition, the character "/" in this article generally indicates that the contextual objects are an "or" relationship.

总之,以上所述仅为本申请技术方案的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。In a word, the above descriptions are only preferred embodiments of the technical solutions of the present application, and are not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of this application shall be included within the protection scope of this application.

Claims (10)

1. A charging method applied to an electronic device, wherein the electronic device comprises a battery, the method comprising:
the electronic equipment acquires a first charging characteristic value of the battery;
the electronic equipment acquires a second charging characteristic value and an electrical characteristic value of the battery, wherein the second charging characteristic value is acquired after the first charging characteristic value is acquired;
when the electrical characteristic value does not meet a safety requirement, and when the first charging characteristic value is greater than the second charging characteristic value, the electronic device determines whether the battery supports a charging protection strategy;
when the battery supports a charge protection strategy, the electronic device determines a difference value between the first charge characteristic value and the second charge characteristic value;
when the difference value is larger than a threshold value, the electronic equipment determines that the charging characteristic value of the battery is the second charging characteristic value;
when the difference value is smaller than or equal to the threshold value, the electronic equipment determines that the charging characteristic value of the battery is a third charging characteristic value, and the third charging characteristic value is obtained by subtracting a first numerical value from the first charging characteristic value;
when the battery does not support the charging protection strategy, the electronic device determines that the charging characteristic value of the battery is a fourth charging characteristic value, and the fourth charging characteristic value is obtained by subtracting a second numerical value from the second charging characteristic value.
2. The method of claim 1, wherein the second value is positively correlated with the second charging characteristic value.
3. The method of claim 2, wherein the second value is positively correlated with the second charging characteristic value, comprising:
the second value is obtained by multiplying the second charging characteristic value by a second coefficient, and the second coefficient is a value larger than 0 and smaller than 1.
4. The method of any one of claims 1 to 3, wherein the first charging characteristic value comprises a first charging voltage value, the second charging characteristic value comprises a second charging voltage value, and the electrical characteristic value comprises a voltage difference between any two cells of the battery,
the electrical characteristic value does not meet safety requirements, including:
the voltage difference is greater than a voltage difference threshold.
5. The method of any one of claims 1 to 3, wherein the first charging characteristic value comprises a first charging current value, the second charging characteristic value comprises a second charging current value, the electrical characteristic value comprises a current value of the battery,
the electrical characteristic value does not meet safety requirements, including:
the current value of the battery is greater than a current threshold value.
6. The method according to any one of claims 1 to 3,
before the electronic device obtains the first charging characteristic value of the battery, the method further includes:
the electronic equipment reads a charger insertion AC _ IN signal and a battery insertion BAT _ IN signal;
the electronic equipment determines whether a charger and a battery are inserted into the electronic equipment according to the levels of the AC _ IN signal and the BAT _ IN signal;
the electronic equipment acquires a first charging characteristic value of the battery, and comprises the following steps:
when the charger and the battery are inserted into the electronic device, the electronic device acquires a first charging voltage and a first charging current of the battery;
the electronic device acquiring a second charging characteristic value and an electrical characteristic value of the battery, including:
the electronic equipment acquires a second charging voltage, a second charging current and battery information of the battery, wherein the battery information comprises the current cell voltage and the current of the battery.
7. The method according to any one of claims 1 to 3, wherein the electronic device obtaining a first charging characteristic value of the battery comprises:
when the battery is not fully charged, the electronic device obtains a first charging voltage and a first charging current of the battery.
8. The method of any of claims 1 to 3, further comprising:
when the battery is fully charged, the electronic device controls a charging manager to stop charging the battery.
9. A charging apparatus comprising a processor and a memory, the processor and the memory being coupled, the memory for storing a computer program that, when executed by the processor, causes the apparatus to perform the method of any of claims 1 to 8.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to carry out the method of any one of claims 1 to 8.
CN202111383964.5A 2021-09-26 2021-11-19 Charging method and charging device Active CN114221403B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111133892 2021-09-26
CN2021111338929 2021-09-26

Publications (2)

Publication Number Publication Date
CN114221403A CN114221403A (en) 2022-03-22
CN114221403B true CN114221403B (en) 2022-12-02

Family

ID=80697673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111383964.5A Active CN114221403B (en) 2021-09-26 2021-11-19 Charging method and charging device

Country Status (1)

Country Link
CN (1) CN114221403B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107411B (en) * 2023-04-12 2023-08-29 荣耀终端有限公司 Starting-up method and related device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488591A (en) * 2008-01-16 2009-07-22 仁宝电脑工业股份有限公司 Method for multi-section charging battery module
CN107706979A (en) * 2017-10-24 2018-02-16 贝斯拓欧洲控股有限公司 Charge protection method, device and electronic cigarette
CN111293754A (en) * 2020-03-20 2020-06-16 Oppo广东移动通信有限公司 Charging system, method, electronic device, and computer-readable storage medium
CN113078711A (en) * 2021-04-01 2021-07-06 安徽华菱汽车有限公司 Charging control method, system and device for power battery
CN113746151A (en) * 2020-05-29 2021-12-03 华为技术有限公司 Battery charging method, electronic device, storage medium and program product

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112152275B (en) * 2019-06-28 2021-08-31 Oppo广东移动通信有限公司 Battery charging method and apparatus, electronic device, computer-readable storage medium
TWI740404B (en) * 2020-03-04 2021-09-21 華碩電腦股份有限公司 Battery protection charging method and system thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488591A (en) * 2008-01-16 2009-07-22 仁宝电脑工业股份有限公司 Method for multi-section charging battery module
CN107706979A (en) * 2017-10-24 2018-02-16 贝斯拓欧洲控股有限公司 Charge protection method, device and electronic cigarette
CN111293754A (en) * 2020-03-20 2020-06-16 Oppo广东移动通信有限公司 Charging system, method, electronic device, and computer-readable storage medium
CN113746151A (en) * 2020-05-29 2021-12-03 华为技术有限公司 Battery charging method, electronic device, storage medium and program product
CN113078711A (en) * 2021-04-01 2021-07-06 安徽华菱汽车有限公司 Charging control method, system and device for power battery

Also Published As

Publication number Publication date
CN114221403A (en) 2022-03-22

Similar Documents

Publication Publication Date Title
CN111463842B (en) Electronic equipment and communication method thereof
CN108845655B (en) Electronic equipment control method, device, control circuit and electronic equipment
CN105449757B (en) Prevent the method and device that adapter or portable power source disconnect in charging process
US20130154551A1 (en) Charging port
JP2021529320A (en) Adapter test equipment, methods and computer storage media
EP3148039A1 (en) Fast charging method, power source adapter and mobile terminal
CN106230070B (en) Charging method and device
US20200068691A1 (en) Discharge method and circuit for usb connector
CN106329627A (en) Charging method and device
CN116914894B (en) Cut-off voltage adjusting method, electronic device and readable storage medium
CN114221403B (en) Charging method and charging device
CN111327087B (en) Electronic equipment and charging method thereof
CN106329630A (en) Charging method and device
CN104659867A (en) Power supply device and method for modulating charging current of power supply device of portable device
CN112260348B (en) Charging control circuit and charging equipment
US20140181547A1 (en) Smart charging system for hybrid battery pack
CN104124732A (en) USB (Universal Serial Bus) interface based universal wireless power supply circuit for mobile terminal and power supply method thereof
CN116054301A (en) A battery protection device, battery protection method and electronic equipment
CN106329625B (en) charging method and device
CN106797414A (en) The leakage current detection circuit and terminal of a kind of terminal
WO2022061677A1 (en) Charing control method and circuit, device, and storage medium
CN112234683A (en) Charging control method of electronic equipment and electronic equipment
WO2017190474A1 (en) Power supply method and apparatus
CN214674403U (en) Charging and discharging circuit and electronic equipment
CN111969678B (en) High-pass platform based terminal quick charging method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Terminal Co.,Ltd.

Country or region after: China

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before: Honor Device Co.,Ltd.

Country or region before: China