Keywords

1 Introduction

Along with the development of semantic web [1], ontology [2] and SOA technology, the mass information in the network environment and the resources, services that enterprises providing are encapsulated into the form of Web services for using. Facing the diversity and the complexity of expressions and structures of web services, how to find the appropriate Web service rapidly and accurately according to the user’s needs in mass Web services has become the research hotspot. Efficient Web service discovery technology has become the key of using the Web service effectively.

Universal description, discovery and integration protocol (UDDI) [3] were used to support registration, description and discovery of web services. It uses the SOAP protocol to transmit messages, and the Web Services Description Language (WSDL) to describe the Web service and its interfaces. To be more precise, carefully depicting the web service’s capacity, supporting the more precise matching between users’ needs and web services’ descriptions, researchers introduced the semantic web technology [4]. With the help of logic inference of ontology, the capacity of machines’ understandable to the service description information is strengthened, and support the logical reasoning matching between users’ needs and services’ capability.

In addition, how to store, index, exchange the service metadata is also a research hotspot. In the process of the service discovery, the centralized registration and storage of the service metadata, may have the following drawbacks: (1) it is easy to generate a bottleneck of network transmission if the process involves too many network nodes; (2) when the error occurs on the UDDI server, the entire network web services’ discovery will get in the blind area. (3) There are a large number of the providers of Web services, and they may be in different locations and organizations, which requires web services registering unified on a centralized UDDI server. In fact, it is not feasible. Because certain area may have its own UDDI server, or even a business, a group may also have their own private UDDI servers.

Therefore, we need to introduce P2P technology to handle the metadata exchange, so as to overcome the restriction to service discovery caused by traditional UDDI technology service metadata centralized registration, centralized storage [5, 6]. P2P is a distributed application architecture that partitions tasks or workloads among peers. A pure P2P network does not have the notion of clients or servers but only equal peer nodes that simultaneously function as both “clients” and “servers” to the other nodes on the network [7]. Just like a Unstructured P2P networks, which do not impose any structure on the overlay networks. Peers in these networks connect in an ad-hoc fashion based on some loose set of rules [8]. However, in structured P2P networks, peers are organized following specific criteria and algorithms, which lead to overlays with specific topologies and properties [9].

The METEOR-S project, using domain ontology to describe the UDDI centers in P2P environment semanticly, and on this base semi-automatic semantic Web service search mechanism was put forward [10]. Tsinghua University proposed a web service discovery mechanism based on the P2P and semantic [11, 12]: firstly, they make the P2P network structured and divide them by grouping; then they propose two layer search mechanism. Namely, finding the possible group that service may be in at first, then find the possible service node in the group.

Here, in order to improve the performances, like efficiency of service discovery, recall and so on, we put forward a distributed service discovery strategy based on semantic in P2P environment. Firstly, we constructed an ontology model to describe the types of services, and then located the starting point of the search process on the associated Peer node based on semantic service classification; Secondly, a double layer parallel service discovery method was put forward: on UDDI layer, we used the classic keyword matching to search services in UDDI center; on the semantic layer, we used the semantic query and reasoning on the service ontology model. Finally, the performance of the proposed method was verified by experiment. Comparing with the existing methods, we pay more attention to reduce the searching hops. In the less hops, we find corresponding web services, the less search cost and the less network load we could realize and find the corresponding web service rapidly. In addition, we made full use of the characteristics of the P2P network; we didn’t deliberately stressed that the P2P network must be form in structure. Therefore, the cost of network communication could be reduced. We divide the P2P UDDI servers according to the types of services division, and advocate the web service providers register the web service according to the service domain or the regional registration.

2 Semantic Classification of UDDI Oriented Service Category Ontology Model Construction

In order to avoid the high searching overhead and improve the efficiency of searching in the P2P environment, we will build an ontology model to describe the categories of web services. Based on this kind of semantic service category, we could locate the starting point on the associated Peer node, which can be targeted for searching distributed web services, and the blindness in the searching process for distributed web services will be reduced.

Generally, which UDDI server will be selected to register the web services on follows certain rule: Web services’ providers will normally be in accordance with the principle of proximity, that means the service will be registered to the UDDI server nearby, such as the corresponding regional, national UDDI servers; In addition, the web services’ provider may also select a UDDI server to register their web services according to the type, the industry, the field and so on, of web services; finally, there is another possibility, in accordance with the organization, enterprises and other types which the web services attach to, the web services’ provider will select a UDDI registration, such as a group’s UDDI server or an organization’s UDDI server.

Considering the above, we construct the service category ontology model. Create the corresponding class of the UDDI classification criteria—the Service Classified class. This class has three subclasses, including Field, Region and Organization. At present, we have added some instances to the three classes. The instances didn’t distinguish strictly according to their types for covering more instances. The Field class includes the Petrifaction, Sale, Service, Telecommunications, Sewage Waste Treatment, Architecture, Manufacturing, Hazardous Waste Disposal, Energy Source, Aviation, Traffic and other fields’ instances; the Region class includes the Asia, South_America, North_America, Europe, Africa, Oceania, Antarctica and other regional instances; the Organization class includes the Exxon_mobil, WalMart_Stores, Sinopec, Toyota_Motor, Royal_Dutch_Shell and other organizations.

