Glucose trend prediction based on continuous glucose monitoring (CGM) data is a crucial step in the implementation of an artificial pancreas (AP). A glucose trend prediction model with high accuracy in real-time can greatly improve the glycemic control effect of the artificial pancreas and effectively prevent the occurrence of hyperglycemia and hypoglycemia. In this paper, we propose an improved wavelet transform threshold denoising algorithm for the non-linearity and non-smoothness of the original CGM data. By quantitatively comparing the mean square error (MSE) and signal-to-noise ratio (SNR) before and after the improvement, we prove that the improved wavelet transform threshold denoising algorithm can reduce the degree of distortion after the smoothing of CGM data and improve the extraction effect of CGM data features at the same time. Based on this, we propose a glucose trend prediction model (IWT-GRU) based on the improved wavelet transform threshold denoising algorithm and gated recurrent unit. We compared the RMSE, MAPE, and \({R}^{2}\) of RNN, LSTM, SVR, GRU, and IWT-GRU on the original CGM monitoring data of 80 patients for 7 consecutive days with different Prediction Horizon (PH). The results showed that the IWT-GRU model outperformed the other four models. At PH = 45 min, the RMSE was 0.5537 mmol/L, MAPE was 2.2147%, \({R}^{2}\) was 0.989, and the average runtime was only 37.2 seconds. Finally, we analyze the limitations of this study and provide an outlook on the future direction of blood glucose trend prediction.