Charging method, electronic device, storage medium and chip system

By automatically adjusting the charging current according to the target temperature indicated by the user, and combining MPC or PID algorithms to control the overall casing temperature, the contradiction between temperature and speed in the charging mode is resolved, improving charging safety and user experience.

CN119921443BActive Publication Date: 2025-11-04HONOR DEVICE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510397719.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-11-04
Estimated Expiration
2045-04-01

AI Technical Summary

Technical Problem

Existing charging modes cannot simultaneously meet users' requirements for temperature and charging speed. In normal charging mode, the temperature rise is small but the charging speed is slow, while in fast charging mode, the temperature rise is large but the user experience is poor.

Method used

The electronic device automatically adjusts the charging current according to the target temperature indicated by the user. It predicts and controls the overall casing temperature through MPC or PID algorithms, adjusts the charging current to meet the temperature and charging speed requirements, and provides an intuitive user interface and visual feedback.

Benefits of technology

It achieves improved charging speed, reduced charging safety issues, and enhanced user experience while meeting user temperature requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119921443B_ABST
    Figure CN119921443B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a charging method, an electronic device, a storage medium and a chip system, and relate to the technical field of terminals. The method comprises: in the case where a target temperature is a first value, in response to a user operation for indicating adjustment of the target temperature, adjusting the target temperature of the electronic device from the first value to a second value; adjusting a first current value to a second current value according to the second value, the first current value being a value of a charging current corresponding to the first value, and the second current value being a value of a charging current corresponding to the second value; wherein, in the case where the first value is greater than the second value, the first current value is greater than the second current value; or, in the case where the second value is greater than the first value, the second current value is greater than the first current value. In this way, the charging current can be automatically adjusted according to the target temperature indicated by the user, so that the electronic device can meet the temperature requirement of the whole shell of the electronic device and the requirement of the charging speed of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to charging methods, electronic devices, storage media, and chip systems. Background Technology

[0002] Mobile phones, tablets, and other electronic devices are typically equipped with batteries that provide power to maintain their operation. When the battery is low, the device can be charged wirelessly or via wired charging to ensure normal operation.

[0003] Currently, electronic devices can be charged using either a normal charging mode or a fast charging mode. In normal charging mode, the charging power of the electronic device is lower, and the temperature rise (also known as temperature increase) is smaller; in fast charging mode, the charging power is higher, but the temperature rise of the electronic device is larger.

[0004] However, neither of these two charging modes may meet the user's requirements for temperature and charging speed. Summary of the Invention

[0005] This application provides a charging method, an electronic device, a storage medium, and a chip system, applicable to the field of terminal technology. The electronic device can automatically adjust the charging current according to the target charging temperature, maximizing the charging current at that target temperature, thereby meeting the user's requirements for both temperature and charging speed.

[0006] In a first aspect, embodiments of this application propose a charging method. The method includes: when the target temperature is a first value, in response to a user operation instructing the adjustment of the target temperature, adjusting the target temperature of the electronic device from the first value to a second value; adjusting a first current value to a second current value according to the second value, wherein the first current value is the value of the charging current corresponding to the first value, and the second current value is the value of the charging current corresponding to the second value; wherein, when the first value is greater than the second value, the first current value is greater than the second current value; or, when the second value is greater than the first value, the second current value is greater than the first current value.

[0007] It is understandable that the first value can be the target temperature value determined when the target temperature was last adjusted, or it can be the default value, such as the maximum value of the target temperature or the target temperature value determined in the charging settings interface below. No specific limitation is made here.

[0008] In this way, the charging current can be flexibly adjusted according to the target temperature indicated by the user to meet the user's requirements for the temperature and charging speed of electronic devices.

[0009] In one possible implementation, during the constant current charging phase, if the first value is greater than the second value, the first current value is greater than the second current value; or, during the constant current charging phase, if the second value is less than the first value, the second current value is greater than the first current value.

[0010] In this way, the charging current value is adjusted according to the second value during the constant current charging stage.

[0011] In one possible implementation, a first interface is displayed, which includes: a first control; the first control is used to adjust the target temperature; and the user operation is an operation on the first control.

[0012] The first interface can be any interface with an adjustable target temperature (or target temperature rise), such as the charging interface or charging settings interface mentioned below; no specific limitations are made here. The first control can be any interface with an adjustable target temperature (or target temperature rise), such as the charging bubble or progress bar mentioned below; no specific limitations are made here. User operations can be clicking, swiping, or any type of operation; no specific limitations are made here.

[0013] This provides an intuitive user interface, allowing users to adjust the target temperature using controls.

[0014] In one possible implementation, the user action is a sliding action; the second value is determined based on the first value and the displacement of the sliding action in the first direction.

[0015] The first direction can be either vertically upward or horizontally to the right; there is no specific limitation here. This allows for real-time adjustment of the target temperature following the swipe operation, responding instantly to user input and improving the user experience.

[0016] In one possible implementation, the third value corresponds to the displacement of the sliding operation in the first direction; if the sum of the first value and the third value is greater than or equal to the first preset value, the second value is the first preset value; if the sum of the first value and the third value is less than or equal to the second preset value, the second value is the second preset value; if the sum of the first value and the third value is less than the first preset value but greater than the second preset value, the second value is the sum of the first value and the third value.

[0017] The first preset value can be the target temperature of the electronic device in the fast charging mode, such as 43 degrees, 47 degrees, 48 ​​degrees, etc.; the second preset value can be the target temperature in the fast charging mode, such as 27 degrees, 43 degrees, 45 degrees, etc. No specific limitation is made here.

[0018] By setting the target temperature within a certain range, we can reduce the occurrence of excessively high or low target temperatures, thereby reducing charging safety issues caused by excessively high or low target temperatures.

[0019] In one possible implementation, the appearance of the first control changes according to the target temperature indicated by the user's operation.

[0020] The appearance includes, but is not limited to: outline, size, background color, fill color, etc. In this way, the appearance of the first control indicates the target temperature, providing intuitive visual feedback and making it easier for users to understand and adjust the target temperature.

[0021] In one possible implementation, before displaying the first interface, the method further includes: displaying a second interface in response to an operation for indicating that a charging device is connected, the second interface indicating charging in a first charging mode; displaying the first interface includes: displaying the first interface in response to a first operation on the second interface: the first interface indicating charging in a second charging mode.

[0022] The second interface corresponds to the charging interface described below for fast charging. The first charging mode corresponds to the fast charging mode described below; the second charging mode corresponds to the ultra-fast charging mode described below. The first operation can be any operation used to indicate switching charging modes, such as long-pressing the charging bubble, swiping, etc., without specific limitations here.

[0023] In one possible implementation, the second current value is determined based on a second value and the current overall case temperature of the electronic device.

[0024] The embodiments of this application can determine the second current value based on the second value and the current overall case temperature of the electronic device using an MPC algorithm, a PID algorithm, or any other method. No specific limitations are imposed here.

[0025] In one possible implementation, the method further includes: predicting the overall casing temperature of the electronic device after charging at each charging current value for a period of time based on pre-set charging current values ​​and the current casing temperature of the electronic device; obtaining a second current value based on a first constraint, a second constraint, and the overall casing temperature of the electronic device after charging at each charging current for a period of time; the first constraint includes: the overall casing temperature of the electronic device after a period of time is less than or equal to the second value; the second constraint includes: the charging current value corresponding to the case where the electronic device has the maximum charging capacity within a period of time, provided that the first constraint is met.

[0026] In this way, the temperature of electronic devices can be predicted over a period of time, and the charging current value can be obtained through temperature limits and charging capacity limits, so that electronic devices can meet the user's requirements for fast charging while meeting the user's temperature requirements.

[0027] In one possible implementation, the method further includes obtaining a second current value based on the temperature error between the second value and the current overall case temperature of the electronic device.

[0028] The charging current is adjusted based on the error between the target temperature and the current casing temperature of the electronic device. This temperature error feedback control method allows the casing temperature of the electronic device to be precisely controlled within a certain range of the target temperature, providing a fast response.

[0029] In one possible implementation, the second current value is less than or equal to the first threshold and / or the second current value is greater than or equal to the second threshold, and the second threshold is less than the first threshold.

[0030] The first threshold can correspond to the upper limit of current mentioned below; the second threshold can correspond to the lower limit of current mentioned below, and no specific limitation is made here. In this way, limiting the maximum charging current can reduce the possibility of excessive charging current, thereby reducing problems such as overheating of the battery, shortened battery life, and battery swelling caused by excessive current, and improving charging safety. Furthermore, limiting the minimum charging current can reduce the possibility of charging less than power consumption, and reduce the occurrence of power loss in electronic devices.

