Abstract:Based on probability and statistics theory,Bayesian method is applied to filter the garbage message from the contents of package message.Bayesian method will first analyzes large quantity of relative and irrelative messages to get the probability of words appearance.Then a word characteristic table will be built up,based on which the judgment of the relativity of the object file will be made through a grading system.This Bayesian method is of some self-adaptable ability,can automatically make word characteristic-table updated according to the variety of the"garbage message",and there- fore could improve its own judgment efficiency in real time.