Patent attributes
A battery charging method is disclosed. The method includes: obtaining historical working durations in which the electronic device was powered by a battery of the electronic device; in response to an electronic device connected to a charging power source, obtaining a remaining battery level and a target capacity of a battery of the electronic device, and accordingly defining a capacity to be charged; obtaining a current system time when the electronic device is connected to the charging power source; obtaining a specific time difference between the current system time and a predicted working duration, wherein the predicted working duration is a specific working duration chosen from the historical working durations subsequent to the current system time; and using the capacity to be charged to correspond to the specific time difference to obtain a predicted charging current value.