[0031] Secondly, embodiments of this application provide a charging device, which can be an electronic device, or a chip or chip system within an electronic device. The charging device may include a display unit and a processing unit. When the charging device is an electronic device, the display unit may be a display screen. The display unit is used to perform display steps to enable the electronic device to implement a charging device method described in the first aspect or any possible implementation of the first aspect. When the charging device is an electronic device, the processing unit may be a processor. The charging device may further include a storage unit, which may be a memory. The storage unit is used to store instructions, and the processing unit executes the instructions stored in the storage unit to enable the electronic device to implement a charging device method described in the first aspect or any possible implementation of the first aspect. When the charging device is a chip or chip system within an electronic device, the processing unit may be a processor. The processing unit executes the instructions stored in the storage unit to enable the electronic device to implement a charging device method described in the first aspect or any possible implementation of the first aspect. The storage unit may be a storage unit within the chip (e.g., a register, cache, etc.), or a storage unit located outside the chip within the electronic device (e.g., a read-only memory, random access memory, etc.).

[0032] For example, a display unit is used to display an interface. This interface can be a first interface or a second interface.

[0033] The processing unit is used to perform steps such as adjusting the target temperature and adjusting the charging current according to the target temperature.

[0034] For example, the processing unit is configured to adjust the target temperature of the electronic device from the first value to a second value in response to a user operation instructing the user to adjust the target temperature, provided that the target temperature is a first value. The processing unit is further configured to adjust a first current value to a second current value based on the second value, wherein the first current value is the value of the charging current corresponding to the first value, and the second current value is the value of the charging current corresponding to the second value; wherein, if the first value is greater than the second value, the first current value is greater than the second current value; or, if the second value is greater than the first value, the second current value is greater than the first current value.

[0035] In one possible implementation, during the constant current charging phase, if the first value is greater than the second value, the first current value is greater than the second current value; or, during the constant current charging phase, if the second value is less than the first value, the second current value is greater than the first current value.

[0036] In one possible implementation, the display unit is used to display a first interface, which includes: a first control; the first control is used to adjust the target temperature; and the user operation is an operation on the first control.

[0037] In one possible implementation, the user action is a sliding action; the second value is determined based on the first value and the displacement of the sliding action in the first direction.

[0038] In one possible implementation, the third value corresponds to the displacement of the sliding operation in the first direction; if the sum of the first value and the third value is greater than or equal to the first preset value, the second value is the first preset value; if the sum of the first value and the third value is less than or equal to the second preset value, the second value is the second preset value; if the sum of the first value and the third value is less than the first preset value but greater than the second preset value, the second value is the sum of the first value and the third value.

[0039] In one possible implementation, the appearance of the first control changes according to the target temperature indicated by the user's operation.

[0040] In one possible implementation, before displaying the first interface, the processing unit is further configured to respond to an operation for instructing the charging device to be connected; the display unit is further configured to display a second interface for instructing charging according to a first charging mode; the processing unit is specifically configured to respond to a first operation on the second interface: the first interface is used to instruct charging according to a second charging mode.

[0041] In one possible implementation, the second current value is determined based on a second value and the current overall case temperature of the electronic device.

[0042] The embodiments of this application can determine the second current value based on the second value and the current overall case temperature of the electronic device using an MPC algorithm, a PID algorithm, or any other method. No specific limitations are imposed here.

[0043] In one possible implementation, the processing unit is further configured to predict the overall casing temperature of the electronic device after charging at each charging current value for a period of time, based on pre-set charging current values ​​and the current overall casing temperature of the electronic device; the processing unit is further configured to obtain a second current value based on a first constraint, a second constraint, and the overall casing temperature of the electronic device after charging at each charging current for a period of time; the first constraint includes: the overall casing temperature of the electronic device after a period of time is less than or equal to the second value; the second constraint includes: the charging current value corresponding to the case where the electronic device has the maximum charging capacity within a period of time, provided that the first constraint is met.

[0044] In this way, the temperature of electronic devices can be predicted over a period of time, and the charging current value can be obtained through temperature limits and charging capacity limits, so that electronic devices can meet the user's requirements for fast charging while meeting the user's temperature requirements.

[0045] In one possible implementation, the processing unit is further configured to obtain a second current value based on the temperature error between the second value and the current overall case temperature of the electronic device.

[0046] In one possible implementation, the second current value is less than or equal to the first threshold and / or the second current value is greater than or equal to the second threshold, and the second threshold is less than the first threshold.

[0047] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory for storing code instructions, and the processor for running the code instructions to perform the methods described in the first aspect or any possible implementation of the first aspect.

[0048] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0049] Fifthly, embodiments of this application provide a computer program product including a computer program, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0050] Sixthly, this application provides a chip or chip system including at least one processor and a communication interface. The communication interface and the at least one processor are interconnected via a circuit. The at least one processor is used to run computer programs or instructions to perform the methods described in the first aspect or any possible implementation of the first aspect. The communication interface in the chip can be an input / output interface, pins, or circuits, etc.

[0051] In one possible implementation, the chip or chip system described above in this application further includes at least one memory storing instructions. The memory can be an internal storage unit of the chip, such as a register or cache, or it can be a storage unit of the chip itself (e.g., read-only memory, random access memory, etc.).

[0052] It should be understood that the second to sixth aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation are similar, and will not be repeated here. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of an interface for switching charging modes in a possible design.

[0054] Figure 2 A schematic diagram of an interface involved in temperature rise regulation provided in an embodiment of this application;

[0055] Figure 3 A schematic diagram of an interface involved in temperature rise regulation provided in an embodiment of this application;

[0056] Figure 4 This is a schematic diagram of the software structure of an electronic device according to an embodiment of this application;

[0057] Figure 5 A schematic flowchart of a charging method provided in an embodiment of this application;

[0058] Figure 6 A schematic flowchart of a charging method provided in an embodiment of this application;

[0059] Figure 7 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0060] 1. Normal charging mode

[0061] Normal charging mode is a charging method that provides power to electronic devices. In normal charging mode, electronic devices can use standard voltage and current parameters to charge the battery at a relatively low power.

[0062] In this embodiment, the normal charging mode may include slow charging and fast charging. The power of slow charging is typically less than that of fast charging. The voltage and current of slow charging differ from those of fast charging.

[0063] Slow charging can be understood as charging according to the Battery Charging Protocol version 1.2 (BC1.2). For example, the voltage for slow charging can be 5V, and the charging current can be 500 mA, 1 A, 1.5A, or 2A.

[0064] Fast charging can be understood as charging according to fast charging protocols such as Super Charge Protocol (SCP), Quick Charge, and USB Power Delivery (USB PD). Taking the SCP protocol as an example, the voltage and current for fast charging can be: 4.5V 5A, 5V 4.5A, 10V 2.25A, 10V 4A, 11V 6A, or 20V 5A, etc., without specific limitations here.

[0065] 2. Fast charging mode

[0066] Fast charging is a power transfer method. In fast charging, electronic devices can shorten charging time by increasing the charging current and / or voltage. This mode typically relies on specific fast charging protocols (e.g., SCP, PD, etc.) and technologies to deliver higher power to the battery in a short time to meet the user's need for rapid power replenishment. The power of fast charging is generally greater than that of fast charging. This can also be understood as fast charging having a higher voltage and current than fast charging. In some embodiments, fast charging may also be referred to as turbo charging. No specific limitation is made here.

[0067] 3. Charging curve

[0068] A charging profile is a predetermined path or pattern of changes in battery voltage, current, or temperature over time during the battery charging process.

[0069] Understandably, the charging process of electronic devices typically includes two phases: constant current (CC) and constant voltage (CV).

[0070] At the start of charging, electronic devices typically enter a constant current (or constant current) charging phase (where the charging current remains constant). The charging curve during the constant current charging phase shows the battery voltage gradually increasing.

[0071] For example, when the battery voltage reaches a set maximum value (typically close to, but may exceed, the battery's rated voltage), the electronic device switches from constant current charging to constant voltage (or simply constant voltage) charging. During this phase, the battery voltage typically remains constant while the charging current gradually decreases. The charging curve for the constant voltage phase shows the current gradually decreasing over time until the battery is fully charged.

[0072] 4. Overall casing temperature of electronic devices (which can be simply referred to as overall casing temperature)

[0073] The overall casing temperature of an electronic device can be obtained by fitting the temperatures of multiple measurement points on the electronic device using a preset fitting method. For example, the overall casing temperature of an electronic device can be the average of the temperatures of multiple measurement points on the electronic device. Alternatively, the overall casing temperature of an electronic device can be the maximum value of the temperatures of multiple measurement points on the electronic device. No specific limitation is made here.

[0074] For example, multiple measurement points on an electronic device may include at least one measurement point located around a heat source on the electronic device and at least one measurement point located away from the heat source. Charging circuits, charging chips, and system-on-chips (SoCs) on the electronic device are all heat sources. The temperature of the measurement point can be determined based on the resistance value of a thermistor deployed at the measurement point. The thermistor can be a negative temperature coefficient (NTC) thermistor.

[0075] For example, the temperature at the measurement point can be calculated from the resistance value of the thermistor at the measurement point. The temperature T at the measurement point satisfies the formula: T = 1 / [ln(R)] T / R0) / M+1 / T0]. Where R T R0 is the resistance value of the thermistor at the measurement point. R0 is the resistance value of the thermistor at the measurement point when the temperature is T0. M is a constant, and M is positively correlated with the temperature coefficient of the thermistor. T0 = 273.15 + 25.

