KR20180093158A - Method of shortest path discovery based on graph reachability - Google Patents

Method of shortest path discovery based on graph reachability Download PDF

Info

Publication number
KR20180093158A
KR20180093158A KR1020170018263A KR20170018263A KR20180093158A KR 20180093158 A KR20180093158 A KR 20180093158A KR 1020170018263 A KR1020170018263 A KR 1020170018263A KR 20170018263 A KR20170018263 A KR 20170018263A KR 20180093158 A KR20180093158 A KR 20180093158A
Authority
KR
South Korea
Prior art keywords
graph
database
reachability
shortest path
node
Prior art date
Application number
KR1020170018263A
Other languages
Korean (ko)
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 서울대학교산학협력단
Priority to KR1020170018263A priority Critical patent/KR20180093158A/en
Publication of KR20180093158A publication Critical patent/KR20180093158A/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/3446Details of route searching algorithms, e.g. Dijkstra, A*, arc-flags, using precalculated routes
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/3453Special cost functions, i.e. other than distance or default speed limit of road segments
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/34Route searching; Route guidance
    • G01C21/36Input/output arrangements for on-board computers

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a method for searching a shortest path based on graph reachability, and specifically relates to a method for reducing the time required for searching the shortest path by using the graph reachability. The graph reachability shows whether a path exists between two nodes in a graph. In a conventional art, the method for searching the shortest path takes longer time since unnecessary paths are also being searched while searching for the shortest path. According to the present invention, a path not existing is excluded while searching for the shortest path such that the time required for searching the shortest path can be reduced. The present invention comprises: (a) a step for generating database of the graph reachability; (b) a step of excluding nodes that are not reachable to an arrival node by using the database; and (c) a step of repeating the (a) and (b) steps.

Description

그래프 도달가능성 기반 최단거리경로 탐색 방법 { Method of shortest path discovery based on graph reachability }[0001] The present invention relates to a method of shortest path discovery based on graph reachability,

본 발명은 그래프에서 최단 경로를 탐색하는 방법에 관한 것으로, 특히, 그래프 도달가능성 데이터베이스를 활용하여 최단 경로 탐색 도중에 불필요한 탐색을 하지 않음으로써, 최단 경로 탐색 시간을 단축시키는 방법에 관한 것이다.The present invention relates to a method for searching a shortest path in a graph, and more particularly, to a method for shortening a shortest path search time by not performing an unnecessary search during a shortest path search using a graph reachability database.

그래프는 노드 집합과 간선 집합으로 구성되며 간선은 2개의 노드 쌍으로서 2개의 노드 사이의 연결 관계를 의미한다. 간선에서의 2개의 노드가 순서가 있을 경우 첫 번째 노드는 시작 노드 그리고 두 번째 노드는 끝 노드라 칭한다. 간선에 순서가 있을 경우 유방향 그래프라 부른다. 간선에 노드간 순서가 없으면 무방향성 그래프이다. 간선에 실수값 가중치를 부여할 수 있어서 간선을 (시작 노드, 끝 노드, 가중치)로 정의할 수 있다.The graph consists of a set of nodes and trunks, and the trunk is a two-node pair, meaning the connection between two nodes. If two nodes in the trunk are in order, the first node is called the start node and the second node is called the end node. If there is an order in the trunk line, it is called a u-direction graph. If there is no order between nodes in the trunk, it is a non-directional graph. The real value weight can be assigned to the trunk, so that the trunk can be defined as (start node, end node, weight).

그래프는 다양한 분야에 적용된다. 소셜 네트워크 분석의 경우 사람을 노드로 친구관계를 간선으로 정의하여 여러 단계의 친구관계를 통하여 연결되는 또 다른 친구들을 식별하는 데에 그래프를 활용할 수 있다. 도시를 노드로 도시간 도로를 간선으로 정의하면 출발 도시에서 목적 도시로 가는 경로를 찾는 데에 활용할 수 있다. The graph is applied to various fields. In the case of social network analysis, graphs can be used to identify other friends who are connected through multiple levels of friendships by defining a person as a node and a friend relationship as a trunk. By defining a city as a node and an inter-city road as an artery, it can be used to find a route from the departure city to the destination city.

