KR101266898B1 - Method for processing nearest neighbor queries using view field - Google Patents

Method for processing nearest neighbor queries using view field Download PDF

Info

Publication number
KR101266898B1
KR101266898B1 KR1020110095076A KR20110095076A KR101266898B1 KR 101266898 B1 KR101266898 B1 KR 101266898B1 KR 1020110095076 A KR1020110095076 A KR 1020110095076A KR 20110095076 A KR20110095076 A KR 20110095076A KR 101266898 B1 KR101266898 B1 KR 101266898B1
Authority
KR
South Korea
Prior art keywords
data
node
distance
viewing angle
query
Prior art date
Application number
KR1020110095076A
Other languages
Korean (ko)
Other versions
KR20130031480A (en
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 KR1020110095076A priority Critical patent/KR101266898B1/en
Publication of KR20130031480A publication Critical patent/KR20130031480A/en
Application granted granted Critical
Publication of KR101266898B1 publication Critical patent/KR101266898B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명의 트리 구조로 저장된 데이터들 중에서 특정 질의점에 대한 최근접 데이터를 검색하는 최근접 질의 처리 방법은, 최근접 질의 처리 장치가 상위 노드가 포함하는 하위 노드 중 시야각 범위와 중첩되는 최소 경계 사각형을 가지며, 상기 최소 경계 사각형과 상기 질의점 사이의 최소 거리가 최적 거리보다 작은 하위 노드를 선택하는 하위 노드 선택 단계; 상기 선택된 하위 노드가 단말 노드가 아니면, 상기 최근접 질의 처리 장치가 상기 선택된 하위 노드를 상기 상위 노드로 설정하여 상기 하위 노드 선택 단계를 반복적으로 수행하는 단계; 상기 선택된 하위 노드가 상기 단말 노드이면, 상기 최근접 질의 처리 장치가 상기 단말 노드에 포함된 데이터 중 상기 시야각 범위 내에 존재하고 상기 데이터와 상기 질의점 사이의 거리가 가장 작은 데이터를 결과 데이터로 선택하고, 상기 결과 데이터와 상기 질의점 사이의 거리를 상기 최적 거리로 재설정하여, 상기 하위 노드 선택 단계를 반복적으로 수행하는 단말 노드 처리 단계; 및 상기 하위 노드 중 상기 최소 경계 사각형과 상기 질의점 사이의 최소 거리가 최적 거리보다 작은 하위 노드가 존재하지 않으면, 상기 최근접 질의 처리 장치가 상기 결과 데이터를 상기 최근접 데이터로 설정하는 단계를 포함한다.In the nearest query processing method of searching for the nearest data for a specific query point among the data stored in the tree structure of the present invention, the nearest query processing apparatus includes a minimum boundary rectangle in which the nearest query processing apparatus overlaps the viewing angle range among the lower nodes included in the upper node. Selecting a lower node having a minimum distance between the minimum boundary rectangle and the query point less than an optimal distance; If the selected lower node is not a terminal node, repeatedly performing the lower node selection step by setting the selected lower node as the upper node; If the selected lower node is the terminal node, the closest query processing apparatus selects data that exists within the viewing angle range among the data included in the terminal node and has the smallest distance between the data and the query point as result data. A terminal node processing step of repeatedly performing the lower node selection step by resetting the distance between the result data and the query point to the optimum distance; And setting the result data as the nearest data when there is no lower node among the lower nodes in which the minimum distance between the minimum boundary rectangle and the query point is smaller than an optimal distance. do.

Description

시야각을 이용한 최근접 질의 처리 방법{METHOD FOR PROCESSING NEAREST NEIGHBOR QUERIES USING VIEW FIELD}Nearest Query Processing Method Using View Angle {METHOD FOR PROCESSING NEAREST NEIGHBOR QUERIES USING VIEW FIELD}

본 발명은 최근접 질의 처리 방법에 관한 것으로, 더욱 상세하게는 시야각을 이용한 최근접 질의 처리 방법에 관한 것이다.
The present invention relates to a nearest query processing method, and more particularly to a nearest query processing method using a viewing angle.

최근 스마트폰의 보급화와 실시간 위치 추적 기술의 발달로 인하여 다양한 위치기반 질의에 대한 관심이 급증하고 있다. 특히, 가장 기본적인 위치기반 질의인 최근접 질의는 사용자의 현재 위치로부터 가장 가까운 데이터를 검색하는 질의로서, 다양한 분야에서 활용되고 있다.Recently, due to the popularization of smart phones and the development of real-time location tracking technology, interest in various location-based queries is rapidly increasing. In particular, the closest query, which is the most basic location-based query, is a query that retrieves the nearest data from the user's current location and is used in various fields.

최근접 질의와 관련하여, 질의점을 둘러싸고 있는 가장 가까운 다각형 형태의 데이터를 검색하는 주변 최근접 질의(Nearest Surrounder Queries)가 개시된 바 있다.[Ken C.K.Lee, "Nearest Surrounder Queries", TKDE, 2009]Regarding the nearest query, a Nearest Surrounder Queries have been disclosed that retrieve data of the closest polygonal form surrounding a query point. [Ken C.K.Lee, "Nearest Surrounder Queries", TKDE, 2009]

또한, 질의점으로부터 장애물에 가려지지 않는 위치에 있는 데이터 중 가장 가까운 데이터를 검색하는 가시 최근접 질의(Visible Nearest Neighbor Queries)도 개시된 바 있다.[S. Nutanong, E. Tanin "Visible Nearest Neighbor Queries", DASFAA, 2007]In addition, a Visible Nearest Neighbor Queries that retrieves the nearest data among the data at positions not obstructed from the query point have also been disclosed. [S. Nutanong, E. Tanin "Visible Nearest Neighbor Queries", DASFAA, 2007]

그러나 이러한 일반적인 최근접 질의는 사용자가 원하는 정보를 효과적으로 제공하지 못할 수 있다. 예를 들어, 최근 스마트폰의 등장과 함께 많은 관심을 받고 있는 증강현실 서비스의 경우, 서비스를 이용하는 사용자의 시야각이 한정되어 있으므로, 해당 시야각 외부의 데이터는 사용자의 관심에서 벗어난 데이터라고 볼 수 있으며, 결과적으로 해당 데이터에 대한 검색은 불필요하다.However, such a general nearest query may not effectively provide the information desired by the user. For example, in the case of augmented reality service that has received a lot of attention with the recent appearance of the smart phone, the viewing angle of the user using the service is limited, so the data outside the viewing angle may be regarded as out of the interest of the user. As a result, searching for the data is unnecessary.

따라서 이러한 증강현실 서비스를 비롯하여, 사용자의 시야각이 존재하는 다양한 애플리케이션에서 사용자의 시야각 내에 위치하는 가장 가까운 데이터를 검색할 수 있는 새로운 질의가 필요하다.
Therefore, such augmented reality service, a new query that can retrieve the nearest data located within the user's field of view in various applications where the user's field of view exists.

본 발명은 전술한 문제점을 해결하기 위한 것으로서, 사용자의 시야각이 주어 졌을 때, 사용자가 원하는 시야각 내의 정보를 효과적으로 제공하는 것을 일 목적으로 한다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems, and an object of the present invention is to effectively provide information within a desired viewing angle when a viewing angle of a user is given.

또한, 본 발명은 질의 처리에 필요한 노드만을 선택하는 방법을 제공함으로써, 질의 처리의 효율성을 높이는 것을 다른 목적으로 한다.Another object of the present invention is to improve the efficiency of query processing by providing a method of selecting only nodes necessary for query processing.

본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시 예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.
The objects of the present invention are not limited to the above-mentioned objects, and other objects and advantages of the present invention, which are not mentioned above, can be understood by the following description, and more clearly by the embodiments of the present invention. It will also be readily apparent that the objects and advantages of the invention may be realized and attained by means of the instrumentalities and combinations particularly pointed out in the appended claims.

이러한 목적을 달성하기 위한 본 발명은, 트리 구조로 저장된 데이터들 중에서 특정 질의점에 대한 최근접 데이터를 검색하는 최근접 질의 처리 방법에 있어서, 최근접 질의 처리 장치가 상위 노드가 포함하는 하위 노드 중 시야각 범위와 중첩되는 최소 경계 사각형을 가지며, 상기 최소 경계 사각형과 상기 질의점 사이의 최소 거리가 최적 거리보다 작은 하위 노드를 선택하는 하위 노드 선택 단계; 상기 선택된 하위 노드가 단말 노드가 아니면, 상기 최근접 질의 처리 장치가 상기 선택된 하위 노드를 상기 상위 노드로 설정하여 상기 하위 노드 선택 단계를 반복적으로 수행하는 단계; 상기 선택된 하위 노드가 상기 단말 노드이면, 상기 최근접 질의 처리 장치가 상기 단말 노드에 포함된 데이터 중 상기 시야각 범위 내에 존재하고 상기 데이터와 상기 질의점 사이의 거리가 가장 작은 데이터를 결과 데이터로 선택하고, 상기 결과 데이터와 상기 질의점 사이의 거리를 상기 최적 거리로 재설정하여, 상기 하위 노드 선택 단계를 반복적으로 수행하는 단말 노드 처리 단계; 및 상기 하위 노드 중 상기 최소 경계 사각형과 상기 질의점 사이의 최소 거리가 최적 거리보다 작은 하위 노드가 존재하지 않으면, 상기 최근접 질의 처리 장치가 상기 결과 데이터를 상기 최근접 데이터로 설정하는 단계를 포함한다.
In order to achieve the above object, the present invention provides a nearest query processing method for retrieving nearest data for a specific query point among data stored in a tree structure. Selecting a lower node having a minimum boundary rectangle overlapping a viewing angle range and having a minimum distance between the minimum boundary rectangle and the query point less than an optimal distance; If the selected lower node is not a terminal node, repeatedly performing the lower node selection step by setting the selected lower node as the upper node; If the selected lower node is the terminal node, the closest query processing apparatus selects data that exists within the viewing angle range among the data included in the terminal node and has the smallest distance between the data and the query point as result data. A terminal node processing step of repeatedly performing the lower node selection step by resetting the distance between the result data and the query point to the optimum distance; And setting the result data as the nearest data when there is no lower node among the lower nodes in which the minimum distance between the minimum boundary rectangle and the query point is smaller than an optimal distance. do.

전술한 바와 같은 본 발명에 의하면, 사용자의 시야각이 주어졌을 때, 사용자가 원하는 시야각 내의 정보를 효과적으로 제공할 수 있다.According to the present invention as described above, given the viewing angle of the user, it is possible to effectively provide information within the viewing angle desired by the user.

또한, 본 발명은 질의 처리에 필요한 노드만을 선택하는 방법을 제공함으로써, 질의 처리의 효율성을 높일 수 있다.
In addition, the present invention can improve the efficiency of query processing by providing a method of selecting only nodes necessary for query processing.

도 1은 시야각을 이용한 최근접 질의의 예를 설명하기 위한 도면,
도 2는 시야각 범위를 설명하기 위한 도면,
도 3은 최소 경계 사각형이 시야각 범위와 중첩되는 경우를 설명하기 위한 도면,
도 4는 본 발명의 일 실시 예에 따른 시야각을 이용한 최근접 질의 처리 방법을 설명하기 위한 흐름도,
도 5는 본 발명의 일 실시 예에 따른 시야각을 이용한 최근접 질의 처리 방법을 보다 구체적으로 설명하는 흐름도,
도 6은 R*-tree 색인 구조를 보여주는 예시도,
도 7은 본 발명의 일 실시 예에 따른 시야각을 이용한 최근접 질의 처리 장치의 구성도,
도 8은 본 발명의 일 실시 예에 따른 시야각을 이용한 최근접 질의 처리 방법을 구현하는 알고리즘을 나타내는 도면,
도 9는 본 발명의 일 실시 예에 따른, 노드 당 엔트리 수와 k 값의 변화에 따른 노드 접근 횟수를 나타내는 그래프,
도 10은 본 발명의 일 실시 예에 따른, 데이터 개수와 k 값의 변화에 따른 노드 접근 횟수를 나타내는 그래프이다.
1 is a view for explaining an example of a nearest query using a viewing angle;
2 is a view for explaining a viewing angle range;
3 is a diagram for explaining a case where a minimum boundary rectangle overlaps a viewing angle range;
4 is a flowchart illustrating a nearest query processing method using a viewing angle according to an embodiment of the present invention;
5 is a flowchart illustrating a method of processing a nearest query using a viewing angle according to an embodiment of the present invention in more detail.
6 is an exemplary view showing an R * -tree index structure;
7 is a block diagram of a nearest query processing apparatus using a viewing angle according to an embodiment of the present invention;
8 is a diagram illustrating an algorithm for implementing a nearest query processing method using a viewing angle according to an embodiment of the present invention;
9 is a graph showing the number of entry of nodes according to the change in the number of entries and the value of k according to an embodiment of the present invention;
10 is a graph illustrating the number of node accesses according to the change in the number of data and the value of k according to an embodiment of the present invention.

전술한 목적, 특징 및 장점은 첨부된 도면을 참조하여 상세하게 후술되며, 이에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 상세한 설명을 생략한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시 예를 상세히 설명하기로 한다. 도면에서 동일한 참조부호는 동일 또는 유사한 구성요소를 가리키는 것으로 사용된다.
The above and other objects, features, and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings, which are not intended to limit the scope of the present invention. In the following description, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the drawings, the same reference numerals are used to denote the same or similar elements.

먼저, 도 1 내지 도 3을 참조하여 본 발명에서 사용되는 용어의 정의와 데이터 색인 구조에 대해 설명한다.First, the definition of terms used in the present invention and the data index structure will be described with reference to FIGS. 1 to 3.

도 1은 시야각을 이용한 최근접 질의의 예를 설명하기 위한 도면이다.1 is a diagram illustrating an example of a nearest query using a viewing angle.

도 1을 참조하여 살펴보면, 데이터들의 집합 D={d1, d2, ..., d6}가 주어진 상황에서, 사용자의 위치 p 및 시야각 θ가 주어졌을 때, 질의 q=(p,θ)이다. 이때, 사용자의 위치 p와 가장 가까운 데이터는 d1이나, d1은 시야각 외부에 존재하므로 시야각 범위 내에서 사용자의 위치와 가장 가까운 d2가 사용자가 원하는 데이터가 될 것이다. 본 발명은 위와 같은 상황에서, 사용자의 시야각 범위 내에서 사용자에 가장 근접한 데이터를 검색함으로써, 사용자가 원하는 정보를 효과적으로 제공할 수 있다.
Referring to FIG. 1, given a set of data D = {d 1 , d 2 ,..., D 6 }, when the user's position p and the viewing angle θ are given, the query q = (p, θ )to be. At this time, the data closest to the user's position p is d 1, but since d 1 exists outside the viewing angle, d 2 closest to the user's position within the viewing angle range will be the data desired by the user. In the above situation, by searching for the data closest to the user within the viewing angle range of the user, it is possible to effectively provide the information desired by the user.

도 2는 시야각 범위를 설명하기 위한 도면이다.2 is a view for explaining a viewing angle range.

도 2를 참조하여 살펴보면, 데이터의 집합 D={d1, d2, ..., d|D|}에 대한 질의 q=(p, θ)에서, p=(x,y)는 질의점을 나타내며, θ=(

Figure 112012108710442-pat00001
,
Figure 112012108710442-pat00002
)는 질의 시야각 범위를 나타낸다.
Figure 112012108710442-pat00003
는 시야각 범위가 시작되는 각,
Figure 112012108710442-pat00004
는 시야각 범위가 끝나는 각이다.Referring to FIG. 2, the data set D = {d 1 , d 2 , ..., d | D | In the query q = (p, θ) for}, p = (x, y) represents the query point and θ = (
Figure 112012108710442-pat00001
,
Figure 112012108710442-pat00002
) Represents the viewing angle range of the query.
Figure 112012108710442-pat00003
Is the angle at which the viewing angle range begins,
Figure 112012108710442-pat00004
Is the angle at which the viewing angle range ends.

도 2를 참조하여, 본 발명의 시야각을 이용한 최근접 질의의 정의를 수식을 통해 설명하면 다음과 같다.Referring to Figure 2, the definition of the nearest query using the viewing angle of the present invention will be described with the following equation.

질의 시야각 범위 내에 존재하는 데이터의 집합을 VFD(q)(⊆D)라고 하면, VFD(q)는 다음의 [수학식 1]과 같이 나타낼 수 있다.If the set of data existing within the query viewing angle range is VFD (q) (⊆D), VFD (q) can be expressed as Equation 1 below.

Figure 112011073397409-pat00005
Figure 112011073397409-pat00005

상기 [수학식 1]에서

Figure 112012108710442-pat00006
는 질의점 p를 시작점으로 하고, 데이터 d의 위치를 끝점으로 하는 벡터
Figure 112012108710442-pat00007
와 x축 사이의 각을 나타낸다. 즉,
Figure 112012108710442-pat00008
는 다음의 [수학식 2]와 같이 정의할 수 있다.In [Equation 1]
Figure 112012108710442-pat00006
Is a vector whose starting point is the query point p and whose position is the data d.
Figure 112012108710442-pat00007
And the angle between and the x-axis. In other words,
Figure 112012108710442-pat00008
May be defined as in Equation 2 below.

Figure 112011073397409-pat00009
Figure 112011073397409-pat00009

그리고 본 발명에 의한 질의 q의 결과 r은 아래의 [수학식 3]과 같은 조건을 만족한다.In addition, the result r of the query q according to the present invention satisfies the condition shown in Equation 3 below.

Figure 112012108710442-pat00010
Figure 112012108710442-pat00010

상기 [수학식 3]에서, dist(a,b)는 점 a와 b 사이의 유클리드 거리를 의미하므로, 질의 q의 결과 r은 질의점의 시야각 범위 내의 데이터인 VFD(q) 중에서, 질의점에 가장 가까운 데이터를 의미한다.
In Equation 3, since dist (a, b) represents the Euclidean distance between points a and b, the result r of the query q is the VFD (q) that is the data within the viewing angle range of the query point. It means the nearest data.

도 3은 최소 경계 사각형이 시야각 범위와 중첩되는 경우를 설명하기 위한 도면이다.3 is a diagram for explaining a case where a minimum boundary rectangle overlaps a viewing angle range.

도 3을 참조하여 살펴보면, 먼저 n차원의 공간 데이터에서 최소 경계 사각형이 꼭지점들의 집합 M={m1, m2,..., m2n}으로 이루어져 있을 때, 질의점 p와 최소 경계 사각형 사이의 최소 각(min_angle)과 최대 각(max_angle)은 아래의 [수학식 4]와 같이 정의할 수 있다.Referring to FIG. 3, first, when the minimum boundary rectangle consists of a set of vertices M = {m 1 , m 2 , ..., m 2n } in n-dimensional spatial data, between the query point p and the minimum boundary rectangle The minimum angle (min_angle) and the maximum angle (max_angle) of may be defined as shown in Equation 4 below.

Figure 112011073397409-pat00011
Figure 112011073397409-pat00011

이때, 최소 경계 사각형이 시야각 범위와 중첩되는 경우로서, 도 4에 도시된 바와 같은 네 가지 경우를 생각할 수 있다.In this case, as the case where the minimum boundary rectangle overlaps the viewing angle range, four cases as shown in FIG. 4 may be considered.

case 1에 나타난 바와 같이, 최소 경계 사각형의 최소각이 시야각 범위가 시작되는 각보다 작고, 최소 경계 사각형의 최대각이 시야각 범위가 끝나는 각보다 작은 경우, 최소 경계 사각형의 왼쪽 위의 빗금친 영역이 중첩되는 영역임을 알 수 있다. 즉, 빗금으로 도시된 영역에 존재하는 데이터만이 질의 처리에 이용되는 데이터이다.As shown in case 1, if the minimum angle of the minimum bounding rectangle is smaller than the angle at which the viewing angle range begins, and the maximum angle of the minimum bounding rectangle is smaller than the angle at which the viewing angle range ends, the hatched area in the upper left corner of the minimum bounding rectangle It can be seen that the overlapping areas. In other words, only the data existing in the area shown by the hatched line is the data used for query processing.

case 2는 최소 경계 사각형의 최소각이 시야각 범위가 시작되는 각보다 크고, 최소 경계 사각형의 최대각도 시야각 범위가 끝나는 각보다 큰 경우이다. 이 경우, 최소 경계 사각형에서 시야각 범위가 끝나는 각의 아래쪽 빗금친 영역만이 중첩된다.Case 2 is the case where the minimum angle of the minimum bounding rectangle is greater than the starting angle of the viewing angle range and the maximum angle of the minimum bounding rectangle is greater than the ending angle of the viewing angle range. In this case, only the bottom hatched area of the end of the viewing angle range in the minimum bounding rectangle overlaps.

case 3은 시야각 범위가 최소 경계 사각형의 최대, 최소각으로 인해 형성되는 최소 경계 사각형의 각(angle) 범위 안쪽에 존재하는 경우이다. 이러한 경우에는 시야각 범위에 속하는 모든 데이터가 질의 처리에 이용될 수 있다.Case 3 is a case where the viewing angle range is inside the angle range of the minimum boundary rectangle formed by the maximum and minimum angles of the minimum boundary rectangle. In this case, all data belonging to the viewing angle range can be used for query processing.

case 4는 시야각 범위가 최소 경계 사각형의 최대, 최소각으로 인해 형성되는 각 범위 바깥쪽에 존재하는 경우로, 최소 경계 사각형 전체가 시야각 범위에 포함된다. 따라서 최소 경계 사각형 내부에 존재하는 모든 데이터는 질의 처리에 이용될 수 있다.
Case 4 is a case where the viewing angle range is outside the range formed by the maximum and minimum angles of the minimum boundary rectangle, and the entire minimum boundary rectangle is included in the viewing angle range. Therefore, all data existing inside the minimum bounding rectangle can be used for query processing.

본 발명은 R-tree 계열의 데이터 색인 구조를 이용하고 있다. R-tree는 다차원의 공간 데이터를 저장하는 색인이다. 이 구조는 공간을 최소 경계 사각형(MBR, Minimum Bounding Rectangle)들로 분할하여 저장한다. 이러한 최소 경계 사각형은 서로 겹칠 수 있으며, 상위 레벨의 최소 경계 사각형은 하위 레벨의 최소 경계 사각형을 포함하는 계층적인 트리 구조로 구성되어 있다. R-tree 계열의 각 노드는 해당 노드의 최소 경계 사각형과, 미리 정의된 범위 내의 자식 노드를 가리키는 포인터를 엔트리로 가진다. 다만, 본 발명의 명세서에서는 설명을 용이하게 하기 위하여, 엔트리를 갖고 있는 노드를 중심으로 발명 내용을 기재하기로 한다. 본 명세서에서, 노드와 상위노드, 엔트리와 하위노드는 혼용하여 사용된다. 또한, 설명을 용이하게 하기 위해, 최소 경계 사각형과 질의점 사이의 최소 거리를 "MINDIST"로 지칭한다.
The present invention utilizes an R-tree data index structure. R-trees are indexes that store multidimensional spatial data. This structure divides and stores space into minimum bounding rectangles (MBR). These minimum bounding rectangles can overlap each other, and the uppermost minimum bounding rectangle has a hierarchical tree structure that includes the lowermost bounding rectangle. Each node of the R-tree series has an entry as the minimum bounding rectangle of the node and a pointer to a child node within a predefined range. However, in the specification of the present invention, the contents of the invention will be described based on the node having an entry for easy explanation. In this specification, a node and a parent node, an entry and a child node are used interchangeably. Also, for ease of explanation, the minimum distance between the minimum bounding rectangle and the query point is referred to as "MINDIST".

이하에서는, 도 4 내지 도 6을 참조하여, 본 발명의 일 실시 예에 따른 시야각을 이용한 최근접 질의 처리 방법을 설명한다.Hereinafter, the nearest query processing method using the viewing angle according to an embodiment of the present invention will be described with reference to FIGS. 4 to 6.

도 4는 본 발명의 일 실시 예에 따른 시야각을 이용한 최근접 질의 처리 방법을 설명하기 위한 흐름도이다. 먼저, 하위 노드 선택 단계에서는 상위 노드가 포함하는 하위 노드 중 시야각 범위와 중첩되는 최소 경계 사각형을 갖고, MINDIST가 최적 거리보다 작은 하위 노드를 선택한다(410, 415). 여기서, 최적 거리는 노드 및 데이터 선택의 기준으로 사용되는 거리정보로서, 최초에 무한대로 설정될 수 있으며, 이후 단말 노드에 포함된 데이터와 질의점 사이의 거리에 의해 갱신된다.4 is a flowchart illustrating a method of processing a nearest neighbor query using a viewing angle according to an embodiment of the present invention. First, in the lower node selection step, among the lower nodes included in the upper node, a lower boundary rectangle overlapping the viewing angle range is selected, and MINDIST selects the lower node smaller than the optimum distance (410 and 415). Here, the optimum distance is distance information used as a criterion for selecting a node and data, and may be initially set to infinity, and then updated by a distance between data included in the terminal node and a query point.

다음으로, 선택된 하위 노드가 단말 노드인지 여부를 판단한다(430).Next, it is determined whether the selected lower node is a terminal node (430).

만약, 선택된 하위 노드가 단말 노드가 아니면, 선택된 하위 노드를 상위 노드로 설정(450)하여 하위 노드 선택 단계(410)를 반복적으로 수행한다. 즉, 단말 노드가 될 때까지 하위 노드가 시야각 범위와 중첩되는 최소 경계 사각형을 갖는지 여부와, 하위 노드의 MINDIST가 최적 거리보다 작은지 여부를 계속해서 판단함으로써, 하위 노드로의 탐색을 진행할지 여부를 결정한다.If the selected lower node is not a terminal node, the selected lower node is set as the upper node 450 and the lower node selecting step 410 is repeatedly performed. That is, whether to proceed to search for the lower node by continuously determining whether the lower node has a minimum boundary rectangle overlapping the viewing angle range until the terminal node and whether the lower node's MINDIST is smaller than the optimum distance. Determine.

만약, 선택된 하위 노드가 단말 노드인지 판단(430)한 결과, 선택된 하위 노드가 단말 노드이면, 해당 노드에 포함된 데이터 중 시야각 범위 내에 존재하며, 데이터와 질의점 사이의 거리가 가장 작은 데이터를 결과데이터로 선택하고, 결과데이터와 질의점 사이의 거리를 최적 거리로 재설정한다(470).If it is determined whether the selected lower node is the terminal node (430), if the selected lower node is the terminal node, it exists within the viewing angle range among the data included in the node, and results in data having the smallest distance between the data and the query point. The data is selected and the distance between the result data and the query point is reset to the optimum distance (470).

단말 노드는 데이터 정보를 포함하고 있으므로, 단말 노드에 도달하면 해당 노드가 포함하고 있는 데이터 중 시야각 범위 내에 존재하면서도 질의점에 가장 근접한 데이터를 검색한다. 그리고 위 두 조건을 만족하는 결과데이터와 질의점 사이의 거리를 최적 거리로 재설정함으로써, 이후의 탐색에 갱신된 최적 거리가 이용될 수 있도록 한다. 그리고 재설정된 최적 거리를 이용하여, 하위 노드 선택 단계(410, 415)를 반복적으로 수행한다. 이때, 단말 노드까지 탐색된 이후이므로, 임의의 상위 노드에 대하여 하위 노드 선택 단계(410, 415)를 반복할 수 있다.Since the terminal node includes data information, when the terminal node reaches the terminal node, the terminal node searches for data closest to the query point while existing within the viewing angle range among the data included in the node. In addition, by resetting the distance between the result data satisfying the above two conditions and the query point to the optimum distance, the updated optimal distance can be used for subsequent searching. The lower node selection steps 410 and 415 are repeatedly performed using the reset optimum distance. In this case, since the terminal node has been searched, the lower node selection steps 410 and 415 may be repeated for any higher node.

만일, 시야각 범위와 중첩되는 최소 경계 사각형을 갖는 하위 노드의 MINDIST가 최적 거리보다 큰 경우에는, 위 단계 470에서 선택된 결과데이터가 최근접 데이터가 되고(420), 해당 계층에서의 재귀적 수행은 종료된다.
If the MINDIST of the lower node having the minimum bounding rectangle overlapping the viewing angle range is larger than the optimum distance, the result data selected in step 470 becomes the nearest data (420), and the recursive performance in the layer is terminated. do.

이하에서는 도 5 및 도 6을 참조하여 시야각을 이용한 최근접 질의 처리 방법에 관한 구체적인 예를 설명한다. 도 5는 본 발명의 일 실시 예에 따른 시야각을 이용한 최근접 질의 처리 방법을 보다 구체적으로 설명하는 흐름도이며, 도 6은 R*-tree 색인 구조를 보여주는 예시도이다. 후술하는 질의 처리 방법의 실시 예에서, 도 6에 도시된 형태로 데이터가 저장되어있다고 가정한다.Hereinafter, a specific example of a closest query processing method using a viewing angle will be described with reference to FIGS. 5 and 6. 5 is a flowchart illustrating a method of processing a nearest query using a viewing angle according to an embodiment of the present invention in detail. FIG. 6 is an exemplary view illustrating an R * -tree index structure. In the following example of the query processing method, it is assumed that the data is stored in the form shown in FIG.

도 5를 참조하여 살펴보면, 상위 노드가 포함하는 하위 노드가 시야각 범위와 중첩되는 최소 경계 사각형을 갖는지 판단(510)하며, 판단 결과, 하위 노드가 시야각 범위와 중첩되는 최소 경계 사각형을 갖지 않는 경우, 하위 노드를 삭제(520)한다. 이처럼 초기 단계에서 시야각 범위에 속하지 않는 노드를 삭제함으로써, 검색의 대상이 되는 노드의 개수를 줄일 수 있다.Referring to FIG. 5, in operation 510, it is determined whether a lower node included in an upper node has a minimum boundary rectangle overlapping a viewing angle range, and as a result of the determination, the lower node does not have a minimum boundary rectangle overlapping a viewing angle range. The lower node is deleted (520). As such, by deleting nodes that do not belong to the viewing angle range in the initial stage, the number of nodes to be searched can be reduced.

판단 결과, 하위 노드가 시야각 범위와 중첩되는 최소 경계 사각형을 갖는 경우에는, 위 하위 노드의 최소 경계 사각형과 질의점 사이의 거리에 따라 하위 노드를 정렬하여 리스트를 생성할 수 있다(530).As a result of the determination, when the lower node has the minimum boundary rectangle overlapping the viewing angle range, the list may be generated by sorting the lower nodes according to the distance between the minimum boundary rectangle of the lower node and the query point (530).

도 6을 참조하여 위 510 내지 530 단계를 설명하면, 먼저 질의 처리를 위해 최적 거리를 무한대로 설정하고, 루트 노드부터 검색을 시작한다. 그리고 루트 노드에 포함된 N1, N2의 최소 경계 사각형이 시야각 범위와 중첩되는지 여부를 판단(510)한다. 만약, N2의 최소 경계 사각형이 시야각 범위와 중첩되지 않는 경우, N2를 삭제한다(520). N2의 최소 경계 사각형은 N5, N6의 최소 경계 사각형을 포함하므로, N2의 최소 경계 사각형이 시야각 범위와 중첩되지 않는다면(도 3의 어떤 경우에도 해당 되지 않는다면) 하위 노드에 대해서는 탐색할 필요가 없기 때문이다. 다음으로, 시야각 범위와 중첩되는 최소 경계 사각형을 갖는 하위 노드를 최소 경계 사각형과 질의점 사이의 거리에 따라 정렬하여 리스트를 생성(530)한다. 만일, N1, N2의 최소 경계 사각형이 모두 시야각 범위와 중첩되고, N1의 MINDIST가 N2의 MINDIST보다 작은 경우, N1, N2의 순서로 리스트를 생성(530)할 수 있다. 본 발명은 최근접 질의 처리 방법에 관한 것이므로, 리스트는 오름차순으로 정렬되는 것이 바람직할 것이나, 이에 한정되는 것은 아니다.Referring to FIG. 6, the steps 510 to 530 will be described. First, the optimum distance is infinitely set for query processing, and the search is started from the root node. In operation 510, it is determined whether the minimum boundary rectangles of N1 and N2 included in the root node overlap the viewing angle range. If the minimum boundary rectangle of N2 does not overlap with the viewing angle range, N2 is deleted (520). Since the minimum bounding rectangle of N2 includes the minimum bounding rectangles of N5 and N6, since the minimum bounding rectangle of N2 does not overlap with the viewing angle range (unless in any case in FIG. 3), there is no need to search for child nodes. to be. Next, the list is generated by sorting the lower node having the minimum boundary rectangle overlapping the viewing angle range according to the distance between the minimum boundary rectangle and the query point. If all of the minimum boundary rectangles of N1 and N2 overlap the viewing angle range, and MINDIST of N1 is smaller than MINDIST of N2, the list may be generated in the order of N1 and N2 (530). Since the present invention relates to the nearest query processing method, it is preferable that the list is sorted in ascending order, but is not limited thereto.

다음으로, 리스트에 포함된 하위 노드의 MINDIST가 최적 거리보다 작은지 여부를 판단(550)한다. 전술한 예시에서, 최적 거리의 초기값을 무한대로 설정했으므로, 바로 다음 단계로 진행한다. 즉, 리스트에 포함된 하위 노드가 단말 노드인지 판단(570)한다. 만일, 리스트에 포함된 하위 노드가 단말 노드가 아니면, 해당 하위 노드를 상위 노드로 설정(575)한 후에, 처음 단계(510)를 다시 수행한다.Next, it is determined whether MINDIST of a lower node included in the list is smaller than an optimum distance (550). In the above example, since the initial value of the optimum distance is set to infinity, the process proceeds directly to the next step. That is, it is determined whether the lower node included in the list is the terminal node (570). If the lower node included in the list is not the terminal node, after setting the lower node as the upper node (575), the first step 510 is performed again.

만일, 리스트에 포함된 하위 노드가 단말 노드라면, 단말 노드에 포함된 데이터 중 시야각 범위 내에 존재하며, 데이터와 질의점 사이의 거리가 가장 작은 데이터를 결과 데이터로 선택하고, 결과 데이터와 질의점 사이의 거리를 최적 거리로 재설정하는 단말 노드 처리 단계를 수행한다(580).If the lower node included in the list is the terminal node, data that is within the viewing angle range among the data included in the terminal node and has the smallest distance between the data and the query point is selected as the result data, and the result data and the query point are included. The terminal node processing step of resetting the distance to the optimal distance is performed (580).

보다 구체적으로, 위 단말 노드 처리 단계는 다음과 같이 수행될 수 있다. 데이터가 시야각 범위 내에 존재하고, 데이터와 질의점 사이의 거리가 최적 거리보다 작으면, 데이터와 질의점 사이의 거리를 최적 거리로 재설정하는 데이터 처리 단계를 수행(580)한다. 이때, 데이터 처리 단계는 단말 노드에 포함된 모든 데이터에 대해 수행된다(590). 즉, 단말 노드에 포함된 데이터 중 데이터와 질의점 사이의 거리가 가장 작은 데이터는, 단말 노드에 포함된 모든 데이터에 대해 데이터 처리 단계를 수행하여 최종적으로 결과데이터로 선택된 데이터일 수 있다.More specifically, the terminal node processing step may be performed as follows. If the data is within the viewing angle range and the distance between the data and the query point is less than the optimal distance, a data processing step of resetting the distance between the data and the query point to the optimal distance is performed 580. At this time, the data processing step is performed for all data included in the terminal node (590). That is, the data having the smallest distance between the data and the query point among the data included in the terminal node may be data finally selected as the result data by performing a data processing step on all data included in the terminal node.

예를 들어, 위 550 내지 590의 과정을 설명하면, 루트 노드의 하위 노드인 N1의 MINDIST는 무한대로 설정된 최적 거리보다 작으므로, N1이 단말 노드인지 여부를 판단(570)한다. 그러나 N1은 비단말 노드이므로, N1을 상위 노드로 설정하여, 처음 단계(510)를 수행한다. 즉, N1이 포함하는 하위 노드 N3, N4가 시야각 범위와 중첩되는 최소 경계 사각형을 갖는지 여부를 판단(510)한다.For example, when the processes of 550 to 590 are described above, since MINDIST of N1, which is a lower node of the root node, is smaller than the optimal distance set to infinity, it is determined whether N1 is a terminal node (570). However, since N1 is a non-terminal node, the first step 510 is performed by setting N1 as a higher node. That is, it is determined whether the lower nodes N3 and N4 included in N1 have a minimum boundary rectangle overlapping the viewing angle range (510).

만약, 위 판단 결과 N4가 삭제(520)되고, N3가 리스트에 포함(530)된다면 최적 거리는 아직 갱신된 바 없으므로, 단계 550을 통과하여, N3가 단말 노드인지 여부를 판단하게 될 것이다(570). 여기서, N3는 최하위 계층의 단말 노드이므로, N3에 포함된 모든 데이터에 대해 데이터 처리 단계를 수행한다. 즉, d1이 시야각 범위 내에 존재한다고 가정하면, d1과 질의점 사이의 거리는 최적 거리의 초기값인 무한대보다는 작을 것이므로, d1과 질의점 사이의 거리가 최적 거리로 갱신된다. 또한, d1은 결과데이터로 선택(580)된다. 데이터 처리 단계는 단말 노드에 포함된 모든 데이터에 대해 수행(590)되므로, d2가 시야각 범위 내에 존재하는지, d2와 질의점 사이의 거리가 재설정된 최적 거리인 d1보다 작은지 여부를 판단한다. 만약, d2와 질의점 사이의 거리가 d1보다 작다면, d2과 질의점 사이의 거리를 최적 거리로 재설정한다. 그리고 d2가 다시 결과데이터로 선택된다.If N4 is deleted (520) and N3 is included in the list (530), the optimal distance has not been updated yet, and thus, it is determined whether N3 is the terminal node (570). . Here, since N3 is a terminal node of the lowest layer, the data processing step is performed on all data included in N3. That is, assuming that d1 exists within the viewing angle range, the distance between d1 and the query point will be smaller than infinity, which is the initial value of the optimal distance, so that the distance between d1 and the query point is updated to the optimal distance. D1 is also selected 580 as the result data. Since the data processing step is performed 590 on all data included in the terminal node, it is determined whether d2 exists within the viewing angle range and whether the distance between d2 and the query point is smaller than the reset optimal distance d1. If the distance between d2 and the query point is less than d1, the distance between d2 and the query point is reset to the optimal distance. D2 is again selected as the result data.

위 550 내지 590의 단계는, 리스트에 포함된 하위 노드 전체에 대해서 수행될 수 있다. 즉, 최적 거리를 재설정한 후에 리스트에 포함된 다른 하위 노드의 MINDIST에 대해서, 다른 하위 노드의 MINDIST가 재설정된 최적 거리보다 작은지 여부를 판단한다(550). 전술한 바와 같이, 리스트에는 하위 노드가 MINDIST를 기준으로 오름차순으로 정렬되어 있을 수 있다. 이 경우, 더 근접한 데이터를 포함할 가능성이 큰 노드부터 순차적으로 검색함으로써, 탐색하는 시간을 줄일 수 있다.Steps 550 to 590 may be performed for all the lower nodes included in the list. That is, after resetting the optimal distance, it is determined whether MINDIST of the other lower node included in the list is smaller than the reset optimal distance (550). As described above, the lower nodes may be arranged in an ascending order based on MINDIST. In this case, the searching time can be reduced by sequentially searching from the node that is more likely to include the closer data.

예를 들어, 리스트에 N1, N2가 포함된 경우, N1에 포함된 데이터 중에서 d2가 결과데이터로 선택되었다면, N2의 MINDIST와 재설정된 최적 거리 즉, d2와 질의점 사이의 거리를 비교한다(550). N2의 MINDIST가 d2와 질의점 사이의 거리보다 크다면, N2는 탐색에서 제외되고, 결과 데이터인 d2가 최근접데이터가 될 것이다(560). 리스트를 오름차순으로 정렬한 경우, 어떤 하위 노드의 MINDIST가 최적 거리보다 크다면 리스트의 차순위 하위 노드에 대해서는 마찬가지로 탐색할 필요가 없어질 것이다. 따라서 탐색 시간이 크게 줄어들 수 있다.
For example, if the list includes N1 and N2, if d2 is selected as the result data among the data included in N1, the distance between the MINDIST of N2 and the reset optimal distance, that is, the distance between d2 and the query point is compared (550). ). If the MINDIST of N2 is greater than the distance between d2 and the query point, N2 is excluded from the search and the resulting data d2 will be the nearest data (560). If the list is sorted in ascending order, there will be no need to search for the next lowest node in the list if the MINDIST of any subnode is greater than the optimal distance. Therefore, the search time can be greatly reduced.

도 7은 본 발명의 일 실시 예에 따른 시야각을 이용한 최근접 질의 처리 장치의 구성도이다.7 is a block diagram of the nearest query processing apparatus using a viewing angle according to an embodiment of the present invention.

도 7을 참조하여 살펴보면, 본 발명의 일 실시 예에 따른 시야각을 이용한 최근접 질의 처리 장치는 하위 노드 선택부(710), 노드 판단부(730), 단말 노드 처리부(750)를 포함한다. 이때, 하위 노드 선택부(710)는 필터링부(713), 리스트 생성부(715), 최소 거리 판단부(717)를 포함할 수 있다.Referring to FIG. 7, an apparatus for processing a nearest neighbor query using a viewing angle according to an embodiment of the present invention includes a lower node selector 710, a node determiner 730, and a terminal node processor 750. In this case, the lower node selector 710 may include a filter 713, a list generator 715, and a minimum distance determiner 717.

하위 노드 선택부(710)는 상위 노드가 포함하는 하위 노드 중 시야각 범위와 중첩되는 최소 경계 사각형을 가지며, 최소 경계 사각형과 질의점 사이의 최소 거리가 최적 거리보다 작은 하위 노드를 선택한다.The lower node selecting unit 710 has a minimum boundary rectangle overlapping the viewing angle range among the lower nodes included in the upper node, and selects a lower node having a minimum distance between the minimum boundary rectangle and the query point smaller than the optimal distance.

이때, 하위 노드 선택부(710)에 포함된 필터링부(713)는 상위 노드에 포함된 하위 노드가 시야각 범위와 중첩되는 최소 경계 사각형을 갖는지 여부를 판단하여, 하위 노드가 시야각 범위와 중첩되는 최소 경계 사각형을 갖지 않는 경우, 해당 노드를 삭제한다. 즉, 불필요한 노드를 검색에서 제외하는 역할을 한다.In this case, the filtering unit 713 included in the lower node selecting unit 710 determines whether the lower node included in the upper node has a minimum boundary rectangle overlapping the viewing angle range, and thus the minimum node overlapping the viewing angle range. If there is no bounding rectangle, delete the node. In other words, it excludes unnecessary nodes from the search.

리스트 생성부(715)는 필터링부(713)에서 삭제되지 않은 하위 노드들, 즉 시야각 범위와 중첩되는 최소 경계 사각형을 갖는 하위노드를, 하위 노드의 최소 경계 사각형과 질의점 사이의 거리(MINDIST)에 따라 정렬하여 리스트를 생성한다. 이때, 하위 노드의 MINDIST에 따라 오름차순으로 정렬하는 것이 바람직 하나, 이에 한정되는 것은 아니다.The list generator 715 selects a lower node that is not deleted by the filtering unit 713, that is, a lower node having a minimum boundary rectangle overlapping the viewing angle range, and the distance between the minimum boundary rectangle of the lower node and the query point (MINDIST). Create a list by sorting according to At this time, it is preferable to sort in ascending order according to the MINDIST of the lower node, but is not limited thereto.