[0076] Alternatively, the temperature at the measurement point can also be determined based on the resistance-temperature correspondence pre-stored in the electronic device, where the temperature corresponding to the resistance value of the thermistor at the measurement point is used as the temperature of the measurement point.

[0077] The overall casing temperature of electronic devices can also be calculated using methods such as the thermal model described in the following embodiments, without specific limitations here.

[0078] 5. Other terms

[0079] In the embodiments of this application, terms such as "first" and "second" are used to distinguish identical or similar items with essentially the same function and purpose. For example, "first chip" and "second chip" are used only to distinguish different chips and do not limit their order. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that "first" and "second" do not necessarily imply that they are different. The embodiments of this application use "equal to" to implement one judgment situation as an example for explanation; the equal to situation can also correspond to another judgment situation. No specific limitations are made here.

[0080] It should be noted that, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0081] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in 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 of a, b, or c can represent: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.

[0082] 6. Electronic equipment

[0083] The electronic devices in this application embodiment may include handheld devices with charging functions, vehicle-mounted devices, etc. For example, some electronic devices include: mobile phones, tablets, PDAs, laptops, mobile internet devices (MIDs), wearable devices (e.g., smartwatches, smart glasses, smart bracelets, or smart jewelry), virtual reality (VR) devices, augmented reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDAs), handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, in-vehicle devices, and the Internet of Things (IoT). Terminal devices in IoT systems, terminal devices in 5G networks, or terminal devices in future public land mobile networks (PLMNs) are not limited to this category in the embodiments of this application.

[0084] The electronic devices in the embodiments of this application may also be referred to as: terminal equipment, user equipment (UE), mobile station (MS), mobile terminal (MT), access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication equipment, user agent, or user device, etc.

