1. 程式人生 > >《BLINKS: Ranked Keyword Searches on Graphs》——論文筆記

《BLINKS: Ranked Keyword Searches on Graphs》——論文筆記

ABSTRACT

目前關鍵詞查詢的技術缺陷:poor worst-case performance, not taking full advantage of indexes, and high memory requirements.
本文方法:BLINKS, a bi-level indexing and query processing scheme for top-k keyword search on graphs.
BLINKS遵循的搜尋策略保證了效能下限,另外二級目錄可幫助進行剪枝和加速查詢。二級目錄是為了減少目錄的大小,首先將目錄分塊,二級目錄只儲存塊級的資訊。

1 Introduction

現在有各種各樣的圖資料。
樹結構或圖結構資料上的關鍵詞搜尋流行的原因:

  1. 對使用者友好
  2. 很多圖結構資料沒有schema,很多查詢語言不適用

we focus on implementing efficient ranked keyword searches on schemaless node-labeled graphs.

Challenges 利用了樹的層級結構應用於XML的方法不再適用。另外缺少schema也排除了一些在編譯階段的優化。之前的工作有以下缺點:

  • 現有的許多演算法採用啟發式的圖搜尋策略,缺乏效能的保證。
  • 現有演算法沒有充分利用index。他們只用index確定點集中有沒有包含關鍵字,找子結構連線的節點依靠圖遍歷。但是naive的目錄會導致很高的儲存需求。

Contributions BLINKS (Bi-Leval INdexing for Keyword Search)

  • Better search strategy. 基於cost-balanced expansion——一個新的backward search strategy。增加了引數m(關鍵詞個數)後,效果提升很多。
  • Combining indexing with search. 索引預先計算並儲存了一些最短路的資訊。不僅為backward search提速,還支援forward search。BLINKS是第一個在通用圖上廣泛使用索引加速關鍵字搜尋的方式。
  • Partitioning-based indexing.
    儲存所有最短路資訊的目錄太大了,BLINKS把圖分為幾份,二級目錄儲存塊級資訊。可以在空間和搜尋效率上得到平衡。

實驗證明了BLINKS取得了數量級上的領先,以及BLINKS支援複雜的scoring functions。

The rest of the paper is organized as follows. We formally define the problem and describe our scoring function in Section 2. We review existing graph search strategies and propose the new cost-balanced expansion policy in Section 3. To help illustrate how indexing helps search, we present a conceptually simple (but practically infeasible) single-level index and the associated search algorithm in Section 4. In Sections 5 and 6, we introduce our full bi-level index and search algorithm. We discuss optimizations in Section 7 and present results of experiments in Section 8. Finally, we survey the related work in Section 9 and conclude in Section 10.

2 Problem Definition

Data and Query

Definition 1. Given a query q=(w1,...,wm)and a directed graph G, an answer to q is a pair <r,(n1,...,nm)>, where r and ni’s are nodes (not necessarily distinct) in G satisfying the following properties:
(Coverage) For every i, node ni contains keyword wi.
(Connectivity) For every i, there exists a directed path in G from r to ni.

r是答案的root,ni’s 是答案的matches。連通性使得答案必須為一個根節點能達到所有關鍵詞的子樹。
這裡寫圖片描述
Top-k Query

Definition 2. Given a query and a scoring function S, the (best) score of a node r is the maximum S(T) over all answers T rooted at r (or 0 if there are no such answers). An answer rooted at r with the best score is called a best answer rooted at r. A top-k query returns the k nodes in the graph with the highest best scores, and , for each node returned, the best score and a best answer rooted at the node.

上述定義中返回的k個答案root並不同。原因如下

  • 避免了某個指向很多帶有關鍵詞的子節點的節點作為根的情況。
  • 這樣會使目錄更加有效。(在第七節會討論)

Scoring Function. 本文主要關注索引和查詢處理,因此並不對scoring function進行深入研究。
本文的得分函式同時考慮了圖結構和內容,並且包含了資料庫和IR社群最先進的測量方法。對於T=<r,(n1,...,nm)>和查詢(w1,...,wm)得分函式為

S(T)=f(S¯r(r)+i=1mS¯n(ni,wi)+i1mS¯p(r,ni))
其中S¯p(r,ni))表示從root r到match ni的距離。
f()的輸入是三個部分的和,即(1) the answer root. (2) the matches. (3) the paths from the answer root to the matches.
得分函式的兩個properties:
  • Match-distributive semantics.在S(T)的定義中,matches和paths from the answer root to the matches被累加計算,即每個路徑單獨的作用於得分函式,即便有公共邊。這種計算方式偏向於圖2的右側結果。
  • Graph-distance semantics. S¯p(r,ni)被定義為從root到matches的最短路徑,這樣吧關鍵詞搜尋問題歸約成最短路徑問題。

這裡寫圖片描述
An Assumption for Convenience. 為了表示簡單,我們忽略掉root和match對得分的貢獻,只考慮path部分,即mi1S¯p(r,ni)。現在演算法歸約成找k個節點,其中每個節點都能達到所有的查詢關鍵詞,而且到這些關鍵詞的距離還要最小。

3 Towards Optimal Graph Search Strategies

Backward Search 在沒有索引提供超過一跳的圖連線資訊的情況下,我們可以從包含至少一個關鍵詞的節點開始圖搜尋。這種節點可以被inverted-list index輕鬆識別。該方法導致了後向搜尋演算法:

  1. Ei代表能夠到達關鍵詞ki的節點。Ei——the cluster for k.
  2. Ei來自OiOi是直接包含關鍵詞ki的點集。Oi——the cluster origin。Oi的節點——keyword nodes。、
  3. 每一步搜尋,我們都根據Ei的入邊進行擴充套件。
  4. 判斷root節點是否找到——對於每個Ei要麼xEi要麼x有邊連線到Ei

第一個後向關鍵詞搜尋演算法被Bhalotia等人提出,他們主要使用以下兩種策略:

  • Equi-distance expansion in each cluster: 決定擴充套件keyword時,訪問哪個節點。找距離Oi最近的點,為了增加到the cluster origin距離。
  • Distance-balanced expansion across clusters: 決定哪個關鍵詞被拓展。為了平衡各個關鍵詞到邊界的距離,每次擴充套件(u,Ei)中距離最小的。

下面對上述兩個策略進行優化,首先是equi-distance expansion in each cluster策略。

Theorem 1. An optimal backward search algorithm must follow the s