The Distributed Measurement System of Web service quality and method
Technical field
The present invention relates to Distributed Measurement System and the method for a kind of Web service quality Q oS, particularly relate to a kind of method and system of the Web service mass measurement based on distributed structure/architecture, belong to the technical field of cyber-net communication.
Background technology
Web service is the technology of a kind of Service-Oriented Architecture Based (Service-Oriented Architecture), service is provided by the Web agreement of standard, ensure that the application service of different platform can interoperability, its communication protocol, mainly based on SOAP, is found by UDDI and is obtained the metadata of service.Due to dynamic and the unpredictability of internet, same services different user sides to present result difference larger, simultaneously in network, the same or analogous Web service of function is numerous, and the user how for different geographical, different network environments selects suitable service to become a key issue.
In prior art, relevant Web service QoS measure or estimation mainly contain following implementation:
Document " Distributed QoS evaluation for real-world Web Services " (is published in: In Proc.8th IEEE International Conference on Web Services (ICWS2010), 2010,) describing a kind of distributed Web service QoS method for automatic measurement, its purpose of design is the QoS data collection for providing real world based on the Web service technology of QoS and model.The method is measured the reliability of Web service, response time and throughput.First, by being distributed in user's called Web service of different geographical, utilize the measurement result of each user to calculate the overall reliability of Web service.Secondly, user is utilized to call directly for QoS collection provides data the actual of service.In this technical scheme, user needs to participate in actual Web service invoked procedure, adds the burden of user; And the data set provided belongs to initial data, overall computational methods for service QoS attribute do not consider the feature that service QoS is relevant to region, it is only the measurement data of comprehensive all users, instead of the QoS that Web service presents at user side, its result is little for the practical significance of user.
Document " a scalable hybrid collaborative filtering algorithm for personalized WebService recommendation " (is published in: RegionKNN:In Proc.8th IEEE InternationalConference on Web Services (ICWS2010), 2010) content introduced: user side QoS estimates technological subject and realizes based on collaborative filtering: first calculate user's similarity and Web service similarity, analyze and find out the user with tested user with certain similarity, as similar neighborhood.Finally, estimate that targeted customer holds the service QoS property value that can obtain by the QoS attribute of similar Web service and the QoS historical record of similar neighborhood.The document considers the correlation properties of Web service QoS region, and improve collaborative filtering on this basis: first according to the geographical position of user and the similarity of user's history QoS data, user is split according to region, the QoS property value that recycling collaborative filtering estimating subscriber's end can obtain.The QoS data historical record that the method needs user to provide individual called Web service to obtain to system.Therefore, the source of its QoS data collection is that user uses the QoS historical data obtained during Web service.Because Web service QoS property value is dynamic change, the QoS historical data therefore depending on user can reduce the accuracy rate of QoS estimation.The approach simultaneously obtaining QoS data is unreliable, the standard disunity of acquisition, so be difficult to be applied in the middle of real system.
Document " WSP A Network Coordinate based Web Service Positioning Frameworkfor Response Time Prediction. " (is published in: In Proc.19th IEEE International Conferenceon Web Services (ICWS2012), 2012) System and method for proposed is a kind of Distributed Architecture of coordinate Network Based, the service response time for estimating subscriber's end can obtain: the service response time utilizing network coordinate distance and the corresponding relation of network delay to calculate user side can to obtain.In the method, the calculating of network coordinate is based on a kind of centralized network coordinate algorithm-GNP algorithm.The method combines network coordinate location technology and traditional collaborative filtering method, improves the accuracy of response time calculating.The network coordinate algorithm that it adopts is based on GNP method, the Distributed Architecture that this centralized coordinate algorithm and its system adopt is inconsistent, the network delay that the node measurement of distributed deployment obtains all will send a Centroid to, completed the calculating of network coordinate by Centroid, have impact on the real-time of extensibility and result of calculation like this.
Summary of the invention
In view of this, the object of this invention is to provide a kind of Distributed Measurement System and the method that can solve the Web service quality of prior art defect, the QoS property value (comprising response time and reliability) presented at user side for providing various Web service quickly and accurately for the user under different geographical and/or different network environments; Meanwhile, the estimation process of this QoS is to user transparent, and user does not need to install any client modules.And QoS estimates data used does not rely on user's historical data, the accuracy estimated can be ensured.
In order to achieve the above object, the invention provides a kind of service quality QoS Distributed Measurement System of Web service, it is characterized in that: this system is according to Web service QoS estimation models, utilize network location technology to calculate subscriber's main station, multiple measured node and Web service respectively and dispose main frame, the i.e. service arrangement node coordinate in abstract network coordinate system, i.e. network coordinate, calculate the similarity of subscriber's main station and measured node again, so that the QoS property value that estimating subscriber's can obtain; Described Web service QoS estimation models is the multidimensional coordinate network described with Euclidean space, corresponding with a point in this multidimensional coordinate space respectively with each node of user comprising Centroid, measured node, service arrangement node, and the dimension of this multidimensional coordinate network is identical with measured node number; Described network coordinate is a kind of coordinate for predicting the Internet distance with extensibility, and it is made up of the present coordinate values of node and error current; In network system, each node only need measure the network coordinate that just can obtain this node through a small amount of; Again according to the computational methods preset, utilize the network coordinate of any two nodes, just can predict network distance between the two; This system is provided with: Centroid and multiple measured node, wherein:
Centroid, is responsible for accepting and the process request of subscriber's main station, the scheduling each measured node being performed respectively to measurement task, the Similarity Measure of subscriber's main station and measured node and measurement result analysis; Be provided with four parts: task scheduling modules, interpretation of result device, similarity calculation module and database; Four component functions of this Centroid are as follows:
Task scheduling modules, as the control hinge of this Centroid, be responsible for the registration of each measured node, receive the estimation request of subscriber's main station, i.e. user QoS and respond, and whole system measures the distribution of task: receive user and comprise its IP address, when needing the QoS estimation request of the Web service mark in systems in which measured, this task scheduling modules just sends measuring command to measured node, by the IP address distribution of this user to measured node all in system, and distribute measurement task; After completing QoS estimation, result is returned to user;
Interpretation of result device, for the network coordinate according to the user measured and service arrangement node, and the similarity of user and each measured node, calculate the service QoS property value comprising response time and reliability that user can obtain, and result of calculation is stored in database; The described response time is that interpretation of result device obtains user coordinates and service arrangement node coordinate from database, calculate network distance, the i.e. simple object access protocol message network transfer delay L between user and service arrangement main frame between the two, adding the processing time of this service, is exactly the response time of this service; Described reliability is that interpretation of result device is according to the service call result in the setting period stored in database, calculate the ratio that each measured node in this period calls the number of success call number total with it of this service, each exactly measured node obtains this reliability of service numerical value, and this user of Similarity Measure recycling each measured node and user can obtain this reliability of service numerical value; The described setting period is by user's sets itself;
Similarity calculation module, be responsible for the network coordinate obtaining user and each measured node from database, according to the network distance between user to each measured node, calculate the similarity of user and each measured node, for the QoS property value that task scheduling modules and interpretation of result device utilize this Similarity value selection measured node and calculating user to obtain respectively; In this system, the similarity of user and each measured node depends on network distance between the two: distance is nearer, and similarity is higher; Otherwise namely distance is far away, then similarity is lower;
Database, for storing the network coordinate of recent renewal comprising user, measured node and service arrangement node, and each measured node measurement obtains service QoS historical data;
Multiple measured node, distributed deployment is in this system, be responsible for the order that receiving center node sends, obtain with mathematics expression Web service and its interface message and XML language WSDL (the Web Services Description Language) file how to communicate with Web service, carry out self and each measured node location, measure subscriber's main station and service arrangement node coordinate and measure Web service QoS; Be provided with: measured node control module, node locating update module, wsdl document parsing module, service QoS measurement module and database connection module be totally five parts; Five component functions of this measured node are as follows:
Measured node control module, for the order of receiving center node, with the task scheduling modules interactive communication of Centroid, calls and completes every measurement operation with the modules of control survey node;
Node locating update module, for before measurement Web service QoS, according to the network transfer delay between this measured node and other measured node, upgrades the network coordinate of own node; And measure the propagation delay time of this measured node to service arrangement node and user respectively, to upgrade both network coordinates, ensure the precision of measurement result;
Wsdl document parsing module, for resolving the wsdl document having obtained Web service in system, and generate the client code called needed for service, and comprise service name, service operations title, operating parameter title and type by what obtain, and after the analysis result serializing process of address of service, be stored in measured node, use for during measurement service QoS;
Service QoS measurement module, the information on services utilizing wsdl document parsing module to resolve to obtain and the client code automatically generated, obtain Web service operation parameter type and assignment, again actual calling is carried out to Web service, obtain response time of comprising service and call whether successfully service QoS numerical value;
Database connection module, for connection data storehouse, calls for measured node control module, node locating update module and service QoS measurement module, the read-write of data in database, interpolation and renewal.
In order to achieve the above object, present invention also offers a kind of method of measurement adopting Distributed Measurement System of the present invention, it is characterized in that: described method comprises following operative step:
Step 1, in the period measurement stage: the wsdl document parsing module of each measured node resolves the IP address that node is disposed in this Web service, node locating update module sends ping message to this IP address cycle and calculates from the network delay transmitting soap message between own node and service arrangement node; Again with service arrangement node for destination node, adopt the node coordinate update method of setting to upgrade the coordinate of this service arrangement node; The service QoS measurement module of measured node obtains the response time by called Web service, and whether record calls successful; In step 1, measured node performs following content of operation:
(11) wsdl document parsing module obtains the IP address that node is disposed in Web service;
(12) node locating update module sends ping message to this IP address cycle, and records this message two-way time in a network, then using this two-way time as the round-trip transmission time of soap message between measured node and service arrangement node;
(13) node locating update module with service arrangement node for destination node, adopt the node coordinate update method of default, namely carry out interative computation according to the present coordinate values of the network delay between the measured node of surveying and destination node and measured node, upgrade the coordinate of this service arrangement node; In this step (13), the node coordinate update method that node locating update module adopts comprises following concrete operations content:
(13a) weight of destination node changing coordinates when error and calculating is calculated
again by the changing coordinates of this destination node and measured node, adopt the method calculating Euclidean space distance calculate both current distance distance; In formula, e and e
nbe respectively the error current of the changing coordinates of destination node and measured node;
(13b) according to the relative error of this destination node coordinate of network distance numerical computations of both current distance calculated and actual measurement
and upgrade the error of coordinate of this destination node accordingly: e=relativeError × Ce × weight+e × (1-Ce × weight), in formula, latency be actual measurement from measured node to destination node between network delay, both current distance of namely surveying, Ce is the coefficient of control convergence speed in computational process;
(13c) utilize the coordinate of this destination node and measured node, calculate the moving direction of this destination node coordinate, this moving direction should be parallel with the coordinate line direction of measured node with this destination node, and make e
snumerical value reduces; Calculate again the movement value ratio=Cc × weight of this destination node coordinate × | distance-latency|, in formula, Cc is the convergence parameter of control algolithm;
(13d) result of calculation of step (13c) is utilized to upgrade the changing coordinates of this destination node;
(13e) judge whether the error amount of this destination node changing coordinates is less than setting threshold, if not, then return step (13a) and perform corresponding operating; If so, the renewal to this destination node coordinate is then stopped;
(14) after the network coordinate of service arrangement node has upgraded, service QoS measurement module obtains the response time by called Web service, and record calls whether success, for the service response time of estimating subscriber's end and reliability carry out data encasement;
Step 2, real-time measuring phases:
When Centroid receives the service QoS estimation request of user, forward this request to each measured node; After each measured node receives request, upgrade network coordinate and the user coordinates of self respectively;
The similarity calculation module of Centroid calculates the similarity of user and each measured node again, chooses K the measured node maximum with user's similarity for task scheduling modules;
This K measured node upgrades user and service arrangement node coordinate again, and measures the response time of service and calculate the processing time that current service disposes node;
The interpretation of result device of Centroid calculates the service response time and reliability that user can obtain;
This step 2 comprises following content of operation:
(21) the Web service QoS that user comprises the IP address of this user to Centroid transmission, the Web service of its needs measurement identifies in systems in which estimates to be asked;
(22) IP address in this user received request is distributed to all measured node in system by the task scheduling modules of Centroid;
(23) the node locating update module of each measured node upgrades self coordinate and user coordinates respectively:
After each measured node receives this measuring command, under its system control module controls, first between each measured node, mutually send ping message, carry out self poisoning and complete self coordinate renew; After all measured node all complete the renewal of own net coordinate, each measured node sends ping message respectively to this user, and the round network delay measured between himself node and this user, complete the estimation to this user coordinates according to described node coordinate update method method equally; Again this user coordinates is updated in database;
This step (23) comprises following concrete operations content:
(23a) ping message is sent by the current measured node upgrading self coordinate that needs respectively by node locating update module other measured node all in system, and record this message two-way time in a network, then using this two-way time as the network delay between two measured node;
(23b) from database, obtain the network coordinate of all measured node, then the network delay these network coordinates and step (23a) obtained is as the input data of node coordinate update algorithm, then, with current measured node for destination node, described node coordinate update method is utilized to calculate the new network coordinate of current each measured node;
(23c) with the network coordinate that measured node in this new network coordinate more new database stored originally;
(23d) node locating update module adopts above-mentioned steps (23a) ~ (23c) same method to upgrade the coordinate of this user;
(24) similarity calculation module of Centroid calculates similarity:
All measured node are all after completing steps (23), the similarity calculation module of Centroid takes out the coordinate after the renewal of this user and each measured node respectively from database, calculate network distance between this user and each measured node, for calculating the similarity of this user and each measured node;
(25) task scheduling modules of Centroid chooses measured node, and sends measuring command: according to the similarity calculated, task scheduling modules chooses K the node maximum with this user's similarity, sends the order continuing to measure to this K measured node;
(26) the node locating update module of measured node upgrades the coordinate of user and service arrangement node: after this K measured node receives measuring command, upgrade the coordinate of user and service arrangement node respectively, with the real-time of guaranteed qos estimation and accuracy;
(27) the service QoS measurement module of measured node measures the response time of service: the analysis service action name obtained according to wsdl document parsing module and parameter name and type, the Web service of service QoS measurement module Automatically invoked operates, and whether successful, record the response time T that this measured node calls this service if recording service call simultaneously
r; Again according to formula T
r=T
l+ T
pcalculation services processing time T
p, and be stored in database, use for during interpretation of result; In formula, T
lfor the transmission time of soap message between this measured node and this service arrangement node, the network distance namely calculated by the coordinate of measured node and service arrangement node;
(28) response time and the reliability of this service estimated respectively by the interpretation of result device of Centroid:
According to the user coordinates in database and service arrangement node coordinate, by the distance calculating method calculating network distance between the two in Euclidean space, i.e. the transmission time T of soap message between this user and this Web service
l, then according to T
r=T
l+ T
pcalculate the response time that user can obtain service;
According to the service call result in the setting-up time section of the storage in database, calculate each measured node k and obtain this reliability of service P
k, this P
knumerical value be that in setting-up time section, measured node k calls the number of success of this service and the ratio of total call number; Recycle the similarity of this user and this K measured node, according to formula
calculate the reliability of service that user can obtain, in formula, W
kfor the proportion that the similarity of measured node k and this user accounts in all K measured node and this user's similarity sum;
(29) will result be estimated, and comprise response time and reliability, return to user.
Key technology of the present invention is: can estimate based on the measuring system of the Web service quality of distributed structure/architecture and method of measurement thereof the Web service QoS (comprising response time and reliability) that user side under different geographical and/or different network environments can obtain rapidly, exactly, the inventive method real-time, do not rely on the history QoS data of user, extra burden is not increased again to user, and estimation process all-transparent.The innovative point of the inventive method is mapped in multidimensional coordinate system by network system, and in conjunction with the similitude of measured node and subscriber's main station, infer response time and the reliability of the Web service presented at user side, data are true, credible.
Compared with prior art, advantage of the present invention is: the QoS estimating and measuring method proposing similarity between a kind of coordinate model Network Based and node, present system and method utilize distributed measured node to measure the Web service QoS based on WSDL, then according to measurement data, real-time estimation is carried out to the service quality that Web service presents at user side, namely on the basis of actual measurement data, QoS estimation is carried out, estimation process is to user transparent, the QoS historical data of user is not relied on yet, and user does not increase any burden, can receive and respond ping message to the sole requirement of user, improve the extensibility of measuring system.
Invention also contemplates that the characteristic of service QoS dynamic change, solve the approach obtaining QoS data unreliable, the skimble-scamble problem of standard of acquisition, ensure that the accuracy that QoS estimates simultaneously.Moreover the network coordinate algorithm that the present invention adopts is a kind of distributed algorithm, the measuring process of each measured node is independent, be independent of each other, and is easy to add new measured node; Further, there is respective change according to the real-time measurement values of network distance in network coordinate, real-time, can meet user to the demand obtaining service real-time quality attribute.In addition, similarity concept between the node that the present invention introduces, for choosing measured node and result of calculation, saves overhead, ensures the accuracy measured.Therefore, the present invention has good popularizing application prospect.
Accompanying drawing explanation
Fig. 1 is the Distributed Measurement System structure composition schematic diagram of Web service QoS.
Fig. 2 is the estimation models schematic diagram (wherein the position of node on behalf service arrangement main frame in geometric space is disposed in Web service) of Web service QoS.
Fig. 3 is Web service QoS estimating and measuring method operating procedure flow chart.
Fig. 4 is Web service QoS real-time estimation stage sequential chart;
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, the present invention is described in further detail.
See Fig. 1, introduce the structure composition of Web service QoS Distributed Measurement System of the present invention:
This system is according to Web service QoS estimation models, utilize network location technology to calculate subscriber's main station, multiple measured node and Web service respectively and dispose main frame (the i.e. service arrangement node) coordinate in abstract network coordinate system, calculate the similarity of subscriber's main station and measured node again, so that the QoS property value that estimating subscriber's can obtain.System is provided with: Centroid and multiple measured node.Wherein:
Centroid, is responsible for accepting and the process request of subscriber's main station, the scheduling each measured node being performed respectively to measurement task, the Similarity Measure of subscriber's main station and measured node and measurement result analysis; Be provided with four parts: task scheduling modules, interpretation of result device, similarity calculation module and database.All parts abbreviated functional description is as follows:
Task scheduling modules: as the control hinge of this Centroid, be responsible for the registration of each measured node, receive the estimation request of subscriber's main station, i.e. user QoS and respond, and whole system measures the distribution of task: receive user and comprise its IP address, when needing the QoS estimation request of the Web service mark in systems in which measured, this task scheduling modules just sends measuring command to measured node, by the IP address distribution of this user to measured node all in system, and distribute measurement task; After completing QoS estimation, result is returned to user.
Interpretation of result device: for the network coordinate according to the user measured and service arrangement node, and the similarity of user and each measured node, calculate the service QoS property value comprising response time and reliability that user can obtain, and result of calculation is stored in database;
Similarity calculation module: be responsible for the network coordinate obtaining user and each measured node from database, according to the network distance between user to each measured node, calculate the similarity of user and each measured node, for the QoS property value that task scheduling modules and interpretation of result device utilize this Similarity value selection measured node and calculating user to obtain respectively; In this system, the similarity of user and each measured node depends on network distance between the two: distance is nearer, and similarity is higher; Otherwise namely distance is far away, then similarity is lower;
Database: for storing the network coordinate of recent renewal comprising user, measured node and service arrangement node, and each measured node measurement obtains service QoS historical data.
Multiple measured node, distributed deployment is in this system, be responsible for the order that receiving center node sends, obtain with mathematics expression Web service and its interface message and XML language WSDL (the Web Services Description Language) file how to communicate with Web service, carry out self and each measured node location, measure subscriber's main station and service arrangement node coordinate and measure Web service QoS; Be provided with: measured node control module, node locating update module, wsdl document parsing module, service QoS measurement module and database connection module be totally five parts.All parts function declaration is as follows:
Measured node control module: for the order of receiving center node, with the task scheduling modules interactive communication of Centroid, calls and completes every measurement operation with the modules of control survey node.
Node locating update module: for before measurement Web service QoS, according to the network transfer delay between this measured node and other measured node, upgrade the network coordinate of own node; And measure the propagation delay time of this measured node to service arrangement node and user respectively, to upgrade both network coordinates, ensure the precision of measurement result.
Wsdl document parsing module: for resolving the wsdl document having obtained Web service in system, and generate the client code called needed for service, and comprise service name, service operations title, operating parameter title and type by what obtain, and after the analysis result serializing process of address of service, be stored in measured node, use for during measurement service QoS.
Service QoS measurement module: the information on services utilizing wsdl document parsing module to resolve to obtain and the client code automatically generated, obtain Web service operation parameter type and assignment, again actual calling is carried out to Web service, obtain response time of comprising service and call whether successfully service QoS numerical value.
Database connection module: for connection data storehouse, calls for measured node control module, node locating update module and service QoS measurement module, the read-write of data in database, interpolation and renewal.
The network coordinate of present system is a kind of coordinate for predicting the Internet distance with extensibility, and this network coordinate is made up of the present coordinate values of node and error current.In network system, each node only need measure the network coordinate that just can obtain this node through a small amount of; Again according to the computational methods preset, utilize the network coordinate of any two nodes, just can predict network distance between the two.
See Fig. 2, the overview (being illustrated as three-dimensional coordinate system) of the multidimensional coordinate network described with Euclidean space selected by the Web service QoS estimation models introducing present system.Whole system is provided with: Centroid, measured node, service arrangement node and user, and wherein each node is corresponding with a coordinate points in this multidimensional coordinate space respectively, and the dimension of this multidimensional coordinate network is identical with measured node number.Whole N number of measured node in system is numbered respectively in order one by one, and the kth dimension coordinate initial value setting a wherein kth measured node is 0, all the other each dimension coordinate initial values are random value, and its each coordinate figure all dynamically updates (wherein along with the change of network state, N and k is natural number, and k is less than or equal to N).This network coordinate system of foundation described above, the different coordinates of targeted customer's node, service arrangement node, measured node can be passed through, calculate the similarity of user and each measured node, and the Web service QoS property value that can obtain targeted customer (user pay close attention to most be service response time and reliability) is estimated, the present invention exactly for measure and estimate this two Web service QoS attribute value, below these two parameters of brief description:
(A) response time: it is the most important index weighing service performance, and has the features such as relevant to region and end-to-end.Web service is called to be needed via network delivery soap message to complete the transmission of service request and response, and the passing time of soap message is then relevant with network delay; Meanwhile, service response time is also relevant with the load of service end.So, the response time of service call is decomposed: response time T
r=T
l+ T
p, in formula, T
lthe network round-trip transmission time that user calls Service delivery soap message, T
pit is the processing execution time of service.That is, response time is that interpretation of result device obtains user coordinates and service arrangement node coordinate from database, calculates network distance, i.e. simple object access protocol (Simple Object Access Protocol) the network transfer delay T of message between user and service arrangement main frame between the two
l, add the processing time T of this service
psum.
Analyze and find, the process that measured node and subscriber's main station call service is identical, that is, has similitude between them, and when the distance of user and measured node is nearer, similarity is higher; Both are far away, then similarity is lower.First to the whole N number of measured node in system be numbered respectively 1,2 ..., N}, by calculate certain measured node a (a ∈ 1,2 ..., N}) to other measured node i (i ∈ { 1,2 ..., N} and i ≠ a, namely remove all the other measured node of a) network distance L
a,iwith the network distance L of user u to measured node i
u,i, just can calculate the similarity of measured node a and user u.Such as, Pearson correlation coefficient is adopted to calculate the formula of similarity:
both calculating similarity; Wherein, Sim (u, a) is the similarity of node a and user u,
l
u,imean value,
l
a,imean value.Be noted that the formula utilizing network distance to calculate similarity is not limited to Pearson correlation coefficient, just illustrate herein.
Similarity plays very important effect in the Web service QoS of user estimates.Present system sorts to all measured node according to the similarity calculated, and chooses K the node the highest with user's similarity, for upgrading the coordinate of user and service arrangement node from all measured node.So both save the consumption of system resource, also ensure that the accuracy measuring user and the service arrangement node coordinate obtained.
According to the user coordinates after renewal and service arrangement node coordinate, by the distance calculating method calculating network distance between the two in Euclidean space, i.e. the transmission time T of soap message between this user and this Web service
l, then according to T
r=T
l+ T
pcalculate the response time that user can obtain service.
(B) reliability: the reliability of Web service is the probability of user's success called Web service.Due to different network environments, different geographical user can obtainable service reliability different, so the reliability that certain measured node measurement obtains, or the overall reliability that obtains of all measured node all can not the representative of consumer service reliability that can obtain.Present system still utilizes the similarity of user and Service measurement node to estimate reliability.
Reliability is that interpretation of result device is according to the service call result in the setting period stored in database, calculate the ratio that each measured node in this period calls the number of success call number total with it of this service, each exactly measured node obtains this reliability of service numerical value, and this user of Similarity Measure recycling each measured node and user can obtain this reliability of service numerical value.
Supposing that measured node k obtains reliability of service is P
k, then this user obtains the computing formula of this reliability of service P and is:
in formula, W
kfor the proportion that the similarity of measured node k and this user accounts in all K measured node and this user's similarity sum.
See Fig. 3, introduce two operating procedures of Distributed Measurement System of the present invention estimation QoS method flow process:
Step 1, in the period measurement stage: the wsdl document parsing module of each measured node resolves the IP address that node is disposed in this Web service, node locating update module sends ping message to this IP address cycle and calculates from the network delay transmitting soap message between own node and service arrangement node; Again with service arrangement node for destination node, the node coordinate update method of setting is adopted to upgrade the coordinate (this coordinate renew algorithm not only for upgrading the network coordinate of service arrangement node, also for upgrading the network coordinate of certain user and certain measured node) of this service arrangement node; The service QoS measurement module of measured node obtains the response time by called Web service, and whether record calls successful.
In this step 1, measured node performs following concrete operations content:
(11) wsdl document parsing module obtains the IP address that node is disposed in Web service.
(12) node locating update module sends ping message to this IP address cycle, and records this message two-way time in a network, then using this two-way time as the round-trip transmission time of soap message between measured node and service arrangement node.
(13) node locating update module with service arrangement node for destination node, adopt the node coordinate update method of default, namely carry out interative computation according to the present coordinate values of the network delay between the measured node of surveying and destination node and measured node, upgrade the coordinate of this service arrangement node.
Wherein, the node coordinate update method that node locating update module adopts comprises following particular content:
(13a) weight of destination node changing coordinates when error and calculating is calculated
again by the changing coordinates of this destination node and measured node, adopt the method calculating Euclidean space distance calculate both current distance distance; In formula, e and e
nbe respectively the error current of the changing coordinates of destination node and measured node.
(13b) according to the relative error of this destination node coordinate of network distance numerical computations of both current distance calculated and actual measurement
and upgrade the error of coordinate of this destination node accordingly: e=relativeError × Ce × weight+e × (1-Ce × weight), in formula, latency be actual measurement from measured node to destination node between network delay, both current distance of namely surveying, Ce is the coefficient of control convergence speed in computational process.
(13c) utilize the coordinate of this destination node and measured node, calculate the moving direction of this destination node coordinate, this moving direction should be parallel with the coordinate line direction of measured node with this destination node, and make e
snumerical value reduces; Calculate again the movement value ratio=Cc × weight of this destination node coordinate × | distance-latency|, in formula, Cc is the convergence parameter of control algolithm.
(13d) result of calculation of step (13c) is utilized to upgrade the changing coordinates of this destination node.
(13e) judge whether the error amount of this destination node changing coordinates is less than setting threshold, if not, then return step (13a) and perform corresponding operating; If so, the renewal to this destination node coordinate is then stopped.
(14) after the network coordinate of service arrangement node has upgraded, service QoS measurement module obtains the response time by called Web service, and record calls whether success, for the service response time of estimating subscriber's end and reliability carry out data encasement.
Step 2, real-time measuring phases:
When Centroid receives the service QoS estimation request of user, forward this request to each measured node; After each measured node receives request, upgrade network coordinate and the user coordinates of self respectively;
The similarity calculation module of Centroid calculates the similarity of user and each measured node again, chooses K the measured node maximum with user's similarity for task scheduling modules;
This K measured node upgrades user and service arrangement node coordinate again, and measures the response time of service and calculate the processing time that current service disposes node;
The interpretation of result device of Centroid calculates the service response time and reliability that user can obtain.
See Fig. 4, introduce the concrete operations content of step 2:
(21) the Web service QoS that user comprises the IP address of this user to Centroid transmission, the Web service of its needs measurement identifies in systems in which estimates to be asked.
(22) IP address in this user received request is distributed to all measured node in system by the task scheduling modules of Centroid.
(23) the node locating update module of each measured node upgrades self coordinate and user coordinates respectively:
After each measured node receives this measuring command, under its system control module controls, first between each measured node, mutually send ping message, carry out self poisoning and complete self coordinate renew; After all measured node all complete the renewal of own net coordinate, each measured node sends ping message respectively to this user, and the round network delay measured between himself node and this user, complete the estimation to this user coordinates according to described node coordinate update method method equally; Again this user coordinates is updated in database.This step comprises following concrete operations content:
(23a) ping message is sent by the current measured node upgrading self coordinate that needs respectively by node locating update module other measured node all in system, and record this message two-way time in a network, then using this two-way time as the network delay between two measured node;
(23b) from database, obtain the network coordinate of all measured node, then the network delay these network coordinates and step (23a) obtained is as the input data of node coordinate update algorithm, then, with current measured node for destination node, node coordinate update method is utilized to calculate the new network coordinate of current each measured node;
(23c) with the network coordinate that measured node in this new network coordinate more new database stored originally;
(23d) node locating update module adopts above-mentioned steps (23a) ~ (23c) same method to upgrade the coordinate of this user.
(24) similarity calculation module of Centroid calculates similarity:
All measured node are all after completing steps (23), the similarity calculation module of Centroid takes out the coordinate after the renewal of this user and each measured node respectively from database, calculate network distance between this user and each measured node, for calculating the similarity of this user and each measured node;
(25) task scheduling modules of Centroid chooses measured node, and sends measuring command: according to the similarity calculated, task scheduling modules chooses K the node maximum with this user's similarity, sends the order continuing to measure to this K measured node;
(26) the node locating update module of measured node upgrades the coordinate of user and service arrangement node: after this K measured node receives measuring command, upgrade the coordinate of user and service arrangement node respectively, with the real-time of guaranteed qos estimation and accuracy;
(27) the service QoS measurement module of measured node measures the response time of service: the analysis service action name obtained according to wsdl document parsing module and parameter name and type, the Web service of service QoS measurement module Automatically invoked operates, and whether successful, record the response time T that this measured node calls this service if recording service call simultaneously
r; Again according to formula T
r=T
l+ T
pcalculation services processing time T
p, and be stored in database, use for during interpretation of result; In formula, T
lfor the transmission time of soap message between this measured node and this service arrangement node, the network distance namely calculated by the coordinate of measured node and service arrangement node;
(28) response time and the reliability of this service estimated respectively by the interpretation of result device of Centroid:
According to the user coordinates in database and service arrangement node coordinate, by the distance calculating method calculating network distance between the two in Euclidean space, i.e. the transmission time T of soap message between this user and this Web service
l, then according to T
r=T
l+ T
pcalculate the response time that user can obtain service;
According to the service call result in the setting-up time section of the storage in database, calculate each measured node k and obtain this reliability of service P
k, this P
knumerical value be that in setting-up time section, measured node k calls the number of success of this service and the ratio of total call number; Recycle the similarity of this user and this K measured node, according to formula
calculate the reliability of service that user can obtain, in formula, W
kfor the proportion that the similarity of measured node k and this user accounts in all K measured node and this user's similarity sum;
(29) will result be estimated, and comprise response time and reliability, return to user.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.