최소 거리 판단부(717)는 리스트에 포함된 하위 노드의 MINDIST가 최적 거리보다 작은지 여부를 판단한다. 최적 거리의 초기값은 무한대일 수 있으며, 사용자가 미리 설정한 값일 수 있다.The minimum distance determination unit 717 determines whether the MINDIST of the lower nodes included in the list is smaller than the optimum distance. The initial value of the optimum distance may be infinity and may be a value preset by the user.

노드 판단부(730)는 선택된 하위 노드, 즉, 시야각 범위와 중첩되는 최소 경계 사각형을 갖고, MINDIST가 최적 거리보다 작다고 판단된 하위노드가 단말 노드인지 여부를 판단한다.The node determining unit 730 determines whether the selected lower node, that is, the lower node having the minimum boundary rectangle overlapping the viewing angle range and the MINDIST determined to be smaller than the optimum distance is the terminal node.

여기서, 하위 노드가 단말 노드가 아닌 경우에는, 해당 노드는 상위 노드로 설정되어 하위노드 선택부(710), 보다 구체적으로는 필터링부(713)에 다시 입력된다. 만일, 하위 노드가 단말 노드인 경우에는, 해당 노드는 단말 노드 처리부(750)로 입력된다.Here, when the lower node is not a terminal node, the node is set as an upper node and is input again to the lower node selector 710, more specifically, the filtering unit 713. If the lower node is a terminal node, the node is input to the terminal node processing unit 750.

