[go: up one dir, main page]

CN114785741B - Data stream classification device - Google Patents

Data stream classification device Download PDF

Info

Publication number
CN114785741B
CN114785741B CN202110088571.5A CN202110088571A CN114785741B CN 114785741 B CN114785741 B CN 114785741B CN 202110088571 A CN202110088571 A CN 202110088571A CN 114785741 B CN114785741 B CN 114785741B
Authority
CN
China
Prior art keywords
circuit
flow
data stream
elephant
queue
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110088571.5A
Other languages
Chinese (zh)
Other versions
CN114785741A (en
Inventor
吕国正
魏明章
刘俊明
颜光裕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Realtek Semiconductor Corp
Original Assignee
Realtek Semiconductor Corp
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 Realtek Semiconductor Corp filed Critical Realtek Semiconductor Corp
Priority to CN202110088571.5A priority Critical patent/CN114785741B/en
Publication of CN114785741A publication Critical patent/CN114785741A/en
Application granted granted Critical
Publication of CN114785741B publication Critical patent/CN114785741B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种数据流分类装置包括一转发电路与一设定电路。所述转发电路依据一输入数据流的辨识信息查询一查找表以得知所述输入数据流的分类,再据以标示它的封包,然后输出这些封包至一缓冲电路;若所述输入数据流的辨识信息未包括于所述查找表,所述转发电路依据一默认分类标示所述输入数据流的封包再将其输出,并将所述输入数据流的辨识信息加入所述查找表。所述设定电路依据所述缓冲电路的队列长度与一目标长度决定一大象流流量门限。所述设定电路另依据所述转发电路记录于所述查找表的多道数据流的流量信息得知这些数据流的流量,再依据这些数据流的流量与所述大象流流量门限之间的比较来决定这些数据流的分类,并将这些数据流的分类存储于所述查找表。这些数据流包括所述输入数据流。

A data stream classification device includes a forwarding circuit and a setting circuit. The forwarding circuit queries a lookup table based on the identification information of an input data stream to obtain the classification of the input data stream, and then marks its packets accordingly, and then outputs these packets to a buffer circuit; if the identification information of the input data stream is not included in the lookup table, the forwarding circuit marks the packets of the input data stream according to a default classification and then outputs them, and adds the identification information of the input data stream to the lookup table. The setting circuit determines a large flow flow threshold based on the queue length of the buffer circuit and a target length. The setting circuit also obtains the flow of multiple data streams based on the flow information of the forwarding circuit recorded in the lookup table, and then determines the classification of these data streams based on the comparison between the flow of these data streams and the large flow flow threshold, and stores the classification of these data streams in the lookup table. These data streams include the input data stream.

Description

数据流分类装置Data flow classification device

技术领域Technical Field

本发明涉及分类装置,特别是涉及数据流分类装置。The present invention relates to a classification device, and in particular to a data stream classification device.

背景技术Background technique

缓冲膨胀(Bufferbloat)是指转发设备过量地缓冲封包而导致网络发生高转发时延与时延变异的现象。为了解决此问题,最普遍的解决方式有下列三种:Buffer bloat refers to the phenomenon that the forwarding device buffers packets excessively, resulting in high forwarding delay and delay variation in the network. To solve this problem, the most common solutions are the following three:

(1)服务等级(Class of Service;CoS)队列排程:分类封包,并令不同分类的封包关联不同队列,再利用排程机制给予不同队列不同的服务等级。(1) Class of Service (CoS) queue scheduling: Packets are classified and associated with different queues. Different queues are given different service levels using a scheduling mechanism.

(2)主动式队列管理(Active Queue Management;AQM):不分类封包,但会在封包的队列未满前主动地依据一机率丢弃封包,以降低所述队列的平均队列长度。(2) Active Queue Management (AQM): does not classify packets, but actively discards packets based on a probability before the packet queue is full to reduce the average queue length of the queue.

(3)权重式AQM:分类封包,并赋予不同分类的封包不同的封包丢弃率,以优先丢弃低优先权的封包,并把缓冲器空间留给高优先权的封包。(3) Weighted AQM: Classifies packets and assigns different packet discard rates to packets of different classifications, so as to discard low-priority packets first and reserve buffer space for high-priority packets.

然而,如何分类封包一直是个大问题,最常见的方式是让使用者自行设定,但此方式除了造成使用者不便,也难以准确地分类封包。而不分类封包的AQM方式虽能降低平均时延,但由于封包没有被分类,此方式会按相同的机率丢弃高优先权封包与低优先权封包,这会同等地影响高优先权封包(例如:互联网语音协议(VoIP)封包、实时视频串流封包、游戏封包)的流量,并影响用户体验。However, how to classify packets has always been a big problem. The most common way is to let users set it by themselves, but this method not only causes inconvenience to users, but also makes it difficult to accurately classify packets. Although the AQM method of not classifying packets can reduce the average delay, since the packets are not classified, this method will discard high-priority packets and low-priority packets at the same probability, which will equally affect the traffic of high-priority packets (for example: Internet Voice Protocol (VoIP) packets, real-time video streaming packets, game packets) and affect the user experience.

发明内容Summary of the invention

本申请的目的之一在于提供一种数据流分类装置,能避免现有技术的问题。One of the purposes of the present application is to provide a data stream classification device that can avoid the problems of the prior art.

本申请的数据流分类装置的一实施例包括一转发电路与一设定电路。所述转发电路与所述设定电路的每一个可通过硬件来实现,或通过硬件执行软件和/或固件来实现。An embodiment of the data stream classification device of the present application includes a forwarding circuit and a setting circuit. Each of the forwarding circuit and the setting circuit can be implemented by hardware, or by hardware executing software and/or firmware.

所述转发电路包括一记录电路、一分类电路与一数据流信息增补电路。所述记录电路用来计算多种数据流的每一个的流量以获得所述多种数据流的流量信息,并包括一查找表。所述查找表包括所述多种数据流的辨识信息、所述多种数据流的流量信息以及所述多种数据流的分类。所述分类电路耦接一数据流输入端与所述记录电路,用来从所述数据流输入端接收一第一数据流,以依据所述第一数据流的第一辨识信息查询所述查找表所包括的所述多种数据流的辨识信息。当所述查找表包括所述第一辨识信息时,所述分类电路使用所述查找表以决定所述第一数据流的分类,并输出所述第一数据流至一缓冲电路;当所述查找表未包括所述第一辨识信息时,所述分类电路将所述第一数据流归类为一默认分类,并输出所述第一数据流至所述缓冲电路。所述数据流信息增补电路耦接所述记录电路与所述分类电路;当所述查找表未包括所述第一辨识信息时,所述数据流信息增补电路取得所述第一数据流的至少一部分,以获得所述第一辨识信息,然后所述数据流信息增补电路将所述第一辨识信息加入所述查找表作为所述多种数据流的辨识信息的一部分,其中所述记录电路计算所述第一数据流的流量,以获得第一流量信息作为所述多种数据流的流量信息的一部分。The forwarding circuit includes a recording circuit, a classification circuit and a data flow information supplementation circuit. The recording circuit is used to calculate the flow of each of the multiple data flows to obtain the flow information of the multiple data flows, and includes a lookup table. The lookup table includes identification information of the multiple data flows, flow information of the multiple data flows and classification of the multiple data flows. The classification circuit is coupled to a data flow input terminal and the recording circuit, and is used to receive a first data flow from the data flow input terminal to query the identification information of the multiple data flows included in the lookup table according to the first identification information of the first data flow. When the lookup table includes the first identification information, the classification circuit uses the lookup table to determine the classification of the first data flow and outputs the first data flow to a buffer circuit; when the lookup table does not include the first identification information, the classification circuit classifies the first data flow into a default classification and outputs the first data flow to the buffer circuit. The data flow information supplement circuit is coupled to the recording circuit and the classification circuit; when the lookup table does not include the first identification information, the data flow information supplement circuit obtains at least a part of the first data flow to obtain the first identification information, and then the data flow information supplement circuit adds the first identification information to the lookup table as part of the identification information of the multiple data flows, wherein the recording circuit calculates the flow of the first data flow to obtain first flow information as part of the flow information of the multiple data flows.

所述设定电路包括一大象流流量门限调整电路与一分类决策电路。所述大象流流量门限调整电路耦接所述缓冲电路,用来依据一目标队列特征值(例如:队列长度或队列时延)与所述缓冲电路的一目前队列特征值(例如:队列长度或队列时延)之间的关系的变化,决定一大象流流量门限。所述分类决策电路耦接所述大象流流量门限调整电路与所述记录电路,用来依据所述多种数据流的流量信息与所述大象流流量门限之间的关系的变化,决定所述查找表所包括的所述多种数据流的分类。The setting circuit includes a large elephant flow flow threshold adjustment circuit and a classification decision circuit. The large elephant flow flow threshold adjustment circuit is coupled to the buffer circuit, and is used to determine a large elephant flow flow threshold according to the change of the relationship between a target queue characteristic value (for example, queue length or queue delay) and a current queue characteristic value (for example, queue length or queue delay) of the buffer circuit. The classification decision circuit is coupled to the large elephant flow flow threshold adjustment circuit and the recording circuit, and is used to determine the classification of the multiple data flows included in the lookup table according to the change of the relationship between the flow information of the multiple data flows and the large elephant flow flow threshold.

据上所述,本实施例通过控制所述大象流流量门限,将较多/较少的数据流归类为大象流,以让所述缓冲电路可通过降低大象流的传输优先权或丢弃大象流的封包来避免缓冲膨胀。As described above, this embodiment controls the elephant flow flow threshold to classify more/fewer data flows as elephant flows, so that the buffer circuit can avoid buffer expansion by reducing the transmission priority of the elephant flow or discarding the packets of the elephant flow.

有关本发明的特征、实作与功效,现配合附图作较佳实施例详细说明如下。The features, implementation and effects of the present invention are described in detail below with reference to the accompanying drawings for preferred embodiments.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1显示本申请的数据流分类装置的一实施例;FIG1 shows an embodiment of a data stream classification device of the present application;

图2显示图1的转发电路的一实施例;FIG. 2 shows an embodiment of the forwarding circuit of FIG. 1 ;

图3显示图1的设定电路的一实施例;FIG3 shows an embodiment of the setting circuit of FIG1 ;

图4显示图3的大象流流量门限调整电路如何判断所述缓冲电路的状态的一实施例;FIG. 4 shows an embodiment of how the elephant flow threshold adjustment circuit of FIG. 3 determines the state of the buffer circuit;

图5显示图3的大象流流量门限调整电路如何判断所述缓冲电路的状态的另一实施例;FIG5 shows another embodiment of how the elephant flow threshold adjustment circuit of FIG3 determines the state of the buffer circuit;

图6显示图3的大象流流量门限调整电路如何调整所述大象流流量门限的一实施例;FIG6 shows an embodiment of how the elephant flow threshold adjustment circuit of FIG3 adjusts the elephant flow threshold;

图7显示图3的分类决策电路如何决定所述第一数据流的分类的一实作范例;FIG. 7 shows an example of an implementation of how the classification decision circuit of FIG. 3 determines the classification of the first data stream;

图8显示图3的分类决策电路如何决定所述第一数据流的分类的另一实作范例;FIG. 8 shows another implementation example of how the classification decision circuit of FIG. 3 determines the classification of the first data stream;

图9显示图3的分类决策电路如何决定所述第一数据流的分类的又一实作范例;FIG. 9 shows another implementation example of how the classification decision circuit of FIG. 3 determines the classification of the first data stream;

图10显示本申请的数据流分类装置的另一实施例;FIG10 shows another embodiment of the data stream classification device of the present application;

图11显示图10的转发电路的一实施例;以及FIG. 11 shows an embodiment of the forwarding circuit of FIG. 10 ; and

图12显示图10的设定电路的一实施例。FIG. 12 shows an embodiment of the setting circuit of FIG. 10 .

具体实施方式Detailed ways

本申请包括一种数据流分类装置,能够依据多道数据流的流量与一大象流流量(elephant flow)门限之间的比较来分类这些数据流。当一后端的缓冲电路的队列特征(例如:队列长度或队列时延)长于(或短于)一目标门限时,本申请的数据流分类装置能够对应地降低(提高)所述大象流流量门限,以将较多(较少)的数据流归类为大象流,从而让后端的缓冲电路可通过降低大象流的传输优先权或丢弃大象流的封包等方式来避免缓冲膨胀。所述数据流分类装置可应用于一网络封包转发装置(例如:交换器),此时数据流是由连续的封包和/或不连续的封包所构成的数据流;为便于理解,以下说明是以网络封包转发应用为例,然此并非本发明的实施限制。The present application includes a data flow classification device that can classify multiple data flows based on the comparison between the flow rate of multiple data flows and an elephant flow flow threshold. When the queue characteristics (e.g., queue length or queue delay) of a back-end buffer circuit are longer (or shorter) than a target threshold, the data flow classification device of the present application can correspondingly reduce (increase) the elephant flow flow threshold to classify more (fewer) data flows as elephant flows, so that the back-end buffer circuit can avoid buffer expansion by reducing the transmission priority of the elephant flow or discarding the packets of the elephant flow. The data flow classification device can be applied to a network packet forwarding device (e.g., a switch), in which case the data flow is a data flow composed of continuous packets and/or discontinuous packets; for ease of understanding, the following description takes the network packet forwarding application as an example, but this is not an implementation limitation of the present invention.

图1显示本申请的数据流分类装置的一实施例。图1的数据流分类装置100包括一转发电路110与一设定电路120。转发电路110用来接收并分类一数据流,再转发分类后的数据流至一缓冲电路10;转发电路110另提供所述数据流的流量信息给设定电路120。设定电路120用来依据缓冲电路10的队列信息以及所述流量信息决定所述数据流的分类,并提供所述数据流的分类给转发电路110。转发电路110或设定电路120可通过硬件来实现,或通过硬件执行软件和/或固件来实现。FIG1 shows an embodiment of a data stream classification device of the present application. The data stream classification device 100 of FIG1 includes a forwarding circuit 110 and a setting circuit 120. The forwarding circuit 110 is used to receive and classify a data stream, and then forward the classified data stream to a buffer circuit 10; the forwarding circuit 110 also provides the flow information of the data stream to the setting circuit 120. The setting circuit 120 is used to determine the classification of the data stream based on the queue information of the buffer circuit 10 and the flow information, and provide the classification of the data stream to the forwarding circuit 110. The forwarding circuit 110 or the setting circuit 120 can be implemented by hardware, or by hardware executing software and/or firmware.

图2显示图1的转发电路110的一实施例。图2的转发电路110包括一记录电路210、一分类电路220与一数据流信息增补电路230,其中记录电路210与分类电路220可整合为一查找表电路(图中未绘示),然此并非本发明的实施限制。Fig. 2 shows an embodiment of the forwarding circuit 110 of Fig. 1. The forwarding circuit 110 of Fig. 2 includes a recording circuit 210, a classification circuit 220 and a data stream information supplementation circuit 230, wherein the recording circuit 210 and the classification circuit 220 can be integrated into a lookup table circuit (not shown in the figure), but this is not an implementation limitation of the present invention.

请参阅图1及图2。记录电路210用来计算多种数据流的每一个的流量以获得所述多种数据流的流量信息。举例而言,记录电路210依据一数据流的辨识信息得知所述数据流的身份,然后计数所述数据流的封包数量和/或字节数量,以获得所述数据流的流量信息。记录电路210另包括(或称存储)一查找表212,查找表212包括所述多种数据流的辨识信息、所述多种数据流的流量信息以及所述多种数据流的分类。于一实作范例中,所述多种数据流的每一个的辨识信息为一组数值,所述组数值例如是五数值组(5-tuple),包括一目标地址(destination IP address)、一来源地址(source IP address)、一协议(protocol)、一目标端口(destination port)以及一来源端口(source port),然此并非本发明的实施限制;在实施为可行的情形下,凡是能用于辨识数据流的身份的信息均能作为所述辨识信息。由于前述封包数量/字节数量的计数以及查找表的实施均可用已知或自行开发的技术来实现,其细节在此省略。Please refer to FIG. 1 and FIG. 2. The recording circuit 210 is used to calculate the flow rate of each of the multiple data flows to obtain the flow rate information of the multiple data flows. For example, the recording circuit 210 obtains the identity of the data flow according to the identification information of the data flow, and then counts the number of packets and/or the number of bytes of the data flow to obtain the flow rate information of the data flow. The recording circuit 210 further includes (or stores) a lookup table 212, and the lookup table 212 includes the identification information of the multiple data flows, the flow rate information of the multiple data flows, and the classification of the multiple data flows. In an implementation example, the identification information of each of the multiple data flows is a set of values, and the set of values is, for example, a five-tuple, including a destination IP address, a source IP address, a protocol, a destination port, and a source port, but this is not an implementation limitation of the present invention; in the case where the implementation is feasible, any information that can be used to identify the identity of the data flow can be used as the identification information. Since the aforementioned counting of the number of packets/number of bytes and the implementation of the lookup table can be achieved using known or self-developed technologies, the details are omitted here.

请参阅图1及图2。分类电路220耦接一数据流输入端(即图中所示“数据流”箭头的起始端)与记录电路210,用来从所述数据流输入端接收一第一数据流,以依据所述第一数据流的第一辨识信息查询查找表212所记录的所述多种数据流的辨识信息,其中所述用语“第一”是为了说明方便,不具特定意义;换言之,所述第一数据流可以是所述数据流输入端所接收的任一数据流。当查找表212包括所述第一辨识信息时,查找表212也包括所述第一辨识信息所关联的所述第一数据流的分类,因此,分类电路220使用查找表212以决定所述第一数据流的分类,并输出所述第一数据流至缓冲电路10。当查找表212未包括所述第一辨识信息时,分类电路220将所述第一数据流归类为一默认分类,并输出所述第一数据流至缓冲电路10。值得注意的是,当查找表212未包括所述第一辨识信息时,分类电路220可通过发送讯号或其它已知/自行开发的手段(例如:开关的控制),令数据流信息增补电路230能够从分类电路220的输出(如图中所示的“分类后的数据流”)或所述数据流输入端(图中未绘示)取得所述第一数据流的至少一部分,从而数据流信息增补电路230能够选择性地依据所述第一数据流的所述至少一部分更新查找表212。另值得注意的是,图1所示的缓冲电路10可包括于数据流分类装置100中,或独立于数据流分类装置100外。Please refer to FIG. 1 and FIG. 2. The classification circuit 220 is coupled to a data stream input terminal (i.e., the starting end of the "data stream" arrow shown in the figure) and the recording circuit 210, and is used to receive a first data stream from the data stream input terminal, so as to query the identification information of the multiple data streams recorded in the lookup table 212 according to the first identification information of the first data stream, wherein the term "first" is for the convenience of explanation and has no specific meaning; in other words, the first data stream can be any data stream received by the data stream input terminal. When the lookup table 212 includes the first identification information, the lookup table 212 also includes the classification of the first data stream associated with the first identification information. Therefore, the classification circuit 220 uses the lookup table 212 to determine the classification of the first data stream and outputs the first data stream to the buffer circuit 10. When the lookup table 212 does not include the first identification information, the classification circuit 220 classifies the first data stream as a default classification and outputs the first data stream to the buffer circuit 10. It is worth noting that when the lookup table 212 does not include the first identification information, the classification circuit 220 can send a signal or other known/self-developed means (e.g., control of a switch) to enable the data stream information supplementation circuit 230 to obtain at least a portion of the first data stream from the output of the classification circuit 220 (such as the "classified data stream" shown in the figure) or the data stream input terminal (not shown in the figure), so that the data stream information supplementation circuit 230 can selectively update the lookup table 212 according to the at least a portion of the first data stream. It is also worth noting that the buffer circuit 10 shown in FIG. 1 can be included in the data stream classification device 100, or can be independent of the data stream classification device 100.

于一实作范例中,查找表212所包括的所述多种数据流的分类包括一大象流类型与一非大象流(例如,老鼠流)类型;所述大象流类型的任一数据流的流量高于所述非大象流类型的任一数据流的流量;在缓冲电路10的操作中,所述大象流类型所关联的一大象流传输优先权低于所述非大象流类型所关联的一非大象流传输优先权,或者所述大象流类型所关联的一大象流封包丢弃率高于所述非大象流类型所关联的一非大象流封包丢弃率;前述预设分类为所述非大象流类型。于一实作范例中,所述大象流类型包括一第一类型与一第二类型;所述第一类型的任一数据流的流量高于所述第二类型的任一数据流的流量;在缓冲电路10的操作中,所述第一类型所关联的一第一传输优先权低于所述第二类型所关联的一第二传输优先权,或者所述第一类型所关联的一第一封包丢弃率高于所述第二类型所关联的一第二封包丢弃率。视实施需求,所述大象流类型可包括更多类型。In an implementation example, the classification of the multiple data flows included in the lookup table 212 includes an elephant flow type and a non-elephant flow (e.g., mouse flow) type; the flow rate of any data flow of the elephant flow type is higher than the flow rate of any data flow of the non-elephant flow type; in the operation of the buffer circuit 10, an elephant flow transmission priority associated with the elephant flow type is lower than a non-elephant flow transmission priority associated with the non-elephant flow type, or an elephant flow packet discard rate associated with the elephant flow type is higher than a non-elephant flow packet discard rate associated with the non-elephant flow type; the aforementioned preset classification is the non-elephant flow type. In an implementation example, the elephant flow type includes a first type and a second type; the flow rate of any data flow of the first type is higher than the flow rate of any data flow of the second type; in the operation of the buffer circuit 10, a first transmission priority associated with the first type is lower than a second transmission priority associated with the second type, or a first packet discard rate associated with the first type is higher than a second packet discard rate associated with the second type. Depending on the implementation requirements, the elephant flow type may include more types.

于一实作范例中,所述第一数据流的每个封包包括所述第一辨识信息,分类电路220用来依据所述第一数据流的每个封包所包括的所述第一辨识信息查询查找表212所包括的所述多种数据流的辨识信息。当查找表212包括所述第一辨识信息时,查找表212也包括所述第一数据流的分类,因此,分类电路220得以依据查找表212所包括的所述第一数据流的分类,标示所述第一数据流的每个封包,然后缓冲电路10便能依据每一封包的标示得知所述封包是一大象流封包或是一非大象流封包。于一实作范例中,分类电路220通过决定所述第一数据流的每个封包的一元数据(metadata)(例如:颜色记叙元数据)的值来标示所述封包的分类。由于标示封包可通过已知/自行开发的技术来实现,其细节在此省略。In an implementation example, each packet of the first data stream includes the first identification information, and the classification circuit 220 is used to query the identification information of the multiple data streams included in the lookup table 212 according to the first identification information included in each packet of the first data stream. When the lookup table 212 includes the first identification information, the lookup table 212 also includes the classification of the first data stream. Therefore, the classification circuit 220 can mark each packet of the first data stream according to the classification of the first data stream included in the lookup table 212, and then the buffer circuit 10 can know whether the packet is an elephant stream packet or a non-elephant stream packet according to the marking of each packet. In an implementation example, the classification circuit 220 marks the classification of the packet by determining the value of a metadata (e.g., color description metadata) of each packet of the first data stream. Since marking packets can be implemented by known/self-developed technologies, the details are omitted here.

请参阅图1及图2。数据流信息增补电路230耦接记录电路210与分类电路220。当查找表212未包括所述第一辨识信息时,数据流信息增补电路230选择性地从分类电路220的输出或所述数据流输入端取得所述第一数据流的至少一部分,以获得所述第一辨识信息,然后数据流信息增补电路230将所述第一辨识信息加入查找表212作为所述多种数据流的辨识信息的一部分,而记录电路210会计算所述第一数据流的流量,以获得第一流量信息作为所述多种数据流的流量信息的一部分。若在加入所述第一辨识信息与所述第一流量信息前查找表212已满,数据流信息增补电路230会将查找表212中的某笔数据流(例如:以最久未使用(least recently used;LRU)策略所决定的数据流)的信息移除,然此并非本发明的实施限制。于一实作范例中,考虑到查找表212的大小有限,数据流信息增补电路230按一默认机率(P%,其中P为介于0与100之间的数字)执行一取样操作,因此,数据流信息增补电路230取得所述第一数据流的所述至少一部分的机率为所述默认机率(即数据流信息增补电路230可不对每一数据流进行取样并记录辨识信息及流量)。由于取样操作与取得封包的特定信息的操作均可通过已知/自行开发的技术来实现,其细节在此省略。Please refer to FIG. 1 and FIG. 2. The data flow information supplementing circuit 230 is coupled to the recording circuit 210 and the classification circuit 220. When the lookup table 212 does not include the first identification information, the data flow information supplementing circuit 230 selectively obtains at least a portion of the first data flow from the output of the classification circuit 220 or the data flow input terminal to obtain the first identification information, and then the data flow information supplementing circuit 230 adds the first identification information to the lookup table 212 as a part of the identification information of the multiple data flows, and the recording circuit 210 calculates the flow of the first data flow to obtain the first flow information as a part of the flow information of the multiple data flows. If the lookup table 212 is full before adding the first identification information and the first flow information, the data flow information supplementing circuit 230 removes the information of a certain data flow (for example, a data flow determined by the least recently used (LRU) strategy) in the lookup table 212, but this is not an implementation limitation of the present invention. In an implementation example, considering that the size of the lookup table 212 is limited, the data stream information supplementation circuit 230 performs a sampling operation according to a default probability (P%, where P is a number between 0 and 100). Therefore, the probability that the data stream information supplementation circuit 230 obtains the at least a portion of the first data stream is the default probability (that is, the data stream information supplementation circuit 230 may not sample each data stream and record the identification information and flow rate). Since the sampling operation and the operation of obtaining specific information of the packet can be implemented by known/self-developed technologies, the details are omitted here.

图3显示图1的设定电路120的一实施例。图3的设定电路120包括一大象流流量门限调整电路310与一分类决策电路320。FIG3 shows an embodiment of the setting circuit 120 of FIG1 . The setting circuit 120 of FIG3 includes a large elephant flow rate threshold adjustment circuit 310 and a classification decision circuit 320 .

请参阅图1到图3。大象流流量门限调整电路310耦接缓冲电路10,用来依据一目标队列特征值(例如:固定的队列长度或固定的队列时延)与缓冲电路10的一目前队列特征值(例如:易变的队列长度或易变的队列时延)之间的关系的变化,决定一大象流流量门限(ELE_TH);换言之,所述大象流流量门限会随着所述目前队列特征值而动态地改变。于一实作范例中,于所述目前队列特征值(Curr_QL)大于所述目标队列特征值(Target_QL)达N次后,大象流流量门限调整电路310判断缓冲电路10的状态从一非拥塞状态变成一拥塞状态(如图4及5所示),并调低所述大象流流量门限至少一次,从而找出更多可能是大象流的数据流,以让缓冲电路10能够通过丢弃大象流的至少一部分来缓解拥塞,其中所述N为正整数(例如:大于一的整数)。Please refer to FIG. 1 to FIG. 3. The elephant flow flow threshold adjustment circuit 310 is coupled to the buffer circuit 10, and is used to determine an elephant flow flow threshold (ELE_TH) according to the change of the relationship between a target queue characteristic value (e.g., fixed queue length or fixed queue delay) and a current queue characteristic value (e.g., variable queue length or variable queue delay) of the buffer circuit 10; in other words, the elephant flow flow threshold changes dynamically with the current queue characteristic value. In an implementation example, after the current queue characteristic value (Curr_QL) is greater than the target queue characteristic value (Target_QL) for N times, the elephant flow flow threshold adjustment circuit 310 determines that the state of the buffer circuit 10 changes from a non-congested state to a congested state (as shown in FIG. 4 and FIG. 5), and lowers the elephant flow flow threshold at least once, so as to find more data flows that may be elephant flows, so that the buffer circuit 10 can relieve congestion by discarding at least a portion of the elephant flows, wherein N is a positive integer (e.g., an integer greater than one).

于一实作范例中,不同分类的封包关联同一队列,缓冲电路10可采用已知的/自行开发的权重式主动式队列管理(weighted active queue management;Weighted AQM)技术来按一定机率丢弃所述队列的封包;在缓冲电路10处于所述拥塞状态的情形下,于所述目前队列特征值小于所述目标队列特征值的K分之一达M次后,大象流流量门限调整电路310判断缓冲电路10回到所述非拥塞状态(如图4所示),并调高所述大象流流量门限至少一次,以减少数据流被判断为大象流的机会;所述K与所述M均为视实施需求所决定的正整数(例如:所述K与所述M均为大于一的整数)。In an implementation example, packets of different categories are associated with the same queue, and the buffer circuit 10 can adopt a known/self-developed weighted active queue management (Weighted AQM) technology to discard packets in the queue with a certain probability; when the buffer circuit 10 is in the congested state, after the current queue characteristic value is less than one-Kth of the target queue characteristic value for M times, the elephant flow flow threshold adjustment circuit 310 determines that the buffer circuit 10 returns to the non-congested state (as shown in Figure 4), and increases the elephant flow flow threshold at least once to reduce the chance of the data flow being judged as an elephant flow; the K and the M are both positive integers determined according to implementation requirements (for example: the K and the M are both integers greater than one).

于一实作范例中,不同分类的封包关联不同队列,缓冲电路10采用已知的/自行开发的服务等级(class of service;CoS)队列排程技术来分别给予不同队列的封包不同的服务等级;缓冲电路10包括一非大象流缓冲队列与至少一大象流缓冲队列(例如:一第一大象流缓冲队列与一第二大象流缓冲队列,其中所述第一大象流缓冲队列相较于所述第二大象流缓冲队列具有较低传输优先权或较高封包丢弃率),所述目前队列特征值为所述非大象流缓冲队列的一目前队列特征值(例如:图5的CurrG_QL);所述非大象流缓冲队列所关联的一非大象流传输优先权高于所述至少一大象流缓冲队列所关联的任一大象流传输优先权,或者所述非大象流缓冲队列所关联的一非大象流封包丢弃率低于所述至少一大象流缓冲队列所关联的任一大象流封包丢弃率;在缓冲电路10处于所述拥塞状态的情形下,于所述至少一大象流缓冲队列的每一目前队列特征值(例如:图5的CurrY_QL与CurrR_QL)小于所述目标队列特征值的K分之一达M次后,大象流流量门限调整电路310判断缓冲电路10回到所述非拥塞状态(如图5所示),并调高所述大象流流量门限至少一次,以减少数据流被判断为大象流的机会;所述K与所述M均为视实施需求所决定的正整数(例如:所述K与所述M均为大于一的整数)。值得注意的是,上述实施例中的“N次”、“M次”以及“K分之一”等等的设置用以控制大象流流量门限调整电路310对缓冲电路10的拥塞状态或非拥塞状态的判断敏感度,避免状态的切换过于频繁,这些数值可根据应用情境灵活设定。In an implementation example, packets of different categories are associated with different queues, and the buffer circuit 10 adopts a known/self-developed class of service (CoS) queue scheduling technology to give different service levels to packets of different queues; the buffer circuit 10 includes a non-elephant flow buffer queue and at least one elephant flow buffer queue (for example: a first elephant flow buffer queue and a second elephant flow buffer queue, wherein the first elephant flow buffer queue has a lower transmission priority or a higher packet discard rate than the second elephant flow buffer queue), and the current queue characteristic value is a current queue characteristic value of the non-elephant flow buffer queue (for example: CurrG_QL in Figure 5); a non-elephant flow transmission priority associated with the non-elephant flow buffer queue is higher than any elephant flow transmission priority associated with the at least one elephant flow buffer queue, or the non-elephant flow buffer queue The packet discard rate of a non-elephant flow associated with the row is lower than the packet discard rate of any elephant flow associated with the at least one elephant flow buffer queue; when the buffer circuit 10 is in the congested state, after each current queue characteristic value of the at least one elephant flow buffer queue (for example, CurrY_QL and CurrR_QL in FIG. 5) is less than one-Kth of the target queue characteristic value for M times, the elephant flow flow threshold adjustment circuit 310 determines that the buffer circuit 10 returns to the non-congested state (as shown in FIG. 5), and increases the elephant flow flow threshold at least once to reduce the chance of the data flow being judged as an elephant flow; the K and the M are both positive integers determined according to the implementation requirements (for example, the K and the M are both integers greater than one). It is worth noting that the settings of "N times", "M times" and "one-Kth" in the above embodiments are used to control the sensitivity of the elephant flow flow threshold adjustment circuit 310 to the judgment of the congested state or non-congested state of the buffer circuit 10 to avoid too frequent state switching, and these values can be flexibly set according to the application scenario.

图6为一流程图,显示在拥塞状态下大象流流量门限调整电路310如何调整所述大象流流量门限(ELE_TH)的一实施例。图6的步骤可重复地执行,包括:FIG6 is a flow chart showing an embodiment of how the elephant flow flow threshold adjustment circuit 310 adjusts the elephant flow flow threshold (ELE_TH) in a congested state. The steps of FIG6 can be repeatedly performed, including:

S610:大象流流量门限调整电路310判断缓冲电路10处于拥塞状态。S610: The elephant flow rate threshold adjustment circuit 310 determines that the buffer circuit 10 is in a congested state.

S620:大象流流量门限调整电路310判断所述目前队列特征值(Curr_QL)是否大于所述目标队列特征值(Target_QL);若是,进入步骤S632;若否,进入步骤S634。S620: The elephant flow threshold adjustment circuit 310 determines whether the current queue characteristic value (Curr_QL) is greater than the target queue characteristic value (Target_QL); if so, proceed to step S632; if not, proceed to step S634.

S632:大象流流量门限调整电路310判断所述拥塞状态未舒缓,进入步骤S642。S632: The elephant flow rate threshold adjustment circuit 310 determines that the congestion state has not been alleviated, and proceeds to step S642.

S634:大象流流量门限调整电路310判断所述拥塞状态已舒缓,进入步骤S644。S634: The elephant flow rate threshold adjustment circuit 310 determines that the congestion state has been relieved, and enters step S644.

S642:大象流流量门限调整电路310判断所述目前队列特征值(Curr_QL)是否大于一先前队列特征值(Old_QL);若是,进入步骤S652;若否,进入步骤S654。本步骤中,于一目前时间点缓冲电路10的一队列特征值(例如:队列长度或队列时延)为所述目前队列特征值;于一先前时间点缓冲电路10的所述队列特征值为所述先前队列特征值。S642: The elephant flow threshold adjustment circuit 310 determines whether the current queue characteristic value (Curr_QL) is greater than a previous queue characteristic value (Old_QL); if so, proceed to step S652; if not, proceed to step S654. In this step, a queue characteristic value (e.g., queue length or queue delay) of the buffer circuit 10 at a current time point is the current queue characteristic value; the queue characteristic value of the buffer circuit 10 at a previous time point is the previous queue characteristic value.

S644:大象流流量门限调整电路310判断所述目前队列特征值(Curr_QL)是否大于一先前队列特征值(Old_QL);若是,进入步骤S654;若否,进入步骤S656。本步骤中,于一目前时间点缓冲电路10的一队列特征值(例如:队列长度或队列时延)为所述目前队列特征值;于一先前时间点缓冲电路10的所述队列特征值为所述先前队列特征值。S644: The elephant flow flow threshold adjustment circuit 310 determines whether the current queue characteristic value (Curr_QL) is greater than a previous queue characteristic value (Old_QL); if so, proceed to step S654; if not, proceed to step S656. In this step, a queue characteristic value (e.g., queue length or queue delay) of the buffer circuit 10 at a current time point is the current queue characteristic value; the queue characteristic value of the buffer circuit 10 at a previous time point is the previous queue characteristic value.

S652:大象流流量门限调整电路310判断拥塞状态变得更严重,进入步骤S662。S652: The elephant flow flow threshold adjustment circuit 310 determines that the congestion state becomes more serious, and enters step S662.

S654:大象流流量门限调整电路310判断拥塞状态变化不大,进入步骤S664。S654: The elephant flow flow threshold adjustment circuit 310 determines that the congestion state does not change much, and proceeds to step S664.

S656:大象流流量门限调整电路310维持所述大象流流量门限不变。S656: The elephant flow rate threshold adjustment circuit 310 maintains the elephant flow rate threshold unchanged.

S662:大象流流量门限调整电路310调低所述大象流流量门限达一调整值。举例而言,由于步骤S662的背景是拥塞状态变得更严重(步骤S652)以及步骤S664的背景是拥塞状态变化不大(步骤S654),步骤S662的调整值可大于步骤S664的调整值。S662: The elephant flow flow threshold adjustment circuit 310 lowers the elephant flow flow threshold by an adjustment value. For example, since the background of step S662 is that the congestion state becomes more serious (step S652) and the background of step S664 is that the congestion state does not change much (step S654), the adjustment value of step S662 may be greater than the adjustment value of step S664.

S664:大象流流量门限调整电路310调低所述大象流流量门限达一调整值。S664: The elephant flow rate threshold adjustment circuit 310 lowers the elephant flow rate threshold to an adjustment value.

于一实作范例中,图6的步骤S662与S664的调整值(Rate_adj)可通过以下公式来决定:In an implementation example, the adjustment value (Rate_adj) of steps S662 and S664 of FIG. 6 can be determined by the following formula:

Rate_adj=A×(Curr_QL-Target_QL)+B×(Curr_QL-Old_QL)Rate_adj=A×(Curr_QL-Target_QL)+B×(Curr_QL-Old_QL)

其中A、B为视实施需求可调整的常数,用来加强或减弱所述大象流流量门限(ELE_TH)的调整幅度(例如:ELE_TH=ELE_TH–Rate_adj,且ELE_TH不小于0),若A、B均为0,所述大象流流量门限维持不变。另外,所述调整值可选择性地随着所述大象流流量门限的位阶而变,如以下表1的范例所示;然本发明的实施不限于此。Wherein A and B are constants that can be adjusted according to implementation requirements, and are used to strengthen or weaken the adjustment range of the elephant flow threshold (ELE_TH) (for example: ELE_TH = ELE_TH-Rate_adj, and ELE_TH is not less than 0). If A and B are both 0, the elephant flow threshold remains unchanged. In addition, the adjustment value can selectively change with the level of the elephant flow threshold, as shown in the example of Table 1 below; however, the implementation of the present invention is not limited thereto.

表1Table 1

ELE_THELE_TH Rate_adjRate_adj ELE_TH<1MbpsELE_TH<1Mbps Rate_adj=Rate_adj/128Rate_adj=Rate_adj/128 ELE_TH<2MbpsELE_TH<2Mbps Rate_adj=Rate_adj/64Rate_adj=Rate_adj/64 ELE_TH<4MbpsELE_TH<4Mbps Rate_adj=Rate_adj/32Rate_adj=Rate_adj/32 ELE_TH<8MbpsELE_TH<8Mbps Rate_adj=Rate_adj/16Rate_adj=Rate_adj/16 ELE_TH<16MbpsELE_TH<16Mbps Rate_adj=Rate_adj/8Rate_adj=Rate_adj/8 ELE_TH<32MbpsELE_TH<32Mbps Rate_adj=Rate_adj/4Rate_adj=Rate_adj/4 ELE_TH<64MbpsELE_TH<64Mbps Rate_adj=Rate_adj/2Rate_adj=Rate_adj/2 ELE_TH≥64MbpsELE_TH≥64Mbps Rate_adj=Rate_adjRate_adj=Rate_adj

如前所述,当大象流流量门限调整电路310判断缓冲电路10回到所述非拥塞状态(如图4及5所示),大象流流量门限调整电路310调高所述大象流流量门限。于一实作范例中,所述大象流流量门限有其上限,在所述大象流流量门限未达所述上限的情形下,所述大象流流量门限(ELE_TH)可通过以下公式来决定:As mentioned above, when the elephant flow flow threshold adjustment circuit 310 determines that the buffer circuit 10 returns to the non-congested state (as shown in Figures 4 and 5), the elephant flow flow threshold adjustment circuit 310 increases the elephant flow flow threshold. In an implementation example, the elephant flow flow threshold has an upper limit. When the elephant flow flow threshold does not reach the upper limit, the elephant flow flow threshold (ELE_TH) can be determined by the following formula:

上述公式仅为范例,本领域普通技术人员依其实施需求修改所述公式。The above formula is only an example, and ordinary technicians in this field can modify the formula according to their implementation requirements.

请参阅图1到3。分类决策电路320耦接大象流流量门限调整电路310与记录电路210。分类决策电路320从记录电路210取得所述多种数据流的流量信息,用来依据所述多种数据流的流量信息与所述大象流流量门限之间的关系的变化,决定查找表212所包括的所述多种数据流的分类;换言之,所述多种数据流的分类会随着所述多种数据流的流量信息与所述大象流流量门限而变。举例而言,分类决策电路320依据前述第一数据流的第一流量信息(例如:记录电路210于一段计数时间内所计数的所述第一数据流的封包数量或字节数量)计算所述第一数据流的流量(例如:将所述第一流量信息所指出的封包数量/字节数量除以所述段计数时间),然后判断所述第一数据流的流量是否大于所述大象流流量门限;当所述第一数据流的流量大于所述大象流流量门限时,分类决策电路320决定所述第一数据流的分类为一大象流类型;当所述第一数据流的流量小于所述大象流流量门限时,分类决策电路320决定所述第一数据流的分类为一非大象流类型。Please refer to Figures 1 to 3. The classification decision circuit 320 is coupled to the elephant flow flow threshold adjustment circuit 310 and the recording circuit 210. The classification decision circuit 320 obtains the flow information of the multiple data flows from the recording circuit 210 to determine the classification of the multiple data flows included in the lookup table 212 according to the change of the relationship between the flow information of the multiple data flows and the elephant flow flow threshold; in other words, the classification of the multiple data flows will change with the flow information of the multiple data flows and the elephant flow flow threshold. For example, the classification decision circuit 320 calculates the flow of the first data flow based on the first flow information of the aforementioned first data flow (for example: the number of packets or the number of bytes of the first data flow counted by the recording circuit 210 within a counting time period) (for example: dividing the number of packets/number of bytes indicated by the first flow information by the counting time period), and then determines whether the flow of the first data flow is greater than the elephant flow flow threshold; when the flow of the first data flow is greater than the elephant flow flow threshold, the classification decision circuit 320 determines that the first data flow is classified as a elephant flow type; when the flow of the first data flow is less than the elephant flow flow threshold, the classification decision circuit 320 determines that the first data flow is classified as a non-elephant flow type.

图7显示分类决策电路320如何决定所述第一数据流的分类的一实作范例,其中横轴表示数据流的流量(Flow[i].Rate),每条垂直箭头线表示一数据流。如图7所示,所述大象流流量门限高于一第一门限(RED_MIN[i]),因此,分类决策电路320决定所述大象流类型为一第一类型;当所述第一数据流的流量大于所述大象流流量门限时,分类决策电路320决定所述第一数据流的分类为所述第一类型(图中ELE_TH右侧的两道数据流);当所述第一数据流的流量小于所述大象流流量门限时,分类决策电路320决定所述第一数据流的分类为所述非大象流类型(图中ELE_TH左侧的七道数据流)。图8显示分类决策电路320如何决定所述第一数据流的分类的另一实作范例。如图8所示,所述大象流流量门限小于所述第一门限(RED_MIN[i])但大于一第二门限(YEL_MIN[i]),其中所述第一门限大于所述第二门限,因此,分类决策电路320决定所述大象流类型包括所述第一类型与一第二类型;若所述第一数据流的流量大于所述第一门限,分类决策电路320决定所述第一数据流的分类为所述第一类型(图中RED_MIN[i]右侧的三道数据流);若所述第一数据流的流量小于所述第一门限但大于所述大象流流量门限,分类决策电路320决定所述第一数据流的分类为所述第二类型(图中介于RED_MIN[i]与ELE_TH之间的两道数据流);若所述第一数据流的流量小于所述大象流流量门限,分类决策电路320决定所述第一数据流的分类为所述非大象流类型(图中ELE_TH左侧的四道数据流)。图9显示分类决策电路320如何决定所述第一数据流的分类的又一实作范例。如图9所示,所述大象流流量门限低于所述第二门限(YEL_MIN[i]),因此,分类决策电路320决定所述大象流类型包括所述第一类型与一第二类型;若所述第一数据流的流量大于所述第一门限(RED_MIN[i]),分类决策电路320决定所述第一数据流的分类为所述第一类型(图中RED_MIN[i]右侧的三道数据流);若所述第一数据流的流量小于所述第一门限且大于所述第二门限也大于所述大象流流量门限,分类决策电路320决定所述第一数据流的分类为所述第二类型(介于RED_MIN[i]与YEL_MIN[i]之间的二道数据流);若所述第一数据流的流量小于所述第二门限,不论其是否大于大象流流量门限,分类决策电路320决定所述第一数据流的分类为所述非大象流类型(图中YEL_MIN[i]左侧的四道数据流),亦即大象流流量门限调整至低于第二门限(YEL_MIN[i])后,改以第二门限为判断非大象流的标准,任何小于第二门限的数据流均判断为非大象流类型。值得注意的是,前述第一门限和/或第二门限的设定可视实施需求随着数据流的分类而变;所述第一门限和/或第二门限可保存于分类决策电路320中,或由一外部电路(图中未绘示)输入至分类决策电路320。FIG7 shows an implementation example of how the classification decision circuit 320 determines the classification of the first data flow, wherein the horizontal axis represents the flow rate of the data flow (Flow[i].Rate), and each vertical arrow line represents a data flow. As shown in FIG7 , the elephant flow flow threshold is higher than a first threshold (RED_MIN[i]), therefore, the classification decision circuit 320 determines the elephant flow type to be a first type; when the flow rate of the first data flow is greater than the elephant flow flow threshold, the classification decision circuit 320 determines the classification of the first data flow to be the first type (the two data flows on the right side of ELE_TH in the figure); when the flow rate of the first data flow is less than the elephant flow flow threshold, the classification decision circuit 320 determines the classification of the first data flow to be the non-elephant flow type (the seven data flows on the left side of ELE_TH in the figure). FIG8 shows another implementation example of how the classification decision circuit 320 determines the classification of the first data flow. As shown in FIG8 , the elephant flow flow threshold is less than the first threshold (RED_MIN[i]) but greater than a second threshold (YEL_MIN[i]), wherein the first threshold is greater than the second threshold, therefore, the classification decision circuit 320 determines that the elephant flow type includes the first type and a second type; if the flow of the first data flow is greater than the first threshold, the classification decision circuit 320 determines that the first data flow is classified as the first type (the three data flows on the right side of RED_MIN[i] in the figure); if the flow of the first data flow is less than the first threshold but greater than the elephant flow flow threshold, the classification decision circuit 320 determines that the first data flow is classified as the second type (the two data flows between RED_MIN[i] and ELE_TH in the figure); if the flow of the first data flow is less than the elephant flow flow threshold, the classification decision circuit 320 determines that the first data flow is classified as the non-elephant flow type (the four data flows on the left side of ELE_TH in the figure). FIG9 shows another implementation example of how the classification decision circuit 320 determines the classification of the first data flow. As shown in FIG9 , the elephant flow flow threshold is lower than the second threshold (YEL_MIN[i]), therefore, the classification decision circuit 320 determines that the elephant flow type includes the first type and a second type; if the flow of the first data flow is greater than the first threshold (RED_MIN[i]), the classification decision circuit 320 determines that the first data flow is classified as the first type (the three data flows on the right side of RED_MIN[i] in the figure); if the flow of the first data flow is less than the first threshold and greater than the second threshold and greater than the elephant flow flow threshold, the classification decision circuit 320 determines that The first data stream is classified as the second type (two data streams between RED_MIN[i] and YEL_MIN[i]); if the flow of the first data stream is less than the second threshold, regardless of whether it is greater than the elephant flow flow threshold, the classification decision circuit 320 determines that the first data stream is classified as the non-elephant flow type (the four data streams on the left side of YEL_MIN[i] in the figure), that is, after the elephant flow flow threshold is adjusted to be lower than the second threshold (YEL_MIN[i]), the second threshold is used as the standard for judging non-elephant flows, and any data stream less than the second threshold is judged as a non-elephant flow type. It is worth noting that the setting of the first threshold and/or the second threshold can be changed according to the classification of the data stream according to the implementation requirements; the first threshold and/or the second threshold can be stored in the classification decision circuit 320, or input to the classification decision circuit 320 by an external circuit (not shown in the figure).

于一实作范例中,分类决策电路320可进一步依据所述多种数据流的辨识信息与所述多种数据流的流量信息判断所述第一数据流是否属于一特殊的数据流群组(例如:点对点(peer to peer;P2P)数据流群组),其中所述特殊的数据流群组的条件可依实施需求而定,且会包括多道数据流。举例而言,所述多种数据流的流量信息可包括封包长度信息与封包间隔时间信息;若前述多种数据流的流量信息显示其平均封包长度大于X字节(例如,500Bytes)和/或平均封包间隔时间小于Y毫秒(例如,1ms),其中X及Y均为大于0的正数,分类决策电路320判断所述第一数据流属于一P2P数据流群组。值得注意的是,本发明主要利用数据流的流量统计特性来进行判断,前述实例并非本发明的实施限制,例如,也可利用封包间距变异量等特性。若所述第一数据流属于所述特殊的数据流群组,分类决策电路320依据所述特殊的数据流群组的总流量(亦即:所述特殊的数据流群组所包括的所有数据流的流量的加总)与所述大象流流量门限决定所述第一数据流的分类;更明确地说,纵然所述第一数据流的流量小于所述大象流流量门限,若所述第一数据流所属的数据流群组的总流量大于所述大象流流量门限,分类决策电路320仍会决定所述第一数据流为一大象流(即判断所述数据流群组中的所有数据流均为大象流)。In an implementation example, the classification decision circuit 320 may further determine whether the first data stream belongs to a special data stream group (e.g., a peer to peer (P2P) data stream group) based on the identification information of the multiple data streams and the traffic information of the multiple data streams, wherein the condition of the special data stream group may be determined according to implementation requirements and may include multiple data streams. For example, the traffic information of the multiple data streams may include packet length information and packet interval information; if the traffic information of the multiple data streams shows that the average packet length is greater than X bytes (e.g., 500 Bytes) and/or the average packet interval is less than Y milliseconds (e.g., 1 ms), wherein X and Y are both positive numbers greater than 0, the classification decision circuit 320 determines that the first data stream belongs to a P2P data stream group. It is worth noting that the present invention mainly uses the traffic statistics characteristics of the data stream to make judgments, and the above examples are not implementation limitations of the present invention. For example, characteristics such as packet interval variation may also be used. If the first data flow belongs to the special data flow group, the classification decision circuit 320 determines the classification of the first data flow based on the total flow of the special data flow group (that is, the sum of the flows of all data flows included in the special data flow group) and the elephant flow flow threshold; to be more specific, even if the flow of the first data flow is less than the elephant flow flow threshold, if the total flow of the data flow group to which the first data flow belongs is greater than the elephant flow flow threshold, the classification decision circuit 320 will still determine that the first data flow is a elephant flow (that is, it is determined that all data flows in the data flow group are elephant flows).

图10显示本申请的数据流分类装置的另一实施例。图10的数据流分类装置1000包括一转发电路1010与一设定电路1020。转发电路1010与设定电路1020的每一个可通过硬件来实现,或通过硬件执行软件和/或固件来实现。尽管图1与图10的实施例均用来分类数据流,图1的转发电路110包括取得一数据流的流量信息(例如:封包数/字节数)的功能,而图10的转发电路1010不需要包括这样的功能;图1的设定电路120不需要包括记录所述数据流的流量信息(例如:封包序号及其对应的封包取得时间)的功能,但图10的设定电路1020包括这样的功能。简言之,图1的设定电路120可选择性地具有较少的功能,而图10的转发电路1010可选择性地具有较少的功能,故实施本发明者可依其需求采用图1或图10的架构。值得注意的是,本领域普通技术人员能够参考图1的实施例的申请来了解图10的实施例的细节与变化,其意味着图1的实施例的技术特征可以一合理的方式应用于图10的实施例中,因此,图10的实施例的说明原则上不重复图1的实施例已说明的部分。FIG. 10 shows another embodiment of the data stream classification device of the present application. The data stream classification device 1000 of FIG. 10 includes a forwarding circuit 1010 and a setting circuit 1020. Each of the forwarding circuit 1010 and the setting circuit 1020 can be implemented by hardware, or by hardware executing software and/or firmware. Although the embodiments of FIG. 1 and FIG. 10 are both used to classify data streams, the forwarding circuit 110 of FIG. 1 includes a function of obtaining flow information (e.g., number of packets/number of bytes) of a data stream, while the forwarding circuit 1010 of FIG. 10 does not need to include such a function; the setting circuit 120 of FIG. 1 does not need to include a function of recording the flow information (e.g., packet sequence number and its corresponding packet acquisition time) of the data stream, but the setting circuit 1020 of FIG. 10 includes such a function. In short, the setting circuit 120 of FIG. 1 can selectively have fewer functions, and the forwarding circuit 1010 of FIG. 10 can selectively have fewer functions, so the implementer of the present invention can adopt the architecture of FIG. 1 or FIG. 10 according to his needs. It is worth noting that a person of ordinary skill in the art can refer to the application of the embodiment of FIG. 1 to understand the details and changes of the embodiment of FIG. 10 , which means that the technical features of the embodiment of FIG. 1 can be applied to the embodiment of FIG. 10 in a reasonable manner. Therefore, the description of the embodiment of FIG. 10 does not repeat the parts already described in the embodiment of FIG. 1 in principle.

图11显示图10的转发电路1010的一实施例。图11的转发电路1010包括一第一存储电路1110、一分类电路1120与一数据流信息取得电路1130,其中第一存储电路1110与分类电路1120可整合为一查找表电路(图中未绘示),然此并非本发明的实施限制。Fig. 11 shows an embodiment of the forwarding circuit 1010 of Fig. 10. The forwarding circuit 1010 of Fig. 11 includes a first storage circuit 1110, a classification circuit 1120 and a data stream information acquisition circuit 1130, wherein the first storage circuit 1110 and the classification circuit 1120 can be integrated into a lookup table circuit (not shown in the figure), but this is not an implementation limitation of the present invention.

请参阅图10及图11。第一存储电路1110用来存储一查找表1112。查找表1112包括多种数据流的辨识信息以及所述多种数据流的分类。于一实作范例中,所述多种数据流的每一个的辨识信息例如为五数值组(5-tuple),然此并非本发明的实施限制;在实施为可行的情形下,凡是能用于辨识数据流的身份的信息均能作为所述辨识信息。Please refer to FIG. 10 and FIG. 11. The first storage circuit 1110 is used to store a lookup table 1112. The lookup table 1112 includes identification information of multiple data streams and classifications of the multiple data streams. In an implementation example, the identification information of each of the multiple data streams is, for example, a 5-tuple, but this is not a limitation of the present invention; in a feasible implementation, any information that can be used to identify the identity of a data stream can be used as the identification information.

请参阅图10及图11。分类电路1120耦接一数据流输入端(即图中所示“数据流”箭头的起始端)与第一存储电路1110,用来从所述数据流输入端接收一第一数据流,以依据所述第一数据流的第一辨识信息查询查找表1112所记录的所述多种数据流的辨识信息,其中所述第一数据流可以是所述数据流输入端所接收的任一数据流。分类电路1120查询查找表1112的方式的一实施例同于图2的分类电路220查询查找表212的方式。当查找表1112包括所述第一辨识信息时,分类电路1120使用查找表1112以决定所述第一数据流的分类,并输出所述第一数据流至一缓冲电路11;分类电路1120决定所述第一数据流的分类的方式的一实施例同于图2的分类电路220决定所述第一数据流的分类的方式。当查找表1112未包括所述第一辨识信息时,分类电路1120将所述第一数据流归类为一默认分类(例如:非大象流类型),并输出所述第一数据流至缓冲电路11。值得注意的是,缓冲电路11可包括于数据流分类装置1000中,或独立于数据流分类装置1000外。Please refer to FIG. 10 and FIG. 11. The classification circuit 1120 is coupled to a data stream input terminal (i.e., the starting end of the "data stream" arrow shown in the figure) and a first storage circuit 1110, and is used to receive a first data stream from the data stream input terminal, so as to query the identification information of the multiple data streams recorded in the lookup table 1112 according to the first identification information of the first data stream, wherein the first data stream can be any data stream received by the data stream input terminal. An embodiment of the way in which the classification circuit 1120 queries the lookup table 1112 is the same as the way in which the classification circuit 220 of FIG. 2 queries the lookup table 212. When the lookup table 1112 includes the first identification information, the classification circuit 1120 uses the lookup table 1112 to determine the classification of the first data stream, and outputs the first data stream to a buffer circuit 11; an embodiment of the way in which the classification circuit 1120 determines the classification of the first data stream is the same as the way in which the classification circuit 220 of FIG. 2 determines the classification of the first data stream. When the lookup table 1112 does not include the first identification information, the classification circuit 1120 classifies the first data stream into a default classification (e.g., non-elephant stream type) and outputs the first data stream to the buffer circuit 11. It should be noted that the buffer circuit 11 may be included in the data stream classification device 1000, or may be independent of the data stream classification device 1000.

于一实作范例中,查找表1112所包括的所述多种数据流的分类的一范例同于图2的查找表212所包括的所述多种数据流的分类(亦即:多种分类包括大象流类型与非大象流类型),且缓冲电路11与缓冲电路10相仿,会分别给予不同分类的数据流的封包不同的传输优先权或封包丢弃率。于一实作范例中,当查找表1112包括所述第一辨识信息时,查找表1112也包括所述第一辨识信息所关联的所述第一数据流的分类,因此,分类电路1120得以依据查找表1112所包括的所述第一数据流的分类,标示所述第一数据流的每个封包,然后缓冲电路90便能依据每一封包的标示得知所述封包的分类。In an implementation example, an example of the classification of the multiple data streams included in the lookup table 1112 is the same as the classification of the multiple data streams included in the lookup table 212 of FIG. 2 (that is, the multiple classifications include elephant flow types and non-elephant flow types), and the buffer circuit 11 is similar to the buffer circuit 10, and will give different transmission priorities or packet discard rates to packets of data streams of different classifications. In an implementation example, when the lookup table 1112 includes the first identification information, the lookup table 1112 also includes the classification of the first data stream associated with the first identification information, so that the classification circuit 1120 can mark each packet of the first data stream according to the classification of the first data stream included in the lookup table 1112, and then the buffer circuit 90 can know the classification of the packet according to the marking of each packet.

请参阅图10及图11。数据流信息取得电路1130用来从所述数据流输入端或分类电路1120的输出取得所述第一数据流的至少一部分,以获得并输出所述第一数据流的第一辨识信息(例如:前述的五数值组)与第一流量信息(例如:封包的序号与取样时间)。值得注意的是,本实施例中,无论查找表1112是否包括所述第一辨识信息,数据流信息取得电路1130都会用来取得所述第一数据流的至少一部分。于一实作范例中,数据流信息取得电路1130按一默认机率执行一取样操作,以试着取得所述第一数据流的所述至少一部分,从而取得所述第一辨识信息以及所述第一流量信息;换言之,数据流信息增补电路1130取得所述第一数据流的所述至少一部分的机率为所述默认机率,因此,数据流信息增补电路1130有可能不会采样到某些数据流的封包。Please refer to FIG. 10 and FIG. 11. The data stream information acquisition circuit 1130 is used to acquire at least a portion of the first data stream from the data stream input terminal or the output of the classification circuit 1120 to obtain and output the first identification information (e.g., the aforementioned five-value group) and the first flow information (e.g., the sequence number and sampling time of the packet) of the first data stream. It is worth noting that in this embodiment, regardless of whether the lookup table 1112 includes the first identification information, the data stream information acquisition circuit 1130 will be used to acquire at least a portion of the first data stream. In an implementation example, the data stream information acquisition circuit 1130 performs a sampling operation according to a default probability to try to acquire the at least a portion of the first data stream, thereby acquiring the first identification information and the first flow information; in other words, the probability of the data stream information supplementation circuit 1130 acquiring the at least a portion of the first data stream is the default probability, so the data stream information supplementation circuit 1130 may not sample packets of some data streams.

图12显示图10的设定电路1020的一实施例。图12的设定电路1020包括一第二存储电路1210、一大象流流量门限调整电路1220与一分类决策电路1230。FIG12 shows an embodiment of the setting circuit 1020 of FIG10 . The setting circuit 1020 of FIG12 includes a second storage circuit 1210 , a large elephant flow rate threshold adjustment circuit 1220 and a classification decision circuit 1230 .

请参阅图10到图12。第二存储电路1210耦接数据流信息取得电路1130,用来存储一数据流信息表1212。数据流信息表1212用来存储来自数据流信息取得电路1130的所述多种数据流的辨识信息与流量信息,所述多种数据流的辨识信息包括所述第一辨识信息,所述多种数据流的流量信息包括所述第一流量信息。Please refer to Figures 10 to 12. The second storage circuit 1210 is coupled to the data stream information acquisition circuit 1130, and is used to store a data stream information table 1212. The data stream information table 1212 is used to store the identification information and flow information of the multiple data streams from the data stream information acquisition circuit 1130, wherein the identification information of the multiple data streams includes the first identification information, and the flow information of the multiple data streams includes the first flow information.

请参阅图10到图12。大象流流量门限调整电路1220耦接缓冲电路11,用来依据一目标队列特征值(例如:固定的队列长度或固定的队列时延)与缓冲电路11的一目前队列特征值(例如:易变的队列长度或易变的队列时延)之间的关系的变化,决定一大象流流量门限。大象流流量门限调整电路1220的一实施例同于图3的大象流流量门限调整电路310,细节见于图3到图6及其相关说明。Please refer to FIG. 10 to FIG. 12. The elephant flow flow threshold adjustment circuit 1220 is coupled to the buffer circuit 11, and is used to determine an elephant flow flow threshold according to a change in the relationship between a target queue characteristic value (e.g., a fixed queue length or a fixed queue delay) and a current queue characteristic value (e.g., a variable queue length or a variable queue delay) of the buffer circuit 11. An embodiment of the elephant flow flow threshold adjustment circuit 1220 is the same as the elephant flow flow threshold adjustment circuit 310 of FIG. 3, and details are shown in FIG. 3 to FIG. 6 and related descriptions.

请参阅图10到图12。分类决策电路1230耦接大象流流量门限调整电路1220、第二存储电路1210与第一存储电路1110。分类决策电路1230用来依据所述多种数据流的流量信息与所述大象流流量门限之间的关系的变化,决定第一存储电路1110的查找表1112所包括的所述多种数据流的分类。举例而言,分类决策电路1230先依据数据流信息表1212所包括的所述第一数据流的第一流量信息计算所述第一数据流的流量,再依据所述第一数据流的流量与所述大象流流量门限决定所述第一数据流的分类,然后以此更新查找表1112中所述第一数据流的分类。分类决策电路1230决定所述第一数据流的分类的方式的一实施例同于分类决策电路320决定所述第一数据流的分类的方式。Please refer to FIG. 10 to FIG. 12. The classification decision circuit 1230 is coupled to the elephant flow flow threshold adjustment circuit 1220, the second storage circuit 1210 and the first storage circuit 1110. The classification decision circuit 1230 is used to determine the classification of the multiple data flows included in the lookup table 1112 of the first storage circuit 1110 according to the change of the relationship between the flow information of the multiple data flows and the elephant flow flow threshold. For example, the classification decision circuit 1230 first calculates the flow of the first data flow according to the first flow information of the first data flow included in the data flow information table 1212, and then determines the classification of the first data flow according to the flow of the first data flow and the elephant flow flow threshold, and then updates the classification of the first data flow in the lookup table 1112. An embodiment of the method for the classification decision circuit 1230 to determine the classification of the first data flow is the same as the method for the classification decision circuit 320 to determine the classification of the first data flow.

于一实作范例中,当所述第一数据流的一封包协议是传输控制协议(TCP)时,数据流信息取得电路1130按一默认机率执行一取样作业,以取得所述第一数据流的一先前封包与一目前封包,然后分类决策电路1230依据所述二封包的序号与所述二封包的取样时间得到所述第一数据流的流量。举例而言,所述先前封包的序号(Pre_SN)及取样时间(Pre_Time)存储于第二存储电路1210中,所述目前封包的序号(Cur_SN)及取样时间(Cur_Time)由数据流信息取得电路1130实时提供,而分类决策电路1230将所述二封包的序号的一序号差值(deltaSN=Cur_SN–Pre_SN)除以所述二封包的取样时间的一间隔时间(deltaTime=Cur_Time–Pre_Time),以得到所述第一数据流的流量(Flow[i].rate),如下式所示:In an implementation example, when a packet protocol of the first data flow is the transmission control protocol (TCP), the data flow information acquisition circuit 1130 performs a sampling operation according to a default probability to obtain a previous packet and a current packet of the first data flow, and then the classification decision circuit 1230 obtains the flow of the first data flow according to the sequence numbers of the two packets and the sampling time of the two packets. For example, the sequence number (Pre_SN) and the sampling time (Pre_Time) of the previous packet are stored in the second storage circuit 1210, and the sequence number (Cur_SN) and the sampling time (Cur_Time) of the current packet are provided in real time by the data flow information acquisition circuit 1130, and the classification decision circuit 1230 divides a sequence number difference (deltaSN=Cur_SN-Pre_SN) of the sequence numbers of the two packets by an interval time (deltaTime=Cur_Time-Pre_Time) of the sampling time of the two packets to obtain the flow of the first data flow (Flow[i].rate), as shown in the following formula:

值得注意的是,数据流信息取得电路1130所提供的最新的封包的序号及取样时间会用来更新所述先前封包的序号与取样时间。It should be noted that the sequence number and sampling time of the latest packet provided by the data stream information acquisition circuit 1130 will be used to update the sequence number and sampling time of the previous packet.

于一实作范例中,当所述第一数据流的一封包协议不是传输控制协议时,数据流信息取得电路1130按一默认机率执行一取样作业,以取得所述第一数据流的二封包包括一先前封包与一目前封包,然后分类决策电路1230依据所述目前封包的长度、所述预设机率与所述二封包的取样时间得到所述第一数据流的流量。举例而言,所述先前封包的取样时间(Pre_Time)存储于第二存储电路1210中,所述目前封包的取样时间(Cur_Time)及长度(Cur_Length)由数据流信息取得电路1130实时提供,而分类决策电路1230将所述目前封包的长度除以所述预设机率(P%),再除以所述二封包的取样时间的一间隔(deltaTime=Cur_Time–Pre_Time),以估计所述第一数据流的流量(Flow[i].rate),如下式所示:In an implementation example, when a packet protocol of the first data stream is not the transmission control protocol, the data stream information acquisition circuit 1130 performs a sampling operation according to a default probability to obtain two packets of the first data stream including a previous packet and a current packet, and then the classification decision circuit 1230 obtains the flow of the first data stream according to the length of the current packet, the preset probability and the sampling time of the two packets. For example, the sampling time (Pre_Time) of the previous packet is stored in the second storage circuit 1210, and the sampling time (Cur_Time) and length (Cur_Length) of the current packet are provided in real time by the data stream information acquisition circuit 1130, and the classification decision circuit 1230 divides the length of the current packet by the preset probability (P%), and then divides it by an interval (deltaTime=Cur_Time-Pre_Time) of the sampling time of the two packets to estimate the flow of the first data stream (Flow[i].rate), as shown in the following formula:

于一实作范例中,分类决策电路1230可进一步依据所述多种数据流的辨识信息与所述多种数据流的流量信息判断所述第一数据流是否属于一特殊的数据流群组(例如:点对点(peer to peer;P2P)数据流群组),分类决策电路1230与分类决策电路320采用相同方式来判断所述第一数据流是否属于一特殊的数据流群组。In an implementation example, the classification decision circuit 1230 can further determine whether the first data flow belongs to a special data flow group (for example, a peer to peer (P2P) data flow group) based on the identification information of the multiple data flows and the traffic information of the multiple data flows. The classification decision circuit 1230 and the classification decision circuit 320 use the same method to determine whether the first data flow belongs to a special data flow group.

请注意,在实施为可能的前提下,本技术领域普通技术人员可选择性地实施前述任一实施例中部分或全部技术特征,或选择性地实施前述多个实施例中部分或全部技术特征的组合,藉此增加本发明实施时的弹性。Please note that, under the premise that implementation is possible, ordinary technicians in this technical field may selectively implement some or all of the technical features in any of the aforementioned embodiments, or selectively implement a combination of some or all of the technical features in the aforementioned multiple embodiments, thereby increasing the flexibility of the implementation of the present invention.

综上所述,本发明能够依据多道数据流的流量与一大象流流量门限之间的比较来分类这些数据流,从而避免现有技术的问题。In summary, the present invention can classify multiple data streams based on the comparison between the flow rates of the multiple data streams and the flow rate threshold of a large data stream, thereby avoiding the problems of the prior art.

虽然本发明的实施例如上所述,然而这些实施例并非用来限定本发明,本技术领域普通技术人员可依据本发明的明示或隐含的内容对本发明的技术特征施以变化,凡此种种变化均可能属于本发明所寻求的专利保护范围,换言之,本发明的专利保护范围须视本权利要求书所界定的范围为准。Although the embodiments of the present invention are described above, these embodiments are not intended to limit the present invention. A person skilled in the art may make changes to the technical features of the present invention according to the explicit or implicit contents of the present invention. All these changes may fall within the scope of patent protection sought by the present invention. In other words, the scope of patent protection of the present invention shall be subject to the scope defined by the claims.

附图标记说明Description of Reference Numerals

100:数据流分类装置100: Data flow classification device

110:转发电路110: Forwarding circuit

120:设定电路120: Setting circuit

10:缓冲电路10: Buffer circuit

210:记录电路210: Recording circuit

212:查找表212: Lookup Table

220:分类电路220: Classification Circuit

230:数据流信息增补电路230: Data stream information supplement circuit

310:大象流流量门限调整电路310: Elephant flow flow threshold adjustment circuit

320:分类决策电路320: Classification decision circuit

ELE_TH:大象流流量门限ELE_TH: Elephant flow flow threshold

Curr_QL:目前队列特征值Curr_QL: Current queue characteristic value

Target_QL:目标队列特征值Target_QL: target queue characteristic value

CurrG_QL:非大象流缓冲队列的目前队列特征值CurrG_QL: Current queue characteristic value of non-elephant flow buffer queue

CurrY_QL:大象流缓冲队列的目前队列特征值CurrY_QL: Current queue characteristic value of the elephant flow buffer queue

CurrR_QL:大象流缓冲队列的目前队列特征值CurrR_QL: Current queue characteristic value of the elephant flow buffer queue

S610~S664:步骤S610~S664: Steps

Old_QL:先前队列特征值Old_QL: previous queue characteristic value

Flow[i].Rate:数据流的流量Flow[i].Rate: The rate of the data flow

RED_MIN[i]:第一门限RED_MIN[i]: first threshold

YEL_MIN[i]:第二门限YEL_MIN[i]: second threshold

1000:数据流分类装置1000: Data flow classification device

1010:转发电路1010: Forwarding circuit

1020:设定电路1020: Setting circuit

11:缓冲电路11: Buffer circuit

1110:第一存储电路1110: first storage circuit

1112:查找表1112: Lookup table

1120:分类电路1120: Classification Circuit

1130:数据流信息取得电路1130: Data stream information acquisition circuit

1210:第二存储电路1210: Second storage circuit

1212:数据流信息表1212: Data flow information table

1220:大象流流量门限调整电路1220: Elephant flow flow threshold adjustment circuit

1230:分类决策电路1230: Classification decision circuit

Claims (10)

1. A data stream classification device, comprising:
a forwarding circuit, comprising:
a recording circuit for calculating the flow rate of each of a plurality of data streams to obtain flow rate information of the plurality of data streams, and including a lookup table including identification information of the plurality of data streams, flow rate information of the plurality of data streams, and classification of the plurality of data streams;
The classifying circuit is coupled with a data stream input end and the recording circuit and is used for receiving a first data stream from the data stream input end, inquiring the identification information of the plurality of data streams included in the lookup table according to the first identification information of the first data stream, determining the classification of the first data stream by using the lookup table when the lookup table comprises the first identification information, outputting the first data stream to a buffer circuit, classifying the first data stream into a default classification when the lookup table does not comprise the first identification information, and outputting the first data stream to the buffer circuit; and
a data stream information supplementing circuit coupled to the recording circuit and the classifying circuit, wherein when the lookup table does not include the first identification information, the data stream information supplementing circuit obtains at least a portion of the first data stream to obtain the first identification information, and then the data stream information supplementing circuit adds the first identification information to the lookup table as a portion of the identification information of the plurality of data streams, wherein the recording circuit calculates a flow of the first data stream to obtain first flow information as a portion of the flow information of the plurality of data streams; and
A setting circuit, comprising:
an elephant flow threshold adjusting circuit, coupled to the buffer circuit, for determining an elephant flow threshold according to a change in a relationship between a target queue characteristic value and a current queue characteristic value of the buffer circuit; and
and the classification decision circuit is coupled with the elephant flow threshold adjustment circuit and the recording circuit and is used for determining the classification of the multiple data flows included in the lookup table according to the change of the relation between the flow information of the multiple data flows and the elephant flow threshold.
2. The data stream sorting apparatus of claim 1, wherein each packet of the first data stream includes the first identification information, the sorting circuit is configured to query the identification information of the plurality of data streams included in the lookup table according to the first identification information included in each packet of the first data stream, and when the lookup table includes the first identification information, the lookup table also includes the sorting of the first data stream associated with the first identification information, and the sorting circuit marks each packet of the first data stream according to the sorting of the first data stream included in the lookup table.
3. The data stream sorting apparatus of claim 1, wherein the data stream information supplement circuit performs a sampling operation with a default probability such that the data stream information supplement circuit obtains a probability of the at least a portion of the first data stream as the predetermined probability.
4. The data stream sorting apparatus of claim 1 wherein said elephant stream flow threshold adjustment circuit determines that said buffer circuit is in a congested state and lowers said elephant stream flow threshold at least once after said current queue characteristic value is greater than said target queue characteristic value by N times, said N being a positive integer.
5. The data stream sorting apparatus of claim 4, wherein a queue characteristic value of the buffer circuit at a current point in time is the current queue characteristic value, and the queue characteristic value of the buffer circuit at a previous point in time is a previous queue characteristic value; the characteristic value of the queue is a queue length or a queue time delay; and under the condition that the buffer circuit is judged to be in the congestion state by the elephant flow threshold adjusting circuit, if the current queue characteristic value is larger than the target queue characteristic value, the elephant flow threshold adjusting circuit further adjusts the elephant flow threshold according to the change of the relation between the current queue characteristic value and the previous queue characteristic value.
6. The data stream sorting apparatus of claim 4, wherein a queue characteristic value of the buffer circuit at a current point in time is the current queue characteristic value, and the queue characteristic value of the buffer circuit at a previous point in time is a previous queue characteristic value; the characteristic value of the queue is a queue length or a queue time delay; and under the condition that the buffer circuit is judged to be in the congestion state by the elephant flow threshold adjusting circuit, if the current queue characteristic value is smaller than the target queue characteristic value, the elephant flow threshold adjusting circuit further adjusts the elephant flow threshold or maintains the elephant flow threshold unchanged according to the change of the relation between the current queue characteristic value and the previous queue characteristic value.
7. The data flow classification device of claim 4 wherein said elephant flow threshold adjustment circuit determines that said buffer circuit is in a non-congested state and increases said elephant flow threshold at least once after said current queue characteristic value is less than K-th of said target queue characteristic value by up to M times; and K and M are positive integers.
8. The data stream sorting apparatus of claim 4, wherein said buffer circuit comprises a non-elephant stream buffer queue and at least one elephant stream buffer queue, said current queue characteristic value being a queue characteristic value of said non-elephant stream buffer queue; a non-elephant flow transmission priority associated with the non-elephant flow buffer queue is higher than any elephant flow transmission priority associated with the at least one elephant flow buffer queue, or a non-elephant flow packet discarding rate associated with the non-elephant flow buffer queue is lower than any elephant flow packet discarding rate associated with the at least one elephant flow buffer queue; after each current queue characteristic value of the at least one elephant flow buffer queue is less than one K times of the target queue characteristic value for M times, the elephant flow threshold adjusting circuit judges that the buffer circuit is in a non-congestion state and increases the elephant flow threshold at least once; and K and M are positive integers.
9. The data stream classification apparatus of claim 1, wherein said classification decision circuit determines that said first data stream is classified as an elephant stream type when said classification decision circuit determines that the flow of said first data stream is greater than said elephant stream flow threshold based on said first flow information; when the classification decision circuit judges that the flow of the first data flow is smaller than the elephant flow threshold according to the first flow information, the classification decision circuit decides that the first data flow is classified into a non-elephant flow type.
10. The data stream classification apparatus according to claim 1, wherein the classification decision circuit determines whether the first data stream belongs to a specific data stream group according to the identification information of the plurality of data streams and the traffic information of the plurality of data streams; if the first data stream belongs to the special data stream group, the classification decision circuit decides the classification of the first data stream according to the total flow of the special data stream group and the elephant flow threshold.
CN202110088571.5A 2021-01-22 2021-01-22 Data stream classification device Active CN114785741B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110088571.5A CN114785741B (en) 2021-01-22 2021-01-22 Data stream classification device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110088571.5A CN114785741B (en) 2021-01-22 2021-01-22 Data stream classification device

Publications (2)

Publication Number Publication Date
CN114785741A CN114785741A (en) 2022-07-22
CN114785741B true CN114785741B (en) 2024-04-16

Family

ID=82407731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110088571.5A Active CN114785741B (en) 2021-01-22 2021-01-22 Data stream classification device

Country Status (1)

Country Link
CN (1) CN114785741B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105659543A (en) * 2013-10-07 2016-06-08 瑞典爱立信有限公司 Downlink flow management

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9124515B2 (en) * 2010-11-22 2015-09-01 Hewlett-Packard Development Company, L.P. Elephant flow detection in a computing device
US9882832B2 (en) * 2013-09-10 2018-01-30 Robin Systems, Inc. Fine-grained quality of service in datacenters through end-host control of traffic flow
US9426040B2 (en) * 2014-01-06 2016-08-23 Cisco Technology, Inc. Mixed distributed/centralized routing techniques based on closed-loop feedback from a learning machine to avoid dark zones
US10601714B2 (en) * 2016-06-28 2020-03-24 Mellanox Technologies Tlv Ltd. Adaptive flow prioritization
US10887240B2 (en) * 2018-02-26 2021-01-05 Marvell Israel (M.I.S.L) Ltd. Automatic flow learning in network devices
US11575609B2 (en) * 2019-07-19 2023-02-07 Intel Corporation Techniques for congestion management in a network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105659543A (en) * 2013-10-07 2016-06-08 瑞典爱立信有限公司 Downlink flow management

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Design and Provision of Traffic Grooming for Optical Wireless Data Center Networks;Abdulkadir Celik et al;《IEEE》;20181209;第第67卷卷(第第3期期);第2245-2259页 *
软件定义网络中可扩展的流表项处理机制;朱向阳;陈兵;;计算机技术与发展;20161128;26(12);第12-16页 *

Also Published As

Publication number Publication date
CN114785741A (en) 2022-07-22

Similar Documents

Publication Publication Date Title
US6252848B1 (en) System performance in a data network through queue management based on ingress rate monitoring
CN102223675B (en) Method, system and equipment for alarming and processing congestion
US9998400B2 (en) Attribution of congestion contributions
CN109428830B (en) A device and method for dynamically adjusting the speed limit threshold of ONU equipment ports
CN101582842A (en) Congestion control method and congestion control device
US20120224480A1 (en) Technique for throughput control for packet switches
CN1297098C (en) System flow controlling method
CN101547159A (en) Method and device for preventing network congestion
TWI763261B (en) Data flow classification device
Ahammed et al. Anakyzing the performance of active queue management algorithms
AU5432301A (en) Method for marking packets of data transmission flow and marker device performing this method
CN112787919B (en) Message transmission method and device and readable medium
CN119052174A (en) Method and device for displaying congestion notification marks and electronic equipment
CN114629847B (en) Coupled multi-stream TCP congestion control method based on available bandwidth allocation
TWI739706B (en) Data flow classification device
CN114785741B (en) Data stream classification device
CN114827042B (en) Data flow classification device
CN114500394B (en) A Differentiated Service Congestion Control Method
CN113746700A (en) Elephant flow rapid detection method and system based on probability sampling
Jiang et al. Self adjustable CHOKe: an active queue management algorithm for congestion control and fair bandwidth allocation
Irawan et al. Performance evaluation of queue algorithms for video-on-demand application
CN118368252B (en) Traffic shaping scheduling method based on dynamic variable rate token allocation and idle buffer memory
CN112152939B (en) Double-queue cache management method for inhibiting non-response flow and service differentiation
KR100462475B1 (en) Apparatus for queue scheduling using linear control and method therefor
JP2004056726A (en) Traffic volume control device and traffic volume control method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant