An Ontology-based Restful API Code Automatic Generation Method

An automatic generation and ontology technology, applied in the computer field, can solve problems such as broad interface capabilities and inability to achieve complete compatibility, and achieve the effect of reducing workload, clear and clear errors, and less error-prone

Active Publication Date: 2020-06-05
ZHEJIANG UNIV
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, Kaola is also developed based on ruby ​​on rails, and cannot be fully compatible with Windows operating systems and mysql databases.
Moreover, Kaola provides CRUD interfaces for all tables in the database. The interface capabilities are broad and cannot be directly exposed on the network. It must be deployed behind an API gateway, and it is impossible to formulate targeted and efficient interfaces for complex Web / Mobile requirements.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • An Ontology-based Restful API Code Automatic Generation Method
  • An Ontology-based Restful API Code Automatic Generation Method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0026] The present invention will be described in further detail below in conjunction with the accompanying drawings and specific embodiments.

[0027] Such as figure 1 , 2 As shown, a method for automatically generating an ontology-based RESTful API code provided in this embodiment includes the following steps:

[0028] (1) Using the ontology model to describe the data relationship at the bottom of the database, the specific steps are as follows:

[0029] (1.1) The table data structure of the relational database is automatically converted into a virtual RDF graph through the semantic conversion tool D2R, in which the table is converted into a concept (Concept) or class (Class) in the ontology modeling metalanguage, and the field is converted into properties in the class;

[0030] (1.2) Add a function (Function) to the ontology model to describe the relationship between the primary key and the non-primary key in the table. The form of the function (Function) is defined as F...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses an automatic generation method for RESTful API (Application Program Interface) code on the basis of ontology. By virtue of an ontology semantic technology, a database is subjected to ontology modeling, an ontology language is used for describing a database structure relationship, and a model is visualized. A verb visualization component in an HTTP (Hyper Text Transport Protocol) is added in advanced, and the visualized database module is added, dragged, connected and the like to describe functions which want to be realized by the specific RESTful API. Compared with other automatic generation method for codes, the method disclosed by the invention needs to manually input the specific structure of each table, an ontology modeling way can be adopted to more accuratelydescribe the relationship of a database bottom layer, and the generated tree structure is structured and can be read by computers, and therefore, the complex requirements of front-end multi-table combined query can be favorably coped. An underlying database is visual, Web / Mobile front-end data function requirements are described in a component dragging and connecting way so as to be more clear anddefinite as well as be unlikely to make mistakes, meanwhile, the workload of rear-end development personnel can be greatly reduced, and even, the front-end development personnel can customize interfaces according to own requirements.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to an ontology-based method for automatically generating RESTful API codes. Background technique [0002] The RESTful architecture is currently a popular Internet software architecture. It has a clear structure, conforms to standards, is easy to understand, and is easy to expand. It has been adopted by more and more websites and applications. However, REST resource-based requests are suitable for simple requests. For requests with complex associations, the backend must add a new interface to respond to this special request. With the increasingly complex data requirements on the Web / Mobile side, back-end RESTful API developers need to perform tedious data query, data combination, and document editing work according to the requirements, which is prone to errors. [0003] There are many similar API code automatic generation tools, such as the scaffold function that comes with rails,...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F8/34G06F8/35
CPCG06F8/34G06F8/35
Inventor 李劲松周雪峰田雨周天舒王昱
Owner ZHEJIANG UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products