In response to the low efficiency issues in robot task scheduling and automated processes within coal sample automatic preparation systems,a solution based on optimization algorithms is proposed.This solution involves adopting a robot task scheduling model and applying algorithms such as Genetic Algorithm and Particle Swarm Optimization for solving the model.The application of these optimization techniques resulted in a significant improvement in system operation efficiency and a reduction in energy consumption.Furthermore,the optimized system demonstrated clear advantages in terms of task execution speed and resource utilization,providing guidancefor the intelligent development of the coal industry.