A charging control method and an electronic device
By detecting the external power access status and adjusting the charging parameters, the combination of fast charging and slow charging is used to solve the problem of electronic device battery continuing to charge when the battery is full, extending the battery life time and improving the user experience.
Patent Information
- Application Number
- CN202010203685.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-20
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2040-03-20
AI Technical Summary
In the prior art, the continued charging of the battery of an electronic device under a full charge will lead to problems such as diving, bulging and expansion of the battery capacity, shortening of life, and a lack of effective charging process control methods.
By detecting the status data during external power supply connection, predicting and adjusting charging parameters, using a combination of fast charging and slow charging, charging time is controlled according to user scenarios and habits, reducing charging time in full-charge state.
It extends the battery life time, improves the user experience, avoids unnecessary charging of the battery when it is fully charged, and protects the battery health.
Smart Images

Figure CN113497468B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electronic technologies, and in particular, to a charging control method and an electronic device. Background Art
[0002] At present, the batteries in most electronic devices (such as mobile phones, computers, earphones, etc.) are rechargeable batteries. When a user connects a charger to the battery in an electronic device for charging, the user does not unplug the charger in time after the battery is fully charged. For example, when the user connects a charger to a mobile phone for charging at night, the battery is often charged for more than 7 hours before the charger is unplugged. However, the battery of the mobile phone can be fully charged in 1 - 3 hours, which results in the mobile phone battery being continuously charged for more than 4 hours when it is already fully charged. In this way, when the battery of the electronic device is in a fully charged state, continuously charging the battery by the electronic device will cause problems such as battery capacity degradation, battery bulging and swelling, and shortened lifespan.
[0003] Therefore, how to control the charging process of the battery when the electronic device charges the battery, and reduce the charging time of the fully charged battery by the electronic device is an urgent problem to be solved currently. Summary of the Invention
[0004] An embodiment of the present application provides a charging control method and an electronic device. When the electronic device charges the battery, using this method can reduce the charging time of the fully charged battery by the electronic device.
[0005] In a first aspect, a charging control method for an electronic device is provided. The method may include: First, the electronic device detects the access of an external power supply; in response to detecting the access of the external power supply, the electronic device obtains first data, where the first data is used to characterize the state of the electronic device when the external power supply is detected; in response to detecting the access of the external power supply, the electronic device starts charging; the electronic device determines a first duration and a second duration according to the first data, where the first duration is used to characterize the predicted charging duration of the electronic device charging at a first charging parameter, and the second duration is used to characterize the predicted charging duration of the electronic device charging at a second charging parameter; the electronic device charges according to the first charging parameter, and the charging time is a first actual charging duration, where the first actual charging duration is used to characterize the actual charging duration of the electronic device charging at the first charging parameter; when the first actual charging duration is equal to the first duration, the electronic device charges according to the second charging parameter, and the charging time is a second actual charging duration, where the second actual charging duration is used to characterize the actual charging duration of the electronic device charging at the second charging parameter; wherein, the charging efficiency of the electronic device charging at the first charging parameter is higher than the charging efficiency of the electronic device charging at the second charging parameter.
[0006] Among them, the first data includes one or more of the time when an external power supply is connected, the remaining battery power when the electronic device detects the connection of the external power supply, the type of the charger, the time zone where the electronic device is located, the screen on / off information of the electronic device, the alarm ringing time set in the electronic device, the reminder time point of the to-do item set in the electronic device, and the sensor data of the electronic device.
[0007] Among them, the first charging parameter includes the first charging cut-off voltage and the first charging input power; the second charging parameter includes the second charging cut-off voltage and the second charging input power; the first charging cut-off voltage is greater than the second charging cut-off voltage; the first charging input power is greater than the second charging input power.
[0008] In this way, the electronic device can control the charging process when charging the battery. When the user connects the electronic device to an external power supply for a long time (such as at night) to charge the battery, the electronic device can fast charge the battery first and then slow charge the battery. Moreover, the electronic device can determine the duration of fast charging and slow charging according to the scenario when the user connects. In different scenarios, the duration of fast charging or slow charging the battery by the electronic device is different. When the user charges the electronic device for a long time, the electronic device can delay the battery charging to the full charge state through charging control. In this way, the time for the battery to continue to be charged when it is in the full charge state can be reduced. Thus, the service life of the battery in the electronic device can be extended, and the user experience is improved.
[0009] Combined with the first aspect, in a possible implementation manner, the electronic device charges according to the second charging parameter, and after the charging time is the second actual charging duration, the method further includes: when the second actual charging duration is equal to the second duration, the electronic device charges according to the first charging parameter. If the electronic device always charges slowly, when the user disconnects the connection between the external power supply and the electronic device, the battery power in the electronic device may not be charged to 100%. After the electronic device charges slowly for a period of time and then continues to fast charge, the electronic device quickly charges the battery power to 100%. In this way, the situation where the battery power in the user's electronic device is not charged to 100% when the charging ends can be reduced.
[0010] Combined with the first aspect, in a possible implementation manner, the first data includes the time when the external power supply is connected, and the time when the external power supply is connected is within the night time period. Among them, the night time period can be 23:00 - 6:00. In this way, only within the night time period does the electronic device perform charging control on the battery, that is, the electronic device fast charges the battery first and then slow charges it. During the night time, the user may connect the electronic device to an external power supply for a long time, which may cause the battery in the electronic device to be charged when it is in the full charge state. During the day, the user generally does not connect the electronic device to an external power supply for a long time. Therefore, the electronic device fast charges the battery. In this way, it is more in line with the user's habits and improves the user experience.
[0011] In combination with the first aspect, in a possible implementation, the method further includes: the electronic device detects a first event, and in response to detecting the first event, the electronic device stops charging according to the second charging parameter and starts charging according to the third charging parameter; the charging efficiency when the electronic device charges according to the third charging parameter is higher than the charging efficiency when the electronic device charges according to the second charging parameter.
[0012] Wherein, the first event includes one or more of the number of times the electronic device's screen is turned on being greater than a first threshold, the screen-on time of the electronic device being greater than a second threshold, the number of times the electronic device's screen is turned off being greater than a third threshold, the screen-off time of the electronic device being less than a fourth threshold, the power consumption of the electronic device being greater than a fifth threshold, the electronic device starting or using a video application, and the electronic device starting or using a game application.
[0013] When the electronic device charges the battery slowly or stops charging, if the user uses the electronic device, the remaining power of the electronic device may not be sufficient to maintain the normal operation of starting an application by the user of the electronic device. At this time, the electronic device charges the battery according to the third charging parameter, that is, fast charges the battery. In this way, the power of the electronic device can be sufficient to maintain the normal operation of the user starting an application. Thereby, the user experience is improved.
[0014] In combination with the first aspect, in a possible implementation, starting to charge according to the third charging parameter specifically includes: the electronic device charges according to the third charging parameter, and the charging time is the third actual charging duration, and the third actual charging duration is used to represent the actual time when the electronic device charges according to the third charging parameter; when the third actual charging duration is equal to the third duration, the electronic device charges according to the fourth charging parameter, and the charging time is the fourth actual charging duration; the third duration is used to represent the predicted charging duration when the electronic device charges according to the third charging parameter, and the fourth actual charging duration is used to represent the actual charging duration when the electronic device charges according to the fourth charging parameter; wherein, the charging efficiency when the electronic device charges according to the third charging parameter is higher than the charging parameter when the electronic device charges according to the fourth charging parameter; the third duration is determined by the second data, and the second data is used to represent the state of the electronic device when the first event is detected.
[0015] Wherein, the second data includes one or more of the time when the electronic device detects the first event, the remaining power when the electronic device detects the first event, the type of the charger, the time zone where the electronic device is located, the screen-on / off information of the electronic device, the alarm time set in the electronic device, the to-do item time set in the electronic device, and the sensor data of the electronic device.
[0016] In this way, during the slow charging of the battery by the electronic device, if the user uses the electronic device, the electronic device recharges the battery quickly for a period of time and then slow charges the battery. The electronic device predicts the duration of the quick charging and the duration of the slow charging of the battery again based on the second data obtained by the electronic device when the user uses the electronic device. In this way, the electronic device can change the charging efficiency of the battery according to the specific scenario. In this way, the demand that the power of the electronic device is sufficient for the user to normally use the electronic device during the charging process of the electronic device can be met, thus improving the user experience.
[0017] Combined with the first aspect, in a possible implementation manner, the method further includes: the electronic device detects a second event, and in response to detecting the second event, the electronic device charges according to the first charging parameter, where the second event is used to represent a user preset time recorded by the electronic device; when the remaining power of the electronic device is charged to a first threshold, the electronic device charges according to a second charging parameter; when it reaches a first time, the electronic device charges according to a fifth charging parameter, and the first time is the time before the user preset time.
[0018] Among them, the second event includes one or more of the alarm ringing time set in the electronic device, the reminder time point set in the memo, the schedule set time point, and the reminder time point of the to-do item.
[0019] When the user charges the electronic device, especially at night, the user sets an alarm clock for getting up the next morning in the electronic device. Generally, the user gets up and unplug the charger of the electronic device when the alarm clock rings. In this way, the electronic device controls the charging according to the alarm clock time set by the user, which is more in line with the user's habits. Moreover, after the remaining power of the electronic device is charged to a certain threshold, it starts to slow charge, which can reduce the charging duration when the battery is in a fully charged state. Resuming quick charging some time before the alarm ringing time can ensure that the electronic device is fully charged when the user unplugs the charger. In this way, the user experience can be improved.
[0020] Combined with the first aspect, in a possible implementation manner, the electronic device charging according to the second charging parameter specifically includes: the electronic device charges or stops charging according to the second charging parameter. That is, when the electronic device charges with the second charging parameter, the electronic device can slow charge the battery or stop charging the battery.
[0021] Combined with the first aspect, in a possible implementation manner, the third charging parameter and the fifth charging parameter are the same as the first charging parameter; the fourth charging parameter is the same as the second charging parameter.
[0022] In combination with the first aspect, in a possible implementation manner, the sum of the first duration and the second duration is not less than the sixth threshold. If the sum of the first duration and the second duration predicted by the electronic device based on the first data is too short. That is to say, the total duration for the user to charge the electronic device in this scenario is not long, then the electronic device does not perform charge management. The electronic device always performs fast charging. This can prevent the battery from not being fully charged when the charging ends.
[0023] In combination with the first aspect, in a possible implementation manner, when the electronic device charges according to the first charging parameter and before the charging time is the first actual charging duration, it further includes: the electronic device determines that there is no alarm set in the electronic device within the first time period after the external power supply is connected, the external power supply is not connected during the period from 23:00 to 6:00, and the sum of the first duration and the second duration is greater than 4 hours; when the electronic device charges according to the first charging parameter and the charging time is the first actual charging duration, specifically includes: the electronic device determines that an alarm is set in the electronic device within the first time period after the external power supply is connected, then the electronic device charges according to the first charging parameter until the remaining power of the electronic device is 80%; the electronic device stops charging; if the time when the remaining power of the electronic device reaches 80% is earlier than half an hour before the alarm ringing time, within half an hour before the alarm ringing time, the electronic device charges according to the first charging parameter until the alarm ringing time.
[0024] If an alarm is set in the electronic device, then the electronic device controls the charging process of the battery according to the alarm ringing time. That is, the electronic device first performs fast charging on the battery until the battery power reaches 80% and then stops charging. Half an hour before the alarm ringing time, fast charging is resumed until the alarm ringing time. If no alarm is set in the electronic device and charging occurs within the period from 23:00 to 6:00, and the electronic device predicts that the sum of the first duration and the second duration is greater than 4 hours, the electronic device first performs fast charging on the battery for the first duration, and then performs slow charging and stops charging for the second duration. Otherwise, the electronic device always performs fast charging on the battery. In this way, both the time for the battery to be charged in the full - charge state can be reduced, and the situation where the battery is not fully charged when the charging ends can be reduced.
[0025] In combination with the first aspect, in a possible implementation manner, when the electronic device charges according to the second charging parameter and the charging time is the second actual charging duration, it further includes: if the second actual charging duration is less than the second duration and the electronic device obtains that the time in the time zone where the electronic device is located is 6:00, then the electronic device stops charging according to the second charging parameter. At 6:00 in the morning, if the electronic device is still performing slow charging on the battery according to the prediction of the charging model, then it is very likely that the battery will not be fully charged when the charging ends. Resuming fast charging at 6:00 in the morning can reduce the situation where the battery is not fully charged when the user gets up and unpluggs the charger.
[0026] In combination with the first aspect, in a possible implementation, the electronic device determines a first duration and a second duration according to the first data, including: the electronic device inputs the first predicted charging duration into a second charging model to obtain the first duration and the second duration; the first predicted charging duration is determined by the electronic device according to the first data; the training data of the second charging model includes second input data and second output data.
[0027] Wherein, the second input data includes a second predicted charging duration, which is determined according to the first historical charging data of the first user; the first historical charging data includes the time when the electronic device starts charging the battery, the battery power when the electronic device starts charging the battery, the type of the charger, the actual charging duration of the electronic device charging the battery, the time zone, the average charging duration within a week, the power consumption of the electronic device, whether the charging time of the sensor information is a holiday, or one or more of them.
[0028] Wherein, the second output data includes a first charging duration and a second charging duration, the first charging duration is obtained by subtracting a first correction amount from the actual charging duration of the first user; the second charging duration is equal to the first correction amount; the first correction amount is determined according to the confidence level of the first charging model.
[0029] The second predicted charging duration is determined according to the first historical charging data of the first user, specifically including: the second predicted duration is calculated by the electronic device inputting the first historical data into the first charging model; the training data of the first charging model includes first input data and second input data, and the first input data includes the second historical charging data of multiple users.
[0030] Wherein, the second historical charging data includes the time when the electronic device starts charging the battery, the battery power when the electronic device starts charging the battery, the type of the charger, the actual charging duration of the electronic device charging the battery, the time zone, the average charging duration within a week, the power consumption of the electronic device, whether the charging time of the sensor information is a holiday, or one or more of them.
[0031] The electronic device trains a charging model that outputs the first duration and the second duration according to the historical charging data of a specific user. Different users have different fast charging and slow charging durations for the battery of the electronic device in the same charging scenario. In this way, it can conform to the charging habits of each user, and the electronic devices of each user can perform more accurate charging management.
[0032] In combination with the first aspect, in a possible implementation, the first charging model and the second charging model are stored in a cloud server provided by an electronic device manufacturer (such as Huawei Cloud). The user logs in to a cloud service account on their electronic device, and the cloud server collects training data to train the first charging model and the second charging model. Each time the user starts charging, the electronic device sends the first data collected to the cloud server. After the first charging model and the second charging model in the cloud server obtain the first duration and the second duration, they send them to the electronic device. In this way, the electronic device does not need to store the first charging model and the second charging model, which can save the memory space of the electronic device.
[0033] In combination with the first aspect, in a possible implementation, the first charging model and the second charging model are stored in the user's electronic device. In this way, it is possible to prevent the user from charging when not connected to the network and being unable to obtain the first duration and the second duration of the current charging predicted by the charging model.
[0034] In combination with the first aspect, in a possible implementation, the charging history data of the user's electronic device also includes charging location information, such as information about whether it is at home, in the office, or outdoors, etc. In different locations, the total duration from when the user inserts the charger into the electronic device to the end of charging is different. By training the second charging model in combination with different location information, the first duration and the second duration output by the second charging model can better conform to the user's charging habits, thus enabling better control of the charging process of the battery in the electronic device.
[0035] In a second aspect, an electronic device is provided, which includes a memory, a processor, a charging management module, a power management module, and a battery; the power management module, the memory are coupled to the processor, the charging management module, the battery are coupled to the power management module, and the charging management module is coupled to the battery.
[0036] Among them, the processor is used to obtain first data, where the first data is used to represent the state when the charging management module detects the access of an external power source; determine the first duration and the second duration according to the first data, where the first duration is used to represent the predicted charging duration when the charging management module charges with the first charging parameter, and the second duration is used to represent the predicted charging duration when the charging management module charges with the second charging parameter.
[0037] The power management module is used to monitor the remaining power of the battery.
[0038] The charging management module is used to detect the connection of an external power supply; charge the battery according to the first charging parameter for a first actual charging duration, where the first actual charging duration is used to represent the actual charging duration when the charging management module charges according to the first charging parameter; when the third duration is equal to the first duration, charge the battery according to the second charging parameter for a second actual charging duration, where the second actual charging duration is used to represent the actual charging duration when the charging management module charges according to the second charging parameter.
[0039] Among them, the charging efficiency of the charging management module when charging according to the first charging parameter is higher than that when charging according to the second charging parameter.
[0040] Among them, the first data includes one or more of the time when the external power supply is connected, the remaining battery power when the electronic device detects the connection of the external power supply, the type of the charger, the time zone where the electronic device is located, the screen on / off information of the electronic device, the alarm ringing time set in the electronic device, the reminder time point of the to-do items set in the electronic device, and the sensor data of the electronic device.
[0041] Among them, the first charging parameter includes a first charging cut-off voltage and a first charging input power; the second charging parameter includes a second charging cut-off voltage and a second charging input power; the first charging cut-off voltage is greater than the second charging cut-off voltage; the first charging input power is greater than the second charging input power.
[0042] In this way, the electronic device can control the charging process when charging the battery. When the user connects an external power supply to the electronic device for a long time (such as at night) to charge the battery, the electronic device can fast charge the battery first and then slow charge the battery. Moreover, the electronic device can determine the fast charging and slow charging durations according to the scenario when the user connects. In different scenarios, the fast charging or slow charging durations of the electronic device for the battery are different. When the user charges the electronic device for a long time, the electronic device can delay the battery charging to the full charge state through charging control. In this way, the time for the battery to continue to be charged when it is in the full charge state can be reduced. Thus, the service life of the battery in the electronic device can be extended, improving the user experience.
[0043] In combination with the second aspect, in a possible implementation manner, the charging management module charges according to the second charging parameter. After the charging time is the second actual charging duration, the charging management module is further configured to: when the second actual charging duration is equal to the second duration, charge according to the first charging parameter. If the electronic device is always charged slowly, when the user disconnects the connection between the external power supply and the electronic device, the battery power in the electronic device may not be charged to 100%. After the electronic device is charged slowly for a period of time and then charged quickly, the electronic device quickly charges the battery power to 100%. In this way, the situation that the battery power in the user's electronic device is not charged to 100% at the end of charging can be reduced.
[0044] In combination with the second aspect, in a possible implementation manner, the first data includes the time when the external power supply is connected, and the time when the external power supply is connected is within the night time period. The night time period can be 23:00 - 6:00. In this way, only within the night time period does the electronic device perform charging management on the battery, that is, the electronic device first charges the battery quickly and then slowly. During the night time, the user may keep the electronic device connected to the external power supply for a long time, which may cause the battery in the electronic device to be charged when it is fully charged. During the day, the user generally does not keep the electronic device connected to the external power supply for a long time. Therefore, the electronic device charges the battery quickly. In this way, it is more in line with the user's habits and improves the user experience.
[0045] In combination with the second aspect, in a possible implementation manner, the processor is further configured to: detect a first event. Specifically, the charging management module is configured to: in response to detecting the first event, stop charging according to the second charging parameter and start charging according to the third charging parameter; the charging efficiency when the charging management module charges according to the third charging parameter is higher than the charging efficiency when the charging management module charges according to the second charging parameter.
[0046] Wherein, the first event includes one or more of the number of times the electronic device's screen is turned on being greater than a first threshold, the screen-on time of the electronic device being greater than a second threshold, the number of times the electronic device's screen is turned off being greater than a third threshold, the screen-off time of the electronic device being less than a fourth threshold, the power consumption of the electronic device being greater than a fifth threshold, the electronic device starting or using a video application, and the electronic device starting or using a game application.
[0047] When the electronic device charges the battery slowly or stops charging, if the user uses the electronic device, the remaining power of the electronic device may not be sufficient to maintain the normal operation of the user starting an application on the electronic device. At this time, the electronic device charges the battery according to the third charging parameter, that is, charges the battery quickly. In this way, the power of the electronic device can be sufficient to maintain the normal operation of the user starting an application. Thereby, the user experience is improved.
[0048] In combination with the second aspect, in a possible implementation, charging starts according to the third charging parameter. Specifically, the charging management module is configured to: charge according to the third charging parameter, and the charging time is the third actual charging duration, where the third actual charging duration is used to represent the actual time for the charging management module to charge according to the third charging parameter; when the third actual charging duration is equal to the third duration, the charging management module charges according to the fourth charging parameter, and the charging time is the fourth actual charging duration; the third duration is used to represent the predicted charging duration for the charging management module to charge according to the third charging parameter, and the fourth actual charging duration is used to represent the actual charging duration for the charging management module to charge according to the fourth charging parameter; wherein, the charging efficiency of the charging management module charging according to the third charging parameter is higher than the charging parameter of the charging management module charging according to the fourth charging parameter; the third duration is determined by the second data, and the second data is used to represent the state of the processor when detecting the first event.
[0049] Wherein, the second data includes one or more of the time when the processor detects the first event, the remaining battery power when the processor detects the first event, the type of the charger, the time zone where the electronic device is located, the screen on / off information of the electronic device, the alarm time set in the electronic device, the to-do item time set in the electronic device, and the sensor data of the electronic device.
[0050] In this way, during the slow charging of the battery of the electronic device, if the user uses the electronic device, the electronic device recharges the battery quickly for a period of time and then slow charges the battery. The electronic device predicts the duration of the electronic device recharging the battery quickly and the duration of slow charging according to the second data obtained by the electronic device when the user uses the electronic device. In this way, the electronic device can change the charging efficiency of the electronic device for the battery according to the specific scenario. In this way, it can meet the requirement that the battery power of the electronic device is sufficient for the user to normally use the electronic device during the charging process of the electronic device, thus improving the user experience.
[0051] In combination with the second aspect, in a possible implementation, the processor is further configured to: detect a second event. Specifically, the charging management module is configured to: in response to detecting the second event, charge according to the first charging parameter, where the second event is used to represent the user preset time recorded in the memory; when the remaining battery power of the battery is charged to the first threshold, charge according to the second charging parameter; when charged to the first time, charge according to the fifth charging parameter, and the first time is the time before the user preset time.
[0052] Wherein, the second event includes one or more of the alarm ringing time set in the electronic device, the reminder time point set in the memo, the scheduled time point of the schedule, and the reminder time point of the to-do item.
[0053] When the user charges the electronic device, especially at night, and the user sets the wake-up alarm for the next morning in the electronic device, generally the user gets up to unplug the charger of the electronic device when the alarm rings. In this way, the electronic device controls the charging according to the alarm time set by the user, which is more in line with the user's habits. Moreover, when the remaining power of the electronic device reaches a certain threshold, slow charging starts, which can reduce the charging duration when the battery is fully charged. Fast charging resumes some time before the alarm rings, which can ensure that the electronic device is fully charged when the user unplugs the charger. In this way, the user experience can be improved.
[0054] Combined with the second aspect, in a possible implementation manner, the charging management module is specifically configured to: charge or stop charging according to the second charging parameter. That is, when the electronic device charges with the second charging parameter, the electronic device can perform slow charging on the battery or stop charging the battery.
[0055] Combined with the second aspect, in a possible implementation manner, the third charging parameter and the fifth charging parameter are the same as the first charging parameter; the fourth charging parameter is the same as the second charging parameter.
[0056] Combined with the second aspect, in a possible implementation manner, the sum of the first duration and the second duration is not less than the sixth threshold. If the sum of the first duration and the second duration predicted by the electronic device according to the first data is too short. That is to say, the total charging duration of the user for the electronic device in this scenario is not long, then the electronic device does not perform charging control. The electronic device always performs fast charging. This can prevent the battery from not being fully charged when the user ends the charging.
[0057] Combined with the second aspect, in a possible implementation manner, the processor is further configured to: determine that no alarm is set in the electronic device within the first time period after the external power supply is connected, the external power supply is not connected during the period from 23:00 to 6:00, and the sum of the first duration and the second duration is greater than 4 hours. When the processor determines that an alarm is set in the electronic device within the first time period after the external power supply is connected, the charging management module is configured to: charge according to the first charging parameter until the remaining power of the electronic device is 80%; stop charging; if the time when the remaining power of the battery reaches 80% is earlier than half an hour before the alarm rings, charge according to the first charging parameter half an hour before the alarm rings until the alarm rings.
[0058] If an alarm clock is set in the electronic device, the electronic device controls the charging process of the battery according to the ringing time of the alarm clock. That is, the electronic device first performs fast charging on the battery until the battery level reaches 80%, and then stops charging. Half an hour before the alarm clock rings, fast charging is resumed until the alarm clock rings. If no alarm clock is set in the electronic device, and the device is charging between 23:00 and 6:00, and the electronic device predicts that the sum of the first duration and the second duration is greater than 4 hours, the electronic device first performs fast charging on the battery for the first duration, and then performs slow charging and stops charging for the second duration. Otherwise, the electronic device continuously performs fast charging on the battery. In this way, it is possible to reduce the charging time when the battery is in a fully charged state and reduce the situation where the battery is not fully charged when charging ends.
[0059] Combined with the second aspect, in a possible implementation, charging is performed according to the second charging parameter, and the charging time is the second actual charging duration. The charging management module is further configured to: if the second actual charging duration is less than the second duration and the time in the time zone where the electronic device is located is 6:00, stop charging according to the second charging parameter. At 6:00 in the morning, if the electronic device is still performing slow charging on the battery according to the prediction of the charging model, the battery is likely not to be fully charged when charging ends. Resuming fast charging at 6:00 in the morning can reduce the situation where the battery is not fully charged when the user gets up and unplug the charger.
[0060] Combined with the second aspect, in a possible implementation, the processor is specifically configured to: input the first predicted charging duration into the second charging model to obtain the first duration and the second duration; the first predicted charging duration is determined by the electronic device according to the first data; the training data of the second charging model includes the second input data and the second output data.
[0061] Among them, the second input data includes the second predicted charging duration, which is determined according to the first historical charging data of the first user; the first historical charging data includes the time when the electronic device starts charging the battery, the battery level when the electronic device starts charging the battery, the type of charger, the actual charging duration of the electronic device charging the battery, the time zone, the average charging duration within a week, the power consumption of the electronic device, and whether the charging time of the sensor information is a holiday, etc.
[0062] Among them, the second output data includes the first charging duration and the second charging duration. The first charging duration is obtained by subtracting the first correction amount from the actual charging duration of the first user; the second charging duration is equal to the first correction amount; the first correction amount is determined according to the confidence level of the first charging model.
[0063] The second predicted charging duration is determined according to the first historical charging data of the first user, specifically including: the second predicted duration is calculated by inputting the first historical data into the first charging model; the training data of the first charging model includes first input data and second input data, and the first input data includes the second historical charging data of multiple users.
[0064] Among them, the second historical charging data includes one or more of the time when the electronic device starts charging the battery, the battery power when the electronic device starts charging the battery, the type of the charger, the actual charging duration when the electronic device charges the battery, the time zone, the average charging duration within a week, the power consumption of the electronic device, and whether the charging time of the sensor information is a holiday.
[0065] The electronic device trains a charging model that outputs the first duration and the second duration based on the historical charging data of specific users. Different users have different fast charging and slow charging durations for the battery of the electronic device in the same charging scenario. In this way, it can conform to the charging habits of each user, and the electronic devices of each user can perform more accurate charging management.
[0066] Combined with the second aspect, in a possible implementation, the first charging model and the second charging model exist in the cloud server provided by the electronic device manufacturer (such as Huawei Cloud). The cloud service account is logged in to the user's electronic device, and the cloud server collects training data to train the first charging model and the second charging model. Each time the user starts charging, the electronic device sends the collected first data to the cloud server. After the first charging model and the second charging model in the cloud server obtain the first duration and the second duration, they are sent to the electronic device. In this way, the electronic device does not need to save the first charging model and the second charging model, which can save the memory space of the electronic device.
[0067] Combined with the second aspect, in a possible implementation manner, the first charging model and the second charging model exist in the user's electronic device. In this way, it can be avoided that when the user charges without being connected to the network, the first duration and the second duration of the current charging predicted by the charging model cannot be obtained.
[0068] Combined with the second aspect, in a possible implementation manner, the charging historical data of the user's electronic device also includes charging location information, such as information about whether it is at home, in the office or outdoors, etc. In different places, the total duration from when the user inserts the charger into the electronic device to the end of charging is different. Training the second charging model in combination with different location information can make the first duration and the second duration output by the second charging model more in line with the user's charging habits, so as to better manage the charging process of the battery in the electronic device.
[0069] In a third aspect, an electronic device is provided, including one or more touch screens, one or more storage modules, and one or more processing modules; wherein the one or more storage modules store one or more programs; when the one or more processing modules execute the one or more programs, the electronic device implements the method described in any possible implementation manner of the first aspect.
[0070] In a fourth aspect, an electronic device is provided, including: a memory and a processor; the memory is coupled to the processor, and the memory is used to store computer program code, and the computer program code includes computer instructions, wherein the processor is used to: detect that an external power supply is connected; in response to detecting that the external power supply is connected, obtain first data, where the first data is used to characterize the state of the processor when the external power supply is detected to be connected; in response to detecting that the external power supply is connected, start charging; determine a first duration and a second duration according to the first data, where the first duration is used to characterize the predicted charging duration of the processor charging with a first charging parameter, and the second duration is used to characterize the predicted charging duration of the processor charging with a second charging parameter; charge according to the first charging parameter, and the charging time is a first actual charging duration, and the first actual charging duration is used to characterize the actual charging duration of the processor charging with the first charging parameter; when the first actual charging duration is equal to the first duration, charge according to the second charging parameter, and the charging time is a second actual charging duration, and the second actual charging duration is used to characterize the actual charging duration of the processor charging with the second charging parameter; wherein the charging efficiency of the processor charging with the first charging parameter is higher than the charging efficiency of the processor charging with the second charging parameter.
[0071] Wherein, the first data includes one or more of the time when the external power supply is connected, the remaining power when the processor detects the external power supply is connected, the type of the charger, the time zone where the electronic device is located, the screen on / off information of the electronic device, the alarm ringing time set in the electronic device, the reminder time point of the to-do item set in the electronic device, and the sensor data of the electronic device.
[0072] Wherein, the first charging parameter includes a first charging cut-off voltage and a first charging input power; the second charging parameter includes a second charging cut-off voltage and a second charging input power; the first charging cut-off voltage is greater than the second charging cut-off voltage; the first charging input power is greater than the second charging input power.
[0073] In this way, when the electronic device charges the battery, it can control the charging process. When the user connects the electronic device to an external power source for a long time (such as at night) to charge the battery, the electronic device can perform fast charging on the battery first and then slow charging. Moreover, the electronic device can determine the duration of fast charging and slow charging according to the scenario when the user connects. In different scenarios, the duration of fast charging or slow charging of the battery by the electronic device is different. When the user charges the electronic device for a long time, the electronic device can delay the battery charging to the full state through charging control. In this way, the time for the battery to continue charging when it is in the full state can be reduced. Thus, the service life of the battery in the electronic device can be extended, improving the user experience.
[0074] Combined with the fourth aspect, in a possible implementation, the first data includes the time when the external power source is connected, and the time when the external power source is connected is within the night time period. The night time period can be 23:00 - 6:00. In this way, only within the night time period does the electronic device perform charging control on the battery, that is, the electronic device first performs fast charging on the battery and then slow charging. During the night time, the user may connect the electronic device to the external power source for a long time, which may cause the battery in the electronic device to be charged when it is in the full state. During the day, the user generally does not connect the electronic device to the external power source for a long time. Therefore, the electronic device performs fast charging on the battery. In this way, it is more in line with the user's habits and improves the user experience.
[0075] Combined with the fourth aspect, in a possible implementation, the processor is further configured to: upon detecting a first event, in response to detecting the first event, stop charging according to the second charging parameter and start charging according to the third charging parameter; the charging efficiency of the charging management module when charging according to the third charging parameter is higher than the charging efficiency of the charging management module when charging according to the second charging parameter.
[0076] The first event includes one or more of the number of times the electronic device's screen is turned on being greater than a first threshold, the screen-on time of the electronic device being greater than a second threshold, the number of times the electronic device's screen is turned off being greater than a third threshold, the screen-off time of the electronic device being less than a fourth threshold, the power consumption of the electronic device being greater than a fifth threshold, the electronic device starting or using a video application, and the electronic device starting or using a game application.
[0077] When the electronic device performs slow charging on the battery or stops charging, if the user uses the electronic device, the remaining power of the electronic device may not be sufficient to maintain the normal operation of the user starting an application on the electronic device. At this time, the electronic device charges the battery according to the third charging parameter, that is, performs fast charging on the battery. In this way, the power of the electronic device can be sufficient to maintain the normal operation of the user starting an application. Thus, the user experience is improved.
[0078] In combination with the fourth aspect, in a possible implementation, charging is started according to the third charging parameter. Specifically, the processor is configured to: charge according to the third charging parameter, and the charging time is the third actual charging duration, where the third actual charging duration is used to represent the actual time for the processor to charge according to the third charging parameter; when the third actual charging duration is equal to the third duration, the processor charges according to the fourth charging parameter, and the charging time is the fourth actual charging duration; the third duration is used to represent the predicted charging duration for the processor to charge according to the third charging parameter, and the fourth actual charging duration is used to represent the actual charging duration for the processor to charge according to the fourth charging parameter; wherein, the charging efficiency of the processor charging according to the third charging parameter is higher than the charging parameter of the processor charging according to the fourth charging parameter; the third duration is determined by the second data, and the second data is used to represent the state of the processor when the first event is detected.
[0079] Wherein, the second data includes one or more of the time when the processor detects the first event, the remaining battery power when the processor detects the first event, the type of the charger, the time zone where the electronic device is located, the screen on / off information of the electronic device, the alarm time set in the electronic device, the to-do item time set in the electronic device, and the sensor data of the electronic device.
[0080] In this way, during the slow charging process of the battery of the electronic device, if the user uses the electronic device, the electronic device recharges the battery quickly for a period of time and then slow charges the battery. The electronic device predicts the duration for the electronic device to recharge the battery quickly and the duration for slow charging according to the second data obtained by the electronic device when the user uses the electronic device. In this way, the electronic device can change the charging efficiency of the battery of the electronic device according to the specific scenario. In this way, the demand that the battery power of the electronic device is sufficient for the user to normally use the electronic device during the charging process of the electronic device can be met, thereby improving the user experience.
[0081] In combination with the fourth aspect, in a possible implementation, the processor is further configured to: detect a second event, and in response to detecting the second event, charge according to the first charging parameter, where the second event is used to represent the user preset time recorded in the memory; when the remaining battery power of the battery is charged to the first threshold, charge according to the second charging parameter; when charged to the first time, charge according to the fifth charging parameter, where the first time is the time before the user preset time.
[0082] Wherein, the second event includes one or more of the alarm ringing time set in the electronic device, the reminder time point set in the memo, the schedule set time point, and the to-do item reminder time point.
[0083] When the user charges the electronic device, especially at night, and the user sets the wake-up alarm for the next morning in the electronic device, generally the user gets up to unplug the charger of the electronic device when the alarm rings. In this way, the electronic device controls the charging according to the alarm time set by the user, which is more in line with the user's habits. Moreover, when the remaining power of the electronic device reaches a certain threshold, slow charging starts, which can reduce the charging duration when the battery is fully charged. Fast charging resumes some time before the alarm rings, which can ensure that the electronic device is fully charged when the user unplugs the charger. In this way, the user experience can be improved.
[0084] Combined with the fourth aspect, in a possible implementation, the processor is specifically configured to: charge or stop charging according to the second charging parameter. That is, when the electronic device charges with the second charging parameter, the electronic device can perform slow charging on the battery or stop charging the battery.
[0085] Combined with the fourth aspect, in a possible implementation, the third charging parameter and the fifth charging parameter are the same as the first charging parameter; the fourth charging parameter is the same as the second charging parameter.
[0086] Combined with the fourth aspect, in a possible implementation, the sum of the first duration and the second duration is not less than the sixth threshold. If the sum of the first duration and the second duration predicted by the electronic device according to the first data is too short. That is to say, the total charging duration of the user for the electronic device in this scenario is not long, then the electronic device does not perform charging control. The electronic device always performs fast charging. This can prevent the battery from not being fully charged when the user ends charging.
[0087] Combined with the fourth aspect, in a possible implementation, the processor is further configured to: determine that no alarm is set in the electronic device within the first time period after the external power supply is connected, the external power supply is not connected during the period from 23:00 to 6:00, and the sum of the first duration and the second duration is greater than 4 hours. When the processor determines that an alarm is set in the electronic device within the first time period after the external power supply is connected, the processor is configured to: charge according to the first charging parameter until the remaining power of the electronic device is 80%; stop charging; if the time when the remaining power of the battery reaches 80% is earlier than half an hour before the alarm rings, charge according to the first charging parameter half an hour before the alarm rings until the alarm rings.
[0088] If an alarm clock is set in the electronic device, the electronic device controls the charging process of the battery according to the ringing time of the alarm clock. That is, the electronic device first performs fast charging on the battery until the battery charge reaches 80%, and then stops charging. Half an hour before the alarm clock rings, fast charging is resumed until the alarm clock rings. If no alarm clock is set in the electronic device, and the device is charging between 23:00 and 6:00, and the electronic device predicts that the sum of the first duration and the second duration is greater than 4 hours, the electronic device first performs fast charging on the battery for the first duration, and then performs slow charging and stops charging for the second duration. Otherwise, the electronic device continuously performs fast charging on the battery. In this way, the charging time when the battery is in a fully charged state can be reduced, and the situation where the battery is not fully charged at the end of charging can also be reduced.
[0089] Combined with the fourth aspect, in a possible implementation manner, charging is performed according to the second charging parameter, and the charging time is the second actual charging duration. The processor is further configured to: if the second actual charging duration is less than the second duration, and the time in the time zone where the electronic device is located is 6:00, stop charging according to the second charging parameter. At 6:00 in the morning, if the electronic device is still performing slow charging on the battery according to the prediction of the charging model, the battery is likely not to be fully charged at the end of charging. Resuming fast charging at 6:00 in the morning can reduce the situation where the battery is not fully charged when the user gets up and unpluggs the charger.
[0090] Combined with the fourth aspect, in a possible implementation manner, the processor is specifically configured to: input the first predicted charging duration into the second charging model to obtain the first duration and the second duration; the first predicted charging duration is determined by the electronic device according to the first data; the training data of the second charging model includes the second input data and the second output data.
[0091] Among them, the second input data includes the second predicted charging duration, which is determined according to the first historical charging data of the first user; the first historical charging data includes the time when the electronic device starts charging the battery, the battery charge when the electronic device starts charging the battery, the type of the charger, the actual charging duration of the electronic device charging the battery, the time zone, the average charging duration within a week, the power consumption of the electronic device, whether the charging time of the sensor information is a holiday, or more of them.
[0092] Among them, the second output data includes the first charging duration and the second charging duration. The first charging duration is obtained by subtracting the first correction amount from the actual charging duration of the first user; the second charging duration is equal to the first correction amount; the first correction amount is determined according to the confidence of the first charging model.
[0093] The second predicted charging duration is determined based on the first historical charging data of the first user, specifically including: the second predicted duration is calculated by inputting the first historical data into the first charging model; the training data of the first charging model includes first input data and second input data, and the first input data includes the second historical charging data of multiple users.
[0094] Among them, the second historical charging data includes one or more of the time when the electronic device starts charging the battery, the battery power when the electronic device starts charging the battery, the type of the charger, the actual charging duration of the electronic device charging the battery, the time zone, the average charging duration within a week, the power consumption of the electronic device, and whether the charging time of the sensor information is a holiday.
[0095] The electronic device trains a charging model that outputs the first duration and the second duration based on the historical charging data of specific users. In the same charging scenario, the fast charging and slow charging durations of the electronic device for the battery are different for different users. In this way, it can conform to the charging habits of each user, and the electronic devices of each user can perform more accurate charging management.
[0096] Combined with the fourth aspect, in a possible implementation, the first charging model and the second charging model exist in the cloud server (such as Huawei Cloud) provided by the electronic device manufacturer. The cloud service account is logged in on the user's electronic device, and the cloud server collects training data to train the first charging model and the second charging model. Each time the user starts charging, the electronic device sends the collected first data to the cloud server. After the first charging model and the second charging model in the cloud server obtain the first duration and the second duration, they are sent to the electronic device. In this way, the electronic device does not need to save the first charging model and the second charging model, which can save the memory space of the electronic device.
[0097] Combined with the fourth aspect, in a possible implementation manner, the first charging model and the second charging model exist in the user's electronic device. In this way, it can be avoided that when the user charges without connecting to the network, the first duration and the second duration of the current charging predicted by the charging model cannot be obtained.
[0098] Combined with the fourth aspect, in a possible implementation manner, the charging historical data of the user's electronic device also includes charging location information, such as information about whether it is at home, in the office, or outdoors, etc. In different places, the total duration from when the user inserts the charger into the electronic device to the end of charging is different. Training the second charging model in combination with different location information can make the first duration and the second duration output by the second charging model more in line with the user's charging habits, so as to better manage the charging process of the battery in the electronic device.
[0099] Fifth aspect, there is provided an electronic device, including one or more touch screens, one or more memories, and one or more processors; wherein the one or more memories store one or more programs; when the one or more processors execute the one or more programs, the electronic device implements the method as described in any possible implementation manner of the first aspect.
[0100] Sixth aspect, there is provided a computer-readable storage medium, including instructions, characterized in that when the above instructions run on an electronic device, the electronic device is caused to execute any possible implementation manner as described in the first aspect.
[0101] Seventh aspect, there is provided a computer product, when the computer program product runs on a computer, the computer is caused to execute any possible implementation manner as described in the first aspect. Description of the Drawings
[0102] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments of the present application will be described below.
[0103] Figure 1 It is a schematic diagram of time nodes in charge management and control provided in the prior art;
[0104] Figure 2 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application;
[0105] Figure 3 It is a schematic diagram of the flow of a charge management and control method provided in the embodiment of the present application;
[0106] Figure 4 It is a schematic diagram of the user interface of the electronic device of user A charging the battery provided in the embodiment of the present application;
[0107] Figures 5A - 5F It is a schematic diagram of the user interface of the electronic device of user A charging the battery provided in the embodiment of the present application;
[0108] Figures 6A - 6E It is a schematic diagram of the user interface of the electronic device of user B charging the battery provided in the embodiment of the present application;
[0109] Figure 7 It is a schematic diagram of the user interface of the electronic device charging the battery provided in the embodiment of the present application. Detailed Embodiments
[0110] The technical solutions in the embodiments of the present application will be clearly and elaborately described below with reference to the accompanying drawings. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B. The "and / or" in the text is only a description of the relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality of" means two or more than two.
[0111] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more. In addition, the terms "comprising" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include other unlisted steps or units, or may optionally further include other steps or units inherent to these processes, methods, products or devices. It should be noted that in the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0112] To solve the problem of the battery in an electronic device continuing to charge when it is fully charged, a method is proposed in the prior art. Specifically, the method is as follows: The manufacturer of the electronic device trains a charging model based on the historical charging data of multiple users (such as the charging start time, charging end time, charging duration, etc.). The training data of the charging model includes input data and corresponding output data. The input data includes the charging start time and the remaining battery power when the electronic device detects the access of an external power source. The output data includes the total charging duration and the battery power at the end of charging. The charging model can be stored in the electronic device. After the electronic device inputs the time when the external power source is detected to be accessed and the remaining battery power when the external power source is detected to be accessed into the charging model, the charging model can output the predicted charging duration of the current charging process and the battery power threshold A. When the battery power reaches the threshold A, the electronic device suspends charging the battery. As Figure 1As shown, when the electronic device starts to connect to the charger, the electronic device inputs the time when the external power supply is detected and the remaining battery power when the external power supply is detected into the charging model, and obtains the predicted charging duration for the battery charging of the electronic device this time and the battery power threshold A. The electronic device charges the battery. If the electronic device detects that the battery power is greater than the threshold A (for example, A = 80%), the electronic device pauses charging the battery. When the current time approaches the end time of this charging (i.e., the predicted end charging time), the electronic device continues to charge the battery. After the electronic device detects that it is disconnected from the charger, the electronic device stops charging the battery.
[0113] Among them, the fully charged state can mean that the battery power has reached the battery capacity. In an ideal state, when fully charged, the battery power can reach the rated capacity of the battery (that is, the capacity of the battery specified during design and production). Generally, the battery power in the fully charged state is slightly less than the battery capacity. Especially for a battery that has been used for a long time, due to certain battery losses, when fully charged, the battery power significantly cannot reach the battery capacity. That is to say, the actual capacity of the battery will change due to battery losses during use.
[0114] The method proposed in the prior art can perform charging control during charging, reducing the duration of the battery being in the fully charged state, thereby reducing the situation of the battery continuing to charge when fully charged. However, this method of determining whether to enable charging control through a fixed threshold A does not take into account the specific charging habits of individual users. Figure 1 It can be seen that if the battery ends charging at the predicted end charging time, in fact, the battery is not fully charged. The battery can be fully charged at the actual end charging time. If the user continues to use the electronic device when the battery ends charging, but the battery power of the electronic device is not fully charged, it will cause the battery power to run out too quickly during the user's use of the electronic device. In this way, the user experience is affected.
[0115] Each user has different charging habits for the electronic device. If a unified threshold is set in all users' electronic devices for charging control, it cannot better control the charging of each user's electronic device. During the charging process of the electronic device, in order to better control the charging of each user's electronic device, and in order to reduce the loss of the battery in each user's electronic device due to continued charging when the battery is fully charged.
[0116] An embodiment of the present application provides a charging control method. The method specifically includes: First, when the electronic device detects the access of an external power supply, it can obtain first data (such as the time when the electronic device detects the access of the external power supply, the remaining battery power when the electronic device detects the access of the external power supply, the charger type, the time zone where it is located, etc.). The first data is used to describe the charging scenario when the electronic device detects the access of the external power supply. The electronic device obtains a first duration and a second duration based on the first data. The start time of the second duration is later than or equal to the end time of the first duration. During the first duration, the electronic device charges the battery with a first charging parameter; during the second duration, the electronic device charges the battery with a second charging parameter; the charging efficiency of the first charging parameter is higher than that of the second charging parameter. If the battery is not fully charged during the second duration, the electronic device can continue to charge the battery with the first charging parameter. When the electronic device detects that the connection with the external power supply is disconnected, the electronic device ends the charging of the battery. Among them, during the second duration, charging may not be performed, that is, the charging efficiency of the second charging parameter is zero.
[0117] Among them, there may be a first charging model and a second charging model in the electronic device. The electronic device can input the first data into the first charging model to obtain a first predicted duration. Then the electronic device inputs the first predicted duration into the second charging model to obtain a first duration and a second duration. The first charging model is trained by the charging history data of multiple users. During training, the input data of the first charging model is the charging start time, the battery power at the start of charging, the charger type, and the time zone, and the output of the first charging model is the actual charging duration. The input in the training data of the second charging model is the predicted charging duration obtained after inputting the historical charging data of a specific user into the first charging model. The output in the training data of the second charging model is the first charging duration and the second charging duration. The initial value of the first charging duration is equal to the actual charging duration. The initial value of the second charging duration is equal to 0. Since the first duration output by the second charging model trained in this way will be infinitely close to the actual charging duration, and the second duration is infinitely close to 0. When the user makes the electronic device charge the battery for a long time, the value of the second duration should be larger, so that the charging time in the fully charged state of the battery can be shorter. However, if the second duration is too long, it will cause the battery to not be fully charged at the end of charging. In order to ensure that the charging time of the fully charged battery of the electronic device is shorter and the battery is fully charged at the end of charging, the present application corrects the first charging duration and the second charging duration in the training data using a first correction amount. The first charging duration is obtained by subtracting the first correction amount from the actual charging duration of a specific user; the second charging duration is equal to the first correction amount. The first correction amount is determined according to the confidence of the first charging model.
[0118] It can be understood that the time when the external power supply is connected obtained by the electronic device is the time in the time zone where the electronic device is located. For example, when a user travels from Beijing to Mexico, the Beijing time and the Mexico time can be displayed on the electronic device at the same time. When the user charges the electronic device in Mexico, the time when the external power supply is connected obtained by the electronic device is the local time in Mexico.
[0119] The concepts involved in the embodiments of the present application (such as charging control, predicted charging duration, first duration, second duration, charging parameters, actual charging duration, false alarm rate, yield rate, confidence level) will be explained below.
[0120] (1) Charging control
[0121] During the process of the electronic device charging the battery, changing the charging efficiency is called charging control. For example, during the process of the electronic device charging the battery, it can first perform fast charging and then change to slow charging, which is charging control. The electronic device can change the charging efficiency by adjusting the charging cut-off voltage, charging input power, etc. It can be understood that the charging input power is determined by the charging input current and the charging input voltage.
[0122] (2) Actual charging duration
[0123] The actual charging duration refers to the total duration from when the user inserts the charger into the electronic device to start charging until the user unpluggs the charger and the electronic device ends charging. That is, it is the total duration from when the electronic device detects the connection with the charger to start charging until the electronic device detects the disconnection from the charger to end charging.
[0124] (3) Predicted charging duration
[0125] The predicted charging duration means that the electronic device predicts the total duration from when the user inserts the charger into the electronic device to start charging until the user unpluggs the charger and the electronic device ends charging based on data such as the battery power, charging start time, charger type, battery cycle count, actual battery capacity, battery health status, etc. obtained during this charging. The electronic device can predict the first duration and the second duration of this charging based on the predicted charging duration. The specific prediction process of the predicted charging duration will be described below and will not be elaborated here.
[0126] (4) First duration
[0127] The first duration refers to the duration predicted by the electronic device for charging the battery with the first charging parameters. The first duration can be predicted by the electronic device based on the battery power when the electronic device detects the connection with the charger, the time when the electronic device detects the connection with the charger, the charger type, and the predicted charging duration. It can be understood that within the first duration, the electronic device does not fully charge the battery.
[0128] (5) Second duration
[0129] The second duration refers to the duration predicted by the electronic device for charging the battery with the second charging parameter. The second duration during this charging process can be predicted by the electronic device based on the battery power, charging start time, charger type, and predicted charging duration obtained during this charging.
[0130] (6) Charging parameter
[0131] The charging parameters in the embodiments of the present application include charging cut-off voltage, charging input voltage, charging input current, etc. In the embodiments of the present application, during one charging process, the first charging parameter, the second charging parameter, the third charging parameter, and the fourth charging parameter can be constant, or multiple sets, or variable.
[0132] (7) False alarm rate
[0133] In the embodiments of the present application, during each training process of the first charging model, if the predicted charging duration output by the first charging model is greater than the actual charging duration, it is recorded as a false alarm. The total number of false alarms divided by the total number of trainings is the false alarm rate. It can be understood that when the predicted charging duration is greater than the actual charging duration, when the user unpluggs the charger, the electronic device may be charging the battery with the first charging parameter or the second charging parameter, and the battery power is not fully charged. Therefore, the electronic device records the situation where the predicted charging duration is greater than the actual charging duration as a false alarm.
[0134] (8) Yield
[0135] When the predicted charging duration is greater than the actual charging duration, the battery is not charged in a fully charged state, and it is considered that the yield p is 100%. The yield is related to the predicted charging duration. When the predicted charging duration is equal to or greater than the actual charging duration, the yield is equal to 100%. When the predicted charging duration is less than the actual charging duration, the electronic device has fully charged the battery before the user unpluggs the charger, which is not considered a false alarm. However, the electronic device may have charged the fully charged battery for a period of time, so the yield is not 100%. When the predicted charging duration is less than the actual charging duration, the closer the predicted charging duration is to the actual charging duration, the greater the yield. For example, if the user charges the electronic device from 10 pm to 8 am, and the first charging model predicts that the charging ends at 7 am, the yield is 90% at this time. If the first charging model predicts that the charging ends at 6 am, then the yield is 80%. It can be understood that the yields of 90% and 80% are only examples to illustrate the relationship between the yield and the predicted charging duration, and the specific calculation method of the yield is not limited.
[0136] (9) Confidence
[0137] The confidence level of the first charging model represents the credibility of the model. Here, when the user disconnects the power, the battery should be fully charged and the charging time in the fully charged state should be as short as possible, and both of these points need to be ensured. When false alarms are not misreported, the greater the return rate, the higher the confidence level. How to choose between the return rate and the false alarm rate is related to the user's personal habits. For example, if the user disconnects the charger before fully charging the battery each time, then the return rate may be mainly ensured. The specific values of the return rate and the false alarm rate are not limited here. The confidence level C of the first charging model is related to the return rate and the false alarm rate. Understandably, the confidence level of the second charging model also represents the credibility of the second charging model. The higher the confidence level of the second charging model, the more in line with the user's habits the charging control of the electronic device is. Since the confidence level of the second charging model is not required in the subsequent calculations of the embodiments of the present application, the confidence level of the second charging model will not be introduced in detail here.
[0138] First, the exemplary electronic device 100 provided in the following embodiments of the present application will be introduced.
[0139] Figure 2 A schematic structural diagram of the electronic device 100 is shown.
[0140] The following takes the electronic device 100 as an example to specifically illustrate the embodiments. It should be understood that the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.
[0141] The electronic device 100 may include a processor 110, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, a sensor module 180, and a display screen 194, etc. Among them, the sensor module 180 may include a gyroscope sensor 180B, a magnetic sensor 180D, an acceleration sensor 180E, etc.
[0142] It can be understood that the structure schematically shown in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0143] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0144] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0145] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0146] In the embodiments of the present application, the processor may learn and train a charging model according to the historical charging data of the user's electronic device. The input of the charging model includes the charging start time, the battery power at the start of charging, and the charger type. The charging model can predict the first duration and the second duration for the electronic device to charge the battery during each charging process.
[0147] The USB interface 130 is an interface that conforms to the USB standard specification. Specifically, it may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transmission between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. This interface can also be used to connect other electronic devices, such as AR devices, etc.
[0148] It can be understood that the interface connection relationships among the modules illustrated in the embodiments of the present invention are only illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners in the above embodiments, or a combination of multiple interface connection manners.
[0149] The charging management module 140 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 may receive the charging input from the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 may also supply power to the electronic device through the power management module 141.
[0150] The power management module 141 is configured to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives the inputs from the battery 142 and / or the charging management module 140 and supplies power to the processor 110, the internal memory 121, the display screen 194, etc. The power management module 141 may also be used to monitor parameters such as the battery capacity, the number of battery cycles, and the battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 may also be disposed in the same device.
[0151] The electronic device 100 realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0152] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. In the embodiment of the present application, the electronic device can determine whether the user is using the electronic device during the charging process based on the screen-on time and the number of times the screen is on.
[0153] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0154] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
[0155] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the opening and closing state of the flip, features such as automatic unlocking of the flip are set.
[0156] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to functions such as horizontal and vertical screen switching and pedometers. In this application, the electronic device 100 can perform horizontal and vertical screen switching and single-screen display to large-screen display switching of the folding screen according to the changes in the acceleration magnitude and gravity magnitude detected by the acceleration sensor 180E.
[0157] In the embodiments of this application, when the electronic device detects that the data collected by the sensor (such as the acceleration collected by the acceleration sensor and the angle collected by the gyroscope) changes or is greater than a certain threshold, the electronic device considers that the current user is using the electronic device. If the electronic device detects that the user is using the electronic device during the charging control process, the electronic device will re-predict the first duration and the second duration.
[0158] A charging control method provided by the embodiments of this application is introduced below with reference to the accompanying drawings. Figure 3 It is a schematic flowchart of a charging control method provided by the embodiments of this application. Please refer to Figure 3 A charging control method proposed by the embodiments of this application specifically includes:
[0159] S101. The electronic device detects the access of an external power source and obtains first data.
[0160] The electronic device can pass through Figure 2The charging management module 140 shown in the figure detects whether an external power source is connected. The external power source is connected to the electronic device through a charger. When the power management module receives a charging input, the electronic device starts to obtain the first data. The first data is used to describe the charging scenario when the electronic device detects the connection of an external power source. The first data includes the time when the electronic device detects the connection of an external power source (i.e., the time when the power management module receives the charging input), the battery power when the electronic device is connected to the charger (i.e., the power of the battery 142 in the electronic device 100), the number of battery cycles, the battery health status, and one or several of the charger type, sensor data (such as accelerometer and light sensor, etc.), screen on / off information, the alarm ringing time set in the electronic device, the calendar schedule time, the to-do list time, the time zone where the electronic device is located, etc. Here, an example is given where the first data includes the time when the electronic device detects the connection of an external power source, the battery power when the electronic device is connected to the charger, and the charger type.
[0161] Among them, the electronic device can obtain parameters such as the battery power, the number of battery cycles, and the battery health status through Figure 2 the power management module 141 therein.
[0162] The charger type can be distinguished by the interface type and output power of the charger. The interface type of the charger can include: Micro USB interface, USB Type C interface, and Lightning interface for IOS system mobile phones. The output power of the charger can be 18W (i.e., the output voltage and current are 9V / 2A respectively), 10W (i.e., the output voltage and current are 5V / 2A respectively), 5W (i.e., the output voltage and current are 5V / 1A respectively), etc. When the output power of the charger is different, the time for the charger to fully charge the battery is different. The greater the output power of the charger, the faster the charger can fully charge the battery.
[0163] When the current time of the electronic device charging is different, the duration from when the electronic device is connected to the charger to when it is disconnected from the charger is different. It is understandable that the charging duration of the electronic device is different during the day and at night. Generally, the total duration of the charging process of the electronic device is longer at night than during the day. At night, the user inserts the charger to charge the electronic device before going to bed and only unplug the charger after waking up in the morning to end the charging of the electronic device.
[0164] When the current battery power of the electronic device during charging is different, the time for the electronic device battery to be fully charged is different. As a result, the time when the user unplugs the charger after inserting the charger is also different. It is understandable that the total charging duration when starting to charge with a battery power of 20% is longer than that when starting to charge with a battery power of 50%.
[0165] S102. The electronic device obtains a first duration and a second duration of the current charging based on the first data.
[0166] Here, the electronic device may have a first charging model and a second charging model. The electronic device may input the first data into the first charging model to obtain a first predicted charging duration. After inputting the first predicted charging duration into the second charging model, the first duration and the second duration are obtained, and then the electronic device performs charging control on the charging process according to the first duration and the second duration. The start time of the second duration is later than or equal to the end time of the first duration.
[0167] In a possible implementation, the charging model may include a first charging model and a second charging model. The first charging model and the second charging model may be two independent neural networks, or the first charging model and the second charging model may form a complete neural network. The embodiments of the present application do not limit this here.
[0168] Here, how the electronic device obtains the first duration and the second duration according to the first charging model and the second charging model is described in the following text and will not be elaborated here first.
[0169] S103. The electronic device charges the battery using the first charging parameter.
[0170] Specifically, the electronic device may charge the battery 142 through the charging management module 140 shown in Figure 2 The first charging parameter may include one or more of a first charging cut-off voltage and a first charging input power. Here, it can be understood that when the voltage of the battery reaches the charging cut-off voltage, the electronic device may stop charging the battery. The first charging cut-off voltage may be 4.25V or other values. The first charging power may be 22.5W, that is, the charging voltage is 4.5V and the charging current is 5A, and the first charging power may also be other values. The embodiments of the present application do not limit the specific values of the first charging cut-off voltage and the first charging input power. It can be understood that since the input power is determined by the input voltage and the input current, the first charging parameter may also include a first input voltage and a first input current. If any one of the first input voltage and the first input current changes, the first input power will change accordingly. Therefore, in the following text of the embodiments of the present application, the first charging parameter including the first charging cut-off voltage and the first charging input power is taken as an example for description.
[0171] S104. The electronic device determines whether the time of charging the battery using the first charging parameter reaches the first duration. If so, step S105 is executed; if not, step S103 is continued.
[0172] The time for the electronic device to charge the battery using the first charging parameter reaches the first duration. The electronic device then adjusts the charging parameter to charge the battery. If the time for the electronic device to charge the battery using the first charging parameter does not reach the charging duration, the electronic device continues to charge the battery using the first charging parameter. Here, within the first duration, the first charging parameter can be constant or multiple sets of parameters that enable the electronic device to quickly charge the battery. There is no limitation here.
[0173] S105. The electronic device charges the battery using the second charging parameter.
[0174] When the electronic device charges the battery using the second charging parameter, the electronic device charges the battery slowly or stops charging the battery. The charging efficiency of the electronic device with the second charging parameter is lower than the charging efficiency of the electronic device with the first charging parameter. The second charging parameter may include a second charging cut-off voltage and a second charging input power. Here, the second charging cut-off voltage is less than the first charging cut-off voltage. The second charging input power is less than the first charging input power. The specific values of the second charging cut-off voltage, the second charging rate, and the second charging input power are not limited in the embodiments of the present application. It can be understood that the electronic device charging the battery using the second charging parameter includes two cases. First, the electronic device charges the battery slowly. Second, the electronic device stops charging the battery.
[0175] In the embodiments of the present application, the higher the charging efficiency of the electronic device, the shorter the time required to charge the same battery to a certain power (for example, the power is 100%). For example, it takes 1 hour for the electronic device to charge a battery with a power of 10% to a power of 100% using the first charging parameter. It takes 3 hours for the electronic device to charge a battery with a power of 10% to a power of 100% using the second charging parameter. It can be understood that the charging time of the electronic device charging the battery using the first charging parameter here is only for illustrative purposes and does not limit the embodiments of the present application. Similarly, the charging time of the electronic device charging the battery using the second charging parameter is only for illustrative purposes and does not limit the embodiments of the present application either.
[0176] In a possible implementation manner, the electronic device charging the battery with a second charging parameter includes: when the electronic device detects a first event, the electronic device stops charging the battery with the second charging parameter and starts charging the battery with a third charging parameter; the charging efficiency when the electronic device charges the battery with the third charging parameter is higher than the charging efficiency when the electronic device charges the battery with the second charging parameter; wherein, the first event includes one or more of the number of times the screen of the electronic device is lit being greater than a first threshold, the screen-on time of the electronic device being greater than a second threshold, the number of times the screen of the electronic device is turned off being greater than a third threshold, the screen-off time of the electronic device being less than a fourth threshold, and the power consumption of the electronic device being greater than a fifth threshold.
[0177] Further, starting to charge the battery with the third charging parameter specifically includes: within a third time period, the electronic device charges the battery with the third charging parameter, and within a fourth time period, the electronic device charges the battery with a fourth charging parameter; the charging efficiency when the electronic device charges the battery with the third charging parameter is higher than the charging efficiency when the electronic device charges the battery with the fourth charging parameter, and the third time period and the fourth time period are determined by second data; the second data is used to describe the charging scenario when the first event is detected. The second data includes the time when the electronic device detects the first event, the remaining battery power when the electronic device detects the first event, and the type of charger.
[0178] Here, the charging efficiency when the electronic device charges the battery with the third charging parameter can be greater than, equal to, or less than the charging efficiency when the electronic device charges the battery with the first charging parameter. The charging efficiency when the electronic device charges the battery with the fourth charging parameter can be greater than, equal to, or less than the charging efficiency when the electronic device charges the battery with the second charging parameter. The specific magnitudes of the third charging parameter and the fourth charging parameter are not limited here.
[0179] In an exemplary example, during the process of charging the battery using the second charging parameter by the electronic device, the electronic device detects that the screen-on time of the electronic device exceeds the first threshold (including the first threshold) or the number of screen-on times exceeds the second threshold (including the second threshold), or the number of screen-off times is greater than the third threshold (including the third threshold), and the screen-off time is less than the fourth threshold (including the fourth threshold), then the electronic device re-executes step S102, that is, the electronic device predicts the first duration and the second duration again. When the electronic device detects that the electronic device has the screen on multiple times or for a period of time during the charging process, it indicates that the user continues to use the electronic device during the charging process. At this time, the battery is also discharging while charging to maintain the normal operation of each module in the electronic device. If at this time, the electronic device still charges the battery slowly, then the battery power in the electronic device may not be sufficient to support the user's normal use, or when the user unpluggs the charger, the battery power is not fully charged. When the electronic device detects that the user uses the mobile phone during the process of charging the battery using the second charging parameter by the electronic device, it re-predicts the first duration and the second duration of this charging process according to the specific usage situation of the user. In this way, it can be avoided that the user is using the electronic device while the electronic device has been charging the battery slowly or stopped charging the battery. As a result, the battery power is insufficient or the battery power is not fully charged after the connection between the electronic device and the charger is disconnected.
[0180] In the embodiments of the present application, the screen-on time refers to the time from when the unlocking page of the electronic device has no operation to when the screen automatically turns off during the charging process of the electronic device. The screen-off time refers to the time from when the screen of the electronic device automatically turns off to when the screen lights up during the charging process of the electronic device. The number of screen-on times refers to the number of times the screen is on during the charging process of the electronic device. The number of screen-off times refers to the number of times the screen is off during the charging process of the electronic device.
[0181] In another exemplary example, during the process of charging the battery using the second charging parameter by the electronic device, if the charging location of the electronic device is at home or in the office. When the electronic device detects that the data of the sensors in the electronic device (such as the acceleration collected by the acceleration sensor, the angle collected by the gyroscope sensor, etc.) changes or is greater than threshold A, the electronic device re-executes step S102, that is, the electronic device predicts the first duration and the second duration of battery charging again. When the acceleration collected by the acceleration sensor in the electronic device and the angle of the gyroscope collected by the gyroscope sensor change, it can be considered that the electronic device is not in a stationary state. That is, it can be considered that the user is using the electronic device. At this time, the battery is discharging while charging to maintain the normal operation of each module in the electronic device. If at this time, the electronic device still charges the battery slowly, then the power of the battery in the electronic device may not be enough to support the normal use of the user, or it may cause the battery not to be fully charged when the user unpluggs the charger. When the electronic device detects that the user is using the mobile phone during the process of charging the battery using the second charging parameter by the electronic device, it re-predicts the first duration and the second duration of this charging process according to the specific usage situation of the user. In this way, it can be avoided that when the user uses the electronic device, the electronic device is always in the process of slowly charging the battery or stopping charging the battery. As a result, the battery power is insufficient or the battery is not fully charged after the connection between the electronic device and the charger is disconnected.
[0182] In yet another exemplary example, when the electronic device detects that the power consumption in the electronic device is greater than threshold B, the electronic device re-executes step S102, that is, the electronic device predicts the first duration and the second duration again. When the power consumption of the electronic device is greater than threshold B, the electronic device is in a working state, that is, the user is using the electronic device. At this time, the battery is discharging while charging to maintain the normal operation of each module in the electronic device. If at this time, the electronic device still charges the battery slowly, then the power of the battery in the electronic device may not be enough to support the normal use of the user, or it may cause the battery not to be fully charged when the user unpluggs the charger. When the electronic device detects that the user is using the mobile phone during the process of charging the battery using the second charging parameter by the electronic device, it re-predicts the first duration and the second duration of this charging process according to the specific usage situation of the user. In this way, it can be avoided that when the user uses the electronic device, the electronic device is always in the process of slowly charging the battery or stopping charging the battery. As a result, the battery power is insufficient or the battery is not fully charged after the connection between the electronic device and the charger is disconnected.
[0183] S106. Whether the charging time of the battery using the second charging parameter by the electronic device reaches the second duration. If so, execute step S107. If not, continue to execute step S105.
[0184] If the time for the electronic device to charge the battery using the second charging parameter reaches the second duration, the electronic device resumes charging the battery using the first charging parameter. If the time for the electronic device to charge the battery using the second charging parameter does not reach the second duration, the electronic device continues to charge the battery using the second charging parameter.
[0185] S107. The electronic device continues to charge the battery using the first charging parameter.
[0186] It can be understood that neither the first charging parameter nor the second charging parameter is a fixed value. The first charging parameter and the second charging parameter in the electronic devices of different users may be different.
[0187] In a possible implementation, step S107 may be that the electronic device charges the battery using a fifth charging parameter. The fifth charging parameter may be the same as or different from the first charging parameter. The charging efficiency of the electronic device charging the battery with the fifth charging parameter may be higher than that of the electronic device charging with the first charging parameter. The charging efficiency of the electronic device charging the battery with the fifth charging parameter may also be less than that of the electronic device charging with the first charging parameter but greater than that of the electronic device charging with the second charging parameter. The fifth charging parameter may also be the same as the charging parameter when charging the battery during the day (for example, in a 24-hour day, the period from 7:00 am to 10:00 pm is the daytime period). The specific value of the fifth charging parameter is not limited in the embodiments of the present application.
[0188] In the embodiments of the present application, the electronic device may execute step S107 or may not execute step S107. For example, if the user starts charging at 11 pm and the electronic device predicts that the user will finish charging at 7:30 am the next day. The user actually disconnects the connection between the electronic device and the external power supply at 8 o'clock. Then the electronic device executes step S107 from 7:30 to 8 o'clock. If the user actually disconnects the connection between the electronic device and the external power supply at 7 o'clock, then at 7 o'clock, the electronic device is still charging the battery with the second charging duration. After disconnecting the connection between the electronic device and the external power supply, the electronic device directly executes step S108 and stops charging the battery. The electronic device does not execute step S107.
[0189] S108. The electronic device detects that the connection between the electronic device and the external power supply is disconnected and stops charging the battery.
[0190] When the user unpluggs the charger, the connection between the electronic device and the external power supply is disconnected, and the electronic device stops receiving the charging input from the external power supply. The electronic device stops charging the battery.
[0191] Furthermore, after the battery charging is completed, the electronic device can record the actual first duration and second duration during this charging process. It can be understood that the user may unplug the charger during the process of charging the battery with the first charging parameter of the electronic device. In this case, the actual first duration is less than or equal to the first duration, and the actual second duration is equal to 0. The electronic device uses the actual first duration and second duration during this charging process to adjust the parameters in the second charging model (for example, when the second charging model is a neural network, the learning rate, weight change rate, etc. of the neural network) so that the first duration and second duration output by the second charging model are more accurate and more in line with the user's charging habits, thereby enabling better charging management. In this way, the situation where the battery continues to be charged when it is fully charged during the battery charging process of the electronic device for this user can be reduced.
[0192] In a possible implementation manner, the method provided in the embodiments of the present application further includes: before the electronic device obtains the first duration and second duration of this charging based on the first data, the electronic device obtains the alarm time or the time of the to-do item in the calendar schedule. Then the electronic device uses the alarm time or the to-do item time as the end time of this charging. The electronic device no longer predicts the first duration and second duration of this charging based on the first data. For example, if the user starts charging the electronic device by inserting the charger at 10 pm and sets an alarm for 6 am tomorrow. When the electronic device detects the alarm information, the electronic device directly uses 6 am tomorrow as the end time when the user unplug the charger to end the charging. At this time, the electronic device no longer executes steps S102 - S108. The electronic device can stop charging when the battery charge reaches a certain threshold, and then continue charging for a period of time before the alarm time until the user unplug the charger to end the charging; or, set the first duration to a certain fixed value, the electronic device charges the battery, reaches the first duration, stops charging, and then continues charging for a period of time before the alarm time until the user unplug the charger to end the charging; or set the first duration to a certain fixed value, the electronic device charges the battery with the first charging parameter, reaches the first duration, the electronic device changes to charge the battery with the second charging parameter, and then continues charging with the third charging parameter or the first charging parameter before the alarm time until the user unplug the charger to end the charging.
[0193] In a possible implementation, the electronic device detects a connection to a charger. The electronic device obtains a user-defined preset time point, which includes the alarm ringing time and the reminder time point for to-do items. The electronic device performs fast charging on the battery. When the battery charge reaches a first threshold (e.g., 70%), the electronic device starts slow charging the battery and continues slow charging until the preset time point is reached. Then, if the user disconnects the charger, the electronic device stops charging the battery. If the user does not disconnect the charger, the electronic device can either continue charging or stop charging.
[0194] In another possible implementation, the electronic device detects a connection to a charger. The electronic device obtains a user-defined preset time point, which includes the alarm ringing time, the reminder time point for to-do items, the reminder time point in the calendar, and the reminder time point in the memo. The electronic device performs fast charging on the battery. When the battery charge reaches a first threshold (e.g., 70%), the electronic device starts slow charging the battery or stops charging the battery. At a first time point, the electronic device resumes fast charging the battery until the preset time point is reached and then the user disconnects the charger, after which the electronic device stops charging the battery.
[0195] Further, in a possible implementation, when there are multiple alarm ringing times set by the user, the electronic device uses the earliest alarm ringing time as the time point to end charging. For example, the user sets three alarm ringing time points: 6:00 am, 6:30 am, and 6:45 am. When the electronic device starts charging at 11 pm, it will stop charging at 6:00 am (the user does not disconnect from the external power supply during the entire charging process).
[0196] Further, in another possible implementation, when there are multiple alarm ringing times set by the user, the electronic device learns that the user most often disconnects from the external power supply at the first alarm ringing time, and then the electronic device uses the first alarm ringing time as the time to end charging. For example, the user sets three alarm ringing time points: 6:00 am, 6:30 am, and 6:45 am. The electronic device learns that the user usually disconnects the connection between the electronic device and the external power supply at 6:30 am. Then, the first alarm ringing time is 6:30 am. That is, when the electronic device starts charging at 11 pm, it will stop charging at 6:30 am (the user does not disconnect from the external power supply during the entire charging process).
[0197] It is understandable that the set alarm ringing time is within the first time period after the external power supply is connected. The first time period can be within 10 hours or 12 hours after the external power supply is connected (starting from the time when the external power supply is connected). The first time period can be within 10 hours, or within 12 hours, or within 16 hours, etc. There is no specific limitation here. Taking the first time period as 12 hours as an example, the user starts charging the electronic device by connecting the external power supply at 11 pm on March 1, 2020. If the alarm set in the electronic device is before 11 am on March 2, 2020 (such as the alarm at 7 am on March 2, 2020), then the electronic device does not execute steps S101 - S108. The electronic device charges the battery to 80% according to the daytime charging parameters and then stops charging. Half an hour before the alarm ringing time, that is, at 6:30 am on March 2, 2020, it starts charging the battery again according to the daytime charging parameters. If the alarm set in the electronic device is after 11 am on March 2, 2020 (such as the alarm at 7 am on March 3, 2020), then the electronic device charges the battery according to steps S101 - S108.
[0198] In this way, the battery charging is carried out according to the user's specific plan (such as the wake-up alarm), which can reduce the situation that the battery is not fully charged when the user unpluggs the charger to end the charging.
[0199] In a possible implementation manner, the electronic device obtains the current time. If the current time is within the preset time period, the electronic device executes steps S101 - S108, that is, controls the charging process. For example, if the preset time is the nighttime period, such as the time period from 11 pm to 6 am. When the user charges the electronic device by connecting the external power supply between 6 am and 11 pm during the day (such as between 6 am on April 26 and 11 pm on April 26), the electronic device does not perform charging control. Only when the user charges the electronic device within the time period from 11 pm to 6 am the next day (such as between 11 pm on April 26 and 6 am on April 27), the electronic device controls the charging process. For the nighttime period, it can also be other time periods, such as from 8 pm to 5 am the next day. This application does not make a limitation. For the preset time, the user can set and modify it through the user interface of the electronic device; or it can be pre-configured by the electronic device at the factory and the user cannot modify it. This application does not make a limitation on the preset time.
[0200] During the above-mentioned night time period, the first charging parameter may be the same as the charging parameter during the day time period without special setting, or may be different from the charging parameter during the day time period. During the above-mentioned night time period, the second charging parameter may be the charging parameter when charging stops, or may be the charging parameter in the slow charging state. During the above-mentioned night time period, the third charging parameter may be the same as the first charging parameter, or may be the same as the charging parameter during the day time period.
[0201] In a possible implementation manner, the cut-off time for the electronic device to charge the battery with the second charging parameter is the first preset time. For example, the first preset time is 5:30 in the morning. The second duration predicted by the electronic device ends from 1:00 in the morning to 7:00 in the morning. However, the electronic device stops charging the battery with the second charging duration at 5:30 in the morning.
[0202] In a possible implementation manner, only when the time obtained by the electronic device is the time within the preset time period and the first duration and the second duration predicted by the electronic device are not less than 4 hours, will the electronic device control the charging process according to the predicted first duration and second duration, that is, the electronic device will execute step S101-step S108, that is, control the charging process.
[0203] The following details how to specifically implement step S102, that is, how the electronic device obtains the first duration and the second duration according to the first data.
[0204] Further, in a possible implementation, the first charging model can be trained by R & D personnel of a mobile phone manufacturer using actual charging durations from the start to the end of charging for multiple users, as well as data such as the time when charging starts, the battery power at the start of charging, the battery power at the end of charging, and the time zone. The inputs in the training data of the first charging model are the time when the electronic device detects the access of an external power source, the remaining battery power when the electronic device detects the access of an external power source, the time zone, the average charging duration within a week, the battery power, the power consumption of the electronic device, data collected by sensors (such as the acceleration collected by an acceleration sensor), the type of charger, and whether the charging time is a holiday, etc. The output in the training data of the first charging model is the actual charging duration. Then, the electronic device can adjust the first charging model according to the difference between the predicted charging duration output by the first charging model and the actual charging duration. This can make the predicted charging duration output by the first charging model closer to the actual charging duration. The electronic device can evaluate the confidence level of the first charging model based on the difference between the predicted charging duration and the actual charging duration, and the battery power at the time when the predicted charging duration is reached and the battery power at the actual end of charging. For example, assume that in the data collected by the mobile phone manufacturer, multiple users start inserting the charger to charge the electronic device at 10:00 am, the battery power at the start of charging is 20%, and the charging ends after 1 hour, and the battery power of the electronic device at the end of charging is 100%. Through the first charging model trained with this data, when receiving the charging start time of 10:00 am and the battery power at the start of charging of 20%, the first charging model will output that the charging ends at 11:00 am, or output a predicted charging duration of 1 hour.
[0205] In an exemplary example, the first charging model can be implemented by a neural network based on GRU (Gated Recurrent Unit). In the embodiments of the present application, the first charging model can also be implemented by other neural networks or algorithms, which are not limited herein.
[0206] In a possible implementation, before the electronic device executes step S101, the electronic device collects historical charging data of a specific user to train the second charging model.
[0207] In a possible implementation, the second charging model is trained based on the charging historical data of a specific user and the predicted charging duration output by the first charging model. The charging historical data of the specific user may include the time when the electronic device detects the access of an external power source, the actual charging duration, and the battery power of the electronic device when it is connected to the charger during multiple charging processes of the specific user over a period of time, and so on. The input in the training data of the second charging model is the predicted charging duration obtained after inputting the historical charging data of the specific user into the first charging model. The output in the training data of the second charging model is the first charging duration and the second charging duration. The initial value of the first charging duration is equal to the actual charging duration. The initial value of the second charging duration is equal to 0. Since the first duration output by the second charging model trained in this way will be infinitely close to the actual charging duration, and the second duration is infinitely close to 0. When the user makes the electronic device charge the battery for a long time, the value of the second duration should be larger. In this way, the charging duration when the battery is fully charged can be shorter. However, if the second duration is too long, the battery power will not be fully charged at the end of the charging. In order to ensure that the charging time of the electronic device for the fully charged battery is shorter and the battery power is fully charged at the end of the charging, this application corrects the first charging duration and the second charging duration in the training data using the first correction amount. The first charging duration is obtained by subtracting the first correction amount from the actual charging duration of the specific user; the second charging duration is equal to the first correction amount. The first correction amount is determined according to the confidence level of the first charging model.
[0208] In a possible implementation, the training process of the second charging model can be as follows:
[0209] ① First, the electronic device inputs a set of charging historical data of a specific user (the time when the electronic device detects the access of an external power source is t1, and the remaining power and charger type when the electronic device detects the access of an external power source) into the first charging model. In this set of historical data, the time when the electronic device stops charging the battery is t2, and the actual charging duration is t2 - t1. The first charging model obtains the second predicted charging duration. The output of the second charging model is the first charging duration of t (first) and the second charging duration of t (second). The initial value of t (first) is t2 - t1, and the initial value of t (second) is 0.
[0210] ②The electronic device inputs the second predicted charging duration into the second charging model to obtain t(First) and t(Second). That is, t(First) and t(Second) are the outputs of the second charging model. Since the first duration output by the second charging model trained in this way will be infinitely close to the actual charging duration, and the second duration will be infinitely close to 0. However, we need the value of the second duration output by the second model to be larger and the value of the first duration to be smaller. In this way, it can be ensured that the charging time of the battery in the fully charged state during the charging process is shorter. However, the value of the second duration cannot be too large, otherwise, the battery will not be fully charged when charging ends. Therefore, it is necessary to correct the training data of the second charging model. In this way, the first duration and the second duration output by the trained second charging model can enable the electronic device to charge the fully charged battery as short as possible. And, when charging ends, the battery is fully charged.
[0211] Here, according to the yield rate, false alarm rate, and confidence level that the electronic device can obtain based on the first charging model, the first correction amount f-delta can be obtained, and this first correction amount is used to correct t(First) and t(Second).
[0212] ③The corrected outputs in the training data of the second charging model are the first charging duration t1(First) and the second charging duration t1(Second):
[0213] t1(First) = t(First) - f-delta
[0214] t1(Second) = t(Second) + f-delta
[0215] Among them, the first correction amount depends on the confidence level of the first charging model and the battery parameters when the external power supply is detected by the electronic device of a specific user. The correction function increases with the increase of the confidence level, but the correction function will converge after increasing to a certain value. The higher the confidence level, the shorter the first duration and the longer the second duration.
[0216] Furthermore, in a possible implementation manner, if f-delta is less than a certain threshold, there is no need to correct the first charging duration and the second charging duration.
[0217] It can be understood that since the charging behaviors of each user may be different, the parameters of the second charging model in the electronic device of each user may be different. Therefore, for the same charging start time and the battery power at the start of charging, the first duration and the second duration output by the second charging model in the electronic devices of different users are different. In this way, it is more in line with the charging habits of each user and can better control the charging process of each user.
[0218] In a possible implementation, the first charging model and the second charging model are stored in a cloud server (such as Huawei Cloud) provided by the electronic device manufacturer. The user logs in to the cloud service account on their electronic device, and the cloud server collects training data to train the first charging model and the second charging model. Each time the user starts charging, the electronic device sends the first data collected to the cloud server. After obtaining the first duration and the second duration, the first charging model and the second charging model in the cloud server send them to the electronic device. In this way, the electronic device does not need to store the first charging model and the second charging model, which can save the memory space of the electronic device.
[0219] In a possible implementation, the first charging model and the second charging model are stored in the user's electronic device. In this way, it can prevent the user from charging when not connected to the network and being unable to obtain the first duration and the second duration predicted by the charging model for this charging.
[0220] In a possible implementation, the charging history data of the user's electronic device also includes the charging location information, such as information about whether it is at home, in the office, or outdoors, etc. In different locations, the total duration from when the user inserts the charger into the electronic device to the end of charging is different. By training the second charging model in combination with different location information, the first duration and the second duration output by the second charging model can better conform to the user's charging habits, thereby enabling better control over the charging process of the battery in the electronic device.
[0221] In a possible implementation, the first duration is obtained after the first charging model inputs the first data. The second duration is calculated based on the first duration, the duration when the sensor is not working, and the screen-off duration.
[0222] An embodiment of the present application proposes a charging control method. Specifically, the method includes: First, the electronic device can learn and train a charging model based on the user's historical charging data. When the electronic device detects that the charger is connected, the charging model can predict the first duration and the second duration of this charging. If the duration of charging the battery with the first charging parameter by the electronic device reaches the first duration, the electronic device charges the battery with the second charging parameter. If the duration of charging the battery with the second charging parameter by the electronic device reaches the second duration, the electronic device resumes charging the battery with the first charging parameter. Finally, when the electronic device detects that the connection between the electronic device and the charger is disconnected, it stops charging the battery. In this way, during the charging process of the electronic device, it is possible to better control the charging of each user's electronic device and reduce the duration of continuous charging of the battery in each user's electronic device when it is fully charged.
[0223] To better explain a charging control method provided by an embodiment of the present application. The embodiment of the present application exemplarily shows a schematic diagram of a user interface for an electronic device to perform charging control in different scenarios.
[0224] Figure 4 Shows a schematic diagram of a user interface for the electronic device of User A to charge the battery. Figure 4 In the shown user interface 400, the user interface 400 may include: one or more signal strength indicators 401-1 of a mobile communication signal (also known as a cellular signal), an indicator 401-2 of the operator of the mobile communication signal, time indicators 401-3 and 402, a battery status indicator 401-4, a weather indicator 403, and a charging status indicator 404. The charging status indicator may display that the electronic device is charging the battery, the remaining battery power when the electronic device detects the access of an external power source (for example Figure 4 the "10%" shown in Figure 4 and a charging remaining time prompt (for example
[0225] Figure 5A Shows a schematic diagram of a user interface for the electronic device of User A to charge the battery. The user interface 500-1 may include: one or more signal strength indicators 501-1 of a mobile communication signal (also known as a cellular signal), an indicator 501-2 of the operator of the mobile communication signal, time indicators 501-3 and 502, a battery status indicator 501-4, a weather indicator 503, and a charging status indicator 504. The charging status indicator may display that the electronic device is charging the battery, the remaining battery power when the electronic device detects the access of an external power source (for example Figure 5A the "10%" shown in Figure 5A and a charging remaining time prompt (for example Figure 5A the prompt text "Charging remaining time 10 hours" shown in
[0226] Compare Figure 4 and Figure 5A, it can be seen that the remaining battery power is the same when the electronic device detects the connection of an external power source. However, the time when the electronic device detects the connection of an external power source is different. The predicted charging duration of the electronic device will be different. During the day, the predicted charging duration is short, and at night, the predicted charging duration is longer. During the day, users generally unplug the charger in time after the battery is fully charged to 100%. At night, since users are sleeping, they will not unplug the charger in time. Therefore, the predicted charging durations are different in different time scenarios. In this way, it is more in line with the user's charging habits.
[0227] Figure 5B FIG. shows a schematic diagram of a user interface in which the electronic device of user A charges the battery. The user interface 500-2 may include: one or more signal strength indicators 501-1 of a mobile communication signal (also known as a cellular signal), an indicator 501-2 of the operator of the mobile communication signal, time indicators 501-3 and 502, a battery status indicator 501-4, a weather indicator 503, and a charging status indicator 504. The charging status indicator may display that the electronic device is charging the battery, the remaining battery power when the electronic device detects the connection of an external power source (e.g., Figure 5B "10%" shown in Figure 5B ), and a charging status prompt (e.g., Figure 5A The charging scenario shown in Figure 5B is the same as the charging scenario shown in
[0228] Figure 5C FIG. shows a schematic diagram of a user interface in which the electronic device of user A charges the battery. Figure 5C In
[0229] Figure 5D FIG., it is shown that the electronic device has charged the battery power from 10% shown in the user interface 500-2 to 70% shown in the user interface 500-3. The charging status indicator 504 in the user interface 500-3 displays the prompt text "Slow charging in progress". At this time, the electronic device starts to charge the battery slowly. The time displayed on the electronic device at this time is 22:00 at night. It can be understood that when the electronic device changes from the fast charging state to the slow charging state, the electronic device can turn on the screen and display for a few seconds, and then turn off the screen. Figure 5DIt is shown that the electronic device has charged the battery from 70% shown in user interface 500-3 to 90% shown in user interface 500-4. The prompt text "Fast charging" is displayed in the charging status indicator 504 in user interface 500-4. At this time, the electronic device charges the battery slowly. The time shown on the electronic device at this time is 6:40 am, Tuesday, February 11th.
[0230] Figure 5E Schematic diagram of the user interface showing the electronic device of user A charging the battery. Figure 5E It is shown that the electronic device has charged the battery from 90% shown in user interface 500-4 to 100% shown in user interface 500-5. The prompt text "Charging completed" is displayed in the charging status indicator 504 in user interface 500-5. At this time, the battery power is 100%, and the time shown on the electronic device is 7:00 am, Tuesday, February 11th. That is, this time the electronic device took 10 hours to charge the battery from 10% to 100%.
[0231] It can be understood that when the charging status of the electronic device changes (for example, from fast charging status to slow charging status, from slow charging status to fast charging status) or when the electronic device charges the battery to 100%, the electronic device can turn on the screen and display for a few seconds, and then turn off the screen.
[0232] Optionally, Figure 5F Schematic diagram of the user interface showing the electronic device of user A charging the battery. The set alarm prompt 501-5 can be displayed in user interface 500-6. The set alarm prompt 501-5 indicates that the user has set an alarm. Exemplarily, the user has set an alarm for 7:00 am, Tuesday, February 11th. The time shown on the electronic device is 7:00 am, Tuesday, February 11th. The electronic device starts to display the alarm prompt 505 and play the alarm ringtone. The user can turn off the alarm ringtone through the control 506.
[0233] Figures 6A - 6E Schematic diagram of the user interface showing the electronic device of user B charging the battery provided by the embodiment of the present application. Figure 6A Same as Figure 5A the charging scenario of user A shown, user B also starts connecting the electronic device to the charger at 21:00 at night. The remaining battery power when the electronic device detects the external power supply access is 10%. However, because the charging habits of user A and user B are different. User A usually gets up around 7 am and unplug the charger. While user B gets up around 6:40 am and unplug the charger. Therefore, the predicted remaining charging time of user B's electronic device (for example, Figure 6Aas shown, "remaining charging time: 9 hours and 36 minutes") is different from the remaining charging time predicted by User A's electronic device (e.g., Figure 5A as shown, "remaining charging time: 10 hours"). This way, it better conforms to the user's personal habits.
[0234] Figure 6B shows a schematic diagram of the user interface of User B's electronic device charging the battery. The charging status indicator in the user interface of the electronic device can also be as shown by the charging status indicator 604 in user interface 600-2. The charging status indicator can prompt that the electronic device is rapidly charging the battery.
[0235] Figure 6C shows a schematic diagram of the user interface of User B's electronic device charging the battery. Figure 6C It shows that the electronic device has charged the battery's power from 10% shown in user interface 600-2 to 78% shown in user interface 600-3. When the user interface 600-3 shows that the time in User B's electronic device is 22:15 on Monday, February 10th and the battery's power is 78%, the electronic device charges the battery slowly. Compared with User A's electronic device, the time for User B's electronic device to charge the battery slowly is different.
[0236] Figure 6D shows a schematic diagram of the user interface of User B's electronic device charging the battery. Figure 6D It shows that the electronic device has charged the battery's power from 78% shown in user interface 600-3 to 92% shown in user interface 600-4. The charging status indicator 604 in user interface 600-4 shows the prompt text "rapid charging in progress". At this time, the electronic device charges the battery slowly. The time shown on the electronic device at this time is 6:20 in the morning on Tuesday, February 11th.
[0237] Figure 6E shows a schematic diagram of the user interface of User B's electronic device charging the battery. Figure 6E It shows that the electronic device has charged the battery's power from 92% shown in user interface 600-4 to 100% shown in user interface 600-5. When user interface 600-4 shows that the time in User B's electronic device is 6:36 in the morning on Tuesday, February 11th and the electronic power is 100%, the electronic device has completed charging the battery. Compared with User A's electronic device, the time required for User B's electronic device to charge the battery from 10% to 100% is shorter. The electronic device can predict the charging duration, the first duration, and the second duration according to the specific user. This way, it better conforms to the user's habits, thus enhancing the user experience.
[0238] Figure 7The figure shows a schematic diagram of a user interface when a user uses an electronic device while the electronic device is charging a battery. As shown in user interface 700-1, at this time, the battery power is 60%, and the electronic device charges the battery slowly. If at this time, as shown in user interface 700-2, the user opens a game application to play a game. Then the electronic device will re-determine the duration of fast charging and slow charging for the battery. The electronic device can change from the slow charging state to the fast charging state. As shown in user interface 700-2, a charging prompt box 705 is displayed in the user interface. In the prompt box 705, prompt text can be displayed, such as "Current battery power 60%, fast charging". A control 705-1 can also be displayed in the prompt box 705, and the user can turn off the prompt box 705 through the control 705-1.
[0239] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0240] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0241] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place, or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0242] In addition, in each embodiment of the present application, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0243] When the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs that can store program codes.
[0244] As described above, the above embodiments are only used to illustrate the technical solutions of this application, rather than to limit them; although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of various embodiments of this application.
Claims
1. A charging control method, characterized in that, Including: In response to detecting the access of an external power supply, the electronic device acquires first data, where the first data is used to characterize the state of the electronic device when the external power supply is detected to be accessed; In response to detecting the access of the external power supply, the electronic device starts charging; The electronic device determines a first duration and a second duration according to the first data, where the first duration is used to characterize the predicted charging duration of the electronic device when charging with a first charging parameter, and the second duration is used to characterize the predicted charging duration of the electronic device when charging with a second charging parameter; The electronic device charges according to the first charging parameter, and the charging time is a first actual charging duration, where the first actual charging duration is used to characterize the actual charging duration of the electronic device when charging with the first charging parameter; When the first actual charging duration is equal to the first duration, the electronic device charges according to the second charging parameter, and the charging time is a second actual charging duration, where the second actual charging duration is used to characterize the actual charging duration of the electronic device when charging with the second charging parameter; When the second actual charging duration is equal to the second duration, the electronic device charges according to the first charging parameter; Wherein, the charging efficiency of the electronic device when charging with the first charging parameter is higher than the charging efficiency of the electronic device when charging with the second charging parameter.
2. The method according to claim 1, characterized in that, The first data includes one or more of the time of access of the external power supply, the remaining power when the electronic device detects the access of the external power supply, the type of charger, the time zone where the electronic device is located, the screen on / off information of the electronic device, the set alarm ringing time in the electronic device, the set reminder time point of the to-do list in the electronic device, and the sensor data of the electronic device.
3. The method according to claim 1, wherein The first data includes the time when the external power supply is accessed, and the time when the external power supply is accessed is within the night time period.
4. The method according to claim 3, characterized in that, The night time period is 23:00 - 6:
00.
5. The method according to any one of claims 1-4, characterized in that, The method further includes: In response to detecting a first event, the electronic device stops charging according to the second charging parameter and starts charging according to a third charging parameter; the charging efficiency of the electronic device when charging with the third charging parameter is higher than the charging efficiency of the electronic device when charging with the second charging parameter; Wherein, the first event includes one or more of the number of times the electronic device's screen is on being greater than a first threshold, the screen-on time of the electronic device being greater than a second threshold, the number of times the electronic device's screen is off being greater than a third threshold, the screen-off time of the electronic device being less than a fourth threshold, the power consumption of the electronic device being greater than a fifth threshold, the electronic device starting or using a video application, and the electronic device starting or using a game application.
6. The method according to claim 5, wherein The starting to charge according to the third charging parameter specifically includes: The electronic device charges according to the third charging parameter, and the charging time is a third actual charging duration, where the third actual charging duration is used to characterize the actual time of the electronic device when charging with the third charging parameter; When the third actual charging duration is equal to the third duration, the electronic device charges according to the fourth charging parameter, and the charging time is the fourth actual charging duration; the third duration is used to represent the predicted charging duration of the electronic device charging with the third charging parameter, and the fourth actual charging duration is used to represent the actual charging duration of the electronic device charging with the fourth charging parameter; Wherein, the charging efficiency of the electronic device charging with the third charging parameter is higher than the charging parameter of the electronic device charging with the fourth charging parameter; Wherein, the third duration is determined by the second data, and the second data is used to represent the state of the electronic device when the first event is detected.
7. The method according to claim 6, wherein The second data includes one or more of the time when the electronic device detects the first event, the remaining power when the electronic device detects the first event, the type of charger, the time zone where the electronic device is located, the screen on / off information of the electronic device, the alarm time set in the electronic device, the to-do item time set in the electronic device, and the sensor data of the electronic device.
8. The method according to claim 7, wherein The method further includes: In response to detecting a second event, the electronic device charges according to the first charging parameter, and the second event is used to represent the user preset time recorded by the electronic device; When the remaining power of the electronic device is charged to the first power threshold, the electronic device charges according to the second charging parameter; When it reaches the first time, the electronic device charges according to the fifth charging parameter, and the first time is the time before the user preset time.
9. The method according to claim 8, wherein The second event includes one or more of the alarm ringing time set in the electronic device, the reminder time point set in the memo, the schedule set time point, and the to-do item reminder time point.
10. The method according to claim 9, wherein The electronic device charging according to the second charging parameter specifically includes: The electronic device charges or stops charging according to the second charging parameter.
11. The method according to claim 10, wherein The first charging parameter includes a first charging cut-off voltage and a first charging input power; the second charging parameter includes a second charging cut-off voltage and a second charging input power; the first charging cut-off voltage is greater than the second charging cut-off voltage; the first charging input power is greater than the second charging input power.
12. The method according to claim 11, characterized in that, The third charging parameter and the fifth charging parameter are the same as the first charging parameter; the fourth charging parameter is the same as the second charging parameter.
13. The method according to claim 12, wherein The sum of the first duration and the second duration is not less than the sixth threshold.
14. The method according to any one of claims 6-13, characterized in that Before the electronic device charges according to the first charging parameter and the charging time is the first actual charging duration, it further includes: The electronic device determines that no alarm is set in the electronic device within the first time period after the external power supply is connected, the external power supply is not connected during the period from 23:00 to 6:00, and the sum of the first duration and the second duration is greater than 4 hours; The electronic device charges according to the first charging parameter and the charging time is the first actual charging duration, specifically including: If the electronic device determines that an alarm clock is set in the electronic device within the first time period after the external power supply is connected, the electronic device charges according to the first charging parameter until the remaining power of the electronic device reaches 80%; the electronic device stops charging; If the time when the remaining power of the electronic device reaches 80% is earlier than half an hour before the alarm clock rings, within half an hour before the alarm clock rings, the electronic device charges according to the first charging parameter until the alarm clock rings.
15. The method according to claim 14, characterized in that The electronic device charges according to the second charging parameter, and the charging time is the second actual charging duration, further including: If the second actual charging duration is less than the second duration, and the electronic device obtains that the time in the time zone where the electronic device is located is 6:00, the electronic device stops charging according to the second charging parameter.
16. The method according to claim 15, wherein The electronic device determines the first duration and the second duration according to the first data, including: The electronic device inputs the first predicted charging duration into the second charging model to obtain the first duration and the second duration; the first predicted charging duration is determined by the electronic device according to the first data; the training data of the second charging model includes second input data and second output data; Wherein, the second input data includes a second predicted charging duration, and the second predicted charging duration is determined according to the first historical charging data of the first user; the first historical charging data includes the time when the electronic device starts charging the battery, the power of the battery when the electronic device starts charging the battery, the type of charger, the actual charging duration of the electronic device charging the battery, the time zone, the average charging duration within a week, the power consumption of the electronic device, whether the charging time of the sensor information is a holiday, or more than one of them; Wherein, the second output data includes a first charging duration and a second charging duration, the first charging duration is obtained by subtracting a first correction amount from the actual charging duration of the first user; the second charging duration is equal to the first correction amount; the first correction amount is determined according to the confidence level of the first charging model.
17. The method according to claim 16, characterized in that, The second predicted charging duration is determined according to the first historical charging data of the first user, specifically including: the second predicted charging duration is calculated by the electronic device inputting the first historical charging data into the first charging model; the training data of the first charging model includes first input data and second input data, and the first input data includes the second historical charging data of multiple users; Wherein, the second historical charging data includes the time when the electronic device starts charging the battery, the power of the battery when the electronic device starts charging the battery, the type of charger, the actual charging duration of the electronic device charging the battery, the time zone, the average charging duration within a week, the power consumption of the electronic device, whether the charging time of the sensor information is a holiday, or more than one of them.
18. An electronic device includes one or more touchscreens, one or more memories, and one or more processors; wherein the one or more memories store one or more programs; characterized in that, When the one or more processors execute the one or more programs, the electronic device implements the method according to any one of claims 1 to 17.
19. A computer storage medium, characterized in that, It includes computer instructions that, when running on an electronic device, cause the electronic device to execute the method according to any one of claims 1-17.
Citation Information
Patent Citations
Mobile terminal and controlling method thereof
CN104378497A
Intelligent Context Based Battery Charging
CN105684260A
Electronic device including battery and method of controlling charging thereof
EP3518380A1
Intelligent context based battery charging
US20150123595A1
Charging control system and charging control device
US20200076223A1