KR101044807B1 - Query processing method and system for sensor networks - Google Patents

Query processing method and system for sensor networks Download PDF

Info

Publication number
KR101044807B1
KR101044807B1 KR1020080126102A KR20080126102A KR101044807B1 KR 101044807 B1 KR101044807 B1 KR 101044807B1 KR 1020080126102 A KR1020080126102 A KR 1020080126102A KR 20080126102 A KR20080126102 A KR 20080126102A KR 101044807 B1 KR101044807 B1 KR 101044807B1
Authority
KR
South Korea
Prior art keywords
query
queries
result
candidate
new
Prior art date
Application number
KR1020080126102A
Other languages
Korean (ko)
Other versions
KR20100067516A (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 KR1020080126102A priority Critical patent/KR101044807B1/en
Publication of KR20100067516A publication Critical patent/KR20100067516A/en
Application granted granted Critical
Publication of KR101044807B1 publication Critical patent/KR101044807B1/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]

Abstract

본 발명은 센서 네트워크 환경에서의 질의 처리 방법 및 시스템에 관한 것이다.The present invention relates to a query processing method and system in a sensor network environment.

본 발명은 사용자 또는 응용 프로그램이 센서 네트워크에 새로운 질의를 요청했을 때, 센서 네트워크에서 실행 중이던 기존 질의들의 결과를 활용하여 새로 요청된 질의의 결과를 유도해낼 수 있기 때문에, 센서 네트워크에서 소모되는 에너지를 줄일 수 있다. 또한, 질의를 병합하여 실행할 경우 질의를 개별적으로 실행하는 것이 아니라 몇 개의 질의를 병합한 후 단일 질의로 실행시키기 때문에, 여러 개의 질의를 한꺼번에 실행시킬 때 보다 센서 네트워크에서의 에너지 소모를 줄일 수 있다.According to the present invention, when a user or an application requests a new query from the sensor network, it is possible to derive the result of the newly requested query by using the results of the existing queries executed in the sensor network. Can be reduced. In addition, when executing a merged query, instead of executing the queries individually, the queries are merged and executed as a single query, thereby reducing energy consumption in the sensor network than executing several queries at once.

센서 네트워크, 질의 처리, 에너지, 후보 질의, 속성, 프로젝션 Sensor Networks, Query Processing, Energy, Candidate Queries, Properties, Projection

Description

센서 네트워크 환경에서의 질의 처리 방법 및 시스템{Query processing method and system for sensor networks}Query processing method and system for sensor networks

본 발명은 센서 네트워크 환경에서의 질의 처리 방법 및 시스템에 관한 것이다.The present invention relates to a query processing method and system in a sensor network environment.

본 발명은 지식경제부 및 정보통신연구진흥원의 IT성장동력기술개발사업의 일환으로 수행한 연구로부터 도출된 것이다[과제관리번호: 2006-S-022-03, 과제명: USN 미들웨어 플랫폼 기술개발].The present invention is derived from the research conducted as part of the IT growth engine technology development project of the Ministry of Knowledge Economy and the Ministry of Information and Communication Research and Development. [Task management number: 2006-S-022-03, Task name: USN middleware platform technology development].

센서 네트워크는 주변의 다양한 현상을 센싱할 수 있는 센서 노드들로 이루어진 네트워크를 의미하며, 일반적으로 무선 통신을 이용하여 노드들과 통신을 수행한다. 센서 네트워크 환경에서는 센서 노드들이 배터리를 통해 전력을 공급받기 때문에, 제한된 에너지를 효율적으로 사용하여 센서 네트워크의 수명을 최대화할 수 있는 기술이 필요하다.The sensor network refers to a network composed of sensor nodes capable of sensing various phenomena in the periphery, and generally communicates with nodes using wireless communication. In a sensor network environment, because sensor nodes are powered by batteries, there is a need for a technology that can maximize the life of the sensor network by efficiently using limited energy.

사용자 또는 응용 프로그램은 센서 네트워크로부터 데이터를 획득하기 위하여, 질의(Query)를 센서 네트워크에 요청한다. 일반적으로 질의에는 데이터 획득을 위한 조건, 획득하고자 하는 데이터 또는 속성(attribute), 질의가 실행되어야 하 는 주기 등이 포함되어 있으며, 센서 네트워크의 센서 노드들은 자신에게 주어진 질의를 실행하여 사용자 또는 응용 프로그램이 요청한 데이터를 센싱한 뒤 처리하여 그 결과를 전송한다.The user or application requests a query from the sensor network to obtain data from the sensor network. In general, a query includes conditions for acquiring data, data or attributes to be acquired, and how often the query should be executed, and sensor nodes of a sensor network execute a query given to the user or an application. The requested data is sensed, processed and transmitted.

센서 노드들이 질의를 실행하기 위해서는 사용자 또는 응용 프로그램으로부터 질의를 수신한 후 센싱하고, 센싱한 값을 처리한 후 그 결과를 다시 전송하는 등 많은 에너지를 필요로 한다. 따라서, 센서 네트워크에 질의를 요청하기 전에, 질의들을 최적화하여 센서 네트워크의 에너지 소모를 줄이기 위한 기술이 필요하다.In order to execute a query, sensor nodes require a lot of energy, such as receiving and sensing a query from a user or an application program, processing the sensed value, and transmitting the result again. Therefore, before requesting a query from the sensor network, a technique is needed to optimize the queries to reduce the energy consumption of the sensor network.

현재 센서 네트워크 환경에서 질의들을 최적화하여 실행하기 위한 몇 가지 기법들이 제안되었다. 이들 종래 기법들은 사용자 또는 응용 프로그램이 센서 네트워크에 질의를 요청하면 새로 요청된 질의를 기존에 센서 네트워크에서 실행되고 있던 질의와 병합하여 가상의 질의를 만들려는 시도를 한다. 종래 기법들에서는 사용자 또는 응용 프로그램이 요청한 모든 질의를 실행하지 않아도 되는 이점이 있으나, 다음과 같은 단점들이 존재한다.Several techniques have been proposed to optimize and execute queries in the current sensor network environment. These conventional techniques attempt to create a virtual query by merging a newly requested query with a query previously executed in the sensor network when a user or an application requests a query from the sensor network. Conventional techniques have the advantage of not having to execute all queries requested by a user or an application program, but have the following disadvantages.

먼저, 센서 네트워크에서 실행되는 대부분의 질의에는 질의가 실행될 주기가 기술되지만, 종래 기법들은 이 실행 주기 처리에 효율적이지 못하다. 예를들어, 사용자 또는 응용 프로그램이 센서 네트워크로부터 10초마다 센싱 결과를 얻으려면 질의에 10초라는 실행 주기를 기술해야 한다. 종래 기법들은 서로 다른 실행 주기를 가진 질의들을 병합할 때, 병합할 질의들의 실행 주기의 최대 공약수에 해당하는 주기마다 병합된 질의를 실행시킨다. 그 결과 질의를 자주 실행시킬 수도 있기 때문에 센서 네트워크의 에너지를 불필요하게 소모할 수 있다는 문제점이 있다.First, most of the queries executed in the sensor network describe the period in which the queries are executed, but conventional techniques are not efficient for processing the execution cycle. For example, if a user or application wants to get a sensing result every 10 seconds from the sensor network, the query should describe a 10 second execution cycle. Conventional techniques execute a merged query every cycle corresponding to the greatest common divisor of the execution cycle of the queries to be merged when merging queries having different execution cycles. As a result, there is a problem that the energy of the sensor network can be consumed unnecessarily because the query can be executed frequently.

또한, 사용자 또는 응용 프로그램이 요청한 질의들은 서로 다른 데이터 획득을 위한 조건을 가지는데, 질의 병합 시에 각 질의의 조건들도 병합되어야 한다. 하지만 병합된 질의는 일반적으로 기존 질의보다 넓은 질의 조건을 가지기 때문에, 기존 질의가 원하지 않는 결과도 센서 네트워크에서 전송해야 하는 문제점이 있다. 이는 센서 노드가 불필요한 통신 에너지를 소모하게 만들기 때문에, 센서 노드의 에너지를 효율적으로 사용하는데 있어 한계가 있다.In addition, queries requested by a user or an application have different conditions for acquiring different data. When query merging, the conditions of each query must also be merged. However, since the merged query generally has a broader query condition than the existing query, there is a problem in that the sensor network must transmit a result that is not desired by the existing query. This causes the sensor node to consume unnecessary communication energy, so there is a limit to the efficient use of the energy of the sensor node.

따라서, 본 발명은 질의 처리 방법 및 시스템에 관한 것으로, 보다 상세하게는 센서 네트워크 환경에서 에너지 효율적인 질의 처리 방법 및 시스템을 제공한다. 특히, 센서 네트워크 환경에서 기존에 실행 중이던 질의들의 결과를 활용하여 사용자 또는 응용 프로그램이 새로 요청한 질의의 결과를 유도해냄으로써, 에너지를 효율적으로 사용하는 질의 처리 방법 및 시스템을 제공한다.Accordingly, the present invention relates to a query processing method and system, and more particularly, to provide an energy efficient query processing method and system in a sensor network environment. In particular, the present invention provides a query processing method and system that efficiently uses energy by deriving a result of a newly requested query by a user or an application by utilizing the result of a query that has been executed in a sensor network environment.

