WO2022145503A1 - 시맨틱 레스트 에이피아이 제공 방법 - Google Patents

시맨틱 레스트 에이피아이 제공 방법 Download PDF

Info

Publication number
WO2022145503A1
WO2022145503A1 PCT/KR2020/019262 KR2020019262W WO2022145503A1 WO 2022145503 A1 WO2022145503 A1 WO 2022145503A1 KR 2020019262 W KR2020019262 W KR 2020019262W WO 2022145503 A1 WO2022145503 A1 WO 2022145503A1
Authority
WO
WIPO (PCT)
Prior art keywords
semantic
sparql
response
list
rest api
Prior art date
Application number
PCT/KR2020/019262
Other languages
English (en)
French (fr)
Inventor
수닐쿠마르
이석준
Original Assignee
한국전자기술연구원
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 한국전자기술연구원 filed Critical 한국전자기술연구원
Publication of WO2022145503A1 publication Critical patent/WO2022145503A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Definitions

  • the present invention relates to a platform interworking technology, and more particularly, to a method for interworking between a semantic environment and a non-semantic environment.
  • Semantic technology allows all data to be organically connected by giving meaning to data and forming relationships between data.
  • SPARQL is used as a query language capable of retrieving semantic data. As shown in FIG. 1, complex SPARQL queries make it difficult for non-semantic applications to query data.
  • the present invention has been devised to solve the above problems, and an object of the present invention is to provide a semantic REST API as a method for enabling non-semantic applications to easily query semantic data.
  • a semantic REST API method includes: receiving a semantic REST API request from a client; parsing the received semantic REST API request to extract parameters; generating a SPARQL query using the extracted parameters; and passing the generated SPARQL query to the triple DB.
  • the semantic REST API request includes a request to obtain a list of graph URIs, a request to obtain a list of URIs of a specific type of entity, a request to obtain URI information of a specific entity, and a request to obtain a class hierarchy of Class/Individual. It may include at least one of a request, a request to obtain a triple set of a specific graph URI, and a request to obtain a URI list of a specific type of individual.
  • the parameters may include at least one of a search keyword list, a graph type, a Prefixes format, an entity type list, an entity type list, an entity URI/IRI, a response format, an Id of a class, and a response limit.
  • graphs and types, SPARQL query variables, SPARQL traversal and filter conditions may be recorded in the SPARQL query using the extracted parameters.
  • SPARQL traversal and filter conditions may include SPARQL WHERE clauses and SPARQL filter conditions that define patterns of data to be retrieved.
  • a semantic REST API method includes: receiving a SPARQL response from a triple DB; parsing the received SPARQL response to extract values of query variables; generating a REST response using the extracted values; and returning the generated REST response to the client; may further include.
  • the REST response generation step may extract at least one of a URI/IRI list and a triple list.
  • a semantic search server an interface for receiving a semantic REST API request from a client; a SPARQL query generator for parsing the received semantic REST API request, extracting parameters, and generating a SPARQL query using the extracted parameters; and a SPARQL server that delivers the generated SPARQL query to the triple DB.
  • a non-semantic application can easily query semantic data through the semantic REST API.
  • FIG. 1 A system to which the existing REST API is applied.
  • Figure 2 A system to which a semantic REST API is applied according to an embodiment of the present invention.
  • Semantic API simple and generic type types
  • FIG. 2 is a diagram illustrating a system to which a semantic REST API is applied according to an embodiment of the present invention.
  • the illustrated system is configured to include a client 100 , a semantic search server 200 , and a triple DB 300 .
  • the client 100 transmits the request of the data request entity 110 to the semantic search server 200 in which the REST request generator 120 provides the semantic REST API 210 .
  • the SPARQL query generator 220 of the semantic search server 200 parses the semantic REST API request received from the client through the semantic REST API 210 to extract parameters, and uses the extracted parameters to generate a SPARQL query.
  • the SPARQL server 230 transmits the SPARQL query generated by the SPARQL query generator 220 to the triple DB 300 and receives the SPARQL response from the triple DB 300 .
  • the REST response generating unit 240 parses the SPARQL response received by the SPARQL server 230 to extract the values of the query variable, and generates a semantic REST API response with the extracted values to the response parser 130 of the client 100 return
  • semantic data is expressed in a resource format so that semantic data can be utilized in a REST support system, and complex SPARQL queries are typified to some extent in REST API, so that non-semantic applications can query data.
  • semantic REST API includes GET Graph List, Entity List, Entity Info, Class-Hierarchy, Graph Info, and Individual List, and detailed descriptions of these are as follows.
  • GET Graph List is a function to obtain a list of graph URIs. All triple sets are stored in a graph with a unique graph URI, and ontology can also be stored as a graph in the triple DB. Get the corresponding graph URI list with GET Graph List.
  • Entity List is a function to obtain a list of URIs of entities whose entity types are Class, ObjectProperty , DataProperty , NamedIndividual ...
  • Entity Info acquires URI information of a given entity (Class, NamedIndividual, Object Property, Data Property). That is, it provides detailed information about types and properties (domains, ranges, subsumption, comment, ).
  • Class-Hierarchy acquires the class hierarchy of Class/Individual from child class to parent class to "n-level".
  • Graph Info gets the set of all triples of a given graph URI.
  • Individual List obtains a list of URIs of all individuals of a given type.
  • Each API request is parsed as its own request parameters to extract conditions that are further used to construct SPARQL queries.
  • the search keyword is provided by the client as part of the request data.
  • data is composed of URI/IRI, and URI/IRI is also included as an identifier in the graph composing data.
  • a search keyword is part of a URI/IRI, and if it matches (along with other search conditions), its data (graph/entity URI/IRI) will be considered as a candidate response.
  • a URI/IRI of semantic data is an identifier for a specific entity of data.
  • they are also used to define a schema that is a dictionary (semantic ontology).
  • predefined static prefixes are used to indicate the namespace of entity IDs in semantic data.
  • the namespace is replaced with a predefined static label, colon ":”, and Postfixes in the order.
  • the request parameter specifies the type of graph to be retrieved.
  • Id URI/IRI
  • An entity is a term defined by the Semantic API that represents an entity in data. It can be a Class, Individual, ObjectProperty, or DatatypeProperty. Information about an entity can be requested by specifying a type or ID (URI/IRI) in the request. The type is specified to obtain a list of entities (URI/IRI), whereas Id (URI/IRI) is specified to obtain the relevant information of the entity. 6 to 10 illustrate entity types and information.
  • a class is a specific entity defined in the dictionary/ontology based on the entity in which the entity type (owl: NamedIndividual) is defined. There are type definitions that define the characteristics of individuals. A type is specified to retrieve a list of Individuals (URI/IRI only). The value is the Id (URI / IRI) of the class.
  • this parameter is provided to limit the number of results (in SPARQL queries) to provide faster search results. If no limit is specified, it is set to the default value.
  • a SPARQL query is a way to interact with a triple database (TDB).
  • TDB triple database
  • the parsed graph Id or type is used to retrieve data contained in a graph list or a specified graph in the API's SPARQL query string. It is illustrated in Figures 13 and 19.
  • SPARQL query response A SPARQL query constructs a response with query variables requested in the query.
  • the query variables expected in the SPARQL response are specified in the "SELECT" statement.
  • the query variable in the "WHERE” clause specifies the pattern to search for in the database.
  • Query variables specified in the "SELECT” statement can also be used in the "WHERE” clause if necessary.
  • the returned response usually consists of objects representing query solutions, each solution containing the corresponding value of the query variable. Responses may have different serializations, so they may have different representations but have the same concept.
  • Prefixes are kept separate by the semantic API. Whenever a response is generated, each corresponding namespace of Prefixes is stored by the API. The API parses each URI/IRI and adds Prefixes based on the namespace associated with the response.
  • each value of the requested query variable (specified in the "SELECT" statement) is iterated over (one by one) iteratively and added to the API response.
  • the value contains the full URI/IRI (Namespace of Entity ID + Postfixes). Therefore, the URI/IRI part before "#" is identified and extracted as a namespace.
  • the extracted namespace is retrieved from the API's Prefixes repository, where the namespace and each Prefixes are stored.
  • the JSON response is the response the API returns to the client.
  • SPARQL responses are converted to JSON responses with prefixes added to make the response concise.
  • the value has the full URI/IRI (namespace of entity ID + Postfixes).
  • namespace is extracted and replaced with the appropriate Prefixe label in the API response.
  • prefix label and its namespace are added under the "prefix-list" object in the API response.
  • the API response contains only the prefixes of the "prefix-list” object included in the API response.
  • a URI/IRI always contains Prefixes labels (if the API recognizes it, it is available in the API's Prefixes repository).
  • This format is used in GET Graph List, Entity List, Class-Hierarchy, and Individual List among API functions.
  • the response is a JSON array containing a list of URIs/IRIs.
  • This format is used in Entity Info and Graph Info among API functions.
  • the response is a JSON array containing a list of JSON objects, each JSON object containing one triple data (subject, predicate and object).
  • Entity Info has been described above, and there is a simple response version in FIG. 11 .
  • the SPARQL response has three query variables: s, p, and o, representing subject, predicate and object. Together, these variables define a triple, which is converted to the form defined above. 11, 12, 17, 18, 20, and 21 show related examples.
  • Semantic REST API Query Parameters
  • Query parameters include Search Keyword List, Graph Type, Prefix format, Entity Type List, Entity URI/IRI, and Response Format ( Response Format), ClassId (ClassId), and Response Limit are included.
  • the search keyword list may provide keywords as matching keywords according to resource information to be searched. Used for graph lists and entity lists.
  • the graph type is divided into an ontology type and an instance type graph.
  • the ontology type graph stores all ontology models, whereas the instance type graph stores assertions (actual data) based on the ontology model. Used for graph lists.
  • Prefixes are identifiers of all namespaces that define all or part of all ontology. It is used as part of an entity URI/IRI, and is used to shorten the entire URI/IRI to provide a readable, concise format. There are two types of Prefixes: simple type and normal type.
  • Entity types can have the following values: lass, ObjectProperty, DataProperty, NamedIndividual
  • It may include class, object property or data property URI/IRI defined in ontology. Used for entity lists.
  • the entity URI/IRI may be a class, object attribute, or data attribute URI/IRI defined in the ontology. Used for entity information.
  • the response has a simple format and a normal format.
  • the simple form is concise, while the normal form is detailed and describes each triple according to subject, predicate and object. Used for entity information.
  • ClassId is an entity of class type. Used for class hierarchies and individual lists.
  • the response limit is used to specify the number of graphs, entities, or triples to return. It may have a default value depending on the server and database specifications.
  • the technical idea of the present invention can also be applied to a computer-readable recording medium containing a computer program for performing the functions of the apparatus and method according to the present embodiment.
  • the technical ideas according to various embodiments of the present invention may be implemented in the form of computer-readable codes recorded on a computer-readable recording medium.
  • the computer-readable recording medium may be any data storage device readable by the computer and capable of storing data.
  • the computer-readable recording medium may be a ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical disk, hard disk drive, or the like.
  • the computer-readable code or program stored in the computer-readable recording medium may be transmitted through a network connected between computers.

Abstract

시맨틱 REST API 제공 방법이 제공된다. 본 발명의 실시예에 따른 본 발명의 일 실시예에 따른 시맨틱 REST API 방법은, 클라이언트로부터 시맨틱 REST API 요청을 수신하면, 수신한 시맨틱 REST API 요청을 파싱하여 파라미터들을 추출하고, 추출한 파라미터들을 이용하여 SPARQL 쿼리를 생성하며, 생성한 SPARQL 쿼리를 트리플 DB에 전달한다. 이에 의해, 비-시맨틱 애플리케이션이 손쉽게 시맨틱 데이터를 쿼리할 수 있도록 하여 준다.

Description

시맨틱 레스트 에이피아이 제공 방법
본 발명은 플랫폼 인터워킹 기술에 관한 것으로, 더욱 상세하게는 시맨틱 환경과 비-시맨틱 환경 간의 인터워킹을 위한 방법에 관한 것이다.
시맨틱 기술은 데이터에 의미를 부여하고 데이터 간의 관계를 형성함으로써 모든 데이터들이 유기적으로 연결될 수 있게 한다.
도 1은 기존의 REST API를 적용한 시스템을 도시한 도면이다. 시맨틱 데이터를 검색할 수 있는 쿼리 언어로 SPARQL이 사용되고 있는데, 도 1에 도시된 바와 같이 복잡한 SPARQL 쿼리는 비-시맨틱 애플리케이션이 데이터를 쿼리하는 것을 어렵게 하고 있다.
이에 따라 비-시맨틱 애플리케이션이 손쉽게 시맨틱 데이터를 쿼리할 수 있도록 하기 위한 방안이 필요하다.
본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 본 발명의 목적은, 비-시맨틱 애플리케이션이 손쉽게 시맨틱 데이터를 쿼리할 수 있도록 하기 위한 방안으로, 시맨틱 REST API를 제공함에 있다.
상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른, 시맨틱 REST API 방법은, 클라이언트로부터 시맨틱 REST API 요청을 수신하는 단계; 수신한 시맨틱 REST API 요청을 파싱하여, 파라미터들을 추출하는 단계; 추출한 파라미터들을 이용하여 SPARQL 쿼리를 생성하는 단계; 생성한 SPARQL 쿼리를 트리플 DB에 전달하는 단계;를 포함한다.
시맨틱 REST API 요청은, 그래프 URI 목록을 획득하기 위한 요청, 특정 타입의 엔티티의 URI 목록을 획득하기 위한 요청, 특정 엔티티의 URI 정보를 획득하기 위한 요청, Class/Individual의 클래스 계층구조를 획득하기 위한 요청, 특정 그래프 URI의 트리플 세트를 획득하기 위한 요청, 특정 타입의 Individual의 URI 목록을 획득하기 위한 요청 중 적어도 하나를 포함할 수 있다.
파라미터들은, 검색 키워드 목록, 그래프 타입, Prefixes 형식, 엔티티 타입 목록, 엔티티 타입 목록, 엔티티 URI/IRI, 응답 형식, 클래스의 Id, 응답 제한 중 적어도 하나를 포함할 수 있다.
SPARQL 쿼리를 생성 단계는, 추출한 파라미터들을 이용하여, 그래프 및 타입, SPARQL 쿼리 변수, SPARQL 순회 및 필터 조건을 SPARQL 쿼리에 수록할 수 있다.
SPARQL 순회 및 필터 조건은, 검색할 데이터의 패턴을 정의하는 SPARQL WHERE 절 및 SPARQL 필터 조건을 포함할 수 있다.
본 발명의 실시예에 따른 시맨틱 REST API 방법은, 트리플 DB로부터 SPARQL 응답을 수신하는 단계; 수신한 SPARQL 응답을 파싱하여, 퀴리 변수의 값들을 추출하는 단계; 추출한 값들을 이용하여, REST 응답을 생성하는 단계; 및 생성한 REST 응답을 클라이언트에 반환하는 단계;를 더 포함할 수 있다.
REST 응답 생성단계는, URI/IRI 목록 및 트리플 목록 중 적어도 하나를 추출할 수 있다.
한편, 본 발명의 다른 실시예에 따른, 시맨틱 검색 서버는, 클라이언트로부터 시맨틱 REST API 요청을 수신하는 인터페이스; 수신한 시맨틱 REST API 요청을 파싱하여 파라미터들을 추출하고, 추출한 파라미터들을 이용하여 SPARQL 쿼리를 생성하는 SPARQL 쿼리 생성부; 및 생성한 SPARQL 쿼리를 트리플 DB에 전달하는 SPARQL 서버;를 포함한다.
이상 설명한 바와 같이, 본 발명의 실시예들에 따르면, 시맨틱 REST API를 통해, 비-시맨틱 애플리케이션이 손쉽게 시맨틱 데이터를 쿼리할 수 있도록 하여 준다.
도 1. 기존의 REST API를 적용한 시스템.
도 2. 본 발명의 실시예에 따른 시맨틱 REST API를 적용한 시스템.
도 3. 시맨틱 데이터 및 자원 구조 개요
도 4. 의미 론적 REST API : 기능
도 5. 엔티티 URI/IRI
도 6. 시맨틱 데이터 및 자원 구조 개요
도 7-10. 시맨틱 데이터 : 엔티티 유형 및 정보
도 11. 시맨틱 API : 단순 및 일반 형식 유형
도 12. SPARQL 쿼리 응답
도 13. 시맨틱 REST API : 쿼리 매개 변수
도 14. 그래프 목록(유형: 온톨로지)
도 15. 그래프 목록(유형 : 인스턴스)
도 16. 엔티티 목록
도 17-18. 엔티티 정보
도 19. 클래스 계층
도 20-21. 그래프 정보
도 22. Individuals 목록
이하에서는 도면을 참조하여 본 발명을 보다 상세하게 설명한다.
도 2는 본 발명의 실시예에 따른 시맨틱 REST API를 적용한 시스템을 도시한 도면이다. 도시된 시스템은 클라이언트(100), 시맨틱 검색 서버(200), 트리플 DB(300)를 포함하여 구성된다.
클라이언트(100)는 데이터 요청 엔티니(110)의 요청을 REST 요청 생성부(120)가 시맨틱 REST API(210)를 제공하는 시맨틱 검색 서버(200)로 전송한다.
시맨틱 검색 서버(200)의 SPARQL 쿼리 생성부(220)는 시맨틱 REST API(210)를 통해 클라이언트로부터 수신한 시맨틱 REST API 요청을 파싱하여 파라미터들을 추출하고, 추출한 파라미터들을 이용하여 SPARQL 쿼리를 생성한다.
그러면 SPARQL 서버(230)는 SPARQL 쿼리 생성부(220)에 의해 생성된 SPARQL 쿼리를 트리플 DB(300)로 전달하여, 트리플 DB(300)로부터 SPARQL 응답을 수신한다.
REST 응답 생성부(240)는 SPARQL 서버(230)가 수신한 SPARQL 응답을 파싱하여 퀴리 변수의 값들을 추출하고, 추출한 값들로 시맨틱 REST API 응답을 생성하여 클라이언트(100)의 응답 파서(130)로 반환한다.
본 발명의 실시예에서는 REST 지원 시스템에서 시맨틱 데이터를 활용할 수 있도록 시맨틱 데이터를 리소스 형식으로 표현하고, REST API에서 복잡한 SPARQL 쿼리를 어느 정도 유형화하여, 비-시맨틱 애플리케이션이 데이터를 쿼리할 수 있도록 한다.
API에 전체 SPARQL 쿼리를 포함하는 대신, 리소스로 반환되는 각 쿼리 응답에 대해 정해진 형식을 갖는 GET, PUT, POST, DELETE 요청으로 통합된다.
도 3에는 시맨틱 데이터의 구조와 REST 리소스 구조를 나타내었다. 도 4는 본 발명의 실시예에서 제공하는 시맨틱 REST API의 기능(함수)들을 나열한 표이다. 도시된 바와 같이, 시맨틱 REST API 기능에는, GET Graph List, Entity List, Entity Info, Class-Hierarchy, Graph Info, Individual List가 있으며, 이들에 대한 상세한 설명은 아래와 같다.
GET Graph List는 그래프 URI 목록을 획득하기 위한 기능이다. 모든 트리플 세트는 고유한 그래프 URI를 갖는 그래프에 저장되고, 온톨로지는 트리플 DB에 그래프로도 저장될 수 있다. GET Graph List로 해당 그래프 URI 목록을 획득한다.
Entity List는 엔티티 타입이 Class, ObjectProperty , DataProperty , NamedIndividual ... 인 엔티티의 URI 목록을 획득하기 위한 기능이다.
Entity Info는 주어진 엔티티(Class, NamedIndividual, Object Property, Data Property)의 URI 정보를 획득한다. 즉 타입과 속성들(domains, ranges, subsumption, comment, …)에 대한 세부 정보를 제공하여 준다.
Class-Hierarchy는 자식 클래스에서 부모 클래스까지, "n-level"까지 Class/Individual의 클래스 계층구조를 획득한다.
Graph Info는 주어진 그래프 URI의 모든 트리플 세트를 획득한다.
Individual List는 주어진 타입의 모든 Individual의 URI 목록을 획득한다.
이하에서 시맨틱 API 요청을 처리하는 과정에 대해 상세히 설명한다.
1. 요청 파라미터 파싱
각 API 요청은 자체 요청 파라미터로써, SPARQL 쿼리를 생성하는데 추가로 사용되는 조건을 추출하기 위해 파싱된다.
(1) 검색 키워드 파싱
검색 키워드는 요구 데이터의 일부로써, 클라이언트가 제공한다. 이 경우 데이터는 URI/IRI로 구성되며, 데이터를 구성하는 그래프에도 URI/IRI가 식별자로 포함된다. 검색 키워드는 URI/IRI의 일부이며, (다른 검색 조건과 함께) 일치하는 경우 해당 데이터(그래프/엔티티 URI/IRI)가 후보 응답으로 고려된다.
(2) URI 파싱
시맨틱 데이터의 URI/IRI는 데이터의 특정 엔티티에 대한 식별자이다. 또한, 이들은 사전(vocabulary : 시맨틱 온톨로지)인 스키마를 정의하는 데에도 사용된다.
요청과 응답을 쉽고 간결하게 만들기 위해, 시맨틱 데이터에서 엔티티 ID의 네임 스페이스를 나타내는 사전에 정의된 static prefixes가 사용된다. 도 5에 나타낸 바와 같이, 요청에서 긴 URI 대신, 네임 스페이스는 사전에 정의된 static label, 콜론 ":", Postfixes 순으로 대체된다.
도 8에 나타난 바와 같이, 이들은 모두 함께 엔티티 URI/IRI를 형성하며, 이는 API에서 유효한 URI/IRI로 식별되고 SPARQL 쿼리에 사용된다.
(3) 제한, 형식 및 응답 타입 등과 같은 기타 파라미터 파싱
1) 그래프 타입 또는 ID
일반적으로 데이터베이스에는 두 가지 타입의 그래프가 있다. 하나는 사전/온톨로지인 스키마를 포함하는 그래프이고, 다른 하나는 그러한 온톨로지를 기반으로 하는 인스턴스를 포함하는 그래프이다. 요청 파라미터는 검색해야 하는 그래프 타입을 지정한다.
Id(URI/IRI)의 경우, SPARQL 쿼리에서 그래프에 포함된 모든 데이터를 획득하는데 사용된다.
2) 엔티티 타입 또는 ID
엔티티는 데이터에서 엔티티를 나타내는 시맨틱 API에 의해 정의되는 용어이다. Class, Individual, ObjectProperty 또는 DatatypeProperty가 될 수 있다. 엔티티에 대한 정보는 요청에 타입 또는 ID(URI/IRI)를 지정하여 요청할 수 있다. 타입은 엔티티(URI/IRI)의 목록을 획득하기 위해 지정되는 반면, Id(URI/IRI)는 해당 엔티티의 관련 정보를 가져 오기 위해 지정된다. 도 6 내지 도 10에서 엔티티 타입 및 정보들을 예시하였다.
3) 클래스 타입
클래스(owl : Class)는 엔티티 타입(owl : NamedIndividual)이 정의되는 엔티티를 기반으로 사전/온톨로지에 정의된 특정 엔티티이다. Individuals의 특성을 정의하는 타입 정의가 있다. Individuals(URI/IRI만 해당)의 목록을 검색하기 위해 타입이 지정된다. 값(valuer)은 클래스의 Id(URI / IRI)이다.
4) Prefix/응답 형식
응답에는 심플 형식과 노멀 형식 두 가지가 있는데, 심플 형식은 값들이 직접 제공되므로 응답 크기가 작다. 반면 노멀 형식에서는 응답에서 의도된 값들에 대해 사전 정의된 특정 키가 있다. 키를 사용하면 응답이 더 커지지만 더 정교해 진다. 응답 형식의 경우, 이 옵션은 API 기능 중 엔티티 정보에만 제공된다. 도 11에 심플 형식과 노멀 형식 두 가지를 예시하였다.
5) 응답 제한(Response Limit)
검색된 시맨틱 데이터가 클 수 있으므로, 더 빠른 검색 결과를 제공하기 위해, (SPARQL 쿼리에서) 결과 수를 제한하기 위해 이 파라미터가 제공된다. 제한이 지정되지 않은 경우, 디폴트 값으로 설정된다.
2. SPARQL 쿼리 생성
SPARQL 쿼리는 트리플 데이터베이스(TDB)와 인터랙션하는 방법이다. 따라서 API 요청은 필요한 데이터를 검색하기 위해 SPARQL 쿼리로 변환된다.
(1) 그래프 및 타입
파싱된 그래프 Id 또는 타입은 API의 SPARQL 쿼리 문자열에서, 그래프 목록 또는 지정된 그래프에 포함된 데이터를 검색하는데 사용된다. 도 13과 도 19에 예시되어 있다.
(2) SPARQL 쿼리 변수
SPARQL 쿼리 변수에 대해서는 상세히 후술한다.
(3) SPARQL 순회 및 필터 조건
1) SPARQL WHERE 절
검색할 데이터의 패턴을 정의하는데 사용된다. SPARQL 변수와 값으로 구성된다.
2) SPARQL 필터 조건
일치시킬 특정 조건을 정의하는데 사용되며, 패턴을 사용하여 정의할 수 없다(예 : 값 비교, 산술 연산 등). 대부분의 경우, API에서 요청 파라미터에서 추출한 검색 키워드를 일치시키는데 사용된다. 검색 키워드는 SPARQL 쿼리의 필터 조건에 추가된다. 따라서 지정된 키워드를 포함하는 응답만 반환된다.
(4) SPARQL 쿼리 응답 : SPARQL 쿼리는 쿼리에서 요청되는 쿼리 변수로 응답을 구성한다. SPARQL 응답에서 예상되는 쿼리 변수는 "SELECT" 문에 지정된다. "WHERE" 절의 쿼리 변수는 데이터베이스에서 검색 할 패턴을 지정힌다. "SELECT" 문에 지정된 쿼리 변수는 필요한 경우 "WHERE" 절에서도 사용할 수 있다.
반환된 응답은 일반적으로 쿼리 솔루션을 나타내는 오브젝트들로 구성되며 각 솔루션에는 쿼리 변수의 해당 값이 포함된다. 응답은 다른 직렬화를 가질 수 있으므로, 표현이 다를 수 있지만 동일한 개념을 갖는다.
(5) Prefixes
Prefixes는 시맨틱 API에 의해 별도로 유지된다. 응답이 생성될 때 마다, Prefixes의 각 해당 네임 스페이스가 API에 의해 저장된다. API는 각 URI/IRI를 파싱하고 응답에 관련된 네임 스페이스를 기반으로 Prefixes를 추가한다.
3. SPARQL 응답 파싱
쿼리 변수로 구성되어 캡슐화된 응답을 추출한다. SPARQL 쿼리 응답을 수신 한 후, 요청된 쿼리 변수("SELECT" 문에 지정됨)의 각 값은 반복적으로 (하나씩) 순회되고, API 응답에 추가된다.
응답 순회에서, 값은 전체 URI/IRI(엔티티 ID의 네임 스페이스 + Postfixes)를 포함한다. 따라서 "#" 앞의 URI/IRI 부분은 네임 스페이스로 식별되고 추출된다. 추출된 네임 스페이스는 API의 Prefixes 저장소에서 검색되며, 여기서 네임 스페이스와 각각의 Prefixes는 저장된다.
저장소에 Prefixes가 있는 경우, API 응답에서 사용하도록 선택된다. 그렇지 않은 경우 순회에서 수집된 정확한 전체 URI/IRI가 사용된다.
4. JSON 응답 생성
JSON 응답은 API가 클라이언트에 반환하는 응답이다. SPARQL 응답은 응답을 간결하게 만들기 위해 Prefixes 추가와 함께 JSON 응답으로 변환된다.
(1) Prefixes 생성
응답 순회에서 값은 전체 URI/IRI(엔티티 ID의 네임 스페이스 + Postfixes)를 갖는다. 따라서 네임 스페이스가 추출되고 API 응답에서 적절한 Prefixe 레이블로 대체된다. 또한 Prefixe 레이블과 해당 네임 스페이스도 API 응답의 "prefix-list" 오브젝트 아래에 추가된다. API 응답은 API 응답에 포함된 "prefix-list" 오브젝트의 Prefixes만 포함한다.
(2) Prefixes 사용 응답 생성
API에서 반환 할 수있는 응답 형식에는 두 가지 타입이 있다. 형식에 관계없이 URI/IRI는 항상 Prefixes 레이블들을 포함한다(API에서 인식하는 경우, API의 Prefixes 저장소에서 사용할 수 있음).
1) URI/IRI 목록
이 형식은 API 기능 중 GET Graph List, Entity List, Class-Hierarchy, Individual List에서 사용된다. 여기서 응답은 URI/IRI 목록을 포함하는 JSON 배열이다.
이 경우 SPARQL 응답에는 쿼리 변수가 하나만 있으므로, API 응답에서 JSON 배열로 변환된다. 도 14, 도 15, 도 16, 도 19 및 도 22에 관련 예제를 제시하였다.
2) 트리플 목록
이 형식은 API 기능 중 Entity Info 및 Graph Info에서 사용된다. 여기서 응답은 JSON 오브젝트 목록을 포함하는 JSON 배열이며, 각 JSON 객체에는 하나의 트리플 데이터(subject, predicate and object)가 포함된다.
Entity Info에 대해서는 전술한 바 있고, 도 11에 심플 응답 버전이 있다. 이 경우, SPARQL 응답에는 subject, predicate and object를 나타내는 s, p 및 o의 세 가지 쿼리 변수가 있다. 이러한 변수들은 함께 트리플을 정의하며, 이는 위에 정의된 형식으로 변환된다. 도 11, 도 12, 도 17, 도 18, 도 20, 도 21에 관련 예제를 제시하였다.
5. 시맨틱 REST API : 쿼리 파라미터
지금까지, 시맨틱 API 요청을 처리하는 과정에 대해 상세히 설명하였다. 도 13에는 시맨틱 REST API의 쿼리 파라미터들을 정리한 표이다. 쿼리 파라미터들에는 검색 키워드 목록(Search Keyword List), 그래프 타입(Graph Type), Prefixes 형식(Prefix format), 엔티티 타입 목록(Entity Type List), 엔티티 URI/IRI(Entity URI/IRI), 응답 형식(Response Format), ClassId(ClassId), 응답 제한(Response Limit)이 포함된다.
검색 키워드 목록은 검색할 리소스 정보에 따라, 일치하는 키워드로, 키워드를 제공할 수 있다. 그래프 목록와 엔티티 목록에 사용된다.
그래프 타입(Graph Type)은 온톨로지 타입과 인스턴스 타입의 그래프로 구분 된다. 온톨로지 타입 그래프는 모든 온톨로지 모델을 저장하는, 반면 인스턴스 타입 그래프는 온톨로지 모델을 기반으로 assertions(실제 데이터)을 저장한다. 그래프 목록에 사용된다.
Prefixes는 모든 온톨로지의 전체 또는 일부를 정의하는 모든 네임 스페이스의 식별자이다. 엔티티 URI/IRI의 일부로 사용되며, 읽기 쉽고 간결한 형식을 제공하기 위해 전체 URI/IRI를 단축하는데 사용된다. Prefixes 형식에는 심플 타입과 노멀 타입이 있다.
엔티티 타입 목록 : 엔티티 타입은 다음 값을 가질 수 있다 : lass, ObjectProperty, DataProperty, NamedIndividual
또한 온톨로지에서 정의된 클래스, 객체 속성 또는 데이터 속성 URI/IRI를 포함할 수도 있다. 엔티티 목록에 사용된다.
엔티티 URI/IRI는 온톨로지에서 정의된 클래스, 객체 속성 또는 데이터 속성 URI/IRI일 수 있다. 엔티티 정보에 사용된다.
응답 형식 : 응답은 심플 형식과 노멀 형식이 있다. 심플 형식은 간결한 반면 노멀 형식은 상세하며 subject, predicate and object에 따라 각 트리플을 설명한다. 엔티티 정보에 사용된다.
ClassId는 클래스 타입의 엔티티이다. 클래스 계층과 Individual 목록에 사용된다.
응답 제한은 반환할 그래프, 엔터티 또는 트리플의 수를 지정하는데 사용된다. 서버 및 데이터베이스 사양에 따라 디폴트 값을 가질 수 있다.
6. 변형예
지금까지, 시맨틱 REST API 제공 방법에 대해 바람직한 실시예를 들어 상세히 설명하였다.
한편, 본 실시예에 따른 장치와 방법의 기능을 수행하게 하는 컴퓨터 프로그램을 수록한 컴퓨터로 읽을 수 있는 기록매체에도 본 발명의 기술적 사상이 적용될 수 있음은 물론이다. 또한, 본 발명의 다양한 실시예에 따른 기술적 사상은 컴퓨터로 읽을 수 있는 기록매체에 기록된 컴퓨터로 읽을 수 있는 코드 형태로 구현될 수도 있다. 컴퓨터로 읽을 수 있는 기록매체는 컴퓨터에 의해 읽을 수 있고 데이터를 저장할 수 있는 어떤 데이터 저장 장치이더라도 가능하다. 예를 들어, 컴퓨터로 읽을 수 있는 기록매체는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광디스크, 하드 디스크 드라이브, 등이 될 수 있음은 물론이다. 또한, 컴퓨터로 읽을 수 있는 기록매체에 저장된 컴퓨터로 읽을 수 있는 코드 또는 프로그램은 컴퓨터간에 연결된 네트워크를 통해 전송될 수도 있다.
또한, 이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.

