Semantic Web Services Composition Peter Bartalos Outline Basics of service composition Why we need semantics? Different kinds of user goals Service composition Arranging web services into complex workflows Based on user goal WS1 WS4 WS2 WS5 WS6 WS7 WS3 Service chaining Requirement I/O compatibility Syntactic level - WSDL Ancestor O ? I <element name=“getTemperatureReturn" type="xsd:double"/> <element name=“areaName" type="xsd:string"/> Successor Service chaining getTemperature() Output: meteoowl:Temperature Input: meteoowl:Elevation meteoowl:LocalPressure getAtmPressure() Output: <element name=“getTemperatureReturn" type="xsd:double"/> Input: <element name=“elevation" type="xsd:double"/> <element name=“localPressure" type="xsd:double"/> Meaningful chaining getElevation() Output: meteoowl:Elevation Input: meteoowl:Elevation meteoowl:LocalPressure getAtmPressure() Output: <element name=“getElevationReturn" type="xsd:double"/> Input: <element name=“heightAboveLocation" type="xsd:double"/> <element name=“localPressure" type="xsd:double"/> Problem again getElevation() Output: meteoowl:Elevation Input: meteoowl:Elevation meteoowl:LocalPressure In meters In ft. getAtmPressure() Output: <element name=“getElevationReturn" type="xsd:double"/> Input: <element name=“heightAboveLocation" type="xsd:double"/> <element name=“localPressure" type="xsd:double"/> Problem again getElevation() Output: meteoowl:Elevation Input: meteoowl:Elevation Postcondition: inMeters (getElevationReturn) Precondition: inFeet (heightAboveSeaLevel) getAtmPressure() Output: <element name=“getElevationReturn" type="xsd:double"/> Input: <element name=“heightAboveLocation" type="xsd:double"/> <element name=“localPressure" type="xsd:double"/> Considering conditions getElevation() Output: meteoowl:Elevation Input: meteoowl:Elevation Postcondition: inMeters (getElevationReturn) Precondition: inMeters (heightAboveSeaLevel) getAtmPressure() Output: <element name=“getElevationReturn" type="xsd:double"/> Input: <element name=“heightAboveLocation" type="xsd:double"/> <element name=“localPressure" type="xsd:double"/> Semantic service composition Basic service description I/O Binding parameters to the concepts in the ontology Pre-/post-conditions Logical expressions Predicates combined with logical operators Binding to ontological elements Semantic compatibility evaluation Compatibility evaluation I/O Checking if O subsumes I Pre-/post-conditions Checking if Post => Pre How it starts User goal definition Required outputs Required condition Provided inputs How it starts User goal example The user wants the air pressure in kPa in Smolenice corrected to sea level. Required output Required condition meteoowl:AtmosphericPressure inkPa(pressure) Provided inputs geoowl:Area = Smolenice meteoowl:LocalPressure = 98.5kPa Example composition Smolenice Input: geoowl:Area getElevation() Output: meteoowl:Elevation 98.5kPa Input: meteoowl:Elevation meteoowl:LocalPressure getAtmPressure() Output: meteoowl:AtmosphericPressure Postcondition: inkPa(pressure) Best composition Generally we have several composite services satisfying the user goal We have to choose the best one Soft and hard constraints Simple condition The user wants to book a flight. Condition booked(flight) Value restriction The user wants to book a flight to Los Angeles. Condition booked(flight)^hasDestination(flight, destination) Value restriction destination = LosAngeles Local variables The user wants to book a flight to Los Angeles and a hotel for overall price at most 500$. Condition Value restriction booked(flight)^hasDestination(flight, destination)^hasPrice(flight, flightprice)^booked(hotel)^hasPrice(hotel, hotelprice) destination = LosAngeles ^ price < 500$ Local variable definition price = flightprice + hotelprice Soft constraints - fuzzy The user wants to book a flight for about 350$. Condition booked(flight) ^ hasPrice(flight, flightprice) Value restriction flightprice = fuzzy number Predicate evaluation I The user wants to book a flight through weekend. Condition booked(flight)^hasFlightTime(flighttime) Value restriction isWeekendTime(flighttime) Predicate evaluation II The user wants to book the cheapest flight. Condition booked(flight) ^ hasPrice(flight, flightprice) Value restriction cheapest(flightprice) Conditional restriction The user wants to book a flight if it includes also insurance, else he wants to use a train. Alternatives booked(flight)^includesInsurance(flight) book(traintravel) If Then Else … Event handling The user wants to book a flight, but if that flight is delayed by more than 24 hours, he wants to cancel the flight and take a train. Basic condition Event booked(flight) booked(flight) ^ isDelayed(flight, delay) delay > 24hour Action cancelled(flight) ^ booked(traintravel) Open problems How to get the required representation of the user goal? How to present the results? Booking problem …? Do we need additional metadata? How to develop “composition friendly” services?
© Copyright 2025 Paperzz