CN105847075A - Speed measuring method and device based on traffic monitoring - Google Patents

Speed measuring method and device based on traffic monitoring Download PDF

Info

Publication number
CN105847075A
CN105847075A CN201610136504.5A CN201610136504A CN105847075A CN 105847075 A CN105847075 A CN 105847075A CN 201610136504 A CN201610136504 A CN 201610136504A CN 105847075 A CN105847075 A CN 105847075A
Authority
CN
China
Prior art keywords
flow
time
total flow
speed
increment
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.)
Pending
Application number
CN201610136504.5A
Other languages
Chinese (zh)
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.)
Zhuhai Ruili Technology Co Ltd
Original Assignee
Zhuhai Ruili Technology Co Ltd
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 Zhuhai Ruili Technology Co Ltd filed Critical Zhuhai Ruili Technology Co Ltd
Priority to CN201610136504.5A priority Critical patent/CN105847075A/en
Publication of CN105847075A publication Critical patent/CN105847075A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate

Landscapes

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

Abstract

The invention relates to the technical field of communication, and discloses a speed measuring method and device based on traffic monitoring. The method comprises following steps of starting traffic monitoring; obtaining total start sending traffic and total start receiving traffic at start time, and total end sending traffic and total end receiving traffic at end time, in a preset time period range according to a preset period; obtaining a mean sending speed and a mean receiving speed; and obtaining the mean sending speed and the mean receiving speed of preset numbers according to preset cycle times, thus obtaining an average sending speed and an average receiving speed. According to the method and the device, speed measurement is unnecessarily started specially; the speed measurement is realized in a traffic monitoring mode; a speed measurement server is unnecessarily fixed; the network load is not increased; and the user traffic is not consumed.

Description

