Priority-sensitive per-flow size measurement method, system and device in high-speed networks
By using high-priority structure and CS-Sketch structure in high-speed networks combined with priority-sensitive hash and cuckoo hash data structures, the problem of speed and memory overhead in priority-sensitive stream size measurement is solved, and efficient Flow size measurement.
Patent Information
- Application Number
- CN202410831304.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-06-26
AI Technical Summary
The prior art cannot take into account the problem of measurement speed and low memory overhead during priority-sensitive stream size measurements, especially in high-speed networks where the storage and measurement efficiency of high-priority and low-priority streams are limited.
Using a data structure that includes a high priority structure and a CS-Sketch structure, separating and efficiently storing high priority and low priority streams through priority sensitive hashing and cuckoo hashing functions to ensure the accuracy of high priority streams. Rapid processing of measurement and low priority flows.
It realizes the rapid and accurate completion of priority sensitive stream size measurement in finite memory space, improves the storage accuracy of high-priority streams and the measurement efficiency of low-priority streams, and reduces hash overhead and memory access overhead.
Smart Images

Figure CN118400298B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network flow measurement, and in particular to a method, system and device for measuring the size of each flow that is sensitive to priority in a high-speed network. Background Art
[0002] Network flow measurement plays a core role in computer networks, such as network telemetry, anomaly detection, and capacity planning. A real network data flow consists of a series of packets, each of which has a flow label (usually a five-tuple is used as the label of a network flow: source IP address, destination IP address, source port number, destination port number, and protocol type). The term "flow" is usually used to refer to packets with the same label, and "per flow" usually refers to a single data flow in network traffic. Flow estimation is a key task in flow measurement. Due to the huge scale of network traffic, the high packet transmission rate, and the limited on-chip memory of network devices, it is challenging to keep accurate records of flow information.
[0003] Sketch is a compact data structure that provides fast approximate queries with minimal memory overhead, achieving a good balance between accuracy, speed, and memory usage. It has become the main solution for flow estimation. Many Sketches have been proposed and used for various measurement tasks, including per-flow size estimation, per-flow cardinality estimation, continuous flow detection, and burst flow detection. In addition to traditional flow measurement tasks, researchers have recently shown interest in priority differentiation in flow measurement. Different network applications have different importance, so their network traffic requires different measurement accuracy. For example, suspected malicious traffic should be measured with a more precise resolution than other background traffic. In addition, for delay-sensitive applications such as real-time video streaming and live streaming, continuous tracking is also required to adapt to real-time rates.
[0004] In view of the above purpose, researchers have proposed many priority-sensitive Sketches, such as MC-Sketch, PA-Sketch and Cuckoo Sketch. These Sketches can provide different measurement accuracy for flows of different priorities. The core idea is to divide the Sketch into a high-priority part and a low-priority part, and retain high-priority and low-priority flows respectively. All flows are first filtered through the high-priority part, and the high-priority flows are saved in the high-priority part to obtain differential measurement accuracy. However, for the existing priority-sensitive Sketches, since most flows in real network data flows are low-priority flows, a large number of low-priority flows first pass through the high-priority part and are finally stored in the low-priority part, which leads to huge hashing overhead and memory access overhead, thereby reducing throughput. The low throughput of MC-Sketch and Cuckoo Sketch is mainly affected by this factor. Although PA-Sketch proposes priority-sensitive hashing to reduce the hashing overhead of low-priority flows in the high-priority part, this also causes the high-priority part to be unable to store as many high-priority flows as possible, thereby limiting the measurement accuracy of high-priority flows. Summary of the invention
[0005] To this end, the technical problem to be solved by the present invention is to overcome the problem in the prior art that both measurement speed and low memory overhead cannot be taken into account in the process of priority-sensitive flow size measurement, and a compact data structure is proposed that can quickly and accurately complete the priority-sensitive flow size measurement task in a high-speed network within a limited memory space.
[0006] To solve the above technical problems, the present invention provides a priority-sensitive per-flow size measurement method in a high-speed network, comprising the following steps:
[0007] S1: construct a data structure for storing priority-sensitive flows, wherein the data structure includes a high priority structure for storing and processing high priority flows and a CS-Sketch structure for storing and processing low priority flows;
[0008] S2: first update the high priority structure according to the flow label and priority of the arriving flow, and then update the CS-Sketch structure based on the update result of the high priority structure to obtain an updated data structure;
[0009] S3: Query the updated data structure to obtain a flow size estimate.
[0010] In one embodiment of the present invention, the high priority structure includes m buckets, BA[i] represents the i-th bucket therein, each bucket includes n cells, BA[i][j] represents the j-th cell in the i-th bucket, and each cell BA[i][j] is used to store the label, priority and statistical flow size counter of the arriving flow.
[0011] In one embodiment of the present invention, the CS-Sketch structure is a two-dimensional counter array with d rows and w columns, and the two-dimensional counter array is associated with 2×d number of hash functions, wherein the hash function includes d first hash functions (h1, h2, ... h d ) and d second hash functions (G1, G2, … G d ), the first hash function (h1,h2,…h d ) is used to determine the flow f Mapped to the column index of the corresponding row counter, the second hash function (G1, G2, ... G d ) is used to determine whether to increment or decrement the mapped counter.
[0012] In one embodiment of the present invention, the step of acquiring the updated data structure includes:
[0013] S201: Utilize the high priority structure to conduct f Processing, set the number of culling times num = 0 and the maximum number of culling times maxKickTimes, extract the flow label in the arriving flow f and priority p, the arriving flow is recorded as flow f ;
[0014] S202: Stream-based f The priority p is the flow f Assign gen(p) priority-sensitive hash functions, where gen(p) = p + a, a is a hyperparameter;
[0015] S203: Perform multiple hash calculations using gen(p) priority-sensitive hash functions to obtain gen(p) candidate buckets;
[0016] S204: Traverse all candidate buckets to determine whether any candidate bucket has stored the flow f :
[0017] If yes, update the storage stream f The cell counter of the corresponding cell is incremented by one;
[0018] Otherwise, proceed to step S205;
[0019] S205: Determine whether there is an empty cell in the candidate bucket:
[0020] If there are empty cells in the candidate bucket, select an empty cell to store the flow f ;
[0021] If all candidate buckets have no empty cells, search for the flow with the lowest priority in all candidate buckets and compare the flow f and the priority size of the lowest priority stream:
[0022] If the flow f If the priority of the flow is less than or equal to the priority of the flow with the lowest priority, the flow f Recorded as target flow;
[0023] If the flow f The priority of the candidate bucket is greater than the lowest priority in the candidate bucket, and the process goes to step S206;
[0024] S206: Use the cuckoo hash function to remove the flow with the lowest priority from the cell where it is located. After each removal operation, the value of the removal number num is increased by one, and the flow f Stored in the empty cell after elimination, the flow with the lowest priority is used as the new flow f , extract the flow label and priority of the flow with the lowest priority, calculate the candidate bucket of the flow with the lowest priority, and return to S205 until the number of elimination times num reaches the maximum number of elimination times maxKickTimes, and obtain the flow with the lowest priority as the target flow;
[0025] S207: Insert the target stream into the CS-Sketch structure, and update the CS-Sketch structure.
[0026] In one embodiment of the present invention, the method for updating the CS-Sketch structure includes:
[0027] When inserting the current stream with a stream size of c into the CS-Sketch structure, first use the d first hash functions to perform d hash calculations on the current stream to obtain d first hash values, determine the counter of each row corresponding to the current stream according to the d first hash values, use the d second hash functions to perform d hash calculations on the current stream to obtain d second hash values, and determine whether to increment or decrement the counter for the i-th row according to the second hash value Gi(f).
[0028] In one embodiment of the present invention, the method for obtaining the estimated value of the flow size is:
[0029] When querying a flow with priority p f When the high priority structure is used, p hash calculations are first performed to obtain p candidate buckets, and then the flow is checked. f Whether to store in these candidate buckets:
[0030] If the candidate bucket already has a stream stored in it f , then get the counter field of the matching cell, that is, the stream f The estimated flow size of
[0031] If the candidate bucket does not store the flow f , description flow f Stored in the CS-Sketch structure, first perform d hash calculations on it to obtain d counters, and calculate the sign bits of the corresponding counters to obtain d estimated values, and take the median of these d estimated values as the stream f The estimated stream size.
[0032] In one embodiment of the present invention, the flows stored in each bucket of the high priority structure are sorted by priority.
[0033] Based on the same inventive concept, the present invention also provides a priority-sensitive per-flow size measurement system in a high-speed network, the system is used to implement the priority-sensitive per-flow size measurement method in a high-speed network, and specifically includes the following modules:
[0034] A data structure building module, wherein the data structure building module is used to build a data structure for storing priority-sensitive streams, wherein the data structure includes a high priority structure for storing and processing high priority streams and a CS-Sketch structure for storing and processing low priority streams;
[0035] A data structure updating module, wherein the data structure updating module is used to first update the high priority structure according to the flow label and priority of the arriving flow, and update the CS-Sketch structure based on the update result of the high priority structure to obtain an updated data structure;
[0036] A flow size estimation value calculation module is used to query the updated data structure to obtain a flow size estimation value.
[0037] The present invention also provides a priority-sensitive per-flow size measurement device in a high-speed network, the device comprising a controller and at least one switch; the switch is connected to the controller, at least one measurement node is deployed in the switch, the controller receives a network flow measurement task and sends it to the switch; the measurement node in the switch collects information on the arrival flow, and uses the priority-sensitive per-flow size measurement method in the high-speed network to perform network flow measurement.
[0038] The present invention also provides a computer storage medium storing a computer software product, wherein the computer software product includes several instructions for enabling a computer device to execute the priority-sensitive per-flow size measurement method in a high-speed network.
[0039] The above technical solution of the present invention has the following advantages compared with the prior art:
[0040] The present invention stores high-priority flows and low-priority flows separately. The high-priority part combines the characteristics of priority-sensitive hashing and cuckoo hashing to ensure that low-priority flows can quickly pass through the high-priority part and store high-priority flows in the high-priority part as much as possible. Specifically, priority-sensitive hashing assigns corresponding hash functions according to the priority of the flow, and high-priority flows are assigned more hash functions to calculate more candidate buckets; cuckoo hashing is used to resolve hash conflicts, and by kicking out and reselecting candidate buckets, high-priority flows are stored in the high-priority part to the maximum extent. The low-priority part adopts the CS-Sketch structure to improve the measurement accuracy of large-scale low-priority flows. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:
[0042] Figure 1 is a flow chart of a priority-sensitive per-flow size measurement method in a high-speed network provided in an embodiment of the present invention;
[0043] Figure 2 is a schematic diagram of a data structure for storing a priority-sensitive stream provided in an embodiment of the present invention;
[0044] Figure 3 In the embodiment of the present invention, the current arrival flow is compared f and the priorities of the flows in the candidate buckets, and a flow diagram of removing the flows with lower priorities from the cells where they are located according to the comparison results;
[0045] Figure 4 is a schematic diagram of a process for updating a data structure in an embodiment of the present invention;
[0046] Figure 5 It is a structural schematic diagram of a priority-sensitive per-flow size measurement system in a high-speed network provided in an embodiment of the present invention;
[0047] Description of the accompanying drawings in the specification: 100, data structure construction module; 200, data structure update module; 300, flow size estimation value calculation module. DETAILED DESCRIPTION
[0048] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention. Embodiment 1
[0049] Reference Figures 1 to 3 As shown, the present invention provides a priority-sensitive per-flow size measurement method in a high-speed network, comprising the following steps:
[0050] S1: Construct a data structure for storing priority-sensitive flows, wherein the data structure includes a high priority structure for storing and processing high priority flows ( Figure 2 and Figure 3 The high priority part is represented in the figure) and the CS-Sketch structure for storing and processing low priority streams ( Figure 2 and Figure 3 The low priority part is used in the
[0051] S2: first update the high priority structure according to the flow label and priority of the arriving flow, and then update the CS-Sketch structure based on the update result of the high priority structure to obtain an updated data structure;
[0052] S3: Query the updated data structure to obtain a flow size estimate.
[0053] See also Figure 2 ,The data structures for storing priority sensitive streams include a high priority structure for storing and processing high priority streams and a CS-Sketch structure for storing and processing low priority streams.
[0054] The high priority structure includes m buckets, BA[i] represents the i-th bucket, each bucket contains n cells, BA[i][j] represents the j-th cell in the i-th bucket, and each cell BA[i][j] is used to store the arriving flow ( f ,p,cnt), each stream includes a label f , priority p and counter cnt for counting flow size. All flows in each bucket are sorted from low to high according to priority, and BA[i][0] is the cell where the flow with the lowest priority in this bucket is located. max priority-sensitive hash functions, where p max The value is set according to the actual situation.
[0055] The CS-Sketch structure is a two-dimensional counter array with d rows and w columns, and the two-dimensional counter array is associated with 2×d hash functions, wherein the hash functions include d first hash functions (h1, h2, ..., h d ) and d second hash functions (G1, G2, …, G d ), the first hash function (h1,h2,…,h d ) is used to determine the column index of the stream f mapped to the corresponding row counter, and the second hash function (G1, G2, ... G d ) is used to determine whether to increment or decrement the mapped counter.
[0056] like Figure 4 As shown, in step S2, the step of obtaining the updated data structure includes:
[0057] S201: Utilize the high priority structure to conduct f Processing, the fields in all buckets in the high priority structure are set to 0 or null, the number of kickouts num=0 and the maximum number of kickouts maxKickTimes are set, and when a data packet arrives, the flow label in the data packet is extracted f and priority p, the arriving flow is recorded as flow f ;
[0058] S202: The high priority structure uses priority-sensitive hashing to determine the allocation to the flow f The number of hash functions, specifically, based on the flow f The priority p is the flow f Assign gen(p) priority-sensitive hash functions, where gen(p) = p +a, where a is a hyperparameter set by the user. For ease of explanation, a = 0, i.e., gen(p) = p;
[0059] S203: Perform multiple hash calculations using gen(p) priority-sensitive hash functions to obtain gen(p) candidate buckets;
[0060] S204: Traverse all candidate buckets to determine whether any candidate bucket has stored the flow f :
[0061] If yes, update the storage stream f The cell counter of the corresponding cell is incremented by one; Figure 3 As shown, flow f 1 has been stored in bucket 1, then the counter value corresponding to stream f1 is increased by 1, that is, the field information of stream f1 is ( f 1, 2, 5) becomes ( f 1, 2, 6);
[0062] Otherwise, proceed to step S205;
[0063] S205: Determine whether there is an empty cell in the candidate bucket:
[0064] If there are empty cells in the candidate bucket, select an empty cell to store the flow f ;For example Figure 3 Middle, Flow f The candidate buckets of 8 (bucket 2, bucket 3 and bucket 4) do not store flows. f 8, we can see that only bucket 3 has an empty cell, so we will f 8 is stored in the free cell of bucket 3;
[0065] If all candidate buckets have no empty cells, search for the flow with the lowest priority in all candidate buckets and compare the flow f and the priority size of the lowest priority stream:
[0066] If the flow f If the priority of the flow is less than or equal to the priority of the flow with the lowest priority, the flow f Recorded as target flow;
[0067] If the flow f The priority of the candidate bucket is greater than the lowest priority in the candidate bucket, and the process goes to step S206;
[0068] S206: Use the cuckoo hash function to remove the flow with the lowest priority from the cell where it is located. After each removal operation, the value of the removal number num is increased by one, and the flow f Stored in the empty cell after elimination, the flow with the lowest priority is used as the new flow f , extract the flow label and priority of the flow with the lowest priority, calculate the candidate bucket of the flow with the lowest priority, and return to S205 until the number of elimination times num reaches the maximum number of elimination times maxKickTimes, and obtain the flow with the lowest priority as the target flow;
[0069] exist Figure 3 In the flow 10 The priority of is 3, and the candidate buckets are bucket 1, bucket 2 and bucket 4. All the candidate buckets are full, so the flow with the lowest priority in the candidate bucket is selected for comparison. The priorities of flow f1 and flow f3 are both the lowest, so one of them is selected. Figure 3 Select stream f3 and set stream f 10 Insert the cell where flow f3 is located and kick flow f3 out. Another candidate bucket for flow f3 is bucket 3, and the priority of flow f3 is greater than the lowest priority of bucket 3 (f5), so flow f3 is inserted into the cell where flow f5 is located and kick flow f5 out. Since flow f5 has no other candidate buckets, it is inserted into the low priority part.
[0070] In addition, in order to prevent excessive time overhead caused by too many recursive times, the present invention sets a maximum kicking number maxKickTimes. When the recursive number reaches the maximum kicking number, the recursive kicking process is terminated and the current flow is inserted into the low priority part;
[0071] S207: Insert the target stream into the CS-Sketch structure and update the CS-Sketch structure. Figure 3 As shown, the candidate bucket of flow f9 is bucket 4, and the lowest priority of its candidate bucket is BucketArray[4][0].p, that is, the priority of f6 is 3, and the priority of f9 is less than that of f6, so f9 is inserted into the low priority part, that is, the CS-Sketch structure.
[0072] Furthermore, the target stream is inserted into the CS-Sketch structure, and the method of updating the CS-Sketch structure is as follows:
[0073] like Figure 2 As shown, when the current stream with a stream size of c is inserted into the CS-Sketch structure, the d first hash functions are first used to perform d hash calculations on the current stream to obtain d first hash values, and the counter of each row corresponding to the current stream is determined according to the d first hash values. The d second hash functions are used to perform d hash calculations on the current stream to obtain d second hash values, and the counter of the i-th row is determined to be incremented or decremented according to the second hash value Gi(f).
[0074] In step S3 of this embodiment, the updated data structure is queried to obtain the estimated value of the flow size by:
[0075] When querying a flow with priority p f When the high priority structure is used, p hash calculations are first performed to obtain p candidate buckets, and then the flow is checked. f Whether to store in these candidate buckets:
[0076] If the candidate bucket already has a stream stored in it f , then get the counter field of the matching cell, that is, the stream f The estimated flow size of
[0077] If no stream is stored in any candidate bucket f , description flow f Stored in the CS-Sketch structure, first perform d hash calculations on it to obtain d counters, and calculate the sign bits of the corresponding counters to obtain d estimated values, and take the median of these d estimated values as the stream f The estimated stream size. Embodiment 2
[0078] Based on the same inventive concept, the present invention also provides a priority-sensitive per-flow size measurement system in a high-speed network, the system is used to implement the priority-sensitive per-flow size measurement method in a high-speed network described in Embodiment 1, such as Figure 5 As shown, the system specifically includes the following modules:
[0079] A data structure building module 100, the data structure building module is used to build a data structure for storing priority-sensitive streams, the data structure comprising a high priority structure for storing and processing high priority streams and a CS-Sketch structure for storing and processing low priority streams;
[0080] A data structure updating module 200, the data structure updating module is used to first update the high priority structure according to the flow label and priority of the arriving flow, and update the CS-Sketch structure based on the update result of the high priority structure to obtain an updated data structure;
[0081] The flow size estimation value calculation module 300 is used to query the updated data structure to obtain the flow size estimation value.
[0082] The present embodiment proposes a priority-sensitive per-flow size measurement system in a high-speed network, which is used to implement the aforementioned priority-sensitive per-flow size measurement method in a high-speed network. Therefore, the specific implementation method of the priority-sensitive per-flow size measurement system in a high-speed network can be seen from the embodiment part of the aforementioned priority-sensitive per-flow size measurement method in a high-speed network. For example, the data structure construction module 100, the data structure update module 200 and the flow size estimation value calculation module 300 are respectively used to correspond to the steps S1, S2 and S3 in the priority-sensitive per-flow size measurement method in the high-speed network in the first embodiment. Therefore, its specific implementation method can refer to the description of the corresponding various partial embodiments. In order to avoid redundancy, it will not be repeated here. Embodiment 3
[0083] The present invention also provides a priority-sensitive per-flow size measurement device in a high-speed network, the device comprising a controller and at least one switch; the switch is connected to the controller, at least one measurement node is deployed in the switch, the controller receives a network flow measurement task and sends it to the switch; the measurement node in the switch collects information on the arrival flow, and uses the priority-sensitive per-flow size measurement method in a high-speed network described in Example 1 to perform network flow measurement. Embodiment 4
[0084] The present invention also provides a computer storage medium storing a computer software product, wherein the computer software product includes several instructions for enabling a computer device to execute the priority-sensitive per-flow size measurement method in a high-speed network described in Example 1.
[0085] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0086] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0087] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0089] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A priority-sensitive per-flow size measurement method in a high-speed network, characterized in that: The following steps are involved: S1: construct a data structure for storing priority-sensitive flows, wherein the data structure includes a high priority structure for storing and processing high priority flows and a CS-Sketch structure for storing and processing low priority flows; S2: first update the high priority structure according to the flow label and priority of the arriving flow, and then update the CS-Sketch structure based on the update result of the high priority structure to obtain an updated data structure; S3: querying the updated data structure to obtain a flow size estimate; The CS-Sketch structure is a two-dimensional counter array with d rows and w columns, and the two-dimensional counter array is associated with 2×d hash functions, wherein the hash functions include d first hash functions (h1, h2, ... h d ) and d second hash functions (G1, G2, … G d ), the first hash function (h1,h2,…h d ) is used to determine the column index of the stream f mapped to the corresponding row counter, and the second hash function (G1, G2, ... G d ) is used to determine whether to perform an increment or decrement operation on the mapped counter; The step of obtaining the updated data structure comprises: S201: Processing the flow f by using the high priority structure, setting the number of kickouts num=0 and the maximum number of kickouts maxKickTimes, extracting the flow label f and the priority p in the arriving flow, and recording the arriving flow as flow f; S202: Based on the priority p of the flow f, assign gen(p) priority-sensitive hash functions to the flow f, where gen(p)=p+a, and a is a hyperparameter; S203: Perform multiple hash calculations using gen(p) priority-sensitive hash functions to obtain gen(p) candidate buckets; S204: Traverse all candidate buckets and determine whether flow f is stored in any candidate bucket: If yes, update the cell counter of storage stream f, and increase the value of the corresponding cell counter by one; Otherwise, proceed to step S205; S205: Determine whether there is an empty cell in the candidate bucket: If there is an empty cell in the candidate bucket, select an empty cell to store the flow f; If all candidate buckets have no empty cells, search for the flow with the lowest priority in all candidate buckets and compare the priority of flow f with that of the flow with the lowest priority: If the priority of flow f is less than or equal to the priority of the flow with the lowest priority, flow f is recorded as the target flow; If the priority of flow f is greater than the lowest priority in the candidate bucket, proceed to step S206; S206: Remove the flow with the lowest priority from the cell where it is located by using the cuckoo hash function. After each removal operation, the value of the removal times num is increased by one, and the flow f is stored in the empty cell after removal. The flow with the lowest priority is used as the new flow f, and the flow label and priority of the flow with the lowest priority are extracted. The candidate bucket of the new flow f is calculated, and the process returns to S205 until the removal times num reaches the maximum removal times maxKickTimes, and the flow with the lowest priority is obtained as the target flow; S207: Insert the target stream into the CS-Sketch structure, and update the CS-Sketch structure.
2. The method for measuring the size of each flow in a high-speed network with priority sensitivity according to claim 1, characterized in that: The high priority structure includes m buckets, BA[i] represents the i-th bucket, each bucket includes n cells, BA[i][j] represents the j-th cell in the i-th bucket, and each cell BA[i][j] is used to store the label, priority and statistical flow size counter of the arriving flow.
3. The method for measuring the size of each flow in a high-speed network with priority sensitivity according to claim 2, characterized in that: The method for updating the CS-Sketch structure comprises: When inserting the current stream with a stream size of c into the CS-Sketch structure, first use the d first hash functions to perform d hash calculations on the current stream to obtain d first hash values, determine the counter of each row corresponding to the current stream according to the d first hash values, use the d second hash functions to perform d hash calculations on the current stream to obtain d second hash values, and calculate the counter of each row corresponding to the current stream according to the d first hash values. i (f) Determine whether to increment or decrement the counter in row i.
4. The method for measuring the size of each flow in a high-speed network with priority sensitivity according to claim 1, characterized in that: The method for obtaining the estimated value of the flow size is: When querying a stream f with a priority of p, first perform p hash calculations in the high priority structure to obtain p candidate buckets, and then check whether the stream f is stored in the p candidate buckets: If flow f is already stored in the candidate bucket, obtain the counter field of the matching cell, that is, the estimated flow size of flow f; If flow f is not stored in all candidate buckets, it means that flow f is stored in the CS-Sketch structure. First, perform d hash calculations to obtain d counters, and calculate the sign bits of the corresponding counters to obtain d estimated values. The median of these d estimated values is taken as the estimated value of the flow size of flow f.
5. The priority-sensitive per-flow size measurement method in a high-speed network according to claim 2, characterized in that: The flows stored in each bucket of the high priority structure are sorted by priority.
6. A priority-sensitive per-flow size measurement system in a high-speed network, characterized in that The system is used to implement the priority-sensitive per-flow size measurement method in a high-speed network according to any one of claims 1 to 5, and specifically includes the following modules: A data structure building module, wherein the data structure building module is used to build a data structure for storing priority-sensitive streams, wherein the data structure includes a high priority structure for storing and processing high priority streams and a CS-Sketch structure for storing and processing low priority streams; A data structure updating module, wherein the data structure updating module is used to first update the high priority structure according to the flow label and priority of the arriving flow, and update the CS-Sketch structure based on the update result of the high priority structure to obtain an updated data structure; A flow size estimation value calculation module is used to query the updated data structure to obtain a flow size estimation value.
7. A priority-sensitive per-flow size measurement device in a high-speed network, characterized in that: It includes a controller and at least one switch; the switch is connected to the controller, at least one measurement node is deployed in the switch, and the controller receives a network flow measurement task and sends it to the switch; the measurement node in the switch collects information on arrival flows, and uses the priority-sensitive per-flow size measurement method in a high-speed network as described in any one of claims 1 to 5 to perform network flow measurement.
8. A computer storage medium, characterized in that The computer storage medium stores a computer software product, and the computer software product includes a number of instructions for enabling a computer device to execute the priority-sensitive per-flow size measurement method in a high-speed network as described in any one of claims 1 to 5.
Citation Information
Patent Citations
QoS (Quality of Service)-aware OpenFlow flow table hierarchical storage architecture and application
CN111131084A
Differential flow measurement method and device based on Sketch data structure and medium
CN117255063A
Priority-based data flow cardinal number online measurement method and system
CN117896323A
Packet transmission device, packet transmission method, and computer program
JP2012205048A
Systems and methods for fast detection of elephant flows in network traffic
US10924418B1
