This paper explores the hazard classification method of blasting vibration on nearby buildings. The ratio of the self-vibration frequency f0 of the protected buildings to the main vibration frequency f of blasting vibration and the ratio of the actual measured peak blasting vibration velocity to the permissible vibration velocity of blasting safety regulations are used as two indicators of the blasting vibration hazard classification method, the blasting vibration hazard index calculation formula was proposed, and the blasting vibration hazard was classified into four levels according to the blasting vibration hazard index. An open pit mine blasting project was used for monitoring, the collected data were processed by random forest method. After processing, bursting heart distance, the total explosive quantity required for one blast, the hole distance meter delay, and the row distance meter delay was selected as the input parameters; the optimal kernel function parameter gamma and c were applied to the SVR (Support Vector Regression) model by changing the search step to expand the parameter search, and improved GS-SVR (Grid Search-Support Vector Regression) model was constructed, through which peak blasting vibration velocity and vibration frequency values were predicted. The results show: improved GS-SVR is effective in predicting peak blasting vibration velocity, with the lowest relative error of 0.15% and the average error of 7.96%; the minimum relative error for the prediction of vibration frequency is 0.03% and the average error is 2.54%. The measured data in the literature of related scholars verified that the blasting vibration hazard classification method is scientific and feasible. It can provide reference and reference for blasting vibration hazard classification and prediction of similar blasting projects.