WO2021218854A1 - 报文分类方法及装置、电子设备、可读介质 - Google Patents

报文分类方法及装置、电子设备、可读介质 Download PDF

Info

Publication number
WO2021218854A1
WO2021218854A1 PCT/CN2021/089612 CN2021089612W WO2021218854A1 WO 2021218854 A1 WO2021218854 A1 WO 2021218854A1 CN 2021089612 W CN2021089612 W CN 2021089612W WO 2021218854 A1 WO2021218854 A1 WO 2021218854A1
Authority
WO
WIPO (PCT)
Prior art keywords
bit
message
rules
tree
classification rule
Prior art date
Application number
PCT/CN2021/089612
Other languages
English (en)
French (fr)
Inventor
王思宇
刘峰松
李宁
朱智华
刘衡祁
Original Assignee
深圳市中兴微电子技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市中兴微电子技术有限公司 filed Critical 深圳市中兴微电子技术有限公司
Priority to EP21795621.8A priority Critical patent/EP4145777A4/en
Publication of WO2021218854A1 publication Critical patent/WO2021218854A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/742Route cache; Operation thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]

Definitions

  • the embodiments of the present disclosure relate to the field of communication technology, and in particular to a method and device for message classification, electronic equipment, and a readable medium.
  • the embodiments of the present application provide a message classification method and device, electronic equipment, and readable medium.
  • an embodiment of the present disclosure provides a message classification method.
  • the method includes: searching a first multi-bit shrub set according to a search key value of the message to be classified, and obtaining a second message matching the message to be classified.
  • a set of message classification rules where the first set of multi-bit dwarf trees includes multi-bit dwarf trees, and the multi-bit dwarf tree is a decision tree constructed according to the rules in the first message classification rule set; in the second message classification rule set The rules for classifying messages to be classified and determining the message type of the messages to be classified.
  • an embodiment of the present disclosure provides a message classification device, which includes: a search module configured to search for a first set of multi-bit dwarf trees according to the search key value of the message to be classified, and obtain information related to the message to be classified.
  • the matched second set of packet classification rules where the first set of multi-bit dwarf trees includes multi-bit dwarf trees, and the multi-bit dwarf tree is a decision tree constructed according to the rules in the first packet classification rule set; classification module, configuration
  • the message type of the messages to be classified is determined.
  • embodiments of the present disclosure provide an electronic device, which includes: one or more processors; a storage device, on which one or more programs are stored, when one or more programs are processed by one or more The processor executes, so that one or more processors implement the method described in the first aspect.
  • embodiments of the present disclosure provide a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect is implemented.
  • FIG. 1 is a schematic flowchart of a message classification method according to an embodiment of the present disclosure.
  • Figure 2 is a schematic diagram of the structure of a multi-bit shrub in the present disclosure.
  • FIG. 3 is a flowchart of a method for inserting a message classification rule to be updated into a multi-bit shrub in the present disclosure.
  • FIG. 4 is a schematic flowchart of a message classification method according to another embodiment of the present disclosure.
  • Fig. 5 is a block diagram of the composition of a message classification device provided by an embodiment of the present disclosure.
  • Fig. 6 is a block diagram of the composition of the search module implemented in the form of a multi-bit short tree in the present disclosure.
  • FIG. 7 is a block diagram of the composition of a message classification device provided by another embodiment of the present disclosure.
  • FIG. 8 is a structural diagram of an exemplary hardware architecture of an electronic device of the message classification method and apparatus according to the embodiments of the present disclosure.
  • Fig. 1 shows a schematic flowchart of a message classification method according to an embodiment of the present disclosure.
  • the message classification method can be applied to a message classification device.
  • the message classification method includes the following steps.
  • the message to be classified includes a search key, and the search key is a number of fields extracted from the complete message to be classified, for example, some identifiers in the header information of the message to be classified.
  • the first multi-bit dwarf tree set includes a multi-bit dwarf tree, and the multi-bit dwarf tree is a decision tree constructed according to the rules in the first message classification rule set.
  • each node in a multi-bit shrub can have multiple subtree branches.
  • a multi-bit shrub has fewer tree nodes, for example, only has 3 levels of tree nodes, or 4 levels of tree nodes, and so on.
  • FIG. 2 is a schematic diagram of the structure of a multi-bit dwarf tree in specific implementation.
  • the multi-bit dwarf tree includes a three-layer tree structure, specifically including a layer 0 node (ie, a root node 200), a layer 1 node, and a layer 2 node.
  • the first-level node includes a plurality of first-level tree nodes 210;
  • the second-level node includes a plurality of leaf nodes 220.
  • the leaf nodes 220 of the multi-bit shrub are all located in the last layer, and the multi-bit shrub is full.
  • the advantage of building a multi-bit dwarf tree into a full tree is that only simple decision logic is required to directly store the rules in the first packet classification rule set into the random access memory (Random Access Memory, RAM) without consideration.
  • RAM Random Access Memory
  • step 110 can be implemented in the following manner: according to the search key value, search for the multi-bit dwarf tree in the first multi-bit dwarf tree set in parallel to obtain the primary message classification rule set; The rules in the primary message classification rule set are compared, and the second message classification rule set is obtained by screening, where the rules in the second message classification rule set are rules that match the message to be classified.
  • the search key is used as an index, and the tree nodes and leaf nodes of each multi-bit shrub in the first multi-bit shrub set are searched in parallel until the corresponding search key is found.
  • Message classification rules these message classification rules form a set of primary message classification rules.
  • the search key is finely compared with each packet classification rule in the primary packet classification rule set (for example, a bit-level comparison is performed), and the second packet classification rule set is obtained by screening. This makes the rules in the second packet classification rule set more suitable for classifying packets to be classified.
  • Step 120 Classify the message to be classified according to the rules in the second message classification rule set, and determine the message type of the message to be classified.
  • step 120 can be implemented in the following manner: obtain the priority level corresponding to the rule in the second packet classification rule set; perform priority arbitration on the rule in the second packet classification rule set according to the priority level, Generate optimal message classification rules; classify the messages to be classified according to the optimal message classification rules, and determine the message type of the messages to be classified.
  • the priority level corresponding to the rules in the second packet classification rule set can be manually set or determined according to the degree of matching between different rules and the packets to be classified.
  • the priority level is only an example here. It is noted that other methods for setting priority levels are also within the protection scope of the present disclosure, and will not be repeated here.
  • a small number of escape bucket message classification methods or a TCAM message classification method can also be used to classify messages to be classified, and a small number of escape bucket classification rules and TCAM classification rules are generated. Then perform priority arbitration again on the optimal message classification rules, a small number of escape bucket classification rules, and TCAM classification rules to generate the final message classification rules; use the final message classification rules to classify the messages to be classified to obtain more information.
  • the precise message type of the message to be classified It should be noted that the above description of the message classification method is only an example, and can be specifically set according to specific needs. Other message classification methods that are not illustrated can also be used in combination with the message classification method in this disclosure. , And perform priority arbitration on the generated multiple message classification rules, so as to obtain a more accurate message classification method, which will not be repeated here.
  • the first multi-bit shy tree set is searched according to the search key value of the message to be classified, and the second set of message classification rules matching the message to be classified is obtained, wherein,
  • the first multi-bit dwarf tree set includes a multi-bit dwarf tree, and the multi-bit dwarf tree is a decision tree constructed according to the first packet classification rule set.
  • the hardware structure using the message classification method has a shorter pipeline stage, thereby reducing the search delay.
  • Classify the message to be classified according to the rules in the second message classification rule set to determine the message type of the message to be classified, and improve the classification correctness and accuracy of the message to be classified. For different message classification rules, there is no need to change the hardware resource settings, and it has good scalability.
  • a linked list can be used to associate the constructed multi-bit dwarf trees to form a multi-bit dwarf tree set, and insert the message classification rules to be updated into a tree in the multi-bit dwarf tree set, or Other collection forms are used to implement the insertion of message classification rules.
  • the insertion of rules may trigger the reconstruction of one or some tree nodes of a single multi-bit dwarf tree, or it may trigger the partial reconstruction of multiple multi-bit dwarf trees.
  • the reconstruction brings the update requirement of multiple RAM contents. Use the bubble method to perform the insertion one by one, and follow the update principle of insert first, then delete, to ensure that the system still has real-time search capabilities while updating.
  • the message classification rule stored in the multi-bit short tree is updated, ensuring that the change of the message classification rule can be dynamically supported.
  • the multi-bit short tree When applying the multi-bit short tree to the hardware structure, there is no need to extract all the message classification rules in advance and perform a lot of preprocessing, so that by inserting or deleting the multi-bit short tree, a dynamic update report can be realized.
  • Document classification rules avoid the cumbersome preprocessing and improve processing efficiency.
  • FIG. 3 is a flowchart of a method for inserting a message classification rule to be updated into a multi-bit short tree. As shown in FIG. 3, inserting the message classification rule to be updated into the multi-bit short tree in step 130 includes steps 131 to 133.
  • Step 131 Traverse the first set of multi-bit shrubs, and determine whether the multi-bit shrubs in the first set of multi-bit shrubs have space to store the message classification rules to be updated.
  • step 132 if it is determined that the multi-bit shrubs in the first multi-bit shrub set have space to store the message classification rules to be updated, step 132 is executed, otherwise, step 133 is executed.
  • Step 132 Construct a new multi-bit shrub tree according to the message classification rules to be updated.
  • the bit decision method can be used to process the message classification rules to be updated to determine the storage address information of the tree nodes of each layer of the new multi-bit shrub; finally, the message classification rules to be updated are filled into In the new multi-bit dwarf tree, the construction of a new multi-bit dwarf tree is completed.
  • Step 133 According to the filling degree of the multi-bit shrub and the preset filling degree threshold, the message classification rule to be updated and the multi-bit shrub in the first multi-bit shrub set are reconstructed.
  • the specific reconstruction process includes: comparing whether the fullness of each multi-bit short tree in the first multi-bit short tree set FT_list is less than a preset fullness threshold, selecting multi-bit short trees with a fullness less than the preset fullness threshold, and obtaining the first multi-bit short tree.
  • a set of two-bit short trees; then the second set of multi-bit short trees and the message classification rule to be updated (that is, p_rule) are put into a temporary rule set, and the temporary rule set is marked as Rtemp. Then, reconstruct the multi-bit shrubs in the temporary rule set Rtemp to generate a third multi-bit shrub set.
  • step 120 it may further include: modifying the attribute information of the branch nodes in the multi-bit shrub, where the attribute information includes the priority level corresponding to the rule in the first packet classification rule set.
  • each branch node can update the priority of the stored message classification rules in a timely manner, so that the message classification rules can be updated in time, and then the classification messages are processed.
  • the message classification rule with the highest priority can be filtered out to ensure the accuracy of the classification of the messages to be classified.
  • Fig. 4 is a schematic flow chart of a method for message classification in another embodiment of the present disclosure, as shown in Fig. 4, which specifically includes the following steps.
  • the bit decision method is to observe the distribution of each bit of the rules in the first packet classification rule set, filter to obtain the bits that match each packet classification rule, and then use the matched bits to determine the multi-bit The storage address information of each layer node in the dwarf tree.
  • the multi-bit shrub can be matched with the rules in the first packet classification rule set, so as to facilitate the subsequent search for the multi-bit shrub.
  • Step 420 according to the storage address information of the nodes of each layer in the multi-bit short tree, fill the rules in the first packet classification rule set into the multi-bit short tree.
  • the rules in the first packet classification rule set are divided into 3 groups: the first group includes 4 packet classification rules, and the second group includes 5 packets.
  • the message classification rules and the third group include 6 message classification rules.
  • step 410 is implemented in the following manner: a bit decision method is adopted to process the rules in the first packet classification rule set to determine the K decision bits of the root node of the multi-bit short tree, K is An integer greater than or equal to 1; Determine the storage address information of the first-level tree node of the multi-bit shrub according to the K decision bits of the root node; divide the rules in the first packet classification rule set into 2 k first levels A subset of packet classification rules; the first-level packet classification rule subset is used as the new first packet classification rule set, and the bit decision method is continued to process the rules in the first-level packet classification rule subset to determine the number of The K decision bits of the first-level tree node of the bit dwarf tree; the storage address information of the second-level tree node is determined according to the storage address information of the first-level tree node and the K decision bits of the first-level tree node.
  • At least one possible combination of decision bits can be obtained. For example, using the second bit of domain 1 and the first bit of domain 2, these two bits are used as decision bits. These two bits can correspond to four values: ⁇ 00, 01, 10, 11 ⁇ , different values correspond to a different message classification rule, that is, 00 corresponds to the message classification rule B, and 01 corresponds to the message classification rule. C, 10 correspond to message classification rule A, and 11 correspond to message classification rule D.
  • each tree node of the multi-bit dwarf tree corresponds to a first-level pipeline in the hardware structure. Since the current multi-bit dwarf tree only stores the four rules of A, B, C, and D, the multi-bit dwarf tree only includes the root node and two-level tree nodes. Therefore, the multi-bit dwarf tree is applied to the hardware structure In the middle, the number of pipeline stages in the corresponding hardware structure is 3 stages.
  • searching the multi-bit dwarf tree according to the search key value of the message to be classified it is necessary to make 2 bit decisions and 1 time in the leaf node. Parallel comparison of multiple message classification rules.
  • the multi-bit dwarf tree generated by the above method has fewer tree nodes, so that the hardware structure corresponding to the multi-bit dwarf tree has a shorter pipeline level, so that the message classification rules in the multi-bit dwarf tree are performed When searching, you can reduce the search delay and increase the processing speed.
  • the K bits that concern most of the rules in the first packet classification rule set and have the highest bit discrimination can be selected as decision bits.
  • the remaining message classification rules in the first message classification rule set except the message classification rule corresponding to the decision bit can be saved in multiple groups at the same time by means of rule copying, or Remove the remaining message classification rules and wait for the construction of the next multi-bit shrub tree.
  • the rules in the first packet classification rule set are processed through the bit decision method to determine the K decision bits of the root node of the multi-bit short tree, and determine the multi-bit based on the K decision bits.
  • the first packet classification rule set of the first packet classification rule set continues to use the bit decision method for processing, so that the storage address information of the tree nodes of each layer of the multi-bit shy tree can be obtained, so as to complete the construction of the multi-bit shy tree.
  • the multi-bit short tree has fewer tree nodes, and the corresponding hardware structure has a shorter pipeline level, so that when searching for the message classification rules in the multi-bit short tree, the search delay can be reduced and the processing can be improved. speed.
  • FIG. 5 is a schematic structural diagram of a message classification device provided by an embodiment of the present disclosure.
  • the specific implementation of the device refer to the related description of Embodiment 1, and the repetition will not be repeated. It is worth noting that the specific implementation of the device in this embodiment is not limited to the above embodiments, and other unexplained embodiments are also within the protection scope of the device.
  • the message classification device specifically includes: a search module 510, configured to search for a first multi-bit dwarf tree set according to the search key value of the message to be classified, and obtain a second message matching the message to be classified.
  • a set of text classification rules where the first set of multi-bit dwarfs includes multi-bit dwarfs, and the multi-bit dwarfs are decision trees constructed according to the rules in the first set of message classification rules; the classification module 520 is configured to be based on the second The rules in the message classification rule set classify the messages to be classified and determine the message type of the messages to be classified.
  • the root node register 511 is used to store the decision content of the root node of the multi-bit shrub (for example, position information of 5 decision bits, etc.).
  • the first-level tree node random access memory 513 is used to store the decision content of the first-level tree node of the multi-bit shrub.
  • the leaf node address generator 514 is used to obtain the 2-bit address information input by the first-level tree node address generator 512 (or, obtain the decision content of the first-level tree node from the first-level tree node random access memory 513 , That is, 5-bit address information), use the 5-bit address information to accurately address each leaf node; at the same time, obtain the remaining bits of the position information of each leaf node, based on the remaining bits and 5-bit address information , Determine the location information of the leaf node matching the search key, and then search the leaf node random access memory 515 according to the location information.
  • the leaf node random access memory 515 is used to extract all the message classification rules corresponding to the search key value of the message to be classified, and generate the message classification rule set corresponding to the search key value, that is, the second message classification rule set , And then output the rules in the second packet classification rule set to the classification module 520.
  • the message to be classified is obtained through the acquisition module, and the search module is used to search the first multi-bit shrub set according to the search key value of the message to be classified, and the second message matching the message to be classified is obtained.
  • a set of classification rules where the first set of multi-bit dwarf trees includes a multi-bit dwarf tree, and the multi-bit dwarf tree is a decision tree constructed according to the first set of message classification rules. Utilizing the shorter tree shape of the multi-bit shrub, the hardware structure using the message classification method has a shorter pipeline stage, thereby reducing the search delay.
  • the classification module is used to classify the messages to be classified according to the rules in the second message classification rule set to determine the message type of the messages to be classified, and to improve the classification correctness and accuracy of the messages to be classified.
  • the rules in the second message classification rule set to determine the message type of the messages to be classified, and to improve the classification correctness and accuracy of the messages to be classified.
  • FIG. 7 is a block diagram of the composition of a message classification device provided by another embodiment of the present disclosure.
  • the message classification device specifically includes: a key value generation module 710, a plurality of search modules (for example, a search module 720-1, a search module 720-2, a search module 720-3, ..., a search module 720-X, etc., where X is an integer greater than or equal to 1), multiple parallel comparison modules (for example, parallel comparison module 730-1, parallel comparison module 730-2, parallel comparison module 730-3, ..., parallel Comparison module 730-X, etc.), and priority arbitration module 740.
  • search modules for example, a search module 720-1, a search module 720-2, a search module 720-3, ..., a search module 720-X, etc.
  • X is an integer greater than or equal to 1
  • multiple parallel comparison modules for example, parallel comparison module 730-1, parallel comparison module 730-2, parallel comparison module 730-3, ..., parallel Comparison module 730-
  • each search module searches for its corresponding multi-bit dwarf tree, multiple multi-bit dwarf trees constitute the first multi-bit dwarf tree set, and the multi-bit dwarf tree is based on the rules in the first packet classification rule set Decision tree constructed.
  • the key value generating module 710 is configured to process the header information of the message to be classified to generate a search key value, and the search key value represents the core bit of the key field of the message to be classified.
  • the key value generating module 710 distributes the generated search key to each search module, for example, to the search module 720-1, the search module 720-2, the search module 720-3, ..., the search module 720-X, and so on.
  • Each search module is used to search the multi-bit dwarf tree step by step according to the search key value.
  • Each search module can output the message classification rules stored in a multi-bit dwarf tree, which may include 0, 1, or at most M message classification rules, M is an integer greater than or equal to 1.
  • Each search module outputs at most M message classification rules and search key values it outputs to the corresponding parallel comparison module.
  • the search module 720-1 outputs at most M message classification rules and search key values to the parallel comparison module 730-1
  • the search module 720-2 outputs at most M message classification rules and search key values. Give the parallel comparison module 730-2 and so on.
  • Each parallel comparison module is used to perform a bit-level precise comparison between the obtained at most M message classification rules and the search key value to generate a second message classification rule set, and then classify the messages in the second message classification rule set
  • the classification rules are output to the priority arbitration module 740.
  • the priority arbitration module 740 is used to arbitrate the priority of each message classification rule in the second message classification rule set, for example, compare the priority of each message classification rule, and sort according to the priority, to obtain the highest priority
  • the message classification rule with the highest priority is used to classify the message to be classified to obtain the message type of the message to be classified.
  • multiple search modules are used to search for a multi-bit short tree to obtain multiple sets of message classification rules corresponding to the search key; then, the search key and its corresponding message classification rules are output
  • multiple parallel comparison modules can accurately compare the packet classification rules at the same time, improve processing efficiency, and quickly generate the second packet classification rule set; finally, use the priority arbitration module to compare the second packet classification rules.
  • the rules in the message classification rule set perform priority arbitration to obtain the message classification rule with the highest priority, and then use the message classification rule with the highest priority to classify the classified messages to ensure the accuracy of the message classification.
  • modules involved in this embodiment are all logical modules.
  • a logical unit can be a physical unit, a part of a physical unit, or multiple physical units. The combination of units is realized.
  • the present invention is not limited to the specific configuration and processing described in the above embodiments and shown in the drawings. For convenience and brevity of description, detailed descriptions of known methods are omitted here.
  • FIG. 8 is a structural diagram of an exemplary hardware architecture of an electronic device of the message classification method and apparatus according to the embodiments of the present disclosure.
  • the electronic device 800 includes an input device 801, an input interface 802, a central processing unit 803, a memory 804, an output interface 805, and an output device 806.
  • the input interface 802, the central processing unit 803, the memory 804, and the output interface 805 are connected to each other through the bus 807
  • the input device 801 and the output device 806 are connected to the bus 807 through the input interface 802 and the output interface 805, respectively, and are further connected to the electronic device 800.
  • the other components are connected.
  • the input device 801 receives input information from the outside, and transmits the input information to the central processing unit 803 through the input interface 802; the central processing unit 803 processes the input information based on the computer executable instructions stored in the memory 804 to generate output Information, the output information is temporarily or permanently stored in the memory 804, and then the output information is transmitted to the output device 806 through the output interface 805; the output device 806 outputs the output information to the outside of the computing device 800 for use by the user.
  • the above-mentioned memory 804 may be replaced with a chip or circuit (special circuit for message classification) having a multi-bit short tree hardware structure, and the chip or circuit can realize the storage of classification rules and the search and matching of key values.
  • a chip or circuit special circuit for message classification
  • the electronic device 800 shown in FIG. 8 may be implemented as a network device, and the network device may include: a memory configured to store a program; a processor configured to run a program stored in the memory, Any one of the message classification methods described in the foregoing embodiments can be implemented.
  • the process described above with reference to the flowchart may be implemented as a computer software program.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly embodied on a machine-readable medium, and the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network, and/or installed from a removable storage medium.
  • Such software may be distributed on a computer-readable medium
  • the computer-readable medium may include a computer storage medium (or a non-transitory medium) and a communication medium (or a transitory medium).
  • the term computer storage medium includes volatile and nonvolatile implementations in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data).
  • Information such as computer-readable instructions, data structures, program modules, or other data.
  • Computer storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage device, or Any other medium used to store desired information and that can be accessed by a computer.
  • a communication medium usually contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种报文分类方法及装置、电子设备、可读介质,该方法包括:依据待分类报文的查找键值查找第一多比特矮树集合,获得与待分类报文相匹配的第二报文分类规则集合(110),其中,第一多比特矮树集合包括多比特矮树,多比特矮树是依据第一报文分类规则集合中的规则构建的决策树;依据第二报文分类规则集合中的规则对待分类报文进行分类,确定待分类报文的报文类型(120)。

