In order to solve the problems of unbalanced load, slow convergence speed and low utilization of virtual machine resources existing in the previous task scheduling optimization strategies, this paper proposes a task scheduling optimization strategy using improved ant colony optimization algorithm in cloud computing. Firstly, based on the principle of cloud computing task scheduling, a scheduling model using improved ant colony algorithm is proposed to avoid the optimization strategy falling into local optimization. Then, task scheduling satisfaction function is constructed by combining the three objectives of the shortest waiting time, the degree of resource load balance and the cost of task completion to search the optimal solution of task scheduling. Finally, the reward and punishment coefficient is introduced to optimize the pheromone updating rules of ant colony algorithm, which speeds up the solution speed. Besides, we use dynamic update of volatility coefficient to optimize overall performance of this strategy, and introduce virtual machine load weight coefficient in the process of local pheromone updating, so as to ensure the load balance of virtual machine. The feasibility of our algorithm is analyzed and demonstrated by experiments with Cloudsim. The experimental results show that the proposed algorithm has the fastest convergence speed, the shortest completion time, the most balanced load and the highest utilization rate of virtual machine resources compared with other methods. Therefore, our proposed task scheduling optimization strategy has the best performance.