[0085] In this embodiment, the electronic device or various network devices include a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on top of the operating system layer. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory (also called main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as Linux, Unix, Android, iOS, or Windows. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software.

[0086] Currently, electronic devices support both fast charging and super-fast charging modes. When charging, users can control the device to switch charging modes according to their needs. For example, if a user wants fast charging, they can control the device to charge in super-fast charging mode; if the user feels the device is too hot, they can control it to charge in fast charging mode.

[0087] For example, Figure 1 This is a schematic diagram of an interface for switching charging modes in a possible design. For example... Figure 1 As shown, the charging mode switching is triggered by a charging bubble as an example.

[0088] When an electronic device is connected to a charging device, it can be accessed from any user interface. Figure 1 The charging interface 1a is shown in Figure 'a'. The charging interface 1a may include: a charging bubble 101 and a switching prompt 102.

[0089] It should be understood that the charging device in this application embodiment can be connected via a wired method, such as connecting the electronic device and the charging device via a charging cable, or via a wireless method, such as placing the electronic device on a wireless charging device (e.g., a charging dock, a mobile phone with wireless charging capability, etc.). No specific limitation is made here.

[0090] The charging bubble 101 is used to indicate that charging is in progress. The charging bubble 101 may also display a power level indicator. The power level indicator is used to indicate the battery level of the electronic device. The power level indicator can be in percentage form (e.g., 86.02%) or any other arbitrary form, without specific limitation herein.

[0091] The switching prompt 102 is used to prompt the user to switch charging modes. For example, the switching prompt 102 could be "Long press the center of the screen to activate fast charging. The device temperature will increase."

[0092] The electronic device can respond to a user's long press operation on the charging bubble 101, switching the charging mode to fast charging mode and displaying... Figure 1 The charging interface 1b is shown in Figure b. The charging interface 1b includes: a charging bubble 103 and an activation prompt 104.

[0093] The charging bubble 103 is used to indicate that charging is in progress. The charging bubble 103 may also display a power level indicator. The power level indicator is used to indicate the battery level of the electronic device. The power level indicator can be in percentage form (e.g., 88.30%) or any other form, without specific limitation here.

[0094] In some embodiments, the appearance of charging bubble 103 differs from that of charging bubble 101; for example, the size, outline, and color of the charging bubble are different. This allows the user to distinguish the charging mode by the charging bubble. For example,... Figure 1 As shown, the size of the charging bubble 103 can be larger than the size of the charging bubble 101.

[0095] The prompt 104 is used to notify the user that fast charging mode is enabled. For example, prompt 104 could be "Fast charging is enabled, the device temperature will rise".

[0096] In some embodiments, the electronic device may switch the charging mode to fast charging mode in response to a user's long press operation on the charging bubble 103.

[0097] However, users may find that electronic devices get hotter in ultra-fast charging mode, while charging is slower in fast charging mode. This results in a poor user experience for electronic devices.

[0098] It should be noted that electronic devices experience a temperature increase during charging due to factors such as the conversion efficiency of the charging chip and the resistance in the path from the charging interface to the battery. This temperature increase can affect battery life and charging efficiency. Therefore, electronic devices are charged using a charging curve with a preset temperature rise to ensure that the temperature rise during charging is less than or equal to the preset temperature rise, thus reducing the risk of overheating during charging.

[0099] Understandably, the temperature rise of the charging curve is affected by the charging current. Since fast charging and ultra-fast charging modes cater to different user needs, the charging current in fast charging is typically lower than that in ultra-fast charging. Consequently, the temperature rise of the charging curve used in fast charging is less than that used in ultra-fast charging. The temperature rise of the charging curve refers to the change in the overall casing temperature of the electronic device over time during the charging process.

[0100] For example, the temperature rise of the charging curve used in fast charging mode can be 12 degrees Celsius; the temperature rise of the charging curve used in ultra-fast charging mode can be 18 degrees Celsius, 16 degrees Celsius, etc.

[0101] It should be understood that in addition to the charging current affecting the overall casing temperature of electronic devices, ambient temperature and the use of various functional modules also influence the overall casing temperature. Therefore, electronic devices are equipped with charging curves corresponding to different ambient temperatures, such as charging curves at 25 degrees Celsius, 35 degrees Celsius, and 40 degrees Celsius.

[0102] In this embodiment, each charging curve can be obtained by debugging the electronic device under a standard temperature chamber environment. For example, the charging curves corresponding to the fast charging mode can include: a charging curve with a temperature rise of 12 degrees Celsius for the entire casing of the electronic device at an ambient temperature of 25 degrees Celsius, a charging curve with a temperature rise of 8 degrees Celsius for the entire casing of the electronic device at an ambient temperature of 35 degrees Celsius, and a charging curve with a temperature rise of 5 degrees Celsius for the entire casing of the electronic device at an ambient temperature of 40 degrees Celsius; the charging curves corresponding to the ultra-fast charging mode can include: a charging curve with a temperature rise of 18 degrees Celsius for the entire casing of the electronic device at an ambient temperature of 25 degrees Celsius, a charging curve with a temperature rise of 12 degrees Celsius for the entire casing of the electronic device at an ambient temperature of 35 degrees Celsius, and a charging curve with a temperature rise of 8 degrees Celsius for the entire casing of the electronic device at an ambient temperature of 40 degrees Celsius.

[0103] In view of this, embodiments of this application provide a charging method, an electronic device, a storage medium, and a chip system. The electronic device can obtain a suitable charging current for charging based on the target temperature indicated by the user and the overall casing temperature of the electronic device. In this way, the electronic device can automatically adjust the charging current according to the target charging temperature, maximizing the charging speed while meeting the user's temperature requirements for the overall casing temperature of the electronic device.

[0104] To make it easier to understand, the following will be combined with Figures 2 to 4 The target temperature indicated by the user is described. In this embodiment, the target temperature can be obtained by the sum of the target temperature rise and the ambient temperature of the electronic device. The electronic device can adjust the target temperature by adjusting the target temperature rise.

[0105] In this embodiment, the target temperature rise can be adjusted by sliding on the charging interface, by adjusting the position of the progress bar on the charging settings interface, or by any other method. No specific limitation is made here.

[0106] For example, Figure 2This is a schematic diagram of an interface involved in temperature rise adjustment provided in an embodiment of this application. Taking temperature rise adjustment via a charging bubble in the charging interface as an example, the electronic device can display... Figure 2 The charging interface 2a is shown as 'a' in the diagram. The charging interface 2a includes a charging bubble 201 and an activation prompt 202. The function and form of the charging bubble 201 and the activation prompt 202 can be referred to the corresponding descriptions of the charging bubble 103 and the activation prompt 104 above, and will not be elaborated here.

[0107] The electronic device responds to the user's finger sliding operation on the charging interface 2a and determines the target temperature rise based on the displacement of the sliding operation.

[0108] For example, taking the upward sliding operation as corresponding to an increase in temperature and the downward sliding operation as corresponding to a decrease in temperature, the target temperature rise can increase as the vertical upward displacement of the sliding operation increases, and the target temperature rise can decrease as the vertical downward displacement of the sliding operation increases.

[0109] In this embodiment, the maximum target temperature rise is the temperature rise value of the charging curve corresponding to the fast charging mode; the minimum target temperature rise is the temperature rise value of the charging curve corresponding to the fast charging mode. For example, taking the temperature rise values ​​of the charging curves corresponding to the fast charging mode at 25°C, 35°C, and 40°C as 18, 12, and 8 respectively; and the temperature rise values ​​of the charging curves corresponding to the fast charging mode at 25°C, 35°C, and 40°C as 12, 8, and 5 respectively, then the target temperature rise ranges from 12 to 18 at 25°C; from 8 to 12 at 35°C; and from 5 to 8 at 40°C.

[0110] In some embodiments, the electronic device establishes a correspondence between the displacement of a sliding operation and the proportion of temperature rise change. This correspondence allows the determination of the temperature rise change proportion, and thus the target temperature rise. For example, assuming a temperature rise change proportion of 1% per pixel, a current temperature rise (also known as the target temperature rise before adjustment) of 18, and a target temperature rise range of 12 to 18, if the vertical displacement of the sliding operation is -50 pixels, then the temperature rise change proportion is -50%, the temperature rise change is -3, and the target temperature rise after the user operation (also known as the target temperature rise after adjustment) is 15.

[0111] It should be understood that since the target temperature rise corresponds to a certain range, when the target temperature rise obtained from the temperature rise change exceeds the target temperature rise range, the target temperature rise is the closest value to the target temperature rise obtained from the temperature rise change within the target temperature rise range.

[0112] For example, assuming a temperature change rate of 1% per pixel, a current temperature rise of 18, and a target temperature rise range of 12 to 18, if the vertical displacement of the sliding operation is 50 pixels, the temperature change rate is 50%, resulting in a temperature rise of 3. Therefore, the temperature rise obtained from the sliding operation is 21. Since this temperature rise exceeds the target temperature rise range, the target temperature rise corresponding to this sliding operation is 18.

[0113] In some embodiments, the electronic device can also adjust the appearance of the charging bubble 201 according to the target temperature rise. In this way, the appearance of the charging bubble 201 can indicate the target temperature rise, and the user can roughly determine the temperature and charging speed of the electronic device during charging based on the appearance of the charging bubble 201.

[0114] It should be understood that since the target temperature rise can be adjusted by the displacement of the sliding operation, the appearance of the charging bubble 201 can change with the displacement of the sliding operation.

[0115] In this embodiment of the application, taking the vertical upward sliding direction corresponding to a temperature rise as an example, if the temperature rise is indicated by the gradual filling of the charging bubble, then the gradual filling in the charging bubble 201 can increase as the vertical upward displacement of the sliding operation increases (e.g., Figure 2 (As shown in b); if the overall color of the charging bubble 201 darkens to indicate a target temperature rise, then the filling color of the charging bubble 201 can gradually darken as the vertical displacement of the sliding operation increases (e.g., ...). Figure 2 (as shown in c in the diagram).

[0116] In other embodiments, the electronic device can also adjust the appearance of the charging bubble 201 based on the displacement of the sliding operation. The electronic device can determine the target temperature rise based on the appearance of the charging bubble. The specific adjustment method is similar to the target temperature rise adjustment method described above, and is not specifically limited here.

[0117] by Figure 2 In the gradient fill variation shown by 'b', taking a temperature of 25 degrees Celsius as an example, if the factory default temperature rise is 'a' degrees Celsius when there is no color gradient and 'b' degrees Celsius when the color gradient completely fills the bubbles, then the temperature rise that the user can adjust from 0% (no color) to 100% (color fill) is 'ba' degrees Celsius. Using linear interpolation, the temperature rise 'm' at any point 'n' in the gradient can be calculated as: m = n × (ba) ÷ 100 + a. For example, if a is 12 and b is 18, there is a 6-degree temperature rise adjustment range. If the gradient animation is 30%, then using linear interpolation, the target temperature rise can be calculated as 13.8 degrees Celsius. Therefore, the target charging temperature of the electronic device is 25 + 13.8, or 38.8 degrees Celsius.

[0118] It should be understood that, in addition to the gradient fill change and solid color fill change mentioned above, the target temperature rise can also be indicated by any other means of appearance change, such as the size of the charging bubble, the thickness of the charging bubble outline, etc., without specific limitations here.

[0119] In addition to adjusting the target temperature rise through the sliding operation in the charging interface, the electronic device can also adjust the target temperature rise through the battery settings interface or any other method.

[0120] The above Figure 2 In the illustrated embodiment, the electronic device can switch from fast charging mode to ultra-fast charging mode. After entering ultra-fast charging mode, it can adjust the target temperature rise and thus adjust the target temperature. When charging in fast charging mode, the electronic device cannot adjust the target temperature rise and thus cannot adjust the target temperature.

[0121] In other embodiments, the minimum temperature rise of the electronic device in the fast charging mode is the same as the temperature rise corresponding to the quick charging mode. After the electronic device is connected to a charging device, it can directly enter the fast charging mode without going through the quick charging mode. This eliminates the need for operations to indicate switching charging modes on the charging interface (e.g., long-pressing the charging bubble). After the electronic device detects the charging device is connected, the user can directly adjust the target temperature rise and thus adjust the target temperature, reducing user operations.

[0122] For example, Figure 3 This is a schematic diagram of an interface involved in temperature rise regulation provided in an embodiment of this application. The electronic device can display... Figure 3 The "a" in the diagram represents desktop 3a. Desktop 3a includes icons for one or more applications. For example, the icon for the settings application is 301. The one or more applications can be any application; no specific limitation is made here.

[0123] The electronic device can respond to the user's click on icon 301, launch the settings application, and display... Figure 3 The settings interface 3b is shown as b in the diagram. Settings interface 3b includes one or more settings items. These settings items may include: System and Updates, Notifications, Biometrics and Passwords, Apps, Battery 302, Storage, Security, Privacy, and Health & Wellness for Phones.

[0124] The electronic device can respond to the user's click operation on the battery 302 and display... Figure 3 The battery settings interface 3c is shown as 'c' in the diagram. This battery settings interface 3c may include one or more battery settings items. For example, low power mode, power display method, charging settings 303, battery usage, etc.

[0125] The electronic device can respond to the user's click operation on the charging setting 303 and display... Figure 3The charging settings interface 3d is shown as 'd' in the diagram. This charging settings interface 3d may include: a fast charging switch 304 and a progress bar 305. The fast charging switch 304 is used to control whether the fast charging function of the electronic device is turned on or off. The progress bar 305 is used to adjust the target temperature rise.

[0126] Progress bar 305 can be a progress bar that includes a slider (as shown in the progress bar in the 3D interface), or it can be a long bar progress bar (such as...). Figure 3 (as shown in 'e'), or any other form of progress bar, without specific limitations here.

[0127] The progress bar 305 can be placed horizontally, vertically, or at an angle. This application embodiment does not specifically limit the placement, arrangement, or color of the progress bar 305.

[0128] If the electronic device receives a user's action of dragging the adjustment bar 305 to the left in the charging settings interface 3d, the electronic device will lower the target temperature rise; if the electronic device receives a user's action of dragging the adjustment bar 305 to the right in the charging settings interface 3d, the electronic device will raise the target temperature rise. The range of the target temperature rise can be referred to the corresponding description above, and is not specifically limited here.

[0129] In some embodiments, the parameter corresponding to the progress bar 305 can be the target temperature rise under any ambient temperature, the proportion corresponding to the target temperature rise, or the target temperature under any ambient temperature. Taking the target temperature rise as m as an example, the proportion corresponding to the target temperature rise can be expressed as (ma) ÷ (ba); where b is the maximum value corresponding to the target temperature rise; and a is the minimum value corresponding to the target temperature rise.

[0130] For example, taking an ambient temperature of 25 degrees Celsius as an example, if the parameter corresponding to the progress bar is the target temperature rise, then the range of the progress bar is 12 to 18; if the parameter corresponding to the progress bar is the temperature rise percentage, then the range of the progress bar is 0 to 100%; if the parameter corresponding to the progress bar is the target temperature, then the range of the progress bar is 37 to 43. If the progress bar indicates halfway, then the target temperature rise during the rapid charging of the electronic device can be 15, the temperature rise percentage can be 0.5, and the target temperature can be 40.

[0131] It should be understood that the target temperature is obtained through a target temperature rise; therefore, progress bar 305 can also be understood as being used to adjust the target temperature. Furthermore, the charging speed of the electronic device corresponds to the target temperature rise; therefore, progress bar 305 can also be understood as being used to adjust the charging speed. No specific limitations are made here.

[0132] It should be understood that the progress bar 305 is a control used to adjust the target temperature rise, and the same function can be achieved by any other control, such as an input box. For example, if the electronic device receives an operation from the user to enter a value in the input box, the electronic device can adjust the target temperature rise according to that value.

[0133] It is understood that if the electronic device supports adjusting the target temperature rise in both of the above methods, the target temperature rise indicated by the progress bar is the same as the target temperature rise indicated by the bubble appearance. This application embodiment does not limit the specific form of the interface described above. Through these two methods, the electronic device can support continuous adjustment of the target temperature rise, which can also be understood as continuous adjustment of the target temperature, or continuous adjustment of the charging speed.

[0134] It is understandable that after an electronic device adjusts the target temperature rise through charging settings, it can default to charging based on that target temperature rise when subsequently charging in fast charging mode. In some embodiments, the electronic device can default to charging based on the target temperature rise used during the last charge, or it can default to charging based on the maximum temperature rise. This application does not limit the default temperature rise used when entering fast charging mode each time.

[0135] It should be understood that the above Figure 2 and Figure 3 The interface shown is merely an example; it may include more or less content, and no specific limitations are set here. Furthermore, the above... Figure 2 and Figure 3 The interfaces shown for adjusting the target temperature rise (e.g., charging interface, charging settings interface) and the user operations that trigger the target temperature rise adjustment are merely examples. The target temperature rise adjustment can also be triggered by any other type of user operation (e.g., clicking a control indicating a temperature increase, entering the temperature in an input box, etc.), and no specific limitations are made here. Figure 2 and Figure 3 The interface changes shown for adjusting the target temperature rise are merely examples. The target temperature can also be indicated through changes in the interface background color, displaying the target temperature, or any other method. No specific limitations are specified here.

[0136] The above Figure 2 and Figure 3 The method for adjusting the target temperature rise and the confirmation of the target temperature rise have been explained. The adjustment of the charging current will be explained below.

[0137] In this embodiment, the electronic device can adjust the charging current based on the target temperature (or target temperature rise) and the current overall casing temperature of the electronic device.

[0138] In one possible implementation, the electronic device can predict its overall casing temperature over a period of time under different charging currents by using the target temperature and the current casing temperature. Then, it can obtain a target current value based on the target temperature, the predicted casing temperature, and constraints. This target current value is the adjusted charging current. This limits the predicted casing temperature of the electronic device to not exceeding the target temperature over a future period, reducing the likelihood of the casing temperature exceeding the target temperature during charging and improving the user experience.

[0139] For example, electronic devices can adjust the charging current using model predictive control (MPC) algorithms.

[0140] The following explanation uses the MPC algorithm as an example to illustrate the process of adjusting the charging current.

[0141] In this embodiment, the MPC algorithm can predict the overall casing temperature of an electronic device over a future period under different charging currents, given a fixed target temperature and by combining thermal models of different charging scenarios. The target current value is obtained from different charging currents through constraints.

[0142] In this embodiment of the application, the thermal model of the electronic device established in the MPC algorithm can be as follows: .

[0143] Where T represents the temperature of the electronic device after time t, where t is the time duration, T0 is the current overall casing temperature of the electronic device, and I represents the charging current. U1 to Un represent the heat generated by each potentially working module in the electronic device. U1 to Un can correspond to modules such as the processor, memory, and camera, respectively; B0 is the coefficient corresponding to the charging current, and B1 to Bn are the coefficients corresponding to each module. In specific scenarios, the coefficients of B1 to Bn may be zero, such as in standby charging scenarios, where the coefficients of parameters such as memory and camera can be 0. The classification can be made according to different scenarios. This can be collectively referred to as heat generation inside electronic devices.

[0144] It should be understood that A, and B0 to B1 in the above thermal model can be obtained by fitting the coefficients of the above parameters in actual tests in different scenarios, or by other arbitrary methods. For example, the least squares method can be used for fitting and solving; no specific limitation is made here.

[0145] Furthermore, the control variable in the above thermal model is the charging current I, while the heat generated by the remaining power consumption is usually a constant.

[0146] Understandably, the above thermal model can be used to predict the overall casing temperature of electronic devices after a time t under different charging currents I. The time t can be 30 seconds, 1 minute, 90 seconds, or any other value; no specific limitation is made here.

[0147] In this embodiment, the constraints include a maximum temperature limit. That is, the temperature of the electronic device after time t is less than or equal to the target temperature; based on the constraints and the above thermal model, one or more charging current values ​​that satisfy the constraints can be obtained.

[0148] It should be understood that since users primarily prioritize charging speed in fast charging mode, the charging current value corresponding to the scenario with the highest possible charging capacity over a given period can be selected. For example, using the predicted temperature over a time interval t as an example, the maximum value among one or more charging current values ​​can be used as the output of the MPC algorithm, i.e., the target current value. Subsequent electronic devices can then control the charging current to this target current value.

[0149] In this way, the integral of current over time is maximized under the same target temperature (which can also be understood as the same temperature rise), resulting in the maximum amount of electricity charged into the electronic device and a fast charging speed. Furthermore, since the constraint condition limits the overall casing temperature to be less than or equal to the target temperature for a certain period in the future, temperature overshoot can be reduced.

[0150] It should be understood that the above embodiment is illustrated using the example of predicting the overall casing temperature corresponding to a duration t within a future period. The MPC algorithm can predict the overall casing temperature corresponding to multiple durations within a future period. Therefore, the MPC algorithm can select the charging current value corresponding to the first duration with the highest charging capacity among the multiple durations as the target current value.

[0151] For example, taking the prediction of the overall casing temperature corresponding to three time periods in the future as an example, if the current time is the zero time, the three time periods after the zero time are the first time, the second time and the third time respectively. The time interval between the first time and the zero time is the duration t1; the time interval between the second time and the first time is the duration t2; and the time interval between the third time and the second time is the duration t3.

[0152] The MPC algorithm can input the duration t1 and the overall casing temperature of the electronic device at time zero into the above thermal model to predict the overall casing temperature at the first time corresponding to each charging current; input the duration t2 and the predicted overall casing temperature at the first time corresponding to each charging current into the above thermal model to predict the overall casing temperature at the second time corresponding to each charging current; input the duration t3 and the overall casing temperature at the second time corresponding to each charging current into the above thermal model to predict the overall casing temperature at the third time corresponding to each charging current.

[0153] The MPC algorithm obtains the target current value based on the above constraints and the predicted overall casing temperature. Specifically, the electronic device can select the charging current value corresponding to the first moment of the charging situation with the highest charging capacity from the current moment to the third moment as the target current value.

[0154] For example, taking three charging current values ​​as an example, the MPC algorithm can predict the overall casing temperature at three first moments; then, based on the three charging currents and the three first-moment overall casing temperatures, it can predict the overall casing temperature at nine second moments; and based on the three charging currents and the nine second-moment overall casing temperatures, it can predict the overall casing temperature at twenty-seven third moments.

[0155] There are 27 charging conditions (charging curves) for electronic devices from the first moment to the third moment. The charging current value corresponding to the zeroth moment to the first moment is selected from the 27 charging conditions with the largest charging capacity.

[0156] For example, taking charging current values ​​A1, A2 and A3 as examples, if the maximum charging capacity is: charging to the first moment according to A2, then charging to the second moment according to A1, and then charging to the third moment according to A3, then the target current value is A2.

[0157] It should be understood that electronic devices can predict the temperature at least at one point in the future, based on their performance limitations. For example, an electronic device can predict the overall case temperature at three, seven, or any other number of points. No specific limitations are imposed here.

[0158] Based on the above embodiments, the constraints may further include: current limiting conditions. Current limiting conditions may include one or more of the following: maximum charging current limiting conditions or minimum charging current limiting conditions.

[0159] Specifically, the maximum charging current limit is set when the charging current is less than or equal to the upper current limit. The minimum charging current limit is set when the charging current is greater than or equal to the lower current limit. The upper current limit must be greater than the lower current limit.

[0160] The upper limit of the current can be 10A, 20A or any value, and the lower limit of the current can be 1A, 2A or any value, without specific restrictions here.

[0161] Limiting the maximum charging current reduces the likelihood of excessive charging current, thereby mitigating issues such as overheating, shortened battery life, and battery swelling, thus improving charging safety. Furthermore, limiting the minimum charging current reduces the likelihood of charging less than the power consumed, minimizing the chance of electronic devices losing power.

[0162] In addition to the aforementioned constraints regarding maximum temperature and charging current, other constraints may also be included, such as battery life. These are not specifically limited here. This allows electronic devices to be charged safely under these constraints.

[0163] In this embodiment, the electronic device can apply current limiting conditions at any time before outputting the target current value. This embodiment does not specifically limit the timing of applying these current limiting conditions.

[0164] For example, an electronic device can limit the charging current used to predict the device's overall casing temperature over a future period based on current constraints. By limiting the charging current before predicting the device's casing temperature, the number of charging currents can be reduced, the number of predictions can be decreased, the speed of the MPC algorithm can be improved, and the time to obtain the target current value can be shortened.

[0165] Electronic devices can also exclude some charging scenarios (charging curves) based on current limitations. By limiting the charging current before calculating the charging capacity for each charging scenario, some charging scenarios can be excluded, reducing the amount of charging capacity calculated, improving the speed of the MPC algorithm, and shortening the time to obtain the target current value.

[0166] The electronic device can also adjust the charging current value after selecting the charging current value corresponding to the case with the maximum charging capacity.

[0167] In this embodiment, the electronic device can use the above-described MPC algorithm to redetermine the target current value at certain time intervals to adjust the charging current. The time interval can be 30 seconds, 1 minute, or any other time interval, and is not specifically limited here. For example, taking the prediction of the temperature over the next three time periods as an example, at time zero, the temperatures at the first, second, and third time periods can be predicted; and the charging current value I1 from time zero to the first time period can be obtained according to the above constraints.

[0168] At the first moment, the temperatures at the second, third, and fourth moments can be predicted; and the charging current value I2 from the first moment to the second moment is obtained according to the above constraints. At the second moment, the temperatures at the third, fourth, and fifth moments can be predicted; and the charging current value I3 from the second moment to the third moment is obtained according to the above constraints. This process is repeated until the charging process is complete.

[0169] In summary, the MPC algorithm can handle multivariate and constraint conditions. Multivariate handling means that the MPC algorithm can simultaneously consider multiple input and output variables (e.g., temperature, voltage, charging current, etc.). Constraint handling means that MPC can handle constraints during the charging of electronic devices, such as maximum current limits and temperature limits, ensuring that the charging process remains within safe limits and reducing the likelihood of the device's casing temperature exceeding the target temperature during charging. Furthermore, the MPC algorithm exhibits good dynamic adaptability, dynamically adjusting the control strategy based on real-time data to adapt to changes in battery state and environmental conditions.

[0170] In a second possible implementation, the electronic device can also monitor the temperature error between the target temperature and the current overall casing temperature of the electronic device, and obtain the adjustment amount of the charging current based on the temperature error, thereby determining the target current value. This application does not specifically limit the charging current adjustment process. In this way, the charging current value can be adjusted in real time according to the current overall casing temperature of the electronic device, which can reduce the possibility of the overall casing temperature of the electronic device exceeding the target temperature during charging, thus improving the user experience.

[0171] For example, an electronic device can use a proportional-integral-derivative (PID) control algorithm to monitor the temperature error between the target temperature and the current overall case temperature of the electronic device, and obtain the adjustment amount of the charging current based on the temperature error, thereby determining the target current value.

[0172] For example, the PID algorithm performs weighted calculations on temperature error, the cumulative value of temperature error over time, and the rate of change of temperature error to obtain the target current value. The temperature error, the cumulative value of temperature error over time, and the rate of change of temperature error can correspond to the proportional gain coefficient Kp, the integral gain coefficient Ki, and the derivative gain coefficient Kd, respectively.

[0173] Specifically, the PID algorithm can weight the temperature error using the proportional gain coefficient Kp to obtain the first adjustment amount. This first adjustment amount can provide instantaneous charging current adjustment, allowing the target current value to respond quickly to temperature deviations. The PID algorithm can weight the cumulative temperature error over time using the integral gain coefficient Ki to obtain the second adjustment amount. This second adjustment amount can eliminate steady-state errors in electronic devices, resulting in a more stable overall casing temperature. The PID algorithm can weight the rate of change of the temperature error using the differential gain coefficient Kd to obtain the third adjustment amount. This third adjustment amount can provide predictive adjustment, reducing oscillations in the overall casing temperature of electronic devices and improving temperature stability. The PID algorithm can then add the first, second, and third adjustment amounts to obtain the current adjustment amount. Finally, the target current value is obtained based on the current charging current value and the current adjustment amount.

[0174] Understandably, the PID algorithm can adjust for temperature errors based on three parameters: proportional, integral, and derivative, enabling precise control of the overall casing temperature of electronic devices. The PID algorithm can also quickly respond to temperature deviations during charging, offering rapid adjustment. Furthermore, the PID algorithm requires minimal computation, making it applicable to electronic devices with varying computing capabilities and thus having a wide range of applications.

[0175] It should be understood that the PMC and PID algorithms mentioned above can be replaced with any other algorithm that can achieve the same function. No specific limitations are made here.

[0176] In other embodiments, the electronic device may also be configured with charging curves corresponding to different temperature rises. During rapid charging, the electronic device can also charge according to the charging curve corresponding to the target temperature rise.

[0177] It's important to note that battery charging typically involves two processes: constant voltage charging and constant current charging. Specifically, during battery charging, the electronic device first charges the battery with a fixed current until the battery voltage reaches the charging cutoff voltage. When the battery voltage reaches the charging cutoff voltage, the electronic device controls the battery to maintain that voltage and gradually reduces the charging current until it is less than or equal to the charging cutoff current.

[0178] It should be understood that because the charging current of the electronic device is relatively small during the constant voltage charging stage, the rate of heat generation is relatively low, and the impact on the temperature of the electronic device is small. Therefore, the charging current does not need to be adjusted according to the target temperature. For example, the control of the charging current in the embodiments of this application may not be used in the constant voltage charging stage, but may be used in the constant current charging stage where the current is controllable.

[0179] To better understand the embodiments of this application, the following is combined with... Figure 4 The software structure of the electronic device according to the embodiments of this application will be described.

[0180] Operating systems for electronic devices can adopt layered architectures, event-driven architectures, microkernel architectures, microservice architectures, or cloud architectures. This application uses the layered architecture of the Android system as an example to exemplify the software structure of an electronic device. A layered architecture divides the software into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: applications, application framework, native libraries (referred to as the native layer), hardware abstraction layer (HAL), and kernel. For ease of explanation, in... Figure 4 It also embodies the hardware layer that interacts with the aforementioned software structure.

[0181] It's important to note that Android is a Linux-based operating system primarily used in portable devices. Upper-layer applications (such as the application layer and application framework layer) in Android are generally developed using Java. Because some low-level tasks are not easily implemented in Java, tasks involving local services, libraries, or hardware drivers are typically handled by C programs, which run within the system's native libraries. These native libraries include interfaces for Java to call C++ code.

[0182] The application layer may include a series of application packages. For example, the application layer may include settings applications and other applications, and this application embodiment does not impose any limitations on this.

[0183] The application framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The application framework layer includes some predefined functions, which are not limited in this embodiment.

[0184] For example, the application framework layer may include a power management service (PMS) module. This PMS module can be used to manage power and functions in electronic devices such as triggering screen on / off, brightness adjustment, and low-power mode, and can also be used to issue control policies to the application layer.

[0185] The Native layer may include multiple functional modules. In this embodiment, the Native layer includes a SurfaceFlinger service module. The SurfaceFlinger service module receives graphic display data from multiple sources, synthesizes them, and then sends them to the display device. Image display can be accomplished collaboratively by multiple classes such as SurfaceFlinger, HWC, and the display screen.

[0186] In this embodiment, the Native layer also includes an input subsystem. The input subsystem is one of the important system services in the Android operating system, dedicated to processing various external input signals from input devices. Input devices include: displays, keyboards, mice, etc.

[0187] Taking a touch screen as an example, when the screen is touched, the corresponding hardware driver (such as the touch screen driver in the kernel layer) will be triggered. After the touch screen driver receives the touch event, it will write the touch event to the corresponding input device node. Then the input subsystem will read the touch event from the input device node and pass the touch event up layer by layer until it reaches the corresponding activity.

[0188] The HAL layer may include a hardware composition module (hwcomposer, HWC), which has the function or capability to use hardware to combine and display image data, providing hardware support for the SurfaceFlinger service.

[0189] The kernel layer is the layer between hardware and software, and its role is to pass application requests to the hardware. The kernel layer provides the most basic functions of the operating system. Typically, the kernel layer provides system services such as process management, interrupt handling, memory management, networking, and inter-process communication.

[0190] In this embodiment, the kernel layer includes a display driver, a touch panel (TP) driver, and a power driver.

[0191] The display driver is used to drive the display screen to show any of the aforementioned interfaces. The TP driver is used to receive touch events sent by the touch sensor of the display screen, report the touch events to the input subsystem, and pass the touch events to the display driver to trigger the display driver to execute the display power-on process. The power driver can obtain the target temperature rise (or target temperature) based on the location indicated by the touch event, and then adjust the charging current based on the target temperature rise (or target temperature) and the target current value of the current overall casing temperature of the electronic device, thereby controlling the charging process in ultra-fast charging scenarios.

[0192] The hardware layer can include a display screen (such as OLED or LCD), touch sensors, and a charging chip. When a user clicks or touches the display screen, the touch sensors detect the user's touch operation and determine that a touch event has occurred. The touch sensors then send the touch event to the TP driver. The charging chip can also be called a charging management module.

[0193] It should be noted that although this application uses the Android system as an example for illustration, its basic principles are equally applicable to electronic devices based on operating systems such as iOS or Windows. The execution subject of the control method provided in this application can be the aforementioned electronic device, or it can be a functional module and / or functional entity within the electronic device capable of implementing the control method. Furthermore, this application can be implemented through hardware and / or software methods, which can be determined according to actual usage requirements, and this application does not impose any limitations.

[0194] The following example, using temperature rise regulation (also known as target temperature regulation), illustrates the workflow of electronic device software and hardware.

[0195] Electronic devices can receive user actions such as clicking or touching the display screen through the TP driver; that is, the TP driver can detect touch events. The TP driver passes the touch events to the input subsystem, which then passes them to various services in the framework layer (e.g., power management service).

[0196] The power management service can send touch events to the power driver. The power driver can then determine the target temperature rise (or target temperature) based on the location indicated by the touch event and obtain the charging current value according to the automatic charging control algorithm. The power driver can then control the charging chip to adjust the charging current based on the charging current value.

[0197] For example, Figure 5 This is a schematic flowchart illustrating a charging method provided in an embodiment of this application. Taking the acquisition of the charging current value via an MPC algorithm as an example, ... Figure 5 As shown, the method includes: connecting the electronic device to the charging device;

[0198] S501, Receive user operation for instructing adjustment of target temperature.

[0199] The user operation used to indicate the adjustment of the target temperature can also be understood as the user operation used to indicate the adjustment of the target temperature rise. This user operation can be a sliding operation on the charging bubble, a sliding operation on the progress bar, a voice operation to indicate the adjustment of the target temperature, or any other type of operation, without specific limitations here.

[0200] For example, the TP driver can receive user operations and transmit touch screen events to the power driver through the input subsystem and power management service.

[0201] S502, responding to user operation, obtains the adjusted target temperature according to the position indicated by the user operation.

[0202] User operations can be the aforementioned sliding operation on the charging bubble, the aforementioned sliding operation on the adjustment progress bar, or voice operations to indicate the adjustment of the temperature rise ratio, etc., without specific limitations here.

[0203] The specific method for calculating the target temperature can be found above. Figure 2 or Figure 3 The corresponding explanation of the target temperature is not detailed here.

[0204] For example, the power driver can obtain the adjusted target temperature based on the location indicated by the touch screen event.

[0205] S503. Adjust the charging current according to the adjusted target temperature.

[0206] For example, the power supply driver can obtain a target current value based on the adjusted target temperature, and then adjust the charging current to match the target current value. In some embodiments, the power supply driver includes an automatic charging control algorithm. This automatic charging control algorithm can adjust the charging current of the electronic device based on the target temperature.

[0207] S503 may include: S31 to S33.

[0208] S31. Is it in the constant current charging stage?

[0209] For example, the power driver confirms whether the electronic device is in the constant current charging phase.

[0210] Electronic devices can determine whether they are in a constant-current charging phase by measuring battery charge, battery voltage, or any other method. For example, if the battery charge is less than threshold A, the electronic device is in a constant-current charging phase; if the battery charge is greater than or equal to threshold A, the electronic device is not in a constant-current charging phase. Threshold A can be 80% of the battery's charge level when fully charged, 90% of the battery's charge level when fully charged, or any value, without specific limitation here. Similarly, if the battery voltage is less than threshold B, the electronic device is in a constant-current charging phase; if the battery voltage is greater than or equal to threshold B, the electronic device is not in a constant-current charging phase. Threshold B can be 80% of the battery's voltage level when fully charged, 90% of the battery's voltage level when fully charged, or any value, without specific limitation here.

[0211] If the electronic device is in the constant current charging stage, execute S32; if the electronic device is not in the constant current charging stage, the charging current does not need to be adjusted according to the target temperature. For example, charging can be performed according to a preset charging strategy.

[0212] S32. Based on the target temperature and the automatic charging control algorithm, obtain the target current value.

[0213] Taking the MPC algorithm mentioned above as an example, S32 can include S32-1 and S32-2.

[0214] S32-1. Based on constraint 1 and the thermal model in the MPC algorithm, predict the overall casing temperature of the electronic device at three future time points.

[0215] Constraint 1 includes: the charging current is less than or equal to the upper limit of the current, and / or the charging current is greater than or equal to the lower limit of the current.

[0216] The upper limit of the current can be 10A, 20A or any value, and no specific limit is specified here.

[0217] By limiting the maximum charging current, the situation of excessive charging current can be reduced, thereby reducing problems such as excessive battery temperature, shortened battery life, and battery swelling caused by excessive current, and improving charging safety.

[0218] The lower current limit can be 1A, 2A or any value, and no specific limit is specified here.

[0219] By limiting the minimum charging current, we can reduce the number of times the charging current is less than the power consumption, and reduce the number of times electronic devices lose power while charging.

[0220] S32-2. Based on constraint 2 and the predicted overall casing temperature, the target current value is obtained.

[0221] Constraint 2 includes: the predicted temperature is less than or equal to the target temperature; and the charging current corresponds to the maximum charging capacity.

[0222] For details on S32-1 and S32-2, please refer to the above explanation of the adjustment of charging current by the PMC algorithm, which will not be elaborated here.

[0223] Taking the PID algorithm mentioned above as an example, S32 can include: S32-3 and S32-4.

[0224] S32-3. Based on the temperature error between the target temperature and the current overall casing temperature of the electronic device, the adjustment amount of the charging current is obtained.

[0225] S32-4. Based on the adjustment amount of the charging current and the current value of the charging current, obtain the target current value.

[0226] For details on S32-3 and S32-4, please refer to the above explanation of the PID algorithm for adjusting the charging current; they will not be elaborated upon here.

[0227] S33. The electronic device adjusts the charging current value to the target current value. Adaptively, the electronic device charges the battery according to the target current value.

[0228] After executing S33, the electronic device can repeat S31 to S33 at certain time intervals until the electronic device is no longer in the constant current charging stage or charging is completed. The certain time interval can be 30 seconds, 60 seconds, or any other time interval; no specific limitation is made here. This allows for adjustment of the charging current at regular time intervals.

[0229] In this way, the charging current can be adjusted according to the target temperature set by the user, reducing the possibility that the overall casing temperature of the electronic device will exceed the target temperature during charging, and meeting the user's temperature requirements for the electronic device.

[0230] For example, Figure 6 This is a schematic flowchart illustrating a charging method provided in an embodiment of this application. Figure 6 As shown, the charging method includes:

[0231] S601. When the target temperature is a first value, in response to a user operation that instructs the adjustment of the target temperature, the target temperature of the electronic device is adjusted from the first value to a second value.

[0232] It is understandable that the first value can be the target temperature value determined when the target temperature was last adjusted, or it can be the default value, such as the maximum value of the target temperature or the target temperature value determined in the charging settings interface below. No specific limitation is made here.

[0233] S602. Adjust the first current value to the second current value according to the second value.

[0234] The first current value is the charging current value corresponding to the first value, and the second current value is the charging current value corresponding to the second value; wherein, if the first value is greater than the second value, the first current value is greater than the second current value; or, if the second value is greater than the first value, the second current value is greater than the first current value.

[0235] In this way, the charging current can be flexibly adjusted according to the target temperature indicated by the user to meet the user's requirements for the temperature and charging speed of electronic devices.

[0236] In one possible implementation, during the constant current charging phase, if the first value is greater than the second value, the first current value is greater than the second current value; or, during the constant current charging phase, if the second value is less than the first value, the second current value is greater than the first current value.

[0237] In this way, the charging current value is adjusted according to the second value during the constant current charging stage.

[0238] In one possible implementation, a first interface is displayed, which includes: a first control; the first control is used to adjust the target temperature; and the user operation is an operation on the first control.

[0239] The first interface can be any interface with an adjustable target temperature (or target temperature rise), such as the charging interface or charging settings interface mentioned below; no specific limitations are made here. The first control can be any interface with an adjustable target temperature (or target temperature rise), such as the charging bubble or progress bar mentioned below; no specific limitations are made here. User operations can be clicking, swiping, or any type of operation; no specific limitations are made here.

[0240] This provides an intuitive user interface, allowing users to adjust the target temperature using controls.

[0241] In one possible implementation, the user action is a sliding action; the second value is determined based on the first value and the displacement of the sliding action in the first direction.

[0242] The first direction can be either vertically upward or horizontally to the right; there is no specific limitation here. This allows for real-time adjustment of the target temperature following the swipe operation, responding instantly to user input and improving the user experience.

[0243] In one possible implementation, the third value corresponds to the displacement of the sliding operation in the first direction; if the sum of the first value and the third value is greater than or equal to the first preset value, the second value is the first preset value; if the sum of the first value and the third value is less than or equal to the second preset value, the second value is the second preset value; if the sum of the first value and the third value is less than the first preset value but greater than the second preset value, the second value is the sum of the first value and the third value.

[0244] The first preset value can be the target temperature of the electronic device in the fast charging mode, such as 43 degrees, 47 degrees, 48 ​​degrees, etc.; the second preset value can be the target temperature in the fast charging mode, such as 27 degrees, 43 degrees, 45 degrees, etc. No specific limitation is made here.

[0245] By setting the target temperature within a certain range, we can reduce the occurrence of excessively high or low target temperatures, thereby reducing charging safety issues caused by excessively high or low target temperatures.

[0246] In one possible implementation, the appearance of the first control changes according to the target temperature indicated by the user's operation.

[0247] The appearance includes, but is not limited to: outline, size, background color, fill color, etc. In this way, the appearance of the first control indicates the target temperature, providing intuitive visual feedback and making it easier for users to understand and adjust the target temperature.

[0248] In one possible implementation, before displaying the first interface, the method further includes: displaying a second interface in response to an operation for indicating that a charging device is connected, the second interface indicating charging in a first charging mode; displaying the first interface includes: displaying the first interface in response to a first operation on the second interface: the first interface indicating charging in a second charging mode.

[0249] The second interface corresponds to the charging interface described below for fast charging. The first charging mode corresponds to the fast charging mode described below; the second charging mode corresponds to the ultra-fast charging mode described below. The first operation can be any operation used to indicate switching charging modes, such as long-pressing the charging bubble, swiping, etc., without specific limitations here.

[0250] In one possible implementation, the second current value is determined based on a second value and the current overall case temperature of the electronic device.

[0251] The embodiments of this application can determine the second current value based on the second value and the current overall case temperature of the electronic device using an MPC algorithm, a PID algorithm, or any other method. No specific limitations are imposed here.

[0252] In one possible implementation, the method further includes: predicting the overall casing temperature of the electronic device after charging at each charging current value for a period of time based on pre-set charging current values ​​and the current casing temperature of the electronic device; obtaining a second current value based on a first constraint, a second constraint, and the overall casing temperature of the electronic device after charging at each charging current for a period of time; the first constraint includes: the overall casing temperature of the electronic device after a period of time is less than or equal to the second value; the second constraint includes: the charging current value corresponding to the case where the electronic device has the maximum charging capacity within a period of time, provided that the first constraint is met.

[0253] In this way, the temperature of electronic devices can be predicted over a period of time, and the charging current value can be obtained through temperature limits and charging capacity limits, so that electronic devices can meet the user's requirements for fast charging while meeting the user's temperature requirements.

[0254] In one possible implementation, the method further includes obtaining a second current value based on the temperature error between the second value and the current overall case temperature of the electronic device.

[0255] The charging current is adjusted based on the error between the target temperature and the current casing temperature of the electronic device. This temperature error feedback control method allows the casing temperature of the electronic device to be precisely controlled within a certain range of the target temperature, providing a fast response.

[0256] In one possible implementation, the second current value is less than or equal to the first threshold and / or the second current value is greater than or equal to the second threshold, and the second threshold is less than the first threshold.

[0257] The first threshold can correspond to the upper limit of current mentioned below; the second threshold can correspond to the lower limit of current mentioned below, and no specific limitation is made here. In this way, limiting the maximum charging current can reduce the possibility of excessive charging current, thereby reducing problems such as overheating of the battery, shortened battery life, and battery swelling caused by excessive current, and improving charging safety. Furthermore, limiting the minimum charging current can reduce the possibility of charging less than power consumption, and reduce the occurrence of power loss in electronic devices.

[0258] It should be noted that the module names involved in the embodiments of this application can all be defined as other names, as long as they can achieve the function of each module, and no specific restrictions are placed on the module names.

[0259] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0260] The charging method according to the embodiments of this application has been described above. The apparatus for performing the above method provided in the embodiments of this application is described below. Those skilled in the art will understand that the methods and apparatus can be combined with and referenced by each other, and the related apparatus provided in the embodiments of this application can perform the steps in the above method.

[0261] The charging method provided in this application can be applied to electronic devices with charging functions. Electronic devices include terminal devices, and the specific device form of the terminal device can be referred to the above-mentioned descriptions, which will not be repeated here.

[0262] This application provides an electronic device, which includes one or more processors and a memory; the memory is coupled to one or more processors and is used to store computer program code, which includes computer instructions, and one or more processors call the computer instructions to cause the electronic device to perform the above-described method.

[0263] For example, Figure 7 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0264] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0265] The processor 110 may include one or more processing units. These processing units may be independent devices or integrated within one or more processors. The processor 110 may also include a memory for storing instructions and data. For example, the processor 110 may store instructions and data related to the charging method provided in the embodiments of this application. The processor 110 is used to implement the charging method provided in the embodiments of this application.