상기 본 발명의 기술적 과제를 달성하기 위한 하나의 특징인 센서 네트워크 환경에서 질의를 처리하는 시스템은,A system for processing a query in a sensor network environment, which is one feature for achieving the technical problem of the present invention,

새로 요청된 질의를 수신하여 전달하는 질의 수신부; 상기 질의 수신부에서 전달된 새로 요청된 질의를 실행하기 위해 후보 질의들을 추출하고, 추출한 후보 질의로부터 상기 요청된 질의의 결과를 유도할 수 있는지 여부 또는 상기 요청된 질의와 실행되고 있는 질의의 병합 여부를 판단하는 질의 최적화부; 현재 실행되고 있는 질의들의 정보, 임의의 속성을 프로젝션 시키는 질의들간 매핑 정보, 특정 속성의 결과를 만들어내는 부모 질의들간의 매핑 정보 및 상기 새로 요청된 질의의 결과를 유도할 수 있는 유도 가능한 질의 정보를 저장하는 질의 저장부; 상기 새로 요청된 질의가 원하는 실행 주기마다 상기 질의 저장부에 저장되어 있는 질의 결과를 조합하여, 질의 결과를 유도하는 질의 결과 유도부; 및 상기 질의 최적화부에서 후보 집합에 속한 질의들로부터 유도가 불가능하다고 판단된 질의들을 실행하는 질 의 실행부를 포함한다.A query receiving unit for receiving and transmitting a newly requested query; Candidate queries are extracted to execute the newly requested query delivered from the query receiver, and whether the result of the requested query can be derived from the extracted candidate query or whether the requested query is merged with the query being executed. A query optimizer for determining; Information about the queries currently being executed, mapping information between queries projecting an arbitrary attribute, mapping information between parent queries producing a result of a specific attribute, and inducible query information that can derive the result of the newly requested query. A query storage unit for storing; A query result deriving unit for deriving a query result by combining query results stored in the query storage unit at every desired execution period of the newly requested query; And a query execution unit that executes queries determined to be impossible to derive from queries belonging to the candidate set in the query optimizer.

상기 본 발명의 기술적 과제를 달성하기 위한 또 다른 특징인 센서 네트워크 환경에서의 질의를 처리하는 방법은,Method for processing a query in a sensor network environment that is another feature for achieving the technical problem of the present invention,

새로운 질의의 처리를 요청받는 단계; 상기 새로운 질의에 대해 미리 저장되어 있는 다수의 질의로부터 후보 질의 집합을 구성하는 단계; 상기 구성한 후보 질의 집합으로부터 상기 새로운 질의의 결과를 생성할 수 있는지 검사하는 단계; 및 상기 새로운 질의의 결과를 생성할 수 있다고 판단하면, 상기 후보 질의 집합으로부터 상기 새로운 질의의 결과를 유도하는 단계를 포함한다.Receiving a request for processing a new query; Constructing a candidate query set from a plurality of queries previously stored for the new query; Checking whether a result of the new query can be generated from the configured candidate query set; And if it is determined that a result of the new query can be generated, deriving a result of the new query from the candidate query set.

본 발명에 따르면, 사용자 또는 응용 프로그램이 센서 네트워크에 새로운 질의를 요청했을 때 센서 네트워크에서 실행중이던 기존 질의들의 결과를 활용하여 새로 요청된 질의의 결과를 유도해낼 수 있기 때문에, 센서 네트워크에서 소모되는 에너지를 줄일 수 있다.According to the present invention, when a user or an application requests a new query to the sensor network, the energy consumed in the sensor network can be derived by using the results of the existing queries that are being executed in the sensor network. Can be reduced.

또한, 질의를 병합하여 실행할 경우 질의를 개별적으로 실행하는 것이 아니라 몇 개의 질의를 병합한 후 단일 질의로 실행시키기 때문에, 여러 개의 질의를 한꺼번에 실행시킬 때 보다 센서 네트워크에서의 에너지 소모를 줄일 수 있다.In addition, when executing a merged query, instead of executing the queries individually, the queries are merged and executed as a single query, thereby reducing energy consumption in the sensor network than executing several queries at once.

아래에서는 첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기 에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.DETAILED DESCRIPTION Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art may easily implement the present invention. As those skilled in the art would realize, the described embodiments may be modified in various different ways, all without departing from the spirit or scope of the present invention. In the drawings, parts irrelevant to the description are omitted in order to clearly describe the present invention, and like reference numerals designate like parts throughout the specification.

명세서 전체에서, 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다. 또한, 명세서에 기재된 "…부", "…기", "모듈" 등의 용어는 적어도 하나의 기능이나 동작을 처리하는 단위를 의미하며, 이는 하드웨어나 소프트웨어 또는 하드웨어 및 소프트웨어의 결합으로 구현될 수 있다.Throughout the specification, when a part is said to "include" a certain component, it means that it can further include other components, without excluding other components unless specifically stated otherwise. In addition, the terms “… unit”, “… unit”, “module”, etc. described in the specification mean a unit that processes at least one function or operation, which may be implemented by hardware or software or a combination of hardware and software. have.

이하 도면을 참조로 하여 본 발명의 실시예에 따른 에너지 효율적인 질의 처리 시스템 및 질의 처리 방법에 대하여 설명하기로 한다. 먼저 질의 처리 시스템에 대하여 도 1을 참조로 설명하기로 한다.Hereinafter, an energy efficient query processing system and a query processing method according to an embodiment of the present invention will be described with reference to the drawings. First, a query processing system will be described with reference to FIG. 1.

도 1은 본 발명의 실시예에 따른 센서 네트워크 환경에서의 질의 처리 시스템의 전체 구조도이다. 1 is an overall structure diagram of a query processing system in a sensor network environment according to an embodiment of the present invention.

도 1에 도시된 바와 같이, 본 발명의 실시예에 따른 질의 처리 시스템은 질의 수신부(100), 질의 최적화부(200), 질의 실행부(300), 질의 저장부 및 질의 결과 유도부(400)를 포함한다. 여기서 질의 저장부는 프로젝션 속성별 질의 저장부(540), 실행중인 질의 저장부(530), 유도 질의 저장부(520) 및 부모 질의 저장부(510)를 포함한다.As shown in FIG. 1, a query processing system according to an exemplary embodiment of the present invention includes a query receiver 100, a query optimizer 200, a query execution unit 300, a query storage unit, and a query result derivation unit 400. Include. The query storage unit may include a query storage unit 540 for each projection attribute, a query storage unit 530 that is being executed, a derived query storage unit 520, and a parent query storage unit 510.

질의 수신부(100)는 사용자 또는 응용 프로그램이 요청하는 질의를 수신한 다.The query receiving unit 100 receives a query requested by a user or an application program.

질의 최적화부(200)는 질의 수신부(100)에서 수신한 질의를 에너지 효율적으로 실행되도록 최적화시키며, 후보 질의 집합 구성기(210), 유도 가능성 검사기(220) 및 질의 병합기(230)를 포함한다.The query optimizer 200 optimizes the query received by the query receiver 100 to be executed efficiently, and includes a candidate query set constructor 210, a derivability checker 220, and a query merger 230. .

먼저 후보 질의 집합 구성기(210)는 센서 네트워크에서 실행되고 있는 질의들 중 새로 요청된 질의의 결과를 만들어낼 가능성을 가진 질의들을 추출한다. 그리고 나서 후보 질의 집합을 구성한 뒤 이를 출력한다. 이를 위해 이하 설명할 프로젝션 속성별 질의 저장부(540)와 실행중인 질의 저장부(530)로부터 현재 센서 네트워크에서 실행중인 질의에 관한 정보와 프로젝션 속성별 질의 정보를 전달받는다.First, the candidate query set constructor 210 extracts queries having the possibility of producing a result of a newly requested query among the queries executed in the sensor network. Then construct a candidate query set and print it out. To this end, information about the query currently being executed in the sensor network and query information for each projection attribute are received from the query storage unit 540 and the query storage unit 530 for each of the execution attributes to be described below.

유도 가능성 검사기(220)는 주어진 후보 질의 집합에 속한 질의들이 실제로 새로 요청된 질의의의 결과를 유도해낼 수 있는지 검사한다. 새로 요청된 질의가 후보 집합에 속한 질의들로부터 유도가 가능하다고 판단하면 새로 요청된 질의는 유도 질의 저장부(520)에 등록한다. 반면, 새로 요청된 질의 결과를 유도하기로 결정한 후보 저장의 집합들은 부모 질의 저장부(510)에 등록된다. 이때, 새로 요청된 질의가 후보 집합에 속한 질의들로부터 유도가 가능한지 여부를 판단하는 방법은 추후 설명하기로 한다.The derivability checker 220 checks whether queries belonging to a given candidate query set can actually derive the result of the newly requested query. If it is determined that the newly requested query can be derived from queries belonging to the candidate set, the newly requested query is registered in the derived query storage unit 520. On the other hand, the sets of candidate stores determined to derive the newly requested query result are registered in the parent query store 510. In this case, a method of determining whether a newly requested query can be derived from queries belonging to the candidate set will be described later.

