Download presentation
Presentation is loading. Please wait.
Published byNatalie Ramirez Modified over 11 years ago
1
© Copyright 2007 STI - INNSBRUCK www.sti-innsbruck.at Applying Reasoning to Instance Transformation Adrian Mocan, Mick Kerrigan, Emilia Cimpian firstname.lastname@sti2.at
2
www.sti-innsbruck.at 2 Overview Context Ontology mappings and mapping rules Grounding the mappings to WSML Applying data mediation Conclusions
3
www.sti-innsbruck.at 3 Ontology-based Data Mediation Context Mediation Scenario Mediation Solution Web Service Modeling Toolkit
4
www.sti-innsbruck.at 4 Run-time Data Mediator Input –Source Instances + Source/Target Schemas –Ontology Mappings Output –Target Instances
5
www.sti-innsbruck.at 5 Ontology Mappings (1) Abstract representation of mappings –Alignment format developed as part of the KW NoE project Schema elements (e.g. concepts, attributes) Restriction on the schema elements (e.g. allowed values for an attribute) Concept2Concept ( C2C ) Attribute2Attribute ( A2A ) Concept2Attribute ( C2A ) Attribute2Concept ( A2C ) mapping(sourceEntity; [sourceEntityRestriction]; targetEntity; [targetEntityRestriction]; typeOfMapping)
6
www.sti-innsbruck.at 6 Ontology Mappings (2) The Alignment Format –Not committed to any ontology representation language It doesnt have a formal semantics –It has an XML and an RDF serialization Why using such a mapping language? –Easier to manage mappings When parts of the alignment need to be updated When the mapped ontologies evolve –Allows the effective usage of the mappings Mappings needs to be grounded to a concrete formalism
7
www.sti-innsbruck.at 7 Web Service Modeling Language (WSML) (1) Family of languages for Web Service Modeling Ontology (WSMO) WSML-Flight –Based on Datalog WSML-Rule –Extension of WSML-Flight based on Horn fragment of F-logic –Allows functions symbols and unsafe rules
8
www.sti-innsbruck.at 8 Web Service Modeling Language (WSML) (2) concept person hasChristianName ofType (0 *) _string hasSurname ofType (1 1) _string hasGender ofType (1 1) Gender dateOfBirth ofType (0 1) Date concept book title ofType (1 1) _string hasAuthor ofType (0 *) author concept author subConceptOf person authorOf inverseOf(hasAuthor) ofType (0 *) book instance crimeAndPunishment memberOf book title hasValue Crime and Punishment" hasAuthor hasValue dostoyevsky axiom authorshipFromAuthor definedBy authorship(?x, ?y):- ?x[authorOf hasValue ?y] memberOf author F-Logic person[hasChristianName =>>_string; hasSurname => _string; hasGender => Gender; dateOfBirth => Date]. book[title => _string; hasAuthor => author]. author::person[authorOf =>> book]. crimeAndPunishment:book. book[title -> Crime and Punishment; hasAuthor -> dostoyevsky]. FORALL X,Y authorship(X,Y) <- X:author[auhtorOf -> Y]
9
www.sti-innsbruck.at 9 Mapping Rules in WSML The ontology mappings are grounded to WSML rules The target instances are constructed by these rules –Function symbols are used in order to generate new, unique identifiers for these instances mediated(source_instance, target_concept) WSML rules + source instances + source/target schema fragments are loaded into a reasoner –pseudo-merged ontology –The mediated data (i.e. the target instances) are retrieved by querying this ontology
10
www.sti-innsbruck.at 10 Running Examples concept Person hasChristianName ofType _string hasSurname ofType _string hasGender ofType Gender dateOfBirth ofType Date concept Date day ofType _integer month ofType _integer year ofType _integer concept Gender instance _1 memberOf Gender instance _2 memberOf Gender instance _ memberOf Gender concept Citizen hasName ofType Name hasSex ofType Sex hasBirthday ofType Date concept Name hasFirstName ofType _string hasSurname ofType _string concept Date day ofType _integer month ofType _integer year ofType _integer concept Sex instance M memberOf Sex instance F memberOf Sex instance N memberOf Sex Source Ontology Target Ontology
11
www.sti-innsbruck.at 11 Mapping Rules in WSML Class to Class Mapping mapping(o1#Person, o2#Citizen, C2C ) mediated(?x, o2#Citizen) memberOf o2#Citizen and mapped(o1#Person, o2#Citizen,?x):- ?x memberOf o1#Person instance johnS memberOf o1#Person mediated(johnS, o2#Citizen) memberOf o2#Citizen mapped(o1#Person, o2#Citizen, johnS)
12
www.sti-innsbruck.at 12 Mapping Rules in WSML Class to Attribute Mappings mapping( o1#Person, o2#Citizen.hasName, C2A ) mediated(?x,o2#Citizen)[hasName hasValue mediated(?x, o2#Name)] memberOf o2#Citizen:- ?x memberOf o1#Person and mediated(?x,o2#Name)[?anAttribute hasValue ?aValue] memberOf o2#Name. instance johnS memberOf o1#Person mediated(?x,o2#Name)[…] memberOf o2#Name mediated(johnS,o2#Citizen)[hasName hasValue mediated(johnS, o2#Name)] memberOf o2#Citizen
13
www.sti-innsbruck.at 13 Mapping Rules in WSML Attribute to Attribute Mappings (1) mapping(o1#Person.hasSurname, o2#Name.hasSurname, A2A ) mediated(?x,o2#Name)[hasSurname hasValue ?v] memberOf o2#Name:- ?x[hasSurname hasValue ?v] memberOf ?subCs and ?subCs subConceptOf o1#Person and mapped(?subCs,o2#Name,?x). instance johnS[hasSurname hasValue Smith] memberOf o1#Person mapped(o1#Person, o2#Name, johnS) mediated(johnS,o2#Name)[hasSurname hasValue Smith] memberOf o2#Name mapping(o1#Person, o2#Name, C2C )
14
www.sti-innsbruck.at 14 Mapping Rules in WSML Attribute to Attribute Mappings (2) mapping(o1#Person.dateOfBirth, o2#Citizen.hasBirthDay, A2A ) mediated(?x,o2#Citizen)[hasBirthDay hasValue mediated(?i, o2#Date)] memberOf o2#Citizen:- ?x[dateOfBirth hasValue ?i] memberOf ?subCs and ?subCs subConceptOf o1#Person and mapped(?subCs, o2#Citizen) mediated(?i,o2#Date)[?anAttribute hasValue ?aValue]. instance johnS[dateOfBirth hasValue johnS_birthdate] memberOf o1#Person mapped(o1#Person, o2#Citizen, johnS) mediated(johnS_birthdate, o2#Date)[...] mediated(johnS,o2#Citizen)[hasBirthDay hasValue mediated(johnS_birthdate, o2#Date)] memberOf o2#Citizen
15
www.sti-innsbruck.at 15 Mapping Rules in WSML Attribute to Class Mappings
16
www.sti-innsbruck.at 16 Mapping Conditions Conditions that have to hold for the mapping to apply Three main types –Attribute occurrence conditions –Attribute type conditions –Attribute value conditions Source Target
17
www.sti-innsbruck.at 17 Querying and Retrieving the Mediated Instances ?- ?x memberOf o2#Citizen Found result to the query: (1) -- ?x = mediated(johnS, o2#Citizen) ?- mediated(johnS, o2#Citizen)[?y hasValue ?z] memberOf o2#Citizen and ?z memberOf ?avC. Found results to the query: (1) -- ?z = o2#M, ?avC = o2#Sex, ?y=o2#hasSex (2) -- ?z = mediated(johnS,o2#Name), ?avC = o2#Name, ?y= o2#hasName (3) -- ?z = mediated(johnS_birthDate, o2#Date), ?avC = o2#Date, ?y = o2#hasBirthday ?- mediated(johnS, o2#Name)[?y hasValue ?z] memberOf o2#Name and ?z memberOf ?avC. Found results to the query : (1) -- ?z = John, ?avC = string, ?y = o2#hasFirstName (2) -- ?z = Smith, ?avC = string, ?y = o2#hasSurname...
18
www.sti-innsbruck.at 18 Applying the Ontology-based Data Mediation SEEMP EU FP6 Project SemanticGov EU FP6 Project Rules, schemas and data to be mediated cannot be simply loaded in the reasoning space A set of optimizations have to be applied for an effective mediation task Minimize the size of the knowledge base to be queried (i.e. filtering)
19
www.sti-innsbruck.at 19 Optimizations for the Instance Transformation Scenario Source Instance Filtering –Instances of unmapped entities can be directly discarded Mapping Filtering –Mappings that cannot applied to any of the source instances dont need to be transformed to rules Source and Target Ontology Filtering –Schema elements that are not relevant dont need to be included in the reasoning space mapping(sourceEntity; [sourceEntityRestriction]; targetEntity; [targetEntityRestriction]; typeOfMapping)
20
www.sti-innsbruck.at 20 Value Transformation Services Very often imply more than re-arranging the source values in the structure imposed by the target is needed Target values might need to be computed based on source values Value transformation services –Service calls embedded in the rules –The reasoner has the role of setting the parameters –Services are resolved after reasoning in a preprocessing phase mapping(sourceEntity; [sourceEntityRestriction]; targetEntity; [targetEntityRestriction]; typeOfMaping) Transf. Service (serviceId, param)
21
www.sti-innsbruck.at 21 Value Transformation Services Example mediated(?X45,o2#Citizen)[o2#hasName hasValue http://example.org/concatService(?Y46,?Y47)] memberOf o2#Citizen :- ?X45[o1#hasChristianName hasValue ?Y46] memberOf o1#Person and ?X45[o1#hasSurname hasValue ?Y47] memberOf ?SC47 and ?SC47 subConceptOf o1#Person and mapped(?SC47,o2#Citizen,?X45). instance mediated(johnS, o2#Citizen) memberOf o2#Citizen o2#hasSex hasValue o2#M o2#hasName hasValue http://example.org/concatService("John","Smith") o2#hasBirthday hasValue mediated(johnS_birthDate, o2#Date)
22
www.sti-innsbruck.at 22 Summary and conclusions Main principle of an instance transformation engine –Separation between mappings and rules –Grounding of mappings to WSML rules –Usage of a Datalog reasoner with function symbols Applying data mediation Future work –Extend and refine the optimization algorithms –Further Evaluation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.