Malicious advertisement recognition method and device

The embodiment of the invention discloses a malicious advertisement recognition method and device. The method comprises the following steps: acquiring an information source; sliding a slide window of first time length from a first end of the information source to a second end of the information source at firs slide speed; scanning N or more similar information elements in an information unit of the information source covered at each pause of the slide window and determining that the plural similar information elements are malicious advertisements, wherein N is an integer which is greater than or equal to 2, and the plural similar information elements indicate that plural information elements with similarity of being greater than a first threshold value. Correspondingly, the embodiment of the invention provides a malicious advertisement recognition device. According to the embodiment of the invention, malicious advertisements can be quickly and effectively recognized.