CN107046694A - A kind of wifi speed-measuring methods and its system - Google Patents

A kind of wifi speed-measuring methods and its system Download PDF

Info

Publication number
CN107046694A
CN107046694A CN201710045630.4A CN201710045630A CN107046694A CN 107046694 A CN107046694 A CN 107046694A CN 201710045630 A CN201710045630 A CN 201710045630A CN 107046694 A CN107046694 A CN 107046694A
Authority
CN
China
Prior art keywords
read
website
speed
wifi
access time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710045630.4A
Other languages
Chinese (zh)
Inventor
邓裕强
段华周
潘国维
岳风顺
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GUANGZHOU CHENGSHANG COMPUTER TECHNOLOGY Co Ltd
Original Assignee
GUANGZHOU CHENGSHANG COMPUTER TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by GUANGZHOU CHENGSHANG COMPUTER TECHNOLOGY Co Ltd filed Critical GUANGZHOU CHENGSHANG COMPUTER TECHNOLOGY Co Ltd
Priority to CN201710045630.4A priority Critical patent/CN107046694A/en
Publication of CN107046694A publication Critical patent/CN107046694A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/08Testing, supervising or monitoring using real traffic

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides a kind of wifi speed-measuring methods, including:Whether monitoring mobile terminal network connects;It is connected respectively with default website and starts to read site resource;In default read access time, the resource size that each website is read is counted respectively;The resource size divided by actual read access time that each website is read, show that the velocity amplitude of resource is read in each website;After each website velocity amplitude is added, divided by Websites quantity draws an average speed value, and the average speed value is mobile terminal wifi network speed.The present invention efficiently can accurately test wifi network speed, meet the individual demand of user.The system that wifi tests the speed is realized present invention also offers a kind of.

Description

