Uri 和 Url 在语义网中的使用
我正在开发一个语义网络项目,并且遇到了一些关于 Uri 和 Uri 的问题。 网址。
首先,一个一般性问题:万维网中的用户应用程序如何引用 Uris? 是否有类似的Url,存储在一些国际服务器上,并且当请求相关Uri时,将资源提供给用户应用程序? 我在 RDF 文件中为我的本体个体制作了 Uris。 仅在我的 Web 文件中存储 Uri 就足够了吗? 如何确定它是独一无二的? (例如,这是针对学生的:#stu00546)
第二,我应该给我的本体提供什么Uri? 我应该注册一个有效的 Uri 才能使其在 Internet 上运行吗?
最后,我是否应该将个人的 Uris 和 Url 存储在需要的地方? 例如,如果我想创建一个关于学习资源(如 Pdf)的个人,并且我希望用户稍后能够打开此 Pdf,我应该存储 Pdf 的 Url,还是应该使用它的 Uri 定义此个人,哪个是其他站点分配给它的?
非常感谢您的宝贵时间和宝贵时间。 注意力
I'm working on a semantic web project and I've encountered some problems about Uri & Url.
First of all, a general question: how are Uris referenced by a user application in world wide web? Are there like Urls, stored on some international servers, and the resource is given to user application, when relevant Uri is requested? I made Uris for my ontology individuals in RDF files. Is it enough to just store an Uri in my web files? How can be sure that it is unique? (for example this is for a student: #stu00546)
Second, what Uri should i give to my ontology? should I register a valid Uri to make it work on the Internet?
Last, should I store both Uris and Url, for an individual, where it's needed? For instance if I want to create an individual about a learning resource (like a Pdf), and I want the user to be able of opening this Pdf later, should I store the Url of Pdf, or I should define this individual with it's Uri, which is assigned to it by other site?
Thank you very much for your time & attention
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
关于URI:一般来说所有的URI都不能被引用:例如
描述一本书的id,但是没有一个标准的方法来找到这本书。 某些协议(例如 URL 或 LSID)与允许它们检索信息的协议相关联。
您的本体的 URI:这可以是任何唯一的 URI(例如 urn:me:onotology/mywebsite#ontology,但我想最好的位置是网络上描述您的本体的 URL。另请参阅 本体头。例如 FOAF 的命名空间是 http://xmlns.com/foaf/0.1/ 重定向到规范。
您的文档的 URL(建议):
About URI: in general all URI cannot be referenced: for example
describes the id of a book, but there is not a standard way to find this book. Some protocols such as URL or LSID are associated with protocol that allow them to retrieve the information.
An URI for your ontology: This could be any unique URI (e.g. urn:me:onotology/mywebsite#ontology but I guess the best place would be a URL on the web where your ontology is described. See also the ontology header. For example the namespace of FOAF is http://xmlns.com/foaf/0.1/ which redirects to the specifiation.
A URL for your document (suggestion):
RDF 规范定义了如何在 RDF 中使用 URI。 不要忘记形式(和二次用途),但到目前为止,URI 最重要的方面是它们是全局唯一标识符。 每个 URI 都标识一个独特的概念(例如,特定的 OWL 类)或个人(该类的特定实例 - 您在问题中提到的学生),并且您需要非常小心地确保 URI 的唯一性。
考虑到这一点,像
#student1234
这样的 URI 并不好,而urn:myappname:students#student1234
会更好。为了更“友好”地使用 URI,您可能希望使它们可取消引用(如 Pierre 提到的 FOAF 规范中或出于链接数据的目的)。 在这种情况下,像
http://myserver.com/myappname/students/student1234
这样的 URI 可能更合适。最后要记住的是面向工作本体论者的语义网:在 RDF 中建模、RDFS 和 OWL 称之为“如意名字”。 假设(作为人类)像
urn:example:cars#car123
这样的 URI 具有ontology:Car
类型,请务必小心。 当软件使用时,URI 将是不透明的(并且像数据库中的密钥一样使用); URI 本身没有语义。除此之外,大部分表格都取决于个人喜好以及对您的申请有利的内容。
The RDF specification defines how URIs are used within RDF. Don't forget about form (and secondary uses), but by far the most important aspect to your URIs is that they are globally unique identifiers. Each URI identifies a unique concept (for example, a specific OWL class) or an individual (a particular instance of that class -- the student you mention in your question) and you want to be very careful about ensuring uniqueness of your URIs.
With that in mind, a URI like
#student1234
is not good, whileurn:myappname:students#student1234
would be better.For more "friendly" uses of the URI, you may want to make them dereferencable (as in the FOAF spec mentioned by Pierre or for the purposes of linked data). In this case, a URI like
http://myserver.com/myappname/students/student1234
might be more appropriate.The final thing to keep in mind is what Semantic Web for the Working Ontologist: Modeling in RDF, RDFS and OWL calls "Wishful Names". Be very careful assuming (as a human) that a URI like
urn:example:cars#car123
has typeontology:Car
. The URI will be opaque (and used like a key in a database) when used by a piece of software; a URI has no semantics on its own.Beyond that, most of the form comes down to personal preference and what will benefit your application.
我不太确定我理解这个问题。 您在理解 URI 和 URL 之间的区别时遇到一些问题吗? 如果是这样,维基百科有一个合理的解释。
基本上,URI(统一资源标识符)标识资源。 维基百科使用 ISBN 的示例,它标识一本书,但没有提供有关如何访问它的任何信息。 URL(统一资源定位符)提供有关如何访问资源的信息; 例如,一本书全文的 URL。
I'm not quite sure I understand the question. Are you having some problems understanding the difference between a URI and a URL? If so, Wikipedia has a reasonable explanation.
Basically, a URI (Uniform Resource Identifier) identifies a resource. Wikipedia uses the example of an ISBN, which identifies a book, but doesn't give any information on how to access it. a URL (Uniform Resource Locator) provides information on how to access a resource; for example, the URL to the full text of a book.