The Jena-Based Ontology Model Inference and Retrieval Application

Ontology as an important representation model of semantic web has valuable application. A new ontology model on the basis of Computer Graphics (CG) knowledge is proposed, called CG ontology model. The protégé is used to build this ontology model conveniently. The Jena API is applied to store CG owl documents in MySQL, set inference rule and achieve search queries on the ontology database. Finally, the Jena-based ontology model retrieval system is developed.


Introduction
Semantic web is intelligent and gives the semantics of Internet network to connect the webpage content.IBM's technical architect Naveen Balani [1] thinks that the Semantic Web will become an effective way to represent data on the World Wide Web, or as a database that is globally linked, in a manner understandable by machines, to the content of documents on the Web.Semantic technologies use ontologies to represent meaning and provide reasoning through the relationships, rules, logic, and conditions represented in those ontologies.The open source platform protégé [2] in Stanford University generates owl documents through class hierarchy and property, and visualizes ontoloy model.Jena [3] is an open Java framework developed by HP laborator, and provides the programming environment for the languages like RDF, RDFS, OWL, SPARQL and so on, and includes rulebased inference engine with persistent storage.Jeremy J. Carroll [4] introduces the function and architecture of Jena.
The application range of Jena is very extensive.Wei Zhang [5] reasons with ontology model depicted with OWL using protégé and Jena API in question answering system.Sun-Young Heo [6] improves query processing performance of OWL data based on Jena.Min Wang [7] puts forward a Jena based Web page ontology extracting and processing method on the common RDF level of ontology, which includes extracting RDF model, setting operation of different RDF models, querying RDF model, modifying RDF model, and serialization of RDF model.
Ontology model has achieved the application system in the search technology of semantic web.Yi Zhang [8] proposes ontology search engine-OntoSearch, creates an instance of class hierarchy to design food ontology model and visualizes food ontology class hierarchy with JSP.Li Ding [9] discusses how to search, index, sort semantic web documents and studies the structure of Swoogle [10] which is a crawler-based indexing and retrieval system for the semantic web documents (RDF or OWL documents).
This paper implements CG ontology model inference and query.The rest of the paper is organized as follows: Section 2 establishes CG ontology model with protégé.Section 3 stores CG ontology model in Mysql based on Jena.Section 4 designs inference rule, queries ontology database and visualizes CG ontology model using JSP and Java.

CG Ontology Model
Based on ontology, the model is composed of four parts: designing class hierarchy and property, creating the instances, building ontology model using protégé, forming owl documents.The following is an example of Basic graph generation algorithm on Computer Graphics to build CG ontology model.

Reference to "Computer Graphics" Course, Design CG Knowledge Class Hierarchy
The concept Line scan conversion algorithm is subclass of Basic graph generation algorithm, the concept Numerical differential algorithm is individual of Line scan conversion algorithm and so on in Figure 1.

CG Property Relations
Property relations show the links between classes, including two types: object property and datatype property.
Object properties are the relationship between two instances of classes, and datatype properties is the datatype of class instance, including domain and rang.Object properties in CG knowledge classes are described as follows: 1) Reference extended relationship means point of knowledge associated with another point, including symmetry.For example, the concept bresenham line algorithm and Bresenham circle algorithm; 2) Precursor relationship means point A is the prior knowledge with point B, including transitive; 3) Follow-up relationship means point B is the follow-up knowledge with point A, including transitive, and relationship between precursor and follow-up is inverse for each other; 4) Overall and part relationship, such as Basic graph generation algorithm and Line scan conversion algorithm.
CG datatype properties include the property name, concept, principle, text description of algorithm and code description of algorithm.The domain is the concept Basic graph generation algorithm and the range is string.In Figure 2, CG resource class hierarchy and CG experiment class hierarchy are created to link with CG course, and set the corresponding property relations.At last, CG owl ducument has been completed by protégé, and CG ontology model is formed.

Based on Jena CG Ontology Model Stored in Database
Jena is an open source Java framework.Its core function includes RDF API, RDQL query language, reasoning subsystem, persistent storage memory, ontology subsystem, and provides the appropriate interface.Jena provides relational database interface into RDF data, Model, Resource, Query can be used to access and maintain RDF data.CG ontology model is mainly stored in Mysql.Jena stores ontology model using two types of seven tables.The first type is asserted statements and the second is reified statements in Tables 1 and 2.

CG Ontology Model Retrieval System by Jena and JSP
The CG ontology model retrieval system is achieved using C/S mode, implements complex reasoning query process through Jena API, and is composed by user search interface, retrieval process, Jena analyze and ontology model database.In the client, user submits requests to the retrieval page.Server accepts the requests, search the results in CG ontology database through Jena inference.
The architecture is shown in Figure 3.

CG Ontology Model Inference and Query
Next, an example of using the retrieval system is given.

Summary and Future Work
Semantic web research is very hot now.Ontolgy is one of key technologies in Semantic web.This paper designs CG ontology model with protégé, stores the model in database, sets inference rule, queries ontology database, and finally realizes CG ontology model retrieval system.But this is only for a single ontology model, the scope of the application is small.According to the existing ontology search engine, such as Ontosearch [8] and swoogle [9], we will research multiple ontology model to apply to semantic search engine, extract web page under the concept of ontology model, search the semantic web documents to return the best results, in order to intelligent search technologies.