You are on page 1of 16

ICWS 2006

A Framework for Intelligent Web Services:


Combined HTN and CSP Approach
Incheon Paik, University of Aizu
Daisuke Maruyama, University of Aizu
Michael N. Huhns, University of South Carolina

Presented by: Jingshan Huang


Computer Science and Engineering Dept.
University of South Carolina
ICWS 2006, 1
Chicago
Motivation
 Solving real-life problems requires a set of
appropriate services to be (1) composed via
planning, (2) scheduled, and (3) executed.
 HTN (Hierarchical Task Network) : Planning
 CSP (Constraint Satisfaction Problem) : Scheduling
 Problems of HTN-Only system
― Cannot satisfy scheduling efficiently
― Difficulty in finding an autonomous solution

 Suggest a Novel WS Composition Engine: the


HTN-CSP combined system

ICWS 2006, 2
Chicago
Hierarchical Task Network (HTN) Planning

 To produce a sequence of actions by task


decomposition from large tasks

 Similar to classical AI planning

 Can produce plans to reach a final goal, but


it is not suitable for scheduling

 We chose SHOP2 as our basic planner


ICWS 2006, 3
Chicago
Planning Domain Example
: Method
task: (transport ?p)

: compound
preconditions: (at ?p ?x) task
(destination ?p ?y) : primitive
(available-truck ?t) task
: state
subtasks:

(dispatch ?t ?x) (!load ?t ?p) (!move ?t ?x ?y) (return ?t ?y)

task: (dispatch ?t ?x) task: (return ?t ?y)

subtasks: subtasks:

(!reserve ?t) (!move ?t home ?x) (!move ?t ?x home) (!free ?t)

ICWS 2006, 4
Chicago
HTN-Only System Framework
Web Services

Hotel Reservation WS
plan
Train Timetable WS

Airplane Timetable WS
input


data

Input Web
HTN
Domain Service
Planner
Analyzer Executor
planning
problem

ICWS 2006, 5
Chicago
HTN-Only System Framework
I'd like to make a trip
next week.
I want to depart Web Services
Aizu-wakamatsu at
14:00 and arrive at Hotel Reservation WS
plan San-Francisco.
Train Timetable WS

Departure Location = Aizuwakamatsu


Airplane Timetable WS
Departure Time = 14:00
input
Departure Date = Feb. 21, 2006


data
Arrival Location = San-Francisco

Input Web
HTN
Domain Service
Planner
Analyzer Executor
planning
problem
ICWS 2006, 6
Chicago
HTN-Only System Framework

initial states:
Web Services
(departure-location aizu-wakamatsu)
(departure-time _1400)
Hotel Reservation WS
(departure-date _20060221)
plan (arrival-location san-francisco))
Train Timetable WS
goal task: (trip)
Airplane Timetable WS
input


data

Input Web
HTN
Domain Service
Planner
Analyzer Executor
planning
problem
ICWS 2006, 7
Chicago
HTN-Only System Framework
task: (travel ?from ?to)
Web Services
preconditions: Hotel Reservation WS
plan . . .
Train Timetable WS
subtasks:

(travel-by-train (travel-by-airplane Airplane Timetable WS


?from ?via)
input ?via ?to)


data

Input Web
HTN
Domain Service
Planner
Analyzer Executor
planning
(available-train JR-Banetsu-West-Line
problem
aizu-wakamatsu _0600 koriyama _0712)
...
ICWS 2006, 8
Chicago
HTN-Only System Framework
(!travel-by-train JR-Banetsu-West-Line
aizu-wakamatsu _1413 _20060221
Web Services
koriyama _1513 _ 20060221)
(!travel-by-train Hotel
Tsubasa-186
Reservation WS
koriyama _1525 _ 20060221
plan tokyo _1648 _ 20060221)
(!travel-by-train Train Timetable WS
Narita-Express-37
tokyo _1703 _ 20060221
narita _1757Timetable
Airplane _ 20060221)
WS
input (!travel-by-airplane ANA-B2


data narita _2000 _ 20060221
san-francisco _1100 _ 20060221)

Input Web
HTN
Domain Service
Planner
Analyzer Executor
planning
problem
ICWS 2006, 9
Chicago
Problems with an HTN-Only System
 Web service composition by a planner has