단말 노드 처리부(750)는 단말 노드에 포함된 데이터 중 시야각 범위 내에 존재하며, 데이터와 질의점 사이의 거리가 가장 작은 데이터를 결과 데이터로 선택하고, 결과 데이터와 질의점 사이의 거리를 최적 거리로 재설정한다. 보다 구체적으로, 단말 노드 처리부(750)는 데이터가 시야각 범위 내에 존재하고, 데이터와 질의점 사이의 거리가 최적 거리보다 작으면, 데이터를 결과데이터로 선택하고, 데이터와 질의점 사이의 거리를 최적 거리로 재설정하는 과정을 단말 노드에 포함된 모든 데이터에 대해 수행한다. 따라서 단말 노드의 결과데이터로 선택된 데이터는 단말 노트에 포함된 데이터 중 데이터와 질의점 사이의 거리가 가장 작은 데이터가 된다.The terminal node processing unit 750 exists within the viewing angle range among the data included in the terminal node, selects data having the smallest distance between the data and the query point as the result data, and sets the distance between the result data and the query point as the optimal distance. Reset. More specifically, the terminal node processing unit 750 selects data as result data when the data exists within the viewing angle range and the distance between the data and the query point is smaller than the optimum distance, and optimizes the distance between the data and the query point. The process of resetting the distance is performed on all data included in the terminal node. Therefore, the data selected as the result data of the terminal node is the data having the smallest distance between the data and the query point among the data included in the terminal note.

