With the continuous improvement of low-carbon policy and power market, in order to improve the accuracy of power load forecasting, a short-term and medium-term power load forecasting method based on STL-LightGBM is proposed: a sliding window-based data denoising and feature construction method is proposed on the basis of a large amount of data; a shortterm power load forecasting model is constructed based on the STL-LightGBM algorithm, and After the STL time series decomposition, the trend term, seasonal term and residual term are input into the LightGBM model for prediction; the parameters of the prediction model are tuned by using grid search; Several prediction models are set up for comparison experiments, and the experimental results show that the proposed method can effectively improve the short-term and medium-term prediction accuracy of active power of regional power system load which unit is kilowatts(KW).