This paper first briefly introduces the application model of digital twin technology in crane operation, and then preprocesses the images taken during transmission and transformation crane operation using algorithms such as image enhancement and image edge detection, and detects and recognizes the operation of transmission and transformation cranes through an improved YOLOv5 model. After that, a raster map of point cloud data was drawn through the fusion of LiDAR and depth camera data, and an improved A* algorithm was proposed to realize the dynamic planning of transmission and substation crane operation by combining the operation characteristics of the transmission and substation crane hoisting equipment. The results show that the improved YOLOv5 algorithm has high detection accuracy and detection performance on the dataset. Meanwhile, the improved YOLOv5 target detection algorithm realizes the detection and determination of three types of violations with better detection accuracy. The improved A* algorithm significantly reduces the turning angle, the number of turns and the average number of search nodes by 77.19%, 40% and 39.2% compared with the traditional A* algorithm, which shortens the path planning time and the length of the planned path during the operation of the transmission and transformation crane. The improved A* algorithm is able to meet the global path planning requirements of the operation process of transmission and transformation cranes, and realize the dynamic control of the operation process of transmission and transformation cranes.