그래프 경로는 간선의 연속으로 처음 간선의 시작은 출발 노드와 도착 노드에 대해 정의되는데, 최단 경로는 출발 노드와 도착 노드가 주어지면 출발 노드에서 출발하여 도착 노드에 도달하는 경로들 중 거리가 가장 작은 경로를 가리킨다. 경로의 거리는 경로 상의 간선의 가중치 합으로 정의된다. 따라서, 최단 경로는 같은 출발 및 도착 노드를 가지는 경로들 중 경로 상의 모든 간선의 가중치의 합이 가장 작은 경로이다. 모든 간선의 가중치가 1인 경우 최단 경로는 간선의 개수가 가장 적은 경로이다.The graph path is defined as a continuation of the main line. The starting point of the first trunk is defined for the starting node and the destination node. If the starting node and the destination node are given, the shortest path starts from the starting node and reaches the arrival node. Points to the path. The distance of the path is defined as the sum of the weights of the trunks on the path. Therefore, the shortest path is the path having the smallest sum of weights of all the trunks on the path among the paths having the same start and end nodes. If the weight of all trunks is 1, the shortest path is the path with the smallest number of trunks.

그래프 경로 탐색의 대표적인 방법으로 너비우선탐색 방법이 있다. 출발 노드에서 시작하여 바로 인접한 노드들을 모두 방문하고 다음으로 인전한 노드들을 방문하는 방식이다. 도착 노드에 도달하면 방문을 종료한다. 너비우선 탐색 방법에 관련해서 최근의 연구는 관계형 데이터베이스에서 구현한 연구이다 [비특허문헌 1]. 어떤 수단(e.g. 관계형 데이터베이스)을 사용하든지 너비우선탐색 방법의 개념은 동일하다. There is a width-first search method as a representative method of graph path search. It starts from the starting node, visits all the immediately adjacent nodes, and visits the next node. Upon reaching the destination node, the visit is terminated. A recent research on the width-first search method is a study implemented in a relational database [Non-Patent Document 1]. No matter what means (eg relational database) is used, the concept of a breadth first search method is the same.

너비우선탐색 방법의 문제점은 도착 노드가 출발 노드로부터 멀리 떨어져 있는 경우 중간에 있는 노드들을 모두 방문해야 한다는 점이다. 특히, 너비우선이기 때문에 중간에 간선들이 많을 경우 인접한 노드들을 모두 방문해야 하기 때문에 시간이 많이 걸린다.The problem with the breadth-first search method is that if the destination node is far from the origin node, then all intermediate nodes must be visited. In particular, since it is width-wise, if there are many trunks in the middle, it takes a lot of time to visit all adjacent nodes.

한편, 종래기술에 따르면 대용량 그래프 데이터베이스에서 최단 경로를 탐색하는 방법이 제시되고 있다[특허문헌 1]. 상기 선행기술은 그래프 데이터베이스로부터 세그먼트 데이터베이스를 생성하고 세크먼트 데이터베이스를 활용해 그래프 경로 탐색을 실시한다. 즉, 그래프 데이터베이스가 변할 경우 세그먼트 데이터베이스를 반드시 다시 생성해야 하고, 세크먼트 데이터베이스를 다시 생성하는 도중에는 그래프 경로 탐색을 하지 못한다는 문제점이 있다.On the other hand, according to the related art, a method of searching a shortest path in a large-capacity graph database has been proposed [Patent Document 1]. The prior art generates a segment database from a graph database and performs a graph path search using a segment database. That is, if the graph database is changed, the segment database must be regenerated, and the graph path search can not be performed while the segment database is regenerated.

또한, 종래기술에 따르면 너비우선 탐색을 위한 그래프 처리 기술이 제시되고 있다[특허문헌 2]. 상기 선행기술은 너비우선탐색 방법에 국한되어, 모든 그래프 경로 탐색 방법에 적용될 수 없다는 문제점이 있다.Also, according to the related art, a graph processing technique for width-first search has been proposed [Patent Document 2]. The prior art is limited to the breadth first search method and can not be applied to all the graph path search methods.

