The high false alarm rate appears during the traditional spam recognition method processing the large-scale unbalanced data. A method which transforms the unbalanced issue into the balanced issue is proposed, when the K-means clustering algorithm is improved based on the support vector machine classification model, to obtain the balanced training set. Firstly, the improved K-means clustering algorithm clusters spam and extracts the typical spam,then the training set consists of the typical spam and legitimate messages, and finally the goal of the filtration of spam is realized by trained SVM classification model. Comparing the K-SVM filtration method to standard SVM method through the experiment, the result indicates that the K-SVM filtration method in large-scale unbalance data set can obtain high classified efficiency and the generalization performance.