Service-Oriented Computing: Semantics, Processes, Agents

Slides:



Advertisements
Similar presentations
1 Inteligenta Artificiala Universitatea Politehnica Bucuresti Anul universitar Adina Magda Florea
Advertisements

Knowledge Representation and Reasoning University "Politehnica" of Bucharest Department of Computer Science Fall 2009 Adina Magda Florea
Cojocea Manuela-Simona Microsoft Student Partners.
În general exist ă 2 forme mari de conservare : “in situ” şi “ex situ” 1. Conservarea “ in situ” Aceast ă metod ă de conservare const ă în.
2009 Pag Pag. 2 Agenda 1.Obiectivul proiectului 2.Parteneri 3.Autentificare versus identificare 4.Schema generala 5.Probleme de rezolvat / rezolvate.
Batalia sexelor O lume dominata de barbati vs o lume dominata de femei.
1 Artificial Intelligence University Politehnica of Bucharest Adina Magda Florea
Of 35 lecture 17: semantic web rules. of 35 ece 627, winter ‘132 logic importance - high-level language for expressing knowledge - high expressive power.
ece 720 intelligent web: ontology and beyond
Februarie 2018 ASE Bucuresti
ACTIVITATEA 1 -,, PROFESOR IT LA PAPI’’
Subinterogări multiple
Subinterogari.
Oracle Academy Lead Adjunct
IntraShip inovatie, flexibilitate, rapiditate.
Funcţii Excel definite de utilizator (FDU) în VBA
Instrumente CASE Curs nr. 7.
Posibilităţi de analiză în timp real a parametrilor de calitate a apei cu ajutorul sistemului informatic de management SIVECO Business Analyzer September.
Căutarea şi regăsirea informaţiei.
SOFTWARE Tipuri de software.
Windows Movie Maker.
Dispozitive de stocare
IF Clause prezentare.
CREATE, DROP,ALTER INSERT, UPDATE, DELETE
Service-Oriented Computing: Semantics, Processes, Agents
Arhitectura serviciilor web
Structura pipeline a unui procesor MIPS
Căutarea şi regăsirea informaţiei.
Paxos Made Simple Autor: Puşcaş Radu George
Gestionarea datelor stiintifice
Inteligenta Artificiala
Retele de calculatoare
Past Simple prezentare.
Reflexia luminii.
METODA BACKTRACKING Examenul de bacalaureat 2012
Software product management
CONVERSII INTRE SISTEME DE NUMERATIE
Recapitulare La Logica si argumentare
WebSite Social Tema 2 WebSite Social.
Crearea si gazduirea serviciilor
Tipuri structurate Tipul tablou
Grasu leonard ionut Trifu gabriel
Funcții C/C++ continuare
prof. mrd. Negrilescu Nicolae Colegiul National Vlaicu Voda
Past Perfect Simple prezentare.
ADULTUL DE MIJLOC (continuare).
original creator: unknown
Crearea si gazduirea serviciilor
INTERNET SERVICII INTERNET.
Eclipsele de soare si de luna
Forms (Formulare).
Îmbunătăţirea serviciilor publice prin intermediul Chartelor de Servicii: Elaborarea şi implementarea Planurilor de Acţiune pentru Îmbunătăţirea Serviciilor.
EFECTUL LASER Achim Anamaria,Vlad Lenuta Clasa a XII a D
A great way to create a channel of communication
SUBSTANTE PURE SI AMESTECURI DE SUBSTANTE
Functia de documentare
Administrarea reţelelor de calculatoare
SOAP -Simple Object Access Protocol-
Folosirea de către companii a Twitter, Facebook şi LinkedIn
Configurarea, deployment-ul automat si testarea serviciilor
Programarea in limbajul Java 2004 Lecturer: Gavrila Cristian
Realizarea prezentarilor cu Microsoft PowerPoint
Software open source in industria software
Crearea unei aplicatii Windows Forms simple
Student:Dvornic Mihaela Grupa:342 C5
Aplicaţii specializate pentru realizarea unei prezentări – PowerPoint
Sistemul de control intern managerial
Aplicatii Web bazate pe semantica, agenti si servicii
Harti de imagini, Cadre, Stiluri
Despre lamaie.net De ce sunt lamaile acre? Realizatori: Cristina Cazan
Presentation transcript:

Service-Oriented Computing: Semantics, Processes, Agents August 2004 Aplicatii Web bazate pe semantica, agenti si servicii http://turing.cs.pub.ro/webs_08 Universitatea Politehnica Bucuresti Anul universitar 2008-2009, Master Adina Magda Florea © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 Reguli de productie Avantaje ale regulilor Tipuri de reguli Sisteme bazate pe reguli Web Rule Languages © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 1. Reguli - avantaje Avantaje Cunostinte procedurale in maniera declarativa Permit atasare procedurala Se pot combina cu ontologiile: derivare concepte Modelarea proceselor, inclusiv a celor de business Exprimarea protocoalelor de business Exprimarea conditiilor de exceptie © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 De ce ne intereseaza? Utilizate de agenti pentru a descrie comportarea Utilizate ca specificare a compunerii serviciilor Utilizate in modelarea proceselor de business © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 2. Tipuri de reguli Reguli reactive – forma ECA on eveniment if conditie then (executa) actiune Utilizare triggers in SMBD codificarea proceselor (si apoi compunerea lor) detectarea exceptiilor + ce se face reguli de integritate In practica se vor combina cu regulile de inferenta © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 Tipuri de reguli Reguli de inferenta if anecedent then consecinta Antecedent: conjunctie de clauze Se permit si disjunctii de clauze caci se pot transforma in mai multe reguli Concesinta: conjunctie de clauze Nu se permit disjunctii Fapte © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 Exemplu (deftemplate person (slot first_name) (slot last_name) (slot age (type INTEGER)) ) (defrule eighteen_pers (person (first_name ?first_n) (age ?p_age)) (test (== ?p_age 18))) => (assert (eighteen_p (name ?first_n))) ) © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 Alt exemplu (deftemplate room (slot nember) (slot capacity (type INTEGER)(default 4)) (slot sexes_are) (slot vacancies (type INTEGER)) (multislot occupants)) (deftemplate student (slot name) (slot sex) (slot placed_in) (slot special_considerations (default no)) (defrule assign-student-empty-room ?unplaced_student  (student (name ?stud_name) (placed_in nil) (sex ?gender)) ?empty_room  (room (number ?room_no) (capacity ?room_cap) (vacancies ?max_size)) => (modify ?unplaced_student (placed_in ?room_no)) (modify ?empty_room (occupants ?stud_name) (sexes_are ?gender) (vacancies (-- ?max_size)) ) © Singh & Huhns

Inlantuirea regulilor Service-Oriented Computing: Semantics, Processes, Agents August 2004 Inlantuirea regulilor Inlantuire inainte (forward chaining) Inlantuire inapoi (backward chaining) © Singh & Huhns

3. Sisteme bazate pe reguli Service-Oriented Computing: Semantics, Processes, Agents August 2004 3. Sisteme bazate pe reguli Ciclul recunoastere-actiune: Match Select Act WME = working memory element Identificat printr-un "time tag" Instantiere: multime de WME care satisface o regula Multime de conflicte (CS) Rezolvarea conflictelor © Singh & Huhns

Ciclul recunoastere-actiune Service-Oriented Computing: Semantics, Processes, Agents August 2004 Ciclul recunoastere-actiune Rule Base Working Memory Rules . WMEs . Facts Match Act Instantiations . 1 Instantiation Conflict set Conflict resolution © Singh & Huhns

Ciclul recunoastere-actiune Service-Oriented Computing: Semantics, Processes, Agents August 2004 Ciclul recunoastere-actiune Match O regula se poate aplica daca conditiile din antecedent sunt satisfacute de WMEs din WM Procesul are 2 aspecte: match intra-element match inter-element (defrule teenager (person (firstName ?name) (age ?age)) => (printout t ?name " is " ?age " years old." crlf)) © Singh & Huhns