limitations:
 Inefficient for autonomous finding solution in
planning
 Not good for dealing user’s various requests

 Weak in maintenance

 Not efficient for scheduling

ICWS 2006, 10
Chicago
HTN-CSP Combined System Framework

Web Services
plan Hotel Reservation WS

Web Train Timetable WS


Service
input Executor Airplane Timetable WS
data


Input
HTN CSP CSP
Domain
Planner Constructor Solver
Analyzer
planning CSP CSP
problem representation tuple
ICWS 2006, 11
Chicago
CSP Constructor HTN Planner Domain Analyzer
Goal
Variable Representation Trip
<Z, D, C>
Z: variables Domain Representation Sub-Goal Sub-Goal Shopping
D: domains
C: constraints Constraint Representation ・


Trip Trip
Domain Domain

Knowledge Base Ontology Knowledge Base Ontology Knowledge Base Ontology

Information needed for Information needed for


Information needed for
constructing CSP tuple HTN planning
Domain Analysis

CSP Solver Web Service


Request Data

Dy
UDDI
Master-Layer Sub-Layer

nam
defined with
Hotel Ontology

ic R
Reservation

equ
Robot with Hotel Web Service

e
Situation Calculus Label

st
Assigner Train
Control

Assigner Management Time t able


Train Web Service
Worldwide
Constraint Check Label Web Service Airplane
Assigner Time t able
Web Service

・ ・
・ ・

Knowledge Base

Which assigner Assigner Repository Constraint-satisfied Label


ICWS
should2006,
be applied.
12
Chicago
HTN-CSP Combined System Framework

(riding-duration tokyo narita) = 0:54


(riding-duration koriyama tokyo) = 1:23
(riding-duration aizu-wakamatsu koriyama) = 1:00
(departure-time tokyo)Web Services
= 17:03
(departure-time koriyama) = 15:25
plan Hotel Reservation =WS
(departure-time aizu-wakamatsu) 14:13
(departure-date tokyo) = 2006/2/21
(departure-date koriyama) = 2006/2/21
Web Train Timetable WS
(departure-date aizu-wakamatsu) = 2006/2/21
Service
(arrival-time tokyo) = 16:48
input Executor Airplane
(arrival-time narita) Timetable WS
= 17:57
data (arrival-time koriyama) = 15:13


(arrival-date tokyo) = 2006/2/21
(arrival-date narita) = 2006/2/21
Input (arrival-date koriyama) = 2006/2/21
HTN CSP CSP
Domain (departure-time narita) = 20:00
Planner
(departure-date Constructor
narita) = 2006/2/21 Solver
Analyzer
(arrival-time san-francisco) = 11:00
planning (arrival-dateCSP CSP
san-francisco) = 2006/2/21
problem representation tuple
ICWS 2006, 13
Chicago
Performance Comparison
Number of Processing Activity
Scenario

Solving Type Web Service


Time (ms) in Composition
Invocation
HTN-Only 3+1=4 Total : 3039 Planning
1 HTN-CSP Planning and
3+1=4 Total : 5789
Combined Scheduling
HTN-Only 4+2=6 Total : 2661 Planning
2 HTN-CSP Planning and
4+2=6 Total : 3187
Combined Scheduling
HTN-Only 0 Total : 122 Planning
3 HTN-CSP Planning and
0 Total : 2248
Combined Scheduling

ICWS 2006, 14
Chicago
Advantages of the HTN-CSP Combined System
 Development Efficiency
 Scheduling is already integrated
 Flexibility
 HTN-CSP combined system:
― Can represent complex problems more easily
 HTN-only system:
― Might produce scenarios that are hard to solve
 Extensibility
 HTN-CSP combined system:
― Featurescan be added easily
― Many algorithms for solving CSPs available
 HTN-only system:
― To add new features, the planning domain must be rewritten i
n many cases
ICWS 2006, 15
Chicago
Conclusion and Future Work
 Suggested a combined HTN-CSP
architecture for automatic Web service
composition
 Efficient for planning and scheduling
 Future work
 Automating HTN – CSP encoding
 Fully automated problem solving (service
composition) in a Semantic Web environment
using this framework

ICWS 2006, 16
Chicago

You might also like