A cleaning robot and a shortest path planning method based on a cleaning robot are disclosed, a plurality of cleaning lines are formed by controlling the cleaning robot to perform cleaning in an area according to a zigzag-shaped path; association information of midpoints of at least a part of the cleaning lines is recorded to form a node skeleton tree in which midpoints are represented by nodes, the association information of each midpoint includes: position information of a node corresponding to the midpoint, position information of a parent node, and information of the number of child nodes of the parent node; in the process of traversing upwardly from a current node or traversing upwardly from both a current node and a target node in the node skeleton tree, the node skeleton tree is compressed, so as to determine the shortest planned path from the current node to the target node.
展开▼