Ciclul recunoastere-actiune Service-Oriented Computing: Semantics, Processes, Agents August 2004 Ciclul recunoastere-actiune match inter-element (defrule assign-private-room (student (name ?stud_name) (placed_in nil) (special_consideration yes)) (room (number ?room_no) (capacity 1) (vacancies 1) => … Instantiations (CS) assign-private-room 41 9 assign-private-room 41 17 assign-private-room 52 9 assign-private-room 52 17 WMEs 41 (student name Mary sex F placed_in nil special_consideration yes) 52 (student name Peter sex M placed_in nil 9 (room number 221 capacity 1 vacancies 1) 12 (room number 346 capacity 2 vacancies 1) 17 (room number 761 capacity 1 vacancies 1) © Singh & Huhns

Rezolvarea conflictelor Service-Oriented Computing: Semantics, Processes, Agents August 2004 Rezolvarea conflictelor Diferite strategii Refractie = o aceeasi instantiere nu este executata de mai multe ori (2 instantieri sunt la fel daca au acelasi nume de regula si aceleasi time tags, in aceeasi ordine) Momentu utilizarii = Se prefera instantierile care au identificat cu WMEs cu cele mai recente time tags sau invers Specificitate = Au prioritate instantierile cu LHS mai specifice = nr de valori testate in LHS teste asupra: nume clasa, predicat cu 1 arg constanta, predicat cu un operator variabila legata © Singh & Huhns

Rezolvarea conflictelor Service-Oriented Computing: Semantics, Processes, Agents August 2004 Rezolvarea conflictelor Strategia LEX Elimina din CS instantierile care au fost deja executate Ordoneaza instantierile pe baza momentului utilizarii Daca mai multe instantieri au aceleasi time tags, utilizeaza specificitate Daca mai multe instantieri au aceeasi specificitate alege arbitrar Strategia MEA – aceeasi dar utilizeaza primul time tag © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 Eficienta executiei Match – cam 80% din timpul ciclului recunoastere-actiune Fiecare WME este comparat cu fiecare conditie din fiecare regula O(R*FP), R – nr de reguli, P nr mediu de conditii in LHS regula, F – nr WME RETE match algorithm – OPS5 Salveaza starea de match intre 2 cicluri recunoastere-actiune La crearea unui WME, acesta este comparat cu toate elementele conditie din program si este memorat impreuna cu fiecare element conditie cu care a identificat => Numai schimbarile incrementale din WM sunt identificate in fiecare ciclu O(R*F*P) aprox © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents Compilarea regulilor August 2004 Se compileaza conditiile regulilor intr-o retea de noduri de test Un test este un predicat cu o constanta sau variabila legata sau o disjunctie Procesul de match are loc numai la adaugarea sau la eliminarea unui WME (modify este retract urmat de assert) (gate (type or) (value true)) (gate (type or) (value false)) Node sharing 1 = gate type = or value = true value = false © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 Compilarea regulilor Un pointer la noul WME este trecut prin retea, incepand de la nodul radacina Fiecare nod actioneaza ca un switch Cand un nod primeste un pointer la un WME, testeaza WME asociat. Daca testul reuseste, nodul se deschide si WME trece mai departe Altfel nu se intampla nimic Daca un WME va trece prin retea, va fi combinat cu alte WME care trec pentru a forma o instantiere in CS Pointerii la WME sunt trimisi prin reteaua RETE ca tokens = pointer + stare (assert sau retract) © Singh & Huhns

Tipuri de noduri in retea Service-Oriented Computing: Semantics, Processes, Agents August 2004 Tipuri de noduri in retea Nod cu 1 intrare = test intra-element realizat de noduri cu 1 intrare feicare nod efectueaza un test corespunzator unei conditii Testarea aceleiasi variabile – tot noduri cu 1 intrare 1 = gate type = or value = true value = false © Singh & Huhns

Sisteme bazate pe reguli Service-Oriented Computing: Semantics, Processes, Agents August 2004 Sisteme bazate pe reguli Foarte multe cele mai influente OPS5 ART CLIPS Jess Familia Web Rule languages In special RuleML si SWRL Interoperabilitatea regulilor © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 RuleML RuleML Initiative - August 2000 Pacific Rim International Conference on Artificial Intelligence. RuleML Initiative dezvolta limbaje bazate pe reguli deschise XML/RDF Aceasta permite schimbul de reguli intre diferite sisteme, inclusiv componete software distribuite pe Web si sisteme client-server eterogene Limbajul RuleML – sintaxa XML pentru reprezentarea cunostintelor sub forma de reguli Integrarea cu ontologii: sistemul de reguli trebuie sa deriveze/utilizeze cunostinte din ontologie © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 RuleML RuleML – se bazeaza pe Datalog Datalog = limbaj de interogare si reguli pentru baze de date deductive Subset al Prolog cu restrictii: argumente ne-functionale (constante sau variabile) limitari in nivelul de apeluri recursive variabilele din concluzie trebuie sa apara in predicate ne-negate din ipoteza Hornlog – Datalog extins cu variabile functionale (termeni generali) © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 RuleML Reguli reactive = Observa/verifica anumite evenimente/conditii si executa o actiune – numai forward Constrangeri de integritate = reguli speciale care semnaleaza inconistente cand se indeplinesc anumite conditii – numai forward Reguli de inferenta (derivare) = reguli reactive speciale cu actiuni care adauga o concluzie daca conditiile (premisele sunt adevarate) - Se pot aplica atat forward cat si backward Fapte = reguli de inferenta particulare cu premise Regui reactive Constangeri de integritate Reguli de derivare Fapte © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 RuleML Reguli reactive <rule> <_body> <and> prem1 ... premN </and> </_body> <_head> action </_head> </rule> Constrangeri de integritate <ic> <_head> inconsistency </_head> <_body> <and> prem1 ... premN </and> </_body> </ic> implementate ca <_head> <signal> inconsistency </signal> </_head> © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 RuleML Reguli de inferenta/derivare <imp> <_head> conc </_head> <_body> <and> prem1 ... premN </and> </_body> </imp > implementate prin <rule> <_body> <and> prem1 ... premN </and> </_body> <_head> <assert> conc </assert> </_head> </rule> Fapte <atom> <_head> conc </_head> </atom> <imp> <_head> conc </_head> <_body> <and> </and> </_body> </imp> © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 RuleML Fapte <atom> <rel>spending</rel> <ind>Peter Miller</ind> <ind>min 5000 euro</ind> <ind>previous year</ind> </atom> spending(petterMiller, min5000euro, previousYear). © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 Reguli de inferenta/derivare <imp> <head> <atom> <rel>discount</rel> <var>customer</var> <var>product</var> <ind>7.5 percent</ind> </atom> </head> <body> <and> <atom> <rel>premium</rel> <rel>luxury</rel> </and> </body> </imp> discount(Customer, Product, 7.5_percent):- premium(Customer), luxury(Product). © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 SWRL SWRL = Semantic Web Rule Language Propunere W3C in 2004 http://www.w3.org/Submission/SWRL/ Combina OWL DL si OWL Lite cu RuleML Regulile sunt exprimate in termenii conceptelor OWL (classe, proprietati, indivizi, …). SWRL – sintaxa abstracta pt "Horn-like rules" Regulile sunt salvate ca parte a ontologiei Implementari in: Bossam, R2ML, Hoolet, Pellet, KAON2, RacerPro, SWRLTab © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents hasParent(?x, ?y) ^ hasBrother(?y, ?z) -> hasUncle(?x, ?z) <ruleml:imp> <ruleml:_rlab ruleml:href="#example1"/> <ruleml:_body> <swrlx:individualPropertyAtom swrlx:property="hasParent"> <ruleml:var>x</ruleml:var> <ruleml:var>y</ruleml:var> </swrlx:individualPropertyAtom> <swrlx:individualPropertyAtom swrlx:property="hasBrother"> <ruleml:var>z</ruleml:var> </ruleml:_body> <ruleml:_head> <swrlx:individualPropertyAtom swrlx:property="hasUncle"> </ruleml:_head> </ruleml:imp> SWRL August 2004 © Singh & Huhns

Service-Oriented Computing: Semantics, Processes, Agents August 2004 Editorul SWRL Editorul SWRL – extensie a Protegé OWL care permite editarea de reguli SWRL; Inclus in Protégé OWL Accesibil ca un tab Ofera un Java API pentru interoperabilitate cu motoare de inferenta © Singh & Huhns

Verificari ale editorului Numai regulile sintactic valide sunt salvate si care se leaga de entitati OWL Se face o verificare semantica de baza:orice variabila referita in concluzie trebuie sa fie referita si in ipoteza Cu toate acestea, regulile pot contrazice restrictiile din ontolgia OWL

Cum se salveaza regulile Regulile sunt salvate ca indivizi OWL Clasele care descriu acesti indivizi se gasesc in ontologia SWRL http://www.daml.org/rules/proposal/swrl.orl Aceste clase includ: swrl:Imp – reprezinta o regula SWRL swrl:Atom – reprezinta un atom in regula swrl:AtomList – reprezinta o lista de atomi Motoare de inferenta bazate pe reguli pot folosi aceste reguli

Interactiunea cu reguli in Protege Prin fisiere – regulile SWRL sunt salvate in format standard SWRL API – crearea si manipularea regulilor SWRL Utilizata de editorul SWRL Accesibila dezvoltatorilor Se pot adauga motoare de inferenta; de ex Jess

Interactiunea cu MI Extrage cunostintele OWL relevante pentru inferente Nu toate cunostintele trebuie extrase Cunostintele necesare pot fi determinate din fiecare regula Exemplu: Man(Fred) ^ Man(?y) ^ hasParent(Fred, ?y) ^ hasBrother(?y,?z) -> hasUncle(Fred, ?z) necesita: Individul Fred Toti indivizii din clasa Man si subclase Proprietatile hasProperty ale lui Fred si toate sub-proprietatile acestora Toti indivizii cu proprietatea hasBrother si sub-proprietati asociate