CN107347013A - A kind of network measure method, system and measuring machine based on strategy - Google Patents
A kind of network measure method, system and measuring machine based on strategy Download PDFInfo
- Publication number
- CN107347013A CN107347013A CN201610290565.7A CN201610290565A CN107347013A CN 107347013 A CN107347013 A CN 107347013A CN 201610290565 A CN201610290565 A CN 201610290565A CN 107347013 A CN107347013 A CN 107347013A
- Authority
- CN
- China
- Prior art keywords
- measurement
- task
- target
- measuring machine
- strategy
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0893—Assignment of logical groups to network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/145—Network analysis or design involving simulating, designing, planning or modelling of a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present invention provides a kind of network measure method, system and measuring machine based on strategy, and for measuring task configuration to measuring machine so that testing tool performs measurement task, the network measure method based on strategy includes:Obtain the measurement configuration information of measurement task associated with user's request on the measuring machine;The measurement configuration information of the measurement task includes measurement target, scheduling strategy, and/or measurement parameter;Target Assignment will be measured to the measuring machine to generate measuring machine and measure the measurement relation between target according to the scheduling strategy, and be each measuring machine generation measurement target configuration file;By actively sending file acquisition request to obtain measurement task, the survey tool is called to perform the measurement task to obtain measurement result data.The present invention configures simple and flexible in measurement task, realizes that measurement target is distributed automatically with measuring machine, reduces cost on network communication;Carrying out resource isolation avoids concurrent tasks from disturbing, and height autgmentability.
Description
Technical field
The invention belongs to technical field of communication network, is related to a kind of measuring method and system, more particularly to it is a kind of based on strategy
Network measure method, system and measuring machine.
Background technology
Since internet is born, Network Measurement Technologies also produce therewith.In order to which the behavioural characteristic of modern the Internet network is appreciated and understood
With performance, guarantee and the sound development for improving existing network service quality, promotion internet and information infrastructure, people
Do not stop the various methods of research network measure.
Legacy network measurement object measures for Internet mostly, as the transmission delay of network link, packet loss, network are opened up
Flutter structure, route etc..With the popularization of the applications such as the development of internet, web, multimedia, DNS, HTTP, net cast,
The application layer network measure such as video request program is imperative.
The network measure duration is grown, and measuring node Numerous, the network node number being related to is more, and network measure object is more
Sample is complicated, and measurement is required to configuration and simplified, and distribution automation is highly expansible.
NIMI (National Internet Measurement Infrastructure) project utilizes ping, the work such as tracerute, mtrace
Tool carries out active measurement, and it is a Measurement infrastructure that can carry out Layge-scale Internet measurement, creates a general framework,
It is with good expansibility, the survey tool needed for oneself can be neatly added on bottom architecture.
DNMAI (Distributed Network Measurement and Analysis Infrastructure) is had pointed out in the prior art
Method, that is, there is the distributed network measurement architecture of very strong pardon, measurement and analytical plan can be customized according to user's request,
To solve the problems, such as flexibly to be applicable scene and scalability.
Existing Measure Architecture is primarily present following deficiency:
1st, measure target and measuring machine distribution is dumb
NIMI proposes grid measurement, i.e., each target measures to other all targets in architecture in Measure Architecture,
This mode has following limitation:
1) measurement scheme can not be formulated according to user's request;
2) measurement target is only confined in Measure Architecture;
3) Domestic Carriers network is complicated, and network connectivty is poor between the small operation such as movement, length and width, education network, or even with operation not
It is also poor with the connectedness between province.
2nd, measurement efficiency is low, and concurrent efficiency is low or does not support concurrent, unrealized resource isolation;
Although the 3, existing network Measure Architecture and its implementation can customize measurement scheme according to user's request, user is needed
Manually configuration measurement target and the measurement relation of measuring machine in xml document, because network measure scale is big, are related to measurement target
More with measuring machine quantity, human configuration workload is big.
Therefore, a kind of network measure method, system and measuring machine based on strategy how are provided, to solve entering in the prior art
Human configuration measurement target and the measurement relation of measuring machine are needed during row network measure, but if running into larger network, its
It is related to the more measurement target of data and measuring machine, then the defects of human configuration workload is big is will result in, it is real to turn into ability
Domain practitioner technical problem urgently to be resolved hurrily.
The content of the invention
In view of the above the shortcomings that prior art, it is an object of the invention to provide it is a kind of based on strategy network measure method,
System and measuring machine, for solving need during network measure the measurement of human configuration measurement target and measuring machine in the prior art
Relation, but if running into larger network, it is related to the more measurement target of data and measuring machine, then will result in
The problem of human configuration workload is big.
In order to achieve the above objects and other related objects, one aspect of the present invention provides a kind of network measure method based on strategy, uses
Configured in measuring task to measuring machine so that the testing tool in measuring machine performs measurement task, the network based on strategy
Measuring method comprises the following steps:Obtain the measurement configuration information of measurement task associated with user's request on the measuring machine;
The measurement configuration information of the measurement task includes measurement target, scheduling strategy, and/or measurement parameter;According to the scheduling strategy
Target Assignment will be measured to the measuring machine to generate measuring machine and measure the measurement relation between target, and be each measurement
Machine generation measurement target configuration file;By actively sending file acquisition request to obtain measurement task, and call the measurement work
Have to perform the measurement task to obtain measurement result data.
It is described that Target Assignment will be measured to the measuring machine to generate survey according to the scheduling strategy in one embodiment of the invention
Amount machine and the measurement relation of measurement target, and include for the step of each measuring machine generation measurement target configuration file:Read
And parse the measurement configuration information of the measurement task;Judge whether the measurement configuration information is the first measurement target, if so,
The described first measurement target is directly put into a task pool to buffer, parses the scheduling strategy, will be surveyed using the scheduling strategy
Amount Target Assignment gives corresponding measuring machine to generate measuring machine and measure the measurement relation between target, according to the measurement relation of generation,
Measurement parameter is each measuring machine generation measurement target configuration file, into rest period;If it is not, renewal measurement configuration information,
Measurement configuration information after renewal is put into a measurement goal task queue, the measurement goal task queue is traveled through, judges institute
It is that the second measurement target is still the 3rd measurement target to state measurement configuration information in measurement goal task queue, if the second measurement mesh
Mark, loading described second measures target to the task pool to update the task pool, into rest period;If the 3rd measurement mesh
Mark, loading the described 3rd measures target to the task pool to update the task pool, into rest period;Traveling through the measurement
While goal task queue, parallel perform parses the scheduling strategy, using the scheduling strategy will measure Target Assignment to pair
For the measuring machine answered to generate measuring machine and measure the measurement relation between target, measurement relation, measurement parameter according to generation are every
The one measuring machine generation measurement target configuration file, into rest period.
In one embodiment of the invention, the first measurement target is IP lists or domain name list;Described second, which measures target, is
HTTP interface;The 3rd measurement target is tables of data.
In one embodiment of the invention, the periodicity sends file acquisition request to obtain measurement task, and calls the survey
Amount instrument performs the measurement task to include the step of obtaining measurement result data:File acquisition request is periodically sent to obtain
The measurement configuration information of measurement task is taken, the measurement configuration information includes parsing script, data assembling script and measurement task
Resource quota;Judge whether the parsing script and data assembling script update;If so, the renewal parsing script and data
Script is assembled, and judges whether the survey tool needs to update;If it is not, directly judging whether the survey tool needs to update;
If so, output reconfigures the order of the survey tool, the parsing script of the renewal is called to parse the measurement configuration information,
And task pool is put it into buffer, travel through the task pool;If it is not, being directly entered rest period, returned after rest period terminates
The step of traveling through the task pool;Measurement task is read according to the resource quota of each measurement task, and extracted from the task pool
The measurement task;Call the survey tool to perform the measurement task to obtain measurement result data, appoint having performed test
The measurement result data are assembled to be encapsulated into the measurement knot of user's request data format using data assembling script after business
Fruit data.
In one embodiment of the invention, the scheduling strategy includes the quantity of the measuring machine, the combination of allocation strategy and row
Except the combination of strategy.
In one embodiment of the invention, the allocation strategy includes:It is randomly assigned strategy, point combined according to geographic region
With strategy, with operator with province strategy, with the big regional strategy of operator, specified carrier policy, each province operator point
With strategy, with each province allocation strategy of operator, and/or whole allocation strategies.
Another aspect of the present invention provide it is a kind of based on strategy network measuring system, for measuring machine is measured task configuration with
Just testing tool performs measurement task, and the network measuring system based on strategy includes:Control centre, for acquisition and user
The measurement configuration information of the associated measurement task of demand, the measurement configuration information of the measurement task include measurement target, adjusted
Degree strategy, and/or measurement parameter;And according to the scheduling strategy will measure Target Assignment to the measuring machine with generate measuring machine with
The measurement relation between target is measured, and is each measuring machine generation measurement target configuration file;Gage frame, it is and described
Control centre's module connection, for being asked by receiving file acquisition to obtain measurement task, and the survey tool is called to hold
The measurement task go to obtain measurement result data.
In one embodiment of the invention, the control centre includes:Task parsing module, for reading and parsing the measurement
The measurement configuration information of task, judge whether the measurement configuration information is the first measurement target, if the task parsing module is sentenced
The measurement configuration information of breaking is the first measurement target, and the described first measurement target is directly put into one by the task parsing module
Pond be engaged in buffer, task scheduling modules, for parsing the scheduling strategy, is given using the scheduling strategy by Target Assignment is measured
Task scheduling modules of the corresponding measuring machine to generate measuring machine and measure the measurement relation between target;Configuration file generation module,
It is connected with the task scheduling modules, is each measuring machine generation measurement for the measurement relation according to generation, measurement parameter
Target configuration file;If the task parsing module judges the measurement configuration information not for the first measurement target, the task solution
Module renewal measurement configuration information is analysed, the measurement configuration information after renewal is put into a measurement goal task queue, with task solution
The task load-on module traversal measurement goal task queue of module connection is analysed, judges to measure in the measurement goal task queue
Configuration information is that the second measurement target is still the 3rd measurement target, and if the second measurement target, task load-on module is used to load
Described second measures target to the task pool to update the task pool, into rest period;It is described if the 3rd measurement target
Task load-on module is used to load the 3rd measurement target to the task pool to update the task pool, into rest period;
While the task load-on module travels through the measurement goal task queue, the task scheduling modules perform described in parsing parallel
Scheduling strategy, Target Assignment will be measured to corresponding measuring machine using the scheduling strategy to generate between measuring machine and measurement target
Measurement relation given birth to according to the measurement relation of generation, measurement parameter for each measuring machine so as to the configuration file generation module
Into measurement target configuration file.
In one embodiment of the invention, the gage frame includes:Interactive module, for periodically sending file acquisition request
To obtain the measurement configuration information of measurement task, parsing script, data assembling script and the resource quota of measurement task;Task
Configuration management module, it is connected with the interactive module, for judging whether the parsing script and data assembling script update;If
It is to update the parsing script and data assembling script, and judges whether the survey tool needs to update;If it is not, directly sentence
Whether the survey tool that breaks needs to update;If so, output reconfigures the order of the survey tool, the renewal is called
Parse script and parse the measurement configuration information, and put it into task pool to buffer, travel through the task pool;If it is not, directly
Into rest period, performed after rest period terminates and travel through the task pool;Job scheduling module, with the task configuration management mould
Block connects with task pool, for reading measurement task according to the resource quota of each measurement task, and institute is extracted from the task pool
State measurement task;Operation execution module, it is connected with the job scheduling module, for calling the survey tool to perform the survey
Amount task is to obtain measurement result data;Data load module, it is connected with the operation execution module, for performing test
The measurement result data are assembled to be encapsulated into the measurement of user's request data format using data assembling script after task
Result data.
Another aspect of the invention provides a kind of measuring machine, the network measuring system based on strategy
As described above, network measure method, system and the measuring machine based on strategy of the present invention, has the advantages that:
Network measure method, system and measuring machine of the present invention based on strategy have following advantage:
1st, measurement task configuration simple and flexible;
2nd, scheduling strategy enriches, and realizes that measurement target is distributed automatically with measuring machine;
3rd, two-level scheduler, cost on network communication is reduced;
4th, high concurrent measures, and carries out resource isolation and avoids concurrent tasks from disturbing;
5th, height autgmentability.
Brief description of the drawings
Fig. 1 is shown as structural representation of the distributed measurement structure of the present invention in an embodiment.
Fig. 2 is shown as schematic flow sheet of the network measure method based on strategy of the present invention in an embodiment.
Fig. 3 is shown as a kind of structural representation of the network measure model of the present invention.
Fig. 4 is shown as another structural representation of the network measure model of the present invention.
Fig. 5 is shown as the schematic flow sheet of step S2 in the network measure method based on strategy of the present invention.
Fig. 6 is shown as the schematic flow sheet of step S3 in the network measure method based on strategy of the present invention.
Fig. 7 is shown as theory structure schematic diagram of the network measuring system based on strategy of the present invention in an embodiment.
Fig. 8 is shown as the theory structure schematic diagram of control centre in the network measuring system based on strategy of the present invention.
Fig. 9 is shown as the theory structure schematic diagram of gage frame in the network measuring system based on strategy of the present invention.
Figure 10 is shown as the theory structure schematic diagram of the measuring machine of the present invention.
Component label instructions
1 distributed measurement structure
11 configuration center
12 control centres
13 gage frames
14 survey tools
15 databases
2 network measuring systems based on strategy
21 configuration center
22 databases
23 control centres
24 gage frames
231 task parsing modules
232 task pools
233 task scheduling modules
234 configuration file generation modules
235 configuration distributing modules
236 task load-on modules
241 interactive modules
242 task configuration management modules
243 task pools
244 job scheduling modules
245 data load modules
246 operation execution modules
S1~S3 steps
S21~S30 steps
S31~S40 steps
Embodiment
Illustrate embodiments of the present invention below by way of specific instantiation, those skilled in the art can be as disclosed by this specification
Content understand easily the present invention other advantages and effect.The present invention can also add by way of a different and different embodiment
To implement or apply, the various details in this specification can also be based on different viewpoints and application, in the essence without departing from the present invention
God is lower to carry out various modifications or alterations.It should be noted that in the case where not conflicting, the feature in following examples and embodiment
It can be mutually combined.
It should be noted that the diagram provided in following examples only illustrates the basic conception of the present invention in a schematic way, scheme then
Component count, shape and size drafting when the component relevant with the present invention is only shown in formula rather than being implemented according to reality, in fact
Kenel, quantity and the ratio of each component can be a kind of random change when border is implemented, and its assembly layout kenel may also be answered more
It is miscellaneous.
Embodiment one
The present embodiment provides a kind of network measure method based on strategy, is configured for measuring task to measuring machine to test
Instrument performs measurement task, and the network measure method based on strategy comprises the following steps:
Obtain the measurement configuration information of measurement task associated with user's request on the measuring machine;The measurement of the measurement task
Configuration information includes measurement target, scheduling strategy, and/or measurement parameter;
Target Assignment will be measured according to the scheduling strategy to close to generate measuring machine and measure the measurement between target to the measuring machine
System, and be each measuring machine generation measurement target configuration file;
By actively sending file acquisition request to obtain measurement task, and the survey tool is called to perform the measurement task
To obtain measurement result data.
Below with reference to diagram to the network measure method based on strategy described in the present embodiment, this method is used to carry out measuring machine
Measurement task configuration performs measurement task so as to survey tool.In the present embodiment, the network measure method based on strategy is
Itd is proposed for the distributed measurement structure 1 of two-level scheduler, referring to Fig. 1, being shown as distributed measurement structure in an embodiment
In structural representation.As shown in figure 1, the distributed measurement structure 1 is divided for configuration center 11, control centre 12, measurement frame
14 4 frame 13, survey tool levels, and by the measurement configuration information of the measurement task configured in configuration center 11 be stored in
In the database 15 that the control centre 12 connects.The technical principle of the network measure method based on strategy described in the present embodiment
It is as follows:
User matches somebody with somebody confidence by the measurement of the measurement task associated with user's request of configuration on the webpage that is provided in configuration center 11
Breath, after user has added measurement task, keeper needs to audit, and after examination & verification passes through, control centre 12 reads the survey of measurement task
Configuration information is measured, completes the automatic distribution of measurement target and measuring machine, and according to the geographical domain information of scheduling strategy and measuring machine certainly
The measurement relation of dynamic generation measurement target and measuring machine.After the measurement relation that control centre 12 generates measurement target and measuring machine,
Gage frame 13 periodically sends to control centre 12 and asked, and obtains newest measurement task, the gage frame 13 is according to measurement
The measurement period of task, schedule is carried out to measurement task.Measurement task is performed finally by survey tool.Every kind of measurement work
Tool is all defined as a kind of homework type.Homework type including HTTP, PING, DNS, SNMP etc., currently for HTTP,
Tetra- kinds of operations of PING, DNS, SNMP develop efficient measure batch instrument using linux epoll or libevent mechanism
wspoll(HTTP)、wsping(PING)、wsdig(DNS)、wssnmp(SNMP).It is some other not support batch tasks to have survey
The thread pool of framework is measured to control concurrently etc..The configuration of homework type includes:Homework type, survey tool path, survey tool
Whether the information such as batch is supported.It can realize that survey tool dynamic is newly-increased or unloads by the configuration to survey tool in the present embodiment
Carry.
Referring to Fig. 2, it is shown as schematic flow sheet of the network measure method based on strategy in an embodiment.As shown in Fig. 2
The network measure method based on strategy specifically includes following steps:
S1, the measuring machine obtain the measurement configuration information of the measurement task associated with user's request;The survey of the measurement task
Measuring configuration information includes measurement target, scheduling strategy, measurement parameter, measurement task title, measurement task object listing, measurement
Configuration, measurement task configuration, LUA scripts, and/or policy goals configuration of instrument etc..Wherein, measurement task configuration includes
Command Line Parsing LUA scripts are appointed in measurement task title, homework type, the data assembling LUA scripts name of each measurement task, measurement
The resource quota etc. of name, measurement task.In the present embodiment, user also needs to safeguard the survey of measurement task by configuration center
Configuration information, the parsing script configuration of measurement task, data assembling script configuration, measurement task configuration are measured, and these are configured
It is stored in the database.Because measurement task otherness is larger, configuration uses the preferable JSON or XML lattice of autgmentability
Formula.Wherein, the measurement task object listing provides the geographical domain informations such as the operator of measurement target, province, there is provided geography
Domain information is more, can support that scheduling strategy is abundanter.Target is measured to provide by HTTP interface or tables of data, in this way IP or
Domain name list then can be directly in page configuration.
The scheduling strategy includes measuring machine quantity, the combination of allocation strategy and the combination of Solve Problem.Wherein, the measuring machine
Quantity represents that each measurement target is measured by more measuring machines, for example, measuring machine quantity represents each measurement target for 3
3 measuring machines are all distributed to measure.Specifically defined 0 is all measuring machines for distributing to the condition of satisfaction.
The allocation strategy represents which kind of method of salary distribution to measure target and measuring machine to match using, for example, by matching operator,
Measuring machine for measurement object matching with operator.If the measuring machine with measuring object matching has more, the present embodiment will use
The distribution of uniformity Hash ensures the harmony and uniformity of measurement task.In the present embodiment, there is provided following several allocation strategies:
I. it is randomly assigned strategy:Represent that each measurement target is randomly assigned to measuring machine, the measuring machine quantity of distribution can configure, number
Measure and represent that each measurement target is distributed on all measuring machines for 0
Ii. the allocation strategy combined according to geographic region, including but not limited to following several strategies:
Iii. with operator with province allocation strategy:Represent each measurement target can by with the targeted carrier and province information identical
Measuring machine performs, and the operator if Target IP is 1.1.1.1 is telecommunications, and province is Beijing, then the task can be by the institute of Beijing Telecom
There is measuring machine execution.
Iv. with the big region allocation strategy of operator:Represent that each measurement target can be by identical with the targeted carrier and big area information
Measuring machine perform, if operator that Target IP is 1.1.1.1 is telecommunications, province is Beijing, Beijing ownership North China, then should
Task can be performed by all measuring machines of North China telecommunications.
V. operator's allocation strategy is specified:The measuring machine that operator can be designated by representing each measurement target performs, such as Target IP
For 1.1.1.1, telecommunications, operator of UNICOM are specified, then the task can be the measuring machine execution of telecommunications, UNICOM by operator.
Vi. each province operator allocation strategy, represent measuring machine being divided into a domain according to province operator, selected in each domain
Go out n (n is by user configuration) platforms to measuring target measurement.
Vii. with each province allocation strategy of operator, each measurement object matching operator's informaiton identical measuring machine is identified as, and
These are matched into measuring machine and is divided into a domain according to province, n (n is by user configuration) platforms are selected in each domain to measuring target
Measurement.
The present embodiment is not limited to allocation strategy enumerated above, and every allocation strategy suitable for the present embodiment is included in this
In invention.
In the present embodiment, scheduling strategy is combined using allocation strategy or Solve Problem combines, and the configuration sequence of strategy is strategy
Priority.For example, a measurement task can specify:With operator with province strategy>With the big regional strategy of operator>Together
Migration efficiency>Whole allocation strategies can realize that selection is more excellent in the more deficient region of measurement resource, the strategy so combined
Measuring machine measure.
In the present embodiment, there is provided following several Solve Problems:
The indistributable measuring machine scope of Solve Problem specified measurement target, the present embodiment provide following several Solve Problems:
I. same computer room strategy is excluded:Represent each measurement target can not by with the target belonging to the measuring machine of identical computer room perform, such as
The computer room that Target IP is 1.1.1.1 is " pacifying magnificent computer room in Beijing ", then all measurements that the task " can not be pacified magnificent computer room in Beijing "
Machine performs.
Ii. same operator is excluded with province strategy:Represent that each measurement target can not be by identical with the targeted carrier and province information
Measuring machine perform, the operator if Target IP is 1.1.1.1 is telecommunications, and province is Beijing, then the task can not be by Beijing Telecom
All measuring machines perform.
Iii. with the big regional strategy of operator:Represent each measurement target can not by with the targeted carrier and big area information identical
Measuring machine performs, and if operator that Target IP is 1.1.1.1 is telecommunications, province is Beijing, Beijing ownership North China, then this
Business can not be performed by all measuring machines of North China telecommunications.
The present embodiment is not limited to Solve Problem enumerated above, and every Solve Problem suitable for the present embodiment is included in this
In invention.
The complex network measure model of structure can be realized by scheduling strategy described above, it is measuring machine such as to measure target, point
With strategy to be randomly assigned, when quantity allotted is 0, the measuring machine that every measuring machine all can be all to remaining measures, construction
It is as shown in Figure 3 to go out a kind of network measure model.Multiple measurement task combinations can build another increasingly complex network measure model
As shown in Figure 4.A collection of measurement target is divided into 2 task A, B, it is every that measurement task A allocation strategies are configured to same operator
The allocation strategy in individual province, measurement task B allocation strategies are configured to different operators allocation strategy.So the network in Fig. 4 is surveyed
It is that make use of the network performance between same operator and different operators to measure model.
The measurement parameter is that gage frame performs parameter required during measurement task, and the parameter of every kind of homework type may be different,
When such as homework type being HTTP, measurement parameter has cycle, URL, time-out time etc., when homework type is PING, measurement
Parameter has the cycle, sends message amount, interval etc. of giving out a contract for a project.
S2, the measuring machine will measure Target Assignment to the measuring machine to generate measuring machine and measurement mesh according to the scheduling strategy
Measurement relation between mark, and be each measuring machine generation measurement target configuration file.Referring to Fig. 5, it is shown as step
S2 schematic flow sheet.As shown in figure 5, the step S2 specifically includes following steps:
S20, read and parse the measurement configuration information of the measurement task.Need to parse the measurement task in this step
Measurement configuration information for measurement target Configuration Type to perform next step.In the present embodiment, the configuration class of target is measured
Type includes the first measurement target, the second measurement target, and the 3rd measurement target.The first measurement target refers to IP lists or domain
List of file names, the second measurement target refer to HTTP interface, and the 3rd measurement target is tables of data.
S21, judge the measurement configuration information, that is, whether the Configuration Type for judging to measure target is the first measurement target, i.e. IP
List or domain name list, then perform step S22.If it is not, the Configuration Type of i.e. measurement target is not the first measurement target, then hold
Row step S23.
Described first measurement target is directly put into one by S22 when judging that the Configuration Type for measuring target measures target for first
Task pool is to buffer.In the present embodiment, the task pool is a data buffer storage layer, and it is used to buffer the measurement of measurement task and matched somebody with somebody
Confidence ceases, for example, the information such as buffering measurement task object listing, scheduling strategy, measurement parameter.
S24, parse the scheduling strategy and strategy is formed with configuration schedules strategy, by the measurement configuration information of the measurement task more
The new extremely task pool, and travel through the measurement object listing.In the present embodiment, by the scheduling strategy title of user configuration,
JAVA classes corresponding to regulative strategy are using integrated mode generation combined strategy, for example, with operator with the corresponding scheduling of province strategy
The JAVA classes SameIspProvinceStrategy at center.
S26, reads measurement object listing, the scheduling strategy of each measurement task, measurement parameter, measuring machine list, using described
Scheduling strategy will measure Target Assignment to corresponding measuring machine to generate measuring machine and measure the measurement relation between target.For example,
Scheduling strategy is to be distributed with operator, and measurement target ip has 1.1.1.1,2.2.2.2, operator's distribution telecommunications, Netcom, measuring machine
Ip has 111.1.1.1,222.2.2.2, and operator is assigned as telecommunications, Netcom, and will measure target ip1.1.1.1 according to scheduling strategy will
Measuring machine ip111.1.1.1 is distributed to, measurement target ip2.2.2.2 will be distributed into measuring machine ip222.2.2.2.
S28, it is each measuring machine generation measurement target configuration file according to the measurement relation of generation, measurement parameter, into not
The dormancy phase, after rest period terminates, return to step S20.In the present embodiment, the measurement target configuration file is XML lattice
Formula, including 4 parts:Measure target designation with<name>Represent, homework type with<jobType>Represent, measurement parameter with
<param>Represent, measurement object listing with<tasks>Represent.Measurement parameter because survey homework type and it is different, HTTP operations include
Cycle<cycle>Represent, time-out time<timeout>Mark.Measure object listing by<task>Composition, a task include measurement
Target<dest>, monitored object<monObj>.
S30, the acquisition that the control centre is actively sent by gage frame described in periodic receipt measure obtaining for target configuration file
Request is taken to obtain measurement task, according to the unique ID of the measuring machine, the feedback measurement target corresponding with the measuring machine
Configuration file.The measurement target configuration file includes the distinctive measurement target configurations of measuring machine mark ID and public LUA pin
This, job configuration information, measurement task configuration.Homework type configuration information includes homework type, the job list, survey tool
Path, survey tool whether support batch, measurement task, which configures, includes the number of measurement task name, homework type, measurement task
According to the resource quota for assembling LUA scripts name, Command Line Parsing LUA scripts name, measurement task.
S23, when judging that the Configuration Type non-first for measuring target measures target, measurement configuration information is updated, i.e. renewal measurement
Measurement target in configuration information, the measurement configuration information (the measurement target after updating) after renewal is put into a measurement target
Task queue.
S25, the measurement goal task queue is traveled through, read the measurement configuration information in the measurement goal task queue.
S27, it is that the second measurement target is still the 3rd measurement target to judge the measurement configuration information in the measurement goal task queue,
If the second measurement target, as HTTP interface, step S29 is performed, if the 3rd measurement target, as tables of data, is held
Row step S29 '.
In the present embodiment, after updating the measurement target in measurement configuration information, the measurement with re-reading the task configures
Information, and judge that the measurement configuration information is that the second measurement target is still that the step of the 3rd measurement target parallel performs is S24.
Even judge the non-first measurement target of the Configuration Type for measuring target, after updating the measurement target in measurement configuration information, together
Shi Zhihang step S24, parse the scheduling strategy and strategy is formed with configuration schedules strategy, the measurement of the measurement task is matched somebody with somebody
Confidence breath is updated to the task pool, and travels through the measurement object listing.
S29, loading described second measure target to the task pool to update the measurement target in the task pool, into not
The dormancy phase, after rest period terminates, return to step S25.
S29 ', loading the 3rd measurement target measures target to the task pool to update in the task pool, into rest period,
After rest period terminates, step S25 is returned to.
S3, the measuring machine by interaction to obtain measurement task, and call the survey tool come perform the measurement task with
Obtain measurement result data.Referring to Fig. 6, it is shown as step S3 schematic flow sheet.As shown in fig. 6, the step S3
Specifically include following steps:
S31, file acquisition request is periodically sent to receive the measurement target configuration file, by measuring in target configuration file
Parsing script parsing it is described measurement target configuration file in include measurement task measurement configuration information, measurement task configuration etc.,
The measurement task configuration includes the resource of the homework type of measurement task, parsing script, data assembling script and measurement task
Quota etc..In the present embodiment, the parsing script is that LUA parses script, and the data assembling script fills for LUA data
With script.The measurement configuration information of LUA parsing script parsing measurement task is to obtain the recognizable data format of gage frame.
S32, judges whether the parsing script and data assembling script update, if so, step S33 is performed, if it is not, then direct
Perform step S34.Due to periodically obtaining newest measurement target configuration file, so allowing to measure in target configuration file
Curriculum offering is file format change, if measurement target configuration file is changed to JSON forms, changes LUA scripts, measurement frame
Frame can just complete the processing to new measurement target configuration file, without redeploying gage frame.
S33, if the parsing script and data assembling script need to update, the parsing script and data assembling script are updated,
That is modification parsing script and data assembling script, and it is transferred to next step.
S34, judges whether the survey tool needs to update;If so, then performing step S35, output reconfigures survey tool
Order survey tool is configured again so that staff knows, and be transferred to step S36.If it is not, then directly perform step
Rapid S36 ', that is, call in the measurement target configuration file parsing script that obtains to parse the measurement configuration information, and by its
Task pool is put into buffer.
S36, call the parsing script of the renewal to parse the measurement configuration information, and put it into task pool to buffer.
S37, the task pool is traveled through according to the homework type.
S38, judge whether there is measurement task in the task pool.If so, step S39 is then performed, if it is not, then performing step
S40, rest period is directly entered, the return to step S37 after rest period terminates, i.e., appointed again according to homework type traversal
Business pond.
S38, measurement task is read from task pool according to the resource quota of each measurement task batch, and extracted from the task pool
The measurement task.In the present embodiment, measurement task is a collection of batch of extraction and performed, and has performed the measurement currently extracted
After task, another measure batch task can be just extracted from task pool again.In the present embodiment, step S38 is also specifically included
Herein below:
After the job scheduling cycle arrives, the job list included in the operation configuration is traveled through, judges job state to perform
(RUNNING) it is or idle (IDLE), if idle (IDLE), then job state is set into RUNNING, root
Measurement task is read from task pool according to the resource quota batch of measurement task to perform the measurement task;
Judge whether survey tool supports batch jobs, if so, the measurement task of batch is put into batch jobs thread pool to hold
OK, rest period is entered after being finished;If it is not, the measurement task of non-batch is put into non-batch jobs thread pool, by each
Survey tool corresponding to thread dispatching performs measurement task.
S39, the survey tool is called to perform the measurement task to obtain measurement result data, it is sharp after test assignment has been performed
The measurement result data are assembled to be encapsulated into the measurement result data of user's request data format with data assembling script,
After script execution to be assembled terminates, job state is set to idle (IDLE), and measurement result data are reported into specified target.
It is using the network measure method based on strategy and the second instantiation described in the present embodiment below:
Measurement task is that measurement process is such as in the in one's duty network delay of the identical province of same operator, packet loss in first instantiation
Under:
1. user's login configurations center web interface adds measurement task, state is changed into pending, it is necessary to configure after the completion of addition
Following information:
1) measurement task name TEST_PING
2) homework type is PING
3) measurement target is obtained by HTTP modes, configures HTTP interface
4) allocation strategy is that, in order to ensure the reliability of measurement data, each target uses 2 surveys with province strategy with operator
Amount
5) configure measurement task parameter, measurement period 2 minutes, send message 10, message is sent at intervals of 100ms.
2. the web examination & verification pages in administrator configurations center are audited and verified to measurement task, flow is as follows:
1) PING tasks use (a to develop high concurrent PING surveys using Linux epoll mechanism by survey tool wsping
Amount instrument), therefore instrument configuration need not be measured.If survey tool is newly-increased instrument, it is necessary to dispose measurement work on measuring machine
Tool, and the operation configuration such as homework type, installation path of survey tool is added in configuration center
2) appointed task Command Line Parsing LUA scripts, data assembling LUA scripts
3) after verification configuration is errorless, state is set to examination & verification and passed through
3. more than completing after 2 steps, control centre will be automatically performed task distribution, and gage frame is according to user's request, cycle
Property perform measurement task, until user disable or delete task.Control centre performs following steps:
1) measurement task audited is read from tables of data
2) parsing measurement target configuration, target is HTTP interface, calls HTTP load-on modules to ask to measure to HTTP interface
Object listing, measurement task have 2000 targets such as 1.1.1.1, and target is put into thread pool (task pool).
3) resolution scheduling strategy, scheduling strategy are that with province, strategy, one combined strategy class of establishment, class only have respectively with operator
SameIspProvinceStrategy (with operator with province strategy) class.
4) measuring machine list is obtained, measuring machine there are 500 machines such as 111.1.1.1,111.1.1.2.
5) combined strategy class is called, 2000 measurement targets is traveled through, the measuring machine for meeting strategy is selected from 500 measuring machines,
Again according to uniformity Hash (a kind of hash algorithm), 2 measuring machines are selected.Such as:It is UNICOM to measure target 1.1.1.1 operators,
This 4 machines of measuring machine 111.1.1.1-111.1.1.4, select 111.1.1.1,111.1.1.2, here with uniformity Hash
There are two measuring machines with measuring the relation of target, 111.1.1.1 measurement target is 1.1.1.1, and 111.1.1.2 measurement target is also
1.1.1.1。
4. the configuration file (measurement target configuration file) of measuring machine is generated, as measuring machine 111.1.1.1 undertakes TEST_PING
Task, homework type PING, measurement parameter measurement period 2 minutes (120 seconds), send message 10, message send at intervals of
100 milliseconds (ms), measurement target 1.1.1.1 generation XML configuration files.
Measurement task is service quality of the measurement a.com in each operator province of China in second instantiation:
1. user's login configurations center web interface adds measurement task, state is changed into pending, it is necessary to configure after the completion of addition
Following information:
1) measurement task name TEST_HTTP
2) homework type is HTTP
3) it is a.com to measure target,
4) allocation strategy is each operator province strategy, and for 1 i.e., 1 survey is distributed in each operator province to measuring machine quantity
Amount machine
5) measurement task parameter, measurement period 1 minute, time-out time 10s are configured
2. the web examination & verification pages in administrator configurations center are audited and verified to measurement task, flow is as follows:
1) HTTP tasks are used by survey tool wspoll (a to develop high concurrent HTTP survey tools using libevent),
Therefore instrument configuration need not be measured.If survey tool is newly-increased instrument, it is necessary to dispose survey tool on measuring machine, and
Configuration center adds the operations such as the homework type of survey tool, installation path configuration
2) appointed task Command Line Parsing LUA scripts, data assembling LUA scripts
3) after verification configuration is errorless, state is set to examination & verification and passed through
3. more than completing after 2 steps, central dispatching will be automatically performed task distribution gage frame according to user configuration, periodicity
Measurement task is performed, until user disables or deleted task.The task allocation step of central dispatching is as follows:
1) measurement task audited is read from tables of data
2) parsing measurement target configuration, target a.com, thread pool is put into by target;
3) resolution scheduling strategy, scheduling strategy are to create a combined strategy class, class only has with province allocation strategy with operator
PerIspProvinceStrategy (each operator province distribution) class.
4) measuring machine list is obtained, measuring machine there are 500 machines such as 111.1.1.1,111.1.1.2.
5) combined strategy class is called, measurement target only has a.com, and measuring machine there are 500, and PerIspProvinceStrategy will
For 500 measuring machines according to operator's province classification, 1 measuring machine is chosen in each operator province.111.1.1.1,111.1.1.2
This 2 machines, operator's province information are respectively telecommunications Beijing, telecommunications Shanghai, and 111.1.1.1 measurement target is a.com,
111.1.1.2 measurement target is also a.com.
4. generate the configuration file of measuring machine, as measuring machine 111.1.1.1 undertakes TEST_HTTP tasks, homework type HTTP,
The information generation XML configuration file such as measurement parameter measurement period 1 minute (60s), time-out time 10s, measurement target a.com.
The network measure method based on strategy described in the present embodiment has following advantage:
1st, measurement task configuration simple and flexible;
2nd, scheduling strategy enriches, and realizes that measurement target is distributed automatically with measuring machine;
3rd, two-level scheduler, cost on network communication is reduced;
4th, high concurrent measures, and carries out resource isolation and avoids concurrent tasks from disturbing;
5th, height autgmentability.
Embodiment two
The present embodiment provides a kind of network measuring system based on strategy, is configured for measuring task to measuring machine to measure
Testing tool in machine performs measurement task, and the network measuring system based on strategy includes:
Control centre, for obtaining the measurement configuration information of the measurement task associated with user's request, the measurement task
Measurement configuration information includes measurement target, scheduling strategy, and/or measurement parameter;And target point will be measured according to the scheduling strategy
Measuring machine described in dispensing is each measuring machine generation measurement mesh to generate measuring machine and measure the measurement relation between target
Mark configuration file;
Gage frame, it is connected with control centre's module, for being asked by actively sending file acquisition to obtain measurement task,
And the survey tool is called to perform the measurement task to obtain measurement result data.
The network measuring system based on strategy described in the present embodiment is described in detail below with reference to diagram.Referring to Fig. 7,
Show theory structure schematic diagram of the network measuring system based on strategy in an embodiment.It is as shown in fig. 7, described based on strategy
Network measuring system 2 include configuration center 21, database 22, control centre 23 and gage frame 24.
The configuration center 21 is used to provide web service.User passes through configuration and user on the webpage that is provided in configuration center 21
The measurement configuration information of the associated measurement task of demand, after user has added measurement task, keeper needs to audit, and examination & verification is logical
Later, control centre 23 reads the measurement configuration information of measurement task, completes the automatic distribution of measurement target and measuring machine, and root
Target and the measurement relation of measuring machine are measured according to the geographic region Automatic generation of information of scheduling strategy and measuring machine.Given birth in control centre 23
Into after measurement target and the measurement relation of measuring machine, gage frame 24 periodically sends to control centre 23 and asked, and obtains newest
Measurement task, the gage frame 24 carry out schedule according to the measurement period of measurement task to measurement task.Finally by
Survey tool is called to perform measurement task.Every kind of survey tool is all defined as a kind of homework type.Homework type include HTTP,
PING, DNS, SNMP etc., currently for tetra- kinds of operations of HTTP, PING, DNS, SNMP using linux epoll or
Libevent mechanism develop efficient measure batch instrument wspoll (HTTP), wsping (PING), wsdig (DNS),
wssnmp(SNMP).It is some other not support the thread pool that batch tasks have gage frame to control concurrently etc..Homework type
Configuration includes:Whether homework type, survey tool path, survey tool support the information such as batch.It can lead in the present embodiment
Cross the configuration to survey tool and realize that survey tool dynamic is newly-increased or unloads.In the present embodiment, increasing a measurement task newly only needs
Want user to be configured in the configuration center page, delete measurement task the configuration center page delete, by dynamic addition and
Height autgmentability is realized in deletion.If desired a kind of homework type is increased newly, it is necessary to keeper's homework type on configuration center, measurement
Tool path, as on machine without this survey tool, it is also necessary to survey tool is deployed on measuring machine, installation path will be with configuration
The survey tool path of center configuration is consistent.The measurement target configuration file of measuring machine is parsed using LUA scripts, allows for center
Scheduling change configuration file format.Measurement result is equally assembled using LUA scripts, can be that each measurement task realizes special
Customization.
The measurement for being used to store the measurement task associated with user's request with the database 22 of the configuration center 21 connection configures
Information;The measurement configuration information of the measurement task include measurement target, scheduling strategy, measurement parameter, measurement task title,
The parsing script configuration of homework type, measurement task, data assembling script configuration, measurement task configuration, and/or measurement task mesh
Mark list etc..The scheduling strategy includes measuring machine quantity, the combination of allocation strategy and the combination of Solve Problem.Wherein, institute
State measuring machine quantity and represent that each measurement target is measured by more measuring machines, for example, measuring machine quantity represents each for 3
Measurement target is all distributed 3 measuring machines and measured.Specifically defined 0 is all measuring machines for distributing to the condition of satisfaction.
It is used to obtain measurement associated with user's request on the measuring machine times with the control centre 23 of the database 22 connection
The measurement configuration information of business, the scheduling strategy in the measurement configuration information of measurement task will measure Target Assignment to described
Measuring machine is each measuring machine generation measurement target configuration text to generate measuring machine and measure the measurement relation between target
Part.Please continue to refer to Fig. 8, the concrete structure of the control centre 23 is shown in Fig. 8.The control centre 23 includes:Appoint
Be engaged in parsing module 231, task pool 232, task scheduling modules 233, configuration file generation module 234, configuration distributing module 235,
And task load-on module 236.
Task parsing module 231 is used for the measurement configuration information for obtaining measurement task associated with user's request on the measuring machine
Read and parse the measurement configuration information of the measurement task.The measurement for needing to parse the measurement task in the present embodiment is matched somebody with somebody
Confidence breath is the Configuration Type of measurement target so that following modules continue to run with.In the present embodiment, the Configuration Type of target is measured
Including the first measurement target, the second measurement target, and the 3rd measurement target.The first measurement target refers to IP lists or domain name
List, the second measurement target refer to HTTP interface, and the 3rd measurement target is tables of data.
The task parsing module 231 is additionally operable to judge the measurement configuration information, that is, judge measure target Configuration Type whether
For the first measurement target, i.e. IP lists or domain name list.If it is not, the Configuration Type of i.e. measurement target is not the first measurement target
The Configuration Type for judging to measure target for the first measurement target when, the task parsing module 231 is directly by described the
One measurement target is put into a task pool 232 to buffer.In the present embodiment, the task pool is a data buffer storage layer, and it is used for
The measurement configuration information of measurement task is buffered, for example, the configuration such as buffering measurement task object listing, scheduling strategy, measurement parameter
Information.
The task parsing module 231 is additionally operable to parse the scheduling strategy forms strategy with configuration schedules strategy, by the survey
The measurement configuration information of amount task is updated to the task pool, and travels through the measurement object listing.In the present embodiment, pass through
The scheduling strategy title of user configuration, JAVA classes corresponding to regulative strategy are using integrated mode generation combined strategy, for example, together
JAVA class SameIspProvinceStrategy of the operator with the corresponding control centre of province strategy.
The task scheduling modules 233 being connected with the task pool 232 are used to read the measurement object listing of each measurement task, adjusted
Degree strategy, measurement parameter, measuring machine list, Target Assignment will be measured to corresponding measuring machine using the scheduling strategy to generate
Measurement relation between measuring machine and measurement target.For example, scheduling strategy be with operator distribute, measurement target ip have 1.1.1.1,
2.2.2.2, operator's distribution telecommunications, Netcom, measuring machine ip have 111.1.1.1,222.2.2.2, and operator is assigned as telecommunications, net
It is logical, measuring machine ip111.1.1.1 will be distributed to by target ip1.1.1.1 is measured according to scheduling strategy, will by measurement target ip2.2.2.2
Distribute to measuring machine ip222.2.2.2.
The configuration file generation module 234 being connected with the task scheduling modules 233 is used for the measurement relation according to generation, measurement
Parameter is each measuring machine generation measurement target configuration file, into rest period, after rest period terminates, re-calls institute
State task parsing module 231.In the present embodiment, the measurement target configuration file is XML format, including 4 parts:
Measure target designation with<name>Represent, homework type with<jobType>Represent, measurement parameter with<param>Represent, measure mesh
Mark list with<tasks>Represent.Measurement parameter because survey homework type and it is different, HTTP operations include the cycle<cycle>Represent, surpass
When the time<timeout>Mark.Measure object listing by<task>Composition, a task include measurement target<dest>, monitoring pair
As<monObj>.
The configuration distributing module 235 being connected with the configuration file generation module 234 is used for measurement frame in periodic receipt measuring machine
The acquisition for the acquisition measurement target configuration file that frame is actively sent is asked to obtain measurement task, according to unique mark of the measuring machine
Know ID, the feedback measurement target configuration file corresponding with the measuring machine.The measurement target configuration file identifies including measuring machine
The distinctive measurement target configurations of ID and public LUA scripts, job configuration information, measurement task configuration.Homework type configures
Whether information supports batch, measurement task configuration bag including homework type, the job list, the path of survey tool, survey tool
Include measurement task name, homework type, the data assembling LUA scripts name of measurement task, Command Line Parsing LUA scripts name, measurement
The resource quota of task.
With the task parsing module 231 when judging that the Configuration Type non-first for measuring target measures target, renewal measurement is matched somebody with somebody
Confidence is ceased, and the measurement configuration information after renewal is put into a measurement goal task queue.
The task load-on module 236 being connected with the task parsing module 231 and task pool 232 is used to parse mould in the task
When block 231 judges that the Configuration Type non-first for measuring target measures target, the measurement goal task queue is traveled through, reads institute
The measurement configuration information in measurement goal task queue is stated, and judges that the measurement configuration information is that the second measurement target is still the
Three measurement targets, if the second measurement target, as HTTP interface, the loading second measurement target to the task pool with
The measurement target in the task pool is updated, into rest period, after rest period terminates, continues to travel through the measurement goal task
Queue;If the 3rd measurement target, as tables of data, loading the described 3rd measures target to the task pool to update described appoint
Business measures target in pond, into rest period, after rest period terminates, continues to travel through the measurement goal task queue.In this reality
Apply in example, when the task parsing module 231 judges that the measurement configuration information non-first measures target, renewal measurement configuration
Information, that is, after updating the measurement target in measurement configuration information, the measurement goal task is traveled through in the task load-on module
While queue, the task scheduling modules 233 perform parse the scheduling strategy parallel, will be measured using the scheduling strategy
Target Assignment gives corresponding measuring machine to generate the measurement relation between measuring machine and measurement target so that the configuration file generates mould
Root tuber is each measuring machine generation measurement target configuration file according to measurement relation, the measurement parameter of generation.
The gage frame 24 being connected with the control centre 23 is used for by being interacted with the control centre to obtain measurement task,
And the survey tool is called to perform the measurement task to obtain measurement result data.Referring to Fig. 9, it is shown as measurement frame
The theory structure schematic diagram of frame.As shown in figure 9, the gage frame 24 specifically includes:Interactive module 241, task configuration pipe
Manage module 242, task pool 243, job scheduling module 244, data load module 245, operation execution module 246,
Interactive module 241 is used to periodically send file acquisition request to receive the measurement target configuration file, by measuring mesh
The measurement configuration information of the measurement task included in the parsing script parsing measurement target configuration file in mark configuration file, survey
Amount task configuration etc., measurement task configuration include the homework type of measurement task, parsing script, data assemble script and
Resource quota of measurement task etc..In the present embodiment, the parsing script is that LUA parses script, and the data assemble script
Script is assembled for LUA data.The measurement configuration information of the LUA parsings script parsing measurement task can to obtain gage frame
The data format of identification.
The task configuration management module 242 being connected with the interactive module 241 is used to judge the parsing script and data assembling pin
Whether this updates, if the parsing script and data assembling script need to update, updates the parsing script and data assembling pin
This, i.e., modification parsing script and data assemble script, if it is not, then judging whether the survey tool needs to update.Due to the cycle
Property obtain newest measurement target configuration file, so the curriculum offering for allowing to measure in target configuration file is file format change,
If measurement target configuration file is changed to JSON forms, LUA scripts are changed, gage frame can be just completed to new measurement target
The processing of configuration file, without redeploying gage frame.
The task configuration management module 242 judges whether the survey tool needs to update;If so, then output reconfigures survey
The order of amount instrument configures to survey tool again so that staff knows, and calls the parsing script of the renewal to parse
The measurement configuration information, and task pool 243 is put it into buffer, travel through the task pool 243.If it is not, then directly enter
Enter rest period, the function of traveling through the task pool is performed to the end of rest period.
The job scheduling module 244 being connected with the task pool 243 is used to judge whether there is measurement task in the task pool.If
It is measurement task then to be read from task pool according to the resource quota of each measurement task batch, and institute is extracted from the task pool
State measurement task.In the present embodiment, measurement task is a collection of batch of extraction and performed, then has performed the measurement currently extracted
After task, another measure batch task can be just extracted from task pool again, if it is not, then the data load module 245 is called
The data assembling script directly carries out the measurement result data that assembling is packaged into user's request data format to measurement data, and will
Measurement result data report specified target.
In the present embodiment, job scheduling module 244 also specifically includes herein below:
After the job scheduling cycle arrives, the job list included in the operation configuration is traveled through, judges job state to perform
(RUNNING) it is or idle (IDLE), if IDLE, then job state is set into RUNNING, appointed according to measurement
The resource quota batch of business reads measurement task to perform the measurement task from task pool;
Judge whether survey tool supports batch jobs, if so, the measurement task of batch is put into batch jobs thread pool to hold
OK, rest period is entered after being finished;If it is not, the measurement task of non-batch is put into non-batch jobs thread pool, by each
Survey tool corresponding to thread dispatching performs measurement task.
The operation execution module 246 calls the survey tool to perform the measurement task to obtain measurement result data, is holding
Gone after test assignment the data load module 245 using data assembling script assemble the measurement result data with by its
The measurement result data of user's request data format are packaged into, and measurement result data are reported into specified target.
In the present embodiment, the batch jobs of gage frame 24 execution detailed process is:Thread pool calls call back function to perform work automatically
Industry, data assembling LUA script fabrication datas are called after the completion of operation, while job state is set to idle (IDLE), and more
New measurement task time of measuring, is put into task pool, waits the measurement of next round.
Gage frame 24 performs detailed process in the non-batch jobs of execution:
Thread pool calls call back function to perform task automatically, after the completion of task, judges whether all tasks of the batch are all completed,
Tasks carrying terminates if not completing, and data assembling LUA script fabrication datas is called if completing, while job state is put
For idle (IDLE), and measurement task time of measuring is updated, be put into task pool, wait the measurement of next round.
The present embodiment also includes a kind of measuring machine 3, shows referring to Fig. 10, being shown as theory structure of the measuring machine in an embodiment
It is intended to.As shown in Figure 10, the measuring machine 3 includes the above-mentioned network measuring system 2 based on strategy.
In summary, network measure method, system and measuring machine of the present invention based on strategy have some benefit:
First, measurement task configuration simple and flexible:One measurement task user of addition only needs to configure measurement task name on the page,
Homework type, measure object listing, scheduling strategy, measurement parameter.Measurement object listing can support HTTP interface and data
Table is configured, and central dispatching can periodically be read.After user has added task, keeper is audited, and is the task specified configuration
Parse LUA scripts, data assembling LUA scripts.The configuration file format difference of usual each measurement task is little, can be total to
A Command Line Parsing script is enjoyed, each homework type assembling LUA scripts can also be shared.After keeper's examination & verification passes through, center is adjusted
Degree can read measurement task information, proceed by task scheduling.
Second, scheduling strategy enriches, and realizes that measurement target is distributed automatically with measuring machine:Scheduling strategy configurable measurement machine quantity,
Allocation strategy, Solve Problem, allocation strategy are combined strategy, all distribution, specified measurement machine and each geographic region can be achieved
Strategy combination strategy.Central dispatching reflects according to the geographic region Automatic generation of information measurement task and measuring machine of scheduling strategy and measuring machine
Penetrate relation.
3rd, two-level scheduler, reduce cost on network communication:Control centre only generates measurement task and the relations of distribution of measuring machine,
The gage frame cycle asks to central dispatching, obtains newest measurement task.Gage frame is according to the measurement period of task, to surveying
Amount task carries out schedule, and all measurement tasks are completed within the cycle.It is responsible for measurement task and the survey of the first order in control centre
Amount machine distributes, and actual measurement second level scheduling is that the scheduler module of gage frame is responsible for, and most measurement tasks is all the duration
Very long periodic task, second-level dispatching greatly reduce the communication overhead of measuring machine and central dispatching.
4th, high concurrent measurement, carry out resource isolation and avoid concurrent tasks from disturbing:Customized development general purpose measuring tool, utilizes Linux
Epoll or libevent realizes the efficient concurrent test of survey tool.Task for batch can not be supported, using the line of gage frame
Cheng Chi process batch testings.Each measurement task each run has resource distribution, only runs a number of measurement target every time,
After completing a collection of task, then the measurement task next group target is tested.
5th, height autgmentability:Increasing a measurement task newly only needs user to be configured in the configuration center page, deletes measurement
Task is deleted in the configuration center page.If desired a kind of homework type is increased newly, it is necessary to which keeper configures work on configuration center
Industry type, survey tool path, as on machine without this survey tool, it is also necessary to survey tool is deployed on measuring machine, install
Path is consistent with the survey tool path that configuration center configures.The measurement target configuration file of measuring machine is parsed using LUA scripts,
Central dispatching is allowed for change configuration file format.Measurement result is equally assembled using LUA scripts, can be that each measurement is appointed
Pragmatic existing special customization.So the present invention effectively overcomes various shortcoming of the prior art and has high industrial exploitation value
Value.
The above-described embodiments merely illustrate the principles and effects of the present invention, not for the limitation present invention.It is any to be familiar with this skill
The personage of art all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Therefore, such as
Those of ordinary skill in the art without departing from disclosed spirit with completed under technological thought all etc.
Modifications and changes are imitated, should be covered by the claim of the present invention.
Claims (10)
- A kind of 1. network measure method based on strategy, it is characterised in that for measuring task configuration to measuring machine so as to measuring machine In testing tool perform measurement task, it is described based on strategy network measure method comprise the following steps:Obtain the measurement configuration information of measurement task associated with user's request on the measuring machine;The survey of the measurement task Measuring configuration information includes measurement target, scheduling strategy, and/or measurement parameter;Target Assignment will be measured to the measuring machine according to the scheduling strategy to generate measuring machine and measure the survey between target Magnitude relation, and be each measuring machine generation measurement target configuration file;By actively sending file acquisition request to obtain measurement task, and the survey tool is called to appoint to perform the measurement It is engaged in obtain measurement result data.
- 2. the network measure method according to claim 1 based on strategy, it is characterised in that:It is described to be incited somebody to action according to the scheduling strategy Measurement Target Assignment gives measurement relation of the measuring machine to generate measuring machine with measure target, and is each measuring machine life Include into the step of measurement target configuration file:Read and parse the measurement configuration information of the measurement task;Judge whether the measurement configuration information is the first measurement target,If so, the described first measurement target directly is put into a task pool to buffer, the scheduling strategy is parsed, using described Scheduling strategy will measure Target Assignment to corresponding measuring machine to generate measuring machine and measure the measurement relation between target, according to Measurement relation, the measurement parameter of generation are each measuring machine generation measurement target configuration file, into rest period;If it is not, renewal measurement configuration information, the measurement configuration information after renewal is put into a measurement goal task queue, time The measurement goal task queue is gone through, judges that measurement configuration information measures target also for second in the measurement goal task queue It is to measure target for the 3rd, if the second measurement target, the loading second measurement target is described to update to the task pool Task pool, into rest period;If the 3rd measurement target, loading the 3rd measurement target is to the task pool to update Task pool is stated, into rest period;While the measurement goal task queue is traveled through, parallel perform parses the scheduling plan Slightly, Target Assignment will be measured to corresponding measuring machine using the scheduling strategy to generate measuring machine and measure the survey between target Magnitude relation, it is each measuring machine generation measurement target configuration file according to the measurement relation of generation, measurement parameter, enters Rest period.
- 3. the network measure method according to claim 2 based on strategy, it is characterised in that:The first measurement target is IP lists or domain name list;The second measurement target is HTTP interface;The 3rd measurement target is tables of data.
- 4. the network measure method according to claim 2 based on strategy, it is characterised in that:The periodicity sends file acquisition Request calls the survey tool to perform the measurement task to obtain measurement result data to obtain measurement task, and The step of being reported includes:File acquisition request is periodically sent to obtain the measurement configuration information of measurement task, the measurement configuration information includes solution Analyse the resource quota of script, data assembling script and measurement task;Judge whether the parsing script and data assembling script update;If so, the renewal parsing script and data assembling pin This, and judge whether the survey tool needs to update;If it is not, directly judging whether the survey tool needs to update;If It is that output reconfigures the order of survey tool, calls the parsing script of the renewal to parse the measurement configuration information, and Task pool is put it into buffer, travels through the task pool;If it is not, rest period is directly entered, the return time to the end of rest period The step of going through the task pool;Measurement task is read according to the resource quota of each measurement task, and the measurement task is extracted from the task pool;Call the survey tool to perform the measurement task to obtain measurement result data, utilized after test assignment has been performed The data assembling script assembles the measurement result data to be encapsulated into the measurement result number of user's request data format According to.
- 5. the network measure method according to claim 1 based on strategy, it is characterised in that:The scheduling strategy includes the survey The quantity of amount machine, the combination of allocation strategy and the combination of Solve Problem.
- 6. the network measure method according to claim 6 based on strategy, it is characterised in that:The allocation strategy includes:At random Allocation strategy, the allocation strategy combined according to geographic region, with operator with province strategy, with the big regional strategy of operator, Specify carrier policy, each province operator allocation strategy, with each province allocation strategy of operator, and/or whole points With strategy.
- 7. a kind of network measuring system based on strategy, it is characterised in that for measuring task configuration to measuring machine so as to measuring machine In testing tool perform measurement task, it is described based on strategy network measuring system include:Control centre, for obtaining the measurement configuration information of the measurement task associated with user's request, the measurement task Measurement configuration information include measurement target, scheduling strategy, and/or measurement parameter;And it will be measured according to the scheduling strategy Target Assignment gives the measuring machine to generate measuring machine and measure the measurement relation between target, and is each measuring machine life Into measurement target configuration file;Gage frame, it is connected with control centre's module, for being appointed by actively sending file acquisition request with obtaining measurement Business, and the survey tool is called to perform the measurement task to obtain measurement result data.
- 8. the network measuring system according to claim 7 based on strategy, it is characterised in that:The control centre includes:Task parsing module, for reading and parsing the measurement configuration information of the measurement task, judge that confidence is matched somebody with somebody in the measurement Whether breath is the first measurement target,If the task parsing module judges that the measurement configuration information is direct for the first measurement target, the task parsing module Described first measurement target is put into a task pool to buffer,Task scheduling modules, for parsing the scheduling strategy, Target Assignment will be measured to corresponding using the scheduling strategy Measuring machine with generate measuring machine and measure target between measurement relation;Configuration file generation module, it is connected with the task scheduling modules, for measurement relation, the measurement parameter according to generation For each measuring machine generation measurement target configuration file;If the task parsing module judges the measurement configuration information not for the first measurement target, the task parsing module is more New measurement configuration information, the measurement configuration information after renewal is put into a measurement goal task queue, with task parsing module The task load-on module traversal measurement goal task queue of connection, judge to measure configuration in the measurement goal task queue Information is that the second measurement target is still the 3rd measurement target,If the second measurement target, task load-on module is used to load the second measurement target to the task pool to update Task pool is stated, into rest period;If the 3rd measurement target, the task load-on module is used to load the 3rd measurement target to the task pool with more The new task pool, into rest period;While the measurement goal task queue of task load-on module traversal, institute State task scheduling modules and perform the parsing scheduling strategy parallel, Target Assignment will be measured to corresponding using the scheduling strategy Measuring machine with generate measuring machine and measure target between measurement relation so that the configuration file generation module is according to generation Measurement relation, measurement parameter are each measuring machine generation measurement target configuration file.
- 9. the network measuring system according to claim 7 based on strategy, it is characterised in that:The gage frame includes:Interactive module, for periodically send file acquisition request with obtain the measurement configuration information of measurement task, parsing script, Data assemble script and the resource quota of measurement task;Task configuration management module, be connected with the interactive module, for judge it is described parsing script and data assembling script be No renewal;If so, the renewal parsing script and data assembling script, and judge whether the survey tool needs to update; If it is not, directly judging whether the survey tool needs to update;If so, output reconfigures the order of the survey tool, Call the parsing script of the renewal to parse the measurement configuration information, and put it into task pool to buffer, traversal is described to appoint Business pond;If it is not, being directly entered rest period, performed to the end of rest period and travel through the task pool;Job scheduling module, it is connected with the task configuration management module and task pool, for the resource according to each measurement task Quota reads measurement task, and the measurement task is extracted from the task pool;Operation execution module, it is connected with the job scheduling module, for calling the survey tool to perform the measurement task To obtain measurement result data;Data load module, it is connected with the operation execution module, for utilizing the data to fill after test assignment has been performed The measurement result data are assembled with script to be encapsulated into the measurement result data of user's request data format.
- A kind of 10. measuring machine, it is characterised in that including:Network measure as claimed in any one of claims 7-9 based on strategy System.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610290565.7A CN107347013B (en) | 2016-05-04 | 2016-05-04 | Network measurement method, system and measuring machine based on strategy |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610290565.7A CN107347013B (en) | 2016-05-04 | 2016-05-04 | Network measurement method, system and measuring machine based on strategy |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107347013A true CN107347013A (en) | 2017-11-14 |
CN107347013B CN107347013B (en) | 2020-07-07 |
Family
ID=60253424
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610290565.7A Expired - Fee Related CN107347013B (en) | 2016-05-04 | 2016-05-04 | Network measurement method, system and measuring machine based on strategy |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107347013B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109379197A (en) * | 2018-12-14 | 2019-02-22 | 网宿科技股份有限公司 | A kind of charging method and system of network acceleration service |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1750486A (en) * | 2005-08-16 | 2006-03-22 | 西安电子科技大学 | Network measuring system structure and its realizing method |
CN1760839A (en) * | 2004-10-12 | 2006-04-19 | 国际商业机器公司 | Apparatus, system, and method for facilitating port testing of a multi-port host adapter |
CN1963763A (en) * | 2005-11-09 | 2007-05-16 | 同济大学 | Dynamic online scheduling system in gridding circumstance and its scheduling method |
CN101212362A (en) * | 2006-12-26 | 2008-07-02 | 中兴通讯股份有限公司 | Automatic testing device and method incorporating a variety of testing tools |
CN102354298A (en) * | 2011-07-27 | 2012-02-15 | 哈尔滨工业大学 | Software testing automation framework (STAF)-based fault injection automation testing platform and method for high-end fault-tolerant computer |
CN103581247A (en) * | 2012-07-30 | 2014-02-12 | 杭州洱海科技有限公司 | Method for testing distributed type Web based on cloud computing environment |
CN104077212A (en) * | 2013-03-26 | 2014-10-01 | 阿里巴巴集团控股有限公司 | Pressure test system and method |
CN104536899A (en) * | 2015-01-20 | 2015-04-22 | 成都益联科创科技有限公司 | Software deploying and maintaining method based on intelligent cluster |
CN105207844A (en) * | 2015-09-07 | 2015-12-30 | 浪潮(北京)电子信息产业有限公司 | Method for testing server stability and system thereof |
-
2016
- 2016-05-04 CN CN201610290565.7A patent/CN107347013B/en not_active Expired - Fee Related
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1760839A (en) * | 2004-10-12 | 2006-04-19 | 国际商业机器公司 | Apparatus, system, and method for facilitating port testing of a multi-port host adapter |
CN1750486A (en) * | 2005-08-16 | 2006-03-22 | 西安电子科技大学 | Network measuring system structure and its realizing method |
CN1963763A (en) * | 2005-11-09 | 2007-05-16 | 同济大学 | Dynamic online scheduling system in gridding circumstance and its scheduling method |
CN101212362A (en) * | 2006-12-26 | 2008-07-02 | 中兴通讯股份有限公司 | Automatic testing device and method incorporating a variety of testing tools |
CN102354298A (en) * | 2011-07-27 | 2012-02-15 | 哈尔滨工业大学 | Software testing automation framework (STAF)-based fault injection automation testing platform and method for high-end fault-tolerant computer |
CN103581247A (en) * | 2012-07-30 | 2014-02-12 | 杭州洱海科技有限公司 | Method for testing distributed type Web based on cloud computing environment |
CN104077212A (en) * | 2013-03-26 | 2014-10-01 | 阿里巴巴集团控股有限公司 | Pressure test system and method |
CN104536899A (en) * | 2015-01-20 | 2015-04-22 | 成都益联科创科技有限公司 | Software deploying and maintaining method based on intelligent cluster |
CN105207844A (en) * | 2015-09-07 | 2015-12-30 | 浪潮(北京)电子信息产业有限公司 | Method for testing server stability and system thereof |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109379197A (en) * | 2018-12-14 | 2019-02-22 | 网宿科技股份有限公司 | A kind of charging method and system of network acceleration service |
Also Published As
Publication number | Publication date |
---|---|
CN107347013B (en) | 2020-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106844198B (en) | Distributed dispatching automation test platform and method | |
CN103530231B (en) | Application program testing method and system based on service process control | |
US7627312B2 (en) | System and method for self-testing of mobile wireless devices | |
CN109101373B (en) | General test platform based on subscription/release mode | |
CN107197475A (en) | A kind of sensing node identifier resolution method of testing and system based on multithreading | |
Chu et al. | Open sensor web architecture: Core services | |
CN106452975B (en) | A kind of method and system of test router | |
CN102693183A (en) | Method and system for realizing automatic software testing | |
CN110162471A (en) | A kind of method for testing pressure and system based on container cloud | |
CN108255720A (en) | Software automatic test system based on cloud computing framework | |
CN110275822A (en) | Performance test methods, device, equipment and the storage medium of application programming interfaces | |
CN107832207A (en) | Interface performance test method, apparatus, storage medium and computer equipment | |
CN109739762A (en) | A kind of performance test methods and device of application program | |
CN109784708A (en) | The cloud service system that the coupling of water industry multi-model calculates | |
CN110162481A (en) | A kind of method for testing software, device, equipment and storage medium | |
CN103974312A (en) | WLAN (wireless local area network) equipment testing method, device and system | |
CN109086213A (en) | A kind of commercial vehicle network test management system and method based on distributed system | |
CN107733735A (en) | Script recording system and method | |
CN109800081A (en) | A kind of management method and relevant device of big data task | |
CN113438126B (en) | Distributed online test system applied to block chain domain name system | |
CN114372105A (en) | ETL tool based method for realizing system automatic inspection | |
CN107347013A (en) | A kind of network measure method, system and measuring machine based on strategy | |
CN110380936A (en) | Test method and device | |
CN109710513A (en) | A kind of engine for the test of CBTC system automation | |
CN104834594B (en) | Web system method of testing and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200707 Termination date: 20210504 |
|
CF01 | Termination of patent right due to non-payment of annual fee |