[0266] The processor 110 may include multiple processor cores, each of which can independently execute instructions and process data. These multiple processor cores share some resources, such as cache, memory controller, and I / O interfaces.

[0267] In some embodiments, the electronic device implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU performs mathematical and geometric calculations and is used for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0268] The charging management module 140 is used to receive charging input from a charger. The charger can 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 via a USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device.

[0269] While charging the battery 142, the charging management module 140 can also supply power to electronic devices through the power management module 141.

[0270] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0271] In this embodiment, the charging management module 140 can adjust the charging current of the input battery according to the charging current value from the processor 110.

[0272] This application provides a chip or chip system. The chip or chip system includes one or more processors, which invoke computer instructions to cause an electronic device to execute the technical solutions described above. Its implementation principle and technical effects are similar to the related embodiments described above, and will not be repeated here.

[0273] This application also provides a computer-readable storage medium. The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the methods described above. The methods described in the above embodiments can be implemented wholly or partially by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted on the computer-readable medium. The computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. The storage medium can be any target medium accessible by a computer.

[0274] In one possible implementation, a computer-readable medium may include RAM, ROM, compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage or other magnetic storage devices, or any other medium targeted to carry or to store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if 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. As used herein, disks and optical discs include optical discs, laser discs, optical discs, Digital Versatile Discs (DVDs), floppy disks, and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0275] This application provides a computer program product, which includes computer program code. When the computer program code is run, it causes the computer to perform the above-described method.

