Method and device for detecting data flow
A data flow and data packet technology, applied in the field of communication, can solve the problem of high missed detection rate of large flow detection, and achieve the effect of improving the accuracy rate
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0066] The embodiment of the present invention provides a method for detecting data flow, such as figure 1 As shown, the method includes
[0067] 101. Accumulate the number of data packets and the number of stream bytes of the data stream.
[0068] The method provided in this embodiment may be implemented by network devices such as switches and routers, and may also be implemented by functional modules in the network devices, but is not limited thereto. Specifically, in this embodiment, the network device respectively accumulates the number of data packets and the number of flow bytes of each data flow. For example, a network device transmits N data streams (for ease of description, it can be recorded as: data stream 1, data stream 2, ... data stream N); when the network device receives a new data packet (the data packet When the size of the data packet is x bytes), the data flow to which the data packet belongs is determined according to the header of the data packet (for e...
Embodiment 2
[0073] exist figure 1 On the basis of the illustrated embodiments, this embodiment further provides a method for detecting data streams. Such as figure 2 As shown, the method provided in this embodiment includes:
[0074] 201. The network device creates a data flow statistics table, where the data flow statistics table includes multiple data flow entries, and the data flow entries include the number of data packets, the accumulated number of bytes, and a flow identifier.
[0075] 202. When the network device receives a new data packet, determine the flow identifier of the data packet, and update the data flow entry corresponding to the flow identifier according to the size of the data packet.
[0076] In this embodiment, the five-tuple information in the data packet may be used as the flow identifier of the data flow corresponding to the data. "Update the data flow entry corresponding to the flow identifier" in step 202 refers to accumulating the number of data packets and...
Embodiment 3
[0122] An embodiment of the present invention provides a device for detecting data streams, which can implement the methods for detecting data streams provided in Embodiment 1 and Embodiment 2.
[0123] Such as Figure 10 As shown, the device 100 for detecting data stream provided in this embodiment includes:
[0124] An accumulating unit 1001, configured to accumulate the number of data packets and the number of bytes of the data stream;
[0125] The determining unit 1002 is configured to determine the data flow as a large flow when the number of data packets reaches a first threshold and the average size of data packets of the data flow reaches a second threshold.
[0126] Further, such as Figure 11 As shown, the determining unit 1002 includes:
[0127] A calculation module 10021, configured to calculate the average size of data packets of the data stream according to the number of data packets and the number of stream bytes when the number of data packets reaches a firs...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