In addition, only classifying the services is not enough. We need to add the relation between the instance and the UDDI addresses storing corresponding services. So a class—Peer was put forward to express UDDI server. The Peer class has a property named URL, which represents the UDDI server’s access address. In order to reflect the relation, we add a Haspeer property between the class Service Classified and class Peer, as shown in Fig. 28.1.

Fig. 28.1
figure 1figure 1

Semantic classification of UDDI oriented service category ontology model

3 Double-Layer Parallel Service Discovery Method

The network flooding query consumes the huge costs of time and resources in the P2P environment. The costs occurred mainly in multi-hop query, because each Accumulation of the query hops’ number, the costs will exponentially increase. So, we need to find the appropriate web service, as far as possible in a limited number of hops. Then there will be no case where the most of peers fall into the query. It will reduce the search costs and enhance its efficiency. If we need to search the web service in a finite number of hops, we must extend the breadth of searching. That means, a more comprehensive search must be executed in certain query hop.

Here, we propose a double-layer parallel service discovery method. In the P2P environment, a peer stores the UDDI library and the semantic ontology base describing the web service. In UDDI layer, the UDDI center using the classic keyword matching method to discover the web services; in the semantic layer, we use semantic query and reasoning on the service category ontology model. Note that, the service described by the ontology may not be released in the UDDI library on the same peer. Because the ontology library and the UDDI library is two different things, has not to store in a peer together.

In UDDI layer, according to a set of standard based norms, that UDDI provided for the description and discovery of services, and the support of realization based on internet. As the corporation Indus logic’s product Soap uddi includes the following several software packages: com.induslogic.uddi: defines the object in all the registration and discovery process of web services; com.induslogic.uddiserver.inquiry: supports web services discovery; com.induslogic.uddiserver.publish: supports the release of web services; com.induslogic.uddiserver.replication: used to replicate the registration information; com.induslogic.uddiserver.service: includes all the remote-procedure-call object; com. induslogic.uddiserver.soap: contains a direct call to the object RPC Router; com.induslogic.uddiserver.util: supports the database connection. When the program response to the request of service discovery, it use a remote procedure call method calls RPC Router, and the request will be transferred to related classes, such as com.induslogic.uddiserver.inquiry Find Service class, through Uddi Service invoke Appropriate Api method. Then through the get Date method, do the keywords based query to the database, the feedback result is an Envelope object.

In the semantic layer, using the Semantic Annotations for WSDL (SAWSDL) standard, we add the semantic information to the web services; establish the mapping relation between the Web services and the ontology. The mapping relations have been registered to the service registry center since the release of the web services. Then, the discovery of the web services can be realized by reasoning the ontology to get the corresponding concepts, which links to the web service’s parameters. Finally, these matching results are integrated by the entire matching results of the web service. The principle diagram is as shown in Fig. 28.2.

Fig. 28.2
figure 2figure 2

Matching principle diagram

4 Experiment Studying

To check the effectiveness of the proposed algorithm, using Java (the development language) and Eclipse (the development tools), using Apache AXIS, Jena, jUDDI, Racer and other three party kits, we developed a prototype system, whose functions includes P2P network communications (using flooding communication mechanism in the P2P network) function, ontology reasoning function, UDDI query function.

We compare our algorithm (SDSD) to the classic algorithm which directly search the distributed UDDI in the P2P environment using keywords based query method for services discovery (DSD), and focus on two performances, including the network communication cost (the maximum number of forwarding the queries to find a service, \( H_{\hbox{max} } \)) and the recall (\( R \)).

Collect and construct the UDDI libraries and service semantic ontology libraries that the experiment needed. Divide the service and add the instances to the service category ontology. The experiment is 20 computers installed with Windows XP operating system in the lab. Each machine is configured with the CPU of 2G frequency, the memory of 2G. The experiment was performed 50 times, and we set the P2P nodes’ connectivity matrix every times. The experiment results are shown in Fig. 28.3.

Fig. 28.3
figure 3figure 3

The comparison between SDSD and DSD on \( H_{\hbox{max} } \) and \( R \)

By inquiring and reasoning the service category ontology to find the general range at first, and then using the double-layer parallel service discovery method to search the web services, SDSD algorithm increases the search range and reduces the search depth effectively, so the Probability of one-time finding related services are large, the average of the maximum forwarding counts is only 0.7 times, far better than the DSD algorithm 8.2 times; in addition, due to the small scale of the network, and the quantity of the web services needed to be discovered is small, so the averages of the two algorithms’ Recalls are both 100 %. From the comparison, we could conclude that, SDSD algorithm has excellent performances in experimental environment, but it still needs to be validated in practice further in future.

5 Conclusion

This paper presented a distributed service discovery strategy based on semantic in P2P environment to reduce the distributed service discovery network communication cost, improve search efficiency and recall. Firstly, researchers constructed an ontology model to describe the types of services, and then located the starting point of the search process on the associated Peer node based on semantic service classification; Secondly, a double layer parallel service discovery method was put forward. In UDDI layer, researchers used the classic keyword matching to search services in UDDI center; in the semantic layer, they used the semantic query and reasoning on the service ontology model. Finally, an experiment shows the excellent performances on the network communication cost and the recall.