To protect the electromagnetic environment and understand its current state in a timely manner, monitoring the electromagnetic environment has great practical significance, while massive amounts of data are generated. It is crucial to utilize data mining technology to extract valuable information from these massive amounts of data for effective spectrum management. Traditional spectrum prediction methods do not integrate the prior information of spectrum resource occupancy, so that the prediction of the channel state of a single frequency point is of limited significance. To address these issues, the paper describes a dynamic threshold algorithm which mines bottom noise and spectrum resource occupancy from massive electromagnetic environment data. Moreover, the paper describes a joint time-frequency spectrum resource prediction algorithm based on the time-frequency block residual LSTM (TFBRL) network, which utilizes hourly time closeness, daily period, and annual trend as prior knowledge of spectrum resources. The TFBRL network comprises three main parts: (1) a residual convolution network with a squeeze-and-excitation (SE) attention mechanism, (2) a long short term memory (LSTM) model with memory ability to capture sequence latent information, and (3) a feature fusion module based on a matrix to combine time closeness, daily period, and annual trend feature components. Experimental results demonstrate that the TFBRL network outperforms the baseline networks, improving by 31.37%, 16.00% and 13.06% compared with the best baseline for MSE, RMSE and MAE, respectively. Thus, the TFBRL network has good risk prediction performance and lays the foundation for subsequent frequency scheduling.