단말 노드 처리부(750)에서 출력된 재설정된 최적 거리를 이용하여, 하위 노드 선택부(710), 보다 구체적으로는 최소 거리 판단부(717)가 다시 동작한다. 최소 거리 판단부(717)는 리스트에 포함된 하위 노드 중에서, 노드 판단부(730)를 거치지 않은 다른 하위 노드들의 MINDIST가 재설정된 최적 거리보다 작은지 여부를 판단 한다. 하위 노드의 MINDIST가 재설정된 최적 거리보다 작다면, 다시 노드 판단부(730)를 거쳐, 필터링부(710)를 통과하거나 단말 노드 처리부(750)를 통과한다. 그러나 다시 동작된 최소 거리 판단부(717)에서 순차적으로 판단 대상이 되는 하위 노드의 MINDIST가 재설정된 최적 거리보다 큰 경우에는, 결과데이터는 곧 본 발명에서 얻고자 했던 최근접 데이터로 설정된다. 즉, 최종적인 질의의 결과값이 얻어지게 된다. 이렇게 얻어진 최근접 데이터는 전술한 바와 같이 시야각 범위 내에 포함되는 데이터 중에서, 질의점에 가장 근접한 데이터이다.
The lower node selector 710, more specifically, the minimum distance determiner 717, operates again using the reset optimum distance output from the terminal node processor 750. The minimum distance determiner 717 determines whether the MINDIST of other lower nodes not passed through the node determiner 730 is smaller than the reset optimal distance among the lower nodes included in the list. If the MINDIST of the lower node is smaller than the reset optimal distance, the node passes through the node determining unit 730 again through the filtering unit 710 or through the terminal node processing unit 750. However, when the MINDIST of the lower nodes that are sequentially determined by the re-operated minimum distance determiner 717 is larger than the reset optimal distance, the result data is set to the nearest data that is intended to be obtained in the present invention. In other words, the final query result is obtained. The closest data thus obtained is the data closest to the query point among the data included in the viewing angle range as described above.

