With the application of digital manufacturing technology and intelligent manufacturing technology in manufacturing industry, the existing simulation and monitoring methods of machine tools can not meet the requirements of enterprises, and gradually tend to use digital twin, OPC and other technologies to remote simulation and monitoring of machine tools. In order to prevent the accidental collision of machine tools, this paper builds the virtual model of machine tools based on the digital twin (DT) technology, detects the tool and machine tool collision model based on the improved GJK collision detection algorithm, and automatically controls the machine tool to stop when the tool and machine tool are about to collide. In order to improve the level of machine tool intelligent management, potential information extraction machine run time, this paper proposes a fast simulation method, machine tool CNC code used to detect the code is correct, and in the process of running through a visual component implementation monitoring the running state of the machine tool manufacturing process by monitoring data visualization and testing of large data, extracting the potential information, Realize the online prediction function of tool wear. Taking a turning process of Marine diesel engine cylinder liner as an example, the experimental test results show that the system can quickly judge the correctness of CNC code, effectively monitor the data of machine tool, predict tool wear degree and reduce the risk of tool collision.