Claims (8)

  1. 클라이언트로부터 시맨틱 REST API 요청을 수신하는 단계;
    수신한 시맨틱 REST API 요청을 파싱하여, 파라미터들을 추출하는 단계;
    추출한 파라미터들을 이용하여 SPARQL 쿼리를 생성하는 단계;
    생성한 SPARQL 쿼리를 트리플 DB에 전달하는 단계;를 포함하는 것을 특징으로 하는 시맨틱 REST API 방법.
  2. 청구항 1에 있어서,
    시맨틱 REST API 요청은,
    그래프 URI 목록을 획득하기 위한 요청, 특정 타입의 엔티티의 URI 목록을 획득하기 위한 요청, 특정 엔티티의 URI 정보를 획득하기 위한 요청, Class/Individual의 클래스 계층구조를 획득하기 위한 요청, 특정 그래프 URI의 트리플 세트를 획득하기 위한 요청, 특정 타입의 Individual의 URI 목록을 획득하기 위한 요청 중 적어도 하나를 포함하는 것을 특징으로 하는 시맨틱 REST API 방법.
  3. 청구항 1에 있어서,
    파라미터들은,
    검색 키워드 목록, 그래프 타입, Prefixes 형식, 엔티티 타입 목록, 엔티티 타입 목록, 엔티티 URI/IRI, 응답 형식, 클래스의 Id, 응답 제한 중 적어도 하나를 포함하는 것을 특징으로 하는 시맨틱 REST API 방법.
  4. 청구항 3에 있어서,
    SPARQL 쿼리를 생성 단계는,
    추출한 파라미터들을 이용하여, 그래프 및 타입, SPARQL 쿼리 변수, SPARQL 순회 및 필터 조건을 SPARQL 쿼리에 수록하는 것을 특징으로 하는 시맨틱 REST API 방법.
  5. 청구항 4에 있어서,
    SPARQL 순회 및 필터 조건은,
    검색할 데이터의 패턴을 정의하는 SPARQL WHERE 절 및 SPARQL 필터 조건을 포함하는 것을 특징으로 하는 시맨틱 REST API 방법.
  6. 청구항 1에 있어서,
    트리플 DB로부터 SPARQL 응답을 수신하는 단계;
    수신한 SPARQL 응답을 파싱하여, 퀴리 변수의 값들을 추출하는 단계;
    추출한 값들을 이용하여, REST 응답을 생성하는 단계; 및
    생성한 REST 응답을 클라이언트에 반환하는 단계;를 포함하는 것을 특징으로 하는 시맨틱 REST API 방법.
  7. 청구항 6에 있어서,
    REST 응답 생성단계는,
    URI/IRI 목록 및 트리플 목록 중 적어도 하나를 추출하는 것을 특징으로 하는 시맨틱 REST API 방법.
  8. 클라이언트로부터 시맨틱 REST API 요청을 수신하는 인터페이스;
    수신한 시맨틱 REST API 요청을 파싱하여 파라미터들을 추출하고, 추출한 파라미터들을 이용하여 SPARQL 쿼리를 생성하는 SPARQL 쿼리 생성부; 및
    생성한 SPARQL 쿼리를 트리플 DB에 전달하는 SPARQL 서버;를 포함하는 것을 특징으로 하는 시맨틱 검색 서버.