Description

报文分类方法及装置、电子设备、可读介质 技术领域
本公开实施例涉及通信技术领域,具体涉及一种报文分类方法及装置、电子设备、可读介质。
背景技术
随着物理传输介质带宽的逐渐提升,以及网络终端数量的爆炸式增长,通信网络中所需要遵循的规则越来越多。同时,通信网络协议的演进也带来更多不同的分类需求,分类问题逐渐成为制约通信网络传输速率的瓶颈。目前,通过以下几种方法可以实现对网际互连协议(Internet Protocol,IP)数据包的分类,具体包括:基于三态内容寻址存储器(Ternary Content Addressable Memory,TCAM)的硬件并行比较方法、基于哈希的算法、基于空间分解的算法,以及基于决策树的算法。其中,基于决策树的算法的核心思想是通过选择合适的决策内容,将规则集合不断地进行划分,直至所有的规则被全部区分开来。
但是,已有的决策树的算法多采用软件实现,对于报文的分类效率和稳定性相较于硬件方案差;并且,少量采用硬件实现的、可行的基于决策树的报文分类方法,无法支持动态下载规则列表,只能预先获取全部规则集合,并进行大量的预处理。使得无法控制决策树的形状和密度,导致基于决策树的算法的性能受限。
发明内容
本申请实施例提供一种报文分类方法及装置、电子设备、可读介质。
根据第一方面,本公开实施例提供一种报文分类方法,方法包括:依据待分类报文的查找键值查找第一多比特矮树集合,获得与待分类报文相匹配的第二报文分类规则集合,其中,第一多比特矮树集合包括多比特矮树,多比特矮树是依据第一报文分类规则集合中的规则构建的决策树; 依据第二报文分类规则集合中的规则对待分类报文进行分类,确定待分类报文的报文类型。
根据第二方面,本公开实施例提供一种报文分类装置,其包括:查找模块,配置为依据待分类报文的查找键值查找第一多比特矮树集合,获得与待分类报文相匹配的第二报文分类规则集合,其中,第一多比特矮树集合包括多比特矮树,多比特矮树是依据第一报文分类规则集合中的规则构建的决策树;分类模块,配置为依据第二报文分类规则集合中的规则对待分类报文进行分类,确定待分类报文的报文类型。
根据第三方面,本公开实施例提供一种电子设备,其包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现第一方面所描述的方法。
根据第四方面,本公开实施例提供一种计算机可读介质,其上存储有计算机程序,程序被处理器执行时实现第一方面所描述的方法。
附图说明
附图用来提供对本公开实施例的进一步理解,并且构成说明书的一部分,与本公开的实施例一起用于解释本公开,并不构成对本公开的限制。通过参考附图对详细示例实施例进行描述,以上和其它特征和优点对本领域技术人员将变得更加显而易见,在附图中:
图1为本公开一实施例的报文分类方法的流程示意图。
图2为本公开中的一棵多比特矮树的结构示意图。
图3为本公开中的将待更新的报文分类规则插入至多比特矮树中的方法流程图。
图4为本公开另一实施例的报文分类方法的流程示意图。
图5为本公开一实施例提供的报文分类装置的组成方框图。
图6为本公开中以多比特矮树的形式实现的查找模块的组成方框图。
图7为本公开另一实施例提供的报文分类装置的组成方框图。
图8为本公开中根据本公开实施例的报文分类方法和装置的电子设备的示例性硬件架构的结构图。
具体实施方式
为使本领域的技术人员更好地理解本公开的技术方案,下面结合附图对本公开提供的方法及装置、电子设备、计算机可读介质进行详细描述。
在下文中将参考附图更充分地描述示例实施例,但是所述示例实施例可以以不同形式来体现且不应当被解释为限于本文阐述的实施例。反之,提供这些实施例的目的在于使本公开透彻和完整,并将使本领域技术人员充分理解本公开的范围。
本公开的说明书和权利要求书及上述附图中的术语“第一”和“第二”是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以使这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
除非另外限定,否则本文所用的所有术语(包括技术和科学术语)的含义与本领域普通技术人员通常理解的含义相同。还将理解,诸如那些在常用字典中限定的那些术语应当被解释为具有与其在相关技术以及本公开的背景下的含义一致的含义,且将不解释为具有理想化或过度形式上的含义,除非本文明确如此限定。
在相关技术中,已有的决策树的算法多采用软件实现,对于报文的分类效率和稳定性相较于硬件方案差。此外,少量采用硬件实现的基于决策树的报文分类方法无法支持动态下载规则列表,只能预先获取全部规则集合,并进行大量的预处理。这使得无法控制决策树的形状和密度,导致基于决策树的算法的性能受限。
图1示出本公开一实施例的报文分类方法的流程示意图。该报文分类方法可应用于报文分类装置。如图1所示,该报文分类方法包括如下步骤。
步骤110,依据待分类报文的查找键值查找第一多比特矮树集合,获 得与待分类报文相匹配的第二报文分类规则集合。
其中,待分类报文包括查找键值,该查找键值是从完整的待分类报文中提取出来的若干字段,例如,待分类报文的头部信息中的某些标识。第一多比特矮树集合包括多比特矮树,多比特矮树是依据第一报文分类规则集合中的规则构建的决策树。
与传统的单比特树(即二叉树)相比,多比特矮树内的每个节点可以有多个子树分支。并且,多比特矮树具有较少层的树节点,例如,仅具有3层树节点,或,4层树节点等。通过对第一报文分类规则集合中的规则进行处理,获得多比特矮树的根节点对应的决策比特;依据该决策比特的个数,来具体确定该多比特矮树的树节点的层数。其中的决策比特的个数是大于或等于1的整数。
图2是具体实现时的一棵多比特矮树的结构示意图。如图2所示,该多比特矮树包括三层树结构,具体包括第0层节点(即,根节点200)、第1层节点和第2层节点。其中,第1层节点包括多个第一层树节点210;第2层节点包括多个叶子节点220。该多比特矮树的叶子节点220全部位于最后一层,并且该多比特矮树是满树。将多比特矮树建成满树的好处在于,仅需要简单的决策逻辑,即可将第一报文分类规则集合中的规则直接存入随机存取存储器(Random Access Memory,RAM)中,无需考虑原始的基于决策树的算法的叶子层级不确定的问题,使得决策树的形状和密度得到控制,提升算法的性能。
在一些具体实现中,步骤110可采用如下方式实现:依据查找键值,并行对第一多比特矮树集合中的多比特矮树进行查找,获得初级报文分类规则集合;将查找键值与初级报文分类规则集合中的规则进行对比,筛选获得第二报文分类规则集合,其中,第二报文分类规则集合中的规则是与待分类报文相匹配的规则。
具体地,以查找键值为索引,并行地对第一多比特矮树集合中的每一棵多比特矮树的各级树节点和各个叶子节点进行查找,直至找到该查找键值所对应的报文分类规则,这些报文分类规则组成初级报文分类规则集合。然后,将查找键值与初级报文分类规则集合中的各个报文分类规则进行精细对比(例如,进行比特级别的对比),筛选获得第二报文分类规则 集合。使得该第二报文分类规则集合中的规则能够更适合对待分类报文进行分类。
步骤120,依据第二报文分类规则集合中的规则对待分类报文进行分类,确定待分类报文的报文类型。
在一些具体实现中,步骤120可采用如下方式实现:获取第二报文分类规则集合中的规则对应的优先等级;依据优先等级,对第二报文分类规则集合中的规则进行优先级仲裁,生成最优报文分类规则;依据最优报文分类规则对待分类报文进行分类,确定待分类报文的报文类型。
需要说明的是,其中的第二报文分类规则集合中的规则对应优先等级,可人为设定,也可根据不同的规则与待分类报文的匹配程度确定,此处对于优先等级仅是举例说明,其他对于优先等级的设定方式也在本公开的保护范围之内,在此不再赘述。
具体地,还可以采用少量逃生桶的报文分类方法或TCAM报文分类方法,对待分类报文进行分类,生成少量逃生桶分类规则和TCAM分类规则。然后再次对最优报文分类规则、少量逃生桶分类规则和TCAM分类规则进行优先级仲裁,生成最终的报文分类规则;使用该最终的报文分类规则对对待分类报文进行分类,获得更精确的待分类报文的报文类型。需要说明的是,以上对于报文分类方法的说明,仅是举例说明,可根据具体需求进行具体设定,其他未举例说明的报文分类方法也可与本公开中的报文分类方法结合使用,并对生成的多个报文分类规则进行优先级仲裁,从而获得更精确的报文分类方法,在此不再赘述。
在本实施例中,通过获取待分类报文,依据待分类报文的查找键值查找第一多比特矮树集合,获得与待分类报文相匹配的第二报文分类规则集合,其中,第一多比特矮树集合包括多比特矮树,多比特矮树是依据第一报文分类规则集合构建的决策树。利用多比特矮树的较矮的树形状,使得使用该报文分类方法的硬件结构具有较短的流水级数,从而降低查找延时。依据第二报文分类规则集合中的规则对待分类报文进行分类,以确定待分类报文的报文类型,提高对待分类报文的分类正确性和准确性。在针对不同的报文分类规则时,无需更改硬件资源设定,具备很好的扩展性。
在一个实施例中,在步骤120之前,还可以包括:步骤130,插入待 更新的报文分类规则至多比特矮树中,或,步骤140,删除存储在多比特矮树中的待删除的报文分类规则。
具体实现时,可采用链表的方式将已构建的多比特矮树相关联,形成多比特矮树集合,将待更新的报文分类规则插入多比特矮树集合中的某棵树内,也可以采用其他集合形式来实现报文分类规则的插入。规则的插入可能触发单棵多比特矮树的某个或某些树节点的重构,也可能触发多棵多比特矮树的局部重构,重构带来多条RAM内容的更新需求,可采用气泡方式逐条执行插入,并遵循先插入再删除的更新原则,保证系统在更新的同时仍具备实时查找能力。
以上对于插入的实现方式仅是举例说明,可根据实际进行具有设定,其他未举例说明的插入的实现方式也在本公开的保护范围之内,在此不再赘述。
在该实施例中,通过对多比特矮树进行插入或删除操作,使得多比特矮树中存储的报文分类规则得到更新,保证能够动态的支持报文分类规则的变化。在将该多比特矮树应用于硬件结构中时,无需预先提取全部的报文分类规则并进行大量的预处理,使得通过对多比特矮树进行插入或删除操作,就可以实现动态的更新报文分类规则,避免预处理的繁琐,提升处理效率。
在一个实施例中,图3是将待更新的报文分类规则插入至多比特矮树中的方法流程图。如图3所示,步骤130中的插入待更新的报文分类规则至多比特矮树中,包括步骤131~步骤133。
步骤131,遍历第一多比特矮树集合,判断第一多比特矮树集合中的多比特矮树是否有空间存放待更新的报文分类规则。
需要说明的是,若确定第一多比特矮树集合中的多比特矮树有空间存放待更新的报文分类规则,则执行步骤132,否则执行步骤133。
步骤132,依据待更新的报文分类规则,构建一棵新的多比特矮树。
具体地,可采用比特决策的方式,对待更新的报文分类规则进行处理,确定该新的多比特矮树的各层树节点的存储地址信息;最后,将待更新的报文分类规则填充至该新的多比特矮树中,以完成一棵新的多比特矮树的构建。
步骤133,依据多比特矮树的填充度和预设填充度阈值,对待更新的报文分类规则和第一多比特矮树集合中的多比特矮树进行重建。
需要说明的是,其中的重建,可以是对第一多比特矮树集合中的多比特矮树的局部重建,即将待更新报文分类规则插入到第一多比特矮树集合中,也可以是将待更新的报文分类规则和第一多比特矮树集合中的多比特矮树中的规则一起重新选择决策比特,建立新的多比特矮树集合。
在一个具体实现中,步骤133可采用如下方式实现:从第一多比特矮树集合中挑选获得第二多比特矮树集合,其中,第二多比特矮树集合中的多比特矮树的填充度均小于预设填充度阈值;对待更新的报文分类规则和第二多比特矮树集合进行重建,获得第三多比特矮树集合;判断第三多比特矮树集合中的多比特矮树的数量是否小于或等于第一多比特矮树集合中的多比特矮树的数量;若是,则确定重建成功,依据待更新的报文分类规则,对第二多比特矮树集合中的多比特矮树进行局部更新。
具体实现时,可采用链表的方式,实现对待更新的报文分类规则和第一多比特矮树集合中的多比特矮树重建。例如,设定第一多比特矮树集合为胖树(Fat Tree,FT)链表,记作FT_list;将待更新的报文分类规则标记为指针p_rule;当前正在遍历第一多比特矮树集合的临时链表,标记为指针p_FT。
首先,对FT_list进行遍历,尝试插入p_rule至当前p_FT。如果插入成功,则返回插入待更新的报文分类规则至第一多比特矮树成功;否则,继续对FT_list进行遍历。若在遍历全部FT_list后,均无法将p_rule插入,则触发对待更新的报文分类规则和第一多比特矮树集合中的多比特矮树的重建。
重建的具体流程包括:比较第一多比特矮树集合FT_list中的各个多比特矮树的填充度是否小于预设填充度阈值,筛选填充度小于预设填充度阈值的多比特矮树,获得第二多比特矮树集合;然后将第二多比特矮树集合和待更新的报文分类规则(即p_rule)一起放入到临时规则集合中,将该临时规则集合标记为Rtemp。然后,对临时规则集合Rtemp中的多比特矮树进行重建,生成第三多比特矮树集合。
判断第三多比特矮树集合中的多比特矮树的数量是否小于或等于第 一多比特矮树集合FT_list中的多比特矮树的数量;若是,则确定重建成功,将第二多比特矮树集合中的多比特矮树全部替换为临时规则集合(即Rtemp)中的多比特矮树;否则,保持第一多比特矮树集合FT_list不变,新申请一个FT资源,并将待更新的报文分类规则p_rule插入,即构建一棵新的多比特矮树,该新的多比特矮树是依据待更新的报文分类规则生成的决策树。
在本实施例中,根据多比特矮树的填充度和预设填充度阈值,对待更新的报文分类规则和第一多比特矮树集合中的多比特矮树进行重建,使得能够及时更新第一多比特矮树集合中的多比特矮树,动态的支持报文分类规则的变化,避免预处理的繁琐,提升处理效率。
在一个实施例中,步骤140中的删除存储在多比特矮树中的待删除的报文分类规则,可采用如下方式实现:依据待删除的报文分类规则,对第一多比特矮树集合中的多比特矮树的各个分支节点进行匹配查找,确定待删除分支节点;删除存储在待删除分支节点中的待删除的报文分类规则。
具体地,可根据待删除的报文分类规则的查找键值,查找第一多比特矮树集合中的多比特矮树的各个分支节点,获得待删除分支节点对应的存储地址信息,然后依据该待删除分支节点对应的存储地址信息,获取到待删除的报文分类规则,并将待删除的报文分类规则进行删除。
在本实施例中,通过删除存储在待删除分支节点中的待删除的报文分类规则,使得能够将第一多比特矮树集合中的无用的报文分类规则进行删除。值得说明的是,仅是对报文分类规则进行删除,其中的删除分支节点依然保留,以方便下次进行报文分类规则更新时,可使用待删除分支节点对应的存储地址保存其他报文分类规则。
在一个实施例中,在步骤120之前,还可以包括:修改多比特矮树中的分支节点的属性信息,其中,属性信息包括第一报文分类规则集合中的规则对应的优先等级。
其中,属性信息还可以包括分支节点所占用的存储空间大小,即当前分支节点的填充度是否饱和等信息。以上对于属性信息仅是举例说明,可根据实际需要具体设定,其他未说明的属性信息也在本公开的保护范围 之内,在此不再赘述。
在本实施例中,通过对分支节点的属性信息的修改,使得各个分支节点能够及时更新其存储的报文分类规则的优先等级,使得报文分类规则能够得到及时更新,再对待分类报文进行分类时,能够筛选出优先级最高的那个报文分类规则,保证对待分类报文的分类的准确度。
图4是本公开另一实施例中的报文分类方法的流程示意图,如图4所示,具体包括如下步骤。
步骤410,采用比特决策的方式,对输入的第一报文分类规则集合中的规则进行处理,确定多比特矮树中的各层节点的存储地址信息。
其中的比特决策的方式,是通过观察第一报文分类规则集合中的规则的各个比特的分布情况,筛选获得与各个报文分类规则都匹配的比特,再使用该匹配的比特来确定多比特矮树中的各层节点的存储地址信息。使得多比特矮树能够与第一报文分类规则集合中的规则相匹配,以方便后续对多比特矮树的查找。
步骤420,依据多比特矮树中的各层节点的存储地址信息,将第一报文分类规则集合中的规则填充至多比特矮树中。
在一些具体实现中,采用如下方式来实现步骤420:对第一报文分类规则集合中的规则进行分组,生成N个分组,N为大于或等于1的整数;判断各个分组中的规则的条数是否大于规则预设条数阈值,获得第一判断结果;提取第一判断结果为是的分组,生成填充集合;依据多比特矮树中的各层节点的存储地址信息,将填充集合中的各个分组中的M条报文分类规则填充至多比特矮树中,其中,M小于或等于规则预设条数阈值。
需要说明的是,由于在对第一报文分类规则集合中的规则进行分组时,并不是均匀分配,每个分组中所包括的报文分类规则的条数可以是1条、2条、5条等不同的数值。在对各个分组中的报文分类规则进行提前时,需要先判断各个分组中的规则的条数是否大于规则预设条数阈值,其中的规则预设条数阈值是大于或等于1的整数。
例如,当规则预设条数阈值是3时,将第一报文分类规则集合中的规则划分为3个分组:第一分组中包括4条报文分类规则、第二分组中包 括5条报文分类规则、第三分组中包括6条报文分类规则。通过分别提取第一分组中的1条报文分类规则、第二分组中的2条报文分类规则和第三分组中的3条报文分类规则,生成填充集合;使得每棵构建的多比特矮树内能够存放尽可能多的规则,最大程度利用存储资源。特别的,若各个分组中的报文分类规则都比较少,则可以将第一报文分类规则集合中的规则一次性都填充至多比特矮树中,不再需要构建新的多比特矮树。
在一些具体实现中,在依据多比特矮树中的各层节点的存储地址信息,将填充集合中的各个分组中的M条报文分类规则填充至多比特矮树中步骤之后,还包括:回收各个分组中M条报文分类规则之外的剩余的报文分类规则;其中,剩余的报文分类规则用于填充下一棵多比特矮树。
例如,当规则预设条数阈值是3时,将第一报文分类规则集合中的规则划分为3个分组:第一分组中包括4条报文分类规则、第二分组中包括5条报文分类规则、第三分组中包括6条报文分类规则。通过提取各个分组中的报文分类规则,生成第一棵多比特矮树之后,需要将各个分组中的M条报文分类规则之外的剩余的报文分类规则进行回收,即剩余的报文分类规则包括:第一分组中的1条报文分类规则、第二分组中包括3条报文分类规则和第三分组中包括3条报文分类规则。进而再使用上述方法,筛选获得填充集合,并将填充集合中的规则填充至下一棵多比特矮树中。
步骤430,依据待分类报文的查找键值查找第一多比特矮树集合,获得与待分类报文相匹配的第二报文分类规则集合。
步骤440,依据第二报文分类规则集合中的规则对待分类报文进行分类,确定待分类报文的报文类型。
需要说明的是,本实施例中的步骤430~440,与上一实施例中的步骤110~120一致,在此不再赘述。
在本实施例中,通过采用比特决策的方式,对输入的第一报文分类规则集合中的规则进行处理,确定多比特矮树中的各层节点的存储地址信息,使得能够获得与第一报文分类规则集合中的规则相匹配的多比特矮树,再将第一报文分类规则集合中的规则填充至多比特矮树中,方便后续通过查找该多比特矮树,就可获得想要的报文分类规则。利用多比特矮树的较矮的树形状,使得使用该报文分类方法的硬件结构具有较短的流水级 数,降低查找延时。
在一个实施例中,采用如下方式来实现步骤410:采用比特决策的方式,对第一报文分类规则集合中的规则进行处理,确定多比特矮树的根节点的K个决策比特,K为大于或等于1的整数;依据根节点的K个决策比特,确定多比特矮树的第一层树节点的存储地址信息;将第一报文分类规则集合中的规则划分为2 k个一级报文分类规则子集;将一级报文分类规则子集作为新的第一报文分类规则集合,继续采用比特决策的方式,对一级报文分类规则子集中的规则进行处理,确定多比特矮树的第一层树节点的K个决策比特;依据第一层树节点的存储地址信息和第一层树节点的K个决策比特,确定第二层树节点的存储地址信息。
需要说明的是,第一报文分类规则集合中的每个报文分类规则都是包括A个域,A为大于或等于1的整数。这A个域是从完整的数据报文中提取出来的A个字段,A个域共包括B个比特。因1个比特可表示2条不同的报文分类规则(例如,00和01),故B为大于或等于1的整数。
例如,表1是报文分类规则的规则格式表。其中,A等于3,B等于12,即该报文分类规则共包括3个域(即域1、域2和域3),每个域有4个比特(例如,A规则中的域1由1100表示,A规则中的域2由0000表示,A规则中的域3由10**表示等),这3个域共计有12个比特。其中,*表示该比特可以是0或1中的任意值。
表1报文分类规则的规则格式表
规则编号 域1 域2 域3
A 1100 0000 10**
B 101* 0000 001*
C 0011 1110 ****
D 111* 1101 1111
通过对表1的观察,可以得到至少一种可行的决策比特的组合。例如,使用域1的第2个比特和域2的第1个比特,这两个比特作为决策比特。这两个比特可对应有四种取值:{00,01,10,11},不同的取值对应一种不同报文分类规则,即00对应报文分类规则B,01对应报文分类规 则C,10对应报文分类规则A,11对应报文分类规则D。
然后,依据这两个决策比特,确定多比特矮树中的树节点的存储地址信息。若存储地址信息采用10个比特来表示,则除了决策比特之外,存储地址信息的剩余的比特采用补0的方式进行处理。即报文分类规则{A,B,C,D}对应的存储地址依次是{地址A,地址B,地址C,地址D}。其中,地址A=10 000 00000,地址B=00 000 00000,地址C=01 000 00000,地址D=11 000 00000。
并且,将该多比特矮树实施在硬件结构中时,该多比特矮树的每一层树节点对应硬件结构中的一级流水线。因当前的多比特矮树仅存放有A、B、C、D这4条规则,故该多比特矮树只包括根节点和两层树节点,因此,将该多比特矮树应用到硬件结构中时,对应的硬件结构内的流水线级数为3级,在依据待分类报文的查找键值,对该多比特矮树进行查找时,需要进行2次比特决策和1次叶子节点内的多条报文分类规则的并行比较。
例如,待分类报文的查找键值包括两个:key1=0011 1110 1100和key2=0011 1011 0000。则以key1和key2为索引,对多比特矮树进行查找时,需要寻找到地址C(即01 000 00000),才能获得该地址C上存储的报文分类规则C。然后,将报文分类规则C与key1、key2进行比特级的精确对比,才能获得第二报文分类规则集合,即key1对应报文分类规则C,而key2没有对应的匹配报文分类规则。最后,使用报文分类规则C对待分类报文进行分类,获得该待分类报文的报文类型。
通过以上方式生成的多比特矮树,具有较少层的树节点,使得该多比特矮树对应的硬件结构具有较短的流水级数,从而在对多比特矮树中的报文分类规则进行查找时,可以降低查找延时,提升处理速度。
在一个具体实现中,采用比特决策的方式,对第一报文分类规则集合中的规则进行处理,确定多比特矮树的根节点的K个决策比特,包括:分别计算第一报文分类规则集合中的规则的各个比特之间的比特区分度,获得比特区分度集合;依据各个比特的所处位置、比特区分度阈值和比特区分度集合中的各个比特区分度,确定K个决策比特。
需要说明的是,其中的比特区分度可以采用代价函数(Cost Function) 来进行计算,该代价函数是将随机事件或其有关随机变量的取值映射为非负实数以表示该随机事件的“风险”或“损失”的函数。
具体地,需要计算第一报文分类规则集合中的规则的每一个比特的比特区分度,然后将每一个比特的比特区分度与比特区分度阈值(例如,0.8)相比较,并进行排序,提取其中比特区分度大于0.8的比特,然后再根据各个比特的所处位置,从比特区分度大于0.8的比特的集合中,筛选获得K个决策比特。并且,每次筛选时,从当前的报文分类规则集合中的规则的A个域内任意地挑选出区分度最高的K个比特。
在某些场景下,由于不同的报文分类规则关心的比特位置、比特数量都不相同,当不同的报文分类规则关心的比特数量不足以对第一报文分类规则集合中的规则进行有效的分组时,可选择第一报文分类规则集合中的大部分规则均关心且比特区分度最高的K个比特作为决策比特。对于第一报文分类规则集合中除决策比特对应的报文分类规则以外的剩余的报文分类规则,可以采取规则复制的方式将剩余的报文分类规则同时保存在多个分组内,也可以将剩余的报文分类规则剔除出来,等待下一棵多比特矮树树的构建。
在本实施例中,通过比特决策的方式,对第一报文分类规则集合中的规则进行处理,确定多比特矮树的根节点的K个决策比特,依据这K个决策比特,确定多比特矮树的第一层树节点的存储地址信息;然后将第一报文分类规则集合中的规则划分为2 k个一级报文分类规则子集,将一级报文分类规则子集作为新的第一报文分类规则集合,继续使用比特决策的方式,进行处理,使得能够获得该多比特矮树的各层树节点的存储地址信息,以完成该多比特矮树的构建。该多比特矮树具有较少层的树节点,对应的硬件结构具有较短的流水级数,从而在对多比特矮树中的报文分类规则进行查找时,可以降低查找延时,提升处理速度。
图5为本公开实施例提供的一种报文分类装置的结构示意图,该装置的具体实施可参见实施例一的相关描述,重复之处不再赘述。值得说明的是,本实施方式中的装置的具体实施不局限于以上实施例,其他未说明的实施例也在本装置的保护范围之内。
如图5所示,该报文分类装置具体包括:查找模块510,配置为依据待分类报文的查找键值查找第一多比特矮树集合,获得与待分类报文相匹配的第二报文分类规则集合,其中,第一多比特矮树集合包括多比特矮树,多比特矮树是依据第一报文分类规则集合中的规则构建的决策树;分类模块520,配置为依据第二报文分类规则集合中的规则对待分类报文进行分类,确定待分类报文的报文类型。
在一个具体实现中,以多比特矮树的形式实现查找模块510。如图6所示,该查找模块510包括:根节点寄存器511、第一层树节点地址生成器512、第一层树节点随机存取存储器513、叶子节点地址生成器514和叶子节点随机存取存储器515。
其中,根节点寄存器511用于存放多比特矮树的根节点的决策内容(例如,5个决策比特的位置信息等)。
第一层树节点地址生成器512用于对输入的待分类报文的查找键值的进行检测,并将该查找键值与根节点寄存器511所保存的决策内容进行比较,获得比较结果,并将该比较结果输出至第一层树节点随机存取存储器513。
第一层树节点随机存取存储器513用于存放多比特矮树的第1层树节点的决策内容。
叶子节点地址生成器514用于获取第一层树节点地址生成器512输入的2个比特的地址信息(或,从第一层树节点随机存取存储器513处获得第1层树节点的决策内容,即5个比特的地址信息),使用该5个比特的地址信息对各个叶子节点进行精确寻址;同时,获取各个叶子节点的位置信息的剩余比特,依据剩余比特和5个比特的地址信息,确定与查找键值相匹配的叶子节点的位置信息,然后根据该位置信息,查找叶子节点随机存取存储器515。
叶子节点随机存取存储器515用于将与待分类报文的查找键值相对应的报文分类规则全部取出,生成与查找键值对应的报文分类规则集合,即第二报文分类规则集合,然后将该第二报文分类规则集合中的规则输出至分类模块520。
在本实施例中,通过获取模块获取到待分类报文,使用查找模块依 据待分类报文的查找键值查找第一多比特矮树集合,获得与待分类报文相匹配的第二报文分类规则集合,其中,第一多比特矮树集合包括多比特矮树,多比特矮树是依据第一报文分类规则集合构建的决策树。利用多比特矮树的较矮的树形状,使得使用该报文分类方法的硬件结构具有较短的流水级数,从而降低查找延时。然后采用分类模块依据第二报文分类规则集合中的规则对待分类报文进行分类,以确定待分类报文的报文类型,提高对待分类报文的分类正确性和准确性。在针对不同的报文分类规则时,无需更改硬件资源设定,具备很好的扩展性。
图7为本公开另一实施例提供的报文分类装置的组成方框图。如图7所示,该报文分类装置具体包括:键值生成模块710,多个查找模块(例如,查找模块720-1,查找模块720-2,查找模块720-3,……,查找模块720-X等,其中的X是大于或等于1的整数),多个并行比较模块(例如,并行比较模块730-1,并行比较模块730-2,并行比较模块730-3,……,并行比较模块730-X等),以及优先级仲裁模块740。
需要说明的是,各个查找模块都查找其对应的多比特矮树,多个多比特矮树构成第一多比特矮树集合,并且多比特矮树是依据第一报文分类规则集合中的规则构建的决策树。
其中,键值生成模块710用于对待分类报文的头部信息进行处理,生成查找键值,该查找键值表征该待分类报文的关键字段的核心比特。键值生成模块710将生成的查找键值分发给各个查找模块,例如,分发给查找模块720-1,查找模块720-2,查找模块720-3,……,查找模块720-X等。
每个查找模块用于依据查找键值对多比特矮树进行逐级查找,每个查找模块均可输出一棵多比特矮树内存储的报文分类规则,可能包含0条、1条或至多M条报文分类规则,M为大于或等于1的整数。每个查找模块将其输出的至多M条报文分类规则,以及查找键值,一起输出给对应的并行比较模块。例如,查找模块720-1将输出的至多M条报文分类规则和查找键值输出给并行比较模块730-1,查找模块720-2将输出的至多M条报文分类规则和查找键值输出给并行比较模块730-2等。
每个并行比较模块用于对获得的至多M条报文分类规则与查找键值进行比特级的精确比较,生成第二报文分类规则集合,然后将第二报文分类规则集合中的报文分类规则输出至优先级仲裁模块740。
优先级仲裁模块740用于对第二报文分类规则集合中的各个报文分类规则进行优先级仲裁,例如,对比各个报文分类规则的优先等级,并依据优先等级进行排序,获得优先级最高的报文分类规则,并将该优先级最高的报文分类规则用于对待分类报文进行分类,以获得待分类报文的报文类型。
在本实施例中,通过采用多个查找模块对多比特矮树进行查找,获得多组与查找键值相对应的报文分类规则;然后,将查找键值及其对应的报文分类规则输出给对应的并行比较模块,使得多个并行比较模块能够同时对报文分类规则进行精确对比,提高处理效率,快速的生成第二报文分类规则集合;最后,使用优先级仲裁模块对第二报文分类规则集合中的规则进行优先级仲裁,以获得优先级最高的报文分类规则,进而使用该优先级最高的报文分类规则对待分类报文进行分类,保证报文分类的准确性。
值得一提的是,本实施例中所涉及到的各模块均为逻辑模块,在实际应用中,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。并且,本发明并不局限于上文实施例中所描述并在图中示出的特定配置和处理。为了描述的方便和简洁,这里省略了对已知方法的详细描述。并且上述描述的系统、模块和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
图8为本公开中根据本公开实施例的报文分类方法和装置的电子设备的示例性硬件架构的结构图。
如图8所示,电子设备800包括输入设备801、输入接口802、中央处理器803、存储器804、输出接口805、以及输出设备806。其中,输入接口802、中央处理器803、存储器804、以及输出接口805通过总线807相互连接,输入设备801和输出设备806分别通过输入接口802和输出接口805与总线807连接,进而与电子设备800的其他组件连接。
具体地,输入设备801接收来自外部的输入信息,并通过输入接口802将输入信息传送到中央处理器803;中央处理器803基于存储器804中存储的计算机可执行指令对输入信息进行处理以生成输出信息,将输出信息临时或者永久地存储在存储器804中,然后通过输出接口805将输出信息传送到输出设备806;输出设备806将输出信息输出到计算设备800的外部供用户使用。
在一个实施例中,上述存储器804可替换为具有多比特矮树硬件结构的芯片或电路(报文分类专用电路),所述芯片或电路能够实现分类规则的存储和键值的查找与匹配。
在一个实施例中,图8所示的电子设备800可以被实现为一种网络设备,该网络设备可以包括:存储器,被配置为存储程序;处理器,被配置为运行存储器中存储的程序,以执行上述实施例描述的任意一种报文分类方法。
在一个实施例中,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,所述计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以从网络上被下载和安装,和/或从可拆卸存储介质被安装。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路(ASIC)或现场可编程门阵列(FPGA)。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其它数据)的任何方法或技术中实施的易失性和非 易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其它存储器技术、CD-ROM、数字多功能盘(DVD)或其它光盘存储、磁盒、磁带、磁盘存储或其它磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其它的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其它传输机制之类的调制数据信号中的其它数据,并且可包括任何信息递送介质。
本文已经公开示例实施例,并且虽然采用具体术语,但它们仅用于并仅应当被解释为一般说明性含义,并且不用于限制的目的。在一些实例中,对本领域技术人员显而易见的是,除非另外明确指出,否则可单独使用与特定实施例相结合描述的特征、特性和/或元素,或可与其它实施例相结合描述的特征、特性和/或元件组合使用。因此,本领域技术人员将理解,在不脱离由所附的权利要求阐明的本公开的范围的情况下,可进行各种形式和细节上的改变。

Claims (17)

  1. 一种报文分类方法,其包括:
    依据待分类报文的查找键值查找第一多比特矮树集合,获得与所述待分类报文相匹配的第二报文分类规则集合,其中,所述第一多比特矮树集合包括多比特矮树,所述多比特矮树是依据第一报文分类规则集合中的规则构建的决策树;
    依据所述第二报文分类规则集合中的规则对所述待分类报文进行分类,确定所述待分类报文的报文类型。
  2. 根据权利要求1所述的方法,其中,所述依据待分类报文的查找键值查找第一多比特矮树集合,获得与所述待分类报文相匹配的第二报文分类规则集合,包括:
    依据所述查找键值,并行对所述第一多比特矮树集合中的所述多比特矮树进行查找,获得初级报文分类规则集合;
    将所述查找键值与所述初级报文分类规则集合中的规则进行对比,筛选获得所述第二报文分类规则集合,其中,所述第二报文分类规则集合中的规则是与所述待分类报文相匹配的规则。
  3. 根据权利要求1所述的方法,其中,所述依据所述第二报文分类规则集合中的规则对所述待分类报文进行分类,确定所述待分类报文的报文类型,包括:
    获取所述第二报文分类规则集合中的规则对应的优先等级;
    依据所述优先等级,对所述第二报文分类规则集合中的规则进行优先级仲裁,生成最优报文分类规则;
    依据所述最优报文分类规则对所述待分类报文进行分类,确定所述待分类报文的报文类型。
  4. 根据权利要求1至3中任一项所述的方法,其中,在所述依据所述第二报文分类规则集合中的规则对所述待分类报文进行分类,确定所述待分类报文的报文类型步骤之前,所述方法还包括:
    插入待更新的报文分类规则至所述多比特矮树中,或,删除存储在所述多比特矮树中的待删除的报文分类规则。
  5. 根据权利要求4所述的方法,其中,所述插入待更新的报文分类规则至所述多比特矮树中,包括:
    遍历所述第一多比特矮树集合,判断所述第一多比特矮树集合中的多比特矮树是否有空间存放所述待更新的报文分类规则;
    若是,则依据所述待更新的报文分类规则,构建一棵新的所述多比特矮树;
    否则,依据所述多比特矮树的填充度和预设填充度阈值,对所述待更新的报文分类规则和所述第一多比特矮树集合中的多比特矮树进行重建。
  6. 根据权利要求5所述的方法,其中,所述依据所述多比特矮树的填充度和预设填充度阈值,对所述待更新的报文分类规则和所述第一多比特矮树集合中的多比特矮树进行重建,包括:
    从第一多比特矮树集合中挑选获得第二多比特矮树集合,其中,所述第二多比特矮树集合中的多比特矮树的填充度均小于所述预设填充度阈值;
    对所述待更新的报文分类规则和所述第二多比特矮树集合进行重建,获得第三多比特矮树集合;
    判断所述第三多比特矮树集合中的多比特矮树的数量是否小于或等于所述第一多比特矮树集合中的多比特矮树的数量;
    若是,则确定重建成功,依据所述待更新的报文分类规则,对所述第二多比特矮树集合中的多比特矮树进行局部更新。
  7. 根据权利要求4所述的方法,其中,所述删除存储在所述多比特矮树中的待删除的报文分类规则,包括:
    依据所述待删除的报文分类规则,对所述第一多比特矮树集合中的多比特矮树的各个分支节点进行匹配查找,确定待删除分支节点;
    删除存储在所述待删除分支节点中的所述待删除的报文分类规则。
  8. 根据权利要求1至3中任一项所述的方法,其中,在所述依据所述第二报文分类规则集合中的规则对所述待分类报文进行分类,确定所述待分类报文的报文类型步骤之前,所述方法还包括:
    修改所述多比特矮树中的分支节点的属性信息,其中,所述属性信息包括所述第一报文分类规则集合中的规则对应的优先等级。
  9. 根据权利要求1至3中任一项所述的方法,其中,在所述依据待分类报文的查找键值查找第一多比特矮树集合,获得与所述待分类报文相匹配的第二报文分类规则集合步骤之前,所述方法还包括:
    采用比特决策的方式,对输入的所述第一报文分类规则集合中的规则进行处理,确定所述多比特矮树中的各层节点的存储地址信息;
    依据所述多比特矮树中的各层节点的存储地址信息,将所述第一报文分类规则集合中的规则填充至所述多比特矮树中。
  10. 根据权利要求9所述的方法,其中,所述采用比特决策的方式,对输入的所述第一报文分类规则集合中的规则进行处理,确定所述多比特矮树的各层节点的存储地址信息,包括:
    采用所述比特决策的方式,对所述第一报文分类规则集合中的规则进行处理,确定所述多比特矮树的根节点的K个决策比特,K为大于或等于1的整数;
    依据所述根节点的K个决策比特,确定所述多比特矮树的第一层树节点的存储地址信息;
    将所述第一报文分类规则集合中的规则划分为2 k个一级报文分类规则子集;
    将所述一级报文分类规则子集作为新的所述第一报文分类规则集合,继续采用所述比特决策的方式,对所述一级报文分类规则子集中的规则进行处理,确定所述多比特矮树的第一层树节点的K个决策比特;
    依据所述第一层树节点的存储地址信息和所述第一层树节点的K个 决策比特,确定第二层树节点的存储地址信息。
  11. 根据权利要求10所述的方法,其中,所述采用所述比特决策的方式,对所述第一报文分类规则集合中的规则进行处理,确定所述多比特矮树的根节点的K个决策比特,包括:
    分别计算所述第一报文分类规则集合中的规则的各个比特之间的比特区分度,获得比特区分度集合;
    依据所述各个比特的所处位置、比特区分度阈值和所述比特区分度集合中的各个比特区分度,确定所述K个所述决策比特。
  12. 根据权利要求9所述的方法,其中,所述依据所述多比特矮树中的各层节点的存储地址信息,将所述第一报文分类规则集合中的规则填充至所述多比特矮树中,包括:
    对所述第一报文分类规则集合中的规则进行分组,生成N个分组,N为大于或等于1的整数;
    判断各个所述分组中的规则的条数是否大于规则预设条数阈值,获得第一判断结果;
    提取所述第一判断结果为是的所述分组,生成填充集合;
    依据所述多比特矮树中的各层节点的存储地址信息,将所述填充集合中的各个分组中的M条报文分类规则填充至所述多比特矮树中,其中,M小于或等于所述规则预设条数阈值。
  13. 根据权利要求12所述的方法,其中,在所述依据所述多比特矮树中的各层节点的存储地址信息,将所述填充集合中的各个分组中的M条报文分类规则填充至所述多比特矮树中步骤之后,所述方法还包括:
    回收各个分组中M条报文分类规则之外的剩余的报文分类规则;
    其中,所述剩余的报文分类规则用于填充下一棵所述多比特矮树。
  14. 根据权利要求1至13中任一项所述的方法,其中,所述多比特矮树的节点的总层数不大于4。
  15. 一种报文分类装置,其包括:
    查找模块,配置为依据待分类报文的查找键值查找第一多比特矮树集合,获得与所述待分类报文相匹配的第二报文分类规则集合,其中,所述第一多比特矮树集合包括多比特矮树,所述多比特矮树是依据第一报文分类规则集合中的规则构建的决策树;
    分类模块,配置为依据所述第二报文分类规则集合中的规则对所述待分类报文进行分类,确定所述待分类报文的报文类型。
  16. 一种电子设备,其包括:
    一个或多个处理器;
    存储装置,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现根据权利要求1至13任意一项所述的方法。
  17. 一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现根据权利要求1至14任意一项所述的方法。