[0276] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0277] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. A charging method, characterized in that, include: When the target temperature is a first value, in response to a user operation that instructs the target temperature to be adjusted, the target temperature of the electronic device is adjusted from the first value to a second value. The first current value is adjusted to the second current value based on the second value, where the first current value is the charging current value corresponding to the first value, and the second current value is the charging current value corresponding to the second value; the second current value is determined based on the second value and the current overall case temperature of the electronic device. Wherein, if the first value is greater than the second value, the first current value is greater than the second current value; or, if the second value is greater than the first value, the second current value is greater than the first current value. Based on the preset charging current values ​​and the current overall temperature of the electronic device, predict the overall temperature of the electronic device after charging at each charging current value for a period of time. The second current value is obtained based on the first constraint condition, the second constraint condition, and the overall casing temperature of the electronic device after charging with each charging current for a period of time. The first constraint condition includes: the overall casing temperature of the electronic device after a period of time is less than or equal to the second value; the second constraint condition includes: the charging current value corresponding to the electronic device having the maximum charging capacity within a period of time when the first constraint condition is met.

2. The method according to claim 1, characterized in that, During the constant current charging phase, if the first value is greater than the second value, the first current value is greater than the second current value; or, During the constant current charging phase, if the second value is less than the first value, the second current value is greater than the first current value.