PCT/KR2020/019262 2020-12-30 2020-12-31 시맨틱 레스트 에이피아이 제공 방법 WO2022145503A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020200187735A KR102411296B1 (ko) 2020-12-30 2020-12-30 시맨틱 rest api 제공 방법
KR10-2020-0187735 2020-12-30

Publications (1)

Publication Number Publication Date
WO2022145503A1 true WO2022145503A1 (ko) 2022-07-07

Family

ID=82216804

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2020/019262 WO2022145503A1 (ko) 2020-12-30 2020-12-31 시맨틱 레스트 에이피아이 제공 방법

Country Status (2)

Country Link
KR (1) KR102411296B1 (ko)
WO (1) WO2022145503A1 (ko)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102563179B1 (ko) * 2023-03-02 2023-08-03 브레인즈컴퍼니 주식회사 Rest api 클라이언트 개발을 위한 가상 rest api 서비스 자동 생성 서버 및 방법

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160314212A1 (en) * 2015-04-23 2016-10-27 Fujitsu Limited Query mediator, a method of querying a polyglot data tier and a computer program execuatable to carry out a method of querying a polyglot data tier
KR101927450B1 (ko) * 2016-12-29 2018-12-10 주식회사 와이즈넛 대용량 비정형 데이터를 처리하는 rest api 서비스 제공 방법
CN112003855A (zh) * 2020-08-20 2020-11-27 杭州诚智天扬科技有限公司 基于ims网络的隐私号码业务平台系统及其应用方法
CN107872484B (zh) * 2016-09-27 2020-12-25 中国电信股份有限公司 Rest api快速注册方法、装置和系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160314212A1 (en) * 2015-04-23 2016-10-27 Fujitsu Limited Query mediator, a method of querying a polyglot data tier and a computer program execuatable to carry out a method of querying a polyglot data tier
CN107872484B (zh) * 2016-09-27 2020-12-25 中国电信股份有限公司 Rest api快速注册方法、装置和系统
KR101927450B1 (ko) * 2016-12-29 2018-12-10 주식회사 와이즈넛 대용량 비정형 데이터를 처리하는 rest api 서비스 제공 방법
CN112003855A (zh) * 2020-08-20 2020-11-27 杭州诚智天扬科技有限公司 基于ims网络的隐私号码业务平台系统及其应用方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANONYMOUS: "MarkLogic Server - Semantic Graph Developer’s Guide", MARKLOGIC, 10 May 2019 (2019-05-10), pages 1 - 268, XP055948474 *