또한, 새로 요청된 질의의 결과가 후보 집합에 속한 질의들의 결과로부터 유도가 불가능하다고 판단되면, 새로 요청된 질의를 기존에 실행중인 질의와 병합하는 것이 이익인지 아니면 새로 요청된 질의만 실행시키는 것이 이익인지 판단한다. 여기서 이익의 판단 여부는 새로 요청된 질의를 센서 네트워크에서 홀로 실행시킬 때 발생하는 질의 결과의 수와, 기존에 실행중이던 질의와 병합했을 때 발생하는 질의 결과의 수를 예측하여 어느 쪽이 더 작은 수의 질의 결과를 발생하는지 검사하여 판단한다. In addition, if it is determined that the result of the newly requested query cannot be derived from the results of the queries belonging to the candidate set, it is advantageous to merge the newly requested query with the existing running query or to execute only the newly requested query. Determine if it is. In this case, whether the benefit is judged is predicted by the number of query results generated when the newly requested query is executed alone in the sensor network, and the number of query results generated when merging with the existing running query. Determine by checking whether the query result is generated.

이익 판단은 이미 알려진 사항으로, 본 발명의 실시예에서는 상세한 설명을 생략하기로 한다. 기존에 실행중인 질의와 병합하는 것이 이익이라고 판단하면, 새로 요청된 질의를 질의 병합기(230)로 보낸다. 반면, 새로 요청된 질의만 실행시키는 것이 이익이라고 판단되면, 새로 요청된 질의를 질의 실행부(300)로 보내어 센서 네트워크에 요청되어 실행될 수 있도록 한다.Benefit determination is a known matter, detailed description thereof will be omitted in the embodiment of the present invention. If it is determined that merging with an existing running query is a benefit, then the newly requested query is sent to the query merger 230. On the other hand, if it is determined that it is beneficial to execute only the newly requested query, the newly requested query is sent to the query executing unit 300 so that the sensor network can be requested and executed.

질의 병합기(230)는 유도 가능성 검사기(220)에서 수신한 새로 요청된 질의를 기존의 실행중인 질의 저장부(530)에 저장되어 있는 현재 실행중인 질의와 병합하여 실행될 수 있도록 한다. The query merger 230 merges the newly requested query received by the inducibility checker 220 with the currently executing query stored in the existing executing query storage unit 530 to be executed.

다음 질의 실행부(300)는 유도 가능성 검사기(220)에서 후보 집합에 속한 질의들로부터 유도가 불가능하다고 판단된 질의들을 센서 네트워크에 요청하여 실행시킨다. 그리고 이 질의를 실행중인 질의 저장부(530)에 등록하고, 이 질의가 프로젝션(projection)시키는 속성 정보를 이용하여 프로젝션 속성별 질의 저장부(540)에 등록한다.Next, the query execution unit 300 requests and executes the sensor network from the queries that are determined to be impossible to derive from the queries belonging to the candidate set in the inducibility checker 220. The query is registered in the query storage unit 530 which is being executed, and is registered in the query storage unit 540 for each projection attribute by using the attribute information projected by the query.

질의 결과 유도부(400)는 유도 질의 저장부(520)에 등록되어 있는 질의의 결과를 유도해내기 위해, 해당 질의가 원하는 실행 주기마다 부모 질의 저장부(510)에 등록된 질의들의 결과를 조합하여, 질의 결과를 유도한다.The query result deriving unit 400 combines the results of the queries registered in the parent query storage unit 510 for each execution cycle of the query to derive the result of the query registered in the deriving query storage unit 520. Induce query results.

프로젝션 속성별 질의 저장부(530)는 특정 속성과 이 속성을 프로젝션 시키는 질의들 간의 매핑 정보를 저장한다. 예를 들어, 온도라는 속성을 프로젝션 시키는 질의로 Q1과 Q2가 있다고 가정하면, (온도, Q1, Q1)과 같은 형태의 매핑 정보가 프로젝션 속성별 질의 저장부(530)에 저장된다.The query storage unit 530 for each projection property stores mapping information between a specific property and queries for projecting the property. For example, assuming that there are Q1 and Q2 as a query for projecting an attribute called temperature, mapping information in the form of (temperature, Q1, Q1) is stored in the query storage unit 530 for each projection attribute.

부모 질의 저장부(510)는 유도 가능한 질의의 특정 속성과 이 속성의 결과를 만들어내는 부모 질의들간의 매핑 정보를 저장한다. 예를 들어, 질의 Q3이 유도 가능한 질의이고, Q3의 온도라는 속성의 결과를 질의 Q4와 Q5가 만들어낸다면, ((Q3, 온도), Q4, A5)과 같은 형태의 매핑 정보가 저장된다.The parent query store 510 stores mapping information between a specific attribute of the inducible query and the parent queries that produce the result of this attribute. For example, if query Q3 is an inducible query, and queries Q4 and Q5 produce the result of the attribute of temperature of Q3, mapping information of the form ((Q3, temperature), Q4, A5) is stored.

실행중인 질의 저장부(530)와 유도 질의 저장부(520)는 각각 센서 네트워크에서 현재 실행중인 질의들의 정보와 실행중인 질의로부터 결과를 유도할 수 있는 질의들의 정보를 저장한다.The executing query storage unit 530 and the derived query storage unit 520 respectively store information of queries currently executing in the sensor network and information of queries capable of deriving a result from the executing query.

이와 같은 시스템 상에서 사용자 또는 응용 프로그램이 새로운 질의를 요청했을 때, 질의가 처리되는 과정에 대하여 도 2를 참조로 설명하기로 한다.When a user or an application program requests a new query on such a system, a process of processing the query will be described with reference to FIG. 2.

도 2는 본 발명의 실시예에 따른 질의 처리 시스템에서 질의가 처리되는 과정을 나타낸 흐름도이다.2 is a flowchart illustrating a process of processing a query in a query processing system according to an exemplary embodiment of the present invention.

도 2에 도시된 바와 같이, 질의 수신부(100)는 사용자 또는 응용 프로그램으로부터 새로 요청된 질의를 수신한다(S100). S100 단계에서 새로운 질의를 받아들이면, 질의 최적화부(200)는 센서 네트워크에서 실행중이던 질의들을 이용하여 새로 요청된 질의의 결과를 유도해낼 수 있는지 여부를 검사한다(S110). 질의 최적화부(200)는 S110 단계의 검사를 바탕으로 새로 요청된 질의의 결과를 센서 네트워크 에서 실행중인 질의들의 결과로부터 유도해낼 수 있는지를 판단한다(S120).As shown in FIG. 2, the query receiving unit 100 receives a newly requested query from a user or an application program (S100). If the new query is accepted in step S100, the query optimizer 200 checks whether it is possible to derive the result of the newly requested query using the queries executed in the sensor network (S110). The query optimizer 200 determines whether it is possible to derive the result of the newly requested query from the results of the queries executed in the sensor network based on the check of the step S110 (S120).

여기서 S110 단계의 검사를 위해 새로 요청된 질의의 결과를 유도해 낼 가능성을 지닌 후보 질의 집합을 구성하는 과정에 대하여 도 3을 참조로 설명하기로 한다.Herein, a process of constructing a candidate query set having a possibility of deriving a result of a newly requested query for checking in step S110 will be described with reference to FIG. 3.

도 3은 본 발명의 실시예에 따른 후보 질의 집합을 구성하는 과정에 대한 흐름도이다.3 is a flowchart illustrating a process of constructing a candidate query set according to an embodiment of the present invention.

도 3에 도시된 바와 같이, 후보 질의 집합 구성기(210)는 우선 새로 요청된 질의의 실행 주기마다 질의 결과를 보내줄 수 있는 질의들을 추출한다. 이를 위해, 실행중인 질의 저장부(530)에 등록되어 있는 각 질의의 실행 주기와 새로 요청된 질의의 실행 주기를 검사한다(S300). 후보 질의 집합 구성기(210)는 S300단계의 검사를 바탕으로, 실행 중인 질의 저장부(530)에 등록되어 있는 각 질의의 실행 주기가 새로 요청된 질의의 실행 주기의 약수인지 판단한다(S310).As shown in FIG. 3, the candidate query set constructor 210 first extracts queries that can send a query result at each execution cycle of a newly requested query. To this end, the execution cycle of each query registered in the executing query storage unit 530 and the execution cycle of the newly requested query are examined (S300). The candidate query set generator 210 determines whether the execution cycle of each query registered in the query storage unit 530 being executed is a divisor of the execution cycle of the newly requested query, based on the check in operation S300 (S310). .

