The thermal errors (TE) of computer numerical control (CNC) in workshop production seriously reduces the productivity. Therefore, to improve the productivity of CNC and enhance production intelligence, an improved adaptive TE compensation model (TECM) is proposed. The model is based on an online temperature measurement system (OTMS), which improves the adaptive learning rate of back-propagation neural network (BPNN) for temperature prediction. Finally, the correlation value between temperature changes and TEs is used for thermal error compensation. The performance verification of the model shows that the proposed OTMS can achieve effective temperature acquisition and processing, and the prediction ability of the improved BPNN is significantly higher than that of other prediction algorithms. Finally, it is found in the test that the improved adaptive TECM can reduce the contour error of workpiece machining to within 0.02×10-3 mm, the machining accuracy of CNC is significantly improved. The above results show that using the improved adaptive TECM can promote the intelligent development of CNC and improve their machining accuracy, which is of great significance to the development of workshop manufacturing.