A kind of speed-measuring method based on traffic monitoring and device
Technical field
The present invention relates to communication technical field, particularly relate to a kind of speed-measuring method based on traffic monitoring and dress Put.
Background technology
The when of assessing network transmission performance, it is a common mode that network tests the speed, and its concrete mode is By building some servers by client utility of testing the speed, the download of Connection Service device and upper transmitting file or In random data, and timing statistics fragment, download or upload the number of data to assess network transmission performance.
Under traditional fixing network, by testing the speed, server tests the speed, and there is not the biggest problem, because of For traditional fixing network, use monthly payment not limit flow pattern;In the case of mobile, tradition The structure fixed server method that server tests the speed that tests the speed be equally useful, but due to mobile network Under, typically take the pattern charged by flow, therefore test the speed and can consume the cell phone network flow that user is valuable, And under the high speed mobile networks such as LTE, once testing the speed to consume the data traffic of up to 30~70MB, Becoming a white elephant, user is ready that actively running the instrument of testing the speed tests the speed hardly.
Utilizing traditional speed-measuring method, because fixed server to be passed through download is tested the speed, file or transmission are random Data, increase extra transmission load therefore can to current transmission network, and these flows entirely without Meaning, for purely obtaining a rating results and transmit waste flow.In prior art, exist as Lower technological deficiency:
1, need to build a large amount of fixing server that tests the speed;
2, need to consume a large number of users network traffics;
3, network load is increased;
4, user is needed actively to run speed measuring function.
Summary of the invention
The present invention provides a kind of speed-measuring method based on traffic monitoring and device, solves prior art and tests the speed cost Height, consumes a large number of users network traffics, and network load is big, needs user actively to run and tests the speed, inefficient Technical problem.
It is an object of the invention to be achieved through the following technical solutions:
A kind of speed-measuring method based on traffic monitoring, including:
Start traffic monitoring, according to predetermined period, obtain initiateing of the initial time in the range of preset time period Sending total flow and the initial total flow that receives, the termination of termination time sends total flow and terminates receiving always stream Amount;
The described transmission total flow that terminates is deducted described initial transmission total flow, to obtain the first transmitted traffic increasing Amount;The described reception total flow that terminates is deducted described initial reception total flow, to obtain the first reception flow increasing Amount;
By described first transmitted traffic increment divided by described preset time period, to obtain average transmission rate;Will Described first reception flow increment is divided by described preset time period, to obtain mean received rate;
According to default cycle-index, obtain average transmission rate and the mean received rate of preset number, will The average transmission rate sum of described preset number is divided by described preset number, to obtain average transmission rate; By the mean received rate sum of described preset number divided by described preset number, to obtain average reception speed Rate.
A kind of speed measuring device based on traffic monitoring, including:
Traffic monitoring module, is used for starting traffic monitoring, according to predetermined period, obtains Preset Time segment limit The initial transmission total flow of interior initial time and the initial total flow that receives, the total stream of termination transmission of termination time Amount and termination receive total flow;
Incremental computations module, for the described transmission total flow that terminates is deducted described initial transmission total flow, with Obtain the first transmitted traffic increment;The described reception total flow that terminates is deducted described initial reception total flow, with Obtain the first reception flow increment;
Mean Speed computing module, is used for described first transmitted traffic increment divided by described preset time period, To obtain average transmission rate;By described first reception flow increment divided by described preset time period, to obtain Mean received rate;
Average rate calculation module, for according to the cycle-index preset, obtaining the average transmission of preset number Speed and mean received rate, by the average transmission rate sum of described preset number divided by described present count Mesh, to obtain average transmission rate;The mean received rate sum of described preset number is preset divided by described Number, to obtain average receiving velocity.
The present invention provides a kind of speed-measuring method based on traffic monitoring and device, by starting traffic monitoring, presses According to predetermined period, obtain the initial transmission total flow of the initial time in the range of preset time period and initiate reception Total flow, terminates the termination of time and sends total flow and terminate receiving total flow;Obtain average transmission rate and Mean received rate;According to default cycle-index, obtain the average transmission rate of preset number and averagely connect Receive speed, to obtain average transmission rate and average receiving velocity.The present invention tests the speed without special startup, logical The mode of inflow-rate of water turbine monitoring realizes testing the speed, it is not necessary to the fixing server that tests the speed, and does not increase network load, does not consumes Customer flow.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to enforcement In example, the required accompanying drawing used is briefly described, it should be apparent that, the accompanying drawing in describing below is only Some embodiments of the present invention, for those of ordinary skill in the art, are not paying creative work On the premise of, other accompanying drawing also can be obtained according to these accompanying drawings.
Fig. 1 is the flow chart of a kind of based on traffic monitoring the speed-measuring method of the embodiment of the present invention;
Fig. 2 is the structure chart of a kind of based on traffic monitoring the speed measuring device of the embodiment of the present invention.
Detailed description of the invention
Understandable for enabling the above-mentioned purpose of the present invention, feature and advantage to become apparent from, below in conjunction with the accompanying drawings and The present invention is further detailed explanation for detailed description of the invention.
Intelligent terminal or operating system, such as Android device and iOS device, or Windows system, Linux system etc., in its operating system, all can record the total reception of current time system and transmission The total size of flow, the present invention i.e. utilizes the total flow enumerator of this reception and transmission, elapses based on the time, no Break the total flow counter data gathering and recording the transmission of each moment and receive, constantly calculating sampling time sheet Reception in Duan and transmitted traffic incremental data, thus it is calculated the transfer rate sending and receiving.Based on This is discussed in detail a kind of based on traffic monitoring the speed-measuring method of the embodiment of the present invention, as it is shown in figure 1, include:
Step 101, startup traffic monitoring, according to predetermined period, initiateing in the range of acquisition preset time period The initial transmission total flow of time and the initial total flow that receives, the termination of termination time sends total flow and termination Receive total flow;
Wherein, it is contemplated that user, when using network, unavoidably may meet some little pictures, little net Page, chat messages etc. the least various packets, the embodiment of the present invention is provided with and filters small data packets Sensitivity variable parameter (first flow threshold value and second flow threshold value), for filtering the error that parcel brings, Such that it is able to obtain network transfer speeds information accurately, it is achieved speed measuring function.Step 101 is the most permissible Including:
Step 101-1, startup traffic monitoring, according to predetermined period, obtain the second transmission in periodic regime Flow increment and second receives flow increment;
Step 101-2, when described second transmitted traffic increment more than first flow threshold value time, record start time Between, when described second receives flow increment less than second flow threshold value, the end of record time;Acquisition starts Initial transmission total flow and the termination of the time of termination of time to the time started terminated in time range send Total flow;And/or, when described second receives flow increment more than first flow threshold value, when record starts Between, when described second receives flow increment less than second flow threshold value, the end of record time;Acquisition starts Initial reception total flow and the termination of the time of termination of time to the time started terminated in time range receive Total flow.
Step 102, by described terminate send total flow deduct described initial transmission total flow, to obtain first Transmitted traffic increment;The described reception total flow that terminates is deducted described initial reception total flow, to obtain first Receive flow increment;
Step 103, by described first transmitted traffic increment divided by described preset time period, to obtain average sending out Transmission rate;By described first reception flow increment divided by described preset time period, to obtain mean received rate;
The cycle-index that step 104, basis are preset, obtains the average transmission rate of preset number and averagely connects Receive speed, by the average transmission rate sum of described preset number divided by described preset number, to obtain average Transmission rate;By the mean received rate sum of described preset number divided by described preset number, to obtain all Value receiving velocity.
The present invention provides a kind of speed-measuring method based on traffic monitoring, by starting traffic monitoring, according to presetting In the cycle, obtain the initial transmission total flow of the initial time in the range of preset time period and initiate the total stream of reception Amount, terminates the termination of time and sends total flow and terminate receiving total flow;Obtain average transmission rate with average Receiving velocity;According to default cycle-index, obtain average transmission rate and the average received speed of preset number Rate, to obtain average transmission rate and average receiving velocity.The present invention tests the speed without special startup, by stream The mode of amount monitoring realizes testing the speed, it is not necessary to the fixing server that tests the speed, and does not increase network load, does not consume user Flow.
A kind of based on traffic monitoring the speed-measuring method of the embodiment of the present invention in actual application, including:
Step s101, at T0In the moment, starting traffic monitoring, record operating system transmission sends at the beginning of total flow Beginning size TX0, receive total flow initial size RX0;It is false for arranging effective beginning flag;
Step s102, startup cyclical action, scanning flow meter number device data, such as start intervalometer Timer Or snoop-operations flow system flow change notification Notify, if using intervalometer, timer interval is adjustable Whole parameter W, is defaulted as 1 second triggering once;
Step s103, in cyclical action, respectively obtain operating system always send and receive uninterrupted TXn, RXn, wherein n is the periodic action of n-th;Calculate respectively
ΔTXn=TXn-TXn-1
ΔRXn=RXn-RXn-1
ΔTn=Tn-Tn-1
Step s104, in cyclical action, it is judged that whether effectively beginning flag is false, if it is sentences Disconnected Δ TXn, Δ RXnWhether more than the thresholding G1 set, wherein thresholding G1 is for adjusting sensitivity of testing the speed Variable element, if it is, record its starting position Tstart;Instantaneous sampling point in the recording timer cycle Speed, wherein W be start in the cycle with terminate time difference, such as timer interval or this notice with Before once notify the time difference in moment:
SRXn=Δ RXn/ΔTn
STXn=Δ TXn/ΔTn
Step s105, in cyclical action, it is judged that whether effectively beginning flag is true, if it is sentences Disconnected Δ TXn, Δ RXnWhether less than the thresholding G2 (test the speed sensitivity variable parameter) set, if it is remember Record current location is Tend, it is false for arranging effective beginning flag, and combines record start position TstartMeter Calculate:
TstartTo TendBetween time difference:
Δ T=Tend-Tstart
TstartTo TendBetween difference in flow:
Δ RX=RXend-RXstart
Δ TX=TXend-TXstart
Step s106, it may be judged whether reach stopping and testing the speed condition, if not up to stopping test condition, then Return to step s103, if reaching stop condition, dwelling period sexual act, such as stop intervalometer Timer Or opening operation notifications monitor, record and export and all obtain SRXavg, STXavg, and SRXn, STXnObtain rate samples result, collect network average behavior:
Network entirety transmission rate
Network entirety receiving velocity
The embodiment of the present invention additionally provides a kind of speed measuring device based on traffic monitoring, as in figure 2 it is shown, include:
Traffic monitoring module 210, is used for starting traffic monitoring, according to predetermined period, obtains preset time period In the range of the initial transmission total flow of initial time and initial receive total flow, terminate the termination of time and send Total flow and termination receive total flow;
Incremental computations module 220, always flows for described termination transmission total flow is deducted described initial transmission Amount, to obtain the first transmitted traffic increment;Described termination reception total flow is deducted described initial reception always flow Amount, to obtain the first reception flow increment;
Mean Speed computing module 230, is used for described first transmitted traffic increment divided by described Preset Time Section, to obtain average transmission rate;Flow increment is received divided by described preset time period by described first, with Obtain mean received rate;
Average rate calculation module 240, for according to the cycle-index preset, obtaining the average of preset number Transmission rate and mean received rate, preset the average transmission rate sum of described preset number divided by described Number, to obtain average transmission rate;By the mean received rate sum of described preset number divided by described pre- If number, to obtain average receiving velocity.
Wherein, described traffic monitoring module 210, including:
Cycle flow incremental computations unit 211, is used for starting traffic monitoring, according to predetermined period, obtains week The second transmitted traffic increment and second in the range of phase receives flow increment;
Transmitted traffic computing unit 212, for when described second transmitted traffic increment is more than first flow threshold value Time, record the time started, when described second receives flow increment less than second flow threshold value, the end of record Time;When obtaining the initial transmission total flow of time started to the time started terminated in time range and terminate Between termination send total flow;And/or,
Receive flow rate calculation unit 213, for when described second reception flow increment is more than first flow threshold value Time, record the time started, when described second receives flow increment less than second flow threshold value, the end of record Time;When obtaining the initial reception total flow of time started to the time started terminated in time range and terminate Between termination receive total flow.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive the present invention The mode of required hardware platform can be added by software to realize, naturally it is also possible to all come real by hardware Execute, but a lot of in the case of the former is more preferably embodiment.Based on such understanding, the technical side of the present invention What background technology was contributed by case can embody with the form of software product in whole or in part, this meter Calculation machine software product can be stored in storage medium, such as ROM/RAM, magnetic disc, CD etc., if including Dry instruction is with so that a computer equipment (can be personal computer, server, or the network equipment Deng) perform the method described in some part of each embodiment of the present invention or embodiment.
Above the present invention is described in detail, former to the present invention of specific case used herein Reason and embodiment are set forth, and the explanation of above example is only intended to help to understand the present invention's Method and core concept thereof;Simultaneously for one of ordinary skill in the art, according to the think of of the present invention Think, the most all will change, in sum, this specification Content should not be construed as limitation of the present invention.