A kind of wifi speed-measuring methods and its system
Technical field
The present invention relates to network speed technical field of measurement and test, and in particular to a kind of wifi speed-measuring methods and its system.
Background technology
Generally, existing mobile terminal tests wifi speed not over the mode of loading site resource, it is impossible to Meet the individual demand of user.
The content of the invention
The purpose of the present invention, exactly overcoming the deficiencies in the prior art, there is provided a kind of accurate testing, the efficient wifi sides of testing the speed Method and its system, meet users ' individualized requirement.
In order to achieve the above object, adopt the following technical scheme that:A kind of wifi speed-measuring methods, methods described includes following step Suddenly:
Whether S1, monitoring mobile terminal network connect, if so, into step S2;If it is not, cycle detection;
S2, be connected respectively with default website and start read site resource;
S3, in default read access time, the resource size that each website is read is counted respectively;
S4, the resource size that each website is read divided by actual read access time, show that the velocity amplitude of resource is read in each website;
S5, each website velocity amplitude is added after, divided by Websites quantity draws an average speed value, and the average speed value is Mobile terminal wifi network speed.
Further, before step S1 is realized, methods described is further comprising the steps of:
Create and instantiate URL objects;
Create and instantiate HttpURLConnection objects, represent the connection to the remote object cited in URL.
Preferably, the concrete operations of the step S2~S4 are:
Set up the actual connection of remote object and read access time is set;
Obtain the inlet flow of connection and start timing;
The size of inlet flow is read, reads and terminates then to terminate timing;
End timing time subtracts beginning timing time and obtains actual read access time;
The size of inlet flow divided by actual read access time obtain the network speed of this URL connection.
Preferably, methods described is further comprising the steps of:
Each URL independent accesses 4 times, and 5 different URL are accessed successively.
To realize another object of the present invention, the present invention is also adopted the following technical scheme that:It is a kind of realize that wifi tests the speed be System, the system includes:
Monitoring unit, the connection for monitoring mobile terminal network;
Reading unit, site resource is read for being connected and starting with default website respectively;
Computing unit, in default read access time, the resource size that each website is read to be counted respectively;Each website is read The resource size divided by actual read access time taken, show that the velocity amplitude of resource is read in each website;After each website velocity amplitude is added, Divided by Websites quantity draws an average speed value, the average speed value is mobile terminal wifi network speed.
Further, the system also includes:
Creating unit, for creating and instantiating URL objects, creates and instantiates HttpURLConnection objects, table Show the connection of the remote object cited in URL.
Preferably, the reading unit sets up the actual connection to remote object and sets read access time;It is described to calculate single Member obtains the inlet flow of connection and starts timing;The size of inlet flow is read, reads and terminates then to terminate timing;Terminate timing time Subtract beginning timing time and obtain actual read access time;The size of inlet flow divided by actual read access time obtain this URL connection Network speed.
Preferably, each URL independent accesses of the reading unit 4 times, and 5 different URL are accessed successively.
Compared with prior art, the beneficial effects of the present invention are:The present invention is by monitoring whether mobile terminal network connects Connect;It is connected respectively with default website and starts to read site resource;In default read access time, each website is counted respectively and is read Resource size;The resource size divided by actual read access time that each website is read, show that the velocity amplitude of resource is read in each website; After each website velocity amplitude is added, divided by Websites quantity draws an average speed value, and the average speed value is mobile terminal Wifi network speed.The present invention efficiently can accurately test wifi network speed, meet the individual demand of user.
Brief description of the drawings
Fig. 1 is the structural representation that the embodiment of the present invention one realizes the system that wifi tests the speed;
Fig. 2 is the flow chart of the wifi speed-measuring methods of the embodiment of the present invention one;
Fig. 3 is the flow chart of the wifi speed-measuring methods of the embodiment of the present invention two.
Embodiment
Describe the present invention in detail below in conjunction with accompanying drawing and specific implementation method, the present invention schematic implementation and Illustrate for explaining the present invention, but it is not as a limitation of the invention.
Embodiment one
The present invention is to be based on mobile terminal Android system.
As shown in figure 1, a kind of realize the system that wifi tests the speed, the system includes:
Monitoring unit, the connection for monitoring mobile terminal network;
Reading unit, site resource is read for being connected and starting with default website respectively;
Computing unit, in default read access time, the resource size that each website is read to be counted respectively;Each website is read The resource size divided by actual read access time taken, show that the velocity amplitude of resource is read in each website;After each website velocity amplitude is added, Divided by Websites quantity draws an average speed value, the average speed value is mobile terminal wifi network speed;
As shown in Fig. 2 a kind of wifi speed-measuring methods, the described method comprises the following steps:
A kind of wifi speed-measuring methods, the described method comprises the following steps:
S101:Whether monitoring mobile terminal network connects, if so, into step S102;If it is not, cycle detection;
S102:It is connected respectively with default website and starts to read site resource;
S103:In default read access time, the resource size that each website is read is counted respectively;
S104:The resource size divided by actual read access time that each website is read, show that the speed of resource is read in each website Value;
S105:After each website velocity amplitude is added, divided by Websites quantity draws an average speed value, the average speed value For mobile terminal wifi network speed.
The present invention efficiently can accurately test wifi network speed, meet the individual demand of user.
Embodiment two
The present embodiment be the same as Example one in addition to following characteristics:
A kind of to realize the system that wifi tests the speed, the system bag is also included:
Creating unit, for creating and instantiating URL objects, creates and instantiates HttpURLConnection objects, table Show the connection of the remote object cited in URL;
The reading unit sets up the actual connection to remote object and sets read access time;The computing unit, which is obtained, to be connected The inlet flow that connects simultaneously starts timing;The size of inlet flow is read, reads and terminates then to terminate timing;Terminate timing time and subtract beginning Timing time obtains actual read access time;The size of inlet flow divided by actual read access time obtain the network speed of this URL connection;
The each URL independent accesses of the reading unit 4 times, and 5 different URL are accessed successively, when can obtain this section Between average network speed.
As shown in figure 3, a kind of wifi speed-measuring methods, the described method comprises the following steps:
S201:Create and instantiate URL objects;
S202:Create and instantiate HttpURLConnection objects, represent the company to the remote object cited in URL Connect;
S203:Set up the actual connection of remote object and read access time is set;
S204:Connection response code is obtained, if 200, then successful connection is represented;
S205:Obtain the inlet flow of connection and start timing;
S206:The size of inlet flow is read, reads and terminates then to terminate timing;
S207:End timing time subtracts beginning timing time and obtains actual read access time;
S208:The size of inlet flow divided by actual read access time obtain the network speed of this URL connection;
S209:Disconnect;
S210:Each URL independent accesses 4 times, and 5 different URL are accessed successively, to obtain averagely net this period Speed.
The present embodiment statistical average network speed again after multiple independent access, to ensure the accuracy of data.
If the function described in the present embodiment realized using in the form of SFU software functional unit and as independent production marketing or In use, can be stored in a computing device read/write memory medium.Understood based on such, the embodiment of the present invention is to existing The part for having part that technology contributes or the technical scheme can be embodied in the form of software product, software production Product are stored in a storage medium, including some instructions are to cause a computing device (can be personal computer, service Device, mobile computing device or network equipment etc.) perform all or part of step of each of the invention embodiment methods described.And Foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory Device (RAM, Random Access Memory), magnetic disc or CD etc. are various can be with the medium of store program codes.This explanation The embodiment of each in book is described by the way of progressive, what each embodiment was stressed be it is different from other embodiments it Place, between each embodiment same or similar part mutually referring to.
The foregoing description of the disclosed embodiments, enables professional and technical personnel in the field to realize or using the present invention. A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The most wide scope caused.

Claims (8)

1. a kind of wifi speed-measuring methods, it is characterised in that the described method comprises the following steps:
Whether S1, monitoring mobile terminal network connect, if so, into step S2;If it is not, cycle detection;
S2, be connected respectively with default website and start read site resource;
S3, in default read access time, the resource size that each website is read is counted respectively;
S4, the resource size that each website is read divided by actual read access time, show that the velocity amplitude of resource is read in each website;
S5, each website velocity amplitude is added after, divided by Websites quantity draws an average speed value, the average speed value
For mobile terminal wifi network speed.
2. wifi speed-measuring methods as claimed in claim 1, it is characterised in that before step S1 is realized, methods described also includes Following steps:
Create and instantiate URL objects;
Create and instantiate HttpURLConnection objects, represent the connection to the remote object cited in URL.
3. wifi speed-measuring methods as claimed in claim 2, it is characterised in that the concrete operations of the step S2~S4 are:
Set up the actual connection of remote object and read access time is set;
Obtain the inlet flow of connection and start timing;
The size of inlet flow is read, reads and terminates then to terminate timing;
End timing time subtracts beginning timing time and obtains actual read access time;
The size of inlet flow divided by actual read access time obtain the network speed of this URL connection.
4. wifi speed-measuring methods as claimed in claim 3, it is characterised in that methods described is further comprising the steps of:
Each URL independent accesses 4 times, and 5 different URL are accessed successively.
5. a kind of realize the system that wifi tests the speed, it is characterised in that the system includes:
Monitoring unit, the connection for monitoring mobile terminal network;
Reading unit, site resource is read for being connected and starting with default website respectively;
Computing unit, in default read access time, the resource size that each website is read to be counted respectively;Each website is read Resource size divided by actual read access time, show that the velocity amplitude of resource is read in each website;After each website velocity amplitude is added, divided by Websites quantity draws an average speed value, and the average speed value is mobile terminal wifi network speed.
6. realize the system that wifi tests the speed as claimed in claim 5, it is characterised in that the system also includes:
Creating unit, for creating and instantiating URL objects, creates and instantiates HttpURLConnection objects, represent The connection of remote object cited in URL.
7. realize the system that wifi tests the speed as claimed in claim 6, it is characterised in that the reading unit is set up to long-range right The actual connection of elephant simultaneously sets read access time;The computing unit obtains the inlet flow of connection and starts timing;Read inlet flow Size, read terminate then terminate timing;End timing time subtracts beginning timing time and obtains actual read access time;Inlet flow Size divided by actual read access time obtain the network speed of this URL connection.
8. realize the system that wifi tests the speed as claimed in claim 7, it is characterised in that each URL of reading unit is independent Access 4 times, and access 5 different URL successively.
CN201710045630.4A 2017-01-22 2017-01-22 A kind of wifi speed-measuring methods and its system Pending CN107046694A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710045630.4A CN107046694A (en) 2017-01-22 2017-01-22 A kind of wifi speed-measuring methods and its system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710045630.4A CN107046694A (en) 2017-01-22 2017-01-22 A kind of wifi speed-measuring methods and its system

Publications (1)

Publication Number Publication Date
CN107046694A true CN107046694A (en) 2017-08-15

Family

ID=59542935

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710045630.4A Pending CN107046694A (en) 2017-01-22 2017-01-22 A kind of wifi speed-measuring methods and its system

Country Status (1)

Country Link
CN (1) CN107046694A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102056212A (en) * 2009-11-05 2011-05-11 中国移动通信集团山东有限公司 Method for detecting internet speed and network side equipment
CN102264063A (en) * 2011-07-29 2011-11-30 中兴通讯股份有限公司 Mobile terminal and method for self-adaptively improving download rate of mobile terminal
CN102315986A (en) * 2011-08-31 2012-01-11 百度在线网络技术(北京)有限公司 Method for determining network rate of mobile terminal and equipment
CN102752170A (en) * 2012-06-29 2012-10-24 福建富士通信息软件有限公司 Network speed testing method
CN105188083A (en) * 2015-08-25 2015-12-23 广东欧珀移动通信有限公司 Method and device for testing application downloading speed of intelligent terminal and intelligent terminal
CN105681124A (en) * 2015-12-25 2016-06-15 北京奇虎科技有限公司 Network speed detection method and device
CN105978754A (en) * 2016-05-13 2016-09-28 中国联合网络通信集团有限公司 Network quality detection method and gateway equipment
CN106301977A (en) * 2015-05-22 2017-01-04 中兴通讯股份有限公司 The method and device that network tests the speed

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102056212A (en) * 2009-11-05 2011-05-11 中国移动通信集团山东有限公司 Method for detecting internet speed and network side equipment
CN102264063A (en) * 2011-07-29 2011-11-30 中兴通讯股份有限公司 Mobile terminal and method for self-adaptively improving download rate of mobile terminal
CN102315986A (en) * 2011-08-31 2012-01-11 百度在线网络技术(北京)有限公司 Method for determining network rate of mobile terminal and equipment
CN102752170A (en) * 2012-06-29 2012-10-24 福建富士通信息软件有限公司 Network speed testing method
CN106301977A (en) * 2015-05-22 2017-01-04 中兴通讯股份有限公司 The method and device that network tests the speed
CN105188083A (en) * 2015-08-25 2015-12-23 广东欧珀移动通信有限公司 Method and device for testing application downloading speed of intelligent terminal and intelligent terminal
CN105681124A (en) * 2015-12-25 2016-06-15 北京奇虎科技有限公司 Network speed detection method and device
CN105978754A (en) * 2016-05-13 2016-09-28 中国联合网络通信集团有限公司 Network quality detection method and gateway equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YANZI1225627: "Android网络:HTTP之利用HttpURLConnection访问网页、获取网络图片实例", 《CSDN》 *

Similar Documents

Publication Publication Date Title
TW201939404A (en) Method and apparatus for information recommendation, and device
CN106919611B (en) Product information pushing method and device
US10346496B2 (en) Information category obtaining method and apparatus
CN105446975B (en) A kind of file packing method and device
CN103514084B (en) The method of testing of reflection computer equipment hard-disk read-write energy efficiency
CN107092678B (en) Method, device and equipment for acquiring application activity degree
CN109598526B (en) Method and device for analyzing media contribution
CN104021070B (en) A kind of intelligent terminal software bag method of testing, device and system
CN110750433A (en) Interface test method and device
CN111159042A (en) Fluency testing method and device and electronic equipment
CN106161133A (en) The method of testing of a kind of web page loading time and device
CN104090908A (en) Method and device for counting mean detention time in page group and generalizing content in website
CN105653550B (en) Webpage filtering method and device
CN105723410A (en) Method and system for displaying house resources in real estate network
CN103595747A (en) User-information recommending method and system
CN107766230A (en) A kind of method and apparatus tested based on configuration file
CN104238960B (en) Formatting hard disk method and data block storage method and device based on hard disk
CN109254904A (en) A kind of database pressure surveys method, apparatus and electronic equipment
CN109325015A (en) A kind of extracting method and device of the feature field of domain model
CN110399026B (en) Multi-source single-output reset method and device based on FPGA and related equipment
CN107046694A (en) A kind of wifi speed-measuring methods and its system
CN107395447A (en) Module detection method, power system capacity predictor method and corresponding equipment
CN104375871B (en) A kind of method and apparatus based on the start of eMMC acceleration systems
CN108021464B (en) Bottom-pocketing processing method and device for application response data
CN114285896B (en) Information pushing method, device, equipment, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information

Address after: 510055, tower 17, A tower, Zhonghua International Center, No. three, 33 Zhongshan Road, Yuexiu District, Guangdong, Guangzhou, China

Applicant after: GUANGZHOU GOMO SHIJI TECHNOLOGY Co.,Ltd.

Address before: 510055, tower 17, A tower, Zhonghua International Center, No. three, 33 Zhongshan Road, Yuexiu District, Guangdong, Guangzhou, China

Applicant before: GUANGZHOU CHENGSHANG COMPUTER TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170815

RJ01 Rejection of invention patent application after publication