PCT/CN2021/089612 2020-04-27 2021-04-25 报文分类方法及装置、电子设备、可读介质 WO2021218854A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP21795621.8A EP4145777A4 (en) 2020-04-27 2021-04-25 MESSAGE CLASSIFICATION METHOD AND APPARATUS, ELECTRONIC DEVICE AND READABLE MEDIUM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010348580.9A CN113642594A (zh) 2020-04-27 2020-04-27 报文分类方法及装置、电子设备、可读介质
CN202010348580.9 2020-04-27

Publications (1)

Publication Number Publication Date
WO2021218854A1 true WO2021218854A1 (zh) 2021-11-04

Family

ID=78374078

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/089612 WO2021218854A1 (zh) 2020-04-27 2021-04-25 报文分类方法及装置、电子设备、可读介质

Country Status (3)

Country Link
EP (1) EP4145777A4 (zh)
CN (1) CN113642594A (zh)
WO (1) WO2021218854A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115834340A (zh) * 2022-10-28 2023-03-21 新华三半导体技术有限公司 一种规则存储方法、装置、电子设备及存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114710378B (zh) * 2022-03-03 2024-03-26 中国人民解放军国防科技大学 一种基于决策树的并行报文分类查找方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148746A (zh) * 2010-02-05 2011-08-10 中兴通讯股份有限公司 一种报文分类方法和系统
CN102281196A (zh) * 2011-08-11 2011-12-14 中兴通讯股份有限公司 决策树生成方法及设备、基于决策树报文分类方法及设备
US20130016649A1 (en) * 2011-07-12 2013-01-17 Qualcomm Incorporated System design for user equipment relays
CN104462144A (zh) * 2013-09-24 2015-03-25 中兴通讯股份有限公司 一种包分类规则的查找方法及装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6614789B1 (en) * 1999-12-29 2003-09-02 Nasser Yazdani Method of and apparatus for matching strings of different lengths
US8364803B2 (en) * 2006-10-20 2013-01-29 Oricane Ab Method, device, computer program product and system for representing a partition of N W-bit intervals associated to D-bit data in a data communications network
US20170244642A1 (en) * 2016-02-24 2017-08-24 Microsoft Technology Licensing, Llc Multi-dimensional packet classification

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148746A (zh) * 2010-02-05 2011-08-10 中兴通讯股份有限公司 一种报文分类方法和系统
US20130016649A1 (en) * 2011-07-12 2013-01-17 Qualcomm Incorporated System design for user equipment relays
CN102281196A (zh) * 2011-08-11 2011-12-14 中兴通讯股份有限公司 决策树生成方法及设备、基于决策树报文分类方法及设备
CN104462144A (zh) * 2013-09-24 2015-03-25 中兴通讯股份有限公司 一种包分类规则的查找方法及装置

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
See also references of EP4145777A4 *
ZHANG PEI, CHEN WEN-LONG,TANG XIAO-LAN: "IPv6 Quick Search Based on Fusion Tree Structure", JOURNAL OF CHINESE COMPUTER SYSTEMS, GAI-KAN BIANJIBU , SHENYANG, CN, vol. 39, no. 12, 11 December 2018 (2018-12-11), CN , pages 2640 - 2645, XP055861475, ISSN: 1000-1220 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115834340A (zh) * 2022-10-28 2023-03-21 新华三半导体技术有限公司 一种规则存储方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN113642594A (zh) 2021-11-12
EP4145777A1 (en) 2023-03-08
EP4145777A4 (en) 2024-04-17