3. The method according to claim 1, characterized in that, The first interface is displayed, and the first interface includes: a first control; the first control is used to adjust the target temperature; The user operation refers to the operation performed on the first control.

4. The method according to claim 3, characterized in that, The user operation is a swipe operation; The second value is determined based on the first value and the displacement in the first direction of the sliding operation.

5. The method according to claim 4, characterized in that, The third value corresponds to the displacement in the first direction of the sliding operation; If the sum of the first value and the third value is greater than or equal to the first preset value, the second value is the first preset value; If the sum of the first value and the third value is less than or equal to the second preset value, the second value is the second preset value; If the sum of the first value and the third value is less than the first preset value but greater than the second preset value, the second value is the sum of the first value and the third value.

6. The method according to claim 3, characterized in that, The appearance of the first control changes according to the target temperature indicated by the user operation.

7. The method according to claim 3, characterized in that, Before displaying the first interface, the method further includes: In response to an operation that indicates that a charging device is connected, a second interface is displayed, the second interface being used to indicate charging in a first charging mode; The display of the first interface includes: in response to a first operation on the second interface, displaying the first interface: the first interface is used to indicate charging according to a second charging mode.

8. The method according to claim 1, characterized in that, The method further includes: The second current value is obtained based on the temperature error between the second value and the current overall casing temperature of the electronic device.

9. The method according to claim 1, characterized in that, The second current value is less than or equal to the first threshold and / or the second current value is greater than or equal to the second threshold, where the second threshold is less than the first threshold.

10. An electronic device, characterized in that, The electronic device includes: one or more processors and memory; The memory is coupled to the one or more processors, the memory being used to store computer program code, the computer program code including computer instructions, the one or more processors invoking the computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 9.

11. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system including one or more processors, the one or more processors being used to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 9.

13. A computer program product, characterized in that, The computer program product includes computer program code that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Control method and related device

    CN118473036A