版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
知識(shí)管理
KnowledgeManagement李海生
1課程郵箱PWD:123456782與知識(shí)管理相關(guān)的Topic信息檢索InformationRetrieval知識(shí)工程KnowledgeEngineering語(yǔ)義網(wǎng)SemanticWeb本體Ontology資源描述框架ResourceDescriptionFramework本體描述語(yǔ)言O(shè)ntologyWebLanguage知識(shí)網(wǎng)格KnowledgeGrid面向服務(wù)的架構(gòu)Service-OrientedArchitecture知識(shí)管理成熟度模型KnowledgeManagementMaturityModel(K3M)知識(shí)管理案例……3知識(shí)管理標(biāo)準(zhǔn)知識(shí)管理標(biāo)準(zhǔn)國(guó)家標(biāo)準(zhǔn)GB/T23703.1歐洲標(biāo)準(zhǔn)澳大利亞國(guó)家標(biāo)準(zhǔn)加拿大國(guó)家標(biāo)準(zhǔn)英國(guó)國(guó)家標(biāo)準(zhǔn)美國(guó)APQC標(biāo)準(zhǔn)(美國(guó)生產(chǎn)力與質(zhì)量中心AmericanProductivityandQualityCenter)4知識(shí)管理國(guó)家標(biāo)準(zhǔn)框架術(shù)語(yǔ)組織文化知識(shí)活動(dòng)實(shí)施指南評(píng)價(jià)5知識(shí)管理業(yè)務(wù)流程知識(shí)管理成熟度模型K3M知識(shí)管理評(píng)估模型6上次課程內(nèi)容回顧元數(shù)據(jù)召回率(Recall)檢索出的相關(guān)文檔數(shù)和文檔庫(kù)中所有的相關(guān)文檔數(shù)的比率衡量的是搜索引擎的查全率
精度(Precision)
檢索出的相關(guān)文檔數(shù)與檢索出的文檔總數(shù)的比率
衡量的是搜索引擎的查準(zhǔn)率7語(yǔ)義Web語(yǔ)義Web的基礎(chǔ)架構(gòu)[TimBerners-Lee,2000]
8語(yǔ)義網(wǎng)書籍推薦9語(yǔ)義網(wǎng)書籍推薦10元數(shù)據(jù)表示語(yǔ)言
標(biāo)記語(yǔ)言
標(biāo)準(zhǔn)通用標(biāo)記語(yǔ)言SGML超文本標(biāo)記語(yǔ)言HTML可擴(kuò)展標(biāo)記語(yǔ)言XML虛擬現(xiàn)實(shí)模型語(yǔ)言VRML無線標(biāo)記語(yǔ)言WML元數(shù)據(jù)標(biāo)準(zhǔn)
DublinCoreHL7(描述醫(yī)學(xué)網(wǎng)絡(luò)資源的元數(shù)據(jù))教育資源元數(shù)據(jù)
機(jī)讀目錄(MARC)
11XML
性質(zhì)W3C于1998年2月發(fā)布的一種標(biāo)準(zhǔn)
是SGML的一個(gè)簡(jiǎn)化子集
可擴(kuò)展標(biāo)記語(yǔ)言特點(diǎn)較好地解決了HTML無法表達(dá)數(shù)據(jù)內(nèi)容等問題允許各個(gè)組織、個(gè)人建立適合自己需要的標(biāo)記集合
12XML與HTML比較文檔的3個(gè)要素?cái)?shù)據(jù)、結(jié)構(gòu)以及顯示方式
HTML顯示方式內(nèi)嵌在數(shù)據(jù)中
在創(chuàng)建文本時(shí),要時(shí)時(shí)考慮輸出格式
創(chuàng)建文檔的重復(fù)工作量大
不易抽取語(yǔ)義信息
XML顯示格式從數(shù)據(jù)內(nèi)容中獨(dú)立出來,保存在樣式單文件(StyleSheet)中
自我描述性質(zhì)能夠很好地表現(xiàn)許多復(fù)雜的數(shù)據(jù)關(guān)系
13XML結(jié)構(gòu)
文件頭
與HTML類似,是可選的文件主體
包括一個(gè)或多個(gè)元素
形式是一棵分級(jí)的樹
混雜的“結(jié)尾部分”由注釋、處理指令和空白組成
注釋用<!----!>表示,可在文檔中任意位置
14元素(Element)
表示方法由開始標(biāo)記、結(jié)束標(biāo)識(shí)以及標(biāo)識(shí)之間的數(shù)據(jù)構(gòu)成
標(biāo)記之間的數(shù)據(jù)被認(rèn)為是元素的值
每個(gè)元素都有不同的標(biāo)記名<director>王力</director>元素名是director元素值是“王力”<actor>王力</actor>元素名是actor元素值是“王力”15元素要點(diǎn)關(guān)鍵的3點(diǎn)
所有元素必須有結(jié)束標(biāo)記
所有元素必須正確嵌套,不允許交迭
所有屬性值必須加引號(hào)
注意點(diǎn)XML文檔主體有且僅有一個(gè)XML根元素
可以嵌套XML元素,形成一棵樹形結(jié)構(gòu)
16XML文檔例子<書類><書
國(guó)際標(biāo)準(zhǔn)書號(hào)="0345374827"><標(biāo)題>數(shù)據(jù)結(jié)構(gòu)</標(biāo)題><作者>許卓群等</作者></書><書
國(guó)際標(biāo)準(zhǔn)書號(hào)="0345374828"><標(biāo)題>數(shù)據(jù)挖掘</標(biāo)題><作者>韓家煒等</作者></書></書類>17例子的樹狀結(jié)構(gòu)
18XML屬性
給元素提供進(jìn)一步的說明信息
必須出現(xiàn)在起始標(biāo)記中
以名稱/取值對(duì)出現(xiàn),屬性名不能重復(fù)名稱與取值之間用等號(hào)“=”分隔用引號(hào)把取值引起來
例如
<工資
貨幣="人民幣元">100000</工資>說明了工資的貨幣單位是人民幣元
19XML處理器
目的解析XML文檔提供對(duì)XML文檔內(nèi)容和結(jié)構(gòu)的訪問
文檔對(duì)象模型(DocumentObjectModel,DOM)將完整的XML轉(zhuǎn)換成一棵樹的形式放在內(nèi)存中
供隨機(jī)訪問元素、屬性
XML簡(jiǎn)單API(SimpleAPIforXML,SAX)采用事件驅(qū)動(dòng)模型
通過標(biāo)記的起止來觸發(fā)事件
DOM與SAX的比較(討論)20處理指令(ProcessingInstruction)
目的給XML處理器提供信息,使其能夠正確解釋文檔內(nèi)容表示起始標(biāo)記是“<?”,結(jié)束標(biāo)記是“?>”方法XML分析器把這些信息原封不動(dòng)地傳給應(yīng)用程序
由應(yīng)用程序來解釋這個(gè)指令
遵照它所提供的信息進(jìn)行處理
21兩種處理指令XML聲明
<?Xmlversion="1.0"encoding="gb2312"standalone="no"?>必須包括version屬性,指明所采用的XML的版本號(hào),而且它必須在屬性列表中排在第一位standalone屬性表明該XML文檔是否和一個(gè)外部文檔類型定義DTD配套使用
encoding屬性則指明了數(shù)據(jù)所采用的編碼標(biāo)準(zhǔn)
XSL樣式單引用
<?xml-stylesheettype=“text-xsl”href=“contacts.xsl”?>告訴XSL樣式單解析器,樣式單的類型是text-xsl類型text-xsl可以在文檔contacts.xsl中找到
22XML的名字空間
背景由于XML對(duì)互操作性的支持,每個(gè)人都可以創(chuàng)建屬于自己的XML詞匯
不同的開發(fā)者會(huì)用相同的元素來代表不同的實(shí)體
作用為XML文檔元素提供了一個(gè)上下文
允許開發(fā)者按一定的語(yǔ)義來處理元素
為什么引入NS(命名空間)討論23XMLNS例子<?xmlversion="1.0"?><hamburgersxmlns:purchase=/franchise/pricesxmlns:sales=/customer/prices><hamburgerlowfat="dreamon"><name>CowBurger</name><description>Greasyandgood.</description><purchase:price>0.99</price><sales:price>2.99</price></hamburger></hamburgers>24XSL(ExtensibleStylesheetLanguage)
背景用標(biāo)準(zhǔn)的DOMAPI來實(shí)現(xiàn)XML數(shù)據(jù)的交互,是十分單調(diào)乏味的
如想找到所有滿足某些條件的元素,或轉(zhuǎn)換為簡(jiǎn)單的HTML表格,必須手工書寫代碼遍歷整棵樹來尋找
目的為標(biāo)準(zhǔn)化及簡(jiǎn)化人們完成這些任務(wù)所需做的工作
25精度(Precision)<Riverid="Yangtze"org/river#River"/><li><xsl:value-ofselect="name"/>,<Damrdf:ID="ThreeGorges"org/geography/rivers"></obstacle>Types(classes)containproperties.<property-B><Riverid="Yangtze"<length>6300kilometers</length>Equivalent!xmlns:rdf="http://www.食品的例子XML文檔<?xmlVersion="1.0"?><食品><食品
脂肪含量="低"><名稱>月餅</名稱><描述>中秋節(jié)食用的傳統(tǒng)食品</描述><價(jià)格>2.99</價(jià)格></食品><食品>HTML文檔<html><body><h1>食品</hl><o1><li>月餅,中秋節(jié)的傳統(tǒng)食品,2元</li></o1></body></html>26XSL文件
<?xmlVersion="1.0"?>-xsl">
<xsl:templatematch="/">選取了當(dāng)前結(jié)點(diǎn)的所有食品子結(jié)點(diǎn)
<html><body><hl>hamburgers</hl><xsl:for—eachselect="hamburgers[@lowfat="dreamon"]">
標(biāo)識(shí)出符合給定條件的結(jié)點(diǎn)
<li><xsl:value-ofselect="name"/>,<xsl:value-ofselect="description"/>,<xsl:value-ofselect="price"/>
取結(jié)點(diǎn)中各個(gè)元素的值</li></xsl:for—each><body><html></xsl:template></xsl:stylesheet>27XSL用途增強(qiáng)了互操作性
XML數(shù)據(jù)轉(zhuǎn)換為HTML從一種XML格式到另一種XML格式之間的轉(zhuǎn)換
開發(fā)人員不用為了描述某種類型的數(shù)據(jù)而采用通用的詞匯某個(gè)人向你的系統(tǒng)發(fā)送了一篇XML文檔,而你的系統(tǒng)不認(rèn)識(shí)它所采用的XML詞匯只要進(jìn)行一次簡(jiǎn)單的XSL轉(zhuǎn)換就可以得到自己熟悉的詞匯28文檔類型定義
DTD
目的定義XML文檔結(jié)構(gòu),即其中的元素、屬性以及元素之間關(guān)系的
定義了文件中的元素能用什么名字,能放在什么位置,應(yīng)該怎樣組合
可以檢測(cè)XML文檔的結(jié)構(gòu)是否正確
例如描述一組<表>,其中每個(gè)<表>又可以包含若干個(gè)<項(xiàng)>DTD中應(yīng)該有語(yǔ)句:<!ELEMENT表(項(xiàng))+><!ELEMENT項(xiàng)(#PCDATA)>生成的表:<表><項(xiàng)>管樂</項(xiàng)><項(xiàng)>弦樂</項(xiàng)><項(xiàng)>器樂</項(xiàng)><表>29DTD引用內(nèi)部引用包含在XML文檔的前導(dǎo)說明部分
如<?xmlversion="1.0"encoding="GB2312"standalone="yes"?><!DOCTYPE根元素名[元素描述]>
文檔體…外部引用作為一個(gè)外部文檔被引用
如<?xmlversion="1.0"encoding="GB2312"standalone="no"?><!DOCTYPE根元素名
SYSTEM"外部DTD文件的URL">
文檔體…SYSTEM指一個(gè)作者或組織所編寫的通用的DTD或是<!DOCTYPE根元素PUBLIC"DTD名稱""外部DTD的URL">PUBLIC指由權(quán)威機(jī)構(gòu)制訂的、提供給特定行業(yè)或公眾使用的DTD
30DTD中ETD(元素類型聲明)作用聲明所有有效的文檔元素
結(jié)構(gòu)
<!ELEMENT元素名元素內(nèi)容描述>類型
空元素類型
<!ELEMENT元素名EMPTY>使用空元素標(biāo)記,元素中沒有內(nèi)容
ANY元素類型
元素中可以包含任何內(nèi)容
父元素類型
元素中可以包含子元素在DTD中通過正則表達(dá)式規(guī)定子元素出現(xiàn)的順序和次數(shù)
混合元素類型
<!ELEMENT元素名(#PCDATA|子元素名1|子元素名2|…)>元素中可以包含文本文本之間可以有選擇地插入子元素,子元素出現(xiàn)的順序和次數(shù)不受限制
31XMLSchema
DTD缺點(diǎn)采用了非XML的語(yǔ)法規(guī)則不支持?jǐn)?shù)據(jù)類型擴(kuò)展性較差XML模式己經(jīng)漸有取代DTD的趨勢(shì)擁有比DTD更強(qiáng)大的功能
用于更精確和有效地描述XML文檔結(jié)構(gòu)32XML模式的優(yōu)點(diǎn)一致性直接借助XML自身的特性利用XML的基本語(yǔ)法規(guī)則定義XML文檔的結(jié)構(gòu)不必再利用一種特定的形式化的語(yǔ)言擴(kuò)展性
引入了數(shù)據(jù)類型、命名空間在基本數(shù)據(jù)類型基礎(chǔ)上用戶可自己擴(kuò)展數(shù)據(jù)類型互換性
利用模式能夠書寫XML文檔并驗(yàn)證文檔的合法性
對(duì)不同的模式進(jìn)行轉(zhuǎn)換,以實(shí)現(xiàn)更高層次的數(shù)據(jù)交換
規(guī)范性
利用元素的內(nèi)容和屬性來定義XML文檔的整體結(jié)構(gòu)基于XML,更具有規(guī)范性
33數(shù)據(jù)類型
用途為ElementType和AttributeType指定數(shù)據(jù)類型
基本數(shù)據(jù)類型(10種)entity,entities,enumeration,id,idref,idrefs,nmtoken,nmtokens,notation和string擴(kuò)展數(shù)據(jù)類型
bin.baSe64,bin.heX,boolean,char,date,dateTime,dateTime.tz,,float,int,number,timetime.tz,i1,i2,i4,r4,r8,ui1,ui2,ui4,uri,uuid34XMLS元素類型基本格式
<ElementTypecontent="{|empty|textOnly|eltOnly|mixed}"dt:type="datatype"model="{open|closed}"name="idref"order="{one|seq|many}“>
</ElementType>
取值及含義
(略)35XMLS屬性類型基本格式
<AttributeTypedefault="default-value"dt:type="primitive-typedt:values="enumerated-values"name="idref"required="{yes|no}">取值及含義
(略)36數(shù)據(jù)類型的使用例子(1)定義元素“名字”和“生日”<elementname="name"type="string"minOccurs="1"maxOccurs="1"/><elementname="birthday"type="date"minOccurs="1"maxOccurs="1"/>其中string和date類型都是Schema中自帶的基本數(shù)據(jù)類型minOccurs和maxOccurs是最少和最多出現(xiàn)次數(shù)的約束,這里表示有而且只出現(xiàn)一次
37數(shù)據(jù)類型的使用例子(2)擴(kuò)展數(shù)據(jù)類型Schema中沒有規(guī)定的類型,如“性別”類型
定義例子
<simpleTypename="性別"><restrictionbase="string"><enumerationvalue="男"/><enumerationvalue="女"/></restriction></simpleType>注釋name屬性是該數(shù)據(jù)類型的名稱
數(shù)據(jù)類型由restriction子元素進(jìn)行約束該元素中的base屬性是基類型
38元數(shù)據(jù)自動(dòng)抽取技術(shù)
預(yù)處理
剔除在格式、內(nèi)容、語(yǔ)言等方面存在問題或嚴(yán)重缺失的文檔
產(chǎn)生格式相對(duì)規(guī)整的文本文檔
提取元數(shù)據(jù)
由數(shù)字化文檔元數(shù)據(jù)的規(guī)范定義,產(chǎn)生提取元數(shù)據(jù)的各種模式
依據(jù)元數(shù)據(jù)模式進(jìn)行數(shù)字化文檔的挖掘與匹配
利用與數(shù)字化文檔相關(guān)的啟發(fā)式規(guī)則和經(jīng)驗(yàn)規(guī)則,有效提取元數(shù)據(jù)
39MathML含義MathematicalMarkupLanguage用途用來描述數(shù)學(xué)符號(hào)、紀(jì)錄其結(jié)構(gòu)和內(nèi)容目標(biāo)是在Web上實(shí)現(xiàn)能像HTML處理文本一樣,處理數(shù)學(xué)問題
40例:x2+4x+4=0
<apply>
<plus/><apply><power/><ci>x</ci><cn>2</cn></apply><apply>
<times/><cn>4</cn><ci>x</ci></apply><cn>4</cn></apply>41SMIL含義SynchronizedMultimediaIntegrationLanguage用途一種基于XML的表述多媒體演示的語(yǔ)言
將一組獨(dú)立的多媒體對(duì)象整合為一個(gè)多媒體演示
42SMIL例子<HTML><HEAD><STYLE>.time{behavior:url(#default#time);}</STYLE></HEAD><BODY>
<DIVCLASS="time"t:timeline="seq"><Pclass="time"t:dur="1">
Thisappearsforonesecondandgoesaway
</P><Pclass="time"t:dur="1">
Thisappearsafteronesecond,remainsvisibleforonesecondandgoesaway
</P><Pclass="time"t:dur="1">
Thisappearsaftertwoseconds,remainsvisibleforonesecondandgoesaway
</P></DIV></BODY></HTML>43CDF
含義ChannelDefinitionFormat
一種開放的規(guī)格允許Web的發(fā)布者經(jīng)常更新信息或是頻道
CDF起到了頻道內(nèi)容目錄的作用用戶僅需選擇一下頻道
信息就會(huì)從Web服務(wù)器定時(shí)的傳遞到客戶端
44資源描述語(yǔ)言RDF45資源描述框架語(yǔ)言RDF采用元數(shù)據(jù)來索引網(wǎng)絡(luò)上的信息使用RDF(ResourceDescriptionFramework)來描述元數(shù)據(jù)以及元數(shù)據(jù)之間的關(guān)系元數(shù)據(jù)是“關(guān)于數(shù)據(jù)的數(shù)據(jù)”,是用來描述網(wǎng)絡(luò)資源的數(shù)據(jù)。RDF是處理元數(shù)據(jù)的基礎(chǔ),它為在應(yīng)用程序之間交換機(jī)器可理解的網(wǎng)絡(luò)數(shù)據(jù)提供了可互操作性。46RDF的應(yīng)用領(lǐng)域RDF可以應(yīng)用在很多領(lǐng)域中在資源發(fā)現(xiàn)中,RDF可以增強(qiáng)搜索引擎語(yǔ)義處理能力在編目領(lǐng)域中,RDF可以用來描述某個(gè)網(wǎng)站、網(wǎng)頁(yè)之間或者數(shù)字圖書館中的內(nèi)容及內(nèi)容之間的關(guān)系采用RDF的智能主體(Agent)能夠提高機(jī)構(gòu)之間知識(shí)共享和交換的能力47RDF的作用?RDF(ResourceDescriptionFramework)來描述元數(shù)據(jù)以及元數(shù)據(jù)之間的關(guān)系長(zhǎng)江的XML描述文檔<?xmlversion="1.0"?><Riverid="Yangtze"xmlns="/river"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></River>"HereisdataabouttheYangtzeRiver.Ithasalengthof6300kilometers.ItsstartingLocationiswesternChina'sQinghai-TibetPlateau.ItsendingLocationistheEastChinaSea."48XML-->RDF<?xmlversion="1.0"?><Riverid="Yangtze"xmlns="/river"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></River>XML將XML文檔修改為有效的RDF文檔:<?xmlversion="1.0"?><Riverrdf:ID="Yangtze"
xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></River>RDFYangtze.xmlYangtze.rdf"convertto"49RDF格式<?xmlversion="1.0"?><Riverrdf:ID="Yangtze"
xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></River>RDFprovidesanIDattributeforidentifyingtheresourcebeingdescribed.TheIDattributeisintheRDFnamespace.Addthe"fragmentidentifiersymbol"tothenamespace.12350RDF格式(cont.)<?xmlversion="1.0"?><Riverrdf:ID="Yangtze"
xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></River>Identifiesthetype(class)oftheresourcebeingdescribed.Identifiestheresourcebeingdescribed.ThisresourceisaninstanceofRiver.Theseareproperties,orattributes,ofthetype(class).Valuesoftheproperties123451命名規(guī)則xmlns="/river#"Question:為什么在命名空間后放置"#"?E.g.,Answer:RDFisveryconcernedaboutuniquelyidentifyingthings-uniquelyidentifyingthetype(class)anduniquelyidentifyingtheproperties.Ifweconcatenatethenamespacewiththetypethenwegetauniqueidentifierforthetype,e.g.,/river#RiverIfweconcatenatethenamespacewithapropertythenwegetauniqueidentifierfortheproperty,e.g.,/river#length/river#startingLocation/river#endingLocationThus,the"#"symbolissimplyamechanismforseparatingthenamespacefromthetypenameandthepropertyname.BestPracticeBestPractice52RDF格式<?xmlversion="1.0"?><Class
rdf:ID="Resource"
xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="uri"><property>value</property><property>value</property>...</Class>53使用RDF格式的好處TheRDFformat,ifwidelyused,willhelptomakeXMLmoreinteroperable:Toolscaninstantlycharacterizethestructure,"thiselementisatype(class),andhereareitsproperties”.RDFpromotestheuseofstandardizedvocabularies...standardizedtypes(classes)andstandardizedproperties.TheRDFformatgivesyouastructuredapproachtodesigningyourXMLdocuments.TheRDFformatisaregular,recurringpattern.Itenablesyoutoquicklyidentifyweaknessesandinconsistenciesofnon-RDF-compliantXMLdesigns.Ithelpsyoutobetterunderstandyourdata!Youreapthebenefitsofbothworlds:YoucanusestandardXMLeditorsandvalidatorstocreate,edit,andvalidateyourXML.YoucanusetheRDFtoolstoapplyinferencingtothedata.ItpositionsyourdatafortheSemanticWeb!NetworkeffectInteroperability54使用RDF格式的缺點(diǎn)受限制:在設(shè)計(jì)XML文件時(shí)受到RDF格式的約束.RDF使用命名空間來唯一識(shí)別類(types/classes),屬性和資源。要求對(duì)命名空間有準(zhǔn)確的理解。必須掌握RDF格式的語(yǔ)法。55唯一識(shí)別資源EarlierwesaidthatRDFisveryconcernedaboutuniquelyidentifyingthetype(class)andtheproperties.RDFisalsoveryconcernedaboutuniquelyidentifyingtheresource,e.g.,<?xmlversion="1.0"?><Riverrdf:ID="Yangtze"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></River>Thisistheresourcebeingdescribed.Wewanttouniquelyidentifythisresource.56<名稱>月餅</名稱>元素名是director<startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation>xmlns="http://www.<Damid="ThreeGorges"<property-B>由開始標(biāo)記、結(jié)束標(biāo)識(shí)以及標(biāo)識(shí)之間的數(shù)據(jù)構(gòu)成0"encoding="gb2312"standalone="no"?><endingLocation>EastChinaSea</endingLocation><obstaclerdf:resource="http://www.<length>6300kilometers</length>rdf:IDThevalueofrdf:IDisa"relativeURI".The"completeURI"isobtainedbyconcatenatingtheURLoftheXMLdocumentwith"#"andthenthevalueofrdf:ID,e.g.,<?xmlversion="1.0"?><Riverrdf:ID="Yangtze"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></River>Thus,thecompleteURIforthisresourceis:Yangtze.rdf/geography/rivers#Yangtze57Yangtze2,v2.ItpositionsyourdatafortheSemanticWeb!RDFisalsoveryconcernedaboutuniquelyidentifyingtheresource,e.文本之間可以有選擇地插入子元素,子元素出現(xiàn)的順序和次數(shù)不受限制ItalsoshowsRivercontainingatype-Dam.<Riverrdf:ID="Yangtze"<endingLocation>EastChinaSea</endingLocation>xml:base="http://www.<標(biāo)題>數(shù)據(jù)結(jié)構(gòu)</標(biāo)題><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><?xmlversion="1.0"encoding="gb2312"standalone="no"?>ThisisinconsistentwithRDFdesignpattern.org/geography/rivers">NoticethattheRDFdesignpatternisanxml:baseOnthepreviousslideweshowedhowtheURLofthedocumentprovidedthebaseURI.Dependingonthelocationofthedocumentisbrittle:itwillbreakifthedocumentismoved,oriscopiedtoanotherlocation.AmorerobustsolutionistospecifythebaseURIinthedocument,e.g.,<?xmlversion="1.0"?><Riverrdf:ID="Yangtze"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"
xml:base="/geography/rivers"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></River>ResourceURI=concatenation(xml:base,'#',rdf:ID)=concatenation(/geography/rivers,'#',"Yangtze")=/geography/rivers#Yangtze58rdf:about不使用相對(duì)的URI,而是用rdf:about標(biāo)識(shí)出完整的資源URI。<?xmlversion="1.0"?><Riverrdf:about="/geography/rivers#Yangtze"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></River>59RDF三元組->資源/屬性/值/geography/rivers#Yangtzehasa/river#lengthof6300kilometersresourcepropertyvalue/geography/rivers#Yangtzehasa/river#startingLocationofwesternChina's...resourcepropertyvalue/geography/rivers#Yangtzehasa/river#endingLocationofEastChinaSearesourcepropertyvalue60TheRDFFormat=triples!ThefundamentaldesignpatternofRDFistostructureyourXMLdataasresource/property/valuetriples!Thevalueofapropertycanbealiteral(e.g.,lengthhasavalueof6300kilometers).Also,thevalueofapropertycanbearesource,asshownabove(e.g.,property-AhasavalueofResource-B,property-BhasavalueofResource-C).Wewillseeexamplesofpropertieshavingaresourcevalueinalittlebit.<?xmlversion="1.0"?><Resource-A><property-A><Resource-B><property-B><Resource-C><property-C>Value-C</property-C></Resource-C></property-B></Resource-B></property-A></Resource-A>valueofproperty-Avalueofproperty-BNoticethattheRDFdesignpatternisanalternatingsequenceofresource-property.Thispatternisknownas"striping".61命名規(guī)范類名的第一個(gè)字母大寫,屬性名的第一個(gè)字母小寫。便于快速識(shí)別類名,屬性名。<?xmlversion="1.0"?><Riverrdf:about="/geography/rivers#Yangtze"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></River>uppercaselowercase62RDFModel(graph)Legend:Ellipseindicates"Resource"Rectangleindicates"literalstringvalue"63rdf:Description+rdf:typeThereisstillanotherwayofrepresentingtheXML.Thiswaymakesitveryclearthatyouaredescribingsomething,anditmakesitveryclearwhatthetype(class)isofthethingyouaredescribing:<?xmlversion="1.0"?><rdf:Descriptionrdf:about="/geography/rivers#Yangtze"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#">
<rdf:typerdf:resource="/river#River"/><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></rdf:Description>Thisisreadas:"ThisisaDescriptionabouttheresource/geography/rivers#Yangtze.This
resourceisaninstanceoftheRivertype(class).The/geography/rivers#Yangtzeresourcehasalengthof6300kilometers,astartingLocationofwesternChina'sQinghai-TibetPlateau,andanendingLocationoftheEastChinaSea."Note:thisformofdescribingaresourceiscalledthe"longform".Theformwehaveseenpreviouslyisanabbreviationofthislongform.AnRDFParserinterpretstheabbreviatedformasifitwerethislongform.64AlternativeAlternativelywecanuserdf:IDratherthanrdf:about,asshownhere:<?xmlversion="1.0"?><rdf:Description
rdf:ID="Yangtze"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"
xml:base="/geography/rivers">
<rdf:typerdf:resource="/river#River"/><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></rdf:Description>65EquivalentRepresentations!<?xmlversion="1.0"?><Riverrdf:ID="Yangtze"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"
xml:base="/geography/rivers"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></River><?xmlversion="1.0"?><Riverrdf:about="/geography/rivers#Yangtze"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></River><?xmlversion="1.0"?><rdf:Description
rdf:about="/geography/rivers#Yangtze"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"><rdf:typerdf:resource="/river#River"/><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation></rdf:Description>Note:IntheRDFliteraturetheexamplesaretypicallyshowninthisform.66RDFNamespace/1999/02/22-rdf-syntax-ns#IDabouttyperesourceDescription67術(shù)語(yǔ)AsyoureadtheRDFliteratureyoumayseethefollowingterminology:Subject:thistermreferstotheitemthatisplayingtheroleoftheresource.predicate:thistermreferstotheitemthatisplayingtheroleoftheproperty.Object:thistermreferstotheitemthatisplayingtheroleofthevalue.SubjectObjectpredicateResourceValuepropertyEquivalent!68RDFParserThereisaniceRDFparserattheW3Website:ThisRDFparserwilltellyouifyourXMLisintheproperRDFformat.69Example#2<?xmlversion="1.0"?><Riverid="Yangtze"xmlns="/river"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation>
<Damid="ThreeGorges"xmlns="/dam"><name>TheThreeGorgesDam</name><width>1.5miles</width><height>610feet</height><cost>$30billion</cost></Dam></River>Yangtze2.xmlModifythefollowingXMLdocumentsothatitisRDF-compliant:70Notethetwotypes(classes)RiverDamInstance:YangtzeProperties: length startingLocation endingLocationInstance:ThreeGorgesProperties: name width height cost71Dam-outofplace<?xmlversion="1.0"?><Riverid="Yangtze"xmlns="/river"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation>
<Damid="ThreeGorges"xmlns="/dam"><name>TheThreeGorgesDam</name><width>1.5miles</width><height>610feet</height><cost>$30billion</cost></Dam></River>DamTypes(classes)containproperties.HereweseetheRivertypecontainingtheproperties-length,startingLocation,andendingLocation.ItalsoshowsRivercontainingatype-Dam.Thus,thereisaResourcethatcontainsanotherResource.ThisisinconsistentwithRDFdesignpattern.(WeareseeingoneofthebenefitsofusingtheRDFformat-toidentifyinconsistenciesinanXMLdesign.)72Propertyvaluemustbea
LiteraloraResource<length>6300kilometers</length>propertyValueisaLiteral<obstacle><Damid="ThreeGorges"xmlns="/dam"><name>TheThreeGorgesDam</name><width>1.5miles</width><height>610feet</height><cost>$30billion</cost></Dam></obstacle>propertyValueisaResource73ModifiedXML(tomakeitconsistent)<?xmlversion="1.0"?><Riverid="Yangtze"xmlns="/river"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation><obstacle><Damid="ThreeGorges"xmlns="/dam"><name>TheThreeGorgesDam</name><width>1.5miles</width><height>610feet</height><cost>$30billion</cost></Dam></obstacle></River>Yangtze2,v2.xml"TheYangtzeRiverhasanobstaclethatistheThreeGorgesDam.TheDamhasaname-TheThreeGorgesDam.Ithasawidthof1.5miles,aheightof610feet,andacostof$30billion."74RDFFormat<?xmlversion="1.0"?><Riverrdf:ID="Yangtze"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"#"xml:base="/geography/rivers"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation>
<obstacle><Damrdf:ID="ThreeGorges"#"><name>TheThreeGorgesDam</name><width>1.5miles</width><height>610feet</height><cost>$30billion</cost></Dam></obstacle></River>Changedidtordf:IDAddedthe'#'symbolAsalways,theotherrepresentationsusingrdf:aboutandrdf:Descriptionareavailable.75RDFModel(graph)76<?xmlversion="1.0"?><Damrdf:ID="ThreeGorges"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"#"xml:base="/geography/rivers"><name>TheThreeGorgesDam</name><width>1.5miles</width><height>610feet</height><cost>$30billion</cost></Dam><?xmlversion="1.0"?><Riverrdf:ID="Yangtze"xmlns:rdf="/1999/02/22-rdf-syntax-ns#"xmlns="/river#"xml:base="/geography/rivers"><length>6300kilometers</length><startingLocation>westernChina'sQinghai-TibetPlateau</startingLocation><endingLocation>EastChinaSea</endingLocation>
<obstaclerdf:resource="/geography/rivers#ThreeGorges"/></River>Three-Gorges-Dam.rdfAlternatively,supposethatsomeonehasalreadycreatedadocumentcontaininginformationabouttheThreeGorgesDam:Yangtze.rdfThenwecansimplyreferencetheThreeGorgesDamresourceusingrdf:resource,asshownhere:77Note:referenceistoaresource,nottoafile<obstaclerdf:resource="/geography/rivers#ThreeGorges"/>Whywasthisthereference:<obstaclerdf:resource="/geography/rivers/Three-Gorges-Dam.rdf"/>andnotthis:Thatis,whywasn'tthereferencetoa"file"?Answer:1.Whatifthefilemoved?Thenthereferencewouldbreak.2.ByusinganidentifieroftheThreeGorgesDam,andkeepingaparticularfileunspecified,thenan"aggregatortool"willbeabletocollectinformationfromallthefilesthattalkabouttheThreeGorgesDamresource(seenextslide).DoLab278Anyone,Anywhere,AnytimeCanTalkAboutaResourceInallofourexampleswehaveprovidedauniqueidentifiertoresources,e.g.,/geography/rivers#YangtzeConsequently,ifanotherRDFdocumentidentifiesthesameresourcethenthedatathatitspecifiesgivesadditionaldataaboutthatresource.Anaggregatortoolwillbeabletocollectalldataaboutaresourceandpresentaconsolidatedsetofdatafortheresource.That'spowerful!79rdf:IDversusrdf:aboutWhenshouldrdf:IDbeused?Whenshouldrdf:aboutbeused?Whenyouwanttointroducearesource,andprovidean
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 奧體莊園施工方案(3篇)
- 三八活動(dòng)chahua策劃方案(3篇)
- 2026年1月江蘇揚(yáng)州市衛(wèi)生健康系統(tǒng)事業(yè)單位招聘專業(yè)技術(shù)人員54人考試參考題庫(kù)及答案解析
- 2026西藏那曲班戈縣消防救援大隊(duì)面向社會(huì)招錄政府專職消防員2人筆試參考題庫(kù)及答案解析
- 2026北京中鋁資本控股有限公司校園招聘2人筆試參考題庫(kù)及答案解析
- 2026河南漯河市中醫(yī)院招聘勞務(wù)派遣人員2人筆試參考題庫(kù)及答案解析
- 2026湖北恩施州宣恩縣園投人力資源服務(wù)有限公司招聘宣恩貢水融資擔(dān)保有限公司人員1人備考考試試題及答案解析
- 2026北京一輕控股有限責(zé)任公司內(nèi)部招聘1人備考考試試題及答案解析
- 國(guó)際護(hù)理學(xué)發(fā)展與比較課件
- 高熱驚厥護(hù)理的研究進(jìn)展與展望
- 北京通州產(chǎn)業(yè)服務(wù)有限公司招聘參考題庫(kù)必考題
- 兒科MDT臨床技能情景模擬培訓(xùn)體系
- 【高三上】2026屆12月八省聯(lián)考(T8聯(lián)考)語(yǔ)文試題含答案
- 護(hù)理不良事件根本原因分析
- 社會(huì)心理學(xué)考試題及答案
- 醫(yī)療器械經(jīng)營(yíng)企業(yè)質(zhì)量管理體系文件(2025版)(全套)
- 下肢靜脈曲張課件
- (高清版)DZT 0428-2023 固體礦產(chǎn)勘查設(shè)計(jì)規(guī)范
- XXX縣村鎮(zhèn)空氣源熱泵區(qū)域集中供熱項(xiàng)目可行性研究報(bào)告
- 湖州昆侖億恩科電池材料有限公司年產(chǎn)40000噸鋰離子電池電解液項(xiàng)目環(huán)境影響報(bào)告
- 幼兒園班級(jí)體弱兒管理總結(jié)
評(píng)論
0/150
提交評(píng)論