또한, 그래프를 관계형 데이터베이스테이블에 저장하고 SQL 질의문을 반복적으로 적용함으로써 최단거리 경로를 찾는 방법이 제시되고 있으나[비특허문헌 1], 래프 도달가능성을 활용하지 않았기 때문에 탐색 도중에 불필요한 경로도 탐색한다는 단점이 있다.In addition, a method of storing a graph in a relational database table and finding a shortest path by repeatedly applying an SQL query has been proposed [Non-Patent Document 1], but searching for an unnecessary path There are disadvantages.

한국등록특허 제10-1480670호(2015.01.02.공고)Korean Registered Patent No. 10-1480670 (Announcement 201.01.02) 한국등록특허 제10-1658885호(2016.09.22.공고)Korean Registered Patent No. 10-1658885 (Bulletin of Sep. 22, 2016)

Jun Gao, Jiashuai Zhou, Jeffrey Xu Yu, and Tengjiao Wang, "Shortest Path Computing in Relational DBMSs", IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 26, NO. 4, APRIL 2014 Jun Gao, Jiashuai Zhou, Jeffrey Xu Yu, and Tengjiao Wang, "Shortest Path Computing in Relational DBMSs", IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, Vol. 26, NO. 4, APRIL 2014

본 발명의 목적은 상술한 바와 같은 문제점을 해결하기 위한 것으로, 중간에 방문하는 노드들 중 도착 노드에 도달할 수 없는 노드들은 방문하지 않는 방법을 제시하고, 특히, 방문할 중간 노드들의 개수를 줄일 수 있으므로 경로 탐색 시간을 단축시킬 수 있는, 그래프 도달가능성 기반 최단거리경로 탐색 방법을 제공하는 것이다.It is an object of the present invention to solve the above-mentioned problems, and it is an object of the present invention to provide a method of not visiting nodes that can not reach an arrival node among intermediate visiting nodes, The present invention provides a shortest path search method based on graph reachability that can shorten a path search time.

또한, 본 발명의 목적은 그래프 데이터베이스로부터 그래프 도달가능성 데이터베이스를 생성하고 그래프 데이터베이스와 그래프 도달가능성 데이터베이스를 활용해 그래프 경로 탐색을 실시하는, 그래프 도달가능성 기반 최단거리경로 탐색 방법을 제공하는 것이다.It is also an object of the present invention to provide a graph reachability-based shortest path search method that creates a graph reachability database from a graph database and performs a graph path search using a graph database and a graph reachability database.

또한, 본 발명의 목적은 그래프 도달가능성 데이터베이스만 다시 생성하여, 그래프 도달가능성 데이터베이스가 다시 생성되는 도중에도 (그래프 데이터베이스만 활용함으로써) 그래프 경로 탐색을 실시하는, 그래프 도달가능성 기반 최단거리경로 탐색 방법을 제공하는 것이다.It is also an object of the present invention to provide a graph reachability-based shortest path search method that re-creates only the graph reachability database and performs a graph path search (by utilizing only the graph database) while the graph reachability database is being regenerated .

상기 목적을 달성하기 위해 본 발명은 그래프 도달가능성 기반 최단거리경로 탐색 방법에 관한 것으로서, (a) 그래프 데이터베이스를 기반으로 그래프 도달가능성 데이터베이스를 생성하되, 그래프 상의 모든 노드 쌍에 대한 도달 가능성 여부 정보를 담고 있는 단계; (b) 그래프 경로 탐색기 그래프 데이터베이스에 기반하여 경로를 탐색하는데 중간에 그래프 도달가능성 데이터베이스를 활용해서 도착 노드에 도달가능하지 않는 노드들은 탐색에서 제외시키는 단계; 및, (c) 상기 (a)단계 내지 (b)단계를 반복하는 단계를 포함하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided a shortest path search method based on graph reachability, the method comprising: (a) generating a graph reachability database based on a graph database, Containing step; (b) graph path searching step of searching the path based on the graph database, excluding nodes that are not reachable to the arrival node by using the graph reachability database in the middle; And (c) repeating the steps (a) and (b).

또한, 본 발명은 그래프 도달가능성 기반 최단거리경로 탐색 방법을 수행하는 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 관한 것이다.The present invention also relates to a computer-readable recording medium on which a program for performing a shortest path search method based on graph reachability is recorded.

