Traffic detection method and device

A traffic detection and traffic technology, which is applied in the computer field, can solve the problem of inability to distinguish network protocols and accurately detect the traffic consumed by each network protocol, and achieve the effect of improving detection accuracy.

Inactive Publication Date: 2018-01-05
TENCENT TECH (SHENZHEN) CO LTD
View PDF3 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] Embodiments of the present invention provide a traffic detection method and device to at least solve the technical problem that related technologies can only detect the overall traffic consumed by applications, but cannot distinguish network protocols to accurately detect the traffic consumed by each network protocol

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Traffic detection method and device
  • Traffic detection method and device
  • Traffic detection method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0029] According to an embodiment of the present invention, a method embodiment of a traffic detection method is provided.

[0030] Optionally, in this embodiment, the above traffic detection method can be applied to such as figure 1 In the hardware environment constituted by the server 102 and the terminal 104 as shown. Such as figure 1 As shown, the server 102 is connected to the terminal 104 through a network. The above-mentioned network includes but not limited to: a wide area network, a metropolitan area network or a local area network. The terminal 104 is not limited to a PC, a mobile phone, a tablet computer, and the like. The traffic detection method in the embodiment of the present invention may be executed by the server 102, may also be executed by the terminal 104, and may also be executed jointly by the server 102 and the terminal 104. Wherein, the execution of the traffic detection method in the embodiment of the present invention by the terminal 104 may also be...

Embodiment 2

[0131] According to an embodiment of the present invention, a flow detection device for implementing the above flow detection method is also provided. Figure 9 is a schematic diagram of an optional flow detection device according to an embodiment of the present invention, such as Figure 9 As shown, the device may include:

[0132]The first obtaining unit 22 is used to obtain the MAC data packet transmitted on the network interface of the terminal; the second obtaining unit 24 is used to obtain the protocol identification and port number from the MAC data packet, wherein the protocol identification is used to indicate the transmission MAC The network protocol adopted by the data packet, the port number is used to indicate the port used to transmit the MAC data packet; the search unit 26 is used to search for the application identification corresponding to the port number; the third acquisition unit 28 is used for the data packet according to the MAC data packet The size obta...

Embodiment 3

[0158] According to an embodiment of the present invention, a server or terminal for implementing the above traffic detection method is also provided.

[0159] Figure 17 is a structural block diagram of a terminal according to an embodiment of the present invention, such as Figure 17 As shown, the terminal may include: one or more (only one is shown in the figure) processor 201, memory 203, and transmission device 205 (such as the sending device in the above-mentioned embodiment), such as Figure 17 As shown, the terminal may also include an input and output device 207 .

[0160]Among them, the memory 203 can be used to store software programs and modules, such as the program instructions / modules corresponding to the flow detection method and device in the embodiment of the present invention, and the processor 201 executes various functions by running the software programs and modules stored in the memory 203. A functional application and data processing, that is, to reali...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a traffic detection method and device. The traffic detection method comprises the steps of obtaining an MAC data packet transmitted by the network interface of a terminal; obtaining a protocol identifier and a port number from the MAC data packet, wherein the protocol identifier is used for indicating a network protocol adopted for transmission of the MAC data packet, and the port number is used for indicating the port adopted for transmission of the MAC data packet; finding an application identifier corresponding to the port number; and obtaining the data packet traffic transmitted by an application which is indicated by the application identifier in the presence of the network protocol which is indicated by the protocol identifier based on the size of the MAC datapacket. According to the traffic detection method and device, the technical problems in related arts that the total traffic consumed by the applications only can be detected, but the network protocols cannot be distinguished and the traffic consumed by each network protocol cannot be detected precisely, are solved.

Description

technical field [0001] The invention relates to the field of computers, in particular to a flow detection method and device. Background technique [0002] In the era of mobile Internet, the traffic consumption of applications is a concern of users. For example, existing Android system traffic detection technical solutions mainly include the following: 1. Obtain traffic information through Android system API; 2. Obtain traffic information by reading Linux kernel files; 3. Obtain traffic information through tcpdump packet capture tool. However, these technical solutions can only detect the overall traffic consumed by the application, and cannot distinguish network protocols to accurately detect the traffic consumed by each network protocol. However, distinguishing between network protocols and detecting the traffic consumed by each network protocol is very important for detecting application performance. For example, in mobile game applications, in order to reduce the network...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): H04L12/26
Inventor 严明罗章龙章平
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products