Claims (4)

1. a speed-measuring method based on traffic monitoring, it is characterised in that including:
Start traffic monitoring, according to predetermined period, obtain initiateing of the initial time in the range of preset time period Sending total flow and the initial total flow that receives, the termination of termination time sends total flow and terminates receiving always stream Amount;
The described transmission total flow that terminates is deducted described initial transmission total flow, to obtain the first transmitted traffic increasing Amount;The described reception total flow that terminates is deducted described initial reception total flow, to obtain the first reception flow increasing Amount;
By described first transmitted traffic increment divided by described preset time period, to obtain average transmission rate;Will Described first reception flow increment is divided by described preset time period, to obtain mean received rate;
According to default cycle-index, obtain average transmission rate and the mean received rate of preset number, will The average transmission rate sum of described preset number is divided by described preset number, to obtain average transmission rate; By the mean received rate sum of described preset number divided by described preset number, to obtain average reception speed Rate.
Speed-measuring method based on traffic monitoring the most according to claim 1, it is characterised in that described Start traffic monitoring, according to predetermined period, the initial transmission of the initial time in the range of acquisition preset time period Total flow and the initial total flow that receives, the termination of termination time sends total flow and terminates receiving total flow, wrapping Include:
Start traffic monitoring, according to predetermined period, obtain the second transmitted traffic increment in periodic regime and the Two receive flow increment;
When described second transmitted traffic increment is more than first flow threshold value, record the time started, when described the When two reception flow increments are less than second flow threshold value, the end of record time;Obtain the time started to when terminating The termination of the initial transmission total flow of the time started in the range of between and the time of termination sends total flow;And/or,
When described second receives flow increment more than first flow threshold value, record the time started, when described the When two reception flow increments are less than second flow threshold value, the end of record time;Obtain the time started to when terminating The termination of the initial reception total flow of the time started in the range of between and the time of termination receives total flow.
3. a speed measuring device based on traffic monitoring, it is characterised in that including:
Traffic monitoring module, is used for starting traffic monitoring, according to predetermined period, obtains Preset Time segment limit The initial transmission total flow of interior initial time and the initial total flow that receives, the total stream of termination transmission of termination time Amount and termination receive total flow;
Incremental computations module, for the described transmission total flow that terminates is deducted described initial transmission total flow, with Obtain the first transmitted traffic increment;The described reception total flow that terminates is deducted described initial reception total flow, with Obtain the first reception flow increment;
Mean Speed computing module, is used for described first transmitted traffic increment divided by described preset time period, To obtain average transmission rate;By described first reception flow increment divided by described preset time period, to obtain Mean received rate;
Average rate calculation module, for according to the cycle-index preset, obtaining the average transmission of preset number Speed and mean received rate, by the average transmission rate sum of described preset number divided by described present count Mesh, to obtain average transmission rate;The mean received rate sum of described preset number is preset divided by described Number, to obtain average receiving velocity.
Speed measuring device based on traffic monitoring the most according to claim 3, it is characterised in that described Traffic monitoring module, including:
Cycle flow incremental computations unit, is used for starting traffic monitoring, according to predetermined period, obtains cycle model Enclose the second interior transmitted traffic increment and second and receive flow increment;
Transmitted traffic computing unit, is used for when described second transmitted traffic increment is more than first flow threshold value, The record time started, when described second receives flow increment less than second flow threshold value, the end of record time; Obtain initial transmission total flow and the time of termination of time started to the time started terminated in time range Terminate sending total flow;And/or,
Receive flow rate calculation unit, be used for when described second receives flow increment more than first flow threshold value, The record time started, when described second receives flow increment less than second flow threshold value, the end of record time; Obtain initial reception total flow and the time of termination of time started to the time started terminated in time range Terminate receiving total flow.
CN201610136504.5A 2016-03-11 2016-03-11 Speed measuring method and device based on traffic monitoring Pending CN105847075A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610136504.5A CN105847075A (en) 2016-03-11 2016-03-11 Speed measuring method and device based on traffic monitoring

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610136504.5A CN105847075A (en) 2016-03-11 2016-03-11 Speed measuring method and device based on traffic monitoring