상술한 바와 같이, 본 발명에 따른 그래프 도달가능성 기반 최단거리경로 탐색 방법에 의하면, 최단 경로 탐색 도중에 불필요한 경로 탐색을 하지 않음으로써, 경로 탐색 시간을 단축시킬 수 있는 효과가 얻어진다.As described above, according to the graph reachability-based shortest path search method according to the present invention, an unnecessary path search is not performed during the shortest path search, thereby reducing the path search time.

또한, 본 발명에 따른 그래프 도달가능성 기반 최단거리경로 탐색 방법에 의하면, 그래프 도달가능성 데이터베이스는 구조가 간단하기 때문에 쉽게 갱신할 수 있고, 그래프 도달가능성 데이터베이스가 다시 생성되는 도중에도 그래프 경로 탐색을 실시할 수 있고, 그래프 도달가능성 데이터베이스가 없이도 그래프 경로 탐색을 실시할 수 있고, 그래프데이터베이스가 수시로 변화하는 환경에서 적용시킬 수 있는 효과가 얻어진다.In addition, according to the graph reachability-based shortest path search method according to the present invention, the graph reachability database can be easily updated because the structure is simple, and the graph path search is performed while the graph reachability database is regenerated The graph path search can be performed without a graph reachability database, and an effect that can be applied in an environment in which the graph database changes from time to time is obtained.

도 1은 본 발명을 실시하기 위한 전체 시스템의 구성을 도시한 도면.
도 2는 본 발명의 일실시예에 따른 그래프 데이터베이스와 그래프 도달가능성 데이터베이스의 예로서, (a) 그래프 경로 탐색 과정, (b) 그래프 데이터베이스, (c) 그래프 도달가능성 데이터베이스에 대한 예시도.
도 3은 본 발명의 일실시예에 따른 관계형 데이터베이스를 활용한 최단 경로 탐색 과정을 나타낸 도면.
BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a diagram showing a configuration of an overall system for carrying out the present invention; Fig.
FIG. 2 illustrates an example of a graph database and a graph reachability database according to an exemplary embodiment of the present invention, including (a) a graph path search process, (b) a graph database, and (c) a graph reachability database.
3 is a diagram illustrating a shortest path search process using a relational database according to an embodiment of the present invention.

이하, 본 발명의 실시를 위한 구체적인 내용을 도면에 따라서 설명한다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described in detail with reference to the drawings.

또한, 본 발명을 설명하는데 있어서 동일 부분은 동일 부호를 붙이고, 그 반복 설명은 생략한다.In the description of the present invention, the same parts are denoted by the same reference numerals, and repetitive description thereof will be omitted.

본 발명은 그래프 데이터베이스로부터 그래프 도달가능성 데이터베이스를 구축하는 단계와 사용자에 의해 주어진 출발 노드와 도착 노드에 대해 최단 경로를 탐색하는 단계로 구성된다. The present invention comprises constructing a graph reachability database from a graph database and searching for a shortest path for a given start node and an arrival node by a user.

도 1은 대표도면이다. 본 발명에 따른 시스템의 사용자 입력은 (출발 노드, 도착 노드)이다. 출력은 입력으로 주어진 출발 노드로 시작해서 도착 노드에 도달하는 경로들 중 거리가 가장 작은 경로이다. 거리는 정의하기 나름으로 아래에 자세히 설명한다. 그래프 도달가능성 생성기는 그래프 데이터베이스를 기반으로 그래프 도달가능성 데이터베이스를 생성한다. 그래프 상의 모든 노드 쌍에 대한 도달 가능성 여부 정보를 담고 있다. 그래프 경로 탐색기는 기본적으로 그래프 데이터베이스에 기반하여 경로를 탐색하는데 중간에 그래프 도달가능성 데이터베이스를 활용해서 도착 노드에 도달가능하지 않는 노드들은 탐색에서 제외시킴으로써 경로 탐색 시간을 단축한다. 1 is a representative drawing. The user input of the system according to the invention is (originating node, destination node). The output is the path with the smallest distance among the arriving nodes starting from the given starting node as the input. The distances are defined in detail below. The graph reachability generator creates a graph reachability database based on the graph database. Contains information on reachability for all pairs of nodes on the graph. The graph path navigator basically searches the path based on the graph database. In the middle, the graph reachability database is used to shorten the path search time by excluding nodes that are not reachable to the destination node from the search.

