| CPC G06F 9/4881 (2013.01) [G06F 9/485 (2013.01); G06F 11/3419 (2013.01); G06F 2209/486 (2013.01); G06F 2209/508 (2013.01)] | 17 Claims |

|
1. A method for determining hardware usage implemented by a processor, including:
determining initial period duration and initial task duration corresponding to a current period, and executing at least one task in the current period by means of a hardware module;
receiving a usage invoking request at a current time point;
determining current task duration corresponding to the current time point based on task duration of tasks executed by the hardware module at the current time point and the initial task duration;
determining current period duration corresponding to the current time point based on the initial period duration and a difference between the current time point and a starting time point corresponding to the current period; and
determining, based on the current task duration and the current period duration, hardware usage of the hardware module that is requested by the usage invoking request,
wherein the determining initial period duration and initial task duration corresponding to a current period includes:
obtaining total duration and total task duration of a previous period before the current period;
determining the initial period duration corresponding to the current period based on the total duration of the previous period and a preset weighted ratio; and
determining the initial task duration corresponding to the current period based on the total task duration of the previous period and the preset weighted ratio.
|