S310의 판단 결과, 실행 중인 질의 저장부(530)에 등록되어 있는 특정 질의의 실행 주기가 새로 요청된 실행 주기의 약수이면, 후보 질의 집합 구성기(210)는 이 질의의 조건과 새로 요청된 질의의 조건간에 일부분이라도 겹치는 부분이 있는지 여부에 대한 조건을 검사한다(S320). 예를 들어, 새로 요청된 질의의 조건이 "온도 > 10" 기존에 실행중인 특정 질의 조건이 "온도 < 20"이라면, 이 두 질의의 조건은 겹치는 부분(11 ≤ 온도 ≤ 19)이 있는 것으로 판단한다. 따라서, 후보 질의 집합 구성기(210)는 303의 검사를 바탕으로, 기존에 실행중인 특정 질의의 조건이 새로 요청된 질의의 조건과 일부분이라도 겹쳐지는지를 판단한다(S330).As a result of the determination of S310, if the execution cycle of the specific query registered in the executing query storage unit 530 is a divisor of the newly requested execution cycle, the candidate query set constructor 210 determines the condition of the query and the newly requested query. The condition of whether there is an overlap even in part even between the conditions of the condition is checked (S320). For example, if the condition of the newly requested query is "Temperature> 10", and the specific existing query condition is "Temperature <20", the conditions of these two queries are determined to have overlapping portions (11 ≤ temperature ≤ 19). do. Accordingly, the candidate query set generator 210 determines whether the condition of the specific query that is being executed overlaps with the condition of the newly requested query based on the check of 303 (S330).

S330단계의 판단 결과, 새로 요청된 질의의 조건과 일부분이라도 겹치는 부분이 있다고 판단된 질의는, 새로 요청된 질의의 결과를 유도해 낼 가능성을 지닌 질의들의 집합인 후보 질의 집합에 등록한다(S340). 여기서 후보 질의 집합은 후보 질의 집합 구성기(210)에 저장된다. 반면, S310 단계에서의 판단 결과 새로 요청된 질의의 실행 주기의 약수가 아닌 실행 주기를 갖는 질의이거나, S330단계에서의 판단 결과 새로 요청된 질의의 조건과 겹치는 부분이 없는 질의는 후보 질의 저장부(210)에 등록되지 않는다.As a result of the determination in step S330, the query determined to have a part overlapping with the condition of the newly requested query is registered in the candidate query set which is a set of queries having the possibility of deriving the result of the newly requested query (S340). . Here, the candidate query set is stored in the candidate query set constructor 210. On the other hand, the determination result in step S310 is a query having an execution cycle that is not an abbreviation of the execution cycle of the newly requested query, or the query having no part overlapping the condition of the newly requested query as a result of determination in step S330 is a candidate query storage unit ( Not registered at 210).

다음 상기 도 2의 S120 단계의 판단 결과, 새로 요청된 질의의 결과를 센서 네트워크에서 기존에 실행중인 질의들의 결과로부터 유도 가능하다면, 질의 결과 유도부(400)는 새로 요청된 질의의 결과를 센서 네트워크에서 실행중인 질의들의 결과로부터 유도해낸다(S130). 그러나, 기존에 실행중인 질의들의 결과로부터 유도가 불가능하다고 판단되면, 질의 최적화부(200)는 새로 요청된 질의와 센서 네트워크에서 실행중인 질의를 병합했을 때의 이익을 계산한다(S140). S140 단계에서의 계산을 통해 질의 최적화부(200)는 새로 요청된 질의를 센서 네트워크에서 실행중인 질의와 병합하여 실행시키는 것이 이익인지, 아니면 새로 요청된 질의만 실행시키는 것이 이익인지 산출할 수 있다.Next, if the determination result of step S120 of FIG. 2 indicates that the result of the newly requested query can be derived from the results of the queries already executed in the sensor network, the query result deriving unit 400 returns the result of the newly requested query in the sensor network. Derived from the results of running queries (S130). However, if it is determined that derivation is not possible from the results of existing queries, the query optimizer 200 calculates the benefit of merging the newly requested query with the query running in the sensor network (S140). Through the calculation at step S140, the query optimizer 200 may calculate whether it is beneficial to merge and execute the newly requested query with the query being executed in the sensor network or whether it is advantageous to execute only the newly requested query.

질의 최적화부(200)는 S140 단계에서의 계산 결과를 토대로 질의 병합이 이익인지 여부를 판단하고(S150), 이미 실행중인 질의와 병합하는 것이 이익이라고 판단하면 질의 최적화부(200)는 병합될 기존의 질의를 센서 네트워크에서 실행 중지시킨다(S160). 이와 동시에 중지된 질의의 정보를 실행중인 질의 저장부(530), 프로젝션 속성별 질의 저장부(540), 부모 질의 저장부(510)의 목록에서 삭제한다.The query optimizer 200 determines whether the query merging is profit based on the calculation result at step S140 (S150), and if it is determined that merging with a query that is already being executed is a benefit, the query optimizer 200 may merge the existing query. The query is stopped in the sensor network (S160). At the same time, the information of the suspended query is deleted from the list of the query storage unit 530, the query storage unit 540 for each projection attribute, and the parent query storage unit 510 that are being executed.

질의 최적화부(200)는 새로 요청된 질의와 실행이 중지된 기존 질의를 병합한 뒤, 병합된 질의로부터 결과를 유도해낼 질의들을 유도 질의 저장부(520)와 부모 질의 저장부(510)에 등록한다(S170). 그리고 병합된 질의를 질의 실행부(300)에 전달하여 센서 네트워크에서 실행될 수 있도록 한다. 그리고 나서 질의 실행부(300)는 병합된 질의를 실행시키면서 병합된 질의의 정보를 실행 중인 질의 저장부(530)와 프로젝션 속성별 질의 저장부(540)에 등록한다(S180).The query optimizer 200 merges the newly requested query with the existing query whose execution is stopped, and then registers the queries to derive the results from the merged query in the derived query storage unit 520 and the parent query storage unit 510. (S170). Then, the merged query is transferred to the query executing unit 300 so that the merged query can be executed in the sensor network. Then, the query execution unit 300 registers the information of the merged query in the query storage unit 530 and the projection storage unit 540 for each projection property while executing the merged query (S180).

한편, S150 단계의 판단 결과 새로 요청된 질의를 센서 네트워크에서 실행중인 질의와 병합하는 것이 이익이 없다고 판단하면, 질의 최적화부(200)는 새로 요청된 질의를 질의 실행부(300)에 전달한다. 새로 요청된 질의가 직접 프로젝션하지 않더라도, 조건을 통해 특정 속성 값을 알아낼 수 있기 때문에, 질의 실행부(300)는 이러한 경우를 처리하기 위해 새로 요청된 질의가 프로젝션하지는 않지만 조건으로부터 값을 알아낼 수 있는 속성이 있는지를 검사한다. 만약 속성이 있다면, 해당 속성과 새로 요청된 질의를 프로젝션 속성별 질의 저장부(540)에 등록한다(S190).On the other hand, if the determination result of step S150 determines that there is no benefit in merging the newly requested query with the query running in the sensor network, the query optimizer 200 transmits the newly requested query to the query execution unit 300. Even if the newly requested query is not directly projected, since the specific attribute value can be found through the condition, the query executing unit 300 can find the value from the condition, although the newly requested query does not project to handle such a case. Check for the existence of an attribute. If there is an attribute, the attribute and the newly requested query are registered in the query storage unit 540 for each projection attribute (S190).

예를 들어, 새로 요청된 질의의 조건이 "온도 = 10"이고 온도 속성을 프로젝션하지 않는다고 가정하면, 이 질의의 결과로부터 온도가 10이라는 것을 알 수 있다. 따라서 질의 실행부(300)는 새로 요청된 질의가 프로젝션 속성별 질의 저장부(540)에 온도 속성을 프로젝션 하는 질의로 새로 등록될 수 있도록 전달한다.For example, assuming that the condition of the newly requested query is "temperature = 10" and do not project the temperature attribute, the result of this query shows that the temperature is 10. Therefore, the query executing unit 300 transmits the newly requested query to be newly registered as a query projecting the temperature attribute to the projection storage unit 540 for each projection attribute.

그 후, 질의 실행부(300)는 새로 요청된 질의를 센서 네트워크에서 실행시킨 다(S200). 질의 실행부(300)는 새로 요청된 질의를 실행하면서, 새로 요청된 질의의 정보를 실행 중인 질의 저장부(530)와 프로젝션 속성별 질의 저장부(540)에 등록한다.Thereafter, the query executing unit 300 executes the newly requested query in the sensor network (S200). The query executing unit 300 registers the information of the newly requested query in the query storage unit 530 and the projection storage unit 540 for each projection attribute while executing the newly requested query.

다음은 유도 가능성 검사기(220)가 상기에서 설명한 도 3의 절차를 통해 새로 요청된 질의의 결과를 만들어 낼 가능성을 가진 후보 질의 집합을 후보 질의 집합 구성기(210)로부터 전달받았을 때, 후보 질의 집합에 속한 질의들이 실제로 새로 요청된 질의의 결과를 유도해낼 수 있는지를 검사하는 과정에 대하여 도 4를 참조로 설명하기로 한다.Next, when the inducibility checker 220 receives the candidate query set from the candidate query set constructor 210 having the possibility of producing the result of the newly requested query through the procedure of FIG. 3 described above, the candidate query set. A process of checking whether the queries belonging to can actually derive the result of the newly requested query will be described with reference to FIG. 4.