그래프 데이터베이스에는 하나의 그래프가 저장돼 있으며, 하나의 그래프는 노드 집합과 간선 집합으로 구성된다. 도 2에 그래프 데이터베이스의 예가 표현됐다. 노드 테이블에는 10개의 노드 이름이 저장된다. 간선 테이블(TE)에는 화살표로 표시된 간선이 저장된다. nid는 시작 노드이고 tid는 끝 노드를 가리킨다. One graph is stored in the graph database, and one graph consists of a node set and an edge set. An example of the graph database is shown in Fig. The node table stores ten node names. The trunk line TE is stored with an arrow indicated by an arrow. nid is the starting node and tid is the ending node.

그래프 도달가능성 데이터베이스는 그래프 상에서 모든 (출발, 도착) 쌍에 대한 도달 가능 여부로 구성된다. 도 2의 오른쪽에 그래프 도달가능성 데이터베이스의 예가 표현됐다. 그래프 상에서 s에서 출발해서 g에 도착하는 경로 s->a->g가 존재하므로 도달가능성을 1로 표현한다. 반대로, c에서 출발해서 a로 가는 경로는 없으므로 도달가능성을 0으로 표현한다.The graph reachability database consists of reachability for all (departure, arrival) pairs on the graph. On the right side of Figure 2, an example of a graph reachability database is presented. Since the path s -> a -> g arriving at g starts from s on the graph, the reachability is expressed as 1. Conversely, since there is no path from a to c to a, reachability is expressed as zero.

최단 경로 탐색은 주어진 출발 노드로부터 출발하여 도착 노드까지 도달하는 경로들 중 거리가 가장 작은 경로를 찾는 과정이다. 설명을 위해 가중치가 부여되지 않는 그래프에 대해 너비우선탐색 방법을 사용한다고 가정한다. 하지만, 깊이우선탐색에도 마찬가지로 적용된다. 그림 2의 왼쪽에 출발 노드 s이고 도착 노드가 t인 경우에 최단경로를 탐색하는 과정의 일부를 표현했다. s에서 a로 이동한 뒤 a에서는 g, i, 그리고 b 등 3가지로 이동하는 경로들이 존재한다. 이때 기존 방법의 경우 g, i, 그리고 b 등 3가지 모두 탐색을 한다. 본 발명에 따르면, g의 경우 g로부터 최종 도착 노드인 t로 가는 경로가 존재하지 않기 때문에 탐색하지 않는다. 즉, 그래프 도달가능성 데이터베이스에서 (i,t), (b,t), 그리고 (g,t) 각각에 대해 도달가능한지 체크한다. (g,t)의 경우 0이기 때문에 탐색하지 않는다.The shortest path search is the process of finding the path with the smallest distance from the given starting node to the arrival node. Suppose we use a breadth first search method for a graph that is not weighted for explanation. However, the same applies to depth-first search. Figure 2 shows a part of the process of searching for the shortest path when the destination node is s and the destination node is t. After moving from s to a, there are three paths that go to g, i, and b in a. In this case, we search all three methods such as g, i, and b in the existing method. According to the present invention, since g does not exist from g to the final destination node t, it is not searched. (I, t), (b, t), and (g, t) in the graph reachability database. (g, t) is 0, it is not searched.

도 3은 관계형 데이터베이스를 활용하여 본 발명을 실시하는 예를 표현한 그림이다. 관계형 데이터베이스를 활용한 최단 경로 탐색은 [비특허문헌 1]에서 제안했다. 본 발명은 그래프 도달 가능성 데이터베이스를 활용했다는 점이 다르다. 3 is a diagram illustrating an example of implementing the present invention utilizing a relational database. A shortest path search using a relational database is proposed in [Non-Patent Document 1]. The present invention differs in that it utilizes a graph reachability database.