Also Published As

Publication number Publication date
KR102411296B1 (ko) 2022-06-22
KR102411296B9 (ko) 2024-01-11

Similar Documents

Publication Publication Date Title
WO2011136425A1 (ko) 개체명 사전 및 마이닝 규칙이 결합된 온톨로지 스키마를 이용한 리소스 기술 프레임워크 네트워크 구축 장치 및 방법
WO2012070840A2 (ko) 컨센서스 검색 장치 및 방법
WO2018058959A1 (zh) Sql审核方法、装置、服务器及存储设备
WO2007143899A1 (fr) Système et procédé pour l'extraction intelligente et le traitement d'informations
US20060053169A1 (en) System and method for management of data repositories
KR20110020462A (ko) 지능형 질의 응답 검색 시스템 및 방법
WO2014065630A1 (ko) 감상 기반 질의 처리 시스템 및 방법
WO2016099019A1 (ko) 특허문서 분류 시스템 및 방법
WO2011162446A1 (ko) 온톨로지 스키마와 결합된 개체명 사전 및 마이닝 규칙을 이용한 용어의 개체명 결정모듈 및 방법
EP1247213B1 (en) Method and apparatus for creating an index for a structured document based on a stylesheet
WO2021157897A1 (en) A system and method for efficient multi-relational entity understanding and retrieval
WO2022145503A1 (ko) 시맨틱 레스트 에이피아이 제공 방법
WO2015088155A1 (en) Interactive system, server and control method thereof
JP4247108B2 (ja) 構造化文書検索方法、構造化文書検索装置、及びプログラム
WO2013008978A1 (ko) 개체 식별 결과 검색 시스템 및 방법
Tekli et al. XML document-grammar comparison: related problems and applications
WO2024019226A1 (ko) 유해 url 탐지 방법
WO2012169708A1 (ko) 메타 데이터 변환 방법 및 이에 적합한 장치
WO2017159906A1 (ko) 원문의 번역어순을 결정하는 데이터 구조, 상기 구조를 생성하는 프로그램 및 이를 저장하는 컴퓨터 판독가능 저장매체
WO2022250354A1 (en) Information retrieval system and method of information retrieval
WO2016088954A1 (ko) 스팸 분류 방법, 이를 수행하기 위한 기록 매체 및 스팸 분류 장치
WO2022119242A1 (ko) 인공 지능 기반의 유사 특허 검색 방법 및 그 장치
WO2021107446A1 (ko) 지식 그래프 기반 마케팅 정보 분석 챗봇 서비스 제공 방법 및 그 장치
WO2016093407A1 (en) Clinical decision support system and method for evidence adaption using external resources
WO2018139777A1 (ko) 데이터구조를 이용한 수치정보관리장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20968054

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20968054

Country of ref document: EP

Kind code of ref document: A1