人工免疫算法具有良好的特性,已被广泛应用于入侵检测、信息恢复、数据挖掘等领域的研究中,否定选择算法是人工免疫算法中的典型算法,但存在重复检查、检测器查找效率低及逐位比较的时间和空间开销大等问题.我们分析否定选择算法中匹配算法的特点,设计自体、检测器和抗原中检测元素的转换算法,提取自体数、检测数和待检数;引入红黑树建立索引,设计基于红黑树的快速否定选择算法,避免反复提取子串和重复比较等问题,提高检测效率.最后实现了快速否定选择算法的原型系统.测试、比较了否定选择算法和基于红黑树快速否定选择算法的检测效率,测试结果表明使用基于红黑树快速否定选择算法检测抗原,能有效的减少比较次数,提高检测效率.
Artificial immune algorithm has been used to many fields researching such as intrusion detection system, information retrieval system and data mining system. Negative selection algorithm is the typical method for artificial immune algorithm. But it is not efficient because that checking antigen repeated using same sub-string, finding detector method is slow and com- paring detector of antigen by bit need large consumption. By analyzing antigen, detector and matching rules of them, this paper presents conversion algorithm to convert self to some self-numbers, convert detector to detector-numbers and convert antigen to some antigen-numbers. Then giving the red-black tree based negative selection algorithm to index self-number and detector- number. It can avoid checking antigen and obtaining sub-string repeatedly. Using efficient negative selection algorithm and negative selection algorithm to realize prototype, testing and comparing their performance, the result proves efficient negative selection algorithm can reduce the number of comparing detector of antigen, and increase efficient of negative selection algorithm.