최단 경로 탐색 시 사용하는 테이블에서 nid는 현재 노드 이름, d2s는 출발 노드로부터 현재 노드까지의 거리, p2s는 최단 경로를 구성하기 위해 현재 노드 이전에 방문해야 할 노드, 그리고 f는 방문을 마쳤으면 T 아니면 F이다. i단계에서 지금까지 방문한 노드 테이블을 Ai, i단계에서 방문해야 할 노드 테이블을 Fi, 그리고 다음 단계에서 방문할 노드 테이블을 Ei이라 칭하자.In the table used for the shortest path search, nid is the current node name, d2s is the distance from the starting node to the current node, p2s is the node to visit before the current node to construct the shortest path, and f is T Or F. Let A i be the node table visited so far in step i , F i the node table to visit in step i , and E i i the node table to visit in the next step.

본 예제에서의 최단 경로 질의에서 출발 노드는 s이고 도착 노드는 t이다. 그림 3은 첫 번째 단계와 두 번째 단계만 표현했다. 나머지 단계는 동일하게 진행되며 t가 Ai에 삽입되고 f값이 t인 경우 종료된다. In the shortest path query in this example, the starting node is s and the destination node is t. Figure 3 shows only the first and second steps. The remaining steps proceed in the same way and end when t is inserted into A i and the value of f is t.

우선, 출발 노드인 s를 A1에 삽입한다. 처음 방문했으므로 d2s는 0이고 p2s는 자신이다. First, the starting node s is inserted into A 1 . Since we first visited, d2s is 0 and p2s is itself.

F 연산은 본 단계에서 방문할 노드를 선택하는 연산으로, A1에서 방문할 노드들, 즉, f값이 F인 노드들 중 d2s가 가장 작은 노드를 선택하는 연산이다. 이 노드를 F1에 삽입한다. 또한 f의 값을 T로 바꿔준다. The F operation is an operation for selecting a node to visit in this step. In this step, the node to be visited in A 1 , that is, the node whose f value is F, selects the node having the smallest value of d 2 s. Insert this node into F 1 . Also, change the value of f to T.

E 연산은 F1에 있는 노드와 연결된 노드들을 TE로부터 가져오는 연산으로, 구체적으로는, TE와 F1을 조인하는 연산이다. 조인은 같은 칼럼(여기서는 nid)를 가지는 행(여기서는 노드)들을 조합하는 연산이다. 조인 연산에 따라, TE에서 nid가 s인 간선의 끝 노드들은 a와 b 노드이다. a와 b 노드를 E1에 삽입한다. 이때, a와 b가 t에 도달 가능한지 여부를 그래프 도달 가능성 데이터베이스를 이용해 검사한다. 모두 도달 가능하므로 모두 E1에 삽입한다.The E operation is an operation for fetching nodes connected to a node in F 1 from a TE, specifically, joining TE and F 1 . A join is an operation that combines rows (here, nodes) having the same column (nid in this case). According to the join operation, the end nodes of the trunk whose nid is s in the TE are a and b nodes. the a and b node is inserted into the E 1. At this time, whether or not a and b can reach t is checked using the graph reachability database. Since all are reachable, they are all inserted into E 1 .

M연산은 기존에 방문한 노드들과 다음에 방문한 노드들을 병합하고 출발 노드까지의 거리를 갱신하는 연산이다. E1에 있는 다음에 방문할 노드들인 a와 b를 A1에 추가한다. 이때 다음에 방문할 노드들이 이미 A1에 존재할 경우 거리를 갱신한다. 본 단계에서는 그러한 경우가 없으므로 추가만 하여 A2를 얻는다. The M operation is an operation of merging the visited nodes and the next visited nodes and updating the distance to the starting node. Add a and b to the next visited nodes in E 1 , A 1 . At this time, if the nodes to be visited next are already present in A 1 , the distance is updated. Since there is no such case in this step, we add A 2 only by adding.

A2를 기반으로 다음 단계를 진행한다. 첫번째 단계와 다른 부분만 설명한다. E 연산에서 b, g, 그리고 i에 대해 t에 도달 가능한지 여부를 그래프 도달가능성 데이터베이스를 이용해 검사한다. g는 도달 가능하지 않으므로 E2에 삽입하지 않는다. Proceed to the next step based on A 2 . Only the first part and the other part are explained. E check whether the t is reachable for b, g, and i in the computation using the graph reachability database. g is not reachable and is not inserted in E 2 .

