CN105024872B - The method and device of applied in network performance test - Google Patents

The method and device of applied in network performance test Download PDF

Info

Publication number
CN105024872B
CN105024872B CN201410171593.8A CN201410171593A CN105024872B CN 105024872 B CN105024872 B CN 105024872B CN 201410171593 A CN201410171593 A CN 201410171593A CN 105024872 B CN105024872 B CN 105024872B
Authority
CN
China
Prior art keywords
data
data packet
network performance
format
capture
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.)
Active
Application number
CN201410171593.8A
Other languages
Chinese (zh)
Other versions
CN105024872A (en
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.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing 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 Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201410171593.8A priority Critical patent/CN105024872B/en
Publication of CN105024872A publication Critical patent/CN105024872A/en
Application granted granted Critical
Publication of CN105024872B publication Critical patent/CN105024872B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of method and devices of applied in network performance test, are related to Internet technical field, can be automatically performed the test of network performance in terminal side, not limited by client production and application environment.Method of the invention is related to: the data packet that capture network access generates;The data packet of capture is converted to the data format of human-readable;The data packet after format conversion is shunted according to the data characteristic information of data packet;Corresponding network performance parameter is obtained respectively for the data flow of each branch, obtains test result.Present invention is mainly applied in the web page access test process based on HTTP or SPDY agreement.

Description

The method and device of applied in network performance test
Technical field
The present invention relates to Internet technical field more particularly to a kind of method and devices of applied in network performance test.
Background technique
It with the continuous development of Internet technology, is had become ubiquitous by mobile terminal Internet access, user can pass through Browser application carries out web page browsing, inquires travel route by map application, or apply by instant messaging and chat with good friend It.When passing through mobile terminal Internet access, the process of mobile terminal and network side progress data interaction can generate many network parameters, Expended including webpage load duration, flow etc., these network parameters are able to reflect out the superiority and inferiority of network performance.In general, network item The high low factor of part quality, transmission quality can all have an impact the network performance of mobile terminal, therefore in practical applications, have Necessity is tested according to network performance superiority and inferiority of the network parameter to mobile terminal.
Current test mode mainly includes three kinds: the first, tester obtains the initial time and end that webpage loads Time, the time-consuming that manual calculations webpage loads accordingly, meanwhile, the managing process for passing through mobile terminal obtains the flow of webpage load Consumption;The second, by way of the implantation test code in application (such as browser) source code, record obtains webpage load The consumption of time-consuming and flow;Third is added relaying (Relay) between the mobile terminal and the server, the number that web page access generates When according to stream by relaying, the time-consuming for obtaining webpage load is recorded by relaying and flow consumes.
In the practice process of applied in network performance test, inventor has found that above-mentioned three kinds of test modes all have respective lack Fall into: the first, the mode of manual testing needs tester by starting/termination time or right of stopwatch record webpage load Web page loading process is recorded a video, and starting/termination time of webpage load, this artificial behaviour are obtained by the analysis to video recording frame The test mode inefficiency of work, and accuracy is poor;The second, limit of the mode of implantation test code by application vendor difference Make it is larger, test code compatibility it is poor, can not suitable for other products, meanwhile, test code be directed to application client The code at end is implanted into, and can not be tested the link-quality of network side;Third, the mode of relaying test are privately owned by different vendor The limitation of agreement can not distinguish the data flow of different product client, while need to protect using when relaying and being tested Card mobile terminal and Relay Server are in the same local area network, can not be suitable for Multi net voting access point (Access Point Name, abbreviation APN) test under environment.
Summary of the invention
The present invention provides a kind of method and device of applied in network performance test, can be automatically performed network performance in terminal side Test, is not limited by client production and application environment.
In order to achieve the above objectives, one aspect of the present invention provides a kind of method of applied in network performance test, comprising:
Capture the data packet that network access generates;
The data packet of capture is converted to the data format of human-readable;
The data packet after format conversion is shunted according to the data characteristic information of data packet;
Corresponding network performance parameter is obtained respectively for the data flow of each branch, obtains test result.
On the other hand, the present invention also provides a kind of devices of applied in network performance test, comprising:
Data capture unit, the data packet generated for capturing network access;
Format conversion unit, the data packet for capturing the data capture unit are converted to the data lattice of human-readable Formula;
Data distribution unit, after being converted for the data characteristic information according to data packet to the format conversion unit format Data packet shunted;
The data flow of parameter acquiring unit, each branch for distributing for the data distribution unit obtains respectively Corresponding network performance parameter, obtains test result.
The method and device of applied in network performance test provided by the invention can capture each apply and ask in progress network access The data packet of capture, is then converted to the data format of human-readable, and according to data packet by generated data packet when asking Data packet after data characteristic information converts format shunts, and the data flow being classified according to certain rules finally is directed to The data flow of each branch obtains corresponding network performance parameter respectively, to obtain test result.Network provided by the invention The method and device of performance test can access the different data streams that webpage process generates for user and carry out network performance automatically The acquisition of parameter can greatly improve the accuracy of testing efficiency and test result without the participation of tester's manual operation; Simultaneously as the test process is not related to the implantation of privately owned code, therefore is not limited by client brand, compatibility is higher; Further, since the test process is not related to proprietary protocol, therefore the data flow that can be generated to different application product identifies And test, and it should be test process without relaying intervention, therefore (such as terminal and relaying do not belong to an office to tested person scene Domain net in) limitation, use scope is bigger, be suitble to practical application.
Detailed description of the invention
In order to illustrate more clearly of the present invention or technical solution in the prior art, below will pair or description of the prior art in Required attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description be only it is of the invention some, it is right For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings His attached drawing.
Fig. 1 is the method flow diagram of applied in network performance test in the present invention;
Fig. 2 is the method flow diagram of another applied in network performance test in the present invention;
Fig. 3 is the schematic diagram that HTTP data packet shunts in the present invention;
Fig. 4 is the schematic diagram that another HTTP data packet shunts in the present invention;
Fig. 5 is the schematic diagram that another HTTP data packet shunts in the present invention;
Fig. 6 is the method flow diagram of another applied in network performance test in the present invention;
Fig. 7 is the structural schematic diagram of the device of applied in network performance test in the present invention;
Fig. 8 is the structural schematic diagram of the device of another applied in network performance test in the present invention;
Fig. 9 is the structural schematic diagram of the device of another applied in network performance test in the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the present embodiment, the technical solution in the present embodiment is clearly and completely described, Obviously, described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based in the present invention Embodiment, every other embodiment obtained by those of ordinary skill in the art without making creative efforts, all Belong to the scope of protection of the invention.
To provide a kind of mode of inter-product, cross-scenario automatic testing characteristics of network superiority and inferiority, one is present embodiments provided The method of kind applied in network performance test, as shown in Figure 1, this method comprises:
101, the data packet that the access of capture network generates.
Test method provided in this embodiment can be based on terminal side, carry out the process of web page access in applications client In, while network performance when to web page access is tested.For example, searching traffic path when user starts certain map application When, terminal starts dedicated test thread and captures data packet caused by the access of this network.
Network described in the present embodiment accesses generated data packet and is related to upstream data and downlink data, including data Data packet caused by all data interactions including information and control information, the present embodiment do not limit the content of data packet System.Example, in the scene of above-mentioned lookup traffic path, terminal passes through respective counts by testing the figure application of thread place of capture Add according to the interface that the page info of request interface request, start point/end point of user's input etc. search for information and network side feedback Carry the information such as data, search result.
It should be noted that terminal is individually established test thread and is surveyed to running application thread in the present embodiment Examination captures corresponding data packet, and for test thread independently of thread is applied, test process does not influence the normal fortune using thread Row, that is to say, that terminal can application operation during (such as user by browser access webpage when) independently into Row test.But the present embodiment is not to be only defined in test process using in operational process, in some other realization sides In formula, terminal only can also be captured data packet caused by web page access in application operation, and data packet is shunted, Starting execution, the present embodiment can also be started after application thread end of run by obtaining the subsequent executions steps such as network performance parameter Have no the corresponding restriction to carrying out between test process and application operational process strictly.
In a kind of implementation of the present embodiment, often multiple applications are run simultaneously in terminal, and each application Multiple execution threads, such as client foreground real-time loading games page data, while backstage downloading trip may be run simultaneously Play updates packet, and to network side server upload user data.When capturing data packet, terminal can wouldn't be to different type Data packet distinguish, only tentatively captured data packet that all applications are related to as " raw material " needed for test.
102, the data packet of capture is converted to the data format of human-readable.
In view of test process and the readability of test result are needed when interactive interface is tested in design by machine language It is converted into data format based on text, being easy to tester's cognition.Terminal can be according to tester in this step Preset, data packet is formatted using more typical data interchange language in the prior art.The present embodiment Concrete restriction is not carried out to the data format after the data interchange language of use and conversion.
103, the data packet after format conversion is shunted according to the data characteristic information of data packet.
All data packets involved in all applications are carried out as previously mentioned, terminal passes through test thread in a step 101 Preliminary capture.In this step, terminal classifies to the data packet captured in step 101 according to preset rules, obtains different Data flow.In the present embodiment, preset rules used by packet classification are included but are not limited to: being entered using type, the page The mouth address uniform resource locator (Universal Resource Locator, abbreviation URL), page type, data object lattice Formula, access object properties.In the following, being briefly described for above-mentioned various preset rules:
1, using type
Terminal can be shunted from different using data packet of the genre dimension to capture, such as will be under same manufacturer Application product involved in data packet gather for a data stream, or by belong to type of play using related data packet Gather for a data stream, then gathering using related data packet for a data stream under a user account will be belonged to.
2, the address page entry URL
Each Webpage of application request access uniquely corresponds to an address URL, and terminal can be with page entry The address URL as classification foundation, by the identical all pages of specific field a certain in the address URL it is requested produced by data packet Gather for a data stream.For example, will store multiple pages in the same database it is requested when produced data packet gather and be One data stream, alternatively, gathering the data packet that all pages of the same application request generate for a data stream.
3, page type
In general, page type involved in web page access includes: static types and regime type, the usual static types page With " .html ", " htm " for file extension, the regime type page is using " .asp ", " .aspx ", " php ", " jsp " etc. as text Part extension name.Terminal can be distinguished by page type of the file extension to application request, and will request static types The data packet that the page generates is gathered for a data stream, and the data packet that request dynamic type page generates is gathered for a data stream.
4, data object format
Applying in addition to requesting access to the page, in practical application can also be taken by different data request interfaces to network side Business device requests certain data objects (such as download pictures data, video data etc.).Terminal can from data format (such as Data, format etc.) dimension classify to data object, then gathering the data packet of same format data objects is one Data flow.
5, object properties are accessed
The various classifying rules that aforementioned 1 to 4 implementation is all based on local side shunt data packet, in addition, Terminal can also shunt data packet from the angle of opposite end, such as the shunting based on access object properties.The access pair As if refer to the target object of data access request, such as website described in request page or the database of storage etc..It is with website Example, terminal can will gather to the data packet of the same site requests for a data stream, or same type website (such as is regarded Frequency website) data packet gather for a data stream.
In practical application, other than it can be shunted according to preset rules described in above-mentioned 1 to 5 to data packet, eventually End can also further increase shunting granularity, be combined, patrolled to the two or more preset rules in above-mentioned 1 to 5 Volume relationship be " and " combination preset rules, distribute the thinner data flow of granularity.
104, corresponding network performance parameter is obtained respectively for the data flow of each branch, obtain test result.
Network performance parameter involved in the present embodiment includes: that page request number, page request mode, page request are big Small, requesting host number, request number of resources and type, request resource size, domain name system (User Datagram Protocol, abbreviation DNS) time-consuming, transmission control protocol (Transmission Control Protocol, abbreviation TCP) connection Time-consuming, TCP state conversion time-consuming, round trip delay time (Round-Trip Time, abbreviation RTT), access expired times, network retransmission Whether number occurs data random ordering.
Wherein, page request number requests how many a pages for one data stream of reflection, such as some application is simultaneously Request 4 pages;Page request mode includes " get ", " post ", " head " etc.;Page request size is for reflecting request Data volume size needed for one page;Requesting host number is for reflecting that it is main involved in all pages that a data stream is requested Machine number, for example, some using requested 4 pages come from 3 hosts;Request number of resources and type for reflecting request The attribute information of resource, such as request downloading a segment of audio and one section of video supply 2 resources, this 2 resources respectively for some application Type be respectively " MP3 " and " MOV ";Request resource size is used to reflect the data volume size of request resource, for example, using asking The audio resource and video resource size asked are respectively 2M and 1.5G;DNS time-consuming for reflect name server to IP address with It carries out converting spent duration between domain name;TCP connection is time-consuming, and TCP is a Connection-oriented Protocol, either party is to another It before one side sends data, requires to establish a TCP connection between the two parties, so-called TCP connection time-consuming refers in both sides Between establish the time consumed by TCP connection;TCP state conversion is time-consuming, and when establishing TCP connection, TCP connection can be in different shapes It is converted between state (such as state LISTEN, state SYN_RCVD etc.), so-called TCP state conversion is time-consuming to refer to that TCP connects It connects and carries out converting spent length of time between different conditions;RTT, RTT by three part determine: i.e. the propagation of link when Between, end system processing the time and router caching in queuing and processing the time, wherein the value of two parts in front Relatively fixed as a TCP connection, queuing and processing time in the caching of router can be with whole network Congestion Level SPCCs Variation and change.So the variation of RTT reflects the variation of network congestion degree to a certain extent;Access expired times, Network retransmission number and data random ordering etc. are the basic conception in Internet technology, are no longer repeated one by one herein.
After the data packet captured in step 101 is split into a plurality of data flow, terminal is directed to each data respectively Stream carries out the acquisition of above-mentioned network performance parameter, thus obtains the test result of every data stream.
The method of applied in network performance test provided in this embodiment can capture each apply when carrying out network access request Then the data packet of capture is converted to the data format of human-readable by generated data packet, and according to the data of data packet Data packet after characteristic information converts format shunts, the data flow being classified according to certain rules, finally for each The data flow of branch obtains corresponding network performance parameter respectively, to obtain test result.Internetworking provided in this embodiment The method that can be tested can access the different data streams that webpage process generates for user and carry out obtaining for network performance parameter automatically It takes, without the participation of tester's manual operation, the accuracy of testing efficiency and test result can be greatly improved;Meanwhile by It is not related to the implantation of privately owned code in the test process, therefore is not limited by client brand, compatibility is higher;In addition, by It is not related to proprietary protocol in the test process, therefore the data flow that can be generated to different application product is identified and tested, And it should be test process without relaying intervention, therefore not tested person scene (such as terminal and relaying belong in a local area network) Limitation, use scope is bigger, be suitble to practical application.
In addition, the method for applied in network performance test provided in this embodiment, can get page request during the test Number, page request size, request number of resources and type, request resource size, DNS time-consuming, TCP connection time-consuming etc. are a series of The parameter for reflecting network performance, compared with only obtaining the underlying parameters such as webpage load duration, flow consuming in the prior art, energy It is enough that more detailed, accurate test result is obtained based on careful network performance parameter, be conducive to make significantly more efficient excellent Change scheme.
It as the refinement to method shown in Fig. 1 and further expands, the present embodiment additionally provides a kind of applied in network performance test Method, in the method, terminal mainly for application carry out web access requests caused by data carry out network performance survey Examination, wherein data type involved in web access requests includes hypertext transfer protocol (Hyper Text Transport Protocol, abbreviation HTTP) data and SPDY data.SPDY agreement is a kind of enhancing agreement for http protocol, is increased newly The functions such as data stream multiplexing, Request Priority, HTTP Header compression.For purposes of illustration only, will be with HTTP number in the present embodiment This programme is introduced for, in practical application, this programme equally may be directly applied to test SPDY data During.As shown in Fig. 2, this method comprises:
201, the HTTP data packet that the access of capture network generates.
The implementation of this step is identical as the implementation of step 101 in Fig. 1, and details are not described herein again.
202, the HTTP data packet of capture parsed, screened and fault-tolerant processing.
Unlike implementation shown in Fig. 1, in the present solution, terminal is formatting it to HTTP data packet Before, protocol analysis processing is carried out to the HTTP data packet of capture first, then according to testing requirement to the HTTP after protocol analysis Data packet is screened, and the HTTP data packet as test object is selected, finally, holding to the HTTP data packet filtered out Fault reason.In general, data packet is during transmission, by factors shadows such as network transmission condition, transmission queue congestion, retransmission time outs It rings, data receiver can miss partial data packet when receiving data flow, and for the data packet missed, terminal needs to carry out this Fault-tolerant processing, polishing byte, so that follow-up test is used.
203, the HTTP data packet of capture is converted to the data format of human-readable.
After the data handling procedure in complete step 202, to treated, HTTP data packet formats terminal, will HTTP data packet is converted into the data format for being easy to tester's cognition.
In a kind of implementation of the present embodiment, the Data Format Transform of HTTP data packet is packet capturing library by terminal (Packet Capture Library, abbreviation PCAP) format.
As an alternative, terminal can also be by the data lattice of HTTP data packet in another implementation of the present embodiment Formula is converted to Javascript object representation (Javascript Object Notation, abbreviation JSON) format.
After carrying out Data Format Transform, terminal order executes step 204.
204, the HTTP data packet after format conversion is shunted according to the data characteristic information of HTTP data packet.
The implementation of this step is identical as the implementation of Fig. 1 step 103, secondary to go out to repeat no more.
Further, as an example, the present embodiment provides the implementations that following several HTTP data packets shunt:
1, the shunting of HTTP data packet is carried out according to the rule of " application+address page entry URL "
5 accessing page requests that capture terminal is applied from 3 are respectively as follows: request A and request B using 1, answer With 2 request C and the request D and E of application 3.Terminal divides the HTTP data packet of capture according to the address URL of request A to E For 5 data streams as shown in Figure 3, the classification of data flow has refine to the granularity of " application+page ".
2, the shunting of HTTP data packet is carried out according to " page type+address page entry URL "
Equally, 6 accessing page requests of the capture terminal from multiple applications, wherein request A, B, D and E are requested Page type be static types, and request the requested page type of C and F be static types.As shown in figure 4, terminal will ask HTTP data packet involved in A to F is asked to be divided into " static types page request " and " regime type request " 2 major class, and every It is further segmented according to the address page entry URL in one major class in order to request A to F totally 6 data stream, the classification refinement of data flow The granularity of " page type+page " is arrived.
3, the shunting of HTTP data packet is carried out according to " the page request mode+address page entry URL "
3 accessing page requests of capture terminal, wherein request A and C carries out the page by direct-connected page request mode Access request requests B to carry out accessing page request by the page request mode of agency.As shown in figure 5, terminal will request A to C Related HTTP data packet is divided into " direct-connected request method " and " proxy requests mode " 2 major class, and in each major class into One step is segmented according to the address page entry URL in order to request A to C 3 data stream totally, and the classification of data flow has refine to the " page The granularity of the request method+page ".
205, corresponding network performance parameter is obtained respectively for the http traffic of each branch, obtain test result.
The implementation of this step is identical as the implementation of step 104 in Fig. 1, and details are not described herein again.
The method of applied in network performance test provided in this embodiment, can be before carrying out data packet shunting, to capture HTTP data packet carries out the pretreatment such as protocol analysis, screening, fault-tolerant, can guarantee the availability as test object, guarantees to survey The accuracy of test result.
Further, it as the refinement to method shown in Fig. 1 and further expands, the present embodiment additionally provides a kind of network The method of performance test, relative to method shown in Fig. 1, this method can further permit on the basis of being based on data flow classification Perhaps tester selects the data flow as test object.Similar with method shown in Fig. 2, this method is equally with HTTP number According to being illustrated for packet.As shown in fig. 6, this method comprises:
601, the selected address target pages entrance URL is received.
Before the HTTP data packet that capture network access generates, terminal receives tester's choosing by test interactive interface The fixed address target pages entrance URL, such as tester select the http traffic that the address URL A and B is related to and test, Then in 6 http traffics that the address the URL A to F distributed is related to, HTTP number that terminal is only related to the address URL A and B It is tested according to stream.
Optionally, terminal also allows tester to select test object according to other preset rules in step 103 simultaneously, Such as tester can only select the http traffic of static page type and test, or only to select a certain website corresponding Page http traffic tested.
It should be noted that in the present embodiment, by step 601 design (step before capture terminal HTTP data packet Before 602) only consideration is executed suitable for practical application, actually step 601 can obtain accordingly for data flow Network performance parameter (any opportunity i.e. before step 606) executes, and the implementation that the present embodiment provides is only example Illustrate, not as the limitation to practical application.
602, the HTTP data packet that the access of capture network generates.
603, the HTTP data packet of capture is converted to the data format of human-readable.
604, the HTTP data packet after format conversion is shunted according to the data characteristic information of HTTP data packet.
The implementation of step 602 to step 604 is corresponding identical as the implementation of step 101 in Fig. 1 to step 103, Details are not described herein again.
Optionally, in the present embodiment, terminal can also be between step 602 and step 603, to the HTTP data of capture Packet is parsed, is screened and fault-tolerant processing, and specific implementation is identical with the implementation of step 202 in Fig. 2, is no longer gone to live in the household of one's in-laws on getting married herein It states.
605, according to selected target pages entrance URL address matching test object.
Terminal is after shunting HTTP data packet, according to the address pair target pages entrance URL received in step 601 All http traffics are successively matched, and the http traffic as test object is selected.
For example, the target pages address entrance URL that tester selectes in step 601 is A, and terminal point in step 604 The outflow address page entry URL is respectively 4 http traffics of A, B, C and D, then in this step, terminal is by target pages Entrance URL address A is matched with page entry URL address A to D sequence respectively, and selecting the address page entry URL is A's Http traffic is as test object.
606, the http traffic that the address entrance URL is directed toward for the target page obtains corresponding network performance parameter, obtains To test result.
Unlike step 104 in Fig. 1, in this step terminal be not to all http traffics distributed into The acquisition of row network performance parameter, but HTTP pointed by the address target pages entrance URL selected only for tester Data flow carries out the acquisition of network performance parameter.For the example in step 605, terminal is only to the address target pages entrance URL Http traffic pointed by A carries out the acquisition of network performance parameter, obtains test result.
The network performance parameter that terminal obtains in this step is identical as network performance parameter acquired in step 104 in Fig. 1, Details are not described herein again.
The method of applied in network performance test provided in this embodiment can allow for survey to set personnel selected by test interactive interface Data flow is tested, and the specific aim of test process can be improved, and avoids the output of meaningless test result.
Further, in order to enable tester to obtain intuitive test result, optimize convenient for subsequent performance, at this In a kind of preferred embodiment of embodiment, the realization of the method in conjunction with shown in Fig. 1,2 and 6, terminal can also set result generation according to survey Test report is read for surveying the personnel that set.In addition, terminal can also individually establish thread and give birth in real time during being tested At Gantt chart, when diagrammatically representing the execution sequence of testing procedure by effort scale and time scale and continue Between, test process is monitored convenient for tester.
Further, in another preferred embodiment of the present embodiment, in conjunction with aforementioned implementation, terminal can also be After test result, optimization of network performance scheme, and the performance optimization side according to generation are generated based on network performance parameter therein Case carries out optimization of network performance.
In addition, terminal can also extend dedicated application programming interfaces (Application Program Interface, Abbreviation API), the third party for accessing profession optimizes application, and obtained test result is sent to third party by corresponding API and is answered With to third party's optimization using network performance parameter is provided, by API reception third party's optimization using based on the network performance The optimization of network performance scheme of parameter feedback, and optimization of network performance is carried out according to received performance prioritization scheme.
Above method is mainly used in terminal side, and the terminal includes but is not limited to the electronics such as computer, mobile phone, tablet computer Equipment, in practical application, the above method also can be applied to network side, by corresponding network side server replacement terminal to above-mentioned Method is realized that the present embodiment does not limit the executing subject of the above method.
As the realization to Fig. 1,2 and 6, the present embodiment additionally provides a kind of device of applied in network performance test, and the device is excellent Bit selecting can also be located at network side in terminal inners such as computer, mobile phones, be set to inside network side server or network side takes Establishing outside business device but between network side server has data connection relationship, with real for carrying out to method shown in Fig. 1,2 and 6 It is existing.As shown in fig. 7, the device includes: data capture unit 71, format conversion unit 72, data distribution unit 73 and parameter Acquiring unit 74, wherein
Data capture unit 71, the data packet generated for capturing network access;
Format conversion unit 72, the data packet for capturing data capture unit 71 are converted to the data lattice of human-readable Formula;
Data distribution unit 73, after being converted for the data characteristic information according to data packet to 72 format of format conversion unit Data packet shunted;
The data flow of parameter acquiring unit 74, each branch for distributing for data distribution unit 73 obtains respectively Corresponding network performance parameter, obtains test result.
Further, as shown in figure 8, the device further include:
Data pre-processing unit 81, the data packet for capturing data capture unit 71 in format conversion unit 72 are converted Before the data format of human-readable, the data packet that data capture unit 71 captures is parsed, is screened and fault-tolerant processing.
Further, as shown in figure 9, format conversion unit 72 includes:
First conversion module 91, for the data packet of capture to be converted to PCAP format;
Second conversion module 92, for the data packet of capture to be converted to JSON format.
Further, data distribution unit 73 is used for according to any one following data characteristic information or at least two data The combination of characteristic information shunts the data packet after format conversion:
Using type, the address page entry URL, page type, data object format, access object properties.
Further, as shown in figure 8, the device further include:
Test setting interface 82, for being obtained respectively accordingly in parameter acquiring unit 74 for the data flow of each branch Before network performance parameter, the selected address target pages entrance URL is received;
Parameter acquiring unit 74, for what is be directed toward for the received address target pages entrance URL of test setting interface 82 Data flow obtains corresponding network performance parameter.
Further, as shown in figure 8, the device further include:
Schemes generation unit 83, for being based on parameter acquiring unit after parameter acquiring unit 74 obtains test result 74 network performance parameters obtained generate optimization of network performance scheme.
Further, as shown in figure 8, the device further include:
Interface Expanding unit 84 obtains test result in parameter acquiring unit 74 for extending the API of access performance optimization Later, application is optimized to third party by API and network performance parameter is provided, third party's optimization application is received by API and is based on net The optimization of network performance scheme of network performance parameter feedback.
Further, above-mentioned network performance parameter include: page request number, page request mode, page request size, Requesting host number, request number of resources and type, request resource size, DNS is time-consuming, TCP connection is time-consuming, TCP state conversion Whether time-consuming RTT, access expired times, network retransmission number, occurs data random ordering.
The device of applied in network performance test provided in this embodiment can capture each apply when carrying out network access request Then the data packet of capture is converted to the data format of human-readable by generated data packet, and according to the data of data packet Data packet after characteristic information converts format shunts, the data flow being classified according to certain rules, finally for each The data flow of branch obtains corresponding network performance parameter respectively, to obtain test result.Internetworking provided in this embodiment The device that can be tested can access the different data streams that webpage process generates for user and carry out obtaining for network performance parameter automatically It takes, without the participation of tester's manual operation, the accuracy of testing efficiency and test result can be greatly improved;Meanwhile by It is not related to the implantation of privately owned code in the test process, therefore is not limited by client brand, compatibility is higher;In addition, by It is not related to proprietary protocol in the test process, therefore the data flow that can be generated to different application product is identified and tested, And it should be test process without relaying intervention, therefore not tested person scene (such as terminal and relaying belong in a local area network) Limitation, use scope is bigger, be suitble to practical application.
Secondly, the device of applied in network performance test provided in this embodiment, can get page request during the test Number, page request size, request number of resources and type, request resource size, DNS time-consuming, TCP connection time-consuming etc. are a series of The parameter for reflecting network performance, compared with only obtaining the underlying parameters such as webpage load duration, flow consuming in the prior art, energy It is enough that more detailed, accurate test result is obtained based on careful network performance parameter, be conducive to make significantly more efficient excellent Change scheme.
In addition, the device of applied in network performance test provided in this embodiment, it can be before carrying out data packet shunting, to capture HTTP data packet carry out protocol analysis, screening, the pretreatment such as fault-tolerant, can guarantee the availability as test object, guarantee The accuracy of test result.
Finally, the device of applied in network performance test provided in this embodiment, can allow for surveying the personnel that set by testing interaction circle Face selected data stream is tested, and the specific aim of test process can be improved, and avoids the output of meaningless test result.
Through the above description of the embodiments, it is apparent to those skilled in the art that the present invention can borrow Help software that the mode of required common hardware is added to realize, naturally it is also possible to which the former is more preferably by hardware, but in many cases Embodiment.Based on this understanding, the portion that technical solution of the present invention substantially in other words contributes to the prior art Dividing can be embodied in the form of software products, which stores in a readable storage medium, such as count The floppy disk of calculation machine, hard disk or CD etc., including some instructions are used so that computer equipment (it can be personal computer, Server or the network equipment etc.) execute method described in each embodiment of the present invention.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (13)

1. a kind of method of applied in network performance test characterized by comprising
Capture the data packet that network access generates, wherein the network access is web page access;
The data packet of capture is converted to the data format of human-readable;
The data packet after format conversion is shunted according to the data characteristic information of data packet;
Corresponding network performance parameter is obtained respectively for the data flow of each branch, obtains test result;
Wherein, the data characteristic information according to data packet shunts the data packet after format conversion, comprising:
According to the combination of any one following data characteristic information or at least two data characteristic informations, to the number after format conversion Shunted according to packet: using type, the address page entry uniform resource locator (URL), page type, data object format, Access object properties.
2. the method according to claim 1, wherein the data packet of capture is converted to human-readable described Before data format, the method further includes:
The data packet of capture is parsed, is screened and fault-tolerant processing.
3. according to the method described in claim 2, it is characterized in that, the number that the data packet of capture is converted to human-readable According to format, comprising:
The data packet of capture is converted into packet capturing library (PCAP) format or Javascript object representation (JSON) format.
4. the method according to claim 1, wherein obtaining phase respectively in the data flow for each branch Before the network performance parameter answered, the method further includes:
Receive the selected address target pages entrance URL;
The data flow for each branch obtains corresponding network performance parameter respectively, comprising:
Corresponding network performance parameter is obtained for the data flow that the address target pages entrance URL is directed toward.
5. the method according to claim 1, wherein after obtaining the test result, the method is into one Step includes:
Optimization of network performance scheme is generated based on the network performance parameter.
6. according to the method described in claim 5, it is characterized in that, the method further includes:
Extend the application programming interfaces (API) of access performance optimization;
After obtaining the test result, application is optimized to third party by the API, the network performance parameter is provided;
The third party, which is received, by the API optimizes the optimization of network performance side that application is fed back based on the network performance parameter Case.
7. method according to any one of claim 1 to 6, which is characterized in that the network performance parameter includes: the page Request number, page request mode, page request size, requesting host number, request number of resources and type, request resource big Small, domain name system (DNS) is time-consuming, transmission control protocol (TCP) connection is time-consuming, TCP state conversion time-consuming, round trip delay time (RTT), Whether access expired times, network retransmission number occur data random ordering.
8. a kind of device of applied in network performance test characterized by comprising
Data capture unit, the data packet generated for capturing network access, wherein the network access is web page access;
Format conversion unit, the data packet for capturing the data capture unit are converted to the data format of human-readable;
Data distribution unit, for the data characteristic information according to data packet to the number after format conversion unit format conversion It is shunted according to packet;
The data flow of parameter acquiring unit, each branch for distributing for the data distribution unit obtains accordingly respectively Network performance parameter, obtain test result;
Wherein, the data distribution unit is used to be believed according to any one following data characteristic information or at least two data characteristicses The combination of breath shunts the data packet after format conversion: with applying type, page entry uniform resource locator (URL) Location, page type, data object format, access object properties.
9. device according to claim 8, which is characterized in that described device further include:
Data pre-processing unit, for being converted to the data packet that the data capture unit captures in the format conversion unit Before the data format of human-readable, the data packet of data capture unit capture is parsed, is screened and fault-tolerant processing.
10. device according to claim 9, which is characterized in that the format conversion unit includes:
First conversion module, for the data packet of capture to be converted to packet capturing library (PCAP) format;
Second conversion module, for the data packet of capture to be converted to Javascript object representation (JSON) format.
11. device according to claim 8, which is characterized in that described device further include:
Test setting interface, for obtaining corresponding network respectively for the data flow of each branch in the parameter acquiring unit Before performance parameter, the selected address target pages entrance URL is received;
The parameter acquiring unit refers to for the address target pages entrance URL for the test setting interface To data flow obtain corresponding network performance parameter.
12. device according to claim 8, which is characterized in that described device further include:
Schemes generation unit, for being obtained after the parameter acquiring unit obtains the test result based on the parameter The network performance parameter that unit obtains generates optimization of network performance scheme.
13. device according to claim 12, which is characterized in that described device further include:
Interface Expanding unit is obtained for extending the application programming interfaces (API) of access performance optimization in the parameter acquiring unit To after the test result, application is optimized to third party by the API, the network performance parameter is provided, by described API receives the third party and optimizes the optimization of network performance scheme that application is fed back based on the network performance parameter.
CN201410171593.8A 2014-04-25 2014-04-25 The method and device of applied in network performance test Active CN105024872B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410171593.8A CN105024872B (en) 2014-04-25 2014-04-25 The method and device of applied in network performance test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410171593.8A CN105024872B (en) 2014-04-25 2014-04-25 The method and device of applied in network performance test

Publications (2)

Publication Number Publication Date
CN105024872A CN105024872A (en) 2015-11-04
CN105024872B true CN105024872B (en) 2019-02-26

Family

ID=54414598

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410171593.8A Active CN105024872B (en) 2014-04-25 2014-04-25 The method and device of applied in network performance test

Country Status (1)

Country Link
CN (1) CN105024872B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105721550B (en) * 2016-01-21 2019-04-19 北京乐动卓越科技有限公司 A kind of fault-tolerant monitoring method of client and system
CN107027143A (en) * 2016-01-29 2017-08-08 中国移动通信集团贵州有限公司 A kind of information acquisition method and device
CN105915406B (en) * 2016-04-12 2019-10-18 北京齐尔布莱特科技有限公司 A kind of test method, device and calculate equipment
CN107889128B (en) * 2016-09-30 2020-12-18 腾讯科技(深圳)有限公司 Network quality adjusting method and device
CN107480179B (en) * 2017-07-04 2020-06-16 阿里巴巴集团控股有限公司 Detection method and device and electronic equipment
CN107332712A (en) * 2017-08-02 2017-11-07 山西大学 Network performance dynamic evaluation, monitoring and optimization system
CN107707432A (en) * 2017-10-30 2018-02-16 成都视达科信息技术有限公司 A kind of method of testing and system
CN109688603B (en) * 2018-03-30 2021-03-23 新华三技术有限公司 Network diagnosis method, device and machine readable storage medium
CN108901079B (en) * 2018-06-20 2021-03-09 Oppo(重庆)智能科技有限公司 Timeout time determination method, device, equipment and storage medium
CN108809766A (en) * 2018-06-22 2018-11-13 北京奇艺世纪科技有限公司 A kind of method, apparatus and system obtaining RTT
CN110932879B (en) * 2018-09-20 2022-12-23 阿里巴巴集团控股有限公司 Network performance test method, data processing device and storage medium
CN112770359B (en) * 2019-11-05 2023-10-27 中国移动通信有限公司研究院 Data distribution method and device
CN111654549B (en) * 2020-06-11 2022-11-08 浙江浙大网新国际软件技术服务有限公司 Automatic safety testing method based on function testing
CN112835334B (en) * 2020-12-31 2022-05-27 广州明珞装备股份有限公司 Industrial data platform testing method and device, computer equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761456A (en) * 2011-04-29 2012-10-31 腾讯科技(深圳)有限公司 Method, device and system for acquiring performance parameters of browser of mobile terminal
EP2526710A1 (en) * 2010-01-22 2012-11-28 Wadaro Limited Method and system for monitoring the performance of a network
CN103532782A (en) * 2013-10-15 2014-01-22 东南大学 WLAN (Wireless Local Area Network) wireless network tester and testing method thereof
CN103645978A (en) * 2013-12-16 2014-03-19 百度在线网络技术(北京)有限公司 Method, device and system for testing browser webpage loading time

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2526710A1 (en) * 2010-01-22 2012-11-28 Wadaro Limited Method and system for monitoring the performance of a network
CN102761456A (en) * 2011-04-29 2012-10-31 腾讯科技(深圳)有限公司 Method, device and system for acquiring performance parameters of browser of mobile terminal
CN103532782A (en) * 2013-10-15 2014-01-22 东南大学 WLAN (Wireless Local Area Network) wireless network tester and testing method thereof
CN103645978A (en) * 2013-12-16 2014-03-19 百度在线网络技术(北京)有限公司 Method, device and system for testing browser webpage loading time

Also Published As

Publication number Publication date
CN105024872A (en) 2015-11-04

Similar Documents

Publication Publication Date Title
CN105024872B (en) The method and device of applied in network performance test
US10334016B2 (en) System and method for context specific website optimization
CN105100260B (en) A kind of method and device to be accessed by proxy server
CN106302445B (en) Method and apparatus for handling request
CN110225417A (en) Data processing method and server, the method and server that detect Caton
CN110457199A (en) The method and apparatus of performance test
US20120317151A1 (en) Model-Based Method for Managing Information Derived From Network Traffic
EP3078180B1 (en) Performance metric of a system conveying web content
CN107786992B (en) Method and device for detecting quality of mobile communication network
US8818927B2 (en) Method for generating rules and parameters for assessing relevance of information derived from internet traffic
CN110635965B (en) IPv6 network quality monitoring method, equipment and storage medium
CN109640113A (en) A kind of processing method and proxy server of dilatory video data
CN103974057A (en) Video quality user experience value evaluation method, device and system
CN109688483A (en) A kind of method, apparatus and electronic equipment obtaining video
JP2014057149A (en) Communication device, relay device and communication method
US10164819B2 (en) Correlating web traffic events to a web page session
Solomon et al. Network traffic monitoring in an industrial environment
CN115499230A (en) Network attack detection method and device, equipment and storage medium
CN106302020B (en) Network bandwidth statistical method and device
CN107103079B (en) Live broadcast method and system for dynamic website
CN113453076A (en) User video service quality evaluation method and device, computing equipment and storage medium
Luglio et al. A Flexible Web Traffic Generator for the dimensioning of a 5G backhaul in NPN
US20160234324A1 (en) Information on navigation behavior of web page users
CN116545942B (en) Data transmission method, device, electronic equipment and storage medium
Pevec Measurements of YouTube traffic and performance based on network and client-side data collection

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant