The content of the invention
The present invention provides a kind of terminal computer actual bandwidth remote centralized acquisition system and method, and it can pass through silence fortuneLine mode realizes the actual bandwidth of automatic concentrated collection terminal computer.
To solve the above problems, the present invention is achieved by the following technical solutions:
Terminal computer actual bandwidth remote centralized acquisition method, comprises the following steps:
Step 1, the IP address range for setting in WEB server this to gather, while being initiated to remote collection serverRemote collection order;
Step 2, remote collection server are after the remote collection order that WEB server is sent is received, from acquisition rangeStart ip address starts to issue bandwidth acquisition instructions to terminal computer successively, until the end ip address of acquisition range;
Step 3, terminal computer start the work that tests the speed after the bandwidth acquisition instructions that remote collection server is sent are receivedMake;
Step 3.1, terminal computer obtain the token that tests the speed to remote collection server;Meanwhile, terminal computer also can be to long-rangeAcquisition server get IP address, login username and the password of ftp server, the terminal computer region network bandwidth andDownload file name information;
Step 3.2, terminal computer log in ftp server, start timing, and under ftp server downloading files, fileTiming terminates after the completion of load;
Step 3.3, terminal computer tentatively judge whether its bandwidth rates is up to standard according to its region network bandwidth;IfNot up to standard, then return to step 3.2, carry out FTP and test the speed again;If up to standard, step 3.4 is performed;
Step 3.4, terminal computer are matched somebody with somebody time started, end time, download file size, bandwidth rates and hardware is downloadedConfidence breath is uploaded to remote collection server;
Step 4, remote collection server are being received after terminal computer measurement data reports, by the measurement data of terminal computerIt is directly placed into message queue;
Whether there is the terminal computer measurement data reported in the regular query messages queue of step 5, remote collection server;OneDenier message queue has the terminal computer measurement data reported, then is taken out from message queue, and in write into Databasce, this bandwidthCollecting work is completed.
Following process is still further comprised in above-mentioned steps 2:The terminal computer of shutdown will not perform the collection of this bandwidth.
Following process is still further comprised in above-mentioned steps 3.1:When the terminal computer quantity actually tested the speed is more than settingDuring the threshold value that tests the speed simultaneously, terminal computer can be waited, at regular intervals, and terminal computer can all be obtained to remote collection server and surveyedFast token, until successfully obtaining the token that tests the speed.
Following process is still further comprised in above-mentioned steps 3.3:If the number of times that FTP tests the speed resurveys threshold value more than settingWhen, the bandwidth rates of terminal computer are still below standard, then terminate the work of testing the speed that the terminal computer is gathered in this bandwidth.
Following process is still further comprised in above-mentioned steps 3.4:The file of download is deleted from computer terminal.
After above-mentioned steps 5, following steps are still further comprised:
Step 6, zone bandwidth and terminal bandwidth are carried out to bandwidth collection result analyze, and list problem area accordingly and askTerminal is inscribed, is rectified and improved by attendant.
The terminal computer actual bandwidth remote centralized acquisition system of the above method is realized, is taken by remote collection server, FTPBusiness device and terminal computer composition;Remote collection server, ftp server and terminal computer are realized by WEB server and connected.FarJourney acquisition server issues bandwidth acquisition instructions to terminal computer, and after terminal computer measurement data is reported, by terminal computerMeasurement data be directly placed into message queue;In addition, whether there is the terminal computer reported to survey in also regular query messages queueFast data;Once message queue has the terminal computer measurement data reported, then taken out from message queue, and write into DatabasceIn.Ftp server provides the file for testing the speed to terminal computer.Terminal computer obtains order of testing the speed to remote collection serverBoard, the IP address of ftp server, login username and password, the terminal computer region network bandwidth and download filename letterBreath, and tested the speed from ftp server downloading files;It will tentatively judge its bandwidth according to its region network bandwidth simultaneouslyWhether speed is up to standard;And the final result that tests the speed is uploaded to remote collection server.
Compared with prior art, the present invention has following features:
1st, using the actual bandwidth of automated manner concentrated collection terminal computer, whole process need not be participated in manually, canThe concurrent quantity of control of intelligent terminal remote collection, the terminal for being unsatisfactory for bandwidth minimum requirements is retested automatically, ensures collectionThe accuracy of data;
2nd, the silent method of operation of collection client, terminal computer is detectable completely, on user and business without influence;
3rd, according to the height of the network bandwidth, intelligent selection downloads size and the intelligent control download time of file;
4th, analysis expert program is contrasted and analyzed to the measurement data largely collected, is quickly recognized and is unsatisfactory for netComputer terminal computer and Administrative Area that speed is required.
Embodiment
The problem of in order to solve to be tested the speed automatically, the present invention devises server service, client service and tested the speedClient.Test the speed, initiated by terminal computer actual bandwidth remote centralized acquisition system server service, to LAN each timeInterior all Windows computer terminals send the instruction that bandwidth tests the speed, and operation has independently developed Windows to take on computer terminalBusiness, tests the speed after instruction receiving bandwidth, and the operation client that tests the speed starts bandwidth and tested the speed, it is no longer necessary to run manually in clientFTP orders are manually tested the speed, and solve the problem of a large amount of computer terminals can not be tested the speed automatically.Specifically, it is of the inventionA kind of designed terminal computer actual bandwidth remote centralized acquisition method, referring to Fig. 1, comprises the following steps:
Step 1, the IP address range for setting in the five application page of WEB server this to gather, are pressed while clicking on collectionButton initiates remote collection order to remote collection server.
Step 2, the operation bandwidth collection service on remote collection server, after remote collection order is received, from collectionThe start ip address of scope starts to issue bandwidth acquisition instructions to client successively, until the end ip address of acquisition range.
Step 3, the bandwidth run on computer terminal gather client after the bandwidth acquisition instructions of server are receivedStart work of testing the speed;Referring to Fig. 2.
Step 3.1, the user end to server that tests the speed obtain the token that tests the speed, when the client terminal quantity actually tested the speed is more than 5When (test the speed maximum while parameter setting), the client that tests the speed can be waited, every 1 minute, and the client that tests the speed all can be to serviceDevice obtains the token that tests the speed, until successfully obtaining the token that tests the speed, while can also get the IP address of ftp server, login userThe information such as name and password, this client region network bandwidth, download filename.
Design control client is while the function for the quantity that tests the speed, client is defined by parameter setting on server serviceTest the speed quantity maximum simultaneously at end, and the client that tests the speed obtains the token that tests the speed, when the client that tests the speed is more than maximumAfterwards, the others client that tests the speed can only obtain wait token, and client obtained the token that tests the speed to server again every 1 minute,Just start to test the speed until getting the token that tests the speed, so as to avoid the bottleneck of server-side network congestion, ensure server-side networkIt is smooth, meet the accuracy that bandwidth tests the speed.
Step 3.2, the client that tests the speed log in ftp server, and the client that tests the speed starts timing, and above and below ftp serverTiming terminates after the completion of published article part, file download.
Step 3.3, the client that tests the speed judge the bandwidth rates of this client according to this client region network bandwidthWhether up to standard, random start carries out FTP and tested the speed again within 1-5 minutes if not up to standard, and FTP sentences again after the completion of testing the speedWhether disconnected speed is up to standard, if not up to standard always, at most will retry 5 FTP and tests the speed, the visitor still not up to standard that tests the speed after retrying for 5 timesTerminate this work of testing the speed in family end.
Intelligent retray function is devised in client testing the speed, according to test the speed result and the bandwidth requirement to this computer terminalJudge whether to meet bandwidth requirement, once tested the speed again at random in 5 minutes if not meeting, if continuous 5 times are tested the speedAs a result it can not all reach that bandwidth requirement just terminates to test the speed, and judges that the computer terminal has network problem, so as to avoid erroneous judgementThe appearance of client bandwidth problem.
Step 3.4, the client that tests the speed will download time started, end time, download file size, bandwidth rates, computerThe information such as terminal hardware configuration are uploaded to remote collection server, and the file of download is deleted from computer terminal.
Web Service services in step 4, remote collection server are being received after client measurement data reports, willClient measurement data is directly placed into message queue.
Database write-in functions based on message queue technology, server service is first by substantial amounts of bandwidth measurement dataIt is cached in message queue, then is read one by one and in write into Databasce from message queue, it is to avoid due to database write-in propertyEnergy problem causes the problem of measurement data can not be preserved so that server can preserve substantial amounts of bandwidth measurement data in time.
Whether have what is reported in the collection service query messages queue per minute run in step 5, remote collection serverClient measurement data, if so, just taken out from message queue, and in write into Databasce, this bandwidth collecting work is completeInto.
Step 6, zone bandwidth and terminal bandwidth are carried out to bandwidth collection result analyze, and list problem area accordingly and askTerminal is inscribed, is rectified and improved by attendant.
Administrative Area bandwidth analysis, the of that month measurement data of corresponding computer terminal is inquired by Administrative Area, ifThe bandwidth rates of computer terminal meet requirement (O&M experience of each Administrative Area according to network O&M personnel of the Administrative AreaSetting), then the network bandwidth of the Administrative Area meets and applies needs, is otherwise unsatisfactory for the need for applying, is problem Administrative Area;
Computer terminal bandwidth analysis, inquires the of that month measurement data in computer terminal, if the bandwidth speed of certain computer terminalRate is all unsatisfactory for the requirement of the Administrative Area where it, while the hardware configuration according to the computer terminal is converted into a bandwidth mostLow to require, if bandwidth rates are still unsatisfactory for requiring, the computer terminal is problem terminal.
Analysis expert function is developed, according to the O&M experience of network O&M personnel, analysis model is set up, to the bandwidth of magnanimityMeasurement data is analyzed, and obtains network speed slow computer terminal and Administrative Area excessively.
The present invention uses the actual bandwidth of automated manner concentrated collection terminal computer, and whole process need not be participated in manually,It is capable of the concurrent quantity of control of intelligent terminal remote collection, the terminal for being unsatisfactory for bandwidth minimum requirements is retested automatically, ensuresThe accuracy of gathered data, analysis expert program is contrasted and analyzed to the measurement data largely collected, is quickly recognizedIt is unsatisfactory for the terminal computer of network speed requirement.
The terminal computer actual bandwidth remote centralized acquisition system of the above method is realized, as shown in figure 3, being taken by remote collectionBusiness device, ftp server and terminal computer composition.The system is arranged on two-server, wherein a server takes for FTPBusiness device, FTP service is installed thereon, and there is provided the file download of tri- kinds of sizes of 20M, 50M and 100M;Another server is remotely to adoptCollect server, windows messaging service, deployment Web Service services and Web service, windows messaging clothes are installed thereonBusiness, deployment Web Service services provide acquisition FTP log-on messages and measurement data upload offer service for the client that tests the speed,Web service provides system administration and measurement data analysis and inquiry service.Terminal computer is the desktop terminal of bandwidth to be collected.FarJourney acquisition server, ftp server and terminal computer are realized by WEB server and connected.
Remote collection server issues bandwidth acquisition instructions to terminal computer, and after terminal computer measurement data is reported,The measurement data of terminal computer is directly placed into message queue;In addition, whether having what is reported in also regular query messages queueTerminal computer measurement data;Once message queue has the terminal computer measurement data reported, then taken out from message queue, and writeEnter in database;
Ftp server provides the file for testing the speed to terminal computer;
Terminal computer obtains the token that tests the speed, the IP address of ftp server, login username and close to remote collection serverCode, the terminal computer region network bandwidth and download file name information, and tested the speed from ftp server downloading files;It will tentatively judge whether its bandwidth rates is up to standard according to its region network bandwidth simultaneously;And be uploaded to the final result that tests the speedRemote collection server.
The design and development of terminal computer actual bandwidth remote centralized acquisition system mainly employs ftp file transmission associationView, Web Service technologies and message queue this 3 kinds of technologies, realize that the network bandwidth is gathered by File Transfer Protocol, use WebService interface realizes that the data of bandwidth collection are uploaded onto the server, and ensures that bandwidth gathered data can be write using message queueEnter database.
Ftp file transfer protocol:FTP (File Transfer Protocol, FTP) is ICP/IP protocolOne of agreement in group.File Transfer Protocol includes two parts, and one is ftp server, secondly being ftp client.WhereinFtp server is used for storage file, and user can use ftp client to access the money being located on ftp server by File Transfer ProtocolSource.When website is developed, generally webpage or program are passed on Web server using File Transfer Protocol.Further, since FTP is passedDefeated efficiency is very high, in the big file of transmission over networks, typically also using the agreement (quoting word to go out to Baidupedia).
Web Service technologies:Web Service technologies, can make it that the different application operated on different machines need notBy additional, special third party software or hardware, so that it may be exchanged with each other data or integrated.According to Web Service specificationsBetween the application of implementation, no matter what language, platform or internal agreement used in them be, can be exchanged with each other data.Web Service are self-described, self-contained available network module, can perform specific business function.Web ServiceDeployment is easy to, because they are based on some conventional industry standards and some existing technologies, such as standard generalized markupSubset X ML, HTTP under language.Web Service reduce the cost of application interface.Web Service be whole enterprise veryThe integrated of operation flow between to multiple tissues provides a general mechanism (quoting word to go out to Baidupedia).
Message queue:Message queue is the container for depositing message, and it provides Asynchronous Invocation, it is allowed to a large amount of messageQueue is rapidly put into, but does not immediately treat it, goes to handle them again when processing is needed, even if handling entering for messageJourney fails, and the message in message queue will not also lose, after treatment progress recovers, and message continues to be processed, and is that data are passedDefeated and exchange provides the mechanism of a High Availabitity.
In order to ensure terminal computer has stable, reliable, rational actual bandwidth, to meet enterprise-level information systemPractical demand, the actual conditions of the invention by analyzing existing network and terminal computer are proposed using record, statistics, dividedThe method for analysing FTP speeds of download, realizes the concentrated collection to bandwidth information and the monitoring to terminal computer bandwidth.The system canTerminal computer bandwidth problem is found in time, traditional passive maintenance mode is changed, and improves Consumer's Experience sense and client is fullMeaning degree.