Background technology
Web makes that application program can be with a technology that intercoms mutually with the irrelevant mode of platform and programming language, and Web service is a kind of software interface, it has described one group can pass through standardized extend markup language (eXtensible Markup Language on network, XML) operation of message transmission visit, its use based on the agreement of XML language describe the operation that will carry out or the data that will exchange with another Web service.The registration of Web service and the prerequisite of finding to be to use Web service.Briefly, the registration of so-called Web service be meant that the ISP is provided by the Web service that can provide and with this service registration to registration center, so-called discovery is meant that registration center searches the Web service that satisfies condition according to service user's query requests.
Demand to Web service can be divided into functional demand and two levels of non-functional requirement.Functional demand is meant the service function that must realize, makes the user can finish their task, thereby has satisfied the demand of practical business function.Nonfunction requirement, i.e. service quality (QoS) is meant that the user well operates the expectation of proposition to Web service, has comprised qualitative attributes such as fail safe, ease for use, reaction speed, fault-tolerance, robustness.
At present, the registration of Web service and discovery mechanism are based on functional demand mostly and register and find service, then pay close attention to fewerly for non-functional requirement, its basic reason is that existing universal description, discovery and integrated (UDDI) registration center do not support non-functional attribute, and for example existing UDDI registration center does not support the registration and the discovery of the Web service of QoS attribute.
In fact, UDDI registration center is as a Web service management of information mechanism, and the title of Web service, ID, owner information etc. just are stored in UDDI registration center.Then may be stored in UDDI registration center but the interface of this Web service is described document, also may be stored in other position outside the UDDI registration center, point to the pointer of describing the document storage position and only preserve one in UDDI registration center.If one information stores is in UDDI registration center, the user is as long as just can have access to this information by suitable parameters; If information is not to be stored in UDDI registration center, the result of user capture UDDI registration center only is a descriptor that has obtained about information, pointer for example need further be visited the particular location of stored information by descriptor, just can obtain corresponding information.
In order to realize the Web service registration and discovery based on QoS, currently used main mode is UDDI registration center to be carried out the expansion of non-functional, makes it register and to find the Web service with QoS attribute.The best way of supporting issue can search for the QoS data in UDDI is technology model (tModel), this is because tModel is a general data structure, any tissue can use tModel to describe the details of service that they provide, comprising the information of QoS aspect.
Though can realize registering and finding by spreading UDDI,,, not be suitable for the QoS information of dynamic real-time change so this method only is fit to static QoS information because UDDI itself is not generally upgraded continually based on the Web service of QoS.In addition, the difficulty that the UDDI that becomes standard is expanded is bigger, and, the UDDI that has disposed is carried out the function expansion can receive its possessory resistance, and cost is also than higher.Therefore, the realization cost of this method is higher, is not easy to dispose realize.
The another kind of mode that realizes having the Web service registration of QoS and find is when introducing new module, and UDDI is expanded.For example, find to have introduced " serving certifier (Certifier) " module in the model in a kind of Web service of the QoS of having attribute, this module is equivalent to third party authentication center.When ISP issue had the Web service of QoS attribute, serving certifier's module can be allowed to its QoS be carried out necessary authentication before registration enters UDDI registration center in Web service.Simultaneously, this method is expanded UDDI registration center, on original commercial entity's information (businessEntity), commerce services information (businessService), binding information (bindingTemplate), publisher assert the basis of information (publisherAssertion) and tModel, introduce quality information (QualityInformation) data cell, be used for preserving ISP's issue and through the QoS attribute after serving the certifier and authenticating.
In this method, though deposited the QoS property value in the QualityInformation data cell, this is the ISP provides when the issue Web service, and the supplier may exaggerate its QoS ability for number one.On the other hand, some qos value is not unalterable, as the average response time of Web service, failure rate etc., so the service user can not trust this qos value fully in this model.Simultaneously, UDDI is not suitable for storing this type of dynamic QoS information.As can be seen, this method does not reasonably authenticate QoS, does not measure and monitoring qos yet.
Summary of the invention
In view of this, the present invention proposes a kind of Web service registration and discovery system and method thereof based on QoS, its purpose is, based on QoS Web service registered and found under the prerequisite that existing UDDI registration center is expanded need not.Further aim of the present invention is to monitor and measure the QoS of Web service effectively.
The invention provides a kind of Web service registration and discovery system according to above-mentioned purpose based on QoS, comprise: UDDI registration center, be used for receiving information agency when representing the Web service register requirement that the ISP submits to from QoS, carry out conventional Web service registration and return succeed in registration after the identifier ID of this Web service, receiving information agency when representing the query requests that the service user submits to, return and satisfy the Web service tabulation that requires in this query requests from QoS; The QoS information agency, be used for when the Web service register requirement that receives from ISP's the QoS information that carries, content except that described QoS information in this register requirement is sent to described UDDI registration center carries out conventional Web service registration, and preserve described QoS information and from UDDI registration center return succeed in registration after the corresponding relation of ID of this Web service; Receive from the service user carry the query requests of qos requirement the time, content except that described qos requirement in this query requests is sent to UDDI registration center, press functional attributes inquiry Web service, and the Web service tabulation of returning from UDDI registration center, satisfy the Web service of described qos requirement according to described corresponding relation screening, and return the described Web service of satisfying qos requirement to the service user and tabulate.
Described QoS information agency comprises: QoS service registry module, be used for when the Web service register requirement that receives from ISP's the QoS information that carries, content except that described QoS information in this register requirement is sent to described UDDI registration center carries out conventional Web service registration, and in the QoS information bank, preserve described QoS information and from UDDI registration center return succeed in registration after the corresponding relation of ID of this Web service; The QoS information bank is used to store the QoS information of each Web service and the corresponding relation of ID; And QoS service lookup module, be used for receive from the service user carry the query requests of qos requirement the time, content except that described qos requirement in this query requests is sent to UDDI registration center, press functional attributes inquiry Web service, and the Web service tabulation of returning from UDDI registration center, satisfy the Web service of described qos requirement according to institute's stored relation screening in the QoS information bank, and return the described Web service of satisfying qos requirement to the service user and tabulate.
Described QoS service registry module is further used for when the Web service register requirement that receives from ISP's the QoS information of not carrying, this register requirement is sent to described UDDI registration center carries out conventional Web service registration, and in the QoS information bank, preserve default QoS information and from UDDI registration center return succeed in registration after the corresponding relation of ID of this Web service;
Described QoS service lookup module be further used for receive from the service user do not carry the query requests of qos requirement the time, this query requests is sent to UDDI registration center, press functional attributes inquiry Web service, and will return the Web service tabulation of returning from UDDI registration center to the service user.
Described QoS service lookup module is further used for when the described Web service tabulation of satisfying qos requirement is sky, and the service list that has with the approaching QoS information of described qos requirement in the middle of the described Web service of returning from UDDI registration center is tabulated sends to the service user.
Described QoS service lookup module is further used for returning the information of inquiry failure to the service user when the described Web service tabulation of returning from UDDI registration center is sky.
Described QoS information agency further comprises: the QoS monitor module, being used for the monitor service supplier provides Web service and service user to use the situation of Web service, obtain the performance information of Web service, and the performance information of described Web service is offered the QoS evaluation module; And the QoS evaluation module, be used for estimating this Web service according to the performance information of described Web service, obtain evaluation result, and according to the QoS information corresponding with this Web service in this evaluation result correction QoS information bank.
The present invention also provides a kind of Web service registration and discover method based on QoS, comprise: when the Web service register requirement that receives from ISP's the QoS information that carries, content except that described QoS information in this register requirement is sent to described UDDI registration center, carry out conventional Web service registration, and preserve described QoS information and from UDDI registration center return succeed in registration after the corresponding relation of ID of this Web service; Receive from the service user carry the query requests of qos requirement the time, content except that described qos requirement in this query requests is sent to UDDI registration center, press functional attributes inquiry Web service, and the Web service tabulation of returning from UDDI registration center, satisfy the Web service of described qos requirement according to described corresponding relation screening, and return the described Web service of satisfying qos requirement to the service user and tabulate.
When the Web service register requirement that receives from ISP's the QoS information of not carrying, this register requirement is sent to described UDDI registration center, carry out conventional Web service registration, and preserve default QoS information and from UDDI registration center return succeed in registration after the corresponding relation of ID of this Web service.
Receive from the service user do not carry the query requests of qos requirement the time, this query requests is sent to UDDI registration center, press functional attributes inquiry Web service, and will return the Web service tabulation of returning from UDDI registration center to the service user.
When the described Web service tabulation of satisfying qos requirement when empty, the service list that has with the approaching QoS information of described qos requirement in the middle of the described Web service tabulation of returning from UDDI registration center is sent to the service user.
When the described Web service tabulation of returning from UDDI registration center is sky, return the information of inquiry failure to the service user.
The situation that monitor service supplier provides Web service and service user to use Web service is obtained the performance information of Web service, and preserves the Web service performance information that is obtained; Estimate this Web service according to the performance information of performance information that is obtained and previous preservation and obtain evaluation result, and the QoS information corresponding with this Web service according to described evaluation result correction.
As can be seen, the present invention does not expand existing registration center from such scheme, but introduces new module---QoS information agency in system, by registration and the discovery of QoS information agency realization to Web service QoS information.QoS information agency and the collaborative work of existing registration center realize based on QoS registration and discovery Web service.
Therefore the present invention has following advantage: at first, the present invention is easier to be accepted, and need not advantage that existing registration center is expanded because it has, and be easy to dispose and realize, and the cost of realizing is lower.Secondly, because operations such as the issue of Web service QoS information, inquiry, renewal all realize, can realize more easily Web service registration and discovery in the QoS information agency according to user's requirement based on QoS.Once more, the QoS information agency is as third party trusty, and the service QoS information of being found by it is just, believable.At last, because the QoS of Web service is the information of dynamic change, the present invention can monitor and reflect the up-to-date QoS ability of service in real time, and this change information do not register in UDDI, more can adapt to the dynamic and the extensibility of service.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, the present invention is described in more detail by the following examples.
The present invention has increased the QoS information agency outside UDDI registration center, to realize registration and the discovery to Web service QoS information.
Fig. 1 be according to the embodiment of the invention based on the model of the Web service of QoS registration with the system of discovery.With reference to Fig. 1, this model comprises ISP, service user, UDDI registration center and QoS information agency.
Wherein, the ISP submits to the QoS information agency and has the Web service register requirement of QoS attribute.In that (Web Service Description Language WSDL) this Web service of document description the time, not only carries out the description of service function aspect, has also described the qos value of service with WSDL.Described qos value is determined by the ISP in the time of the first registers service.Because the ISP may exaggerate self service quality in order to obtain more benefits, so the qos value that the ISP provided is normally worthless.QoS information agency provided by the present invention is with the supervision of third party's identity, evaluation and update service supplier's QoS ability, thereby avoided the problems referred to above.It should be noted that in the prior art ISP's register requirement has directly sent to registration center, the register requirement of the ISP among the present invention is then passed through the QoS information agency earlier.
The service user sends query requests based on the QoS demand of functional demand and non-functional to the QoS information agency, and inquiry meets the Web service that oneself requires.It should be noted that in the prior art service user's query requests has directly sent to registration center, the query requests of the service user among the present invention is then passed through the QoS information agency earlier.
Registration center is the service register center of a commerce, and present embodiment is an example with UDDI registration center.Similar to registration center of the prior art, UDDI registration center in the present embodiment has following basic function at least: receiving from QoS information agency when representing the Web service register requirement that the ISP submits to, carry out conventional Web service registration and return succeed in registration after the identifier (ID) of this Web service, receiving information agency when representing the query requests that the service user submits to from QoS, press the attribute query Web service, and return the Web service tabulation of satisfying functional requirement in this query requests, wherein comprise the ID of the Web service that meets the demands at least.Certain registration center of the present invention can also have other function of the prior art, and top description is not to be used for limiting registration center among the present invention.
As shown in Figure 1, the QoS information agency is between registration center and ISP and service user.QoS information agency in the present embodiment is when the Web service register requirement that receives from ISP's the QoS information that carries, content except QoS information in this register requirement is sent to registration center, carry out conventional Web service registration, and preserve from this Web service register requirement, extract QoS information and from registration center return succeed in registration after the corresponding relation of ID of this Web service.
In addition, the QoS information agency receive from the service user carry the query requests of qos requirement the time, content except that qos requirement in this query requests is sent to registration center, press functional attributes inquiry Web service, and receive the Web service tabulation of returning from registration center, at least the ID that comprises Web service in this Web service tabulation, the corresponding relation of being preserved when the QoS information agency is according to this Web service tabulation and registration then obtains the qos value of each service in the Web service tabulation, search the Web service of satisfying qos requirement in the above-mentioned query requests therein, and return the described Web service tabulation of satisfying qos requirement to the service user.If the described Web service tabulation of satisfying qos requirement is sky, when promptly not satisfying the Web service of described qos requirement, the service that described QoS information agency has with the approaching QoS information of described qos requirement in the middle of further the described Web service of returning from registration center can being tabulated sends to the service user, how to select by service user's decision, for example determine whether to reduce qos requirement and from candidate list, select service.
Further, the QoS information agency of present embodiment can also the monitor service supplier provide Web service and service user to use the situation of Web service, obtain the performance information of Web service, and estimate this service according to the performance information of described Web service and obtain evaluation result, the QoS information corresponding in the corresponding relation that correction is preserved according to evaluation result then with this Web service.After obtaining the performance information of Web service, the QoS information agency also can be preserved these performance informations; When estimating, the QoS information agency can be estimated this Web service according to current performance information that obtains and the previous performance information of preserving, and obtains evaluation result.
With reference to Fig. 1, the QoS information agency of present embodiment comprises QoS service registry module, QoS service lookup module and QoS information bank, can further include QoS monitor module and QoS evaluation module.
Wherein, after QoS service registry module receives QoS service registry request from the ISP, QoS information is wherein taken out, and the out of Memory in will asking sends to registration center as the service registry request of routine.After registration center receives the Web service register requirement, realize the registration of serving, and return the ID of this service after succeeding in registration according to the mode of conventional Web service registration.QoS service registry module records the QoS information of this service ID with this service of previous taking-up in the QoS information bank after receiving the service ID of returning from registration center, that is, in the QoS information bank, write down the ID of service and the corresponding relation of QoS information.
In each record in the QoS information bank, promptly all comprise the ID that this Web service overall situation of returning from registration center is unique and the QoS information of this Web service in each corresponding relation.The QoS information bank provides the function of increase, inquiry, modification and deletion record to other module.In addition, the QoS information bank can also be preserved the performance information of each Web service.
The QoS service lookup module is after the QoS service-seeking request that receives from the service user, because comprised functional requirement and the qos requirement of QoS user to service in the QoS service-seeking request, the QoS service lookup module at first sends to registration center with the content except qos requirement in this query requests.Here said QoS service-seeking request from the service user can be directly to receive from the service user, also can be the agency's reception from the service user.After the QoS service lookup module receives the Web service tabulation of satisfying functional requirement that registration center returns, at all services in the tabulation, the QoS information of these services of inquiry in the QoS information bank, and according to the qos requirement in the QoS service-seeking request, the Web service tabulation is screened, i.e. rejecting is not satisfied the service of qos requirement and is kept the service of satisfying qos requirement, then the resulting Web service tabulation of satisfying qos requirement is returned to the service user.Because last return results is to be included in from the tabulation that registration center returns, so also satisfy service user's functional requirement natch.
If the described Web service tabulation of satisfying qos requirement is sky, when promptly not satisfying the Web service of described qos requirement, the service that the QoS service lookup module has with the approaching QoS information of described qos requirement in the middle of further the described Web service of returning from registration center can being tabulated sends to the service user, tabulate as candidate service, how to select by service user's decision, for example determine whether to reduce qos requirement and from candidate list, select service.
QoS monitor module monitor service supplier provides the situation of service and the situation that the service user uses service, obtain the performance information of Web service, comprise current service state (available, unavailable) and task status (submission time, time started, deadline, task run succeeded or failure etc.).Because the information service that provides in the Web service standard can provide all information of ISP, for example comprise use information, Web state of resources information of Web service etc., so the QoS monitor module can obtain the Web service performance information that will obtain easily.The QoS monitor module has obtained after the performance information of above-mentioned Web service, and the performance information of these Web services is sent to the QoS evaluation module.The QoS monitor module can also further be saved in these Web service performance informations in the QoS information bank.
The QoS evaluation module receives after the Web service performance information that obtains from the QoS monitor module, according to these performance informations, the QoS evaluation is carried out in Web service obtained evaluation result.The QoS evaluation module also can carry out QoS according to these performance informations and this service of obtaining performance information in the past and estimate and obtain evaluation result from the QoS information bank.Then, the QoS evaluation module is revised the corresponding QoS information of this service in the QoS information bank according to evaluation result, with the QoS information that reflects that this service is true, real-time, thereby overcome the shortcoming that qos value in the prior art is unalterable, make the service user be difficult to trust.
Web service registration and discover method based on QoS according to the embodiment of the invention are described below.
Fig. 2 is the schematic flow sheet according to the Web service registration process of the embodiment of the invention.With reference to Fig. 2, this registration process may further comprise the steps:
Step 201, QoS information agency receive the service registry request of ISP's the QoS information of carrying.
Step 202, QoS service registry module is extracted QoS information from register requirement, and the information except QoS information in the register requirement (function information of service) is sent to registration center.
UDDI registration center registers in a conventional way, and the unique ID of this service after will succeeding in registration in registration center returns to QoS service registry module.
Step 203, QoS service registry module is saved in the corresponding relation of this ID and the QoS information extracted in the QoS information bank from register requirement.
Step 204, QoS service registry module can also further return to the ISP with registering result.
If the service registry request that the QoS information agency receives had both comprised the register requirement that carries QoS information, also comprise the register requirement of not carrying QoS information, registration process is as follows so:
Step 201, QoS information agency receive ISP's service registry request, and the register requirement here may be the register requirement that carries QoS information, also may be the register requirement of not carrying QoS information.
Step 202, QoS service registry module are extracted QoS information from the register requirement that carries QoS information, and the information except QoS information in this log-on message is sent to UDDI; In addition, the QoS service registry module register requirement that will not carry QoS information sends to UDDI.Like this, the present invention can be applied to the conventional register requirement of not carrying QoS information.
UDDI registration center registers in the usual way, and this service after will succeeding in registration returns to QoS service registry module at unique ID of registration center.Because what send to UDDI registration center all is the register requirement of not carrying QoS information, so the present invention need not UDDI registration center is expanded.
Step 203, for the register requirement that carries QoS information, QoS service registry module is saved in the corresponding relation of the ID of the service of this register requirement and the QoS information extracted in the QoS information bank from this register requirement.
For the register requirement of not carrying QoS information, QoS service registry module is saved in the corresponding relation of the QoS information of the ID that serves in this register requirement and acquiescence in the QoS information bank.The present invention provides the QoS information of giving tacit consent to for the register requirement of not carrying QoS information of routine, and the QoS information of acquiescence sets in advance, and has solved the problem that lacks QoS information in the conventional register requirement.
Step 204, QoS service registry module can also further return to the ISP with registering result.
Fig. 3 be according to the embodiment of the invention the schematic flow sheet of Web service discovery procedure.With reference to Fig. 3, this discovery procedure comprises step:
Step 301, QoS information agency receive the query requests of carrying qos requirement from the service user.
Before this, the service user uses Web service level protocol (Web Service LevelAgreement, WSLA) be described formation service-seeking request from functional and two aspects of QoS to own service request, then the QoS information agency submitted in the service-seeking request.
Step 302, the QoS service lookup module sends to UDDI registration center with the content except that the QoS request in this query requests.
The tabulation of the Web service of the functional requirement that is met the service user is searched according to this query requests by UDDI registration center, and tabulation is returned to the QoS service lookup module.
Step 303 judges whether the Web service tabulation of returning from registration center is empty, if be empty, the service that does not promptly meet the functional requirement of service user is registered, and then execution in step 304 in UDDI, otherwise execution in step 305.
Step 304, the QoS service lookup module is returned the inquiry failure response of the Web service of not satisfying its functional requirement to the service user, and service discovery process finishes.
Step 305, the QoS service lookup module is according to unique ID of each service in the returning Web service tabulation, the QoS information of each service of inquiry in the QoS information bank, screen according to the QoS information that inquiry obtains, i.e. rejecting is not satisfied the service of service user's qos requirement and is kept the service of satisfying qos requirement.
Step 306 judges whether to satisfy the service of qos requirement, if the service of satisfying qos requirement is arranged, the QoS service lookup module returns to the service user with the resulting Web service tabulation of satisfying qos requirement.If do not satisfy the service of service user's qos requirement, be that the Web service tabulation that the screening of QoS service lookup module obtains is sky, the QoS service lookup module can directly return to the service user with the result, also can will return to the service user as candidate's service near the service of service user's qos requirement, how to select by service user's decision, for example determine whether to reduce qos requirement and from candidate list, select service.
In addition, for the query requests of not carrying qos requirement, the QoS service lookup module sends to UDDI registration center with this query requests.To return to service requester from the result that UDDI registration center returns then.
Fig. 4 is according to the QoS information monitoring of the embodiment of the invention and the schematic flow sheet of renewal process.With reference to Fig. 4, this supervision comprises with the flow process of upgrading:
Step 401 is to step 402, QoS monitor module monitor service supplier provides the situation of service and the situation that the service user uses service, obtain the performance information of Web service, comprise current service service state (available, unavailable) and task status (submission time, time started, deadline, task run succeeded or failure etc.).Because the information service that provides in the Web service standard can provide all information of ISP, for example comprise the use information, Web state of resources information of Web service etc., therefore can obtain the Web service performance information that will obtain easily.In this step, can also further preserve resulting Web service performance information.
Step 403 has been obtained after the performance information of above-mentioned Web service, and the QoS monitor module sends to the QoS evaluation module with these performance informations.The QoS evaluation module carries out the QoS evaluation according to these performance informations to Web service and obtains evaluation result.The QoS evaluation module also can carry out QoS according to these performance informations and this service of obtaining performance information in the past and estimate and obtain evaluation result from the QoS information bank.
Step 404, the QoS evaluation module is revised the corresponding QoS information of this service in the QoS information bank according to evaluation result, with the QoS information that reflects that this service is true, real-time, thereby overcome the shortcoming that qos value in the prior art is unalterable, make the service user be difficult to trust.
The above only is preferred embodiment of the present invention, and is in order to restriction the present invention, within the spirit and principles in the present invention not all, any modification of being done, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.