• 沒有找到結果。

環境認知查詢技術之設計與製作(I)Design and Implementation of Context-Aware Query Processing Techniques(I)

N/A
N/A
Protected

Academic year: 2021

Share "環境認知查詢技術之設計與製作(I)Design and Implementation of Context-Aware Query Processing Techniques(I)"

Copied!
6
0
0

加載中.... (立即查看全文)

全文

(1)

行政院國家科學委員會專題研究計畫 期中進度報告

環境認知查詢技術之設計與製作(1/3)

計畫類別: 個別型計畫 計畫編號: NSC93-2213-E-110-027- 執行期間: 93 年 08 月 01 日至 94 年 07 月 31 日 執行單位: 國立中山大學資訊工程學系(所) 計畫主持人: 張玉盈 報告類型: 精簡報告 處理方式: 本計畫可公開查詢

中 華 民 國 94 年 4 月 22 日

(2)

1

環境認知查詢技術之設計與製作(1/3)

Design and Implementation of Context-Aware Query Processing

Techniques

計畫編號:NSC-93-2213-E-110-027

執行期限:93 年 8 月 1 日至 94 年 7 月 31 日

主持人:張玉盈 中山大學資訊工程學系

E-mail: changyi@cse.nsysu.edu.tw

Fax: 07-5254301

(關鍵詞:地理資訊系統,與地點有關的查 詢,最近鄰居的找尋,空間資料,無線通訊 系統) 近年來,由於手機、PDA、及 Notebook 的大量使用,如何有效率地支援環境認知 查詢就成了一種趨勢。在環境認知查詢技 術中,與地點有關的查詢處理即是其主要 類別之一。而最近鄰居找尋的查詢即為與 地點有關的查詢之一。Voros 提出針對以 linear quadtree 表示的資料的最近鄰居找 尋,而 Chen 及 Chang 針對 Voros 所忽略的 地方提出補正。另外,Chen 及 Chang 針對 以 Peano 曲線、RBG 曲線、與 Hilbert 曲線 表示的資料,提出最近鄰居找尋技術。但 由於以 linear quadtree 及這三種曲線表示 的資料之最近鄰居找尋技術,均需要用到 迴圈的處理程序,這是很耗費時間的。因 此在這個計畫中,我們提出以布林表示式 為基礎的最近鄰居找尋,在我們的方法中 ,利用了布林、加法、與減法運算,比迴 圈的處理程序更有效率。在我們的效能分 析與模擬研究中,我們顯示以 Hilbert 曲線 表示的資料之布林表示式為基礎的最近鄰 居找尋技術,會是消耗最少總時間(輸入 輸出時間 + CPU 時間)。

(Key Words: geographic information system, location dependent query, nearest neighbor finding, spatial data, wireless communication system.)

In recent years, since the mobile phone, PDA, and the notebook are used popularly, how to efficiently support the context-aware query becomes importantly. A location dependent query is one category of the context-aware query processing techniques. Moreover, the nearest neighbor finding is one application of the location dependent query. Voros has proposed a strategy for the nearest neighbor finding based on the linear quadtree, and Chen and Chang have pro-posed the new strategy that corrects the missing cases of Voros’s strategy. Moreover, Chen and Chang have proposed the strategy for the nearest neighbor finding based on the Peano curve, the RBG curve, and the Hilbert curve. However, these strategies for the nearest neighbor finding based on the linear quadtree and the three space-filling curves which use a looping process are time-consuming. Therefore, we proposed a new strategy with the bitwise operations, addition, and subtraction to do neighbor finding more efficiently than these strategies. From the simulation study, we show that our strategy based on the Hilbert curve requires the least total time (the I/O time + the CPU-time) among those strategies for the nearest neighbor finding based on the linear quadtree and the three space-filling curves.

(3)

