CPC G06F 1/3278 (2013.01) [G06F 1/3212 (2013.01)] | 20 Claims |
1. A system power consumption control method, comprising:
determining, by an electronic device, that the electronic device has entered a first mode, wherein the first mode comprises a sleep mode, a low-power state, or an idle state of the electronic device;
determining, by the electronic device, a first power loss amount of a battery and a first communication count of background processes, wherein the first power loss amount is a decrease of power with respect to power at a first moment, the first moment is a moment at which the electronic device enters the first mode, and the first communication count is used for indicating a total communication count of all processes currently running in the background with other devices since power-on of the electronic device;
obtaining, by the electronic device, power of the battery corresponding to a second moment and current power of the battery corresponding to a current moment, wherein the second moment is a start moment of a second preset duration, and the second preset duration is a duration within which power records are kept;
obtaining, by the electronic device, a second power loss amount corresponding to the current moment by subtracting the current power of the battery from the power of the battery corresponding to the second moment, wherein the second preset duration is greater than a first preset duration;
obtaining a communication count corresponding to the second moment and a current communication count corresponding to the current moment;
obtaining a communication count variation by subtracting the communication count corresponding to the second moment from the current communication count; and
in response to the electronic device determining that within the first preset duration, the second power loss amount has reached a preset power threshold and the communication count variation has reached a preset variation, disabling, by the electronic device, a network communication connection of the electronic device.
|