Supporting Ontology-Based Semantic Matching of Web Services in MoviLog C. Mateos, M. Crasso, A. Zunino, M. Campo
[email protected] CONICET/ ISISTAN, Universidad Nacional del Centro Tandil, Buenos Aires, Argentina 1
Introduction • MoviLog:
– A Prolog-based programming language for intelligent mobile agents [1] – Based on JavaLog (Logic/OO) [2] – Web enabled [3]: • Agents consume and provide Web Services
– Many positive experiences: • Personal agents:
– meeting scheduling, Web search, personal newspapers, AI planning, personal finances, ...
• Software engineering:
– framework instantiation, requirements, AOP, ...
[1] Reactive Mobility by Failure: When Fail Means Move. Information Systems Frontiers. Kluwer. 2005 [2] JavaLog: A framework-based integration of Java and Prolog for agent-oriented programming. Computer Languages, Systems and Structures. Elsevier Science. 2005. [3] Integrating Intelligent Mobile Agents with Web Services. International Journal of Web Services Research. 2005 2
Web Services • • • •
Loosely coupled, reusable components Encapsulate functionality Distributed Programmatically accessible over standard Internet protocols
3
WSDL (Web Service Description Language)
• Describes the interface (contract) for consuming a Web Service: – Interface: operations (in- & output) – Access (protocol binding) – Endpoint (location of service)
WSDL 4
Service Provider
Internet
Service Consumer
Problems • WSDL and UDDI are just syntax • UDDI provides services for searching WS by: – name (StockQuote, WeatherbyCity, SendFax) – provider (Amazon, eBay, ...) – category (travel, data, ...) – attributes (inputs, access, endpoint, ...)
• Keyword based search and string matching only! – not enough for agents! 5
What is our Goal? • Mobile agents that discover and consume services in order to achieve their goals • They do not know in advance (in code) that: – StockQuote obtains a stock price given a company symbol – Because they cannot understand the meaning of StockQuote
6
Some Details... What is ‘getQuote’? is ‘symbol:string’ a company name? Operation: getQuote Input: symbol [string] Output: Result [float]
Service provider
Is this WS what I need?
What is ‘Result:float’? 7
get MFT stock price
Service consumer
Almost There: Semantic Web Services • Define exhaustive description frameworks for describing Web Services and related aspects (Web Service Description Ontologies) • Support ontologies as underlying data model to allow machine supported data interpretation (Semantic Web aspect) • Define semantically driven technologies for automation of the Web Service usage process (Web Service aspect) 8
OWL-S: Ontology for Web Services • OWL-S is an ontology for describing: – What does the service provide? – How is it used? – How does one interact with it?
describes presents what it does
Service
describes
Service Profile
supports how to access it
Service Grounding
describes
WS described by how it works
ServiceModel 9
OWL
OWL-S
WSDL
The OWL-S Service Profile • Inputs and outputs • Preconditions and effects • Category Service Profile
Parameter
URL In parameter Out parameter
Profile
URL ServiceParameter
Condition Result DatatypeProperty
ServiceCategory
ObjectProperty SubClass/Property 10
An Example: Search Service Parameter Profile
owls:serviceClassification
In parameter
points to concept Searcher…
Searcher Search condition
owls:hasInput
Syntactic Searcher
Concept Keyword
Semantic Searcher
Regular expression
Apolo
owls:hasInput Google
DatatypeProperty ObjectProperty SubClass/Property
11
Vivisimo
Our Proposal: Apollo • A search engine for Semantic Web Services • Extends UDDI with semantics – WSLD+OWL-S – Ontologies – QoS
• Solves some limitations of related approaches:
– Mobile agents: distance, bandwidth, price, availability (QoS) – Concept specificity – Rich queries – Multiple results sorted according to their “semantic similarity” (concept, inputs, outputs, context, ...) and QoS 12
Architecture
13
OWL-Lite to Prolog OWL-Lite
Prolog
Description
Class
class(X)
X is a class.
rdfs:subClassOf
subClassOf(X,Y)
X is a subclass of class Y.
rdf:Property
property(X)
X is a property.
rdfs:subPropertyOf
subPropertyOf(X,Y)
X is a subproperty of property Y.
Individual
individualOf(X,Y).
X is an instance of class Y.
inverseOf
inverseOf(X,Y)
X is inverse to property Y.
equivalentProperty
equivalentProperty(X,Y) X is equivalent to property Y.
equivalentClass
equivalentClass(X,Y)
X is equivalent to class Y.
Properties
triple(X,Y,Z).
X is related to Z by property Y. 14
OWL-Lite in MoviLog
triple(X,E,Y): − equivalentProperty(P,E) , triple(X,P,Y). – X is related to Y by property E, if E is equivalent to P and X is related to Y by P – if author and writer were equivalent properties, then triple(article, writer, person) holds triple(Y,O,X): − inverseOf(P,O) ,triple(X,P,Y). – Y is related to X by property O whenever inverseOf(P,O) is true and X is related to Y by P – if hasPublication and author were inverse properties, then triple(person, hasPublication, article) holds triple(X,T,Z): − transitive(T),triple(X,T,Y), triple(Y,T,Z). – if John is Paul’s advisor, and Paul is George’s advisor, then John is George’s advisor. 15
Matching Concepts • exact if X and Y are individuals belonging to the same or equivalent classes • subsumes if X is a subclass of Y • plug-in if Y is a subclass of X A • fail X
x1
c2
a1 plug in , 2
plug in , 1
B b1 C
exact
DatatypeProperty ObjectProperty SubClass/Property
P
c1 16
The Semantic Reasoner • Input: – concept describing the desired service functionality – two sets of concepts for in/out parameters. – QoS constraints
• Matchmaking scheme and an algorithm for sorting the results according to the degree of match: – The algorithm first tries to find a Web service that semantically matches the requested conceptual output. 17
The Semantic Reasoner – If there are more than one Web service with the same degree of match for their output, the algorithm examines inputs to check that the requester is able to invoke the service. – The resulting WSs are sorted according to their distance to the requester agent and other QoS criteria (specified by the agent)
18
An Example Two services:
a service for translating documents a service for translating thesis
PROTOCOLS protocol( webService, [ name(translate), input([thesis, english]), output(thesis)], [bandwidth(256K), availability(99%), price(free)]). CLAUSES thesis ([title(’Atitle’), author(’Anauthor’) , language ( spanish ) , advisor(’Anadvisor’ ), sections([. . .])}). ?− translate(TargetLang ,Res): − webService( [name(translate) , input([thesis , TargetLang ] ) , output (thesis)], WSProxy ) , thesis(Th), executeService(WSProxy , [ Th, TargetLang ], Res ).
19
Performance • Web Services: • Avg. Time:
100 | 1000 | 10000 2.37 | 12.65 | 149.33
20
Conclusions • The good: – Semantic Web Services enable agents to discover and use the vast amount of Web accessible programs – Working prototype in MoviLog • workflow engine using mobile agents
– More powerful semantic matching algorithm with QoS for mobile agents – Decent performance
• The bad: – OWL-Lite... not OWL-DL or OWL-Full – Only services... – MoviLog 21
Future Research • “The Semantifier” – How to convert a legacy Java applications into a SW-complaint application without rewriting it?: • External: – ML for annotating non-semantic services – Ontology matching and/or extraction
• Internal: – Semi-automatic mapping of ontologies and domain objects (including updates)
• Scalability for Semantic Grid Services (MA) – the database of service descriptions may be huge • P2P techniques for data management and semantic search 22