The invention relates to a cost and time aware task scheduling method, device and equipment and a storage medium, the method is applied to a multi-cloud environment comprising a plurality of cloud service providers (CSPs), each CSP comprises a plurality of
virtual machine instances, and the method comprises the steps of obtaining to-be-scheduled tasks, and sorting the to-be-scheduled tasks; obtaining to-be-scheduled task information and multi-cloud environment information, and determining a
state space, an action space and a reward function according to the to-be-scheduled task information and the multi-cloud environment information; the reward function comprises a
completion time reward and a cost penalty term; a task scheduling problem forms a Markov
decision process MDP, and a deep Q network DQN model is used for training; and determining an
optimal scheduling strategy of a task scheduling problem by utilizing the trained DQN model, and allocating a corresponding
virtual machine instance to a to-be-scheduled task according to the
optimal scheduling strategy. A reward function of the DQN model comprises a
completion time reward and a cost penalty term, so that a scheduling strategy made by the model can give consideration to the
completion time and execution cost of a task at the same time.