Swarm robots can rely on swarm intelligence algorithm to effectively divide and cooperate to complete complex and large-scale tasks, which have great application value in the fields of logistics, manufacturing, transportation and military. However, the existing charging methods cannot meet the continuous charging needs of swarm robots, resulting in their strong cooperative ability not being brought into full play. Therefore, this paper proposes a dynamic wireless charging mode of swarm robots based on array transmitting module, which can supply real-time power for swarm robots in the working process. Firstly, this paper analyzes the fluctuation characteristics of power and efficiency during dynamic wireless charging of the robot. Secondly, with the goal of optimal charging efficiency during robot motion, this paper proposes an improved ant colony algorithm with penalty mechanism and a cooperative work mode, and applies them to a swarm robot cooperative dynamic wireless charging system. Finally, simulation experiments are carried out to verify that the proposed method can realize the stable and reliable cooperative work of swarm robots in the process of dynamic wireless charging. The research of this paper can greatly promote the research of swarm intelligence.