摘要: 提出了一种直接扫描电子邮件内容的多关键词匹配算法。邮件文本多采用Base64编码,由于Base64编码是前后相关的,因此完成匹配需要特殊的处理。该文提出的算法在不进行Base64解码的情况下,直接对邮件内容进行扫描匹配;同时针对Base64的编码结果是32位整型数据流的性质,该算法以32位块进行匹配操作,从而获得了比8位块的匹配更高的效率。实验结果表明,该算法比“解码-再匹配”策略快,比直接检索原始文本方法也要快。
关键词:
垃圾邮件,
直接多关键词匹配,
串匹配,
Base64
Abstract: A direct multi-string matching algorithm is presented to anti-spam. For the content of e-mail is usually Base64 encoded, which is context sensitive, hence, a special matching algorithm is needed. This paper proposes an algorithm to direct-match without decoding. On the other hand, for the encoding results of Base64 are 32-bit streams,it utilizes 32-bit block instead of 8-bit ones to speed up. Experiment shows that the algorithm run faster than both the "decode-matching" method and direct-match in original contents.
中图分类号:
刘萍,谭建龙,沙瀛. 针对垃圾邮件的直接多关键词匹配算法[J]. , 2005, 31(13): 68-70.
LIU Ping, TAN Jianlong, SHA Ying. Algorithm of Direct Multi-string Matching to Anti-spam[J]. , 2005, 31(13): 68-70.