도 4는 본 발명의 실시예에 따른 새로 요청된 질의의 결과를 유도해낼 수 있는지 검사하는 과정에 대한 흐름도이다.4 is a flowchart illustrating a process of checking whether a result of a newly requested query can be derived according to an embodiment of the present invention.

도 4에 도시된 바와 같이, 유도 가능성 검사기(220)는 새로 요청된 질의가 프로젝션 하는 속성들(도 4에서 '속성 a'로 표기)에 대해, 후보 질의 집합에서 해당 속성을 프로젝션 하는 질의들을 선택한다. 그리고 나서 선택한 질의들의 조건들에 대한 합집합을 구한 후, 구한 합집합이 새로 요청된 질의의 조건을 부분집합으로 포함하는지 검사한다(S400). As shown in FIG. 4, the inducibility checker 220 selects queries that project the attribute from the candidate query set for the attributes (denoted as 'attribute a' in FIG. 4) projected by the newly requested query. do. Then, after obtaining the union of the conditions of the selected queries, it is checked whether the obtained union includes the conditions of the newly requested query as a subset (S400).

그리고 나서 유도 가능성 검사기(220)는 S400단계의 검사를 바탕으로 후보 질의 집합에 속한 질의들이 새로 요청된 질의의 조건을 포함하는지 판단한다(S410). 이때, 새로 요청된 질의가 프로젝션 하는 속성 중에 조건을 만족하지 못하는 속성이 하나라도 있다면, S410 단계에서는 조건을 만족하지 못한다고 판단한다. Then, the inducibility checker 220 determines whether the queries belonging to the candidate query set include the conditions of the newly requested query, based on the check in step S400 (S410). At this time, if there is at least one attribute that does not satisfy the condition among the attributes projected by the newly requested query, it is determined in step S410 that the condition is not satisfied.

S410 단계의 판단 결과 후보 질의 집합에 속한 질의들이 새로 요청된 질의의 조건을 포함하는 것으로 판단하면, 새로 요청된 질의가 프로젝션하는 각 속성에 대해 해당 속성을 프로젝션 하는 후보 질의 집합의 질의들을 부모 질의 저장부(510)에 등록한다(S430). 그리고 유도 가능성 검사기(220)는 새로 요청된 질의가 프로젝션하지는 않지만 조건에는 포함되어 있는 각 속성들(도 4에서는 '속성 b'로 표기)에 대해, 후보 질의 집합에 속한 질의들 중 해당 속성을 프로젝션 하는 질의들을 선택한 후, 선택한 질의들의 조건들에 대한 합집합을 구한다.If it is determined in step S410 that the queries belonging to the candidate query set include the condition of the newly requested query, the queries of the candidate query set projecting the corresponding attribute for each attribute projected by the newly requested query are stored in the parent query. It registers to the unit 510 (S430). In addition, the derivability checker 220 projects the corresponding property among the queries belonging to the candidate query set for each property (marked as 'attribute b' in FIG. 4) included in the condition, although the newly requested query is not projected. After selecting the queries to perform, the union of the conditions of the selected queries is obtained.

유도 가능성 검사기(220)는 이렇게 구한 합집합이 새로 요청된 질의의 조건을 부분 집합으로 포함하는지 검사한다(S440). 405의 검사를 바탕으로, 유도 가능성 검사기(220)는 후보 질의 집합에 속한 질의들이 새로 요청된 질의의 조건을 포함하는지 판단한다(S450). 새로 요청된 질의가 프로젝션하지는 않지만 조건에는 포함되어 있는 속성들 중 조건을 만족하지 못하는 속성이 하나라도 있다면, 406에서는 조건을 만족하지 못한다고 판단한다.The derivability checker 220 checks whether the union thus obtained includes a condition of a newly requested query as a subset (S440). Based on the check of 405, the inducibility checker 220 determines whether the queries belonging to the candidate query set include the condition of the newly requested query (S450). If the newly requested query is not projected but there is one attribute in the condition that does not satisfy the condition, 406 determines that the condition is not satisfied.