2 二、緣由與目的 近年來,由於手機、PDA、及 Notebook 的大量使用,如何有效率地支援環境認知 查詢,也就是與地點有關的個人化查詢就 成了一種趨勢。所謂的個人化查詢是指回 答查詢者的問題牽涉到個人背景及偏好。 舉例來說:讓我們假設一項查詢是來自就 讀電資學院偏好攝影的碩二學生,那麼 “就讀電資學院與碩二學生”就是這位查 詢者的背景資料,“偏好攝影”則屬於查 詢者的個人興趣資料。另一方面,隨著無 線通訊的需求快速增加及行動定位技術的 不斷進步,對於能夠更有效率處理大量行 動定位查詢的資料結構和演算法之需求可 說是與日俱增。這類的查詢,就類似“離 我目前位置最近的醫院在哪?”,或“請 告訴我依目前的行徑路線上,離我最近的 便利商店”。這類查詢都是與地點有關的 ,也就是說查詢的結果是視查詢者目前所 在的地點而定。針對不同的空間資料表示 方法,已有許多關於最近鄰居的找尋技術 被發表[1-11]。其中針對 linear quadtree 的 表示方式(如圖一),Voros 提出尋找東、 西、南、北四個方向的最近鄰居尋找技術 [11],而 Chen 及 Chang 提出在對角線的方 向的最近鄰居尋找技術[3]。另外,Chen 及 Chang 針對以 Peano 曲線(如圖二)、RBG 曲線、與 Hilbert 曲線表示的資料,提出最 近鄰居找尋技術[4]。由於以 Peano 曲線表 示的資料可以容易且快速的找到查詢區塊 的鄰居,而以 RBG 曲線及 Hilbert 曲線表 示的資料,可以有規則的轉換為以 Peano 曲線表示的資料。因此針對以 RBG 曲線及 Hilbert 曲線表示的資料的最近鄰居找尋, Chen 及 Chang 的演算法即是先將這兩個曲 線轉為 Peano 曲線表示的資料。再藉由 Peano 曲線的最近鄰居找尋技術找到查詢 區塊的鄰居,最後再將資料轉回以這兩個 曲線表示的資料。但由於以 linear quadtree 及 Peano 曲線表示的資料的最近鄰居找尋 技術,均需要用到迴圈的處理程序,這是 很耗費時間的。因此在我們的演算法中, 我們提出以布林表示式為基礎的最近鄰居 找尋技術,在我們的演算法中,利用了布 林、加法、與減法運算,比迴圈的處理程 序更有效率。 三、研究方法與成果 我們的演算法的基本想法,是由於以 linear quadtree 及 Peano 曲線表示的資料可 以藉由他們的編碼的二進位表示法中,解 析出座標資訊。因此我們藉由布林運算, 解析出座標資訊,並利用加法及減法運算 ,求得所要尋找的鄰居的座標。在圖三中 ,即是我們所提出的演算法的布林函式表 示式,圖三(a)即是針對 linear quadtree 表 示的資料的最近鄰居尋找技術,圖三(b)即 是針對以 Peano 曲線表示的資料的最近鄰 居尋找。我們以圖一的查詢區塊 122 為例 ,來說明針對東方鄰居的找尋,其演算法 列於圖四。122 的二進位表示法為 Q = 100101,長度∣Q∣ = 6。我們有 M1= 010101、M2 = 101010、及上界 U_bound = 2Q∣ -1 = 26-1 = 63。首先, Q∣M1 = 100101 OR 010101 = 110101。再來我們先要判斷它 的東方鄰居是否存在,由於(110101)2 = 5310 < U_bound = 63,所以存在。再來我們要將 目前的編碼加 1,(110101)+1 = 53+1 = 54 = 110110。再來 110110 AND M2 = 110110 AND 101010 = 100010。再來 100101 AND M1 = 100101 AND 010101 = 000101。最後 100010 AND 000101 = 110111 = 123,即是 查詢區塊 122 的東方鄰居編碼。圖五列出 西方鄰居的找尋。與東方鄰居的找尋不同 點,在於往西需要將 X 座標做減 1 的動作 ,因此一開始需要將 Y 座標設為 0,使得 編碼減 1 會影響到 X 座標。另外,將東方

(4)

3 及南方鄰居的找尋內的 M1 與 M2 互相取代 ,就分別成為南方及北方鄰居的找尋。針 對 Peano 曲線表示的資料,南方及北方鄰 居的找尋演算法互換之外,我們的演算法 均跟 linear quadtree 表示的資料相同。 四、結論與討論 在無線通訊系統或行動定位系統,快 速的找到最近的需求,是一項重要的功能 。在這個計畫中,由圖六可知,我們所提 出的演算法在任何一個表示方式中,均比 Voros[11]、Chen 及 Chang[4]所提出的方法 來的快速。並且由圖六及圖七可知,以 Hilbert 曲線表示的資料消耗最少總時間 (輸入輸出時間+CPU 時間)。 五、參考文獻

[1] A. Belussi, E. Bertino and B. Catania, “Using Spatial Data Access Structures for filtering Nearest Neighbor Queries,'' Data and Knowledge

Engi-neering, Vol. 40, No. 1, pp. 1-31, Jan. 2002.

[2] R. Benetis, C. S. Jensen, G. Karciauskas, and S. Saltenis, “Nearest Neighbor and Reverse Nearest Neighbor Queries for Moving Objects,''

http://www.cs.auc.dk/tbp/Teching/DAT5E01/beneti s.pdf , pp. 1-18, 2001.

[3] H. L. Chen and Y. I. Chang, “A Note on Neighbor Finding in Images Represented by Quadtrees,” Proc. of Int. Computer Symposium:

Workshop on Software Eng. and Database Sys-tems, pp.1-6, 2002.

[4] H. L. Chen and Y. I. Chang, “Neighbor-Finding Based On Space Filling Curves,” Information

Systems, Vol. 30, No. 3, pp. 205-226, May 2005.

[5] K. L. Cheung and A. W. C. Fu, “Enhanced Nearest Neighbor Search on the R-tree,” ACM

SIGMOD Record, Vo1. 27, No. 3, pp. 16-21,

