西安电子科技大学学报 ›› 2024, Vol. 51 ›› Issue (6): 149-158.doi: 10.19665/j.issn1001-2400.20240913

• 计算机科学与技术 & 网络空间安全 • 上一篇    下一篇

基于智能规则存储匹配模型的包分类算法研究

李卓1,2,3,4(), 王童彤1,4(), 刘开华4,5()   

  1. 1.天津大学 微电子学院,天津 300072
    2.鹏城国家实验室,广东 深圳 518000
    3.天津市成像与感知微电子技术重点实验室,天津 300072
    4.天津市数字信息技术研究中心,天津 300072
    5.天津仁爱学院,天津 300072
  • 收稿日期:2024-03-22 出版日期:2024-12-20 发布日期:2024-10-09
  • 作者简介:李 卓(1984—),男,副教授,E-mail:zli@tju.edu.cn;
    王童彤(1998—),女,天津大学硕士研究生,E-mail:tt_wang@tju.edu.cn;
    刘开华(1956—),男,教授,E-mail:liukaihua@tju.edu.cn
  • 基金资助:
    国家重点研发计划(2022YFB2901100);国家重点研发计划(2022ZD0115303);鹏城实验室算力网重大攻关项目(PCL2023A06)

Research on the packet classification algorithm based on the intelligent rule storage matching model

LI Zhuo1,2,3,4(), WANG Tongtong1,4(), LIU Kaihua4,5()   

  1. 1. School of Microelectronics,Tianjin University,Tianjin 300072,China
    2. Peng Cheng Laboratory,Shenzhen 518000,China
    3. Tianjin Microelectronics Technology Key Laboratory of Imaging and Perception,Tianjin 300072,China
    4. Tianjin Digital Information Technology Research Center,Tianjin 300072,China
    5. Tianjin Ren’ai College,Tianjin 300072,China
  • Received:2024-03-22 Online:2024-12-20 Published:2024-10-09

摘要:

在包分类技术研究中,设计高效的索引结构以实现数据包的快速匹配是有效包分类的关键。因此,为了提升基于哈希方法的包分类算法的存储效率,解决规则存储映射不均匀、易产生大量哈希冲突的问题,设计了一种规则存储匹配模型。该模型可实现更均匀的规则存储映射,进而提升分类子集内规则的存储效率。基于该模型,提出了一种包分类算法。该算法首先利用前缀长度压缩算法将规则集划分为多个子集,再为每个子集设置相同的存储结构。该存储结构包括标识信息处理单元、数据索引模型单元和规则查询匹配单元,其中数据索引模型单元包含了规则存储匹配模型,可实现子集内部规则的高效映射与存储,进而提升包分类的整体性能。实验表明,相比于现有算法,该算法的分类吞吐量平均提升1倍、存储消耗平均减少约20%、更新速度平均提升3倍,规则映射的均匀程度也有所提升。

关键词: 包分类, 规则存储匹配模型, 索引结构设计

Abstract:

In the research on packet classification technology,designing an efficient index structure to achieve fast packet matching is the key to effective packet classification.Therefore,in order to improve the memory utilization of packet classification technology based on hash-based methods,a rule storage matching model is proposed to achieve more uniform mapping and reduce hash collisions.This model can support more uniform rule storage mapping within a classification subset.Based on this model,a packet classification algorithm is proposed,which uses the Prefix Length Reduction algorithm to divide the ruleset into multiple subsets,and then the same storage structure is allocated for each subset.This storage structure includes an identification information processing unit,a mapping model unit and a rule query matching unit.In the packet classification stage,the identification information processing unit converts the packet headers into multi-dimensional vectors and then these vectors are input to the mapping model unit.Based on the output of the model,the matching rules can be retrieved from the rule query matching unit.Experimental results show that,compared with the existing algorithms,the proposed algorithm doubles the classification throughput,reduces the storage consumption by about 20% on average and increases the update speed by 3 times on average with the uniformity of the rule mapping also improved.

Key words: packet classification, rule storage matching model, index structure design

中图分类号: 

  • TP393.0