The accuracy of data-driven intelligent prediction for machining quality relies on the training samples. However, in actual applications, the continuous operation of machining equipment leads to gradual distribution shifts between the process data and the training samples for modeling. The shifts result in a degradation in the performance of predictive model, previous studies have often overlooked this issue. To tackle with the intricate problem, this research proposes a real-time model optimization approach. Firstly, a method for detecting machining data distribution shifts based on the two-sample Kolmogorov-Smirnov (KS) test is proposed. Then, an adaptive hybrid prediction model (AHPM) capable of real-time optimization is developed. This model consists of a deep neural network (DNN) and a broad learning system (BLS). DNN plays a primary role in prediction within the hybrid model with excellent generalization capability. BLS quickly completes optimization prior to DNN with its unique parameter update mechanism to compensate for prediction loss. Experimental results indicate that AHPM achieves the shortest optimization time while maintaining high accuracy, with post-optimization error reduction rates for MSE, MAE, and MAPE all exceeding 10%. In the test of application to actual machining cases, accuracy improved by 8.88% compared to traditional methods without optimization.