Datacenter Power Consumption Regulation towards Specific Targets in Smart Grid Environment