Sept. 2002.

[6] G. Kollios, D. Gunopulos, and V. J. Tsotras, “Nearest Neighbor Queries in a Mobile Environ-ment,'' Proc. of the Int. Workshop on

Spa-tio-Temporal Database Management, pp. 119-134,

1999.

[7] N. Roussopoulos, S. Kelley, and F. Vincent, “Nearest Neighbor Queries,'' Proc. of ACM

SIGMOD Int. Conf. on Management of Data, pp.

71-79, 1995.

[8] H. Samet, “Neighbor Finding Techniques for Images Represented by Quadtrees,'' Computer

Graphics and Image Processing, Vol. 18, No. 1,

pp. 37-57, Jan. 1982.

[9] H. Samet, “Neighbor Finding Techniques form Images Represented by Octrees,'' Computer Vision Graphics and

Image Processing, Vol. 46, No. 1, pp. 367-386, Jan.

1989.

[10] I. Stanoi, D. Agrawal, and A. E. Abbadi, “Reverse Nearest Neighbor Queries for Dynamic Databases,” Proc. of ACM SIGMOD Workshop

on Research Issues in Data Mining and Knowledge Discovery, pp. 45-53, 2000.

[11] J. Voros, “A Strategy for Repetitive Neighbor Finding in Images Represented by Quadtrees,'' Pattern

Recogni-tion Letters, Vol. 18, No. 10, pp. 955-962, Oct. 1997.

六、圖表

(5)

4

圖二、 以 Peano curve 表示的影像

圖三、 以布林表示式為基礎的最近鄰居找 尋: (a) 以 linear quadtree 為表示方法;

(b) 以 Peano curve 為表示方法

圖四、 針對東方最近鄰居的查詢演算法

圖五、針對西方最近鄰居的查詢演算法

圖六、 針對我們的方法與Chen的方法, 在不同的資料分布, 所產生的平均 CPU-ti

me (us) 上的比較: (a) 以 linear quadtre e 為表示方法; (b) 以 Peano curve 為表 示方法; (c) 以 RBG curve 為表示方法; (d) 以 Hilbert curve 為表示方法 圖七、 針對我們的方法在不同的資料分布 上, 所產生的平均定位時間 (PT) 上的比

(6)

5

可供推廣之研發成果資料表

□ 可申請專利 □ 可技術移轉 日期:94 年 05 月 05 日

國科會補助計畫

計畫名稱:環境認知查詢技術之設計與製作(1/3) 計畫主持人:張玉盈 計畫編號:

NSC-93-2213-E-110-027

學門領域:資訊工程

技術/創作名稱

A Boolean Function Based Approach for Nearest Neighbor Finding

發明人/創作人

張玉盈

中文:

在這個計畫中,針對以 quadtree 與 space-filling curves 的表示 方式,我們提出以布林表示式為基礎的最近鄰居找尋。在我們的方 法中,利用了布林、加法、與減法運算,比 Voros 所提出或 Chen 與 Chang 所提出來的方法來的有效率。

技術說明

英文:

In this project, for the nearest neighbor finding based on the quadtrees and the three space-filling curves, we proposed a new strategy with the bitwise operations, addition, and subtraction to do neighbor finding more efficiently than Voros’s or Chen and Chang’s strategies.

可利用之產業

可開發之產品

行動定位系統(用來找尋離目前行經方向最近的特定地點,使得使 用者有更完備的道路訊息) 無線通訊系統(用來找尋離目前位置最近的特定地點,使得使用者 可以更快速的到找到所想找尋的地點)

技術特點

利用位元運算來縮短找尋最近鄰居的時間。

推廣及運用的價

可以運用到手機、PDA、Notebook 等相關產業,提供給使用者目前 所處的環境訊息,使得使用者可以更快速的掌握目前的環境。

ˇ

參考文獻

相關文件

Wang, Solving pseudomonotone variational inequalities and pseudocon- vex optimization problems using the projection neural network, IEEE Transactions on Neural Networks 17

In this paper, we build a new class of neural networks based on the smoothing method for NCP introduced by Haddou and Maheux [18] using some family F of smoothing functions.

Define instead the imaginary.. potential, magnetic field, lattice…) Dirac-BdG Hamiltonian:. with small, and matrix

Monopolies in synchronous distributed systems (Peleg 1998; Peleg

Corollary 13.3. For, if C is simple and lies in D, the function f is analytic at each point interior to and on C; so we apply the Cauchy-Goursat theorem directly. On the other hand,

Corollary 13.3. For, if C is simple and lies in D, the function f is analytic at each point interior to and on C; so we apply the Cauchy-Goursat theorem directly. On the other hand,

Microphone and 600 ohm line conduits shall be mechanically and electrically connected to receptacle boxes and electrically grounded to the audio system ground point.. Lines in

Biases in Pricing Continuously Monitored Options with Monte Carlo (continued).. • If all of the sampled prices are below the barrier, this sample path pays max(S(t n ) −