Focusing on CNC process data, this paper provides an in-depth analysis, characterization and mining of macro machining processes by associating CAD and CAM models. The article introduces a Bayesian inference method to construct an association relationship between the manufacturing features of the query part and the macroscopic process of the manufactured part, which avoids the need for a direct similarity comparison between the geometry of the query part and the part to be manufactured. In addition, the study calculated the overall similarity between the query part and the CNC programming process data instances through the guidance of the process skeleton, thus realizing the precise evaluation from the CNC programming perspective. The algorithm for generating tool trajectories in multi-axis CNC programming is analyzed. By selecting representative surfaces and performing tool processing calculations, this study explores the process planning and tool parameter selection of usual parts of surfaces in multi-axis CNC programming machining. It optimizes the nonlinear error in tool trajectory processing by combining CAD/CAM technology. The results show that the optimized process proposed in this paper significantly improves the machining efficiency by 36.94%. In the cutting at tool corners, the maximum cutting force generated by the optimized machining process is only 190.3N, which is only 67.2% of the leading cutting force of the Cimatron process. In addition, when the engagement frequency is 780 Hz, the optimized process proposed in this paper has the smallest vibration amplitude, which is only 21.4% of the Cimatron strategy. Therefore, this study significantly improves the machining efficiency while ensuring the machining quality, which has important practical application value.