1. A method for obtaining virus signatures, comprising: obtaining text strings contained in each virus sample within a virus sample set; selecting the text strings for use as virus signatures candidate according to a first frequency at which each text string occurs in a non-virus sample set and a second frequency at which each text string occurs in the virus sample set; calculating information entropy of the virus signatures candidate according to a quantity of virus samples containing the virus signatures candidate and a quantity of non-virus samples containing the virus signatures candidate; and selecting virus signatures from the virus signatures candidate according to the information entropy.