Getting to know RDF

1. The Semantic Web of the Web

      What is the Semantic Web? The Semantic Web is a network that describes things in a way that can be understood by a computer. The Semantic Web describes the relationships between things (say A is a part of B and Y is a member of Z ) and properties of things (such as size) , weight, expiry date and price, etc.) . Its core is to add semantic "metadata " that can be understood by computers to documents on the World Wide Web (such as HTML documents, XML documents) , thereby making the entire Internet a universal information exchange medium.
  (After studying the database, you should have a good understanding of relationships and attributes. For example, a teacher and a student are in a teacher-student relationship. The teacher has its own attributes (teacher name, gender, ethnicity, title, etc.), and the student also has its own attributes. Attributes (student name, gender, family name, class, grades, etc.), the relationship between multiple teachers and students, plus their own attributes, constitute a huge data semantic web.)

2. The seven-layer architecture of the Semantic Web

     In the Semantic Web Architecture (as shown in Figure 1.1 below), each layer is structured as follows;

  1. The first layer - the base layer, including Unicode and URI . Where Unicode is a character set responsible for handling the encoding of resources. URI (Uniform ResourceIdentifier , Uniform Resource Locator ) is used to uniquely identify a concept or resource on the network.
  2. The second layer—the syntax layer ( markup language ), including XML , NS , and xmlschema , is an important part of its semantic web architecture. This layer is responsible for grammatically representing the content and structure of data, and by using standard languages ​​to convert network information representation, data structure and content separation. XML is a standard metadata syntax description specification . It combines the rich functions of SGML with the ease of use of HTML . It allows users to add arbitrary structures to documents. NS(Name Space,Namespace ) is determined by the URI index. XML Schema provides more data types, which can better serve valid XML documents and provide data validation mechanisms.
  3. The third layer - resource description framework layer, including RDF , rdfschema . RDF (Resource Description Framework) is a standardized metadata semantic description specification. Rdfschema uses a machine-understandable hierarchy to define the vocabulary for describing resources.
  4. The fourth layer - ontology layer Ontologyvocabulary . This layer is an abstract description of the concepts and their relationships defined on the basis of RDF(S) , which is used to describe the knowledge of the application domain, describe various resources and the relationship between resources, and realize the expansion of the vocabulary. At this layer, users can define not only concepts but also rich relationships between concepts.
  5. The fifth to seventh layers include Logic , Proof , and Trust . Logic is responsible for providing axioms and logical reasoning rules based on the previous layers. Through Proof exchange and digital signature, a certain trust relationship is established to verify the reliability of the semantic Web output and whether it meets the user's requirements, and draw conclusions.

Figure 1.1 The seven-tier architecture of the semantic web
Second, RDF and RDF graph 
    On the basis of understanding the previous web semantics, we will focus on RDF and RDF graph below.

      RDF ( Resource Description Framework, RDF for short ) is used to describe web resources, such as the title, author, modification date, content and copyright information of web pages, and it is specially used to express metadata about web resources. Put information into RDF files so that it can be searched, discovered, ingested, filtered, analyzed and processed from the web by computer programs ( "web spiders" ).

    RDF graph is a directed graph composed of triples ( subject, predicate, object ), subject points to object through predicate , and the size of RDF graph is usually represented by the number of triples . As shown in Figures 2 and 3 below, it is an RDF graph. Figure 2 is an intuitive RDF graph, and Figure 3 is a complex RDF graph.
Figure 2 Intuitive RDF graph

    Figure 3 Complex RDF graph

3. SPARQL query

      SPARQL ( SPARQL Protocol and RDF Query Language ) is a query language and data acquisition protocol developed for RDF . SPARQL is a graph-based matching query language. The most basic graph model is a simple graph model, which allows querying triples from an RDF database (or triple library), that is, the triple graph model, which is related to the RDF triple Similar, but variables may appear in subject, predicate, and object positions. Figure 4 below shows a SPARQL query graph.

4  SPARQL查询
SPARQL查询方式主要有SELECTCONSTRUCTDESCRIBEASK。
RDF的基本知识介绍先到这里,主要想是在此基础上经行RDF查询优化的一些相关研究!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324552354&siteId=291194637