또한, M 연산을 실시할 때 b노드가 이미 A2에 존재하는데 d2s의 값이 8이다. 이는 s->b 경로의 거리이다. A3를 보면 b의 p2s는 a이고 a의 p2s는 s이다. 즉, 본 단계에서 새롭게 알아낸 s에서 b로 가는 최단 경로는 s->a->b이다. 따라서, b의 d2s의 값을 5로 갱신한다. Also, when the M operation is performed, the b-node is already present in A 2 , and the value of d 2 s is 8. This is the distance of s-> b path. In the A 3 b is a p2s of a p2s of a is s. That is, the shortest path from s to new b in this step is s->a-> b. Therefore, the value of d2s of b is updated to 5.

이와 같은 과정을 t가 Ai에 추가되고 f의 값이 T로 설정될 때까지 반복한다. This process is repeated until t is added to A i and the value of f is set to T.

최단 경로는 Ai를 탐색하면 얻을 수 있다. nid가 t인 행의 p2s가 x라 하면 nid인 x인 행을 방문하고 같은 방식으로 p2s를 방문한다. nid가 s일 때까지 과정을 반복하면 노드의 연속을 얻을 수가 있는데, 이 노드 연속의 역순이 최단 경로이다.The shortest path can be obtained by searching A i . If p2s of a row with nid t is x, it visits the row x with nid and visits p2s in the same way. By repeating the process until nid is s, you can get a sequence of nodes, the reverse of which is the shortest path.

한편, 본 발명은 그래프 데이터베이스 관리 시스템의 한 기능으로서 활용될 수 있다. 그래프 데이터베이스 관리 시스템은 그래프 데이터를 저장하고 그래프 관련 질의가 주어졌을 때 그에 대한 답을 반환하는 시스템을 가리킨다. 그래프 데이터베이스 관리 시스템은 지식그래프에 대한 지식검색, 도시 그래프 기반의 길 안내 네비게이션, 단백질 상호작용 그래프 기반의 의생물학 연구 등에 활용될 수 있다. Meanwhile, the present invention can be utilized as a function of the graph database management system. The graph database management system refers to a system that stores graph data and returns the answers to given graph-related queries. The graph database management system can be used for knowledge search for knowledge graphs, road navigation based on city graphs, and biology research based on protein interaction graphs.

이상, 본 발명자에 의해서 이루어진 발명을 상기 실시 예에 따라 구체적으로 설명하였지만, 본 발명은 상기 실시 예에 한정되는 것은 아니고, 그 요지를 이탈하지 않는 범위에서 여러 가지로 변경 가능한 것은 물론이다.Although the present invention has been described in detail with reference to the above embodiments, it is needless to say that the present invention is not limited to the above-described embodiments, and various modifications may be made without departing from the spirit of the present invention.

10 : 사용자 단말 20 : 네트워크
30 : 탐색 시스템 40 : 데이터베이스
10: user terminal 20: network
30: search system 40: database

Claims (2)

그래프 도달가능성 기반 최단거리경로 탐색 방법에 있어서,
(a) 그래프 데이터베이스를 기반으로 그래프 도달가능성 데이터베이스를 생성하되, 그래프 상의 모든 노드 쌍에 대한 도달 가능성 여부 정보를 담고 있는 단계;
(b) 그래프 경로 탐색기 그래프 데이터베이스에 기반하여 경로를 탐색하는데 중간에 그래프 도달가능성 데이터베이스를 활용해서 도착 노드에 도달가능하지 않는 노드들은 탐색에서 제외시키는 단계; 및,
(c) 상기 (a)단계 내지 (b)단계를 반복하는 단계를 포함하는 것을 특징으로 하는 그래프 도달가능성 기반 최단거리경로 탐색 방법.
A method for shortest path search based on graph reachability,
(a) generating a graph reachability database based on a graph database, the information including reachability information on all pairs of nodes on the graph;
(b) graph path searching step of searching the path based on the graph database, excluding nodes that are not reachable to the arrival node by using the graph reachability database in the middle; And
(c) repeating the steps (a) and (b).
제1항의 그래프 도달가능성 기반 최단거리경로 탐색 방법을 수행하는 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.
A computer-readable recording medium having recorded thereon a program for performing the shortest distance path search method based on the graph reachability of claim 1.
KR1020170018263A 2017-02-09 2017-02-09 Method of shortest path discovery based on graph reachability KR20180093158A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020170018263A KR20180093158A (en) 2017-02-09 2017-02-09 Method of shortest path discovery based on graph reachability

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020170018263A KR20180093158A (en) 2017-02-09 2017-02-09 Method of shortest path discovery based on graph reachability

