Temporality in Semantic Web - Graduate Center, CUNY...Schema.org • Schema.org was created in 2011...

Post on 24-Jul-2020

1 views 0 download

Transcript of Temporality in Semantic Web - Graduate Center, CUNY...Schema.org • Schema.org was created in 2011...

TemporalityinSemanticWeb

Ph.D student:DiWu,GraduateCenter,CUNYMentor:AbdullahUz Tansel,BaruchCollege,CUNY

Committee:SarahZelikovitz,CIS,CUNYSusanP.Imberman,CIS,CUNY

Abstract• SemanticWeb• SemanticWebTechnologies• TimeOntology• TemporalDatabase• TemporalRelationalAlgebra• ResearchDirection

Motivation• Data• Centralized• Distributed• Decentralized

• Moredata• SemanticWeb

• Betterdata• Accurate• UptoDate• Historicaldata

SemanticWeb• Definitionisdevelopedin1960s.• anextensionofthecurrentWWW.• informationiswell-definedwithmeaning.• enablecomputers andpeopletounderstand.

• DataissavedovertheWWW:• Rowsharing:entity-basedview• Columnsharing:attribute-basedview• Cellsharing:SemanticWeb,RDFview

SemanticWeb- Success• Over2.5billionwebpageshavemarkupconformingtotheschema.org format;• LinkeddataiswidelyadoptedbymajorlibrariesandmuseumsaswellasmediasitessuchasBBCandNewYorkTimes;• WebcompaniesaredevelopingknowledgegraphsthatlinkmassivenumberofentitiestogethersuchasGoogle,Bing,andFacebook;• CommercialdatabasesystemsareprovidingnativesupportforSemanticWeblanguagessuchasOracle;• Recommendercompaniesaretakingadvantageofsemanticsandtaggingtoimprovetheiraccuracy;• Theworldhealthorganizationisdevelopingthemaininternationalterminologyfordiseasesasanontologyforsemanticwebusers;etc.

SemanticWeb- Challenges• ThedevelopmentisstillbelowtheexpectationsofthefoundersoftheSemanticWeb.• Westillhavefewmeanstoeasilygeneratesemanticwebannotations.• Itischallengingthathowtoeffectivelyqueryhugenumberofdecentralizedinformationrepositoriesofvaryingscales.• TheresearchofSemanticWebhastransitionedintolarger,moreappliedsystems.• AlthoughcurrentSemanticWebimplementationssupportsometemporalelements,however,itisnotenoughtosolvetheproblem“Findingaccuratecurrentdata”.

Ontology• Anontologyisanexplicitspecificationofaconceptualization- thetermsinthedomainandtherelationshipamongthem.• Itdefinesacommonlyacceptedvocabularyforadomainforinformationsharing- notonlyhumanbeingsbutalsomachineagents.• Themainrequirementsforagoodontologyincludewell-definedsyntax,efficientsupportforreasoning,aclearandformalsemantics,sufficientpowerofexpression,andeasytoexpress.• AgoodontologyforTimeiscriticalandfundamental.

7

OntologyGuide• Thereare7stepstodevelopanontology:• Step1:Domainandscope• Step2:Reuseexistingontologies• Step3:Definingimportantterms• Step4:Definingclassesandclasshierarchy• Step5:Definingpropertiesofconcepts• Step6: Definingfacetsofproperties• Step7: Fillvaluetocreateaninstance

8

DescriptionLogic• DescriptionLogiciswidelyusedinontologicalmodeling.DescriptionLogicOntologiesconsistofasetofstatements,whicharecalledaxiomsthatmustbetrue.• Assertionalaxioms(ABox)• Representsattributesorfactsoftheobject

• Terminologicalaxioms(TBox)• Representrelationshipsbetweenconcepts

• Relationalaxioms(RBox)• Representthepropertyofroles

9

DLNotations

10

ResourceDescriptionFramework• TraditionalRelationalDatabaserepresentsinformationeitherbyColumn(forspecifictopics)orbyRow(forsomeentities).• RDFmakesinformationrepresentedbyCell(apieceofinformation)possible.• TheRDFdatamodelisbasedasetofstatements,whicharesubject-predicate-objecttriples.• Thesubjectinthetriplerepresentsaresource.• Thepredicaterepresentstherelationshipbetweenthesubjectandtheobject.• Theobjectrepresentsattributesorpropertiesoftheresource.

RDF-Statement

12

RDF-CodePseudo code:<rdf:Description rdf:about="Subject">

<Predicate rdf:resouces="Object"></Predicate><Predicate>Literal</Predicate>

</rdf:Description>

<?xml version="1.0"?><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:ex="http://example.org/"><rdf:Description rdf:about="http://www.example.org/WWeber">

<ex:livesIn rdf:resouces="http://www.example.org/NewYorkCity"></ex::livesIn><ex:fullName>William Weber</ex::fullName>

</rdf:Description>

</rdf:RDF>

13

RDFa• RDFa(ResourceDescriptionFrameworkinAttributes)isaW3CRecommendationthataddsasetofattributelevelextensionstoHTMLandvariousXML-baseddocumenttypesforembeddingmetadata.

<p author ="http://www.example.org/people" >William Weber<span property = "http://www.example.org/livesIn"> lives in</span><span location = "http://www.example.org/location"> New York City</span>

</p>

14

Turtle• AturtledocumentenablesrepresentingaRDFgraphinacompacttextualformat.• BesidethenamespacedefinitionsaswehaveseeninRDF,turtleisverycompactbecauseoftheuseofcolumntolistpredicates,andcomatolistobjects.

15

N-Triple• N-TriplescorrespondsdirectlytotherawRDFtriplesandusesfullyunabbreviatedURIs.Thesubject,predicateandobjectofanRDFTriplearerepresentedinasequenceandseparatedbywhitespace.Thissequenceisterminatedbya’.’andanewline.

<http://one.example/subject1> <http://one.example/predicate1><http://one.example/object1> . # comments here

# or on a line by themselves_:subject1 <http://an.example/predicate1> "object1" ._:subject2 <http://an.example/predicate2> "object2" .

16

Notation3• Notation3(N3)isamorecompactserializationofRDF.Namespacesareusedtoabbreviatethestatements.Thus,N3providesacompactrepresentation.SimilartoTurtle,‘;’isusedtoindicateanothertriplewiththesamesubject,and‘,’isusedtoseparateobjects.

17

Reification• Reification,isusingabuilt-invocabularyinRDFfordescribingstatementssothatweknowmorethanthemerelybinaryrelationship,or,inotherwords,ismakingstatementsaboutotherstatements.

• Inpractice,Reificationalwaysusesfourstatementsfordescribingstatements,andthusiscalled“reificationquad”.

• Thestandardreificationhasbeencriticizedforitslackofefficiency:• SingletonProperty:createsnewpropertythatembedsboththeoriginalandadditionalproperty

• N-aryrelations:createsanintermediateresourcetodenotetherelationship.

18

WebOntologyLanguage• OWLisalogic-basedlanguage,andmachineagentsareabletoexploitknowledgeexpressedinOWL.• TheW3CWebOntologyLanguageisalsoaSemanticWeblanguage.Itisdesignedtoexpressrichinformation.• OWL2asthemostcurrentversionwasreleasedin2012byW3Crecommendation.• TheOWL2ontologyprovidesstructuresasclasses,properties,individuals,anddatavalues,andarestoredasSemanticWebdocuments.

19

LinkedDataInitiative• LinkedDataInitiativeispartoftheSemanticWebinthewaythatresourcesoverthewebofhypertextcanbelinkedsohumanandmachineagentscanreachouttomoredataiftheyhavesome.

• ThefourprinciplesoflinkeddataasTimBerners-Leeproposedare:1)UseURIsasnamesforthings;2)UseHTTPURIssothatpeoplecanlookupthosenames;3)WhensomeonelooksupaURI,provideusefulinformation,using

thestandardsRDF,SPARQL);4)IncludelinkstootherURIssothattheycandiscovermorethings.

20

DublinCoreMetadataInitiative• TheDublinCoreMetadataInitiativeisoneofRDFvocabularythathasametadataelementandinthebeginningitprovidespropertiessuchascreator,publisher,andtitle,etc.• Thisoriginal15metadataelementsaredefinedevenbeforeRDFsothattheyhaveaseparatenamespace.• NowadaysDCMIisoneofthemostpopularRDFvocabulariesanditisinlinewiththeLinkedDatamovement.• SimpleDublinCorehas24elementswhileQualifiedDublinCorehas3additionalelements.

21

FOAF• AsFOAFstandsforFriendofaFriend,FOAFusesRDFtechnologytoconnectinformationonaperson’shomepagewiththatofhis/herfriends,andthefriendsofhis/herfriends.

• FOAFenablesmachinestounderstandapage,andlearnrelationsthatconnectpeople,places,andthingsontheweb.

• FOAFcangreatlyexpandtheknowledgebaseofwebasawhole.

• FOAFisveryeasytouseandtherearevariousFOAFtoolsforgeneratingFOAFfilessuchasFOAFsite,foaf-a-matic,etc

22

GoogleKnowledgeGraph• TheKnowledgeGraphisaknowledgebaseofGoogletoimproveitssearchengineandenhancetheresultbyaddingadisplayofstructuredanddetailedinformationbesidesthetraditionallistoflinkstoothersites.

• TheKnowledgeGraphprovidesaconvenientwayforGoogle’ssearchengineusersthattheydon’tneedtogofurtherforinformationiftheyaresatisfiedwiththeKnowledgeGraphdisplay.

• GoogleNowexploitstheresultoftheKnowledgeGraphandusestheshortsummaryforthekeywords/topicasfeedbacktoitsusers.

• TheKnowledgeGraphtakesasemanticsearchfromvarioussourcesincludeWikidataandWikipediaetc.

23

Schema.org• Schema.orgwascreatedin2011bymajorsearchenginesBing,Google,andYahoo.• Itaimsatprovidingasingleschemathatcoversawiderangeoftopics.Whilewebmastersonlyneedtowiththemarkuponce,searchenginescanusethemarkupdifferently.• TheideaofSchema.orgactuallyalignwithRDFthatapieceofinformationisrepresentedasatriplebydataprovidesandhowtoretrievetheinformationistheworkofquerydevelopers.

24

LinkedOpenVocabularies• Basedontheviewofvocabulariesalsodata,thenameLinkedOpenVocabulariesisderivedfromLinkedOpenData.• LOVprovidesachoiceofmanyvocabulariesbasedonasetofcriteriasuchasURIstabilityandavailability,properversion,etc.• MostoftheestablishedvocabulariesarecollectedinLOV,aswellastheirversionhistoryandrelationshipsamongeachother.• LOVprovidesatoolforwebmasterstochoosebestvocabularywithlessconsiderations.

25

Timeontology• Timeisoneofthemostimportantconceptinmostscientificfields.Manyculturesregardtimeandspaceasthefundamentalscaleoftheworld.• TemporalEntity• TemporalRule• TemporalConcepts• TemporalFeature• TemporalProperMeasure

26

Timeontology• Atemporalelementistheprimitiveentitythatisusedtorepresenttime.TheseelementsforatheoryoftimeareTimePointsandTimeIntervals.• TimePointsaretheelementsofatimelinewhichcanalsobecalledinstants.Timepoint(instant)thasnoduration.Thevalueoftdiffersinthespecificprograms.Someassignnonnegativevaluestoaninstant,someassignnegativevaluetorepresentpastandpositivetorepresentfuture.

• TimeIntervalsareusedtoextendthepoint-basedmodeloftimetorepresentaperiodorapartofthetime.Also,therelationship“during"isassociatedwithaduration,whichcannotbetimepoints,butbeaninterval.Sometheoriesarguethattimeintervalisacompoundstructureoftimepoints.

27

TemporalProperties• DatesandTimestampsbotharewidelyusedinprograms.• Datesareorderedtriplesofintegersforyear,month,andday.• Timestampscouldbeinterpretedasametricreferencetoapointinthetime

line.Timestampscancontainpreciseinformationandtheprecisenessisdependedonthesystem.

28

TemporalRelations• TemporalRelationsarethebinarypropertiesamongelementsofatimemodel.Dependsontheelementsintherelationship,therearethreecategories:pointtopoint,pointtointerval,andintervaltointerval.

29

Temporaldatabase• AValidTimeisatimeperiodduringwhichthestatement/recordistruewithrespecttotherealworld.Thetemporalattributesforvalidtimeareindependentofthetransactiontimeinthedatabase;theyarereflectingthetimeinrealworld.• ATransactionTimeisatimeperiodduringwhichthestatement/recordinthedatabaseisconsideredtobetrue.Itisassociatedwiththetimethatthestatementisaddedtothedatabaseandisassumetobetruetillnow.

30

HistoricalDatabase• Historicaldatabaseonlysupportsvalidtime.Thus,itcanberegardedasclassicalrelationaldatabasewithanewtemporalattributerepresentsthevalidtime.• Historicaldatabaserepresentsthefulllife-spanofanentitynotjustcurrentstate.Wecanhavedataalreadyexpired(paststate)andwillbevalidinthefuture(futurestate)

31

RollbackDatabase• Rollbackdatabaseistheanothertypeofdatabase.Itisdifferentthanthehistoricaldatabaseandonlysupportstransactiontime.• Rollbackdatabasekeepsallrecordswiththeirtimestampswhentheyareentered.• Rollbackdatabaseisideallyfordatarecoveryfromafailure.

32

Bi-temporalDatabase• Bi-temporaldatabaseisthemostusedtemporaldatabaseinreality.Thisdatabasesupportsbothtypesoftime.

33

TupleTime-stamping• Therearetwoapproachesfortime-stampinginDBMS.Oneistupletimestamping,theotherisattributetime-stamping.• Tupletimestampingapproachkeepsthe1NFrelations,andaddstimestampstoeachtupleinarelation.• Eachtimeweupdateanattributeassociatedwithtime,wehavetoinserta

newtupleintothetable,whichwillproducealotofredundantinformation.• Theadvantageoftupletimestampingisminimumchangeneededforexisting

relationdatabase.

34

AttributeTime-stamping• Attributetimestampingusesamorecomplexwaytostorethetemporalelements.• Whenanattributehasatemporalelements,itwillbeattachedonto,no

mattertheelementsaretimepoints,intervals,etc.• Insteadofasimpleattribute,itbecomesarelationthatexpressesthe

attributevaluewithassociatedtemporalelements.• Thus,attributetime-stampingalsocallednestedtimestamping,becausewe

canconsiderthetemporalattributeasasub-relationofthetuplerelations.

35

TemporalAlgebra• Historicalrelationalalgebra(HRA)• Temporalelementsrepresentvalidtime

• NestedBi-temporalalgebra(NBtA)• Temporalelementsrepresentbothvalidandtransactiontime

36

HRA- Time• Timeisacontinuesvariable;• Indatabases,timeisrecordedasdiscretepoints;• Iftheoriginoftimeist0andcurrenttimeistnow,timeTcanberepresentedasasetof{t0,t1,t2...,tnow },wheret0 <t1 <...<tnow,t0 +1=t1,…,tnow-1+1=tnow.

37

HRA- PointandInterval• Timepointsandintervalsbothrepresenttimevariable;• Theycanbeconvertedintoeachother.• Timepointscanberegardedasthesmallestinterval;• andtimeintervalcanberegardedasasetoftimepoints.• Weuse[l,u)torepresenttheintervalthatstartsattl (lowerbound)inclusiveandendsattu (upperbound)exclusive.• Sinceintervalrepresentationcansavemorespace,wejustuseintervalrepresentationfromnowon.

38

HRA- Attribute• Anattributemayhavetemporalelement.• IftheattributeAistimeinvariant,suchasSocialSecurityNumber,thevalueitselfformsanatom.• IfAistimevariant,thatmeansthevalueaofAisvalidforacertaintimeandnotvalidforothertime,theattributeneedstoincludethetemporalelementas〈[l,u),a〉.

39

HRA- AttributeType• TherearefourtypesofattributesinR.• AtomicattributescontainatomicvalueswhicharesubsetsofU.• Triplet-valuedattributescontaintripletsastheformatof〈[l,u),a〉.• Set-valuedattributescontainsasetofatomicvalues• set-triplet-valuedattributescontainsetsoftripletsasvalues.Eachsetcontains

oneormoretripletsandrepresentsthehistoryoftheattributeoverT.

40

HRA- AttributeType

41

HRA- Basicoperations• StandardrelationalalgebraoperationscanbeappliedtoHistoricalRelationsdirectlywithminormodifications.• Projection(π)andCartesianproduct(×)operationsareremainunchanged.• Setunion (∪)andSetdifference(−)mayhaveoverlapping,adjacent,and

containedintervalsandthenchangetheattributetypefromtriplet-valuedtoset-triplet-valued.

42

HRA- Newoperations• Triplet-valuedattributescanbepackedtoaset-triplet-valuedattributesandunpackdoesthereverse.• Atomicattributescanformtriplet-valuedattributesbytriplet-formationtoconvertthreeattributestogetherwhiletriplet-decompositionbreaktriplet-valuedattributestoitscomponents.• Sliceoperationrestrictsthetimeofanattributebasedonthetimeofanotherattribute.• Drop-timeoperationdiscardsthetimecomponentandonlykeeptheatomoratomsetfromtriplet-valuedattributesorset-triplet-valuedattributes.

43

NBtA - Operations• Thereareeightbasicoperationsin:SetOperations,Projection,Selection,CartesianProduct,Unnest,Nest,TemporalAtomDecomposition,andTemporalAtomFormation.• WhileSetOperation,Projection,CartesianProductareexactlythesameasrelationalalgebra,othersneedmodifications.• Thenestedtemporalmodelisageneralizedmodelofthehistoricalrelationalmodelwherethelatteronehasorder1.• Thus,thealgebraoperationsremainthesameexceptthenestingandunnestingoperations.

44

NBtA - Atoms• BitemporalAtomAbitemporalatomhastwotemporalintervalstorepresentnotonlythevalidtimeofthedatavaluebutalsothetransactiontimeofit.

• Thus,tinabitemporalrelationhasaformatas〈TT,VT,V〉.• Also,sincetimepointsandtimeintervalscanbeconvertedfromonetotheothereasily;andtimeintervalismoregeneral,westillusetimeintervaltorepresentthetransactiontimeandvalidtimeinabitemporalatomas〈[TTl ,TTu),[VTl,VTu),V〉.

45

NBtA - Unnesting• Theunnestingoperationmakesanestedrelationflatten.• IfattributeAofabitemporalrelationRisasetofatomsorbitemporalatoms,

applyingμ toAwillcreateanewtupleforeachatomorbitemporalatominthesetofA,andkeepotherattributesunchanged.

• Ifμ isappliedtoeverybitemporalset-valuedattributeinRrecursively,thenthefinalresultwillbeaflatrelation(1NF)withonlyatomsorbitemporalatoms,ornestingorderof0.

46

NBtA - Nesting• Nestingoperationpacksabitemporalschematomakeitmorecompact.• Ifcertainconditionsaresatisfied,nestingoperationscanreverseazeroorderflattenedbitemporalschemagetfromanestedbitemporalschemausingunnestingoperation.

47

NBtA - Slice• Sliceoperationmodifiesthekth attribute’sbitemporaltimecomponentbasedonthetemporalcomponentofthepth attributebytheoperatorθ∈ {∪,∩,−}.Theresultmaynotbeempty.• The∩representsthe“where”predicateinqueries.

48

NBtA - Decomposition• Bitemporalatomdecompositionoperatorsplitsthekth attributesAofrelationRintofivenewattributesthatwereit’scomponents:A.TTl ,A.TTu,A.VTl ,A.VTu,A.V.

49

NBtA - Formation• Bitemporalatomformationisthereverseofbitemporalatomdecomposition(δ).Itcombinesexistingattributestogethertobuildabitemporalatom.

50

NBtA - Rollback• LetRbeabitemporalrelationschema,<r(1),...r(n)>,wherer(k)isabitemporalattribute.• TheresultcontainsbitemporalatomssuchthatitsTTcomponentincludesthetimet.• Ifwewanttocutthetransactiontimeofthesebitemporalatomssothatyonlyincludestimet,thenwecanreplaceintheaboveformulaz=xbyz=<[t,t+1),x.TT,x.V>.

51

ConnectionandFuture• TemporalelementsincurrentSemanticWebTechnologies• HowtomakesemanticwebmoreexpressivebyborrowingfromTemporalDatabase?• Howtodesignqueriesanddatastructuresothatsearchingresultismoreaccurateandefficient?

52

Q&A

Thankyou