Similar Documents

Publication Publication Date Title
WO2021218854A1 (zh) 报文分类方法及装置、电子设备、可读介质
US9269411B2 (en) Organizing data in a hybrid memory for search operations
Mehlhorn et al. External-memory breadth-first search with sublinear I/O
US9208438B2 (en) Duplication in decision trees
US9195939B1 (en) Scope in decision trees
CN110858823B (zh) 一种数据包的分类方法、装置及计算机可读存储介质
JP6997297B2 (ja) パケット分類決定木の確立
Lim et al. Boundary cutting for packet classification
US9595003B1 (en) Compiler with mask nodes
WO2015127721A1 (zh) 数据匹配的方法、装置及计算机存储介质
CN108134739B (zh) 一种基于索引特里树的路由查找方法及装置
US20160253322A1 (en) Method and apparatus for data storage and retrieval
Pao et al. A multi-pipeline architecture for high-speed packet classification
US10425343B2 (en) Packet classification
CN103077208A (zh) 统一资源定位符匹配处理方法及装置
CN104933054A (zh) 缓存资源文件的url存储方法及装置、缓存服务器
CN106789727B (zh) 报文分类方法和装置
Mishra et al. PC-DUOS: Fast TCAM lookup and update for packet classifiers
Song et al. Packet classification using coarse-grained tuple spaces
WO2019183962A1 (zh) 一种基于等长度和等密度切割的网络数据包分类的方法
Kekely et al. Packet classification with limited memory resources
US7523218B1 (en) O(log n) dynamic router tables for prefixes and ranges
WO2016177146A1 (zh) 一种网络流量数据的分类方法及装置
CN116243869A (zh) 数据处理方法、装置及电子设备
KR20120049572A (ko) 패킷 분류 장치 및 그 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21795621

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2021795621

Country of ref document: EP

Effective date: 20221128