S450 단계의 판단 결과 새로 요청된 질의의 조건을 만족한다고 판단하면, 새로 요청된 질의가 프로젝션하지는 않지만 조건에는 포함되어 있는 각 속성에 대해, 해당 속성을 프로젝션 하는 후보 질의 집합의 질의들을 부모 질의 저장부(510)에 등록한다(S460). 그 후, 유도 가능성 검사기(220)는 실행중인 질의 저장부(530)에 속한 질의들의 결과를 활용하여 새로 요청된 질의의 결과를 유도해낼 수 있다는 결정을 내린다(S470). 그리고 새로 요청된 질의는 유도 질의 저장부(520)에 등록된다(S480_.If it is determined in step S450 that the condition of the newly requested query is satisfied, the parent query storage unit queries the candidate query set for projecting the corresponding attribute for each attribute not newly projected but included in the condition. It registers to the 510 (S460). Thereafter, the derivability checker 220 determines that the result of the newly requested query can be derived using the results of the queries belonging to the query storage unit 530 being executed (S470). The newly requested query is registered in the derived query storage unit 520 (S480_).

S410 단계와 S450 단계에서의 판단 결과, 후보 질의 집합에 속한 질의들이 새로 요청된 질의의 조건을 만족할 수 없다고 판단하면, 유도 가능성 검사기(220)는 새로 요청된 질의의 결과를 유도해낼 수 없다고 판단한다(S420). 단, 406에서 조건을 만족하지 못한다고 판단한 경우에는 S440 단계를 통해 부모 질의 저장부(510)에 등록된 정보도 있을 수 있기 때문에, 해당 정보를 부모 질의 저장부(510)에서 삭제한다.As a result of the determination in steps S410 and S450, if it is determined that the queries belonging to the candidate query set cannot satisfy the conditions of the newly requested query, the inducibility checker 220 determines that the result of the newly requested query cannot be derived. (S420). However, if it is determined in step 406 that the condition is not satisfied, since there may be information registered in the parent query storage unit 510 through step S440, the corresponding information is deleted from the parent query storage unit 510.

다음은 도 2의 S130 단계에서 언급한 바와 같이, 센서 네트워크에서 실행중인 질의들이 질의의 결과를 보내왔을 때, 질의 결과 유도부(400)가 유도 질의 저장부(520)에 속한 질의들의 결과를 유도해내는 과정에 대하여 도 5를 참조로 설명하기로 한다.Next, as mentioned in step S130 of FIG. 2, when the queries executed in the sensor network send the results of the query, the query result deriving unit 400 derives the results of the queries belonging to the deriving query storage unit 520. The process of making will be described with reference to FIG. 5.

도 5는 본 발명의 실시예에 따른 질의들의 결과를 유도해내는 과정에 대한 흐름도이다.5 is a flowchart illustrating a process of deriving the results of queries according to an embodiment of the present invention.

도 5에 도시된 바와 같이, 질의 결과 유도부(400)는 센서 네트워크에서 실행되는 질의는 각 질의에 기술된 실행 주기마다 질의의 결과를 수신한다(S500). 질의 결과 유도부(400)는 질의 결과를 수신하면, 유도 질의 저장부(520)에 속한 질의들 중 현재 실행 주기에 결과를 수신해야 하는 질의들을 부모 질의 저장부(510)에 있는 정보를 통해 선별한다(S510).As illustrated in FIG. 5, the query result deriving unit 400 receives a query result for each execution cycle described in each query for the query executed in the sensor network (S500). When the query result deriving unit 400 receives the query result, the query result deriving unit 400 selects queries which should receive the result in the current execution cycle among the queries belonging to the deriving query storing unit 520 through the information in the parent query storing unit 510. (S510).

현재 실행 주기에 결과를 수신해야 하는 질의들이 선별되면, 센서 네트워크에서 실행중인 질의들이 보내온 질의 결과를 필터링하기 위해 결과를 유도할 질의의 조건을 질의 결과에 적용시킨다(S520). 그 후, 결과를 유도할 질의가 프로젝션 하는 속성을 걸러내기 위해, S520 단계에서 필터링된 질의 결과를 프로젝션 한다(S530). 그리고 여러 질의로부터 수신한 질의 결과를 하나로 모으기 위해 필터링과 프로젝션을 거친 질의 결과를 조인하여, 질의의 결과를 유도해낸다(S540).When the queries to receive the results in the current execution cycle are selected, the condition of the query to derive the results is applied to the query results in order to filter the query results sent by the queries running in the sensor network (S520). Thereafter, to filter the attributes projected by the query to derive the result, the filtered query result is projected in step S520 (S530). In order to aggregate the query results received from the various queries into one, the query results which have been filtered and projected are joined to derive the query results (S540).

SQL 형태의 질의를 사용하여 실제로 본 발명의 실시예에 따른 질의 처리 방법에 대하여 설명하기 위해, 센서 네트워크에서 현재 5개의 질의 Q1, Q2, Q3, Q4 및 Q5가 실행중이고, 각각의 질의들이 아래 수학식 1과 같다고 가정한다.In order to actually explain a query processing method according to an embodiment of the present invention using an SQL type query, five queries Q1, Q2, Q3, Q4 and Q5 are currently running in the sensor network, and the respective queries are Assume that it is equal to Equation 1.

Q1:SELECT x FROM sensors WHERE x<10 SAMPLE PERIOD 8sQ1: SELECT x FROM sensors WHERE x <10 SAMPLE PERIOD 8s

Q2:SELECT y FROM sensors WHERE 0<x<5 SAMPLE PERIOD 4sQ2: SELECT y FROM sensors WHERE 0 <x <5 SAMPLE PERIOD 4s

Q3:SELECT x, y FROM sensors WHERE y<=15 SAMPLE PERIOD 8sQ3: SELECT x, y FROM sensors WHERE y <= 15 SAMPLE PERIOD 8s

Q4:SELECT x, y FROM sensors WHERE 5<=x and y<=5 SAMPLE PERIOD 2sQ4: SELECT x, y FROM sensors WHERE 5 <= x and y <= 5 SAMPLE PERIOD 2s

Q5:SELECT x FROM sensors WHERE 7<x SAMPLE PERIOD 3sQ5: SELECT x FROM sensors WHERE 7 <x SAMPLE PERIOD 3s

이와 같은 질의들은 실행중인 질의 저장부(530)에 저장되어 있다 프로젝션 속성별 질의 저장부(540)에는 이들 질의들의 프로젝션 속성과 각 속성을 프로젝션 시키는 질의들의 매핑 정보가 저장되어 있다. 즉, 속성 x를 프로젝션 시키는 질의들은 Q1, Q3, Q4, Q5이고, 속성 y를 프로젝션 시키는 질의들은 Q2, Q3, Q4이므로 (x, Q1, Q3, Q4, Q5), (y, Q2, Q3, Q4)와 같은 형태로 저장된다.Such queries are stored in the executing query storage unit 530. In the query storage unit 540 for each projection attribute, projection attributes of these queries and mapping information of queries for projecting each attribute are stored. That is, the queries projecting the property x are Q1, Q3, Q4, Q5, and the queries projecting the property y are Q2, Q3, Q4, so (x, Q1, Q3, Q4, Q5), (y, Q2, Q3, Q4) is stored in the same form.

이 상태에서 사용자가 다음 수학식 2와 같은 질의 Qnew를 요청한다고 가정한다.In this state, it is assumed that the user requests the query Qnew as shown in Equation 2 below.

Qnew:SELECT x, y FROM sensors WHERE 0<x<10 and 0<y<10 SAMPLE PERIOD 8sQnew: SELECT x, y FROM sensors WHERE 0 <x <10 and 0 <y <10 SAMPLE PERIOD 8s

질의 수신부(100)는 수학식 2와 같은 새 질의를 수신하면, 질의 최적화부(200)는 후보 질의 집합 구성기(210)를 통해 후보 질의 집합을 구성한다. 후보 질의 집합을 구성할 때에는 도 3에서 설명한 과정을 거치며, Q5의 실행 주기(3s)는 Qnew 실행 주기(8s)의 약수가 아니기 때문에, 후보 질의 집합에서 제외된다. 따라서 도 3의 절차를 통해 구성된 후보 질의 집합은 Q1, Q2, Q3, Q4가 된다.When the query receiver 100 receives a new query as shown in Equation 2, the query optimizer 200 constructs a candidate query set through the candidate query set constructor 210. When constructing the candidate query set, the process described with reference to FIG. 3 is performed. Since the execution cycle 3s of Q5 is not a divisor of the Qnew execution cycle 8s, it is excluded from the candidate query set. Therefore, candidate query sets constructed through the procedure of FIG. 3 are Q1, Q2, Q3, and Q4.

유도 가능성 검사기(220)는 후보 질의 집합 구성기(210)에서 구성된 후보 질의 집합을 전달받아, Q1, Q2, Q3, Q4가 실제로 Qnew의 결과를 만들어 낼 수 있는지 여부를 검사한다. 이 검사는 상기에서 설명한 도 4의 절차를 따른다.The derivability checker 220 receives the candidate query set configured in the candidate query set constructor 210 and checks whether Q1, Q2, Q3, and Q4 can actually produce the result of Qnew. This test follows the procedure of FIG. 4 described above.

먼저 새 질의 Qnew가 프로젝션 하는 속성들은 x와 y이기 때문에, 이 속성들에 대해 도 4의 401에 나타낸 바와 같이 이 속성들을 프로젝션 하는 후보 질의들의 조건들의 합집합이 새로 요청된 질의의 조건을 포함하는지를 검사한다. 우선 후보 질의 집합에서 속성 x를 프로젝션 하는 질의들은 Q1, Q3, Q4이므로, 이 질의들의 조건들의 합집합이 Qnew의 조건을 포함하는지 검사한다.First, because the attributes projected by the new query Qnew are x and y, check whether the union of the conditions of the candidate queries projecting these attributes, as shown in 401 of FIG. 4 for these attributes, includes the conditions of the newly requested query. do. First, since the queries projecting the attribute x in the candidate query set are Q1, Q3, and Q4, it is checked whether the union of the conditions of these queries includes the condition of Qnew.

Q1, Q3, Q4의 조건들을 합집합하면 Qnew의 조건을 부분집합으로 포함하므로, 속성 x에 대한 검사는 통과한다. 속성 y를 프로젝션 하는 질의들은 Q2, Q3, Q4이고, 이 질의들의 조건들을 합집합하면 Qnew의 조건을 부분집합으로 포함하므로, 속성 y에 대한 검사도 통과된다. 결과적으로 각 속성 x, y에 대해 이 속성들을 프로젝션 하는 후보 질의들의 조건들의 합집합이 Qnew의 조건을 포함한다.If we combine the conditions of Q1, Q3, and Q4, we include the conditions of Qnew as a subset, so the check for attribute x passes. The queries projecting the property y are Q2, Q3, and Q4. When the conditions of these queries are combined, the condition of Qnew is included as a subset, so the check on the property y is also passed. As a result, the union of the conditions of candidate queries that project these attributes for each attribute x, y includes the condition of Qnew.

그리고 Q1, Q3, Q4는 Qnew의 속성 x에 대한 값을 만들어낼 질의로, Q2, Q3, Q4는 Qnew의 속성 x에 대한 값을 만들어낼 질의로 부모 질의 저장부(510)에 등록된다. 또한, Qnew에는 조건에만 나타난 속성이 없기 때문에, Qnew가 프로젝션하지 않지만 조건에는 포함된 각 속성에 대해 이 속성을 프로젝션 하는 후보 질의들의 조건들의 합집합이 새로 요청된 질의의 조건을 포함하는지 검사하는 부분도 만족된다. 최종적으로 Qnew는 유도 가능한 질의로 결정되고, 이 질의를 유도 질의 저장부(520)에 등록한다.Q1, Q3, and Q4 are registered in the parent query storage unit 510 as queries for generating a value for the property x of Qnew, and Q2, Q3, and Q4 are queries for generating a value for the property x of Qnew. Also, since Qnew has no attributes that appear only in conditions, the part that checks that the union of the conditions of candidate queries that project this attribute for each attribute included in Qnew does not project but contains the conditions of the newly requested query. Are satisfied. Finally, Qnew is determined to be an inducible query, and registers this query in the derived query storage 520.

이렇게 유도 질의 저장부(520)에 저장된 Qnew의 결과를 유도하는 과정은 상기에서 설명한 도 5의 절차를 따른다. 질의 결과 유도부(400)는 센서 네트워크로부터 질의 결과를 수신하면, 현재 실행 주기에 결과를 유도해야 하는 질의를 선별한다. 이때, Qnew가 선별되었다고 가정한다.The process of deriving the result of Qnew stored in the derivation query storage unit 520 follows the procedure of FIG. 5 described above. When the query result deriving unit 400 receives the query result from the sensor network, the query result deriving unit 400 selects a query to derive the result in the current execution cycle. In this case, it is assumed that Qnew has been selected.

Qnew의 결과를 유도하기 위한 부모 질의들을 부모 질의 저장부(510)에서 검색한다. 그 후, 질의 결과 유도부(400)는 수신한 질의 결과들 중에서 Qnew의 각 속성별 부모 질의들의 결과에 Qnew의 조건을 적용하여 필터링 한다. 필터링 결과가 만들어지면, Qnew의 속성별로 결과를 프로젝션 하는데, 본 발명의 실시예에서는 속성 x와 y를 각각 프로젝션한 결과가 만들어진다. 마지막으로 속성 x에 대해 프로젝션한 결과와 y에 대해 프로젝션한 결과를 조인하여 Qnew의 결과를 생성한다.Parent queries to retrieve Qnew's results are retrieved from the parent query storage unit 510. Thereafter, the query result deriving unit 400 applies Qnew's condition to the results of the parent queries for each property of Qnew among the received query results and filters the result. When the filtering result is generated, the result is projected for each attribute of Qnew. In the embodiment of the present invention, the result of projecting the attributes x and y is generated. Finally, the result of Qnew is generated by joining the result of projecting on property x with the result of projecting on y.

이상에서 설명한 본 발명의 실시예는 장치 및 방법을 통해서만 구현이 되는 것은 아니며, 본 발명의 실시예의 구성에 대응하는 기능을 실현하는 프로그램 또는 그 프로그램이 기록된 기록 매체를 통해 구현될 수도 있으며, 이러한 구현은 앞서 설명한 실시예의 기재로부터 본 발명이 속하는 기술분야의 전문가라면 쉽게 구현할 수 있는 것이다. The embodiments of the present invention described above are not implemented only through the apparatus and the method, but may be implemented through a program for realizing a function corresponding to the configuration of the embodiment of the present invention or a recording medium on which the program is recorded. Implementation may be easily implemented by those skilled in the art from the description of the above-described embodiments.

이상에서 본 발명의 실시예에 대하여 상세하게 설명하였지만 본 발명의 권리범위는 이에 한정되는 것은 아니고 다음의 청구범위에서 정의하고 있는 본 발명의 기본 개념을 이용한 당업자의 여러 변형 및 개량 형태 또한 본 발명의 권리범위에 속하는 것이다.Although the embodiments of the present invention have been described in detail above, the scope of the present invention is not limited thereto, and various modifications and improvements of those skilled in the art using the basic concepts of the present invention defined in the following claims are also provided. It belongs to the scope of rights.

도 1은 본 발명의 실시예에 따른 센서 네트워크 환경에서의 질의 처리 시스템의 전체 구조도이다. 1 is an overall structure diagram of a query processing system in a sensor network environment according to an embodiment of the present invention.

도 2는 본 발명의 실시예에 따른 질의 처리 시스템에서 질의가 처리되는 과정을 나타낸 흐름도이다.2 is a flowchart illustrating a process of processing a query in a query processing system according to an exemplary embodiment of the present invention.

도 3은 본 발명의 실시예에 따른 후보 질의 집합을 구성하는 과정에 대한 흐름도이다.3 is a flowchart illustrating a process of constructing a candidate query set according to an embodiment of the present invention.

도 4는 본 발명의 실시예에 따른 새로 요청된 질의의 결과를 유도해낼 수 있는지 검사하는 과정에 대한 흐름도이다.4 is a flowchart illustrating a process of checking whether a result of a newly requested query can be derived according to an embodiment of the present invention.

도 5는 본 발명의 실시예에 따른 질의들의 결과를 유도해내는 과정에 대한 흐름도이다.5 is a flowchart illustrating a process of deriving the results of queries according to an embodiment of the present invention.

Claims (10)

센서 네트워크 환경에서 질의를 처리하는 시스템에 있어서,In a system for processing a query in a sensor network environment, 새로 요청된 질의를 수신하여 전달하는 질의 수신부;A query receiving unit for receiving and transmitting a newly requested query; 상기 질의 수신부에서 전달된 새로 요청된 질의를 실행하기 위해 후보 질의들을 추출하고, 추출한 후보 질의로부터 상기 요청된 질의의 결과를 유도할 수 있는지 여부 또는 상기 요청된 질의와 실행되고 있는 질의의 병합 여부를 판단하는 질의 최적화부;Candidate queries are extracted to execute the newly requested query delivered from the query receiver, and whether the result of the requested query can be derived from the extracted candidate query or whether the requested query is merged with the query being executed. A query optimizer for determining; 현재 실행되고 있는 질의들의 정보, 임의의 속성을 프로젝션 시키는 질의들간 매핑 정보, 특정 속성의 결과를 만들어내는 부모 질의들간의 매핑 정보 및 상기 새로 요청된 질의의 결과를 유도할 수 있는 유도 가능한 질의 정보를 저장하는 질의 저장부;Information about the queries currently being executed, mapping information between queries projecting an arbitrary attribute, mapping information between parent queries producing a result of a specific attribute, and inducible query information that can derive the result of the newly requested query. A query storage unit for storing; 상기 새로 요청된 질의가 원하는 실행 주기마다 상기 질의 저장부에 저장되어 있는 질의 결과를 조합하여, 질의 결과를 유도하는 질의 결과 유도부; 및A query result deriving unit for deriving a query result by combining query results stored in the query storage unit at every desired execution period of the newly requested query; And 상기 질의 최적화부에서 후보 집합에 속한 질의들로부터 유도가 불가능하다고 판단된 질의들을 실행하는 질의 실행부A query execution unit that executes queries determined to be impossible to derive from queries belonging to the candidate set by the query optimizer 를 포함하는 질의 처리 시스템.Query processing system comprising a. 제1항에 있어서,The method of claim 1, 상기 질의 저장부는,The query storage unit, 현재 센서 네트워크에서 실행되고 있는 질의들의 정보를 저장하는 실행중인 질의 저장부;A running query storage unit for storing information of queries currently being executed in the sensor network; 임의의 속성과 상기 임의의 속성을 프로젝션 시키는 질의들 간의 매핑 정보를 저장하는 프로젝션 속성별 질의 저장부;A projection storage unit for each projection attribute that stores mapping information between arbitrary attributes and queries for projecting the arbitrary attributes; 유도 가능한 질의의 특정 속성과 상기 특정 속성의 결과를 만들어내는 부모 질의들간의 매핑 정보를 저장하는 부모 질의 저장부; 및A parent query storage unit for storing mapping information between a specific attribute of an inducible query and a parent query producing a result of the specific attribute; And 상기 요청된 질의의 결과를 유도할 수 있는 유도 가능한 질의 정보를 저장하는 유도 질의 저장부A derivation query storage unit for storing derivable query information capable of deriving a result of the requested query 를 포함하는 질의 처리 시스템.Query processing system comprising a. 제2항에 있어서,The method of claim 2, 상기 질의 최적화부는,The query optimizer, 센서 네트워크에서 실행되고 있는 질의들 중 상기 요청된 질의의 결과를 만들어낼 수 있는 후보 질의들을 추출하는 후보 질의 집합 구성기;A candidate query set constructer for extracting candidate queries from among queries executed in a sensor network that can produce a result of the requested query; 상기 후보 질의 집합 구성기가 추출한 후보 질의들이 상기 요청되는 질의의 결과를 유도할 수 있는지 검사하고, 상기 요청되는 질의가 상기 후보 질의들로부터 유도가 가능한지 여부와, 상기 요청된 질의와 상기 실행되고 있는 질의들의 병합 여부를 판단하는 유도 가능성 검사기; 및Examines whether candidate queries extracted by the candidate query set constructor can derive the result of the requested query, whether the requested query can be derived from the candidate queries, and the requested query and the query being executed Induction probability checker for determining whether or not to merge; And 상기 요청된 질의와 실행중인 질의를 병합하는 질의 병합기A query merger for merging the requested query with a running query 를 포함하는 질의 처리 시스템.Query processing system comprising a. 센서 네트워크 환경에서의 질의를 처리하는 방법에 있어서,In the method for processing a query in a sensor network environment, 새로운 질의의 처리를 요청 받는 단계;Receiving a request for processing a new query; 상기 새로운 질의에 대한 실행 주기를 토대로 미리 저장되어 있는 다수의 질의로부터 후보 질의 집합을 구성하는 단계;Constructing a candidate query set from a plurality of previously stored queries based on an execution cycle for the new query; 상기 구성한 후보 질의 집합에 속한 질의들의 실행 주기와 질의 조건을 토대로 상기 새로운 질의의 결과를 생성할 수 있는지 검사하는 단계; 및Checking whether a result of the new query can be generated based on an execution cycle and query conditions of the queries belonging to the configured candidate query set; And 상기 새로운 질의의 결과를 생성할 수 있다고 판단하면, 상기 실행 주기마다 발생하는 질의의 결과를 토대로 후보 질의 집합으로부터 상기 새로운 질의의 결과를 유도하는 단계If it is determined that a result of the new query can be generated, deriving a result of the new query from a candidate query set based on a result of the query generated at each execution cycle; 를 포함하는 질의 처리 방법.Query processing method comprising a. 제4항에 있어서,5. The method of claim 4, 상기 후보 질의 집합을 구성하는 단계는,Comprising the candidate query set, 상기 새로운 질의의 상기 실행 주기를 검사하는 단계;Checking the execution cycle of the new query; 다수의 질의 중 상기 실행 주기의 약수에 해당하는 주기를 갖는 질의들을 후보 질의 집합으로 구성하는 단계;Constructing a candidate query set of queries having a period corresponding to a divisor of a plurality of queries; 상기 구성한 후보 질의 집합에 대한 조건이 상기 새로운 질의의 조건과 일부 유사한지 판단하는 단계; 및Determining whether a condition for the configured candidate query set is partially similar to a condition of the new query; And 일부 유사하다고 판단하면 선택한 후보 질의를 후보 질의 저장부에 등록하는 단계If it is determined to be similar, registering the selected candidate query in the candidate query storage. 를 포함하는 질의 처리 방법.Query processing method comprising a. 제4항에 있어서,5. The method of claim 4, 상기 검사하는 단계는,The checking step, 상기 새로운 질의가 프로젝션 하는 제1 속성에 대해 상기 후보 질의 집합에서 상기 제1 속성을 프로젝션 하는 질의들을 선택하여, 선택한 질의들의 조건들의 합집합을 구하는 단계;Selecting a query projecting the first attribute from the candidate query set with respect to the first attribute projected by the new query to obtain a union of conditions of the selected queries; 상기 구한 합집합이 상기 새로운 질의의 조건을 부분집합으로 포함하는지 검사하는 단계;Checking whether the obtained union includes a condition of the new query as a subset; 상기 제1 속성이 상기 합집합에 포함되지 않으면, 상기 새로운 질의는 유도 불가능한 질의로 결정하는 단계If the first attribute is not included in the union, determining the new query as a non-derivable query 를 포함하는 질의 처리 방법.Query processing method comprising a. 제6항에 있어서,The method of claim 6, 상기 제1 속성이 상기 합집합에 포함되면, 상기 제1 속성을 프로젝션 하는 후보 질의 집합의 질의들을 부모 질의 집합에 등록하는 단계;If the first attribute is included in the union, registering the queries of the candidate query set projecting the first attribute into a parent query set; 상기 새로운 질의가 프로젝션하지 않지만 조건에 포함되어 있는 제2 속성에 대해, 후보 질의 집합에 속한 질의들 중 상기 제2 속성을 프로젝션 하는 질의들을 선택하여 합집합을 구하는 단계;Obtaining a union by selecting queries that project the second attribute from among queries belonging to a candidate query set, with respect to a second attribute not projected by the new query; 상기 합집합이 상기 새로운 질의의 조건을 부분집합으로 포함하는지 판단하 는 단계;Determining if the union includes the condition of the new query as a subset; 상기 합집합이 상기 새로운 질의의 조건을 포함하면, 상기 제2 속성을 프로젝션 하는 후보 질의 집합의 질의들을 상기 부모 질의 집합에 등록하는 단계; 및If the union includes a condition of the new query, registering queries of the candidate query set projecting the second attribute with the parent query set; And 상기 새로운 질의가 현재 실행중인 질의 집합에 속한 질의들의 결과를 활용하여 유도할 수 있다고 결정하고, 상기 새로운 질의를 유도 질의 저장부에 저장하는 단계Determining that the new query can be derived using the results of queries belonging to the currently executing query set, and storing the new query in the derived query storage unit. 를 포함하는 질의 처리 방법.Query processing method comprising a. 제4항에 있어서,5. The method of claim 4, 상기 유도하는 단계는,The deriving step, 현재 실행되는 질의의 실행 주기마다 발생하는 질의의 결과를 수신하는 단계;Receiving a result of a query that occurs at each execution cycle of a currently executed query; 상기 새로운 질의가 상기 실행 주기에 결과를 유도해야 하는 질의에 속하면, 상기 새로운 질의의 결과를 유도하기 위한 부모 질의들을 부모 질의 저장부에서 검색하는 단계;If the new query belongs to a query whose results are to be derived in the execution cycle, retrieving parent queries in a parent query storage unit for deriving a result of the new query; 상기 수신한 질의의 결과 중, 상기 검색한 부모 질의의 결과에 상기 새로운 질의의 조건을 적용하여 필터링 하는 단계;Filtering and applying a condition of the new query to a result of the retrieved parent query among results of the received query; 필터링 결과에 속한 부모 질의에 상기 새로운 질의의 속성 별로 프로젝션 하는 단계;Projecting each property of the new query to a parent query belonging to a filtering result; 상기 프로젝션한 결과를 조인하여 상기 새로운 질의를 유도하는 단계Joining the projected result to derive the new query 를 포함하는 질의 처리 방법.Query processing method comprising a. 제4항에 있어서,5. The method of claim 4, 상기 새로운 질의의 결과를 생성할 수 없다고 판단하면,If it is determined that the result of the new query cannot be generated, 상기 새로운 질의와 현재 실행중인 질의를 병합했을 때의 이익을 계산하는 단계;Calculating a benefit of merging the new query with the currently executing query; 상기 새로운 질의와 상기 현재 실행중인 질의의 병합이 이익이라고 판단하면, 병합될 질의의 실행을 중지시키는 단계;If it is determined that merging the new query with the currently running query is a benefit, stopping execution of the query to be merged; 실행을 중지시킨 질의를 실행중인 질의 저장부, 프로젝션 속성별 질의 저장부, 부모 질의 저장부에서 삭제하는 단계;Deleting the query that has been suspended from the query storage unit, the query storage unit for each projection attribute, and the parent query storage unit; 상기 새로운 질의와 상기 실행을 중지시킨 질의를 병합하고, 병합한 질의로부터 결과를 유도해 낼 질의들을 유도 질의 저장부에 등록하는 단계; 및Merging the new query with the query that has stopped execution and registering the queries to derive the results from the merged query in a derived query storage; And 상기 병합한 질의를 실행하는 단계Executing the merged query 를 포함하는 질의 처리 방법.Query processing method comprising a. 제9항에 있어서,10. The method of claim 9, 상기 새로운 질의와 상기 현재 실행중인 질의의 병합하지 않는 것이 이익이라고 판단하면, 상기 새로운 질의가 프로젝션하지 않지만 조건으로부터 값을 알아낼 수 있는 속성이 있는지 검사하는 단계;If it is determined that it is beneficial to not merge the new query with the currently running query, checking that the new query is not projected but has an attribute from which a value can be derived; 속성이 있다면, 해당 속성과 새로운 질의를 프로젝션 속성별 질의 저장부에 등록하는 단계; 및If there is an attribute, registering the attribute and a new query in a query storage for each projection attribute; And 상기 새로운 질의를 실행하는 단계Executing the new query 를 포함하는 질의 처리 방법.Query processing method comprising a.
KR1020080126102A 2008-12-11 2008-12-11 Query processing method and system for sensor networks KR101044807B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020080126102A KR101044807B1 (en) 2008-12-11 2008-12-11 Query processing method and system for sensor networks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020080126102A KR101044807B1 (en) 2008-12-11 2008-12-11 Query processing method and system for sensor networks

Publications (2)

Publication Number Publication Date
KR20100067516A KR20100067516A (en) 2010-06-21
KR101044807B1 true KR101044807B1 (en) 2011-06-27

Family

ID=42366174

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020080126102A KR101044807B1 (en) 2008-12-11 2008-12-11 Query processing method and system for sensor networks

Country Status (1)

Country Link
KR (1) KR101044807B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101480261B1 (en) * 2014-02-21 2015-01-12 한국과학기술원 Method and system for processing query language for mobile environment in sensor database

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100817025B1 (en) 2006-12-05 2008-03-26 한국전자통신연구원 Method and apparatus for integrating of heterogeneous sensor data in ubiquitous sensor network
KR20080041911A (en) * 2006-11-08 2008-05-14 한국전자통신연구원 Apparatus for processing of integrated data of various sensor networks and its method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080041911A (en) * 2006-11-08 2008-05-14 한국전자통신연구원 Apparatus for processing of integrated data of various sensor networks and its method
KR100817025B1 (en) 2006-12-05 2008-03-26 한국전자통신연구원 Method and apparatus for integrating of heterogeneous sensor data in ubiquitous sensor network

Also Published As

Publication number Publication date
KR20100067516A (en) 2010-06-21

Similar Documents

Publication Publication Date Title
JP4777634B2 (en) Context-aware automatic service discovery and execution engine in mobile ad hoc networks
US7860884B2 (en) System and method for processing continuous integrated queries on both data stream and stored data using user-defined shared trigger
US8146054B2 (en) Hybrid data object model
JP5270536B2 (en) Intelligent agent management system and method using supervisory agents used in vehicle diagnosis
US8515944B2 (en) Sensor network managing apparatus and method thereof
KR101236990B1 (en) Cooperative Spatial Query Processing Method between a Server and a Sensor Network and Server thereof
US8612474B2 (en) System and method for supporting logical sensor network
JP2020502610A (en) Allow Semantic Mashups on the Internet of Things
US20090271358A1 (en) Evidential Reasoning Network and Method
Wang et al. Q-graphplan: QoS-aware automatic service composition with the extended planning graph
KR100782067B1 (en) System and method for user context based dynamic service composition
KR101044807B1 (en) Query processing method and system for sensor networks
US20100241688A1 (en) Transmitting information about distributed group memberships
WO2021189925A1 (en) Risk detection method and apparatus for protecting user privacy
JP3799925B2 (en) Agent service providing method and computer-readable recording medium
KR20210057679A (en) workflow engine framework for cross-domain extension
JP2002351729A (en) Data sharing system
Adeleye et al. A fitness-based evolving network for web-apis discovery
KR101720316B1 (en) Method and apparatus for providing information for sensor network
JP2010097285A (en) System analysis support program, system analysis support device, and system analysis support method
US9384069B2 (en) Method for event processing using hierarchical structures and event processing system thereof
JP2007183691A (en) Workflow script execution system and method therefor
Pardal et al. Cost model for RFID-based traceability information systems
CN111290855A (en) GPU card management method, system and storage medium for multiple GPU servers in distributed environment
JP2011003154A (en) Information data collection management device, and method and program of estimating transmission period thereof

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: 20140529

Year of fee payment: 4

LAPS Lapse due to unpaid annual fee