CN103716211B - The data traffic measuring method of the network terminal - Google Patents
The data traffic measuring method of the network terminal Download PDFInfo
- Publication number
- CN103716211B CN103716211B CN201410024704.2A CN201410024704A CN103716211B CN 103716211 B CN103716211 B CN 103716211B CN 201410024704 A CN201410024704 A CN 201410024704A CN 103716211 B CN103716211 B CN 103716211B
- Authority
- CN
- China
- Prior art keywords
- data
- stream
- time
- data stream
- network
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 14
- 238000005259 measurement Methods 0.000 claims abstract description 18
- 230000001186 cumulative effect Effects 0.000 claims description 6
- 230000002123 temporal effect Effects 0.000 claims description 6
- 239000000284 extract Substances 0.000 claims description 3
- 238000003780 insertion Methods 0.000 abstract description 9
- 230000037431 insertion Effects 0.000 abstract description 9
- 238000012216 screening Methods 0.000 abstract description 8
- 238000000605 extraction Methods 0.000 abstract description 2
- 230000007423 decrease Effects 0.000 abstract 1
- 230000005540 biological transmission Effects 0.000 description 4
- 238000012937 correction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses flow-measuring method and the system of a kind of network terminal, mainly solve the problem that the measured data traffic of prior art is excessive with the real traffic gap that network insertion business measures.Implementation step is: (1) Real-time Collection network packet at network access equipment, and needs the network packet of measurement data flow from gathering screening the network packet obtained;(2) characteristic information extraction from the network packet filtered out, generates data sample;(3) according to the characteristic information of data sample, data sample is divided into some number of share of stocks according to stream and carry out maintaining and terminate operation;(4) flow of one data stream terminated every is measured;(5) collect and add up the data traffic of all data streams and export.The present invention can provide network traffic data information, and the real traffic measured close to network insertion business in real time, enables users to accurately understand from terminal the service condition of data traffic, decreases the trouble to network insertion business inquiry.
Description
Technical field
The present invention relates to networking technology area, particularly relate to the measurement of the data traffic of a kind of network terminal.
Background technology
Along with the development of the network communications technology, people become increasingly popular to use the various network terminal to obtain more letter
Breath, these terminals include PC, mobile phone, panel computer etc., thus create huge network traffic data, some networks
Access business's installation data flow measurement device on network, using as rates ground.Meanwhile, user installs in terminal and measures system
System, for the service condition of Real Time Observation network traffic data;But, measured by the measuring method of the current network terminal and system
Result bigger with the measurement result gap of network insertion business.
Currently existing scheme is as follows:
Chinese invention patent 20121004689.9 discloses traffic monitoring during a kind of mobile handsets access network
Method and system, the program is to carry out Measurement Network stream by transmission during each cycle access network the most cumulative and reception flow
Amount.But the shortcoming of the program is, usual and network insertion business the measurement result gap of measurement result is relatively big, does not carry to user
For information accurately.
Chinese invention patent 201210105349.2 discloses a kind of adaptive terminal network flow correction method, should
Scheme solves measurement result generally and the survey of network insertion business by the method added up again by ratio each application calibrated flow
The problem that amount result gap is bigger.But the shortcoming of the program is, need to obtain the correction weights of category application from high in the clouds,
It needs to be determined that and safeguard high in the clouds application correction weights, if weights determine unreasonable, bigger gap can be produced;Supported
Operating system and application program are restricted by high in the clouds;The most also can produce extra network traffic data.
Summary of the invention
Present invention aims to the deficiency of above-mentioned prior art, it is provided that the data traffic of a kind of network terminal is measured
Method and system, to provide the user with the network traffic data information close to network insertion business.
For achieving the above object, the network terminal data traffic that the present invention provides measures system, including:
Acquisition module, for Real-time Collection network packet, the network packet that will be gathered at network access equipment
Input to screen module;
Screening module, for filtering out the network packet at wide area network transmission, inputs to the selection result sample and generates
Module;
Sample generation module, for generating data sample from the network packet characteristic information extraction through screening, and will
The data sample generated inputs to diverter module;
Diverter module, for being classified as some number of share of stocks according to stream according to the characteristic information of data sample, to each number of share of stock evidence
Stream maintains operation the most several times and once terminates operation, and when terminating data stream, inputs to survey according to stream by this number of share of stock
Amount module;
Measurement module, for measuring the data traffic of one data stream terminated every, and inputs to statistics by result
Module;
Statistical module, each burst of data traffic sent into for the measurement module that adds up, add up total data flow, and by result
Input to display module;
Display module, is used for displaying to the user that output total data flow information.
For achieving the above object, the network terminal data traffic measuring method that the present invention provides, comprise the steps:
(1) Real-time Collection network packet at network access equipment, and screen from gathering the network packet obtained
Need the network packet of measurement data flow;
(2) from the network packet filtered out, extract data characteristic information and temporal characteristics information, generate a series of number
According to sample;
(3) according to the characteristic information of data sample, volume of data sample is divided into some number of share of stocks according to stream, to each number of share of stock
Maintain operation the most several times according to stream and once terminate operation;
(4) data traffic of one data stream terminated every is measured;
(5) collect and add up the data traffic of all data streams and export.
Described in above-mentioned steps (3), volume of data sample is divided into some number of share of stocks according to stream, is to volume of data sample
Scan one by one, if data sample band beginning flag, then set up one new data stream with its data characteristic information, and remember
The time started of record data stream, otherwise, it is divided into the data stream with identical data characteristic information;
In above-mentioned steps (3) to each number of share of stock according to stream the most several times maintain operation and once terminate operation, be with 1
Millisecond is the time cycle, is scanned, one data stream not terminated every if data flow point enters one or more without end
Only the data sample of mark, then maintain the renewal time of this data stream record data stream;If data flow point enters a band mark
The data sample of will, or the renewal time of time gap data stream is more than time-out time, or current time range data stream
Time started more than caching period time, then terminate this data stream, and the termination time of record data stream.
The data traffic measuring one data stream terminated every described in upper step (4), is carried out as follows:
(4a) cumulative data bag size, obtains the initial data flow N of one data stream;
(4b) flow deviation value weight E of one data stream is calculated:
Wherein, c is the data sample sum of one data stream, TeFor data stream end time, TsWhen starting for data stream
Between, unit of time is millisecond ms;
(4c) according to initial data flow N and flow deviation value weight E of one data stream, the stream of one data stream is calculated
Amount deviation value D:
D=N × E
(4d) according to initial data flow N and flow deviation value D of one data stream, one data terminated are calculated
Stream
Flow L:
L=N-D.
Present invention have the advantage that
1) present invention can distinguish different type network under the source application instance without obtaining network packet
Data traffic, it is possible to adapt to include Windows, Linux, Android, Iphone, Mac several operation systems and run on above-mentioned
All application programs in operating system;
2) present invention according to the characteristic information of data stream, can calculate the flow deviation value of data stream, revises original number
According to flow, so that measurement result is close to the data traffic measured by network insertion business.
3) the technical solution adopted in the present invention, it is not necessary to connect cloud server, therefore without setting up cloud server,
And it can be avoided that the generation of excessive data flow.
Accompanying drawing explanation
Fig. 1 is the structural representation of the data traffic measurement system of inventive network terminal.
Fig. 2 is the workflow diagram of the data traffic measuring method of inventive network terminal.
Detailed description of the invention
Further illustrate technical scheme below in conjunction with the accompanying drawings and by detailed description of the invention.
With reference to Fig. 1, the data traffic of the present invention is measured system and is included M acquisition module 1, screens module 2, and sample generates mould
Block 3, diverter module 4, measurement module 5, statistical module 6, display module 7, these modules are sequentially connected with, and wherein M is network insertion
The quantity that equipment connects, and each acquisition module connects with corresponding network access equipment.
Acquisition module 1 Real-time Collection network packet at network access equipment, i.e. from the driving journey of network access equipment
In sequence, the copy of copy all-network packet, and record the generation time of each network packet, the net that simultaneously will collect
Network packet and generation time thereof input to screen module 2.
Screening module 2 filters out the network packet at wide area network transmission according to procotol, i.e. from network packet
Retain the all-network packet in addition to local loopback packet, ARP packet, RARP packet, LAN intranet data bag,
And sample generation module 3 will be inputed to through the network packet of screening.
Sample generation module 3 extracts data characteristic information and temporal characteristics letter from the network packet that screening module obtains
Breath, wherein, data characteristic information includes that source IP address, purpose IP address, source port, destination interface, protocol type, packet are big
Little, beginning flag, termination flag;Temporal characteristics information includes generation time, time-out time, caching period;By this two category feature
Information generates data sample after merging, and the data sample generated inputs to diverter module 4.
Diverter module 4, has been used for following function:
First, it is divided into some number of share of stocks according to stream in volume of data sample according to the characteristic information of data sample, to one is i.e.
Column data sample scans one by one, if data sample band beginning flag, then sets up one with its data characteristic information new
Data stream, and the time started of record data stream, otherwise, be divided into the data stream with identical data characteristic information;Then,
To each number of share of stock according to stream the most several times maintain operation and once terminate operation, i.e. with 1 millisecond as time cycle, to each
The data stream that stock does not terminates is scanned, if data flow point enters one or more data sample without termination flag, then ties up
Hold the renewal time of this data stream record data stream;If data flow point enters the data sample of a band termination flag, or
The renewal time of time gap data stream is more than time-out time, or the time started of current time range data stream is more than caching
During the cycle, then terminate this data stream, and the termination time of record data stream;Finally, the data stream terminated is sent a survey
Amount module 5.
Measurement module 5, has been used for measuring every one and has terminated the data traffic of data stream:
First, cumulative data bag size, obtain the initial data flow N of one data stream;
Then, flow deviation value weight E of one data stream is calculated:
Wherein, c is the data sample sum of one data stream, TeFor data stream end time, TsWhen starting for data stream
Between, unit of time is millisecond ms;
Then, according to initial data flow N and flow deviation value weight E of one data stream, one data stream is calculated
Flow deviation value D:
D=N × E
Finally, according to initial data flow N and flow deviation value D of one data stream, one number terminated is calculated
Flow L according to stream:
L=N-D,
Calculate complete, each number of share of stock is inputed to statistical module 6 according to the data traffic of stream.
The each burst of data traffic that cumulative measurement module is sent into by statistical module 6 is added up, and obtains total data flow, and
This statistical result is inputed to display module 7 show, read for user.
For purposes of illustration only, originally execute in example, it is assumed that the network terminal comprises a network access equipment, its IP address is
115.155.39.100, its data send and reception condition such as table 1 below.
Table 1: the data of the network terminal send and reception condition table
Referring to Fig. 2, the data traffic measuring process of inventive network terminal described in conjunction with table 1:
Step 1: gather network packet.
Real-time Collection network packet at network access equipment, i.e. from the driver of the network equipment, copy is all
The copy of network packet, and record the generation time of each network packet.Originally executing in example, data shown in table 1, at network
Packet is just replicated the when of generation timely, and records its generation time.
Step 2: screening network packet.
From gathering, the network packet obtained filters out the network packet at wide area network transmission, i.e. retain except local ring
Return the all-network packet beyond packet, ARP packet, RARP packet, LAN intranet data bag.Originally example is being executed
In, the all-network packet of table 1 numbered 5 and 6 is disallowable, has filtered out the all-network packet of numbered 1,2,3,4.
Step 3: generate data sample.
Data characteristic information and temporal characteristics information is extracted from the network packet through screening, and by this two category feature
Information merges generation volume of data sample;Wherein:
Data characteristic information, including source IP address, purpose IP address, source port, destination interface, protocol type, packet
Size, beginning flag, termination flag;
Temporal characteristics information includes generation time, time-out time, caching period.
The memory structure of data sample includes: source IP address, purpose IP address, source port, destination interface, protocol type,
Data package size, beginning flag, termination flag, generation time, time-out time and caching period, and beginning flag and termination flag
Use 0 then to represent without corresponding mark, use 1 then to represent with corresponding mark.
Originally executing in example, in the network packet of table 1 numbering 1, certain generation time is 10:01:01:055, size is
120 bytes, without beginning flag, without termination flag, time-out time be 1085ms, cache-time be the data of 600000ms
Bag, generating corresponding data sample is: 115.155.39.100,115.155.39.234,2344,80, TCP, 1200,0,0,
10:01:01:055,1085,600000.
Step 4: data sample shunts.
(4a) according to the characteristic information of data sample volume of data sample is divided into some number of share of stocks according to stream, i.e. to a series of
Data sample scans one by one, if data sample band beginning flag, then sets up one new number with its data characteristic information
According to stream, and the time started of record data stream, otherwise, it is divided into the data stream with identical data characteristic information;
(4b) to each number of share of stock according to stream the most several times maintain operation and once terminate operation, i.e. with 1 millisecond as time
Between the cycle, one data stream not terminated every is scanned, if data flow point enters one or more without termination flag
Data sample, then maintain the renewal time of this data stream record data stream;If data flow point enters a band termination flag
Data sample, or the renewal time of time gap data stream is more than time-out time, or the opening of current time range data stream
When time beginning is more than caching period, then terminate this data stream, and the termination time of record data stream.
Originally executing in example, in table 1, the numbered network packet of 1,2,3,4 is to be alternatively formed a serial sequence in a network
Row, thus the corresponding data sample that step 3 is generated also is a serial sequence;This step according to data sample characteristic information,
These data samples are divided into four data streams, i.e. four serial sequence:
At moment 10:00:00:001, scan a data sample with beginning flag, thus set up newly-built one
New data stream S1, 10:00:00:001 to 10:05:00:007 during this period of time in, whenever the network data scanning numbering 1
Bao Shi, maintains data stream S1And record its renewal time, at moment 10:05:00:007, owing to scanning one with terminating mark
The data sample of will is divided into data stream S1, so data stream S1Terminate.Same, the numbered network packet of 2,3,4 can time
Between section 10:00:01:234 to 10:05:00:958,10:02:00:211 to 10:04:00:000,10:02:01:593 to 10:
In 04:01:426 the most newly-built, maintain and terminate three data streams, numbering is respectively S2,S3,S4。
Step 5: measure the data traffic of one data stream terminated every.
Originally execute in example, remember that the i-th number of share of stock is according to stream SiData traffic be Li, calculate first gang of data stream S terminated1's
Data traffic L1:
(5a) cumulative data stream S1Data package size, obtain its initial data flow N1=1231259B;
(5b) data stream S is calculated1Data traffic deviation value weight E1:
Wherein, data stream S1Data sample sum c1=1751,
(5c) data stream S is calculated1Deviation value D of data traffic1=N1×E1≈105273B;
(5d) data stream S is calculated1Data traffic L1=1231259B-105273B=1125986B.
Likewise it is possible to calculate second strand, the 3rd strand, the 4th gang data stream S terminated2,S3,S4Data stream
Amount L2,L3,L4。
Step 6: collect and add up the data traffic of all data streams terminated and export.
Originally execute in example, the data stream S terminated that step 5 is measured the most respectively1,S2,S3,S4Data traffic
L1,L2,L3,L4It is added, obtains the total data flow of all data stream: L=L1+L2+L3+L4。
Claims (3)
1. a data traffic measuring method for the network terminal, comprises the following steps:
(1) Real-time Collection network packet at network access equipment, and from gathering, the network packet obtained is screened needs
The network packet of measurement data flow;
(2) from the network packet filtered out, extract data characteristic information and temporal characteristics information, generate volume of data sample
This;
(3) according to the characteristic information of data sample, volume of data sample is divided into some number of share of stocks according to stream, to each number of share of stock according to stream
Maintain operation the most several times and once terminate operation;
(4) data traffic of measurement one data stream terminated every:
(4a) cumulative data bag size, obtains the initial data flow N of one data stream;
(4b) flow deviation value weight E of one data stream is calculated:
Wherein, c is the data sample sum of one data stream, TeFor data stream end time, TsFor the data stream time started, time
Between unit be millisecond ms;
(4c) according to initial data flow N and flow deviation value weight E of one data stream, the flow calculating one data stream is inclined
Difference D:
D=N × E
(4d) according to initial data flow N and flow deviation value D of one data stream, one data stream terminated is calculated
Flow L:
L=N-D;
(5) collect and add up the data traffic of all data streams and export.
Method the most according to claim 1, is wherein divided into some number of share of stock evidences described in step (3) by volume of data sample
Stream, is to scan volume of data sample one by one, if data sample band beginning flag, then builds with its data characteristic information
One new data stream vertical, and the time started of record data stream, otherwise, be divided into the number with identical data characteristic information
According to stream.
Method the most according to claim 1, ties up according to stream the most several times to each number of share of stock in wherein said step (3)
Hold operation and once terminate operation, being with 1 millisecond as time cycle, one data stream not terminated every is scanned, if
Data flow point enters one or more data sample without termination flag, then when maintaining the renewal of this data stream record data stream
Between;If data flow point enters the data sample of a band termination flag, or the renewal time of time gap data stream is more than super
Time the time, or the time started of current time range data stream more than caching period time, then terminate this data stream, and record number
The termination time according to stream.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410024704.2A CN103716211B (en) | 2014-01-20 | 2014-01-20 | The data traffic measuring method of the network terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410024704.2A CN103716211B (en) | 2014-01-20 | 2014-01-20 | The data traffic measuring method of the network terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103716211A CN103716211A (en) | 2014-04-09 |
CN103716211B true CN103716211B (en) | 2016-10-12 |
Family
ID=50408816
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410024704.2A Expired - Fee Related CN103716211B (en) | 2014-01-20 | 2014-01-20 | The data traffic measuring method of the network terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103716211B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103260174B (en) * | 2013-04-25 | 2015-11-18 | 福建伊时代信息科技股份有限公司 | Mobile terminal data flow method for real-time monitoring and system |
CN105392053A (en) * | 2015-12-11 | 2016-03-09 | 上海纬而视科技股份有限公司 | Method for receiving and processing network video streams in real time |
CN107171895A (en) * | 2017-07-01 | 2017-09-15 | 浙江省计量科学研究院 | A kind of communication network data flow-measuring method |
CN107148009B (en) * | 2017-07-01 | 2022-09-20 | 浙江省计量科学研究院 | Multi-standard mobile communication network internet data flow measuring device and method thereof |
CN109474447B (en) * | 2017-09-07 | 2022-04-12 | 北京京东尚科信息技术有限公司 | Alarm method and device for real-time monitoring system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1583281A1 (en) * | 2004-03-31 | 2005-10-05 | Lucent Technologies Inc. | High-speed traffic measurement and analysis methodologies and protocols |
CN101183994A (en) * | 2007-12-20 | 2008-05-21 | 福建星网锐捷网络有限公司 | Network communication data flow information statistic system and method |
CN101902365A (en) * | 2009-05-26 | 2010-12-01 | 北京启明星辰信息技术股份有限公司 | Method for monitoring P2P traffic of wide area network and system thereof |
CN102916856A (en) * | 2012-10-30 | 2013-02-06 | 中国工商银行股份有限公司 | Application-oriented network flow monitoring method, device and system |
-
2014
- 2014-01-20 CN CN201410024704.2A patent/CN103716211B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1583281A1 (en) * | 2004-03-31 | 2005-10-05 | Lucent Technologies Inc. | High-speed traffic measurement and analysis methodologies and protocols |
CN101183994A (en) * | 2007-12-20 | 2008-05-21 | 福建星网锐捷网络有限公司 | Network communication data flow information statistic system and method |
CN101902365A (en) * | 2009-05-26 | 2010-12-01 | 北京启明星辰信息技术股份有限公司 | Method for monitoring P2P traffic of wide area network and system thereof |
CN102916856A (en) * | 2012-10-30 | 2013-02-06 | 中国工商银行股份有限公司 | Application-oriented network flow monitoring method, device and system |
Non-Patent Citations (1)
Title |
---|
"基于流的校园局域网流量统计方法设计";张鑫;《电子科技》;20131112;第26卷(第9期);7-9 * |
Also Published As
Publication number | Publication date |
---|---|
CN103716211A (en) | 2014-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103716211B (en) | The data traffic measuring method of the network terminal | |
CN103619036B (en) | A kind of method and apparatus with assessing for data acquisition | |
CN104283918B (en) | A kind of WLAN terminal type acquisition methods and system | |
CN109495317B (en) | Data network flow prediction method and device | |
CN101754253B (en) | General packet radio service (GPRS) end-to-end performance analysis method and system | |
CN104009890B (en) | Network quality test system and method in a kind of internet | |
CN101188847A (en) | Experience evaluation method for mobile communication service user based on artificial neural network | |
CN102868576A (en) | Method for measuring downlink packet loss rate of access link of broadband network user | |
CN101888658A (en) | GPRS (General Packet Radio Service) core network simulation and test system | |
CN106302017B (en) | The small capaciated flow network velocity-measuring system of high concurrent and method | |
CN104683182B (en) | IDC network of computer room service quality detection method and device | |
CN114374626B (en) | Router performance detection method under 5G network condition | |
CN108092854A (en) | The test method and device of train grade ethernet device based on IEC61375 agreements | |
CN105528683A (en) | Road patrol method, hand-held terminal and cloud server | |
CN107181743A (en) | Network direct broadcasting data reporting method and device | |
CN104822159A (en) | System and method for WLAN test of AP by simulating STA | |
CN106535240A (en) | Mobile APP centralized performance analysis method based on cloud platform | |
CN109194533A (en) | The assessment method and device of data transfer delay | |
CN101252480B (en) | Realizing method for establishing multimedia webpage browsing traffic model | |
CN110169134A (en) | The detection method and device of wireless quality support video tastes | |
CN107659845A (en) | A kind of method and device for monitoring IPTV IPTV User Status | |
CN108777866A (en) | A kind of network analysis method, server and network system | |
CN104065490B (en) | The system and method for analog transceiver equipment signaling is realized based on online charging environment | |
CN102595467B (en) | Data acquisition method and data acquisition device | |
CN105204799B (en) | A kind of raising method of multichannel storage logic analyser display refresh rates deeply |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20161012 |