[go: up one dir, main page]

CN116094083A - Charging method, device and storage medium - Google Patents

Charging method, device and storage medium Download PDF

Info

Publication number
CN116094083A
CN116094083A CN202210751689.6A CN202210751689A CN116094083A CN 116094083 A CN116094083 A CN 116094083A CN 202210751689 A CN202210751689 A CN 202210751689A CN 116094083 A CN116094083 A CN 116094083A
Authority
CN
China
Prior art keywords
value
temperature
charging
threshold
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210751689.6A
Other languages
Chinese (zh)
Other versions
CN116094083B (en
Inventor
李鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210751689.6A priority Critical patent/CN116094083B/en
Publication of CN116094083A publication Critical patent/CN116094083A/en
Application granted granted Critical
Publication of CN116094083B publication Critical patent/CN116094083B/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/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
    • 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
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0047Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with monitoring or indicating 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
    • 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)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

A charging method, a device and a storage medium relate to the technical field of charging, and the method comprises the following steps: the electronic equipment starts charging; acquiring power consumption of the electronic equipment in charging; when the power consumption is greater than or equal to a first threshold value, judging whether the temperature of the electronic equipment is greater than the first temperature threshold value; when the temperature of the electronic equipment is smaller than or equal to a first temperature threshold value, judging whether the electric quantity of the electronic equipment is larger than the first electric quantity threshold value or not; when the electric quantity of the electronic equipment is smaller than or equal to a first electric quantity threshold value, the electronic equipment is charged by adopting a first current value; and as the charging of the electronic equipment is continuously carried out, when the temperature of the electronic equipment is greater than a first temperature threshold value and is smaller than or equal to a second temperature threshold value, the electronic equipment is charged by adopting a second current value, and the second current value is greater than the lowest charging current value and is smaller than the first current value; and when the temperature of the electronic equipment is larger than the second temperature threshold value, the electronic equipment is charged by adopting the lowest charging current value. And the temperature rise of the electronic equipment is delayed.

Description

充电方法、装置及存储介质Charging method, device and storage medium

技术领域technical field

本申请实施例涉及充电技术领域,尤其涉及一种充电方法、装置及存储介质。The embodiments of the present application relate to the technical field of charging, and in particular, to a charging method, device, and storage medium.

背景技术Background technique

越来越多的用户习惯于在使用电子设备(例如手机等)时同时对电子设备进行充电。More and more users are accustomed to charging the electronic equipment while using the electronic equipment (such as a mobile phone, etc.).

在一些实现中,电子设备的充电过程包括三个阶段:恒定电流预充电、大电流恒定电流充电以及恒定电压充电。In some implementations, the charging process of the electronic device includes three stages: constant current pre-charging, high-current constant-current charging, and constant-voltage charging.

然而,基于现有充电过程进行充电时,容易导致电子设备的温度上升较快,影响用户体验。However, when charging based on the existing charging process, it is easy to cause the temperature of the electronic device to rise rapidly, which affects user experience.

发明内容Contents of the invention

本申请实施例提供一种充电方法、装置及存储介质,涉及充电技术领域,有助于延缓电子设备的温度上升。Embodiments of the present application provide a charging method, device, and storage medium, which relate to the technical field of charging and help to delay the temperature rise of electronic equipment.

第一方面,本申请实施例提供一种充电方法,该方法包括:电子设备启动充电;获取电子设备在充电中的功耗;当功耗大于或等于第一阈值时,判断电子设备的温度是否大于第一温度阈值;当电子设备的温度小于或等于第一温度阈值时,判断电子设备的电量是否大于第一电量阈值;当电子设备的电量大于第一电量阈值时,电子设备采用最低充电电流值进行充电;当电子设备的电量小于或等于第一电量阈值时,电子设备采用第一电流值进行充电;以及,随着电子设备充电的持续进行,当电子设备的温度大于第一温度阈值,且小于或等于第二温度阈值时,电子设备采用第二电流值进行充电,第二电流值大于最低充电电流值,且小于第一电流值;当电子设备的温度大于第二温度阈值时,电子设备采用最低充电电流值进行充电。这样在电子设备的温度低且电量低时采用较大电流进行充电,可以较快提高电子设备的电量,有效降低低电量时的电量焦虑性,在电子设备的温度上升时,则降低充电电流,减少电子设备的发热量,从而有效延缓电子设备的温度上升。In the first aspect, the embodiment of the present application provides a charging method, the method includes: starting charging of the electronic device; obtaining the power consumption of the electronic device during charging; when the power consumption is greater than or equal to the first threshold, judging whether the temperature of the electronic device is greater than the first temperature threshold; when the temperature of the electronic device is less than or equal to the first temperature threshold, determine whether the power of the electronic device is greater than the first power threshold; when the power of the electronic device is greater than the first power threshold, the electronic device uses the lowest charging current value; when the power of the electronic device is less than or equal to the first power threshold, the electronic device is charged with the first current value; and, as the charging of the electronic device continues, when the temperature of the electronic device is greater than the first temperature threshold, and is less than or equal to the second temperature threshold, the electronic device is charged with a second current value, and the second current value is greater than the lowest charging current value and less than the first current value; when the temperature of the electronic device is greater than the second temperature threshold, the electronic device The device is charged with the lowest charging current value. In this way, when the temperature of the electronic device is low and the power is low, a larger current is used for charging, which can quickly increase the power of the electronic device, effectively reduce the power anxiety when the power is low, and reduce the charging current when the temperature of the electronic device rises. Reduce the calorific value of electronic equipment, thereby effectively delaying the temperature rise of electronic equipment.

在一种可能的实现方式中,获取电子设备在充电中的功耗,包括:获取N个时间点的电子设备从充电器接收的第三电流值,以及电子设备的电池接收的第四电流值,得到N对成对关联的第三电流值和第四电流值,N为自然数;根据N对第三电流值和第四电流值得到功耗。这样后续可以依据得到的功耗来识别电子设备的负载的场景。In a possible implementation manner, obtaining the power consumption of the electronic device during charging includes: obtaining the third current value received by the electronic device from the charger at N time points, and the fourth current value received by the battery of the electronic device , to obtain N pairs of associated third current values and fourth current values, where N is a natural number; power consumption is obtained according to the N pairs of third current values and fourth current values. In this way, the scene of the load of the electronic device can be identified subsequently according to the obtained power consumption.

在一种可能的实现方式中,根据N对第三电流值和第四电流值得到功耗,包括:分别计算N对第三电流值和第四电流值中任一对第三电流值和第四电流值的差值,得到N个差值;对N个差值按照预设算法计算得到功耗,预设算法包括下述任一个:求平均算法、先筛选有效数据再求平均算法、求中位数算法。这样后续可以依据得到的功耗来识别电子设备的负载的场景。In a possible implementation manner, obtaining the power consumption according to N pairs of third current values and fourth current values includes: respectively calculating any pair of third current values and fourth current values among N pairs of third current values and fourth current values The difference between the four current values can get N difference values; the power consumption can be calculated according to the preset algorithm for the N difference values. Median algorithm. In this way, the scene of the load of the electronic device can be identified subsequently according to the obtained power consumption.

在一种可能的实现方式中,第一电流值和/或第二电流值均为预先学习得到,方法还包括:分别获取电子设备采用第一电流值充电时的第一过程数据,和/或,电子设备采用第二电流值充电时的第二过程数据,其中,第一过程数据包括第一电池温度升高值和/或第一壳体温度升高值,第二过程数据包括第二电池温度升高值和/或第二壳体温度升高值;当第一电池温度升高值小于或等于第一温升阈值,和/或,第一壳体温度升高值小于或等于第二温升阈值时,更新第一电流值为更大的值;或者,当第一电池温度升高值大于第一温升阈值,和/或,第一壳体温度升高值大于第二温升阈值时,更新第一电流值为更小的值;和/或,当第二电池温度升高值小于或等于第三温升阈值,和/或,第二壳体温度升高值小于或等于第四温升阈值时,更新第二电流值为更大的值;或者,当第二电池温度升高值大于第三温升阈值,和/或,第二壳体温度升高值大于第四温升阈值时,更新第二电流值为更小的值。本申请实施例中,电子设备充一次电就可以根据充电过程的第一过程数据和/或第二过程数据更新一次第一电流值和/或第二电流值,这样在多次更新后可以得到在重载场景下较优的充电电流。In a possible implementation manner, both the first current value and/or the second current value are pre-learned, and the method further includes: respectively acquiring first process data when the electronic device is charged with the first current value, and/or , the second process data when the electronic device is charged with the second current value, wherein the first process data includes the first battery temperature rise value and/or the first housing temperature rise value, and the second process data includes the second battery temperature rise value The temperature rise value and/or the second case temperature rise value; when the first battery temperature rise value is less than or equal to the first temperature rise threshold value, and/or the first case temperature rise value is less than or equal to the second When the temperature rise threshold is reached, update the first current value to a larger value; or, when the first battery temperature rise value is greater than the first temperature rise threshold value, and/or, the first housing temperature rise value is greater than the second temperature rise value threshold, update the first current value to a smaller value; and/or, when the second battery temperature rise value is less than or equal to the third temperature rise threshold, and/or, the second housing temperature rise value is less than or equal to When the fourth temperature rise threshold is reached, update the second current value to a larger value; or, when the second battery temperature rise value is greater than the third temperature rise threshold, and/or, the second housing temperature rise value is greater than the fourth When the temperature rise threshold is reached, the second current value is updated to a smaller value. In the embodiment of the present application, the electronic device can update the first current value and/or the second current value once according to the first process data and/or the second process data of the charging process, so that after multiple updates, it can be obtained Optimal charging current in heavy load scenarios.

在一种可能的实现方式中,还包括:当功耗小于第一阈值且大于第二阈值时,判断电子设备的电量是否大于第二电量阈值;当电子设备的电量小于或等于第二电量阈值时,判断电子设备的温度是否大于第三温度阈值;当电子设备的温度小于或等于第三温度阈值时,电子设备采用第五电流值进行充电,第五电流值为预先学习得到的;当电子设备的温度大于第三温度阈值时,电子设备采用最低充电电流值进行充电。本申请实施例中,根据电子设备在中载场景下的电量和温度确定电子设备的充电电流,在电子设备的电量低且温度低时采用预先学习的第五电流值进行充电,第五电流值较大,以适当提高中载场景下电子设备的充电速度,将电子设备的电量快速补充到电量安全线以上,在电子设备的温度较高时采用最低充电电流值进行充电,以延缓中载场景下电子设备的温度上升。In a possible implementation, the method further includes: when the power consumption is less than the first threshold and greater than the second threshold, judging whether the power of the electronic device is greater than the second power threshold; when the power of the electronic device is less than or equal to the second power threshold , judge whether the temperature of the electronic device is greater than the third temperature threshold; when the temperature of the electronic device is less than or equal to the third temperature threshold, the electronic device uses the fifth current value for charging, and the fifth current value is learned in advance; when the electronic device When the temperature of the device is greater than the third temperature threshold, the electronic device is charged with the lowest charging current value. In the embodiment of the present application, the charging current of the electronic device is determined according to the power and temperature of the electronic device in a medium-load scene, and the fifth current value learned in advance is used for charging when the power of the electronic device is low and the temperature is low. The fifth current value Larger, to appropriately increase the charging speed of electronic devices in medium-load scenarios, quickly replenish the power of electronic devices above the power safety line, and use the lowest charging current value to charge electronic devices when the temperature of electronic devices is high, so as to delay the middle-load scenarios. The temperature of electronic equipment rises.

在一种可能的实现方式中,还包括:当电子设备的电量大于第二电量阈值时,电子设备采用最低充电电流值进行充电。这样在电子设备的电量较高时采用较低电流值进行充电,以提高中载场景下电子设备的充电安全性。In a possible implementation manner, the method further includes: when the electric power of the electronic device is greater than the second electric power threshold, charging the electronic device with the lowest charging current value. In this way, when the power of the electronic device is high, a lower current value is used for charging, so as to improve the charging safety of the electronic device in a medium-load scenario.

在一种可能的实现方式中,方法还包括:获取电子设备采用第五电流值充电时的第三过程数据,其中,第三过程数据包括第三电池温度升高值,第三壳体温度升高值和/或第一充电时长;当第三电池温度升高值小于或等于第五温升阈值,第三壳体温度升高值小于或等于第六温升阈值,和/或,第一充电时长大于第一时长阈值时,更新第五电流值为更大的值;或者,当第三电池温度升高值大于第五温升阈值,和/或,第三壳体温度升高值大于第六温升阈值时,更新第五电流值为更小的值。本申请实施例中,电子设备充一次电就可以根据充电过程的第三过程数据更新一次第五电流值,这样在多次更新后可以得到在中载场景下较优的充电电流。In a possible implementation, the method further includes: acquiring third process data when the electronic device is charged with a fifth current value, where the third process data includes a third battery temperature increase value, and the third housing temperature increase value is High value and/or first charging duration; when the third battery temperature rise value is less than or equal to the fifth temperature rise threshold, the third case temperature rise value is less than or equal to the sixth temperature rise threshold, and/or, the first When the charging duration is longer than the first duration threshold, update the fifth current value to a larger value; or, when the third battery temperature rise value is greater than the fifth temperature rise threshold value, and/or, the third housing temperature rise value is greater than When the sixth temperature rise threshold is reached, the fifth current value is updated to a smaller value. In the embodiment of the present application, the fifth current value can be updated once according to the third process data of the charging process after the electronic device is charged once, so that a better charging current in a medium-load scenario can be obtained after multiple updates.

在一种可能的实现方式中,还包括:当功耗小于或等于第二阈值时,判断电子设备的电量是否大于第三电量阈值;当电子设备的电量小于或等于第三电量阈值时,判断电子设备的温度是否大于第四温度阈值;当电子设备的温度小于或等于第四温度阈值时,电子设备采用第六电流值进行充电,第六电流值为预先学习得到的;当电子设备的温度大于第四温度阈值时,电子设备采用最低充电电流值进行充电。本申请实施例中,根据电子设备在轻载场景下的电量和温度确定电子设备的充电电流,在电子设备的电量低且温度低时采用预先学习的第六电流值进行充电,第六电流值较大,以适当提高轻载场景下电子设备的充电速度,将电子设备的电量快速补充到电量安全线以上。In a possible implementation, the method further includes: when the power consumption is less than or equal to the second threshold, judging whether the power of the electronic device is greater than the third power threshold; when the power of the electronic device is less than or equal to the third power threshold, judging Whether the temperature of the electronic device is greater than the fourth temperature threshold; when the temperature of the electronic device is less than or equal to the fourth temperature threshold, the electronic device uses the sixth current value for charging, and the sixth current value is learned in advance; when the temperature of the electronic device When the temperature is greater than the fourth temperature threshold, the electronic device is charged with the lowest charging current value. In the embodiment of the present application, the charging current of the electronic device is determined according to the power and temperature of the electronic device in a light-load scene, and the pre-learned sixth current value is used for charging when the power of the electronic device is low and the temperature is low. The sixth current value Larger, to appropriately increase the charging speed of electronic devices in light-load scenarios, and quickly replenish the power of electronic devices above the power safety line.

在一种可能的实现方式中,还包括:当电子设备的电量大于第三电量阈值时,电子设备采用最低充电电流值进行充电。这样在电子设备的电量较高时采用较低电流值进行充电,以提高轻载场景下电子设备的充电安全性。In a possible implementation manner, the method further includes: when the electric power of the electronic device is greater than the third electric power threshold, charging the electronic device with the lowest charging current value. In this way, when the power of the electronic device is high, a lower current value is used for charging, so as to improve the charging safety of the electronic device in a light-load scenario.

在一种可能的实现方式中,方法还包括:获取电子设备采用第六电流值充电时的第四过程数据,其中,第四过程数据包括第四电池温度升高值,第四壳体温度升高值和/或第二充电时长;当第四电池温度升高值小于或等于第七温升阈值,第四壳体温度升高值小于或等于第八温升阈值,和/或,第二充电时长大于第二时长阈值时,更新第六电流值为更大的值;或者,当第四电池温度升高值大于第七温升阈值,和/或,第四壳体温度升高值大于第八温升阈值时,更新第六电流值为更小的值。本申请实施例中,电子设备充一次电就可以根据充电过程的第四过程数据更新一次第六电流值,这样在多次更新后可以得到在轻载场景下较优的充电电流。In a possible implementation, the method further includes: acquiring fourth process data when the electronic device is charged with a sixth current value, where the fourth process data includes a fourth battery temperature rise value, and the fourth housing temperature rise value is High value and/or the second charging duration; when the fourth battery temperature rise value is less than or equal to the seventh temperature rise threshold, the fourth casing temperature rise value is less than or equal to the eighth temperature rise threshold, and/or, the second When the charging duration is longer than the second duration threshold, update the sixth current value to a larger value; or, when the fourth battery temperature rise value is greater than the seventh temperature rise threshold value, and/or, the fourth housing temperature rise value is greater than When the eighth temperature rise threshold is reached, the sixth current value is updated to a smaller value. In the embodiment of the present application, the sixth current value can be updated once according to the fourth process data of the charging process after the electronic device is charged once, so that a better charging current in a light-load scenario can be obtained after multiple updates.

在一种可能的实现方式中,在电子设备采用第一电流值进行充电之前,方法还包括:显示第一界面,第一界面包括通知信息、第一按钮和第二按钮,通知信息用于提示用户电子设备是否进入智能充电调控模式;响应于对第一按钮的触发操作,电子设备进入智能充电调控模式;或者,响应于对第二按钮的触发操作,电子设备采用最低充电电流值进行充电。增加了交互操作,提高了充电方式的灵活性。In a possible implementation, before the electronic device is charged with the first current value, the method further includes: displaying a first interface, the first interface includes notification information, a first button, and a second button, and the notification information is used to prompt Whether the electronic device of the user enters the intelligent charging regulation mode; in response to the trigger operation of the first button, the electronic device enters the intelligent charging regulation mode; or, in response to the trigger operation of the second button, the electronic device is charged with the lowest charging current value. Added interactive operations and improved the flexibility of charging methods.

在一种可能的实现方式中,在电子设备采用第一电流值进行充电的过程中,方法还包括:响应于用户的下拉操作显示第二界面,第二界面包括通知信息和第三按钮;响应于对第三按钮的触发操作,电子设备采用最低充电电流值进行充电。增加了交互操作,提高了充电方式的灵活性。In a possible implementation, during the charging process of the electronic device using the first current value, the method further includes: displaying a second interface in response to the user's pull-down operation, the second interface includes notification information and a third button; responding Based on the trigger operation of the third button, the electronic device is charged with the lowest charging current value. Added interactive operations and improved the flexibility of charging methods.

在一种可能的实现方式中,当功耗大于或等于第一阈值时,判断电子设备的温度是否大于第一温度阈值之前,还包括:判断电子设备是否为亮屏状态;当电子设备不为亮屏状态时,电子设备采用最低充电电流值进行充电;当功耗大于或等于第一阈值时,判断电子设备的温度是否大于第一温度阈值,包括:当电子设备为亮屏状态,且功耗大于或等于第一阈值时,判断电子设备的温度是否大于第一温度阈值。本申请实施例中,在对功耗进行判断之前判断电子设备是否处于亮屏状态,有助于后续基于亮屏状态下确定不同负载场景下的充电电流。In a possible implementation manner, when the power consumption is greater than or equal to the first threshold, before judging whether the temperature of the electronic device is greater than the first temperature threshold, it also includes: judging whether the electronic device is in a bright screen state; When the screen is on, the electronic device is charged with the lowest charging current value; when the power consumption is greater than or equal to the first threshold, it is judged whether the temperature of the electronic device is greater than the first temperature threshold, including: when the electronic device is in the bright screen state, and the power When the power consumption is greater than or equal to the first threshold, it is determined whether the temperature of the electronic device is greater than the first temperature threshold. In the embodiment of the present application, judging whether the electronic device is in the bright screen state before judging the power consumption is helpful for subsequently determining the charging current under different load scenarios based on the bright screen state.