Publications (1)

Publication Number Publication Date
CN105847075A true CN105847075A (en) 2016-08-10

Family

ID=56588220

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610136504.5A Pending CN105847075A (en) 2016-03-11 2016-03-11 Speed measuring method and device based on traffic monitoring

Country Status (1)

Country Link
CN (1) CN105847075A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018170869A1 (en) * 2017-03-24 2018-09-27 华为技术有限公司 Data transmission rate calculation method and related apparatus
CN111628902A (en) * 2019-02-28 2020-09-04 腾讯科技(深圳)有限公司 Rate testing method and apparatus, electronic device, and computer-readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140122713A1 (en) * 2012-05-22 2014-05-01 Microsoft Corporation Page phase time
CN104469810A (en) * 2014-12-01 2015-03-25 中国联合网络通信集团有限公司 Mobile terminal wireless internet access network speed calculating method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140122713A1 (en) * 2012-05-22 2014-05-01 Microsoft Corporation Page phase time
CN104469810A (en) * 2014-12-01 2015-03-25 中国联合网络通信集团有限公司 Mobile terminal wireless internet access network speed calculating method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018170869A1 (en) * 2017-03-24 2018-09-27 华为技术有限公司 Data transmission rate calculation method and related apparatus
CN111628902A (en) * 2019-02-28 2020-09-04 腾讯科技(深圳)有限公司 Rate testing method and apparatus, electronic device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN102045222B (en) Real-time overall test method of network system
CN102142990B (en) Business consumption monitoring method and apparatus
EP2486523B1 (en) Computer network service providing system including self adjusting volume enforcement functionality
WO2016177099A1 (en) Bandwidth speed measurement system and method for home gateway
EP2779718A1 (en) Method, terminal, network device and system for acquiring quality of experience
WO2005106751A2 (en) System and method for efficient configuration in a fixed network automated meter reading system
CN100463416C (en) Method for testing maximum available bandwidth of network
CA2581480A1 (en) System for automatically enforcing a demand reset in a fixed network of electricity meters
CN105141542A (en) TCP communication protocol-based congestion window control algorithm and system
CN103595584A (en) Method and system for diagnosing Web application performance problem
CN103401665B (en) The optimization method and device of retransmission timeout timer in cluster storage system
CN110351344A (en) A kind of LoRa and 4G communication system of distributed power grid fault oscillograph
CN109495317A (en) Data network method for predicting and device
CN109005528A (en) A kind of bluetooth mesh gateway data polymerization report method
CN102157057A (en) Wi-Fi (Wireless Fidelity)-based wireless meter reading device
CN107707612B (en) Method and device for evaluating resource utilization rate of load balancing cluster
CN103905260A (en) Terminal device network traffic monitoring method and device
CN107992416B (en) Method and device for determining webpage time delay
CN105847075A (en) Speed measuring method and device based on traffic monitoring
CN102571429B (en) A kind of OO intelligent power distribution communication business analyzing method and related device
CN109617824A (en) Collecting method, device and server
CN108198286A (en) A kind of intelligent door lock system based on NB-IOT technologies
CN104185195A (en) Mobile web performance measuring method, device and system
CN104869077A (en) Token based method and system for transmission control
CN101692303A (en) Method for acquiring power utilization data of large customer power utilization management terminals

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160810