CN104348680B - The method and device of wire-speed detection - Google Patents

The method and device of wire-speed detection Download PDF

Info

Publication number
CN104348680B
CN104348680B CN201310343896.9A CN201310343896A CN104348680B CN 104348680 B CN104348680 B CN 104348680B CN 201310343896 A CN201310343896 A CN 201310343896A CN 104348680 B CN104348680 B CN 104348680B
Authority
CN
China
Prior art keywords
packet
target packet
time
downloading
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.)
Active
Application number
CN201310343896.9A
Other languages
Chinese (zh)
Other versions
CN104348680A (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 Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310343896.9A priority Critical patent/CN104348680B/en
Publication of CN104348680A publication Critical patent/CN104348680A/en
Application granted granted Critical
Publication of CN104348680B publication Critical patent/CN104348680B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of method and devices of wire-speed detection, are related to Internet technical field, detection efficiency lower problem when being able to solve artificial detection.The described method includes: being determined for compliance with the target packet of current network type, the target packet is the data packet provided in website to be detected;It simulates down operation and downloads the target packet to web site requests to be detected;Record first time when down operation triggering;When default waiting time after the first time, the second time used in the amount of downloading data and the downloading downloading data amount of the target packet is obtained;The data volume downloaded according to the first time, the second time and the target packet calculates network speed, and the network speed is used to indicate the network speed of the website to be detected described in the type of current network.Present invention is mainly applied to during network operation.

Description

The method and device of wire-speed detection
Technical field
The present invention relates to Internet technical field more particularly to a kind of method and devices of wire-speed detection.
Background technique
With widely available and network the development of application (Application, abbreviation APP), people are more and more APP is downloaded by network.For the provider of the electronic market APP, an important aspect is that the downloading of high speed is provided for user Service.
Currently, being adopted the following technical solutions when detecting network speed: recording the complete of manual down operation by camera Process.After downloading is completed, tester extracts downloading start time point, downloading deadline point difference from the video of recording Corresponding frame.Downloading duration is obtained by comparing the time point in the two frames, further according to the size for the data downloaded, is calculated Speed of download out.
During stating wire-speed detection in realization, at least there are the following problems in the prior art for inventor's discovery: due to It needs manually to extract frame and calculates speed of download, therefore is long by the time required for manually progress wire-speed detection, wire-speed detection Low efficiency.When needing repeated detection to take average network speed, the low problem of manual detection efficiency will be protruded more.
Summary of the invention
A kind of method and device of wire-speed detection provided by the invention, detection efficiency is lower when being able to solve artificial detection Problem.
The present invention provides a kind of methods of wire-speed detection, which comprises
It is determined for compliance with the target packet of current network type, the target packet is the number provided in website to be detected According to packet;
It simulates down operation and downloads the target packet to web site requests to be detected;
Record first time when down operation triggering;
When default waiting time after the first time, obtain the target packet the amount of downloading data and under Carry the second time used in the downloading data amount;
Network speed is calculated according to the data volume that the first time, the second time and the target packet have been downloaded Degree, the network speed are used to indicate the network speed of the website to be detected described in the type of current network.
The present invention also provides a kind of device of wire-speed detection, described device includes:
First determination unit, for being determined for compliance with the target packet of current network type, the target packet be to The data packet provided in detection website;
Analogue unit downloads the target packet to web site requests to be detected for simulating down operation;
Recording unit, for recording the first time when down operation triggering of the analogue unit simulation;
Acquiring unit has obtained the target packet when for default waiting time after the first time Second time used in downloading data amount and the downloading downloading data amount;
Computing unit, the institute for being obtained according to the first time of the recording unit records, the acquiring unit It stated for the second time and data volume that the target packet has been downloaded calculates network speed, the network speed exists for indicating The network speed of website to be detected described in the type of current network.
The method and device of wire-speed detection provided by the invention can determine website to be detected according to the type of current network In target packet, simulate artificial down operation to web site requests to be detected and download target packet, while recording request It downloads the first time of target packet, when default waiting time after first time, has obtained the target packet Second time used in downloading data amount and the downloading downloading data amount, according at the first time, the second time and described The data volume that target packet has been downloaded calculates network speed.In the prior art, it needs by manually extracting frame, detection efficiency It is low.In the present invention, by simulating artificial down operation, cost of labor can be saved.It is handled by electronic equipment, it can The accuracy for improving detection lifts error existing for frame when overcoming artificial detection, while electronic equipment more manually has efficiently Data-handling capacity, and then improve the efficiency of detection.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the flow chart of the method for a wire-speed detection in the embodiment of the present invention;
Fig. 2 is the flow chart of the method for another wire-speed detection in the embodiment of the present invention;
Fig. 3 is the flow chart of the method for another wire-speed detection in the embodiment of the present invention;
Fig. 4 is the structural schematic diagram of the device of a wire-speed detection in the embodiment of the present invention;
Fig. 5 is the structural schematic diagram of the device of another wire-speed detection in the embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention provides a kind of method of wire-speed detection, the method is applied in electronic equipment, the electricity Sub- equipment includes the fixed equipments such as the mobile devices such as smart phone, tablet computer and PC, as shown in Figure 1, which comprises
Step 101, the target packet for being determined for compliance with current network type, target packet are to provide in website to be detected Data packet.
Current network type is but is not limited to any one following network type: Generation Mobile Telecommunication System technology (2nd- Generation, abbreviation 2G), 3rd generation mobile communication technology (3rd-generation, abbreviation 3G), Wireless Fidelity (wireless fidelity, abbreviation Wi-Fi).
Step 102, simulation down operation download target packet to web site requests to be detected.
If the band of position of download function key displayed in the screen receives user's triggering by manually being detected Down operation.In order to simulate artificial detection in the present invention, reaches down operation effect identical with artificial detection, pass through Simulation down operation, which sets out, downloads request.
First time when step 103, record down operation triggering.
When the downloading task of simulated operation triggering target packet, time of record down operation when setting out, when first Between.
When step 104, default waiting time after first time, obtain target packet the amount of downloading data and under Carry the second time used in downloading data amount.
If causing target packet that can not download, no since the downloading process of target packet is there are due to mistake etc. Unconfined can wait for downloads completion.Therefore since at the first time, when by default waiting time, target data is obtained It the amount of downloading data of packet and downloads time used in downloading data amount.Default waiting time is 10s or more.
It is at the first time the hardware timeout of electronic equipment with the second time.Whenever the data slot for receiving target packet When, record receives the receiving time of the data slot.If completing the downloading of target packet within default waiting time, by In downloading finish when can automatically record downloading finish when time, then downloading data amount be target packet data volume, under Carry the newest modification time that the second time used in downloading data amount is target packet.If within default waiting time Fail the downloading of completion target packet, then downloading data amount is the partial data amount of target packet, has downloaded number It is the newest modification time of target packet according to amount the second time used.
Step 105 calculates network speed according to the data volume that first time, the second time and target packet have been downloaded Degree, network speed are used to indicate the network speed of the website to be detected in the type of current network.
According to the downloading duration that can obtain the quantity that downloading target packet has been downloaded with the second time at the first time.With The data volume downloaded can obtain the network speed of website to be tested divided by the downloading duration.
The method of wire-speed detection provided by the invention can determine the mesh in website to be detected according to the type of current network Data packet is marked, artificial down operation is simulated to web site requests to be detected and downloads target packet, while recording request downloading mesh It marks the first time of data packet, when default waiting time after first time, obtains the downloading number of the target packet According to the second time used in amount and the downloading downloading data amount, according to first time, the second time and the number of targets Network speed is calculated according to the data volume that packet has been downloaded.In the prior art, it needs by manually extracting frame, detection efficiency is low.This hair In bright, by simulating artificial down operation, cost of labor can be saved.It is handled by electronic equipment, can be improved inspection The accuracy of survey lifts error existing for frame when overcoming artificial detection, while electronic equipment more manually has at efficient data Reason ability, and then improve the efficiency of detection.
The embodiment of the invention also provides a kind of methods of wire-speed detection, illustrate as to method shown in Fig. 1, such as Shown in Fig. 2, step 101 is determined for compliance with the step of target packet of current network type, can be carried out by following manner real It applies:
Step 201 determines preset data packet size according to the type of current network.
Different network capacities is different, it is therefore desirable to be determined at the network type phase according to the type of different networks The data package size of symbol.Such as: if current network is Wi-Fi, preset data packet size is 10M.If current network is 2G, then preset data packet size is 2-3M.If current network is 3G, preset data packet size is 3-7M.
Step 202 obtains packet information set from website to be detected, and packet information set is for indicating Downloadable The title and data volume size of data packet.
Website to be detected is stored with the inventory of applying that its is capable of providing, the inventory by way of datagram message set into Row display, datagram message set is as shown in table 1, for indicating the title and data volume size of Downloadable data packet.
Table 1
Serial number Title Size of data
1 Using one 100M
2 Using two 10M
3 Using three 7M
10 Using ten 1M
If the network type of current network is Wi-Fi, size of data attribute is searched in table 1 and 10M is immediate Record.Lookup result is the record of serial number 2.Apply Names " the application that size of data is 10M can be found by this record Two ".
Step 203 is searched from packet information set according to preset data packet size and is most connect with preset data packet size Close target packet.
After needing the size of target packet according to the type of current network is determining, looked into packet information set Look for the smallest package name of difference with the size of the target packet determined.In downloading when target packet, root is needed It issues and requests to website to be detected according to the title of target packet.
The method of wire-speed detection provided in an embodiment of the present invention, can be according to the type of current network, determining and current net The size of the adaptable data packet of the type of network, searches the data being consistent with the size of the data packet from datagram message set Packet is used as target packet, and then reaches more targeted downloading, improves wire-speed detection efficiency.
The embodiment of the invention also provides a kind of method of wire-speed detection, as the further explanation to method shown in Fig. 1, In step 104, default waiting time after first time, under the amount of downloading data and downloading that obtain target packet Before carrying the second time used in data volume, the method also includes: default wait is determined according to the type of the current network Duration.
Since the network transfer speeds of heterogeneous networks are different, in same time not by the data volume of heterogeneous networks downloading Together, therefore, it is necessary to determine the default waiting time according to the type of current network.Such as: if current network is Wi-Fi, in advance If the waiting time is 80s.If current network is 2G, presetting the waiting time is 150s.If current network is 3G, preset Waiting time is 120s.
The embodiment of the present invention, can be according to network type by determining the default waiting time according to the type of current network The different default waiting time is arranged in difference, reaches the applicability for improving wire-speed detection.
The embodiment of the invention also provides a kind of methods of wire-speed detection, illustrate as to method shown in Fig. 1, step Rapid 104, it when default waiting time after first time, obtains the amount of downloading data of target packet and has downloaded number According to amount the second time used, can be implemented by following manner:
It is finished if the target packet has been downloaded, obtains the size and the target data of the target packet The newest modification time of packet, is sized to downloading data amount for target packet for described, when by the newest modification Between be determined as the second time;
It is finished if the target packet is not downloaded, obtains the size that the target packet has been downloaded, it will be described What target packet had been downloaded is sized to downloading data amount, and the newest modification time of the target packet is determined as Second time.
It takes the mobile phone as an example, when realizing, since the second time of acquisition is the hardware timeout of mobile phone linux operating system, So the first time obtained must also take hardware timeout.Shell-command is executed by java code, is obtained at the first time and the Two times were then converted into specific time format " year-month-day when: point: the second " return.Main code is as follows:
In addition, executing shell-command by java code, the size of the second time and target packet are obtained.Due to obtaining The packet taken is read needed packet size obtaining the packet size as unit of K divided by 1024 for convenience as unit of byte.It is main Want code as follows:
The method of wire-speed detection provided in an embodiment of the present invention can be downloaded according to target packet and finish situation, obtain Time used in data volume that target packet has been downloaded and the data volume downloaded, improve the accurate of wire-speed detection Property.
The embodiment of the invention also provides a kind of method of wire-speed detection, as the further explanation to method shown in Fig. 1, Before the step 101, the target packet for being determined for compliance with current network type the step of, the method also includes:
The data deleting the corresponding cache contents in the website to be detected and being downloaded from the website to be detected Packet.
The method of wire-speed detection provided in an embodiment of the present invention, by deleting cache contents, when can be avoided network speed test The target packet of request is repeated with the data packet downloaded, and improves the accuracy of wire-speed detection today.
The embodiment of the invention also provides a kind of method of wire-speed detection, as the further explanation to method shown in Fig. 1, In step 101, it is determined for compliance with before the step of target packet of current network type, the method also includes:
The network type designated order of user's triggering is received, the network type formulates instruction for describing default network class Type, the default network type are the network type used when detecting website network speed to be detected.
If current network type and default network type be not identical, the default network type is switched to.
User can be switched to another network (3G) from a network (2G) by errorlevel controlling electronic devices.
User can pass through errorlevel input parameters described below: application market title (such as: application market a, application market b, Application market c), network type (1:Wi-Fi2:2G3:3G), whether there is or not cachings (1: having caching 2: without caching), cycle-index, mobile phone Resolution ratio (such as: 480*854).Application market input All indicates that all application markets all detect.To make application market as far as possible in phase With network state under execute wire-speed detection, the execution that uses sequence for application market a- > application market b- > application market c- > Application market a- > application market b- > application market c- > ... sequence wheel gives in mode to execute wire-speed detection.
The method of wire-speed detection provided in an embodiment of the present invention can switch according to the network type designated order of user It is detected in network type needed for user.
The embodiment of the invention also provides a kind of methods of wire-speed detection, illustrate as to method shown in Fig. 1, such as Shown in Fig. 3, step 102, simulation down operation download target packet to web site requests to be detected, can be carried out by following manner Implement:
Step 301, the preset coordinate for obtaining download function key and default screen resolution.
According to the difference of mobile phone screen, mobile phone resolution ratio is changed correspondingly, in order to equal in the mobile phone of different resolution Can accurate simulation down operation, need to adjust the trigger coordinate of down operation according to the change of mobile phone resolution ratio.
Acquisition modes include: to be obtained by network from website to be detected, and from local acquisition.
Step 302, according to current resolution, default resolution ratio and preset coordinate, calculate the practical seat of download function key Mark.
The calculation formula of the abscissa of actual coordinate is as follows:
The abscissa of (the horizontal pixel value of current resolution/default resolution ratio horizontal pixel value) * preset coordinate.
The calculation formula of the ordinate of actual coordinate is as follows:
The ordinate of (the longitudinal pixel value of longitudinal pixel value of current resolution/default resolution ratio) * preset coordinate.
Be illustrated below by an example: current resolution 320*480, presetting resolution ratio is 400*854, is preset Coordinate is (X1, Y1).Calculate actual coordinate (X2, Y2): X2=(320/400) * X1;Y2=(480/854)*Y1.
Step 303 generates down operation at actual coordinate.
Step 304 sends the downloading request that down operation triggers to default network, and downloading request is for from website to be detected Download target packet.
During this programme is realized, Monkeyrunner mechanism form is called to realize in starting electronic equipment by java Application market software, the electronic market software are the client application of website to be detected.
When realizing, needs to establish and example electronic device is established by software language, code is accomplished by
The method of wire-speed detection provided in an embodiment of the present invention can be simulated according to the resolution adjustment of electronic equipment and be downloaded The coordinate of operation makes the electronic equipment of different resolution that this method can be used, improves the scope of application of wire-speed detection.
It should be noted that the method for wire-speed detection provided in an embodiment of the present invention, is applied not only to a survey grid to be checked The speed of download for the target packet stood is detected, and the speed of the downloading to multiple target packets of a website is also used to Degree is detected, and is also used to detect the speed of download of multiple target packets of multiple websites.For each number of targets It is consistent with method shown in Fig. 1 according to the detection method of packet.
Further, for each target packet, in such a way that repeated detection is averaged, the data packet is obtained Average speed of download.If with to a website multiple target packets (as using a, using b, using c) speed of download Detected, then successively download target packet according to putting in order, when a down operation terminate and then according to arranging it is suitable Sequence carry out second of down operation, and so on realize repeated detection.If detecting number is 3 times, sequence circulation downloads certain All target packets in website to be detected three times (as using a, using b, using c, using a, using b, using c, using a, Using b, using c).
Further, if necessary to the downloading speed to multiple websites (such as website A, website B, website C, website D) to be detected Degree is detected, then according to all websites to be detected of number sequence cycle detection of detection.In general, the number of detection is 30 times.
The speed of download referred in this law people's embodiment is equal to network speed (network speed).
The embodiment of the invention also provides a kind of devices of wire-speed detection, as shown in figure 4, described device 41 includes:
First determination unit 411, for being determined for compliance with the target packet of current network type, the target packet is The data packet provided in website to be detected;
Analogue unit 412 downloads the target packet to web site requests to be detected for simulating down operation;
Recording unit 413, when for recording first when the down operation that the analogue unit 412 is simulated triggers Between;
Acquiring unit 414 obtains the target packet when for default waiting time after the first time Second time used in downloading data amount and downloading the downloading data amount;
Computing unit 415, the first time, the acquiring unit 414 for being recorded according to the recording unit 413 The data volume that second time and the target packet obtained has downloaded calculates network speed, and the network speed is used In the network speed for indicating the website to be detected described in the type of current network.
The device 41 of wire-speed detection provided by the invention can determine in website to be detected according to the type of current network Target packet simulates artificial down operation to web site requests to be detected and downloads target packet, while recording request downloading The first time of target packet when default waiting time after first time, obtains the downloading of the target packet Second time used in data volume and the downloading downloading data amount, according to first time, the second time and the target The data volume that data packet has been downloaded calculates network speed.In the prior art, it needs by manually extracting frame, detection efficiency is low.This In invention, by simulating artificial down operation, cost of labor can be saved.It is handled, be can be improved by electronic equipment The accuracy of detection lifts error existing for frame when overcoming artificial detection, while electronic equipment more manually has efficient data Processing capacity, and then improve the efficiency of detection.
Further, as shown in figure 5, described device 41 further includes the second determination unit 416, unit 417 is deleted, is received single Member 418, switch unit 419.
First determination unit 411 includes:
It determines subelement 4111, determines preset data packet size for the type according to current network;
First obtains subelement 4112, for obtaining packet information set, the packet information from website to be detected Gather the title and data volume size for indicating Downloadable data packet;
Subelement 4113 is searched, for obtaining the preset data packet size that subelement 4112 obtains according to described first It is searched and the immediate target packet of preset data packet size from the packet information set.
The device 41 of wire-speed detection provided in an embodiment of the present invention, can be determining and current according to the type of current network The size of the adaptable data packet of the type of network, searches the number being consistent with the size of the data packet from datagram message set It is used as target packet according to packet, and then reaches more targeted downloading, improves wire-speed detection efficiency.
Further, described device 41 further include:
Second determination unit 416, for determining default waiting time according to the type of the current network.
The embodiment of the present invention, can be according to network type by determining the default waiting time according to the type of current network The different default waiting time is arranged in difference, reaches the applicability for improving wire-speed detection.
Further, the acquiring unit 414 is also used to:
When the target packet, which has been downloaded, to be finished, the size and the target packet of the target packet are obtained Newest modification time, target packet is sized to downloading data amount by described, the newest modification is determined For the second time;
When the target packet, which is not downloaded, to be finished, the size that the target packet has been downloaded is obtained, by the mesh What mark data packet had been downloaded is sized to downloading data amount, and the newest modification time of the target packet is determined as the Two times.
The device 41 of wire-speed detection provided in an embodiment of the present invention can be downloaded according to target packet and finish situation, obtain The time used in the data volume that target packet has been downloaded and the data volume downloaded is taken, the standard of wire-speed detection is improved True property.
Further, described device 41 further include:
Unit 417 is deleted, for deleting the corresponding cache contents in the website to be detected and from the website to be detected In the data packet downloaded.
The device 41 of wire-speed detection provided in an embodiment of the present invention can be avoided network speed test by deleting cache contents When the target packet requested repeated with the data packet downloaded, improve the accuracy of wire-speed detection today.
Further, described device 41 further include:
Receiving unit 418, for receiving the network type designated order of user's triggering, the network type is formulated instruction and is used In describing default network type, the default network type is the network type used when detecting website network speed to be detected;
Switch unit 419, for switching to the default net when current network type and default network type be not identical Network type.
The device 41 of wire-speed detection provided in an embodiment of the present invention can be cut according to the network type designated order of user It is detected in network type needed for shifting to user.
Further, the analogue unit 412, comprising:
Second obtain subelement 4121, for obtain download function key preset coordinate and default screen resolution;
Computation subunit 4122, for obtaining the described pre- of the acquisition of subelement 4121 according to current resolution, described second If resolution ratio and preset coordinate, the actual coordinate of the download function key is calculated;
Subelement 4123 is generated, for generating downloading behaviour at the actual coordinate that the computation subunit 4122 calculates Make;
Transmission sub-unit 4124, for sending the downloading request that the down operation triggers, the downloading to default network Request is for downloading target packet from the website to be detected.
The device 41 of wire-speed detection provided in an embodiment of the present invention, under capable of being simulated according to the resolution adjustment of electronic equipment The coordinate for carrying operation makes the electronic equipment of different resolution that the present apparatus 41 can be used, improves the scope of application of wire-speed detection.
It is apparent to those skilled in the art that for convenience and simplicity of description, only with above-mentioned each function The division progress of module can according to need and for example, in practical application by above-mentioned function distribution by different function moulds Block is completed, i.e., the internal structure of device is divided into different functional modules, to complete all or part of function described above Energy.The specific work process of the system, apparatus, and unit of foregoing description, can be with reference to corresponding in preceding method embodiment Journey, details are not described herein.
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, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (8)

1. a kind of method of wire-speed detection, which is characterized in that the described method includes:
It is determined for compliance with the target packet of current network type, the target packet is the data provided in website to be detected Packet;
The preset coordinate of acquisition download function key and default screen resolution;
According to current resolution, the default screen resolution and preset coordinate, the practical seat of the download function key is calculated Mark;Wherein, the abscissa of the actual coordinate is by formula (the horizontal pixel value of current resolution/default resolution ratio cross To pixel value) abscissa of * preset coordinate obtains;The ordinate of the actual coordinate is by formula (current resolution Longitudinal pixel value/default resolution ratio longitudinal pixel value) ordinate of * preset coordinate obtains;
Down operation is generated at the actual coordinate;
The downloading request that the down operation triggers is sent to default network, and the downloading is requested for from the website to be detected Download target packet;
Record first time when down operation triggering;
When default waiting time after the first time, the amount of downloading data and the downloading institute of the target packet are obtained State the second time used in downloading data amount;Wherein, the default waiting time is determined according to the current network type , and the default waiting time is less than the time needed for the target packet is completed in downloading;
Network speed, institute are calculated according to the data volume that the first time, the second time and the target packet have been downloaded Network speed is stated for indicating the network speed of the website to be detected described in the type of current network;Wherein, described first when Between, the second time and the target packet be to execute shell-command by java code to obtain;
Wherein, the target packet for being determined for compliance with current network type, comprising:
Preset data packet size is determined according to the type of current network;
Packet information set is obtained from website to be detected, the packet information set is for indicating Downloadable data packet Title and data volume size;
It is searched from the packet information set according to the preset data packet size and is most connect with the preset data packet size Close target packet;
Before the target packet for being determined for compliance with current network type the step of, the method also includes:
The network type designated order of user's triggering is received, the network type designated order presets network type for describing, The default network type is the network type used when detecting website network speed to be detected;
If current network type and default network type be not identical, the default network type is switched to.
2. the method according to claim 1, wherein in the default waiting time after the first time When, the step of obtaining the amount of downloading data of the target packet and download the second time used in the downloading data amount Before, the method also includes:
Default waiting time is determined according to the type of the current network.
3. according to the method described in claim 2, it is characterized in that, the downloading data amount for obtaining the target packet The step of with the second time used in the downloading downloading data amount, comprising:
It is finished if the target packet has been downloaded, obtains the size and the target packet of the target packet The target packet is sized to downloading data amount by newest modification time, and the newest modification time is determined For the second time;
It is finished if the target packet is not downloaded, obtains the size that the target packet has been downloaded, by the target What data packet had been downloaded is sized to downloading data amount, and the newest modification time of the target packet is determined as second Time.
4. according to the method described in claim 3, it is characterized in that, in the target data for being determined for compliance with current network type Before the step of packet, the method also includes:
The data packet deleting the corresponding cache contents in the website to be detected and being downloaded from the website to be detected.
5. a kind of device of wire-speed detection, which is characterized in that described device includes:
First determination unit, for being determined for compliance with the target packet of current network type, the target packet is to be detected The data packet provided in website;
Analogue unit downloads the target packet to web site requests to be detected for simulating down operation;
Recording unit, for recording the first time when down operation triggering of the analogue unit simulation;
Acquiring unit obtains the downloading of the target packet when for default waiting time after the first time Second time used in data volume and the downloading downloading data amount;Wherein, the default waiting time is worked as according to What preceding network type determined, and the default waiting time is less than the time needed for the target packet is completed in downloading;
Computing unit, described for being obtained according to first times of the recording unit records, the acquiring unit The data volume that two times and the target packet have been downloaded calculates network speed, and the network speed is for indicating current The network speed of website to be detected described in the type of network;
First determination unit comprises determining that subelement, first obtain subelement and search subelement;
It determines subelement, determines preset data packet size for the type according to current network;
First obtains subelement, and for obtaining packet information set from website to be detected, the packet information set is used for Indicate the title and data volume size of Downloadable data packet;
Subelement is searched, for obtaining the preset data packet size that subelement obtains from the data packet according to described first It is searched and the immediate target packet of preset data packet size in information aggregate;
Receiving unit, for receiving the network type designated order of user's triggering, the network type designated order is for describing Default network type, the default network type are the network type used when detecting website network speed to be detected;
Switch unit, for switching to the default network type when current network type and default network type be not identical;
Wherein, analogue unit, comprising: second obtains subelement, computation subunit, generates subelement and transmission sub-unit;
Second obtain subelement, for obtain download function key preset coordinate and default screen resolution;
Computation subunit, for obtaining the default screen resolution that subelement obtains according to current resolution, described second And preset coordinate, calculate the actual coordinate of the download function key;
Subelement is generated, for generating down operation at the actual coordinate that the computation subunit calculates;
Transmission sub-unit, for sending the downloading request that the down operation triggers to default network, the downloading request is used for Target packet is downloaded from the website to be detected.
6. device according to claim 5, which is characterized in that described device further include:
Second determination unit, for determining default waiting time according to the type of the current network.
7. device according to claim 6, which is characterized in that the acquiring unit is also used to:
When the target packet, which has been downloaded, to be finished, the size and the target packet for obtaining the target packet are most The target packet is sized to downloading data amount, the newest modification time is determined as by new modification time Second time;
When the target packet, which is not downloaded, to be finished, the size that the target packet has been downloaded is obtained, by the number of targets It is sized to downloading data amount according to what packet had been downloaded, when the newest modification time of the target packet is determined as second Between.
8. device according to claim 7, which is characterized in that described device further include:
Unit is deleted, for deleting the corresponding cache contents in the website to be detected and under in the website to be detected The data packet of load.
CN201310343896.9A 2013-08-08 2013-08-08 The method and device of wire-speed detection Active CN104348680B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310343896.9A CN104348680B (en) 2013-08-08 2013-08-08 The method and device of wire-speed detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310343896.9A CN104348680B (en) 2013-08-08 2013-08-08 The method and device of wire-speed detection

Publications (2)

Publication Number Publication Date
CN104348680A CN104348680A (en) 2015-02-11
CN104348680B true CN104348680B (en) 2019-11-12

Family

ID=52503547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310343896.9A Active CN104348680B (en) 2013-08-08 2013-08-08 The method and device of wire-speed detection

Country Status (1)

Country Link
CN (1) CN104348680B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954197B (en) * 2015-04-29 2018-05-29 广东欧珀移动通信有限公司 Multitask transmission speed detection method and device
CN105306295B (en) * 2015-10-20 2018-04-27 浪潮软件集团有限公司 Network speed detection method and device
CN105553777B (en) * 2015-12-25 2019-06-21 北京奇虎科技有限公司 A kind of region network speed detection method and device
CN105681124B (en) * 2015-12-25 2019-05-21 北京奇虎科技有限公司 A kind of wire-speed detection method and device
CN108092837B (en) * 2016-11-21 2021-04-27 腾讯科技(深圳)有限公司 Network communication quality detection method, speed measurement server and network speed measurement plug-in
CN106851695B (en) * 2017-03-29 2021-03-09 北京小米移动软件有限公司 Method, device and system for testing network speed
CN109982358A (en) * 2019-04-11 2019-07-05 中国联合网络通信集团有限公司 The detection method of network speed, detection device, mobile terminal
CN112398702B (en) * 2019-08-12 2022-08-02 腾讯科技(深圳)有限公司 Speed measurement method and device, server and storage medium
CN115134274B (en) * 2022-05-19 2023-08-22 赛尔网络有限公司 Network speed measuring method and device, electronic equipment and storage medium
CN116614393B (en) * 2023-07-21 2023-11-28 中融云数(北京)技术有限公司 Weak network scene bandwidth estimation method and system based on RTC communication

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744529A (en) * 2004-08-31 2006-03-08 英业达股份有限公司 Automatic test method for multi web site performance
US7219145B2 (en) * 2001-05-30 2007-05-15 Qualcomm Incorporated Method and apparatus for individually estimating time required to download application programs to remote modules over wireless network
CN102882738A (en) * 2012-09-06 2013-01-16 北京奇虎科技有限公司 Method and device for detecting network access speed
CN103001829A (en) * 2012-12-14 2013-03-27 大唐移动通信设备有限公司 Testing method and device of network data transmission
CN103001835A (en) * 2012-12-29 2013-03-27 电信科学技术第一研究所 Network bandwidth test method and system based on data transmission

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE602005019332D1 (en) * 2004-12-24 2010-03-25 Aspera Inc Bulk data transfer
CN102761467B (en) * 2011-04-25 2016-03-30 腾讯科技(深圳)有限公司 Calculate the methods, devices and systems of browsing device net page download time

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7219145B2 (en) * 2001-05-30 2007-05-15 Qualcomm Incorporated Method and apparatus for individually estimating time required to download application programs to remote modules over wireless network
CN1744529A (en) * 2004-08-31 2006-03-08 英业达股份有限公司 Automatic test method for multi web site performance
CN102882738A (en) * 2012-09-06 2013-01-16 北京奇虎科技有限公司 Method and device for detecting network access speed
CN103001829A (en) * 2012-12-14 2013-03-27 大唐移动通信设备有限公司 Testing method and device of network data transmission
CN103001835A (en) * 2012-12-29 2013-03-27 电信科学技术第一研究所 Network bandwidth test method and system based on data transmission

Also Published As

Publication number Publication date
CN104348680A (en) 2015-02-11

Similar Documents

Publication Publication Date Title
CN104348680B (en) The method and device of wire-speed detection
CN104579822B (en) Mobile application automated performance testing system and method based on Http agreements
CN102629909B (en) Based on flow statistical method and the system of process
US9294945B2 (en) Test apparatus and test method
CN108307021B (en) Parallel following test equipment, cloud real machine and method for mobile terminal
CN105045620B (en) Measure the method and detection device of webpage head screen load time
CN108075934A (en) A kind of network quality monitoring method, apparatus and system
CN104113870B (en) Network test method and mobile terminal
CN104822159A (en) System and method for WLAN test of AP by simulating STA
CN106339273A (en) Application program restoration method, terminal and server
CN112584422B (en) Method and device for acquiring performance of 5G terminal
CN103581987B (en) The test method and device of the page download speed of mobile terminal device
CN111352836A (en) Pressure testing method and related device
CN113434101A (en) Device control method, device, storage medium, and electronic apparatus
CN112988608A (en) Data testing method and device, computer equipment and storage medium
CN104717670A (en) Business quality testing method, device and system
CN106301977A (en) The method and device that network tests the speed
US20180288636A1 (en) A method for automatic measurement of App load power consumption on mobile devices based on physical measurement
CN109922484B (en) Test method and test device
CN109842524A (en) Automatically updating method, device, electronic equipment and computer readable storage medium
CN109194706A (en) Internet resources dial testing method and terminal
CN110781084B (en) Method and device for determining stuck identification parameter, storage medium and electronic device
CN104244334B (en) A kind of method and apparatus for determining network service quality
US10198522B1 (en) Index of native application content indexable by a search engine
CN108291954A (en) The establishment system and its control method of wave condition map

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