第二方面,本申请实施例提供一种充电装置,处理单元,用于电子设备启动充电;处理单元,用于获取电子设备在充电中的功耗;处理单元,还用于当功耗大于或等于第一阈值时,判断电子设备的温度是否大于第一温度阈值;处理单元,还用于当电子设备的温度小于或等于第一温度阈值时,判断电子设备的电量是否大于第一电量阈值;处理单元,还用于当电子设备的电量大于第一电量阈值时,电子设备采用最低充电电流值进行充电;处理单元,还用于当电子设备的电量小于或等于第一电量阈值时,电子设备采用第一电流值进行充电;以及,处理单元,还用于随着电子设备充电的持续进行,当电子设备的温度大于第一温度阈值,且小于或等于第二温度阈值时,电子设备采用第二电流值进行充电,第二电流值大于最低充电电流值,且小于第一电流值;处理单元,还用于当电子设备的温度大于第二温度阈值时,电子设备采用最低充电电流值进行充电。In the second aspect, the embodiment of the present application provides a charging device, a processing unit, used to start charging an electronic device; a processing unit, used to obtain the power consumption of the electronic device during charging; a processing unit, also used when the power consumption is greater than or When equal to the first threshold, determine whether the temperature of the electronic device is greater than the first temperature threshold; the processing unit is also configured to determine whether the power of the electronic device is greater than the first power threshold when the temperature of the electronic device is less than or equal to the first temperature threshold; The processing unit is also used to charge the electronic device with the lowest charging current value when the power of the electronic device is greater than the first power threshold; the processing unit is also used to charge the electronic device when the power of the electronic device is less than or equal to the first power threshold. Charging is performed using the first current value; and the processing unit is further configured to, as the charging of the electronic device continues, when the temperature of the electronic device is greater than the first temperature threshold and less than or equal to the second temperature threshold, the electronic device uses the first temperature threshold. Charge with two current values, the second current value is greater than the lowest charging current value and less than the first current value; the processing unit is also used to charge the electronic device with the lowest charging current value when the temperature of the electronic device is greater than the second temperature threshold .

在一种可能的实现方式中,处理单元,还用于获取N个时间点的电子设备从充电器接收的第三电流值,以及电子设备的电池接收的第四电流值,得到N对成对关联的第三电流值和第四电流值,N为自然数;处理单元,还用于根据N对第三电流值和第四电流值得到功耗。In a possible implementation manner, the processing unit is further configured to obtain the third current value received by the electronic device from the charger at N time points and the fourth current value received by the battery of the electronic device to obtain N pairs of For the associated third current value and fourth current value, N is a natural number; the processing unit is further configured to obtain power consumption according to N pairs of the third current value and the fourth current value.

在一种可能的实现方式中,处理单元,还用于分别计算N对第三电流值和第四电流值中任一对第三电流值和第四电流值的差值,得到N个差值;处理单元,还用于对N个差值按照预设算法计算得到功耗,预设算法包括下述任一个:求平均算法、先筛选有效数据再求平均算法、求中位数算法。In a possible implementation manner, the processing unit is further configured to separately calculate the difference between any pair of the third current value and the fourth current value in the N pairs of the third current value and the fourth current value, to obtain N differences The processing unit is also used to calculate the power consumption of the N differences according to a preset algorithm, and the preset algorithm includes any of the following: an average algorithm, an algorithm for calculating the average after screening valid data, and an algorithm for calculating the median.

在一种可能的实现方式中,第一电流值和/或第二电流值均为预先学习得到,处理单元,还用于分别获取电子设备采用第一电流值充电时的第一过程数据,和/或,电子设备采用第二电流值充电时的第二过程数据,其中,第一过程数据包括第一电池温度升高值和/或第一壳体温度升高值,第二过程数据包括第二电池温度升高值和/或第二壳体温度升高值;处理单元,还用于当第一电池温度升高值小于或等于第一温升阈值,和/或,第一壳体温度升高值小于或等于第二温升阈值时,更新第一电流值为更大的值;或者,处理单元,还用于当第一电池温度升高值大于第一温升阈值,和/或,第一壳体温度升高值大于第二温升阈值时,更新第一电流值为更小的值;和/或,处理单元,还用于当第二电池温度升高值小于或等于第三温升阈值,和/或,第二壳体温度升高值小于或等于第四温升阈值时,更新第二电流值为更大的值;或者,处理单元,还用于当第二电池温度升高值大于第三温升阈值,和/或,第二壳体温度升高值大于第四温升阈值时,更新第二电流值为更小的值。In a possible implementation manner, both the first current value and/or the second current value are pre-learned, and the processing unit is further configured to respectively acquire the first process data when the electronic device is charged with the first current value, and /or, the second process data when the electronic device is charged with the second current value, wherein the first process data includes the first battery temperature rise value and/or the first housing temperature rise value, and the second process data includes the first The second battery temperature rise value and/or the second casing temperature rise value; the processing unit is also used to when the first battery temperature rise value is less than or equal to the first temperature rise threshold, and/or the first casing temperature When the rise value is less than or equal to the second temperature rise threshold, update the first current value to a larger value; or, the processing unit is further configured to when the first battery temperature rise value is greater than the first temperature rise threshold, and/or , when the first housing temperature rise value is greater than the second temperature rise threshold, update the first current value to a smaller value; and/or, the processing unit is further configured to, when the second battery temperature rise value is less than or equal to the second temperature rise threshold Three temperature rise thresholds, and/or, when the temperature rise of the second casing is less than or equal to the fourth temperature rise threshold, update the second current value to a larger value; or, the processing unit is also used for when the second battery When the temperature rise value is greater than the third temperature rise threshold, and/or, when the second housing temperature rise value is greater than the fourth temperature rise threshold, the second current value is updated to a smaller value.

在一种可能的实现方式中,处理单元,还用于当功耗小于第一阈值且大于第二阈值时,判断电子设备的电量是否大于第二电量阈值;处理单元,还用于当电子设备的电量小于或等于第二电量阈值时,判断电子设备的温度是否大于第三温度阈值;处理单元,还用于当电子设备的温度小于或等于第三温度阈值时,电子设备采用第五电流值进行充电,第五电流值为预先学习得到的;处理单元,还用于当电子设备的温度大于第三温度阈值时,电子设备采用最低充电电流值进行充电。In a possible implementation manner, the processing unit is further configured to determine whether the power consumption of the electronic device is greater than the second power threshold when the power consumption is less than the first threshold and greater than the second threshold; When the power of the electronic device is less than or equal to the second power threshold, it is judged whether the temperature of the electronic device is greater than the third temperature threshold; the processing unit is also configured to use the fifth current value for the electronic device when the temperature of the electronic device is less than or equal to the third temperature threshold For charging, the fifth current value is learned in advance; the processing unit is further configured to charge the electronic device with the lowest charging current value when the temperature of the electronic device is greater than the third temperature threshold.

在一种可能的实现方式中,处理单元,还用于当电子设备的电量大于第二电量阈值时,电子设备采用最低充电电流值进行充电。In a possible implementation manner, the processing unit is further configured to charge the electronic device with the lowest charging current value when the electric power of the electronic device is greater than the second electric power threshold.

在一种可能的实现方式中,处理单元,还用于获取电子设备采用第五电流值充电时的第三过程数据,其中,第三过程数据包括第三电池温度升高值,第三壳体温度升高值和/或第一充电时长;处理单元,还用于当第三电池温度升高值小于或等于第五温升阈值,第三壳体温度升高值小于或等于第六温升阈值,和/或,第一充电时长大于第一时长阈值时,更新第五电流值为更大的值;或者,处理单元,还用于当第三电池温度升高值大于第五温升阈值,和/或,第三壳体温度升高值大于第六温升阈值时,更新第五电流值为更小的值。In a possible implementation manner, the processing unit is further configured to acquire third process data when the electronic device is charged with a fifth current value, where the third process data includes a third battery temperature rise value, and the third casing The temperature rise value and/or the first charging duration; the processing unit is also used for when the third battery temperature rise value is less than or equal to the fifth temperature rise threshold value, and the third housing temperature rise value is less than or equal to the sixth temperature rise value threshold, and/or, when the first charging duration is greater than the first duration threshold, update the fifth current value to a larger value; or, the processing unit is also used to when the third battery temperature rise value is greater than the fifth temperature rise threshold , and/or, when the third casing temperature rise value is greater than the sixth temperature rise threshold value, update the fifth current value to a smaller value.

在一种可能的实现方式中,处理单元,还用于当功耗小于或等于第二阈值时,判断电子设备的电量是否大于第三电量阈值;处理单元,还用于当电子设备的电量小于或等于第三电量阈值时,判断电子设备的温度是否大于第四温度阈值;处理单元,还用于当电子设备的温度小于或等于第四温度阈值时,电子设备采用第六电流值进行充电,第六电流值为预先学习得到的;处理单元,还用于当电子设备的温度大于第四温度阈值时,电子设备采用最低充电电流值进行充电。In a possible implementation manner, the processing unit is further configured to determine whether the power of the electronic device is greater than the third power threshold when the power consumption is less than or equal to the second threshold; the processing unit is also configured to determine whether the power of the electronic device is less than or is equal to the third power threshold, judging whether the temperature of the electronic device is greater than the fourth temperature threshold; the processing unit is also configured to charge the electronic device with a sixth current value when the temperature of the electronic device is less than or equal to the fourth temperature threshold, The sixth current value is learned in advance; the processing unit is further configured to charge the electronic device with the lowest charging current value when the temperature of the electronic device is greater than the fourth temperature threshold.

在一种可能的实现方式中,处理单元,还用于当电子设备的电量大于第三电量阈值时,电子设备采用最低充电电流值进行充电。In a possible implementation manner, the processing unit is further configured to charge the electronic device with the lowest charging current value when the electric power of the electronic device is greater than a third electric power threshold.

在一种可能的实现方式中,处理单元,还用于获取电子设备采用第六电流值充电时的第四过程数据,其中,第四过程数据包括第四电池温度升高值,第四壳体温度升高值和/或第二充电时长;处理单元,还用于当第四电池温度升高值小于或等于第七温升阈值,第四壳体温度升高值小于或等于第八温升阈值,和/或,第二充电时长大于第二时长阈值时,更新第六电流值为更大的值;或者,处理单元,还用于当第四电池温度升高值大于第七温升阈值,和/或,第四壳体温度升高值大于第八温升阈值时,更新第六电流值为更小的值。In a possible implementation manner, the processing unit is further configured to obtain fourth process data when the electronic device is charged with a sixth current value, where the fourth process data includes a fourth battery temperature rise value, a fourth case The temperature rise value and/or the second charging duration; the processing unit is also used for when the fourth battery temperature rise value is less than or equal to the seventh temperature rise threshold value, and the fourth housing temperature rise value is less than or equal to the eighth temperature rise value threshold, and/or, when the second charging duration is greater than the second duration threshold, update the sixth current value to a larger value; or, the processing unit is also used to when the fourth battery temperature rise value is greater than the seventh temperature rise threshold , and/or, when the fourth housing temperature rise value is greater than the eighth temperature rise threshold value, update the sixth current value to a smaller value.

在一种可能的实现方式中,在电子设备采用第一电流值进行充电之前,显示单元,用于显示第一界面,第一界面包括通知信息、第一按钮和第二按钮,通知信息用于提示用户电子设备是否进入智能充电调控模式;处理单元,还用于响应于对第一按钮的触发操作,电子设备进入智能充电调控模式;或者,处理单元,还用于响应于对第二按钮的触发操作,电子设备采用最低充电电流值进行充电。In a possible implementation manner, before the electronic device is charged with the first current value, the display unit is configured to display a first interface, the first interface includes notification information, a first button, and a second button, and the notification information is used to Prompting the user whether the electronic device enters the smart charging control mode; the processing unit is also used to respond to the trigger operation of the first button, and the electronic device enters the smart charging control mode; or, the processing unit is also used to respond to the second button. The operation is triggered, and the electronic device is charged with the lowest charging current value.

在一种可能的实现方式中,在电子设备采用第一电流值进行充电的过程中,显示单元,还用于响应于用户的下拉操作显示第二界面,第二界面包括通知信息和第三按钮;处理单元,还用于响应于对第三按钮的触发操作,电子设备采用最低充电电流值进行充电。In a possible implementation, during the charging process of the electronic device using the first current value, the display unit is further configured to display a second interface in response to the user's pull-down operation, the second interface includes notification information and a third button The processing unit is also used to charge the electronic device with the lowest charging current value in response to the trigger operation of the third button.

在一种可能的实现方式中,处理单元,还用于判断电子设备是否为亮屏状态;处理单元,还用于当电子设备不为亮屏状态时,电子设备采用最低充电电流值进行充电;处理单元,还用于当电子设备为亮屏状态,且功耗大于或等于第一阈值时,判断电子设备的温度是否大于第一温度阈值。In a possible implementation manner, the processing unit is further configured to determine whether the electronic device is in a bright screen state; the processing unit is also configured to charge the electronic device with the lowest charging current value when the electronic device is not in a bright screen state; The processing unit is further configured to determine whether the temperature of the electronic device is greater than the first temperature threshold when the electronic device is in a bright screen state and the power consumption is greater than or equal to the first threshold.

第三方面,本申请实施例提供一种电子设备,包括处理器和存储器,存储器用于存储代码指令;处理器用于运行代码指令,使得电子设备执行如第一方面或第一方面的任一种可能的实现方式中描述的充电方法。In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, the memory is used to store code instructions; the processor is used to run code instructions, so that the electronic device performs any one of the first aspect or the first aspect. The charging method described in Possible Implementations.

第四方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质存储有指令,当指令被执行时,使得计算机执行如第一方面或第一方面的任一种可能的实现方式中描述的充电方法。In the fourth aspect, the embodiment of the present application provides a computer-readable storage medium. The computer-readable storage medium stores instructions. When the instructions are executed, the computer executes the first aspect or any possible implementation of the first aspect. The charging method described in the method.

第五方面,一种计算机程序产品,包括计算机程序,当计算机程序被运行时,使得计算机执行如第一方面或第一方面的任一种可能的实现方式中描述的充电方法。In a fifth aspect, a computer program product includes a computer program, and when the computer program is executed, the computer executes the charging method as described in the first aspect or any possible implementation manner of the first aspect.

第六方面,本申请提供一种芯片或者芯片系统,该芯片或者芯片系统包括至少一个处理器和通信接口,通信接口和至少一个处理器通过线路互联,至少一个处理器用于运行计算机程序或指令,以执行第一方面或第一方面的任一种可能的实现方式中描述的充电方法。其中,芯片中的通信接口可以为输入/输出接口、管脚或电路等。In a sixth aspect, the present application provides a chip or a chip system, the chip or chip system includes at least one processor and a communication interface, the communication interface and the at least one processor are interconnected through lines, and the at least one processor is used to run computer programs or instructions, To execute the charging method described in the first aspect or any possible implementation manner of the first aspect. Wherein, the communication interface in the chip may be an input/output interface, a pin or a circuit, and the like.

应当理解的是,本申请的第一方面与本申请的第二方面至第六方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。.It should be understood that the first aspect of the present application corresponds to the technical solutions of the second aspect to the sixth aspect of the present application, and the beneficial effects obtained by each aspect and the corresponding feasible implementation manners are similar, so details are not repeated here. .

附图说明Description of drawings

图1为本申请实施例所适用场景示意图;FIG. 1 is a schematic diagram of a scene applicable to an embodiment of the present application;

图2为本申请实施例所提供的电子设备的硬件结构示意图;FIG. 2 is a schematic diagram of a hardware structure of an electronic device provided by an embodiment of the present application;

图3为本申请实施例提供的一种电子设备的软件结构示意图;FIG. 3 is a schematic diagram of a software structure of an electronic device provided in an embodiment of the present application;

图4为本申请实施例提供的一种充电方法的流程示意图;FIG. 4 is a schematic flow chart of a charging method provided in an embodiment of the present application;

图5为本申请实施例提供的一种重载场景曲线示意图;FIG. 5 is a schematic diagram of an overloaded scene curve provided by an embodiment of the present application;

图6为本申请实施例提供的一种充电方法流程示意图;FIG. 6 is a schematic flow chart of a charging method provided in an embodiment of the present application;

图7为本申请实施例提供的一种轻载场景原始充电策略曲线示意图;FIG. 7 is a schematic diagram of an original charging strategy curve in a light-load scenario provided by an embodiment of the present application;

图8为本申请实施例提供的一种轻载场景优化后策略曲线示意图;FIG. 8 is a schematic diagram of a policy curve after optimization of a light-load scenario provided in an embodiment of the present application;

图9为本申请实施例提供的第一界面示意图;FIG. 9 is a schematic diagram of the first interface provided by the embodiment of the present application;

图10为本申请实施例提供的第二界面示意图;Fig. 10 is a schematic diagram of the second interface provided by the embodiment of the present application;

图11为本申请实施例提供的一种充电方法流程示意图;FIG. 11 is a schematic flow chart of a charging method provided in an embodiment of the present application;

图12为本申请实施例提供的一种充电装置的结构示意图;Fig. 12 is a schematic structural diagram of a charging device provided in an embodiment of the present application;

图13为本申请实施例提供的另一种电子设备的硬件结构示意图;FIG. 13 is a schematic diagram of the hardware structure of another electronic device provided by the embodiment of the present application;

图14为本申请实施例提供的一种芯片的结构示意图。FIG. 14 is a schematic structural diagram of a chip provided by an embodiment of the present application.

具体实施方式Detailed ways

为了便于清楚描述本申请实施例的技术方案,以下,对本申请实施例中所涉及的部分术语和技术进行简单介绍:In order to clearly describe the technical solutions of the embodiments of the present application, the following briefly introduces some terms and technologies involved in the embodiments of the present application:

1)轻载场景:指电子设备关闭高耗电应用程序、高耗电硬件或限制大内存应用,运行一些功耗较小的应用,例如手机正在运行天气应用、日历应用、时钟应用等功耗较小的应用。1) Light-load scenario: refers to electronic devices closing high-power-consuming applications, high-power-consuming hardware, or limiting large-memory applications, and running some applications with low power consumption, such as mobile phones running weather applications, calendar applications, clock applications, etc. smaller applications.

2)重载场景:指电子设备启动高耗电应用程序、高耗电硬件或不限制大内存应用,例如手机正在运行视频应用、游戏应用等功耗较大的应用。2) Heavy load scenario: Refers to electronic devices starting high-power-consuming applications, high-power-consuming hardware, or unlimited large-memory applications, such as mobile phones running video applications, game applications and other applications with high power consumption.

3)中载场景:本申请实施例中,中载场景指电子设备的功耗大于轻载场景下的功耗且小于重载场景下的功耗。3) Medium-load scenario: In the embodiment of the present application, the medium-load scenario means that the power consumption of the electronic device is greater than the power consumption in the light-load scenario and smaller than the power consumption in the heavy-load scenario.

4)其他术语4) Other terms

在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一芯片和第二芯片仅仅是为了区分不同的芯片,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In the embodiments of the present application, words such as "first" and "second" are used to distinguish the same or similar items with basically the same function and effect. For example, the first chip and the second chip are only used to distinguish different chips, and their sequence is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit the difference.

需要说明的是,本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations or descriptions. Any embodiment or design described herein as "exemplary" or "for example" is not to be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner.

本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a--c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B, which can mean: A exists alone, A and B exist at the same time, and B exists alone, where A, B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one item (piece) of a, b, or c can represent: a, b, c, a-b, a--c, b-c, or a-b-c, where a, b, c can be single or is multiple.

越来越多的用户习惯于在使用电子设备(例如手机等)时同时对电子设备进行充电。More and more users are accustomed to charging the electronic equipment while using the electronic equipment (such as a mobile phone, etc.).

示例性的,用户在给手机充电时使用手机,例如使用手机看视频、玩游戏、打电话或者看小说等。Exemplarily, the user uses the mobile phone while charging the mobile phone, for example, uses the mobile phone to watch videos, play games, make calls, or read novels.

在一些实现中,电子设备的充电过程包括三个阶段:恒定电流预充电、大电流恒定电流充电以及恒定电压充电。In some implementations, the charging process of the electronic device includes three stages: constant current pre-charging, high-current constant-current charging, and constant-voltage charging.

示例性的,手机的电池一般是锂电池,当手机的电池电压低于3.0V时,充电器会采用100毫安(milliampere,mA)电流对锂电池进行预充电。Exemplarily, the battery of the mobile phone is generally a lithium battery, and when the battery voltage of the mobile phone is lower than 3.0V, the charger will precharge the lithium battery with a current of 100 milliamperes (milliampere, mA).

当锂电池电压高于3.0V时,就进入到第二阶段,大电流恒定电流充电阶段。由于锂电池经过第一阶段的预充,其状态已经比较稳定了,所以在第二阶段,充电电流就可以适当提高,根据不同的电池来说,这个电流的大小可以从0.1库仑(coulomb,C)到几C不等,其中C是指电池容量,如2600毫安时(milliampere hour,mAh)的锂电池,0.1C就是指260mA大小的电流。When the lithium battery voltage is higher than 3.0V, it enters the second phase, the high current constant current charging phase. Since the lithium battery has been pre-charged in the first stage, its state has been relatively stable, so in the second stage, the charging current can be increased appropriately. According to different batteries, the current can vary from 0.1 coulomb (coulomb, C ) to several C, where C refers to the battery capacity, such as a 2600 milliampere hour (mAh) lithium battery, and 0.1C refers to a current of 260mA.

当检测到锂电池电压等于4.2V时,充电器则进入恒定电压充电模式,这个阶段充电电压恒定为4.2V,充电电流则越来越小。当充电电流小于100mA时,就判断电池充满,切断充电电路。When it is detected that the lithium battery voltage is equal to 4.2V, the charger will enter the constant voltage charging mode. At this stage, the charging voltage is constant at 4.2V, and the charging current is getting smaller and smaller. When the charging current is less than 100mA, it is judged that the battery is fully charged and the charging circuit is cut off.

然而,基于现有充电过程进行充电时,由于同一电子设备在不同负载场景下会以相同的充电电流进行充电,因此,在电子设备的电量较低且电子设备处于轻载场景时,该充电电流可能使得电子设备的电量增长速度不够快,在电子设备的重载场景下,该充电电流可能使得电子设备迅速升温,影响用户体验。因此,基于现有充电过程进行充电时,容易导致电子设备出现充电时间较长或温度上升较快的情况。However, when charging based on the existing charging process, since the same electronic device will be charged with the same charging current under different load scenarios, when the power of the electronic device is low and the electronic device is in a light-load scenario, the charging current It may make the power increase rate of the electronic device not fast enough. In the heavy-load scenario of the electronic device, the charging current may cause the electronic device to heat up rapidly, affecting user experience. Therefore, when charging based on the existing charging process, it is easy to cause a longer charging time or a faster temperature rise of the electronic device.

示例性的,充电电流例如是Q。当用户一边给手机充电一边使手机处于亮屏状态,或者进行一些使得手机处于轻载场景的操作时,由于轻载场景下手机中处理器运转产生的热量较低,因此,当手机在轻载场景下以电流Q进行恒流充电时手机的温度增长较小,可能没有达到手机的温度阈值,所以,此时手机的充电电流是可以大于Q的。也就是说,在手机的温升许可范围内,轻载场景下手机以电流Q进行恒流充电时手机的电量增长速度还不够快,从而使得手机的充电时间较长。Exemplarily, the charging current is Q, for example. When the user keeps the phone on while charging the phone, or performs some operations that put the phone in a light-load scene, since the heat generated by the processor in the phone is low in the light-load scene, when the phone is under light load In this scenario, when the current Q is used for constant current charging, the temperature increase of the mobile phone is small, and the temperature threshold of the mobile phone may not be reached. Therefore, the charging current of the mobile phone can be greater than Q at this time. That is to say, within the allowable range of the temperature rise of the mobile phone, when the mobile phone is charged with a constant current Q at a light load, the battery power growth rate of the mobile phone is not fast enough, which makes the charging time of the mobile phone longer.

当用户一边给手机充电一边使用手机看视频、玩游戏或进行其他一些使得手机处于重载场景的操作时,手机中处理器高速运转产生的热量以及以电流Q进行恒流充电时产生的热量会使手机的温度迅速升高,影响用户体验。When the user uses the mobile phone to watch videos, play games or perform other operations that put the mobile phone in a heavy load scene while charging the mobile phone, the heat generated by the high-speed operation of the processor in the mobile phone and the heat generated when the current Q is used for constant current charging will be The temperature of the mobile phone rises rapidly, which affects the user experience.

有鉴于此,本申请实施例提供一种充电方法,该方法在重载场景下,根据电子设备的温度和电量动态调整电子设备的充电电流,例如当电子设备的温度较高或电量较高时,电子设备采用较低充电电流进行充电,在电子设备的电量较低时,根据电子设备的温度确定电子设备的充电电流,电子设备的温度较高时则充电电流较小,电子设备的温度较低时则充电电流较大。这样在电子设备的温度低且电量低时采用较大电流进行充电,可以较快提高电子设备的电量,有效降低低电量时的电量焦虑性,随着电子设备充电的持续进行,电子设备的温度上升,则降低充电电流,减少电子设备的发热量,从而有效延缓电子设备的温度上升。In view of this, an embodiment of the present application provides a charging method, which dynamically adjusts the charging current of the electronic device according to the temperature and power of the electronic device in a heavy-load scenario, for example, when the temperature of the electronic device is high or the power is high , the electronic device is charged with a lower charging current. When the power of the electronic device is low, the charging current of the electronic device is determined according to the temperature of the electronic device. When the temperature of the electronic device is high, the charging current is small. When it is low, the charging current is large. In this way, when the temperature of the electronic device is low and the power is low, a larger current is used for charging, which can quickly increase the power of the electronic device and effectively reduce the power anxiety when the power is low. As the charging of the electronic device continues, the temperature of the electronic device As the temperature rises, the charging current will be reduced, and the heat generated by the electronic equipment will be reduced, thereby effectively delaying the temperature rise of the electronic equipment.

图1示出了本申请实施例所适用的场景示意图。如图1所示,当需要对电子设备100进行充电时,用户可以将充电线400插入充电器(也称为电源适配器)200的通用串行总线(universal serial bus,USB)接口,然后将充电器200插入墙面的插座300,之后再将充电线400插入电子设备100的USB接口,从而对电子设备100进行充电。FIG. 1 shows a schematic diagram of a scene to which this embodiment of the present application applies. As shown in FIG. 1 , when the electronic device 100 needs to be charged, the user can insert the charging cable 400 into the universal serial bus (universal serial bus, USB) interface of the charger (also called a power adapter) 200, and then the charging The charger 200 is inserted into the socket 300 on the wall, and then the charging cable 400 is inserted into the USB interface of the electronic device 100 to charge the electronic device 100 .

可以理解的是,对电子设备100进行充电,可以指对电子设备100的电池进行充电。It can be understood that charging the electronic device 100 may refer to charging a battery of the electronic device 100 .

需要说明的是,图1示例性地示出了电子设备100的有线充电场景。在一些可能的实现中,电子设备100还可以具有无线充电功能,例如,电子设备100通过无线充电线圈与无线充电器的无线充电线圈耦合,感应无线充电器的无线充电线圈发出的交变电磁场,产生交变电信号,再将产生的交变电信号整流成直流电信号,从而为电子设备100的电池充电。It should be noted that FIG. 1 exemplarily shows a wired charging scenario of an electronic device 100 . In some possible implementations, the electronic device 100 may also have a wireless charging function, for example, the electronic device 100 is coupled with the wireless charging coil of the wireless charger through a wireless charging coil, and induces the alternating electromagnetic field emitted by the wireless charging coil of the wireless charger, An alternating electric signal is generated, and then the generated alternating electric signal is rectified into a direct current signal, so as to charge the battery of the electronic device 100 .

此外,本申请实施例提供的充电方法适用的如图1所示的电子设备100可以是手机、可穿戴设备(如智能手表等)、平板电脑、桌面型、膝上型、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本,以及蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(augmented reality,AR)\虚拟现实(virtual reality,VR)设备等具备上述功能的设备,本申请实施例对电子设备100的具体形态不作特殊限制。In addition, the electronic device 100 shown in Figure 1 applicable to the charging method provided by the embodiment of the present application may be a mobile phone, a wearable device (such as a smart watch, etc.), a tablet computer, a desktop type, a laptop type, a handheld computer, a notebook computer , ultra-mobile personal computer (UMPC), netbook, and cell phone, personal digital assistant (personal digital assistant, PDA), augmented reality (augmented reality, AR) \ virtual reality (virtual reality, VR) equipment The embodiment of the present application does not specifically limit the specific form of the electronic device 100 .

在下文的描述中,为了便于理解,下面以图1所示的电子设备100为手机为例,介绍本申请的技术方案。In the following description, for ease of understanding, the electronic device 100 shown in FIG. 1 is taken as an example to introduce the technical solution of the present application.

当用户一边充电一边使用电子设备100时,例如用户在对电子设备100进行充电时观看视频或者玩游戏等,电子设备100可以基于本申请实施例提供的充电方法进行充电。When the user uses the electronic device 100 while charging, for example, the user watches a video or plays a game while charging the electronic device 100, the electronic device 100 can be charged based on the charging method provided in the embodiment of the present application.

示例性的,充电方法可以包括:电子设备启动充电;获取电子设备在充电中的功耗;当功耗大于或等于第一阈值时,判断电子设备的温度是否大于第一温度阈值;当电子设备的温度小于或等于第一温度阈值时,判断电子设备的电量是否大于第一电量阈值;当电子设备的电量大于第一电量阈值时,电子设备采用最低充电电流值进行充电;当电子设备的电量小于或等于第一电量阈值时,电子设备采用第一电流值进行充电;以及,随着电子设备充电的持续进行,当电子设备的温度大于第一温度阈值,且小于或等于第二温度阈值时,电子设备采用第二电流值进行充电,第二电流值大于最低充电电流值,且小于第一电流值;当电子设备的温度大于第二温度阈值时,电子设备采用最低充电电流值进行充电。这样在电子设备的温度低且电量低时采用较大电流进行充电,可以较快提高电子设备的电量,有效降低低电量时的电量焦虑性,在电子设备的温度上升时,则降低充电电流,减少电子设备的发热量,从而有效延缓电子设备的温度上升。Exemplarily, the charging method may include: the electronic device starts charging; acquiring the power consumption of the electronic device during charging; when the power consumption is greater than or equal to a first threshold, judging whether the temperature of the electronic device is greater than the first temperature threshold; when the electronic device When the temperature of the electronic device is less than or equal to the first temperature threshold, it is judged whether the power of the electronic device is greater than the first power threshold; when the power of the electronic device is greater than the first power threshold, the electronic device is charged with the lowest charging current value; when the power of the electronic device When it is less than or equal to the first power threshold, the electronic device is charged with the first current value; and, as the charging of the electronic device continues, when the temperature of the electronic device is greater than the first temperature threshold and less than or equal to the second temperature threshold , the electronic device is charged with a second current value, and the second current value is greater than the lowest charging current value and smaller than the first current value; when the temperature of the electronic device is greater than the second temperature threshold, the electronic device is charged with the lowest charging current value. In this way, when the temperature of the electronic device is low and the power is low, a larger current is used for charging, which can quickly increase the power of the electronic device, effectively reduce the power anxiety when the power is low, and reduce the charging current when the temperature of the electronic device rises. Reduce the calorific value of electronic equipment, thereby effectively delaying the temperature rise of electronic equipment.

示例性的,图2示出了本申请实施例提供的一种电子设备的硬件结构示意图。Exemplarily, FIG. 2 shows a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application.

如图2所示,电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriberidentification module,SIM)卡接口195等。As shown in Figure 2, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, and a battery 142 , antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193 , a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195, etc.

其中,传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Among them, the sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an environmental Light sensor 180L, bone conduction sensor 180M, etc.

可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件、软件或软件和硬件的组合实现。It can be understood that, the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components. The illustrated components may be realized in hardware, software, or a combination of software and hardware.