도 8은 본 발명의 일 실시 예에 따른 시야각을 이용한 최근접 질의 처리 방법을 구현하는 알고리즘을 나타내는 도면이다.8 is a diagram illustrating an algorithm for implementing a nearest query processing method using a viewing angle according to an embodiment of the present invention.

도 8을 참조하여 살펴보면, 본 발명의 일 실시 예에 따른 시야각을 이용한 최근접 질의 처리는 Node N과 질의 q=(p,θ)가 주어졌을 때, 질의의 결과값을 출력하는 형태로 이루어진다. 알고리즘 VFNNSearch(Node, Query)은 세 부분으로 구분할 수 있다.Referring to FIG. 8, the nearest query processing using the viewing angle according to an embodiment of the present invention is performed when the node N and the query q = (p, θ) are outputted. The algorithm VFNNSearch (Node, Query) can be divided into three parts.

먼저, 노드가 단말 노드이면(Line1), 노드 안의 각각의 데이터에 대해서(Line2) 아래와 같은 단계를 수행한다. 데이터와 질의점 사이의 거리(dist(q.p, d))가 최적 크기(best_dist)보다 작고, 데이터가 시야각 범위 내에 존재하면(Line3), 데이터와 질의점 사이의 거리를 최적 거리(best_dist)로 재설정하고(Line 4), 위 두 조건을 만족하는 데이터를 질의의 결과값(VFNNResult)으로 저장한다.First, if a node is a terminal node (Line1), the following steps are performed for each data in the node (Line2). If the distance between the data and the query point (dist (qp, d)) is less than the best size (best_dist) and the data is within the viewing angle range (Line3), reset the distance between the data and the query point to the best distance (best_dist). (Line 4), and save the data satisfying the above two conditions as the query result (VFNNResult).

만약, 노드가 단말 노드가 아니면, 노드의 모든 엔트리(하위 노드) 각각에 대해 아래와 같은 단계를 수행한다(Line 11). 엔트리의 최소 경계 사각형이 시야각과 중첩되지 않는다면(Line 12) 해당 엔트리를 삭제한다(Line 13). 이러한 단계를 통해, 시야각과 중첩되지 않는 불필요한 노드를 검색에서 제외한다.If the node is not a terminal node, the following steps are performed for each entry (sub node) of the node (Line 11). If the minimum bounding rectangle of the entry does not overlap with the viewing angle (Line 12), delete the entry (Line 13). This step excludes unnecessary nodes from the search that do not overlap the field of view.

다음으로, 리스트에 저장된 엔트리를 MINDIST에 따라 정렬하며(Line 16), 리스트의 엔트리에 대해 반복적으로 다음 단계를 수행한다. 최적 거리 보다 엔트리의 MINDIST가 크거나 같아질 때까지 각각의 엔트리에 대하여 본 질의 알고리즘을 재귀적으로 실행한다(Line19-21).
Next, the entries stored in the list are sorted according to MINDIST (Line 16), and the next step is repeatedly performed for the entries of the list. The query algorithm is recursively executed for each entry until the MINDIST of the entry is greater than or equal to the optimal distance (Line 19-21).

도 9는 본 발명의 일 실시 예에 따른, 노드 당 엔트리 수와 k 값의 변화에 따른 노드 접근 횟수를 나타내는 그래프이다.9 is a graph illustrating the number of entry of nodes according to the change of the number of entries and the value of k according to an embodiment of the present invention.

도 9는 시야각을 이용한 최근접 질의 처리 방법을 이용하여, 시야각 내에서 질의점에 가장 가까운 k개의 데이터를 검색한 실험 결과이다. 도 9는 질의점을 전체 데이터 좌표의 중점으로 설정하고, 시야각의 최소 각은 0˚, 최대 각은 80˚로 설정한 경우의 결과 그래프이다. 성능 평가에 사용된 파라미터는 아래의 [표 1]과 같다.9 is an experimental result of searching for k pieces of data closest to the query point in the viewing angle by using the nearest query processing method using the viewing angle. 9 is a result graph when the query point is set to the midpoint of all data coordinates, and the minimum angle of the viewing angle is set to 0 ° and the maximum angle is set to 80 °. The parameters used in the performance evaluation are shown in Table 1 below.

파라미터parameter 설정 값Setting value 노드 당 최대 엔트리Maximum entry per node 6, 12, 25 (개)6, 12, 25 (pcs) 데이터 개수Data count 200, 400, 600 (개)200, 400, 600 (pcs) 2-차원 위치 좌표 크기2-dimensional position coordinate size 400400 데이터 사각형 최대 길이 Data rectangle maximum length 6060 kk 1, 30, 501, 30, 50

그래프에서 데이터의 개수는 400개로 동일하다. 도 9를 참조하여 살펴보면, 노드당 최대 엔트리 수가 25일 경우 k 값에 따른 노드 접근 횟수의 변화가 없는 것으로 나타난다. 이는 k의 개수보다 시야각 내의 데이터 개수가 작아져서 나타나는 현상이다. 이러한 현상이 발생함에 따라 k 값이 변화해도, 노드 접근 횟수는 같다.
The number of data in the graph is the same as 400. Referring to FIG. 9, when the maximum number of entries per node is 25, it is shown that there is no change in the number of node accesses according to the value of k. This phenomenon occurs because the number of data in the viewing angle is smaller than the number of k. As this happens, even if k is changed, the number of node accesses is the same.

도 10은 본 발명의 일 실시 예에 따른, 데이터 개수와 k 값의 변화에 따른 노드 접근 횟수를 나타내는 그래프이다.10 is a graph illustrating the number of node accesses according to the change in the number of data and the value of k according to an embodiment of the present invention.

도 10은 노드 당 최대 엔트리 수를 6개로 동일하게 설정한 경우이다. 도 10을 참조하여 살펴보면, k 값이 커질수록, 데이터의 개수가 많을수록 노드 접근 횟수가 증가하는 것을 관찰할 수 있다.10 illustrates a case in which the maximum number of entries per node is set equal to six. Referring to FIG. 10, it can be observed that as the k value increases, the number of node accesses increases as the number of data increases.

전술한 본 발명은, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에게 있어 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하므로 전술한 실시 예 및 첨부된 도면에 의해 한정되는 것이 아니다.
While the present invention has been described in connection with what is presently considered to be practical exemplary embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, But the present invention is not limited thereto.

Claims (4)