Publications (1)

Publication Number Publication Date
KR20180093158A true KR20180093158A (en) 2018-08-21

Family

ID=63453883

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020170018263A KR20180093158A (en) 2017-02-09 2017-02-09 Method of shortest path discovery based on graph reachability

Country Status (1)

Country Link
KR (1) KR20180093158A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200094674A (en) * 2019-01-30 2020-08-07 경희대학교 산학협력단 Method and device for grape spasification using edge prunning
KR20210064862A (en) 2019-11-26 2021-06-03 한국전력공사 Knowledge Graph Generation Method and Renewable Energy Item Recommendation System and Method
KR20210089033A (en) 2020-01-07 2021-07-15 한국전력공사 Hierarchical clustering method and system for directivity graph data

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101480670B1 (en) 2014-03-28 2015-01-15 경희대학교 산학협력단 Method for searching shortest path in big graph database
KR101658885B1 (en) 2015-08-25 2016-09-22 경희대학교 산학협력단 Graph processing method for breadth first searching and apparatus thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101480670B1 (en) 2014-03-28 2015-01-15 경희대학교 산학협력단 Method for searching shortest path in big graph database
KR101658885B1 (en) 2015-08-25 2016-09-22 경희대학교 산학협력단 Graph processing method for breadth first searching and apparatus thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Jun Gao, Jiashuai Zhou, Jeffrey Xu Yu, and Tengjiao Wang, "Shortest Path Computing in Relational DBMSs", IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 26, NO. 4, APRIL 2014

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200094674A (en) * 2019-01-30 2020-08-07 경희대학교 산학협력단 Method and device for grape spasification using edge prunning
KR20210064862A (en) 2019-11-26 2021-06-03 한국전력공사 Knowledge Graph Generation Method and Renewable Energy Item Recommendation System and Method
KR20210089033A (en) 2020-01-07 2021-07-15 한국전력공사 Hierarchical clustering method and system for directivity graph data

Similar Documents

Publication Publication Date Title
CN105678054B (en) Optimal multi-meeting-point path searching method and device based on A-star strategy
WO2016188151A1 (en) Searching method and device for optimal route of multiple meeting point applicable for real-time ride-sharing
Simchi-Levi et al. Minimizing the total flow time of n jobs on a network
US20100161532A1 (en) Determination of graph connectivity metrics using bit-vectors
CN105765576A (en) Processing search queries using data structure
KR20180093158A (en) Method of shortest path discovery based on graph reachability
US8799330B2 (en) Determining the value of an association between ontologies
CN112328877B (en) Skyline inquiry method for multiple users on time-dependent road network
CN112465637B (en) Method for intelligent automatic guiding and detecting money back washing and computer readable storage medium
Yawalkar et al. Route recommendations on road networks for arbitrary user preference functions
Tabassum et al. Dynamic group trip planning queries in spatial databases
Wang et al. Constrained route planning over large multi-modal time-dependent networks
Sasaki et al. Sequenced route query with semantic hierarchy
CN104268190A (en) Bus route search method and device
CN108052743B (en) Method and system for determining step approach centrality
US8965910B2 (en) Apparatus and method of searching for instance path based on ontology schema
Lin et al. Personalized query techniques in graphs: A survey
CN115392539A (en) Path planning algorithm based on greedy algorithm
Xu et al. Discovery of important crossroads in road network using massive taxi trajectories
CN103064872A (en) Processing search queries in a network of interconnected nodes
US20130010643A1 (en) Method and apparatus for loop path search in mesh network
CN111159319B (en) Big data-based way finding method and system
Jeong et al. A dissimilar alternative paths-search algorithm for navigation services: A heuristic approach
Dereniowski et al. Rendezvous of heterogeneous mobile agents in edge-weighted networks
Wei et al. Accelerating the shortest-path calculation using cut nodes for problem reduction and division

Legal Events

Date Code Title Description
E902 Notification of reason for refusal