处理器110可以包括一个或多个处理单元,例如,处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中;控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, 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, and/or neural network processor (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices, and can also be integrated in one or more processors; the controller can generate operation control signals according to instruction opcodes and timing signals, and complete the control of fetching and executing instructions.

处理器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 from the memory. In this way, repeated access can be avoided, the waiting time of the processor 110 is reduced, and thus the efficiency of the system is improved.

在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integratedcircuitsound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purposeinput/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuitsound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver/transmitter (universal asynchronous receiver/ transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input/output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and/or general-purpose Serial bus (universal serial bus, USB) interface, etc.

其中,USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,MicroUSB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。Wherein, the USB interface 130 is an interface conforming to the USB standard specification, specifically, it may be a Mini USB interface, a MicroUSB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.

可以理解的是,本申请实施例描述的各模块间的接口连接关系,是示例性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between modules described in the embodiment of the present application is an exemplary description, and does not constitute a structural limitation of the electronic device 100 . In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.

充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is configured to receive a charging input from a charger. Wherein, the charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also supply power to the electronic device through the power management module 141 .

电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193和无线通信模块160等供电。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 from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 and the wireless communication module 160 .

电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be disposed in the processor 110 . In some other embodiments, the power management module 141 and the charging management module 140 may also be set in the same device.

电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.

电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dotlightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos and the like. The display screen 194 includes a display panel. The display panel can adopt liquid crystal display (liquid crystal display, LCD), organic light-emitting diode (organic light-emitting diode, OLED), active-matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrixorganic light-emitting diode) , AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (quantum dotlight emitting diodes, QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.

电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.

外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.

内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器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, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like. The storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like. 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, universal flash storage (universal flash storage, UFS) and the like. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.

电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.

电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构等。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of the electronic device 100 .

示例性的,图3为本申请实施例提供的一种电子设备100的软件结构示意图,如图3所示,分层架构将软件分成若干个层,每一层都有清晰的角色和分工,而且,层与层之间通过软件接口通信。Exemplarily, FIG. 3 is a schematic diagram of a software structure of an electronic device 100 provided in an embodiment of the present application. As shown in FIG. 3 , the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Moreover, the communication between the layers is through the software interface.

在一些实施例中,可以将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。In some embodiments, the Android system can be divided into four layers, which are respectively the application program layer, the application program framework layer, Android runtime (Android runtime) and system library, and the kernel layer from top to bottom.

可能的方式中,应用程序层可以包括一系列应用程序包,例如,应用程序包可以包括相机、日历、通话、图库、音乐、设置、邮箱、视频、蓝牙等应用程序。In a possible manner, the application layer may include a series of application packages. For example, the application package may include applications such as camera, calendar, call, gallery, music, settings, mailbox, video, and Bluetooth.

可能的方式中,应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架,应用程序框架层可以包括窗口管理器、内容提供器、资源管理器、视图系统或通知管理器等,应用程序框架层还包括一些预先定义的函数等。In a possible manner, the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer, and the application framework layer may include window managers, content providers, resource managers, view system or notification manager, etc., and the application framework layer also includes some pre-defined functions, etc.

其中,窗口管理器用于管理窗口程序,窗口管理器可以获取显示屏大小。Wherein, the window manager is used to manage the window program, and the window manager can acquire the size of the display screen.

其中,内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问;数据可以包括浏览历史和书签、拨打和接听的电话、视频、图像、音频或电话簿等。Among them, the content provider is used to store and obtain data, and make these data accessible by applications; data may include browsing history and bookmarks, calls made and received, videos, images, audio or phonebooks, etc.

其中,通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。例如,通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如,后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知,例如,在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。Among them, the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify download completions, message reminders, etc. The notification manager can also be notifications that appear on the status bar at the top of the system in the form of charts or scroll bar text, for example, notifications for applications running in the background, or notifications that appear on the screen in the form of dialog windows, for example, in the status The bar prompts text information, emits a prompt sound, the electronic device vibrates, and the indicator light flashes, etc.

需要说明的是,在本申请实施例中,应用程序框架层还可以包括电流值采集器,这样,电流值采集器中的电流采集模块可以获取电子设备从充电器接收的电流值和电子设备的电池接收的电流值。It should be noted that, in the embodiment of the present application, the application framework layer may also include a current value collector, so that the current collection module in the current value collector can obtain the current value received by the electronic device from the charger and the current value of the electronic device. The current value received by the battery.

需要说明的是,在本申请实施例中,应用程序框架层还可以包括过程数据采集器,过程数据采集器中的过程数据采集模块可以获取充电过程中的数据,充电过程中的数据例如可以是电量、充电时间、电池温度、壳体温度等。It should be noted that, in the embodiment of the present application, the application program framework layer may also include a process data collector, and the process data acquisition module in the process data collector may acquire data during the charging process. The data during the charging process may be, for example, Power, charging time, battery temperature, case temperature, etc.

可能的方式中,Android runtime用于负责安卓系统的调度和管理,可以包括核心库和虚拟机。In a possible way, the Android runtime is used to be responsible for the scheduling and management of the Android system, which can include core libraries and virtual machines.

其中,核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。Among them, the core library includes two parts: one part is the function function that the java language needs to call, and the other part is the core library of Android.

其中,虚拟机用于执行对象安全和异常的管理、生命周期的管理、堆栈管理、线程管理以及垃圾回收等功能。Among them, the virtual machine is used to perform functions such as object security and exception management, life cycle management, stack management, thread management, and garbage collection.

需要说明的是,应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。It should be noted that the application layer and the application framework layer run in a virtual machine. The virtual machine executes the java files of the application program layer and the application program framework layer as binary files.

可能的方式中,系统库可以包括多个功能模块。例如:表面管理器(surfacemanager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。In a possible manner, the system library may include multiple functional modules. For example: surface manager (surfacemanager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.

其中,表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。Among them, the surface manager is used to manage the display subsystem, and provides the fusion of 2D and 3D layers for multiple applications.

其中,媒体库支持多种常用的视频格式回放和录制、音频以及静态图像文件等,媒体库可以支持多种音视频编码格式,例如,MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。Among them, the media library supports playback and recording of many commonly used video formats, audio and still image files, etc. The media library can support multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG wait.

其中,三维图形处理库用于实现三维图形绘图、图像渲染、合成以及图层处理等。Among them, the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis and layer processing.

需要说明的是,在本申请实施例中,系统层还可以包括充电电流选择器,这样,充电电流选择器中的充电电流选择模块,可以根据应用程序框架层中的电流值采集器和过程数据采集器获取的信息,确定充电电流。It should be noted that, in the embodiment of the present application, the system layer may also include a charging current selector, so that the charging current selection module in the charging current selector can The information obtained by the collector determines the charging current.

可能的方式中,内核层是硬件和软件之间的层,内核层至少包含显示驱动、音频驱动或传感器驱动等。In a possible manner, the kernel layer is a layer between hardware and software, and the kernel layer includes at least a display driver, an audio driver, or a sensor driver.

需要说明的是,在本申请实施例中,内核层还可以包括充电驱动,这样,充电驱动中的充电模块,可以根据系统层中的充电电流选择器确定的充电电流,对电子设备进行充电。It should be noted that, in the embodiment of the present application, the core layer may also include a charging driver, so that the charging module in the charging driver can charge the electronic device according to the charging current determined by the charging current selector in the system layer.

下面结合附图,以具体的实施例对本申请实施例的技术方案以及本申请实施例的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以独立实现,也可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。The technical solutions of the embodiments of the present application and how the technical solutions of the embodiments of the present application solve the above technical problems will be described in detail below with reference to the accompanying drawings. The following specific embodiments may be implemented independently, or may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

图4为本申请实施例的一种充电方法的流程示意图。如图4所示,方法可以包括:FIG. 4 is a schematic flowchart of a charging method according to an embodiment of the present application. As shown in Figure 4, methods can include:

S401:电子设备启动充电。S401: The electronic device starts charging.

可能的实现中,电子设备启动充电可以是将电子设备接入充电电源。其中,电子设备接入充电电源时可以采用有线或无线的方式,本申请实施例不作限定。In a possible implementation, starting charging of the electronic device may be connecting the electronic device to a charging power source. Wherein, the electronic device may be connected to the charging power source in a wired or wireless manner, which is not limited in this embodiment of the present application.

示例性的,当电子设备使用有线充电线进行充电时,电子设备可以通过有线充电线接入电源,从而启动充电。Exemplarily, when the electronic device is charged using a wired charging cable, the electronic device can be connected to a power source through the wired charging cable, so as to start charging.

示例性的,当电子设备使用无线充电底座进行充电时,电子设备可以通过无线充电线圈接入电源,从而启动充电。Exemplarily, when the electronic device is charged using the wireless charging base, the electronic device can be connected to a power source through the wireless charging coil, so as to start charging.

S402:获取电子设备在充电中的功耗。S402: Obtain power consumption of the electronic device during charging.

其中,功耗可以理解为电子设备耗电的电流值,例如电子设备从充电器接收的电流值为1000mA,电子设备的电池接收的电流值为200mA,则电子设备的功耗约为800mA(从充电器接收的电流值与电子设备的电池接收的电流值的差值)。Wherein, the power consumption can be understood as the current value of power consumption of the electronic equipment, for example, the current value received by the electronic equipment from the charger is 1000mA, and the current value received by the battery of the electronic equipment is 200mA, then the power consumption of the electronic equipment is about 800mA (from The difference between the current value received by the charger and the current value received by the battery of the electronic device).

可能的实现中,在电子设备启动充电后,电子设备可以定期采集从充电器接收的电流值与电子设备的电池接收的电流值,根据采集的从充电器接收的电流值与电子设备的电池接收的电流值计算得到电子设备在充电中的功耗。In a possible implementation, after the electronic device starts charging, the electronic device can periodically collect the current value received from the charger and the current value received by the battery of the electronic device, and based on the current value collected from the charger and the current value received by the battery of the electronic device The current value is calculated to obtain the power consumption of the electronic device during charging.

示例性的,在电子设备启动充电后,隔10s采集一个从充电器接收的电流值和一个电子设备的电池接收的电流值,计算这两个电流值的差值,采集10个从充电器接收的电流值和10个电子设备的电池接收的电流值后,得到10个差值,计算10个差值的平均值得到功耗。每次过10s后再把采集的第一个从充电器接收的电流值和第一个电子设备的电池接收的电流值顶替掉,再重新计算一次功耗。相当于有一个平滑的滑动窗,计算每个窗里面的功耗。Exemplarily, after the electronic device starts charging, a current value received from the charger and a current value received by the battery of the electronic device are collected every 10s, the difference between the two current values is calculated, and 10 current values received from the charger are collected. After the current value and the current value received by the battery of 10 electronic devices, 10 difference values are obtained, and the average value of the 10 difference values is calculated to obtain the power consumption. After every 10s, replace the first current value collected from the charger with the current value received by the battery of the first electronic device, and then recalculate the power consumption. It is equivalent to having a smooth sliding window and calculating the power consumption in each window.

S403:当功耗大于或等于第一阈值时,判断电子设备的温度是否大于第一温度阈值。S403: When the power consumption is greater than or equal to the first threshold, determine whether the temperature of the electronic device is greater than the first temperature threshold.

其中,第一阈值可以是电子设备的重载场景与中载场景的分界线,例如第一阈值可以是800mA,当功耗大于或等于800mA时,电子设备处于重载场景。可以理解的是,本申请实施例中的功耗大于或等于第一阈值也可以是功耗大于第一阈值,对第一阈值属于重载场景还是中载场景,本申请不做具体限定。Wherein, the first threshold may be the dividing line between the heavy load scene and the medium load scene of the electronic device, for example, the first threshold may be 800mA, and when the power consumption is greater than or equal to 800mA, the electronic device is in the heavy load scene. It can be understood that the power consumption greater than or equal to the first threshold in the embodiment of the present application may also mean that the power consumption is greater than the first threshold, and the present application does not specifically limit whether the first threshold belongs to a heavy-load scenario or a medium-load scenario.

其中,电子设备的温度可以包括可以反映电子设备整体温度的电子设备的电池温度或壳体温度等。第一温度阈值可以是预先设置的针对重载场景下电子设备在较低温度时的值,例如第一温度阈值可以是手机的壳体温度30摄氏度(℃)。Wherein, the temperature of the electronic device may include a battery temperature or a casing temperature of the electronic device, which may reflect the overall temperature of the electronic device. The first temperature threshold may be a preset value for an electronic device at a relatively low temperature in a heavy-load scenario, for example, the first temperature threshold may be a casing temperature of a mobile phone of 30 degrees Celsius (° C.).

可能的实现中,电子设备在充电过程中会实时监控自身的的亮屏状态、温度、电量等。当功耗大于或等于第一阈值时,判断监控到的电子设备的温度是否大于第一温度阈值。In a possible implementation, the electronic device will monitor its own bright screen status, temperature, power, etc. in real time during the charging process. When the power consumption is greater than or equal to the first threshold, it is determined whether the monitored temperature of the electronic device is greater than the first temperature threshold.

可以理解的是,重载场景下电子设备的发热量更大,温度上升较快,因此,为了防止电子设备温度过高从而导致电子设备关机或损坏等事故的发生,在重载场景下,电子设备的温度为第一判断优先级,也就是说,在确定电子设备的充电电流时,要满足电子设备的温度在智能充电允许的范围内。It is understandable that the heat generated by electronic equipment is greater and the temperature rises faster in heavy-load scenarios. Therefore, in order to prevent accidents such as shutdown or damage of electronic equipment due to overheating of electronic equipment, The temperature of the device is the first judgment priority, that is to say, when determining the charging current of the electronic device, it must be satisfied that the temperature of the electronic device is within the allowable range of intelligent charging.

S404:当电子设备的温度小于或等于第一温度阈值时,判断电子设备的电量是否大于第一电量阈值。S404: When the temperature of the electronic device is less than or equal to the first temperature threshold, determine whether the power of the electronic device is greater than the first power threshold.

其中,第一电量阈值可以是预先设置的用于确定重载场景下电子设备的充电电流的值,电子设备的充电电流指电池端的电流,或者指电子设备的电池接收的电流。Wherein, the first power threshold may be a preset value used to determine the charging current of the electronic device in a heavy load scenario, and the charging current of the electronic device refers to the current at the battery terminal, or refers to the current received by the battery of the electronic device.

示例性的,当电子设备的温度小于或等于第一温度阈值时,对电子设备的电量进行判断,当电子设备的电量大于第一电量阈值,考虑到充电的安全性,在电子设备的电量大于第一电量阈值时,采用较小电流进行充电。在电子设备的电量小于第一电量阈值时,根据电子设备的温度确定电子设备的充电电流。Exemplarily, when the temperature of the electronic device is less than or equal to the first temperature threshold, the power of the electronic device is judged; when the power of the electronic device is greater than the first power threshold, considering the safety of charging, when the power of the electronic device is greater than When the first power threshold is reached, a smaller current is used for charging. When the power of the electronic device is less than the first power threshold, the charging current of the electronic device is determined according to the temperature of the electronic device.

S405:当电子设备的电量大于第一电量阈值时,电子设备采用最低充电电流值进行充电。S405: When the power of the electronic device is greater than the first power threshold, the electronic device is charged with the lowest charging current value.

其中,最低充电电流值可以理解为常规充电电流值。Wherein, the lowest charging current value can be understood as a normal charging current value.

示例性的,在电子设备的电量大于第一电量阈值时,电子设备采用常规充电电流值进行充电,可以理解的是,此时的常规充电电流值较小。Exemplarily, when the power of the electronic device is greater than the first power threshold, the electronic device is charged with a normal charging current value, and it can be understood that the normal charging current value at this time is relatively small.

S406:当电子设备的电量小于或等于第一电量阈值时,电子设备采用第一电流值进行充电;以及,随着电子设备充电的持续进行,当电子设备的温度大于第一温度阈值,且小于或等于第二温度阈值时,电子设备采用第二电流值进行充电,第二电流值大于最低充电电流值,且小于第一电流值;当电子设备的温度大于第二温度阈值时,电子设备采用最低充电电流值进行充电。S406: When the power of the electronic device is less than or equal to the first power threshold, the electronic device is charged with the first current value; and, as the charging of the electronic device continues, when the temperature of the electronic device is greater than the first temperature threshold and less than or equal to the second temperature threshold, the electronic device is charged with a second current value, and the second current value is greater than the lowest charging current value and less than the first current value; when the temperature of the electronic device is greater than the second temperature threshold, the electronic device uses The lowest charging current value for charging.

其中,第二温度阈值可以是在重载场景下用户可以明显感知到电子设备发热的温度值,例如可以是38℃,当电子设备的温度大于第二温度阈值时,用户可以明显感知到电子设备的温度上升了,因此,电子设备采用最低充电电流值进行充电,以减缓电子设备的温度上升。Wherein, the second temperature threshold may be a temperature value at which the user can clearly perceive the heating of the electronic device in a heavy-load scenario, for example, it may be 38°C. When the temperature of the electronic device is greater than the second temperature threshold, the user may clearly perceive the electronic device The temperature of the electronic device has risen, therefore, the electronic device is charged with the lowest charging current value to slow down the temperature rise of the electronic device.

本申请实施例中的第一电流值、第二电流值以及最低充电电流值均可以为电池端的电流(也可以称为充电电流或电池充电电流)。The first current value, the second current value, and the lowest charging current value in the embodiments of the present application may all be currents at the battery terminal (also referred to as charging current or battery charging current).

其中,第一电流值可能较高,满足重载场景的电量需求。例如用户用手机玩游戏,使得手机的电量已经低于手机的电量安全线,电量安全线例如可以是20%或者30%等,此时,用户一边充电一边继续玩游戏,手机会采用第一电流值进行充电以将手机的电量较快提升至安全线以上,防止手机掉电,降低手机的电量焦虑性。Wherein, the first current value may be relatively high, which satisfies the electric power demand of the heavy load scene. For example, a user plays a game with a mobile phone, so that the power of the mobile phone is already lower than the safety line of the mobile phone, which can be 20% or 30%, for example. At this time, the user continues to play the game while charging, and the mobile phone will use the first current. The value is charged to increase the power of the mobile phone above the safety line quickly, prevent the power of the mobile phone from losing power, and reduce the power anxiety of the mobile phone.

示例性的,用户一边观看长视频一边开始给手机充电,在手机的壳体温度小于第一温度阈值,且手机的电量低于第一电量阈值时,手机采用第一电流值进行充电,随着手机充电的持续进行,手机的电量和壳体温度会随之增大,当手机的壳体温度大于第一温度阈值且小于或等于第二温度阈值时,手机采用第二电流值进行充电,第二电流值大于最低充电电流值,且小于第一电流值,当手机的壳体温度大于第二温度阈值时,电子设备采用最低充电电流值进行充电。Exemplarily, the user begins to charge the mobile phone while watching a long video. When the temperature of the mobile phone's shell is lower than the first temperature threshold and the power of the mobile phone is lower than the first power threshold, the mobile phone is charged with the first current value. As the charging of the mobile phone continues, the battery power and shell temperature of the mobile phone will increase accordingly. When the shell temperature of the mobile phone is greater than the first temperature threshold and less than or equal to the second temperature threshold, the mobile phone will be charged with the second current value. The second current value is greater than the lowest charging current value and smaller than the first current value, and when the temperature of the casing of the mobile phone is greater than the second temperature threshold, the electronic device is charged with the lowest charging current value.

示例性的,图5示出了本申请实施例提供的一种重载场景曲线示意图。如图5所示,重载场景曲线包括电子设备在重载场景下随充电时间变化的智能充电调控模式充电电流曲线,预控充电电流曲线,实际壳体温度曲线以及优化后的壳体温度曲线。如图5所示,在用户可以感知到电子设备发热,例如壳体温度在37℃左右时,对于实际壳体温度曲线,在充电时间为4分钟左右时壳体温度便达到37℃左右,而在优化后的壳体温度曲线中,在充电时间为14分钟左右时壳体温度才达到37℃左右,明显延缓了电子设备的温度上升。在电子设备达到严格管控温度,例如壳体温度在43℃左右时,对于实际壳体温度曲线,在充电时间为20分钟左右时壳体温度便达到43℃左右,而在优化后的壳体温度曲线中,在充电时间为26分钟左右时壳体温度才达到43℃左右,也延缓了电子设备的温度上升。也就是说,重载场景下,优化后的壳体温度上升会更迟一些,用户也会更迟一些感知到电子设备发热,可以有效提升用户体验。Exemplarily, FIG. 5 shows a schematic diagram of an overloaded scene curve provided by an embodiment of the present application. As shown in Figure 5, the heavy-duty scene curve includes the charging current curve of the intelligent charging control mode, the pre-control charging current curve, the actual case temperature curve and the optimized case temperature curve of the electronic device under the heavy-load scene. . As shown in Figure 5, when the user can perceive the heating of the electronic device, for example, when the case temperature is about 37°C, for the actual case temperature curve, the case temperature reaches about 37°C when the charging time is about 4 minutes, while In the optimized case temperature curve, the case temperature only reaches about 37°C when the charging time is about 14 minutes, which obviously delays the temperature rise of the electronic device. When the electronic equipment reaches a strictly controlled temperature, for example, when the shell temperature is around 43°C, for the actual shell temperature curve, the shell temperature reaches around 43°C when the charging time is about 20 minutes, and the optimized shell temperature In the curve, the temperature of the casing only reaches about 43°C when the charging time is about 26 minutes, which also delays the temperature rise of the electronic equipment. That is to say, in heavy load scenarios, the temperature of the optimized case will rise later, and the user will perceive the heating of the electronic device later, which can effectively improve the user experience.

综上,本申请实施例中,电子设备启动充电;获取电子设备在充电中的功耗;当功耗大于或等于第一阈值时,判断电子设备的温度是否大于第一温度阈值;当电子设备的温度小于或等于第一温度阈值时,判断电子设备的电量是否大于第一电量阈值;当电子设备的电量大于第一电量阈值时,电子设备采用最低充电电流值进行充电;当电子设备的电量小于或等于第一电量阈值时,电子设备采用第一电流值进行充电;以及,随着电子设备充电的持续进行,当电子设备的温度大于第一温度阈值,且小于或等于第二温度阈值时,电子设备采用第二电流值进行充电,第二电流值大于最低充电电流值,且小于第一电流值;当电子设备的温度大于第二温度阈值时,电子设备采用最低充电电流值进行充电。这样在电子设备的温度低且电量低时采用较大电流进行充电,可以较快提高电子设备的电量,有效降低低电量时的电量焦虑性,在电子设备的温度上升时,则降低充电电流,减少电子设备在重载场景下的发热量,从而有效延缓电子设备的温度上升。To sum up, in the embodiment of the present application, the electronic device starts charging; the power consumption of the electronic device during charging is obtained; when the power consumption is greater than or equal to the first threshold, it is judged whether the temperature of the electronic device is greater than the first temperature threshold; when the electronic device When the temperature of the electronic device is less than or equal to the first temperature threshold, it is judged whether the power of the electronic device is greater than the first power threshold; when the power of the electronic device is greater than the first power threshold, the electronic device is charged with the lowest charging current value; when the power of the electronic device When it is less than or equal to the first power threshold, the electronic device is charged with the first current value; and, as the charging of the electronic device continues, when the temperature of the electronic device is greater than the first temperature threshold and less than or equal to the second temperature threshold , the electronic device is charged with a second current value, and the second current value is greater than the lowest charging current value and smaller than the first current value; when the temperature of the electronic device is greater than the second temperature threshold, the electronic device is charged with the lowest charging current value. In this way, when the temperature of the electronic device is low and the power is low, a larger current is used for charging, which can quickly increase the power of the electronic device, effectively reduce the power anxiety when the power is low, and reduce the charging current when the temperature of the electronic device rises. Reduce the heat generated by electronic equipment in heavy load scenarios, thereby effectively delaying the temperature rise of electronic equipment.

在上述实施例的基础上,为了更清楚地描述本申请实施例提供的技术方案,示例性的,请参见图6,图6示出了本申请实施例提供的一种充电方法流程示意图,包括:On the basis of the above embodiments, in order to more clearly describe the technical solutions provided by the embodiments of the present application, for example, please refer to Figure 6, which shows a schematic flow chart of a charging method provided by the embodiments of the present application, including :

S601:充电启动。S601: Charging starts.

该步骤与上述步骤S401相似或相同,此处不再赘述。This step is similar or identical to the above step S401, and will not be repeated here.

S602:记录开始充电时手机的状态,该状态可以包括电池温度、电量、充电开始时间、壳体温度等参数。S602: Record the status of the mobile phone when charging is started, and the status may include parameters such as battery temperature, power quantity, charging start time, casing temperature and the like.

其中,电量可以用百分比表示,例如手机的电量为20%。Wherein, the power can be represented by a percentage, for example, the power of the mobile phone is 20%.

S603:获取电子设备的功耗。S603: Obtain the power consumption of the electronic device.

该步骤与上述步骤S402相似或相同,此处不再赘述。This step is similar or identical to the above step S402, and will not be repeated here.

可选的,步骤S603可以包括:Optionally, step S603 may include:

获取N个时间点的电子设备从充电器接收的第三电流值,以及电子设备的电池接收的第四电流值,得到N对成对关联的第三电流值和第四电流值,N为自然数;根据N对第三电流值和第四电流值得到功耗。Obtain the third current value received by the electronic device from the charger at N time points, and the fourth current value received by the battery of the electronic device, and obtain N pairs of third current values and fourth current values associated in pairs, where N is a natural number ; Obtain power consumption according to N pairs of the third current value and the fourth current value.

可能的实现中,在电子设备启动充电后,电子设备中的电流值采集器开始采集N个时间点的电子设备从充电器接收的第三电流值以及电子设备的电池接收的第四电流值,得到N对成对关联的第三电流值和第四电流值,对采集得到的N对第三电流值和第四电流值进行计算得到功耗。In a possible implementation, after the electronic device starts charging, the current value collector in the electronic device starts to collect the third current value received by the electronic device from the charger and the fourth current value received by the battery of the electronic device at N time points, N pairs of associated third current values and fourth current values are obtained, and the collected N pairs of third current values and fourth current values are calculated to obtain power consumption.

示例性的,电子设备的电流值采集器可以是定期采集,例如每隔10秒采集一对第三电流值和第四电流值,100秒后得到10对第三电流值和第四电流值。Exemplarily, the current value collector of the electronic device may collect periodically, for example, collect a pair of the third current value and the fourth current value every 10 seconds, and obtain 10 pairs of the third current value and the fourth current value after 100 seconds.

本申请实施例中,通过采集N个时间点的电子设备从充电器接收的第三电流值,以及电子设备的电池接收的第四电流值得到N对成对关联的第三电流值和第四电流值,根据得到的N对成对关联的第三电流值和第四电流值得到功耗,以便后续可以依据得到的功耗来识别电子设备的负载的场景。In the embodiment of the present application, N pairs of pairwise associated third current values and fourth current values are obtained by collecting the third current value received by the electronic device from the charger and the fourth current value received by the battery of the electronic device For the current value, the power consumption is obtained according to the obtained N pairs of the third current value and the fourth current value associated in pairs, so that the scene of the load of the electronic device can be identified subsequently according to the obtained power consumption.

可选的,根据N对第三电流值和第四电流值得到功耗,包括:Optionally, the power consumption is obtained according to N pairs of the third current value and the fourth current value, including:

分别计算N对第三电流值和第四电流值中任一对第三电流值和第四电流值的差值,得到N个差值;对N个差值按照预设算法计算得到功耗,预设算法包括下述任一个:求平均算法、先筛选有效数据再求平均算法、求中位数算法。Calculate the difference between any pair of the third current value and the fourth current value in the N pairs of the third current value and the fourth current value, respectively, to obtain N differences; calculate the power consumption according to the preset algorithm for the N pairs of differences, The preset algorithm includes any one of the following: average algorithm, filter valid data first and then average algorithm, and median algorithm.

示例性的,对N对第三电流值和第四电流值中的每一对第三电流值和第四电流值做差运算,N例如是5,则得到5个差值,5个差值例如可以是809mA、800mA、802mA、812mA、805mA,对5个差值求平均值得到功耗为805.6mA;或者,去掉5个差值中的最低值800mA和最高值812mA再计算剩余数值的平均值得到功耗为805.3mA;或者,对5个差值重新排列:800mA、802mA、805mA、809mA、812mA,取中位数得到功耗为805mA。可以理解的是,功耗可以为估算值。对得到功耗的计算方法,本申请不做具体限定。Exemplarily, a difference operation is performed on each pair of N pairs of the third current value and the fourth current value, where N is 5 for example, then 5 differences are obtained, and 5 differences For example, it can be 809mA, 800mA, 802mA, 812mA, 805mA, and the average value of 5 differences is calculated to obtain a power consumption of 805.6mA; or, remove the lowest value of 800mA and the highest value of 812mA among the 5 differences, and then calculate the average of the remaining values The value gives a power consumption of 805.3mA; or, rearrange the five differences: 800mA, 802mA, 805mA, 809mA, 812mA, and take the median to get a power consumption of 805mA. It is understood that power consumption may be an estimate. The present application does not specifically limit the calculation method for obtaining the power consumption.

本申请实施例中,通过对N对第三电流值和第四电流值进行简易计算得到功耗,以便后续可以依据得到的功耗来识别电子设备的负载的场景。In the embodiment of the present application, the power consumption is obtained through simple calculation of N pairs of the third current value and the fourth current value, so that the scene of the load of the electronic device can be identified later based on the obtained power consumption.

S604:当功耗大于或等于第一阈值时,判断电子设备的温度是否大于第一温度阈值。S604: When the power consumption is greater than or equal to the first threshold, determine whether the temperature of the electronic device is greater than the first temperature threshold.

该步骤与上述步骤S403相似或相同,此处不再赘述。This step is similar or the same as the above step S403, and will not be repeated here.

可选的,在步骤S604之前,还包括:Optionally, before step S604, it also includes:

判断电子设备是否为亮屏状态;当电子设备不为亮屏状态时,电子设备采用最低充电电流值进行充电;当功耗大于或等于第一阈值时,判断电子设备的温度是否大于第一温度阈值,包括:当电子设备为亮屏状态,且功耗大于或等于第一阈值时,判断电子设备的温度是否大于第一温度阈值。Determine whether the electronic device is in the bright screen state; when the electronic device is not in the bright screen state, the electronic device is charged with the lowest charging current value; when the power consumption is greater than or equal to the first threshold, determine whether the temperature of the electronic device is greater than the first temperature The threshold includes: when the electronic device is in a bright screen state and the power consumption is greater than or equal to the first threshold, judging whether the temperature of the electronic device is greater than the first temperature threshold.

可能的实现中,在对功耗进行判断之前判断电子设备是否处于亮屏状态,当电子设备为息屏状态时,电子设备采用最低充电电流值进行充电,或者说电子设备进入常规充电模式。当电子设备为亮屏状态时,对电子设备的功耗、温度、电量等进行判断,从而确定电子设备的充电电流,具体确定方法可以参见上述实施例的内容,此处不再赘述。In a possible implementation, before judging the power consumption, it is judged whether the electronic device is in the bright screen state. When the electronic device is in the off-screen state, the electronic device is charged with the lowest charging current value, or the electronic device enters the normal charging mode. When the electronic device is in the bright screen state, the power consumption, temperature, and electric power of the electronic device are judged, so as to determine the charging current of the electronic device. The specific determination method can refer to the content of the above-mentioned embodiments, and will not be repeated here.

本申请实施例中,在对功耗进行判断之前判断电子设备是否处于亮屏状态,有助于后续基于亮屏状态下确定不同负载场景下的充电电流。In the embodiment of the present application, judging whether the electronic device is in the bright screen state before judging the power consumption is helpful for subsequently determining the charging current under different load scenarios based on the bright screen state.

S605:当电子设备的温度小于或等于第一温度阈值时,判断电子设备的电量是否大于第一电量阈值。S605: When the temperature of the electronic device is less than or equal to the first temperature threshold, determine whether the power of the electronic device is greater than the first power threshold.

该步骤与上述步骤S404相似或相同,此处不再赘述。This step is similar or identical to the above step S404, and will not be repeated here.

S606:当电子设备的电量大于第一电量阈值时,电子设备采用最低充电电流值进行充电。S606: When the power of the electronic device is greater than the first power threshold, the electronic device is charged with the lowest charging current value.

该步骤与上述步骤S405相似或相同,此处不再赘述。This step is similar or the same as the above step S405, and will not be repeated here.

S607:当电子设备的电量小于或等于第一电量阈值时,电子设备采用第一电流值进行充电;以及,随着电子设备充电的持续进行,当电子设备的温度大于第一温度阈值,且小于或等于第二温度阈值时,电子设备采用第二电流值进行充电,第二电流值大于最低充电电流值,且小于第一电流值;当电子设备的温度大于第二温度阈值时,电子设备采用最低充电电流值进行充电。S607: When the power of the electronic device is less than or equal to the first power threshold, the electronic device is charged with the first current value; and, as the charging of the electronic device continues, when the temperature of the electronic device is greater than the first temperature threshold and less than or equal to the second temperature threshold, the electronic device is charged with a second current value, and the second current value is greater than the lowest charging current value and less than the first current value; when the temperature of the electronic device is greater than the second temperature threshold, the electronic device uses The lowest charging current value for charging.

该步骤与上述步骤S406相似或相同,此处不再赘述。This step is similar or identical to the above step S406, and will not be repeated here.

可选的,第一电流值和/或第二电流值均为预先学习得到,方法还包括:Optionally, both the first current value and/or the second current value are learned in advance, and the method further includes:

分别获取电子设备采用第一电流值充电时的第一过程数据,和/或,电子设备采用第二电流值充电时的第二过程数据,其中,第一过程数据包括第一电池温度升高值和/或第一壳体温度升高值,第二过程数据包括第二电池温度升高值和/或第二壳体温度升高值;Respectively acquire first process data when the electronic device is charged with a first current value, and/or second process data when the electronic device is charged with a second current value, wherein the first process data includes a first battery temperature rise value And/or the first case temperature rise value, the second process data includes the second battery temperature rise value and/or the second case temperature rise value;

当第一电池温度升高值小于或等于第一温升阈值,和/或,第一壳体温度升高值小于或等于第二温升阈值时,更新第一电流值为更大的值;或者,当第一电池温度升高值大于第一温升阈值,和/或,第一壳体温度升高值大于第二温升阈值时,更新第一电流值为更小的值;和/或,当第二电池温度升高值小于或等于第三温升阈值,和/或,第二壳体温度升高值小于或等于第四温升阈值时,更新第二电流值为更大的值;或者,当第二电池温度升高值大于第三温升阈值,和/或,第二壳体温度升高值大于第四温升阈值时,更新第二电流值为更小的值。When the first battery temperature rise value is less than or equal to the first temperature rise threshold, and/or the first casing temperature rise value is less than or equal to the second temperature rise threshold, update the first current value to a larger value; Or, when the first battery temperature rise value is greater than the first temperature rise threshold, and/or the first casing temperature rise value is greater than the second temperature rise threshold, update the first current value to a smaller value; and/or Or, when the second battery temperature rise value is less than or equal to the third temperature rise threshold, and/or, the second housing temperature rise value is less than or equal to the fourth temperature rise threshold value, update the second current value to a larger value or, when the second battery temperature rise value is greater than the third temperature rise threshold, and/or the second casing temperature rise value is greater than the fourth temperature rise threshold, update the second current value to a smaller value.

可能的实现中,第一电流值和/或第二电流值均为预先学习得到,在电子设备启动充电后,电子设备还会记录开始充电时电子设备的状态,开始充电时电子设备的状态包括电池温度、壳体温度、充电开始时间、电量等,充电过程中,也会记录电子设备的状态,充电完成后根据充电电流发生变化时记录的电子设备的状态与充电开始时电子设备的状态可以得到第一过程数据和/或第二过程数据。In a possible implementation, the first current value and/or the second current value are pre-learned. After the electronic device starts charging, the electronic device will also record the state of the electronic device when charging starts. The state of the electronic device when charging starts includes Battery temperature, shell temperature, charging start time, power level, etc. During the charging process, the status of the electronic device will also be recorded. First process data and/or second process data are obtained.

其中,第一电流值和/或第二电流值均为预先学习得到可以理解为可以根据预置充电策略表确定第一电流值和/或第二电流值,预置充电策略表如表1所示。Wherein, the first current value and/or the second current value are all learned in advance. It can be understood that the first current value and/or the second current value can be determined according to the preset charging strategy table. The preset charging strategy table is shown in Table 1. Show.

表1Table 1

场景举例Scenario example 电量(百分比)Power (percentage) 壳体温度(℃)Shell temperature (°C) 电池充电电流(mA)Battery charging current (mA) 重载场景(功耗>800mA)Heavy load scenario (power consumption>800mA) <20<20 <30<30 25002500 重载场景(功耗>800mA)Heavy load scenario (power consumption>800mA) >20>20 NANA 18001800 中载场景(功耗500~800mA)Medium-load scenario (power consumption 500-800mA) <20<20 <33<33 40004000 中载场景(功耗500~800mA)Medium-load scenario (power consumption 500-800mA) >20>20 >=33>=33 28002800 轻载场景(功耗<500mA)Light load scenario (power consumption<500mA) <30<30 <35<35 60006000 轻载场景(功耗<500mA)Light load scenario (power consumption<500mA) >30>30 >=35>=35 40004000

示例性的,在电子设备启动充电后,电子设备记录开始充电时电子设备的状态,开始充电时电子设备的状态包括电池温度1、壳体温度1、充电开始时间1、电量1等,在充电过程中,会记录电子设备的充电电流由第一电流值调整为第二电流值时电子设备的状态,该状态包括电池温度2、壳体温度2、充电时间2、电量2等,还可以记录在电子设备的电池充电电流由第二电流值调整为最低充电电流值时电子设备的状态,该状态包括电池温度3、壳体温度3、充电时间3、电量3等。充电完成后,对电池温度2与电池温度1做减运算,得到第一电池温度升高值,和/或对壳体温度2与壳体温度1做减运算,得到第一壳体温度升高值,和/或对电池温度3与电池温度1做减运算,得到第二电池温度升高值,和/或对壳体温度3与壳体温度1做减运算,得到第二壳体温度升高值。Exemplarily, after the electronic device starts charging, the electronic device records the state of the electronic device at the start of charging. The state of the electronic device at the start of charging includes battery temperature 1, housing temperature 1, charging start time 1, power level 1, etc. During the process, it will record the state of the electronic device when the charging current of the electronic device is adjusted from the first current value to the second current value. This state includes battery temperature 2, casing temperature 2, charging time 2, power quantity 2, etc. The state of the electronic device when the battery charging current of the electronic device is adjusted from the second current value to the lowest charging current value, the state includes the battery temperature 3 , the casing temperature 3 , the charging time 3 , the electric quantity 3 and so on. After charging is completed, subtract the battery temperature 2 from the battery temperature 1 to obtain the first battery temperature rise value, and/or subtract the case temperature 2 from the case temperature 1 to obtain the first case temperature rise value, and/or subtract the battery temperature 3 from the battery temperature 1 to obtain the second battery temperature rise value, and/or subtract the case temperature 3 from the case temperature 1 to obtain the second case temperature rise high value.

示例性的,在电子设备的重载场景下,若第一电池温度升高值小于或等于第一温升阈值,和/或,第一壳体温度升高值小于或等于第二温升阈值,也就是说,采用第一电流值充电时,电子设备的第一电池温度升高值和/或第一壳体温度升高值较小,没有超过第一温升阈值和/或第二温升阈值的允许范围,因此还可以增大第一电流值让第一电池温度升高值和/或第一壳体温度升高值更大一些,因此,更新第一电流值为更大的值,例如将表1中重载场景的2500mA更新为2600mA;或者,若第一电池温度升高值大于第一温升阈值,和/或,第一壳体温度升高值大于第二温升阈值,也就是说,采用第一电流值充电时,电子设备的第一电池温度升高值和/或第一壳体温度升高值较大,超过了第一温升阈值和/或第二温升阈值的允许范围,因此可以减小第一电流值让第一电池温度升高值和/或第一壳体温度升高值更小一些,因此,更新第一电流值为更小的值,例如将表1中重载场景的2500mA更新为2300mA;和/或,若第二电池温度升高值小于或等于第三温升阈值,和/或,第二壳体温度升高值小于或等于第四温升阈值,也就是说,采用第二电流值充电时,电子设备的第二电池温度升高值和/或第二壳体温度升高值较小,没有超过第三温升阈值和/或第四温升阈值的允许范围,因此还可以增大第二电流值让第二电池温度升高值和/或第二壳体温度升高值更大一些,因此,更新第二电流值为更大的值,例如,将表1中重载场景的1800mA更新为1900mA;或者,若第二电池温度升高值大于第三温升阈值,和/或,第二壳体温度升高值大于第四温升阈值,也就是说,采用第二电流值充电时,电子设备的第二电池温度升高值和/或第二壳体温度升高值较大,超过了第三温升阈值和/或第四温升阈值的允许范围,因此可以减小第二电流值让第二电池温度升高值和/或第二壳体温度升高值更小一些,因此,更新第二电流值为更小的值,例如,将表1中重载场景的1800mA更新为1600mA。Exemplarily, in the heavy-load scenario of the electronic device, if the first battery temperature rise value is less than or equal to the first temperature rise threshold, and/or, the first housing temperature rise value is less than or equal to the second temperature rise threshold That is to say, when charging with the first current value, the first battery temperature rise value and/or the first housing temperature rise value of the electronic device is small, and the first temperature rise threshold and/or the second temperature rise threshold are not exceeded. The allowable range of raising the threshold value, so the first current value can also be increased to make the first battery temperature rise value and/or the first case temperature rise value larger, therefore, update the first current value to a larger value , for example, update the 2500mA in the heavy load scenario in Table 1 to 2600mA; or, if the first battery temperature rise value is greater than the first temperature rise threshold, and/or, the first housing temperature rise value is greater than the second temperature rise threshold , that is to say, when charging with the first current value, the first battery temperature rise value and/or the first housing temperature rise value of the electronic device is relatively large, exceeding the first temperature rise threshold and/or the second temperature rise threshold. The allowable range of raising the threshold value, so the first current value can be reduced to make the first battery temperature rise value and/or the first casing temperature rise value smaller, so the first current value is updated to a smaller value, For example, update the 2500mA in the heavy load scenario in Table 1 to 2300mA; and/or, if the second battery temperature rise value is less than or equal to the third temperature rise threshold, and/or, the second housing temperature rise value is less than or equal to The fourth temperature rise threshold, that is to say, when charging with the second current value, the second battery temperature rise value and/or the second housing temperature rise value of the electronic device is small, and does not exceed the third temperature rise threshold and /or the allowable range of the fourth temperature rise threshold, so the second current value can also be increased to make the second battery temperature rise value and/or the second housing temperature rise value larger, so update the second current value For a larger value, for example, update the 1800mA in the heavy load scenario in Table 1 to 1900mA; or, if the second battery temperature rise value is greater than the third temperature rise threshold, and/or, the second case temperature rise value Greater than the fourth temperature rise threshold, that is, when charging with the second current value, the second battery temperature rise value and/or the second housing temperature rise value of the electronic device is relatively large, exceeding the third temperature rise threshold value And/or the allowable range of the fourth temperature rise threshold, so the second current value can be reduced to make the second battery temperature rise value and/or the second housing temperature rise value smaller, so update the second current value For a smaller value, for example, update 1800mA to 1600mA for the heavy load scenario in Table 1.

本申请实施例中,电子设备充一次电就可以根据充电过程的第一过程数据和/或第二过程数据更新一次第一电流值和/或第二电流值,这样在多次更新后可以得到在重载场景下较优的充电电流。In the embodiment of the present application, the electronic device can update the first current value and/or the second current value once according to the first process data and/or the second process data of the charging process, so that after multiple updates, it can be obtained Optimal charging current in heavy load scenarios.

上述步骤S604~S607为电子设备的功耗大于或等于第一阈值时的充电方法,可以理解为电子设备在重载场景下的充电方法。可以理解的是,功耗还可以小于第一阈值,可选的,在功耗小于第一阈值且大于第二阈值时,步骤S603之后还可以包括下述步骤:The above steps S604-S607 are the charging method when the power consumption of the electronic device is greater than or equal to the first threshold, which can be understood as the charging method of the electronic device in a heavy load scenario. It can be understood that the power consumption may also be less than the first threshold. Optionally, when the power consumption is less than the first threshold and greater than the second threshold, the following steps may be included after step S603:

S608:当功耗小于第一阈值且大于第二阈值时,判断电子设备的电量是否大于第二电量阈值;当电子设备的电量小于或等于第二电量阈值时,判断电子设备的温度是否大于第三温度阈值;当电子设备的温度小于或等于第三温度阈值时,电子设备采用第五电流值进行充电,第五电流值为预先学习得到的;当电子设备的温度大于第三温度阈值时,电子设备采用最低充电电流值进行充电。S608: When the power consumption is less than the first threshold and greater than the second threshold, determine whether the power of the electronic device is greater than the second power threshold; when the power of the electronic device is less than or equal to the second power threshold, determine whether the temperature of the electronic device is greater than the second threshold Three temperature thresholds; when the temperature of the electronic device is less than or equal to the third temperature threshold, the electronic device is charged with a fifth current value, and the fifth current value is learned in advance; when the temperature of the electronic device is greater than the third temperature threshold, Electronic devices are charged with the lowest charging current value.

其中,第二阈值可以是电子设备的中载场景与轻载场景的分界线,例如第二阈值可以是500mA。可以理解的是,本申请实施例中的功耗小于第一阈值也可以是功耗小于或等于第一阈值,大于第二阈值也可以是大于或等于第二阈值,对第二阈值属于中载场景还是轻载场景,本申请不做具体限定。Wherein, the second threshold may be a boundary line between a medium-load scenario and a light-load scenario of the electronic device, for example, the second threshold may be 500mA. It can be understood that, in the embodiment of the present application, the power consumption less than the first threshold may also mean that the power consumption is less than or equal to the first threshold, and greater than the second threshold may also be greater than or equal to the second threshold, and the second threshold belongs to the medium load The scene is still a light-load scene, which is not specifically limited in this application.

其中,第三温度阈值可以是针对中载场景下电子设备的电池温度和/或壳体温度预先设置的值。Wherein, the third temperature threshold may be a preset value for the battery temperature and/or housing temperature of the electronic device in a medium-load scenario.

其中,第五电流值可以是针对电子设备在中载场景下的充电电流值,可以理解的是,第五电流值大于最低充电电流值。Wherein, the fifth current value may be a charging current value for the electronic device in a medium-load scenario, and it can be understood that the fifth current value is greater than the lowest charging current value.

其中,第二电量阈值可以是预先设置的用于确定中载场景下电子设备的充电电流的值。Wherein, the second power threshold may be a preset value used to determine the charging current of the electronic device in a medium-load scenario.

示例性的,当电子设备的电量大于第二电量阈值时,电子设备采用最低充电电流值进行充电,当电子设备的电量小于或等于第二电量阈值时,基于电子设备的温度确定电子设备的充电电流,例如当电子设备的壳体温度小于或等于第三温度阈值时,电子设备采用第五电流值进行充电,第五电流值为预先学习得到的,当电子设备的壳体温度大于第三温度阈值时,电子设备采用最低充电电流值进行充电。Exemplarily, when the power of the electronic device is greater than the second power threshold, the electronic device is charged with the lowest charging current value, and when the power of the electronic device is less than or equal to the second power threshold, the charging of the electronic device is determined based on the temperature of the electronic device Current, for example, when the shell temperature of the electronic device is less than or equal to the third temperature threshold, the electronic device is charged with the fifth current value, the fifth current value is learned in advance, when the shell temperature of the electronic device is greater than the third temperature When the threshold value is reached, the electronic device is charged with the lowest charging current value.

本申请实施例中,根据电子设备在中载场景下的电量和温度确定电子设备的充电电流,在电子设备的电量低且温度低时采用预先学习的第五电流值进行充电,第五电流值较大,以适当提高中载场景下电子设备的充电速度,将电子设备的电量快速补充到电量安全线以上,在电子设备的温度较高时采用最低充电电流值进行充电,以延缓中载场景下电子设备的温度上升。In the embodiment of the present application, the charging current of the electronic device is determined according to the power and temperature of the electronic device in a medium-load scene, and the fifth current value learned in advance is used for charging when the power of the electronic device is low and the temperature is low. The fifth current value Larger, to appropriately increase the charging speed of electronic devices in medium-load scenarios, quickly replenish the power of electronic devices above the power safety line, and use the lowest charging current value to charge electronic devices when the temperature of electronic devices is high, so as to delay the charging of medium-load scenarios. The temperature of electronic equipment rises.

可选的:获取电子设备采用第五电流值充电时的第三过程数据,其中,第三过程数据包括第三电池温度升高值,第三壳体温度升高值和/或第一充电时长;Optional: acquiring third process data when the electronic device is charged with a fifth current value, wherein the third process data includes a third battery temperature rise value, a third case temperature rise value and/or a first charging duration ;

当第三电池温度升高值小于或等于第五温升阈值,第三壳体温度升高值小于或等于第六温升阈值,和/或,第一充电时长大于第一时长阈值时,更新第五电流值为更大的值;或者,当第三电池温度升高值大于第五温升阈值,和/或,第三壳体温度升高值大于第六温升阈值时,更新第五电流值为更小的值。Update The fifth current value is a larger value; or, when the third battery temperature rise value is greater than the fifth temperature rise threshold, and/or the third casing temperature rise value is greater than the sixth temperature rise threshold, update the fifth current value. The current value is a smaller value.

可能的实现中,在电子设备启动充电后,电子设备会记录开始充电时电子设备的状态,开始充电时电子设备的状态包括电池温度、壳体温度、充电开始时间、电量等,充电过程中,也会记录电子设备的状态,充电完成后根据充电电流发生变化时记录的电子设备的状态与充电开始时电子设备的状态可以得到第三过程数据。In a possible implementation, after the electronic device starts charging, the electronic device will record the state of the electronic device when charging starts. The state of the electronic device when charging starts includes battery temperature, shell temperature, charging start time, power, etc. During charging, The state of the electronic device will also be recorded. After the charging is completed, the third process data can be obtained according to the state of the electronic device recorded when the charging current changes and the state of the electronic device at the beginning of charging.

示例性的,在电子设备启动充电后,电子设备记录开始充电时电子设备的状态,开始充电时电子设备的状态包括电池温度1、壳体温度1、充电开始时间1、电量1等,在充电过程中,会记录电子设备的充电电流由第五电流值调整为最低充电电流值时电子设备的状态,该状态包括电池温度4、壳体温度4、充电时间4、电量4等,充电完成后,对电池温度4与电池温度1做减运算,得到第三电池温度升高值,和/或对壳体温度4与壳体温度1做减运算,得到第三壳体温度升高值,和/或对充电时间4与充电开始时间1做减运算,得到第一充电时长。Exemplarily, after the electronic device starts charging, the electronic device records the state of the electronic device at the start of charging. The state of the electronic device at the start of charging includes battery temperature 1, housing temperature 1, charging start time 1, power level 1, etc. During the process, it will record the state of the electronic device when the charging current of the electronic device is adjusted from the fifth current value to the lowest charging current value. This state includes battery temperature 4, shell temperature 4, charging time 4, power level 4, etc. , subtracting the battery temperature 4 from the battery temperature 1 to obtain a third battery temperature rise value, and/or subtracting the case temperature 4 from the case temperature 1 to obtain a third case temperature rise value, and /or subtract the charging time 4 from the charging start time 1 to obtain the first charging duration.

示例性的,在电子设备的中载场景下,若第三电池温度升高值小于或等于第五温升阈值,第三壳体温度升高值小于或等于第六温升阈值,和/或,第一充电时长大于第一时长阈值,也就是说,采用第五电流值充电时,电子设备的第三电池温度升高值和/或第三壳体温度升高值较小,没有超过第五温升阈值和/或第六温升阈值的允许范围,和/或第一充电时长较大,因此可以增大第五电流值让第三电池温度升高值和/或第三壳体温度升高值更大一些,和/或第一充电时长更小一些,因此,更新第五电流值为更大的值,例如将表1中中载场景的4000mA更新为4200mA;或者,若第三电池温度升高值大于第五温升阈值,和/或,第三壳体温度升高值大于第六温升阈值,也就是说,采用第五电流值充电时,电子设备的第三电池温度升高值和/或第三壳体温度升高值较大,超过了第五温升阈值和/或第六温升阈值的允许范围,因此可以减小第五电流值让第三电池温度升高值和/或第三壳体温度升高值更小一些,因此,更新第五电流值为更小的值,例如将表1中中载场景的4000mA更新为3900mA。Exemplarily, in a medium-load scenario of the electronic device, if the third battery temperature rise value is less than or equal to the fifth temperature rise threshold, the third casing temperature rise value is less than or equal to the sixth temperature rise threshold, and/or , the first charging time length is greater than the first time length threshold, that is, when charging with the fifth current value, the third battery temperature rise value and/or the third case temperature rise value of the electronic device are relatively small, and do not exceed the fifth current value. The allowable range of the fifth temperature rise threshold and/or the sixth temperature rise threshold, and/or the first charging time is relatively long, so the fifth current value can be increased to increase the third battery temperature and/or the third housing temperature The increase value is larger, and/or the first charging time is shorter, therefore, update the fifth current value to a larger value, for example, update the 4000mA in the load scenario in Table 1 to 4200mA; or, if the third The battery temperature rise value is greater than the fifth temperature rise threshold, and/or, the third housing temperature rise value is greater than the sixth temperature rise threshold, that is to say, when charging with the fifth current value, the third battery temperature of the electronic device The increase value and/or the temperature increase value of the third casing are relatively large, exceeding the allowable range of the fifth temperature rise threshold and/or the sixth temperature rise threshold, so the fifth current value can be reduced to increase the temperature of the third battery The high value and/or the temperature rise of the third case is smaller, therefore, the fifth current value is updated to a smaller value, for example, the 4000mA of the medium-load scenario in Table 1 is updated to 3900mA.

可以理解的是,在电子设备的第三电池温度升高值和/或第三壳体温度升高值较大时,重点考虑电子设备的充电安全性,也就是说,在电子设备的第三电池温度升高值和/或第三壳体温度升高值较大时,为了延缓电子设备的温度上升,提高电子设备的充电安全性,即使此时的充电时长较长,也可能不会更新第五电流值为更大的值。It can be understood that when the temperature rise of the third battery and/or the temperature rise of the third casing of the electronic device is large, the charging safety of the electronic device should be considered first, that is, when the third battery temperature of the electronic device When the temperature rise of the battery and/or the temperature rise of the third housing is large, in order to delay the temperature rise of the electronic device and improve the charging safety of the electronic device, even if the charging time is longer at this time, it may not be updated. The fifth current value is a larger value.

本申请实施例中,电子设备充一次电就可以根据充电过程的第三过程数据更新一次第五电流值,这样在多次更新后可以得到在中载场景下较优的充电电流。In the embodiment of the present application, the fifth current value can be updated once according to the third process data of the charging process after the electronic device is charged once, so that a better charging current in a medium-load scenario can be obtained after multiple updates.

S609:当电子设备的电量大于第二电量阈值时,电子设备采用最低充电电流值进行充电。S609: When the power of the electronic device is greater than the second power threshold, the electronic device is charged with the lowest charging current value.

本申请实施例中,当电子设备的电量大于第二电量阈值时,电子设备采用最低充电电流值进行充电,例如在电子设备的电量较高时采用较低电流值进行充电,以提高中载场景下电子设备的充电安全性。In the embodiment of the present application, when the power of the electronic device is greater than the second power threshold, the electronic device is charged with the lowest charging current value, for example, when the power of the electronic device is high, it is charged with a lower current value to improve the performance of the medium-load scenario. Under the charging safety of electronic equipment.

上述步骤S608~S609为电子设备的功耗小于第一阈值且大于第二阈值时的充电方法,可以理解为电子设备在中载场景下的充电方法。可以理解的是,上述步骤S608~S609可以是在电子设备处于亮屏的场景下进行的。可以理解的是,功耗还可以小于或等于第二阈值,可选的,在功耗小于或等于第二阈值时,步骤S603之后还可以包括下述步骤:The above steps S608-S609 are the charging method when the power consumption of the electronic device is less than the first threshold and greater than the second threshold, which can be understood as the charging method of the electronic device in a medium-load scenario. It can be understood that the above steps S608-S609 may be performed in a scene where the screen of the electronic device is on. It can be understood that the power consumption may also be less than or equal to the second threshold. Optionally, when the power consumption is less than or equal to the second threshold, the following steps may be included after step S603:

S610:当功耗小于或等于第二阈值时,判断电子设备的电量是否大于第三电量阈值;当电子设备的电量小于或等于第三电量阈值时,判断电子设备的温度是否大于第四温度阈值;当电子设备的温度小于或等于第四温度阈值时,电子设备采用第六电流值进行充电,第六电流值为预先学习得到的;当电子设备的温度大于第四温度阈值时,电子设备采用最低充电电流值进行充电。S610: When the power consumption is less than or equal to the second threshold, determine whether the power of the electronic device is greater than the third power threshold; when the power of the electronic device is less than or equal to the third power threshold, determine whether the temperature of the electronic device is greater than the fourth temperature threshold ; When the temperature of the electronic device is less than or equal to the fourth temperature threshold, the electronic device uses the sixth current value for charging, and the sixth current value is learned in advance; when the temperature of the electronic device is greater than the fourth temperature threshold, the electronic device uses The lowest charging current value for charging.

可以理解的是,本申请实施例中的功耗小于或等于第二阈值也可以是功耗小于第二阈值,对此本申请不做具体限定。It can be understood that, in the embodiment of the present application, the power consumption is less than or equal to the second threshold may also mean that the power consumption is less than the second threshold, which is not specifically limited in the present application.

其中,第四温度阈值可以是针对轻载场景下电子设备的电池温度和/或壳体温度预先设置的值。Wherein, the fourth temperature threshold may be a preset value for the battery temperature and/or housing temperature of the electronic device in a light load scenario.

其中,第六电流值可以是针对电子设备在轻载场景下的充电电流值,可以理解的是,第六电流值大于最低充电电流值。Wherein, the sixth current value may be a charging current value for the electronic device in a light-load scenario, and it can be understood that the sixth current value is greater than the lowest charging current value.

其中,第三电量阈值可以是预先设置的用于确定轻载场景下电子设备的充电电流的值。Wherein, the third power threshold may be a preset value used to determine the charging current of the electronic device in a light-load scenario.

示例性的,当电子设备的电量大于第三电量阈值时,电子设备采用最低充电电流值进行充电,当电子设备的电量小于或等于第三电量阈值时,基于电子设备的温度确定电子设备的充电电流,例如当电子设备的壳体温度小于或等于第四温度阈值时,电子设备采用第六电流值进行充电,第六电流值为预先学习得到的,当电子设备的壳体温度大于第四温度阈值时,电子设备采用最低充电电流值进行充电。Exemplarily, when the power of the electronic device is greater than the third power threshold, the electronic device is charged with the lowest charging current value, and when the power of the electronic device is less than or equal to the third power threshold, the charging of the electronic device is determined based on the temperature of the electronic device Current, for example, when the shell temperature of the electronic device is less than or equal to the fourth temperature threshold, the electronic device is charged with the sixth current value, the sixth current value is learned in advance, when the shell temperature of the electronic device is greater than the fourth temperature When the threshold value is reached, the electronic device is charged with the lowest charging current value.

示例性的,图7示出了本申请实施例提供的一种轻载场景原始充电策略曲线示意图,如图7所示,轻载场景原始充电策略曲线包括电子设备在轻载场景下随充电时间变化的充电电流曲线,温度曲线以及电量曲线。图8示出了本申请实施例提供的一种轻载场景优化后策略曲线示意图,如图8所示,轻载场景优化后策略曲线包括电子设备在轻载场景下优化后的随充电时间变化的充电电流曲线,壳体温度曲线以及电量曲线。对比图7和图8可以发现,轻载场景子下,同样是将电子设备的电量充到30%,采用原始充电策略进行充电时所需时间为21分钟左右,而采用优化后的充电电流进行充电时所需时间为13分钟左右,相比于原始充电策略进行充电,采用优化后的充电电流进行充电可以明显缩短充电时间。Exemplarily, FIG. 7 shows a schematic diagram of an original charging strategy curve for a light-load scenario provided by an embodiment of the present application. As shown in FIG. 7, the original charging strategy curve for a light-load scenario includes charging time of an electronic device Changing charging current curve, temperature curve and power curve. Fig. 8 shows a schematic diagram of a strategy curve after optimization in a light-load scenario provided by an embodiment of the present application. As shown in Fig. 8, the strategy curve after optimization in a light-load scenario includes the change with charging time of an electronic device after optimization in a light-load scenario The charging current curve, shell temperature curve and power curve. Comparing Figure 7 and Figure 8, it can be found that in the light-load scenario, the electronic device is also charged to 30%, and the time required for charging with the original charging strategy is about 21 minutes, while using the optimized charging current. The time required for charging is about 13 minutes. Compared with the original charging strategy, charging with the optimized charging current can significantly shorten the charging time.

本申请实施例中,根据电子设备在轻载场景下的电量和温度确定电子设备的充电电流,在电子设备的电量低且温度低时采用预先学习的第六电流值进行充电,第六电流值较大,以适当提高轻载场景下电子设备的充电速度,将电子设备的电量快速补充到电量安全线以上。In the embodiment of the present application, the charging current of the electronic device is determined according to the power and temperature of the electronic device in a light-load scene, and the pre-learned sixth current value is used for charging when the power of the electronic device is low and the temperature is low. The sixth current value Larger, to appropriately increase the charging speed of electronic devices in light-load scenarios, and quickly replenish the power of electronic devices above the power safety line.

可选的,获取电子设备采用第六电流值充电时的第四过程数据,其中,第四过程数据包括第四电池温度升高值,第四壳体温度升高值和/或第二充电时长;Optionally, acquire fourth process data when the electronic device is charged with a sixth current value, where the fourth process data includes a fourth battery temperature rise value, a fourth housing temperature rise value and/or a second charging duration ;

当第四电池温度升高值小于或等于第七温升阈值,第四壳体温度升高值小于或等于第八温升阈值,和/或,第二充电时长大于第二时长阈值时,更新第六电流值为更大的值;或者,当第四电池温度升高值大于第七温升阈值,和/或,第四壳体温度升高值大于第八温升阈值时,更新第六电流值为更小的值。When the fourth battery temperature rise value is less than or equal to the seventh temperature rise threshold, the fourth housing temperature rise value is less than or equal to the eighth temperature rise threshold, and/or the second charging duration is greater than the second duration threshold, update The sixth current value is a larger value; or, when the fourth battery temperature rise value is greater than the seventh temperature rise threshold, and/or the fourth housing temperature rise value is greater than the eighth temperature rise threshold, update the sixth The current value is a smaller value.

可能的实现中,在电子设备启动充电后,电子设备会记录开始充电时电子设备的状态,开始充电时电子设备的状态包括电池温度、壳体温度、充电开始时间、电量等,充电过程中,也会记录电子设备的状态,充电完成后根据充电电流发生变化时记录的电子设备的状态与充电开始时电子设备的状态可以得到第四过程数据。In a possible implementation, after the electronic device starts charging, the electronic device will record the state of the electronic device when charging starts. The state of the electronic device when charging starts includes battery temperature, shell temperature, charging start time, power, etc. During charging, The state of the electronic device will also be recorded. After charging is completed, the fourth process data can be obtained according to the state of the electronic device recorded when the charging current changes and the state of the electronic device at the beginning of charging.

示例性的,在电子设备启动充电后,电子设备记录开始充电时电子设备的状态,开始充电时电子设备的状态包括电池温度1、壳体温度1、充电开始时间1、电量1等,在充电过程中,会记录电子设备的充电电流由第六电流值调整为最低充电电流值时电子设备的状态,该状态包括电池温度5、壳体温度5、充电时间5、电量5等,充电完成后,对电池温度5与电池温度1做减运算,得到第四电池温度升高值,和/或对壳体温度5与壳体温度1做减运算,得到第四壳体温度升高值,和/或对充电时间5与充电开始时间1做减运算,得到第二充电时长。Exemplarily, after the electronic device starts charging, the electronic device records the state of the electronic device at the start of charging. The state of the electronic device at the start of charging includes battery temperature 1, housing temperature 1, charging start time 1, power level 1, etc. During the process, it will record the state of the electronic device when the charging current of the electronic device is adjusted from the sixth current value to the lowest charging current value. This state includes battery temperature 5, shell temperature 5, charging time 5, power capacity 5, etc. , subtracting the battery temperature 5 from the battery temperature 1 to obtain the fourth battery temperature rise value, and/or subtracting the case temperature 5 from the case temperature 1 to obtain the fourth case temperature rise value, and /or subtract the charging time 5 from the charging start time 1 to obtain the second charging duration.

示例性的,在电子设备的轻载场景下,若第四电池温度升高值小于或等于第七温升阈值,第四壳体温度升高值小于或等于第八温升阈值,和/或,第二充电时长大于第二时长阈值,也就是说,采用第六电流值充电时,电子设备的第四电池温度升高值和/或第四壳体温度升高值较小,没有超过第七温升阈值和/或第八温升阈值的允许范围,和/或第二充电时长较大,因此可以增大第六电流值让第四电池温度升高值和/或第四壳体温度升高值更大一些,和/或第二充电时长更小一些,因此,更新第六电流值为更大的值,例如将表1中轻载场景的6000mA更新为6200mA;或者,若第四电池温度升高值大于第七温升阈值,和/或,第四壳体温度升高值大于第八温升阈值,也就是说,采用第六电流值充电时,电子设备的第四电池温度升高值和/或第四壳体温度升高值较大,超过了第七温升阈值和/或第八温升阈值的允许范围,因此可以减小第六电流值让第四电池温度升高值和/或第四壳体温度升高值更小一些,因此,更新第六电流值为更小的值,例如将表1中轻载场景的6000mA更新为5900mA。Exemplarily, in a light-load scenario of the electronic device, if the fourth battery temperature rise value is less than or equal to the seventh temperature rise threshold, the fourth casing temperature rise value is less than or equal to the eighth temperature rise threshold, and/or , the second charging time length is greater than the second time length threshold, that is, when charging with the sixth current value, the fourth battery temperature rise value and/or the fourth case temperature rise value of the electronic device are small, and do not exceed the sixth current value. The allowable range of the seventh temperature rise threshold and/or the eighth temperature rise threshold, and/or the second charging time is longer, so the sixth current value can be increased to make the fourth battery temperature rise value and/or the fourth housing temperature The increase value is larger, and/or the second charging time is shorter, therefore, update the sixth current value to a larger value, for example, update the 6000mA in the light load scenario in Table 1 to 6200mA; or, if the fourth The temperature rise value of the battery is greater than the seventh temperature rise threshold, and/or, the fourth case temperature rise value is greater than the eighth temperature rise threshold, that is, when charging with the sixth current value, the fourth battery temperature of the electronic device The increase value and/or the temperature increase value of the fourth case is relatively large, exceeding the allowable range of the seventh temperature rise threshold and/or the eighth temperature rise threshold, so the sixth current value can be reduced to increase the temperature of the fourth battery The high value and/or the fourth casing temperature increase value is smaller, therefore, the sixth current value is updated to a smaller value, for example, 6000mA in the light-load scenario in Table 1 is updated to 5900mA.

可以理解的是,在电子设备的第四电池温度升高值和/或第四壳体温度升高值较大时,重点考虑电子设备的充电安全性,也就是说,在电子设备的第四电池温度升高值和/或第四壳体温度升高值较大时,为了延缓电子设备的温度上升,提高电子设备的充电安全性,即使此时的充电时长较长,也可能不会更新第六电流值为更大的值。It can be understood that when the fourth battery temperature rise value and/or the fourth housing temperature rise value of the electronic device is relatively large, the charging safety of the electronic device should be considered first, that is, when the fourth battery temperature rise value of the electronic device When the temperature rise of the battery and/or the temperature rise of the fourth housing is large, in order to delay the temperature rise of the electronic device and improve the charging safety of the electronic device, even if the charging time is longer at this time, it may not be updated. The sixth current value is a larger value.

本申请实施例中,电子设备充一次电就可以根据充电过程的第四过程数据更新一次第六电流值,这样在多次更新后可以得到在轻载场景下较优的充电电流。In the embodiment of the present application, the sixth current value can be updated once according to the fourth process data of the charging process after the electronic device is charged once, so that a better charging current in a light-load scenario can be obtained after multiple updates.

S611:当电子设备的电量大于第三电量阈值时,电子设备采用最低充电电流值进行充电。S611: When the power of the electronic device is greater than the third power threshold, the electronic device is charged with the lowest charging current value.

本申请实施例中,当电子设备的电量大于第三电量阈值时,电子设备采用最低充电电流值进行充电,这样在电子设备的电量较高时采用较低电流值进行充电,以提高轻载场景下电子设备的充电安全性。In the embodiment of the present application, when the power of the electronic device is greater than the third power threshold, the electronic device is charged with the lowest charging current value, so that when the power of the electronic device is high, it is charged with a lower current value to improve the performance of light-load scenarios. Under the charging safety of electronic equipment.

上述步骤S610~S611为电子设备的功耗小于或等于第二阈值时的充电方法,可以理解为电子设备在轻载场景下的充电方法。可以理解的是,上述步骤S610~S611可以是在电子设备处于亮屏的场景下进行的。The above steps S610-S611 are the charging method when the power consumption of the electronic device is less than or equal to the second threshold, which can be understood as the charging method of the electronic device in a light-load scenario. It can be understood that the above steps S610-S611 may be performed in a scene where the screen of the electronic device is on.

可选的,在步骤S607之前,还包括步骤:Optionally, before step S607, further steps are included:

显示第一界面,第一界面包括通知信息、第一按钮和第二按钮,通知信息用于提示用户电子设备是否进入智能充电调控模式;响应于对第一按钮的触发操作,电子设备进入智能充电调控模式;或者,响应于对第二按钮的触发操作,电子设备采用最低充电电流值进行充电。Displaying a first interface, the first interface includes notification information, a first button and a second button, the notification information is used to prompt the user whether the electronic device enters the smart charging control mode; in response to the trigger operation of the first button, the electronic device enters the smart charging regulation mode; or, in response to the trigger operation of the second button, the electronic device is charged with the lowest charging current value.

其中,智能充电调控模式可以是电子设备采用上述实施例中的充电方法进行充电。Wherein, the intelligent charging control mode may be that the electronic device is charged using the charging method in the foregoing embodiments.

一种可能的实现中,电子设备启动充电后,在电子设备进入智能充电调控模式之前,电子设备会弹出用户界面(User Interface,UI)提示框,UI提示框供用户选择是否进入智能充电调控模式。In a possible implementation, after the electronic device starts charging, before the electronic device enters the intelligent charging regulation mode, the electronic device will pop up a user interface (UI) prompt box, and the UI prompt box is for the user to choose whether to enter the intelligent charging regulation mode .

示例性的,图9示出了本申请实施例提供的第一界面示意图。手机启动充电后,在手机进入智能充电调控模式之前,手机会显示如图9所示的界面。如图9所示的界面,该界面中可以包括:通知信息901、允许按钮902以及拒绝按钮903,其中,通知信息901提示用户“是否允许进入智能充电调控模式”,第一按钮可以是允许按钮902,第二按钮可以是拒绝按钮903。当手机检测到用户针对允许按钮902的触发操作后,手机可以进入智能充电调控模式;当手机检测到用户针对拒绝按钮903的触发操作后,手机可以继续常规充电模式。需要说明的是,在显示如图9所示的界面后,若手机在预设时间内没有检测到用户针对允许按钮902或者拒绝按钮903的触发操作,手机可以默认进入智能充电调控模式或者常规充电模式。Exemplarily, FIG. 9 shows a schematic diagram of the first interface provided by the embodiment of the present application. After the mobile phone starts charging, before the mobile phone enters the smart charging control mode, the mobile phone will display the interface as shown in Figure 9. As shown in Figure 9, the interface may include: notification information 901, a permission button 902, and a rejection button 903, wherein the notification information 901 prompts the user "whether to allow entering the smart charging regulation mode", and the first button may be a permission button 902. The second button may be a rejection button 903. When the mobile phone detects the user's trigger operation on the allow button 902, the mobile phone can enter the smart charging control mode; when the mobile phone detects the user's trigger operation on the reject button 903, the mobile phone can continue to the normal charging mode. It should be noted that after the interface shown in Figure 9 is displayed, if the mobile phone does not detect the user's trigger operation on the allow button 902 or the reject button 903 within the preset time, the mobile phone can enter the smart charging regulation mode or the normal charging mode by default. model.

另一种可能的实现中,电子设备启动充电后,在满足功耗、温度、电量等条件时电子设备可以自动进入智能充电调控模式进行充电,同时电子设备弹出UI提示框,UI提示框用于通知用户电子设备已进入智能充电调控模式。In another possible implementation, after the electronic device starts to charge, the electronic device can automatically enter the intelligent charging control mode for charging when the conditions such as power consumption, temperature, and power are met, and at the same time, the electronic device pops up a UI prompt box. The UI prompt box is used to Inform the user that the electronic device has entered the smart charging regulation mode.

示例性的,UI提示框中包括通知信息和恢复按钮,通知信息“已进入智能充电调控模式,如需恢复常规充电模式,请点击“恢复””用于通知用户电子设备已进入智能充电调控模式,恢复按钮用于恢复常规充电模式,例如当电子设备检测到用户针对恢复按钮的触发操作时,电子设备退出智能充电调控模式,恢复常规充电模式。Exemplarily, the UI prompt box includes a notification message and a restore button, and the notification message "has entered the smart charging regulation mode, if you want to restore the regular charging mode, please click "Resume"" is used to notify the user that the electronic device has entered the smart charging regulation mode , the recovery button is used to restore the normal charging mode, for example, when the electronic device detects the user's trigger operation on the recovery button, the electronic device exits the intelligent charging control mode and resumes the normal charging mode.

本申请实施例中,在电子设备进入智能充电调控模式之前,显示第一界面供用户选择是否进入智能充电调控模式,增加了交互操作,提高了充电方式的灵活性。In the embodiment of the present application, before the electronic device enters the intelligent charging control mode, a first interface is displayed for the user to choose whether to enter the intelligent charging control mode, which increases the interactive operation and improves the flexibility of the charging mode.

可选的,在执行步骤S607过程中,还包括步骤:Optionally, in the process of executing step S607, further steps are included:

响应于用户的下拉操作显示第二界面,第二界面包括通知信息和第三按钮;响应于对第三按钮的触发操作,电子设备采用最低充电电流值进行充电。The second interface is displayed in response to the user's pull-down operation, and the second interface includes notification information and a third button; in response to the trigger operation of the third button, the electronic device is charged with the lowest charging current value.

示例性的,图10示出了本申请实施例提供的第二界面示意图。在手机进入智能充电调控模式后,当手机检测到用户的下拉操作时,手机可以显示如图10所示的界面,该界面中可以包括通知信息1001以及恢复按钮1002,其中通知信息1001提示用户“已进入智能充电调控模式,如需恢复常规充电模式,请点击“恢复””,第三按钮可以是恢复按钮1002。当手机检测到用户针对恢复按钮1002的触发操作后,手机可以恢复常规充电模式。在一种可能的实现中,在手机进入智能充电调控模式后,当手机检测到用户的下拉操作时,手机可以显示如图10所示的界面,即使手机在此次充电过程中退出智能充电调控模式进入了常规充电模式,手机依然可以显示如图10所示的界面,直到手机断开充电电源后,如图10所示的界面自动消失。Exemplarily, FIG. 10 shows a schematic diagram of the second interface provided by the embodiment of the present application. After the mobile phone enters the smart charging control mode, when the mobile phone detects the user's pull-down operation, the mobile phone can display an interface as shown in Figure 10, which can include notification information 1001 and a recovery button 1002, wherein the notification information 1001 prompts the user to " It has entered the smart charging control mode, if you need to restore the normal charging mode, please click "resume", the third button can be the restore button 1002. After the mobile phone detects the user's trigger operation on the recovery button 1002, the mobile phone can resume the normal charging mode. In a possible implementation, after the mobile phone enters the smart charging control mode, when the mobile phone detects the user's pull-down operation, the mobile phone can display the interface shown in Figure 10, even if the mobile phone exits the smart charging control mode during the charging process. mode into the regular charging mode, the mobile phone can still display the interface shown in Figure 10, until the mobile phone disconnects the charging power supply, the interface shown in Figure 10 disappears automatically.

本申请实施例中,在电子设备进入智能充电调控模式之后,可以显示第二界面供用户选择是否结束智能充电调控模式恢复常规充电模式,增加了交互操作,提高了充电方式的灵活性。In the embodiment of the present application, after the electronic device enters the intelligent charging regulation mode, a second interface can be displayed for the user to choose whether to end the intelligent charging regulation mode and return to the normal charging mode, which increases the interactive operation and improves the flexibility of the charging method.

综上,本申请实施例中,在充电过程中根据电子设备在不同负载场景下的温度和电量动态调整电子设备的充电电流,这样,电子设备在温度低且电量低时采用较大电流进行充电,可以较快提高电子设备的电量,有效降低低电量时的电量焦虑性,电子设备的温度上升时,则降低充电电流,减少电子设备的发热量,从而有效延缓电子设备的温度上升。在充电完成后根据充电过程数据更新对应负载场景的充电电流,可以优化各负载场景的充电电流。To sum up, in the embodiment of the present application, during the charging process, the charging current of the electronic device is dynamically adjusted according to the temperature and power of the electronic device under different load scenarios, so that the electronic device is charged with a larger current when the temperature is low and the power is low. , can quickly increase the power of electronic equipment, effectively reduce power anxiety when the battery is low, and reduce the charging current when the temperature of the electronic equipment rises, reducing the heat generation of the electronic equipment, thereby effectively delaying the temperature rise of the electronic equipment. After the charging is completed, the charging current corresponding to the load scenario is updated according to the charging process data, so that the charging current of each load scenario can be optimized.

在上述实施例的基础上,为了更清楚地描述本申请实施例提供的技术方案,示例性的,请参见图11,图11示出了本申请实施例提供的一种充电方法流程示意图,包括:On the basis of the above embodiments, in order to more clearly describe the technical solutions provided by the embodiments of the present application, for example, please refer to Figure 11. Figure 11 shows a schematic flow chart of a charging method provided by the embodiments of the present application, including :

S1101:充电启动。S1101: Charging starts.

该步骤与上述步骤S401相似或相同,此处不再赘述。This step is similar or identical to the above step S401, and will not be repeated here.

S1102:记录开始充电时手机的状态:电池温度、电量、充电开始时间、壳体温度。S1102: Record the status of the mobile phone when charging starts: battery temperature, power level, charging start time, case temperature.

该步骤与上述步骤S602相似或相同,此处不再赘述。This step is similar or the same as the above step S602, and will not be repeated here.

S1103:获取电子设备的功耗。S1103: Obtain the power consumption of the electronic device.

该步骤与上述步骤S402相似或相同,此处不再赘述。This step is similar or identical to the above step S402, and will not be repeated here.

S1104:判断电子设备是否亮屏。S1104: Determine whether the screen of the electronic device is turned on.

在电子设备处于息屏状态时,进入S1120;在电子设备处于亮屏状态时,开始对功耗进行判断,对功耗进行判断包括:When the electronic device is in the off-screen state, enter S1120; when the electronic device is in the bright screen state, start to judge the power consumption, and the judgment on the power consumption includes:

S1105:功耗是否大于或等于第一阈值。在功耗大于或等于第一阈值时,进入S1106,否则,进入S1110。S1105: Whether the power consumption is greater than or equal to a first threshold. When the power consumption is greater than or equal to the first threshold, go to S1106; otherwise, go to S1110.

S1106:温度是否小于或等于第二温度阈值。S1106: Whether the temperature is less than or equal to the second temperature threshold.

在温度大于第二温度阈值时,进入S1120;在温度小于或等于第二温度阈值时,进入S1107。When the temperature is greater than the second temperature threshold, enter S1120; when the temperature is less than or equal to the second temperature threshold, enter S1107.

S1107:电量是否小于或等于第一电量阈值。S1107: Whether the electric quantity is less than or equal to the first electric quantity threshold.

在电量大于第一电量阈值时,进入S1120;在电量大于第一电量阈值时,进入S1108。When the power is greater than the first power threshold, enter S1120; when the power is greater than the first power threshold, enter S1108.

S1108:根据温度及学习或预设值电流进行限流动作。S1108: Perform current limiting action according to temperature and learning or preset value current.

该步骤与上述步骤S406相似或相同,此处不再赘述。This step is similar or identical to the above step S406, and will not be repeated here.

S1109:记录本次充电过程数据,并进行整合计算,更新重载参数。S1109: Record the data of this charging process, perform integrated calculations, and update the reload parameters.

其中,整合计算可以包括计算第一电池温度升高值,第一壳体温度升高值,第二电池温度升高值和/或第二壳体温度升高值,重载参数可以包括第一电流值和/或第二电流值。具体实现可以参照上述实施例,此处不再赘述。Wherein, the integrated calculation may include calculating a first battery temperature rise value, a first case temperature rise value, a second battery temperature rise value and/or a second case temperature rise value, and the heavy load parameter may include the first current value and/or second current value. For specific implementation, reference may be made to the foregoing embodiments, and details are not repeated here.

S1110:功耗是否小于第一阈值且大于第二阈值。在功耗小于第一阈值且大于第二阈值时,进入S1111,否则,进入S1115。S1110: Whether the power consumption is less than the first threshold and greater than the second threshold. When the power consumption is less than the first threshold and greater than the second threshold, go to S1111; otherwise, go to S1115.

S1111:电量是否小于或等于第二电量阈值。S1111: Whether the electric quantity is less than or equal to the second electric quantity threshold.

在电量大于第二电量阈值时,进入S1120;在电量小于或等于第二电量阈值时,进入S1112。When the power is greater than the second power threshold, enter S1120; when the power is less than or equal to the second power threshold, enter S1112.

S1112:温度是否小于或等于第三温度阈值。S1112: Whether the temperature is less than or equal to a third temperature threshold.

在温度大于第三温度阈值时,进入S1120;在温度小于或等于第三温度阈值时,进入S1113。When the temperature is greater than the third temperature threshold, enter S1120; when the temperature is less than or equal to the third temperature threshold, enter S1113.

S1113:根据温度及学习或预设值电流进行限流动作。S1113: Perform current limiting action according to temperature and learning or preset value current.

具体实现可以参照上述实施例,此处不再赘述。For specific implementation, reference may be made to the foregoing embodiments, and details are not repeated here.

S1114:记录本次充电过程数据,并进行整合计算,更新中载参数。S1114: Record the data of the current charging process, perform integrated calculations, and update the mid-load parameters.

其中,整合计算可以包括计算第三电池温度升高值,第三壳体温度升高值和/或第一充电时长,中载参数可以包括第五电流值。具体实现可以参照上述实施例,此处不再赘述。Wherein, the integrated calculation may include calculating a third battery temperature rise value, a third housing temperature rise value and/or a first charging duration, and the mid-load parameter may include a fifth current value. For specific implementation, reference may be made to the foregoing embodiments, and details are not repeated here.

S1115:功耗是否小于或等于第二阈值。在功耗小于或等于第二阈值时,进入S1116。S1115: Whether the power consumption is less than or equal to the second threshold. When the power consumption is less than or equal to the second threshold, go to S1116.

S1116:电量是否小于或等于第三电量阈值。S1116: Whether the electric quantity is less than or equal to the third electric quantity threshold.

在电量大于第三电量阈值时,进入S1120;在电量小于或等于第三电量阈值时,进入S1117。When the power is greater than the third power threshold, go to S1120; when the power is less than or equal to the third power threshold, go to S1117.

S1117:温度是否小于或等于第四温度阈值。S1117: Whether the temperature is less than or equal to the fourth temperature threshold.

在温度大于第四温度阈值时,进入S1120;在温度小于或等于第四温度阈值时,进入S1118。When the temperature is greater than the fourth temperature threshold, enter S1120; when the temperature is less than or equal to the fourth temperature threshold, enter S1118.

S1118:根据温度及学习或预设值电流进行限流动作。S1118: Perform current limiting action according to temperature and learning or preset value current.

具体实现可以参照上述实施例,此处不再赘述。For specific implementation, reference may be made to the foregoing embodiments, and details are not repeated here.

S1119:记录本次充电过程数据,并进行整合计算,更新轻载参数。S1119: Record the charging process data, perform integrated calculations, and update the light load parameters.

其中,整合计算可以包括计算第四电池温度升高值,第四壳体温度升高值和/或第二充电时长,轻载参数可以包括第六电流值。具体实现可以参照上述实施例,此处不再赘述。Wherein, the integrated calculation may include calculating a fourth battery temperature rise value, a fourth casing temperature rise value and/or a second charging duration, and the light load parameter may include a sixth current value. For specific implementation, reference may be made to the foregoing embodiments, and details are not repeated here.

S1120:常规充电模式。S1120: Normal charging mode.

常规充电模式可以理解为普通充电模式。The normal charging mode can be understood as an ordinary charging mode.

本申请实施例中,在充电过程中根据电子设备在不同负载场景下的温度和电量动态调整电子设备的充电电流,这样,电子设备在温度低且电量低时采用较大电流进行充电,可以较快提高电子设备的电量,有效降低低电量时的电量焦虑性,电子设备的温度上升时,则降低充电电流,减少电子设备的发热量,从而有效延缓电子设备的温度上升。在充电完成后根据充电过程数据更新对应负载场景的充电电流,可以优化各负载场景的充电电流。In the embodiment of the present application, during the charging process, the charging current of the electronic device is dynamically adjusted according to the temperature and power of the electronic device under different load scenarios. In this way, the electronic device is charged with a larger current when the temperature is low and the power is low. Quickly increase the power of electronic devices to effectively reduce power anxiety when the battery is low. When the temperature of electronic devices rises, the charging current is reduced to reduce the heat generation of electronic devices, thereby effectively delaying the temperature rise of electronic devices. After the charging is completed, the charging current corresponding to the load scenario is updated according to the charging process data, so that the charging current of each load scenario can be optimized.

上面结合图4-图11,对本申请实施例提供的方法进行了说明,下面对本申请实施例提供的执行上述方法的装置进行描述。如图12所示,图12为本申请实施例提供的一种充电装置的结构示意图,该充电装置可以是本申请实施例中的电子设备,也可以是电子设备内的芯片或芯片系统。The method provided by the embodiment of the present application is described above with reference to FIG. 4-FIG. 11 , and the device for performing the above method provided by the embodiment of the present application is described below. As shown in FIG. 12, FIG. 12 is a schematic structural diagram of a charging device provided in an embodiment of the present application. The charging device may be the electronic device in the embodiment of the present application, or may be a chip or a chip system in the electronic device.

如图12所示,充电装置1200可以用于通信设备、电路、硬件组件或者芯片中,该充电装置包括:显示单元1201以及处理单元1202。其中,显示单元1201用于支持第一界面和第二界面的显示,处理单元1202用于支持充电装置执行充电的步骤,例如,处理单元用于处理图4中的S401至S406的步骤。As shown in FIG. 12 , a charging device 1200 may be used in a communication device, a circuit, a hardware component or a chip, and the charging device includes: a display unit 1201 and a processing unit 1202 . Wherein, the display unit 1201 is used to support the display of the first interface and the second interface, and the processing unit 1202 is used to support the steps of charging performed by the charging device, for example, the processing unit is used to process steps S401 to S406 in FIG. 4 .

处理单元1202可以和显示单元1201集成在一起,处理单元1202和显示单元1201可能会发生通信。The processing unit 1202 may be integrated with the display unit 1201, and the processing unit 1202 and the display unit 1201 may communicate.

在一种可能的实现方式中,该充电装置还可以包括:存储单元1204。其中,存储单元1204可以包括一个或者多个存储器,存储器可以是一个或者多个设备、电路中用于存储程序或者数据的器件。In a possible implementation manner, the charging device may further include: a storage unit 1204 . Wherein, the storage unit 1204 may include one or more memories, and the memories may be devices for storing programs or data in one or more devices and circuits.

存储单元1204可以独立存在,通过通信总线与处理单元1202相连。存储单元1204也可以和处理单元1202集成在一起。The storage unit 1204 may exist independently, and is connected to the processing unit 1202 through a communication bus. The storage unit 1204 can also be integrated with the processing unit 1202 .

以充电装置可以是本申请实施例中的终端设备的芯片或芯片系统为例,存储单元1204可以存储终端设备的方法的计算机执行指令,以使处理单元1202执行上述实施例中终端设备的方法。存储单元1204可以是寄存器、缓存或者随机存取存储器(random accessmemory,RAM)等,存储单元1204可以和处理单元1202集成在一起。存储单元1204可以是只读存储器(read-only memory,ROM)或者可存储静态信息和指令的其他类型的静态存储设备,存储单元1204可以与处理单元1202相独立。Taking the charging device as an example of a chip or chip system of the terminal device in the embodiment of the present application, the storage unit 1204 may store computer-executable instructions of the method of the terminal device, so that the processing unit 1202 executes the method of the terminal device in the above embodiments. The storage unit 1204 may be a register, a cache, or a random access memory (random access memory, RAM), etc., and the storage unit 1204 may be integrated with the processing unit 1202 . The storage unit 1204 may be a read-only memory (read-only memory, ROM) or other types of static storage devices that can store static information and instructions, and the storage unit 1204 may be independent from the processing unit 1202.

在一种可能的实现方式中,充电装置还可以包括:通信单元1203。其中,通信单元1203用于支持充电装置与其它设备交互。示例性的,当该充电装置是电子设备时,该通信单元1203可以是通信接口或接口电路。当该充电装置是电子设备内的芯片或芯片系统时,该通信单元1203可以是通信接口。例如通信接口可以为输入/输出接口、管脚或电路等。In a possible implementation manner, the charging device may further include: a communication unit 1203 . Wherein, the communication unit 1203 is used to support the interaction between the charging device and other devices. Exemplarily, when the charging device is an electronic device, the communication unit 1203 may be a communication interface or an interface circuit. When the charging device is a chip or a chip system in an electronic device, the communication unit 1203 may be a communication interface. For example, the communication interface may be an input/output interface, a pin, or a circuit.

本实施例的装置对应地可用于执行上述方法实施例中执行的步骤,其实现原理和技术效果类似,此处不再赘述。The device in this embodiment can be correspondingly used to perform the steps performed in the above method embodiments, and its implementation principles and technical effects are similar, and will not be repeated here.

图13为本申请实施例提供的另一种电子设备的硬件结构示意图,如图13所示,该电子设备包括处理器1301,通信线路1304以及至少一个通信接口(图13中示例性的以通信接口1303为例进行说明)。FIG. 13 is a schematic diagram of the hardware structure of another electronic device provided by the embodiment of the present application. As shown in FIG. interface 1303 as an example for illustration).

处理器1301可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。The processor 1301 can be a general-purpose central processing unit (central processing unit, CPU), a microprocessor, a specific application integrated circuit (application-specific integrated circuit, ASIC), or one or more for controlling the execution of the application program program integrated circuit.

通信线路1304可包括在上述组件之间传送信息的电路。Communication lines 1304 may include circuitry that communicates information between the components described above.

通信接口1303,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线局域网(wireless local area networks,WLAN)等。The communication interface 1303 uses any device such as a transceiver for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (wireless local area networks, WLAN) and so on.

可能的,该电子设备还可以包括存储器1302。Possibly, the electronic device may also include a memory 1302 .

存储器1302可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compactdisc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路1304与处理器相连接。存储器也可以和处理器集成在一起。The memory 1302 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (random access memory, RAM) or other types that can store information and instructions It can also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage ( including compact discs, laser discs, optical discs, digital versatile discs, blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be stored by a computer Any other medium, but not limited to. The memory may exist independently and be connected to the processor through the communication line 1304 . Memory can also be integrated with the processor.

其中,存储器1302用于存储执行本申请方案的计算机执行指令,并由处理器1301来控制执行。处理器1301用于执行存储器1302中存储的计算机执行指令,从而实现本申请实施例所提供的方法。Wherein, the memory 1302 is used to store computer-executed instructions for implementing the solutions of the present application, and the execution is controlled by the processor 1301 . The processor 1301 is configured to execute computer-executed instructions stored in the memory 1302, so as to implement the method provided in the embodiment of the present application.

可能的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。Possibly, the computer-executed instructions in the embodiment of the present application may also be referred to as application program code, which is not specifically limited in the embodiment of the present application.

在具体实现中,作为一种实施例,处理1301可以包括一个或多个CPU,例如图13中的CPU0和CPU1。In a specific implementation, as an example, the processing 1301 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 13 .

在具体实现中,作为一种实施例,电子设备可以包括多个处理器,例如图13中的处理器1301和处理器1305。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an example, an electronic device may include multiple processors, for example, processor 1301 and processor 1305 in FIG. 13 . Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (eg, computer program instructions).

示例性的,图14为本申请实施例提供的一种芯片的结构示意图。芯片1400包括一个或两个以上(包括两个)处理器1402和通信接口1403。Exemplarily, FIG. 14 is a schematic structural diagram of a chip provided by an embodiment of the present application. The chip 1400 includes one or more than two (including two) processors 1402 and a communication interface 1403 .

在一些实施方式中,存储器1404存储了如下的元素:可执行模块或者数据结构,或者他们的子集,或者他们的扩展集。In some implementations, the memory 1404 stores the following elements: executable modules or data structures, or subsets thereof, or extensions thereof.

本申请实施例中,存储器1404可以包括只读存储器和随机存取存储器,并向处理器1402提供指令和数据。存储器1404的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。In this embodiment of the present application, the memory 1404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1402 . A part of the memory 1404 may also include a non-volatile random access memory (non-volatile random access memory, NVRAM).

本申请实施例中,存储器1404、通信接口1403以及处理器1402通过总线系统1401耦合在一起。其中,总线系统1401除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。为了便于描述,在图14中将各种总线都标为总线系统1401。In the embodiment of the present application, the memory 1404 , the communication interface 1403 and the processor 1402 are coupled together through the bus system 1401 . Wherein, the bus system 1401 may include not only a data bus, but also a power bus, a control bus, and a status signal bus. For ease of description, various buses are labeled as bus system 1401 in FIG. 14 .

上述本申请实施例描述的方法可以应用于处理器1402中,或者由处理器1402实现。处理器1402可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1402中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1402可以是通用处理器(例如,微处理器或常规处理器)、数字信号处理器(digitalsignal processing,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门、晶体管逻辑器件或分立硬件组件,处理器1402可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。The methods described in the foregoing embodiments of the present application may be applied to the processor 1402 or implemented by the processor 1402 . The processor 1402 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method may be implemented by an integrated logic circuit of hardware in the processor 1402 or instructions in the form of software. The above-mentioned processor 1402 can be a general-purpose processor (for example, a microprocessor or a conventional processor), a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), an off-the-shelf programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates, transistor logic devices or discrete hardware components, the processor 1402 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present invention.

结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。其中,软件模块可以位于随机存储器、只读存储器、可编程只读存储器或带电可擦写可编程存储器(electricallyerasable programmable read only memory,EEPROM)等本领域成熟的存储介质中。该存储介质位于存储器1404,处理器1402读取存储器1404中的信息,结合其硬件完成上述方法的步骤。The steps of the method disclosed in connection with the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. Wherein, the software module may be located in a mature storage medium in the field such as random access memory, read-only memory, programmable read-only memory, or electrically erasable programmable read only memory (EEPROM). The storage medium is located in the memory 1404, and the processor 1402 reads the information in the memory 1404, and completes the steps of the above method in combination with its hardware.

在上述实施例中,存储器存储的供处理器执行的指令可以以计算机程序产品的形式实现。其中,计算机程序产品可以是事先写入在存储器中,也可以是以软件形式下载并安装在存储器中。In the above embodiments, the instructions stored in the memory for execution by the processor may be implemented in the form of computer program products. Wherein, the computer program product may be written in the memory in advance, or may be downloaded and installed in the memory in the form of software.

计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。例如,可用介质可以包括磁性介质(例如,软盘、硬盘或磁带)、光介质(例如,数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application will be generated in whole or in part. The computer can be a general purpose computer, special purpose computer, computer network, or other programmable apparatus. Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g. Coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL) or wireless (such as infrared, wireless, microwave, etc.) transmission to another website site, computer, server or data center. Computer readable storage medium can be Any available media capable of being stored by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. For example, available media may include magnetic media (e.g., floppy disks, hard disks, or tapes), optical media (e.g., A digital versatile disc (digital versatile disc, DVD)), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD)), etc.

本申请实施例还提供了一种计算机可读存储介质。上述实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。计算机可读介质可以包括计算机存储介质和通信介质,还可以包括任何可以将计算机程序从一个地方传送到另一个地方的介质。存储介质可以是可由计算机访问的任何目标介质。The embodiment of the present application also provides a computer-readable storage medium. The methods described in the foregoing embodiments may be fully or partially implemented by software, hardware, firmware or any combination thereof. Computer-readable media may include computer storage media and communication media, and may include any medium that can transfer a computer program from one place to another. A storage media may be any target media that can be accessed by a computer.

作为一种可能的设计,计算机可读介质可以包括紧凑型光盘只读储存器(compactdisc read-only memory,CD-ROM)、RAM、ROM、EEPROM或其它光盘存储器;计算机可读介质可以包括磁盘存储器或其它磁盘存储设备。而且,任何连接线也可以被适当地称为计算机可读介质。例如,如果使用同轴电缆,光纤电缆,双绞线,DSL或无线技术(如红外,无线电和微波)从网站,服务器或其它远程源传输软件,则同轴电缆,光纤电缆,双绞线,DSL或诸如红外,无线电和微波之类的无线技术包括在介质的定义中。如本文所使用的磁盘和光盘包括光盘(CD),激光盘,光盘,数字通用光盘(digital versatile disc,DVD),软盘和蓝光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光光学地再现数据。As a possible design, the computer readable medium may include compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer readable medium may include magnetic disk storage or other disk storage devices. Also, any connected cord is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of medium. Disk and disc, as used herein, includes compact disc (CD), laser disc, compact disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Reproduce data.

上述的组合也应包括在计算机可读介质的范围内。以上,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。Combinations of the above should also be included within the scope of computer-readable media. The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present invention, and should cover all Within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (16)

1. A method of charging, the method comprising:
the electronic equipment starts charging;
acquiring power consumption of the electronic equipment in charging;
when the power consumption is greater than or equal to a first threshold, judging whether the temperature of the electronic equipment is greater than a first temperature threshold;
when the temperature of the electronic equipment is smaller than or equal to the first temperature threshold, judging whether the electric quantity of the electronic equipment is larger than a first electric quantity threshold or not;
when the electric quantity of the electronic equipment is larger than a first electric quantity threshold value, the electronic equipment is charged by adopting a lowest charging current value;
when the electric quantity of the electronic equipment is smaller than or equal to a first electric quantity threshold value, the electronic equipment is charged by adopting a first current value; and as the charging of the electronic equipment continues, when the temperature of the electronic equipment is greater than the first temperature threshold and less than or equal to a second temperature threshold, the electronic equipment charges by adopting a second current value, wherein the second current value is greater than the lowest charging current value and less than the first current value; and when the temperature of the electronic equipment is larger than the second temperature threshold value, the electronic equipment is charged by adopting the lowest charging current value.
2. The method of claim 1, wherein the obtaining the power consumption of the electronic device in charging comprises:
acquiring third current values received by the electronic equipment from a charger at N time points and fourth current values received by a battery of the electronic equipment, and obtaining N pairs of associated third current values and fourth current values, wherein N is a natural number;
and obtaining the power consumption according to the N pairs of third current values and fourth current values.
3. The method of claim 2, wherein the deriving the power consumption from the N pairs of third and fourth current values comprises:
respectively calculating the difference value of any pair of third current value and fourth current value in the N pairs of third current value and fourth current value to obtain N difference values;
and calculating the N difference values according to a preset algorithm to obtain the power consumption, wherein the preset algorithm comprises any one of the following steps: an averaging algorithm, a screening effective data first, an averaging algorithm and a median algorithm.
4. A method according to any one of claims 1-3, wherein the first current value and/or the second current value are each learned in advance, the method further comprising:
Respectively acquiring first process data when the electronic equipment is charged by the first current value and/or second process data when the electronic equipment is charged by the second current value, wherein the first process data comprises a first battery temperature rising value and/or a first shell temperature rising value, and the second process data comprises a second battery temperature rising value and/or a second shell temperature rising value;
updating the first current value to a greater value when the first battery temperature increase value is less than or equal to a first temperature increase threshold and/or the first housing temperature increase value is less than or equal to a second temperature increase threshold; or, when the first battery temperature increase value is greater than the first temperature increase threshold value, and/or the first case temperature increase value is greater than the second temperature increase threshold value, updating the first current value to a smaller value;
and/or the number of the groups of groups,
updating the second current value to a greater value when the second battery temperature increase value is less than or equal to a third temperature increase threshold and/or the second housing temperature increase value is less than or equal to a fourth temperature increase threshold; alternatively, the second current value is updated to a smaller value when the second battery temperature increase value is greater than the third temperature increase threshold value and/or the second case temperature increase value is greater than the fourth temperature increase threshold value.
5. The method of any one of claims 1-4, further comprising:
when the power consumption is smaller than the first threshold and larger than a second threshold, judging whether the electric quantity of the electronic equipment is larger than a second electric quantity threshold or not;
when the electric quantity of the electronic equipment is smaller than or equal to a second electric quantity threshold value, judging whether the temperature of the electronic equipment is larger than a third temperature threshold value or not;
when the temperature of the electronic equipment is smaller than or equal to the third temperature threshold value, the electronic equipment is charged by adopting a fifth current value, wherein the fifth current value is learned in advance;
and when the temperature of the electronic equipment is larger than the third temperature threshold value, the electronic equipment is charged by adopting the lowest charging current value.
6. The method as recited in claim 5, further comprising:
and when the electric quantity of the electronic equipment is larger than a second electric quantity threshold value, the electronic equipment is charged by adopting the lowest charging current value.
7. The method according to claim 5 or 6, characterized in that the method further comprises:
acquiring third process data when the electronic equipment is charged by adopting the fifth current value, wherein the third process data comprises a third battery temperature rise value, a third shell temperature rise value and/or a first charging duration;
When the third battery temperature rise value is less than or equal to a fifth temperature rise threshold, the third housing temperature rise value is less than or equal to a sixth temperature rise threshold, and/or the first charging time length is greater than a first time length threshold, updating the fifth current value to a greater value; alternatively, the fifth current value is updated to a smaller value when the third battery temperature increase value is greater than the fifth temperature increase threshold, and/or the third case temperature increase value is greater than the sixth temperature increase threshold.
8. The method of any one of claims 1-7, further comprising:
when the power consumption is smaller than or equal to a second threshold value, judging whether the electric quantity of the electronic equipment is larger than a third electric quantity threshold value or not;
when the electric quantity of the electronic equipment is smaller than or equal to a third electric quantity threshold value, judging whether the temperature of the electronic equipment is larger than a fourth temperature threshold value or not;
when the temperature of the electronic equipment is smaller than or equal to the fourth temperature threshold value, the electronic equipment is charged by adopting a sixth current value, wherein the sixth current value is learned in advance;
and when the temperature of the electronic equipment is larger than the fourth temperature threshold value, the electronic equipment is charged by adopting the lowest charging current value.
9. The method as recited in claim 8, further comprising:
and when the electric quantity of the electronic equipment is larger than a third electric quantity threshold value, the electronic equipment is charged by adopting the lowest charging current value.
10. The method according to claim 8 or 9, characterized in that the method further comprises:
acquiring fourth process data when the electronic equipment is charged by adopting the sixth current value, wherein the fourth process data comprises a fourth battery temperature rise value, a fourth shell temperature rise value and/or a second charging duration;
when the temperature rise value of the fourth battery is smaller than or equal to a seventh temperature rise threshold, the temperature rise value of the fourth shell is smaller than or equal to an eighth temperature rise threshold, and/or the second charging time length is larger than a second time length threshold, the sixth current value is updated to be a larger value; alternatively, the sixth current value is updated to a smaller value when the fourth battery temperature increase value is greater than the seventh temperature increase threshold and/or the fourth case temperature increase value is greater than the eighth temperature increase threshold.
11. The method of any of claims 1-10, wherein prior to the electronic device being charged with the first current value, the method further comprises:
Displaying a first interface, wherein the first interface comprises notification information, a first button and a second button, and the notification information is used for prompting a user whether the electronic equipment enters an intelligent charging regulation mode or not;
responding to the triggering operation of the first button, and enabling the electronic equipment to enter an intelligent charging regulation mode;
or, in response to a trigger operation of the second button, the electronic device charges with the lowest charging current value.
12. The method of claim 11, wherein during the charging of the electronic device with the first current value, the method further comprises:
displaying a second interface in response to a pull-down operation of a user, wherein the second interface comprises the notification information and a third button;
and responding to the triggering operation of the third button, and charging the electronic equipment by adopting the lowest charging current value.
13. The method of any of claims 1-12, wherein the determining whether the temperature of the electronic device is greater than a first temperature threshold when the power consumption is greater than or equal to a first threshold further comprises, prior to:
judging whether the electronic equipment is in a bright screen state or not;
When the electronic equipment is not in a bright screen state, the electronic equipment is charged by adopting the lowest charging current value;
and when the power consumption is greater than or equal to a first threshold, determining whether the temperature of the electronic device is greater than a first temperature threshold includes: and when the electronic equipment is in a bright screen state and the power consumption is greater than or equal to a first threshold value, judging whether the temperature of the electronic equipment is greater than a first temperature threshold value.
14. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program is caused by the processor to perform the method of any of claims 1-13.
15. A computer readable storage medium storing a computer program, which when executed by a processor causes a computer to perform the method of any one of claims 1-13.
16. A computer program product comprising a computer program which, when run, causes a computer to perform the method of any of claims 1-13.
CN202210751689.6A 2022-06-29 2022-06-29 Charging method, device and storage medium Active CN116094083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210751689.6A CN116094083B (en) 2022-06-29 2022-06-29 Charging method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210751689.6A CN116094083B (en) 2022-06-29 2022-06-29 Charging method, device and storage medium

Publications (2)

Publication Number Publication Date
CN116094083A true CN116094083A (en) 2023-05-09
CN116094083B CN116094083B (en) 2024-03-12

Family

ID=86205133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210751689.6A Active CN116094083B (en) 2022-06-29 2022-06-29 Charging method, device and storage medium

Country Status (1)

Country Link
CN (1) CN116094083B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116885826A (en) * 2023-09-06 2023-10-13 荣耀终端有限公司 Charging method, electronic device, and computer-readable storage medium
CN117411148A (en) * 2023-12-12 2024-01-16 荣耀终端有限公司 Charging method, electronic device and storage medium
CN118508544A (en) * 2023-12-29 2024-08-16 荣耀终端有限公司 Charging control method and electronic equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105978084A (en) * 2016-06-16 2016-09-28 青岛海信移动通信技术股份有限公司 Method and device for charging electronic equipment
CN106549460A (en) * 2016-12-29 2017-03-29 上海掌门科技有限公司 A kind of electronic equipment wireless charging temperature-controlled process and system
JP6140797B1 (en) * 2015-12-10 2017-05-31 京セラ株式会社 Electronic device, control device, control program, and charging current control method
CN107221984A (en) * 2017-07-06 2017-09-29 广东欧珀移动通信有限公司 Temperature rise control method, device and storage medium when terminal device and its charging
WO2017185686A1 (en) * 2016-04-27 2017-11-02 乐视控股(北京)有限公司 Charging power adjusting method and apparatus, and electronic device
CN107423199A (en) * 2017-07-14 2017-12-01 广东欧珀移动通信有限公司 Electronic equipment, temperature rise control method, control device, and storage medium
CN108429309A (en) * 2018-03-13 2018-08-21 奇酷互联网络科技(深圳)有限公司 Charge control method, device, terminal and readable storage medium storing program for executing
CN109412240A (en) * 2018-12-20 2019-03-01 青岛海信移动通信技术股份有限公司 A kind of method and apparatus adjusting charging current
CN111293749A (en) * 2020-02-28 2020-06-16 Oppo广东移动通信有限公司 Charging method, charging device, terminal equipment, mobile power supply and storage medium
KR20210007698A (en) * 2019-07-12 2021-01-20 삼성전자주식회사 Electronic device including battery and method for controlling charging of battery thereof
CN113904408A (en) * 2021-10-10 2022-01-07 深圳市理德铭科技股份有限公司 A control method, terminal and storage medium of an intelligent wireless charger
CN114520528A (en) * 2020-11-20 2022-05-20 华为技术有限公司 Charging control method and device, terminal equipment and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6140797B1 (en) * 2015-12-10 2017-05-31 京セラ株式会社 Electronic device, control device, control program, and charging current control method
WO2017185686A1 (en) * 2016-04-27 2017-11-02 乐视控股(北京)有限公司 Charging power adjusting method and apparatus, and electronic device
CN105978084A (en) * 2016-06-16 2016-09-28 青岛海信移动通信技术股份有限公司 Method and device for charging electronic equipment
CN106549460A (en) * 2016-12-29 2017-03-29 上海掌门科技有限公司 A kind of electronic equipment wireless charging temperature-controlled process and system
CN107221984A (en) * 2017-07-06 2017-09-29 广东欧珀移动通信有限公司 Temperature rise control method, device and storage medium when terminal device and its charging
CN107423199A (en) * 2017-07-14 2017-12-01 广东欧珀移动通信有限公司 Electronic equipment, temperature rise control method, control device, and storage medium
CN108429309A (en) * 2018-03-13 2018-08-21 奇酷互联网络科技(深圳)有限公司 Charge control method, device, terminal and readable storage medium storing program for executing
CN109412240A (en) * 2018-12-20 2019-03-01 青岛海信移动通信技术股份有限公司 A kind of method and apparatus adjusting charging current
KR20210007698A (en) * 2019-07-12 2021-01-20 삼성전자주식회사 Electronic device including battery and method for controlling charging of battery thereof
CN111293749A (en) * 2020-02-28 2020-06-16 Oppo广东移动通信有限公司 Charging method, charging device, terminal equipment, mobile power supply and storage medium
CN114520528A (en) * 2020-11-20 2022-05-20 华为技术有限公司 Charging control method and device, terminal equipment and storage medium
CN113904408A (en) * 2021-10-10 2022-01-07 深圳市理德铭科技股份有限公司 A control method, terminal and storage medium of an intelligent wireless charger

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116885826A (en) * 2023-09-06 2023-10-13 荣耀终端有限公司 Charging method, electronic device, and computer-readable storage medium
CN116885826B (en) * 2023-09-06 2024-07-26 荣耀终端有限公司 Charging method, electronic device and computer readable storage medium
CN117411148A (en) * 2023-12-12 2024-01-16 荣耀终端有限公司 Charging method, electronic device and storage medium
CN117411148B (en) * 2023-12-12 2024-05-03 荣耀终端有限公司 Charging method, electronic equipment and storage medium
CN118508544A (en) * 2023-12-29 2024-08-16 荣耀终端有限公司 Charging control method and electronic equipment
CN118508544B (en) * 2023-12-29 2025-08-22 荣耀终端股份有限公司 Charging control method and electronic device

Also Published As

Publication number Publication date
CN116094083B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
JP7252331B2 (en) Optional Terminal Charging Methods, Graphical User Interfaces, and Electronic Devices
CN116094083B (en) Charging method, device and storage medium
CN113224804B (en) Charging control method and electronic device
CN116048933B (en) A fluency detection method
CN105320402A (en) Method of managing data and electronic device for processing the same
WO2023207671A1 (en) Battery level state determination method
CN116914894A (en) Adjustment method of cut-off voltage, electronic equipment and readable storage medium
CN115016921B (en) Resource scheduling method, device and storage medium
US20230376459A1 (en) File Generation Method and Electronic Device
CN117707323B (en) Control method of duration, electronic equipment and readable storage medium
CN116885826B (en) Charging method, electronic device and computer readable storage medium
CN116365670B (en) Charging control method, device and storage medium
CN116996765B (en) Control chip management method, electronic device, and computer-readable storage medium
CN116196621B (en) Application processing method and related device
CN117707716B (en) Thread scheduling method, electronic device and computer readable storage medium
CN117713266A (en) A control method, electronic device and storage medium
CN116780683A (en) Power supply control method and electronic equipment
CN118819795A (en) Rendering load scheduling method and electronic device
CN114879896A (en) A freezing screen processing method, electronic device and storage medium
CN115549231A (en) Battery charging and discharging control method and device, terminal equipment and storage medium
CN116707048B (en) A charging control method and related device based on OTG
CN116052609B (en) Voltage control method, electronic device and readable storage medium
CN113904399B (en) Charging method and terminal device
CN116501534B (en) Charging abnormality management method and related device
CN116709339B (en) Detection method of application notification message and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address
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