To achieve full coverage path planning for lake surfaces and reduce the repetition rate of travel paths for water surface garbage cleaning robots, a full coverage path planning algorithm combined with the A* algorithm has been designed, integrating the Zigzag_path function with the A* algorithm, and optimizations were made targeting the issue of path repetition rates. And the the results of the program before and after optimization were compared. The results of the program indicate that the optimized program is capable of fulfilling the requirements of full coverage for water surface garbage cleaning robots and has significantly reduced the repetition rate of paths.