트리 구조로 저장된 데이터들 중에서 특정 질의점에 대한 최근접 데이터를 검색하는 최근접 질의 처리 방법에 있어서,
최근접 질의 처리 장치가 상위 노드가 포함하는 하위 노드 중 시야각 범위와 중첩되는 최소 경계 사각형을 가지며, 상기 최소 경계 사각형과 상기 질의점 사이의 최소 거리가 최적 거리보다 작은 하위 노드를 선택하는 하위 노드 선택 단계;
상기 선택된 하위 노드가 단말 노드가 아니면, 상기 최근접 질의 처리 장치가 상기 선택된 하위 노드를 상기 상위 노드로 설정하여 상기 하위 노드 선택 단계를 반복적으로 수행하는 단계;
상기 선택된 하위 노드가 상기 단말 노드이면, 상기 최근접 질의 처리 장치가 상기 단말 노드에 포함된 데이터 중 상기 시야각 범위 내에 존재하고 상기 데이터와 상기 질의점 사이의 거리가 가장 작은 데이터를 결과 데이터로 선택하고, 상기 결과 데이터와 상기 질의점 사이의 거리를 상기 최적 거리로 재설정하여, 상기 하위 노드 선택 단계를 반복적으로 수행하는 단말 노드 처리 단계; 및
상기 하위 노드 중 상기 최소 경계 사각형과 상기 질의점 사이의 최소 거리가 최적 거리보다 작은 하위 노드가 존재하지 않으면, 상기 최근접 질의 처리 장치가 상기 결과 데이터를 상기 최근접 데이터로 설정하는 단계
를 포함하는 시야각을 이용한 최근접 질의 처리 방법.
In the nearest query processing method for searching the nearest data for a specific query point among the data stored in the tree structure,
The neighboring query processing apparatus selects a lower node having a minimum bounding rectangle overlapping a viewing angle range among lower nodes included in an upper node, and selecting a lower node whose minimum distance between the minimum bounding rectangle and the query point is smaller than an optimal distance. step;
If the selected lower node is not a terminal node, repeatedly performing the lower node selection step by setting the selected lower node as the upper node;
If the selected lower node is the terminal node, the closest query processing apparatus selects data that exists within the viewing angle range among the data included in the terminal node and has the smallest distance between the data and the query point as result data. A terminal node processing step of repeatedly performing the lower node selection step by resetting the distance between the result data and the query point to the optimum distance; And
If there is no lower node whose minimum distance between the minimum bounding rectangle and the query point among the lower nodes is smaller than an optimal distance, the nearest query processing apparatus sets the result data as the nearest data;
Nearest query processing method using a viewing angle comprising a.
제 1항에 있어서,
상기 하위 노드 선택 단계는,
상기 하위 노드가 상기 시야각 범위와 중첩되는 최소 경계 사각형을 가지지 않는 경우, 상기 최근접 질의 처리 장치가 상기 하위 노드를 삭제하는 단계
를 포함하는 시야각을 이용한 최근접 질의 처리 방법.
The method of claim 1,
The subnode selection step,
If the lower node does not have a minimum bounding rectangle overlapping the viewing angle range, the nearest query processing apparatus deletes the lower node;
Nearest query processing method using a viewing angle comprising a.
제 1항에 있어서,
상기 하위 노드 선택 단계는,
상기 최근접 질의 처리 장치가 상기 상위 노드가 포함하는 상기 하위 노드 중 상기 시야각 범위와 중첩되는 최소 경계 사각형을 갖는 하위 노드를 상기 최소 경계 사각형과 상기 질의점 사이의 최소 거리에 따라 정렬하여 리스트를 생성하는 단계; 및
상기 최근접 질의 처리 장치가 상기 리스트에 포함된 상기 하위 노드 각각의 최소 경계 사각형과 상기 질의점 사이의 최소 거리가 상기 최적 거리보다 작은지 여부를 순차적으로 판단하는 단계
를 포함하는 시야각을 이용한 최근접 질의 처리 방법.
The method of claim 1,
The subnode selection step,
The nearest query processing apparatus generates a list by arranging a lower node having a minimum boundary rectangle overlapping the viewing angle range among the lower nodes included in the upper node according to the minimum distance between the minimum boundary rectangle and the query point. Doing; And
Determining, by the nearest query processing apparatus, whether the minimum distance between the minimum boundary rectangle of each of the lower nodes included in the list and the query point is smaller than the optimal distance;
Nearest query processing method using a viewing angle comprising a.
제 1항에 있어서,
상기 단말 노드 처리 단계는,
상기 데이터가 상기 시야각 범위 내에 존재하고 상기 데이터와 상기 질의점 사이의 거리가 상기 최적 거리보다 작으면, 상기 최근접 질의 처리 장치가 상기 데이터를 상기 결과 데이터로 선택하고, 상기 데이터와 상기 질의점 사이의 거리를 상기 최적 거리로 재설정하는 데이터 처리 단계; 및
상기 최근접 질의 처리 장치가 상기 단말 노드에 포함된 모든 데이터에 대해 상기 데이터 처리 단계를 수행하는 단계
를 포함하는 시야각을 이용한 최근접 질의 처리 방법.
The method of claim 1,
The terminal node processing step,
If the data is within the viewing angle range and the distance between the data and the query point is less than the optimal distance, the nearest query processing apparatus selects the data as the result data and between the data and the query point. A data processing step of resetting the distance to the optimum distance; And
Performing the data processing step on all data included in the terminal node by the nearest query processing apparatus;
Nearest query processing method using a viewing angle comprising a.
KR1020110095076A 2011-09-21 2011-09-21 Method for processing nearest neighbor queries using view field KR101266898B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020110095076A KR101266898B1 (en) 2011-09-21 2011-09-21 Method for processing nearest neighbor queries using view field

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020110095076A KR101266898B1 (en) 2011-09-21 2011-09-21 Method for processing nearest neighbor queries using view field

Publications (2)

Publication Number Publication Date
KR20130031480A KR20130031480A (en) 2013-03-29
KR101266898B1 true KR101266898B1 (en) 2013-05-23

Family

ID=48180618

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020110095076A KR101266898B1 (en) 2011-09-21 2011-09-21 Method for processing nearest neighbor queries using view field

Country Status (1)

Country Link
KR (1) KR101266898B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100989663B1 (en) 2010-01-29 2010-10-26 (주)올라웍스 Method, terminal device and computer-readable recording medium for providing information on an object not included in visual field of the terminal device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100989663B1 (en) 2010-01-29 2010-10-26 (주)올라웍스 Method, terminal device and computer-readable recording medium for providing information on an object not included in visual field of the terminal device

Also Published As

Publication number Publication date
KR20130031480A (en) 2013-03-29

Similar Documents

Publication Publication Date Title
Rocha-Junior et al. Top-k spatial keyword queries on road networks
US8761512B1 (en) Query by image
US9519680B2 (en) Methods for query processing of topological relationships among complex spatial objects
US10754887B1 (en) Systems and methods for multimedia image clustering
Yiu et al. Ranking spatial data by quality preferences
CN108052514B (en) Mixed space indexing method for processing geographic text Skyline query
US20150149479A1 (en) Lidar Model With Hybrid-Columnar Format and No Indexes for Spatial Searches
CN101055585A (en) System and method for clustering documents
WO2021068346A1 (en) Method and device for location querying based on geohash algorithm, computer device, and storage medium
CN108182242A (en) A kind of indexing means for the inquiry of magnanimity multi dimensional numerical data area
KR102088435B1 (en) Effective retrieval apparatus based on diversity index of retrieval result and method thereof
JP2017045291A (en) Similar image searching system
JP2010277329A (en) Neighborhood retrieval device
Li et al. Range queries on uncertain data
JP5470082B2 (en) Information storage search method and information storage search program
KR101266898B1 (en) Method for processing nearest neighbor queries using view field
JPH10301937A (en) Neighborhood retrieval method inside multi-dimensional vector space and recording medium for the program
Cheema et al. A unified approach for computing top-k pairs in multidimensional space
JP4440246B2 (en) Spatial index method
CN110347676A (en) Uncertain temporal data management and querying method based on relationship R tree
CN103279525B (en) A kind of Multi-condition linkage searching method optimized based on Hash
CN112948591B (en) Subgraph matching method and system suitable for directed graph and electronic equipment
JP2000035965A (en) Method and device for retrieving similar feature quantity and storage medium storing retrieval program of similar feature quantity
KR102086610B1 (en) Multi-keyword domain-based spatial keyword search apparatus and method, storage media storing the same
Park et al. A fast and compact indexing technique for moving objects

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20160225

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20170328

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee