JP4628258B2 - Graph search device - Google Patents
Graph search device Download PDFInfo
- Publication number
- JP4628258B2 JP4628258B2 JP2005330897A JP2005330897A JP4628258B2 JP 4628258 B2 JP4628258 B2 JP 4628258B2 JP 2005330897 A JP2005330897 A JP 2005330897A JP 2005330897 A JP2005330897 A JP 2005330897A JP 4628258 B2 JP4628258 B2 JP 4628258B2
- Authority
- JP
- Japan
- Prior art keywords
- pattern
- graph
- node
- score
- end position
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Description
本発明は、各キーワードから検索されるサブグラフ同士の関係が明確なサブグラフを高速に検索できるグラフ検索装置に関するものである。 The present invention relates to a graph search apparatus that can search a subgraph with a clear relationship between subgraphs searched from each keyword at high speed.
従来のグラフ検索装置(例えば、非特許文献1に記載のもの)は、あるグラフから例えば、図28に示すように、クエリにマッチするサブグラフを複数検索して表示する。一方は、キーワード「XML」から検索されたものであり、他方はキーワード「ウェブサービス」から検索されたものである。 A conventional graph search device (for example, the one described in Non-Patent Document 1) searches and displays a plurality of subgraphs matching a query from a certain graph, for example, as shown in FIG. One is searched from the keyword “XML”, and the other is searched from the keyword “Web service”.
また、非特許文献2に記載のAGM(Apriori-based Graph Mining)というグラフマイニングを用いたグラフ検索装置は、ラベル付きグラフから頻出のサブグラフを検索する。
Further, a graph retrieval apparatus using graph mining called AGM (Apriori-based Graph Mining) described in Non-Patent
また、単純最短パスアルゴリズムを用いたグラフ検索装置では、あるグラフから、キーワードにマッチするノード間の最短パス(広義のサブグラフ)を検索する。 Further, a graph search apparatus using a simple shortest path algorithm searches a shortest path (subgraph in a broad sense) between nodes that match a keyword from a certain graph.
また、リンク解析(HITS アルゴリズム)では、検索時にリンク解析を行うことで、サブグラフ同士の関係を表現する。
しかしながら、図28のようなサブグラフでは、同じインスタンス「Person:電々太郎」をもつノードを両者が有しながらも、そのサブグラフ同士の関係が表現されておらず、よってその関係が不明確である。 However, in the subgraph as shown in FIG. 28, although both have nodes having the same instance “Person: Dentsu Taro”, the relationship between the subgraphs is not expressed, and thus the relationship is unclear.
非特許文献1では、クエリにマッチするサブグラフを検索することの記載があり、非特許文献2では、頻出のサブグラフを検索することの記載があるが、いずれの文献においても、サブグラフ同士の関係の記載がない。また、非特許文献2記載の技術では、ユーザが求めるキーワードに関係なく多くのサブグラフが検索されるので、どれがユーザの興味と関係あるのかがわからない。
In
また、単純最短パスアルゴリズムを用いたグラフ検索装置では、最短パス(サブグラフ)のみの関係を提供し、有益なサブグラフ周辺の知識が十分に考慮されていない。つまり、最短パス(サブグラフ)同士の関係以外を表現できない。 In addition, the graph search apparatus using the simple shortest path algorithm provides only the shortest path (subgraph) relationship and does not fully consider the knowledge around the useful subgraph. In other words, it is impossible to express other than the relationship between the shortest paths (subgraphs).
また、リンク解析(HITSアルゴリズム)では、検索時にリンク解析を行うので検索に長時間を要する。 In link analysis (HITS algorithm), since link analysis is performed at the time of search, a long time is required for the search.
本発明は、上記の課題に鑑みてなされたものであり、その目的とするところは、各キーワードから検索されるサブグラフ同士の関係が明確なサブグラフを高速に検索できるグラフ検索装置を提供することにある。 The present invention has been made in view of the above problems, and an object of the present invention is to provide a graph search device that can search a subgraph with a clear relationship between subgraphs searched from each keyword at high speed. is there.
上記の課題を解決するために、請求項1の本発明は、互いに異なるインスタンスをもつノード間がラベルをもつアークによって接続され且つ当該インスタンスのクラスが定義されたグラフ、に含まれる特徴的なパスのパターンであって、インスタンスをもつノードを一方の端位置に有し、クラスが定義されたノードを他方の端位置に有し、各アークがラベルをもつ、パターンが予め記憶されるパターン記憶手段と、第1のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、指定されたクラスが定義されたノードを他方の端位置に有する、パターンである第1パターンを前記パターン記憶手段から検索し、第2のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、指定されたクラスが定義されたノードを他方の端位置に有する、パターンである第2パターンを前記パターン記憶手段から検索するパターン検索手段と、第1パターンおよび第2パターンを、他方の端位置のノードでマージするパターンマージ手段と、このパターンマージ手段によりマージされたパターンにマッチするサブグラフを前記グラフから検索するグラフ検索手段とを備えることを特徴とするグラフ検索装置をもって解決手段とする。
In order to solve the above-mentioned problem, the present invention of
請求項2の本発明は、前記グラフから、予め決めた内容をラベルに含むアークの先端が接続されたノードを一方の端位置に有するパスを検索し、当該ノード以外のノードのインスタンスを変数に置き換えてなるパターンを生成し、前記パターン記憶手段に記憶させるパターン生成手段を備えることを特徴とする請求項1記載のグラフ検索装置をもって解決手段とする。
The present invention of
請求項3の本発明は、前記グラフのアークがもつ各ラベルのスコアまたは前記グラフがもつノードに定義された各クラスのスコアが記憶された記憶手段と、前記グラフから、予め決めた内容をラベルに含むアークの先端が接続されたノードを一方の端位置に有するパスを検索し、当該ノード以外のノードのインスタンスを変数に置き換え、当該パスのスコアを前記記憶手段に記憶されたスコアに基づいて計算し、当該パスにマッチするサブグラフを前記グラフから検索し、検索されたサブグラフの数に応じてスコアを増加させ、スコアが予め定めたしきい値より大きいパターンを前記パターン記憶手段に記憶させるパターン生成手段とを備えることを特徴とする請求項1記載のグラフ検索装置をもって解決手段とする。
The present invention of claim 3 is a storage means for storing a score of each label possessed by an arc of the graph or a score of each class defined in a node possessed by the graph, and labeling predetermined contents from the graph. A path having a node to which the tip of the arc included in is connected at one end position is searched, an instance of a node other than the node is replaced with a variable, and the score of the path is based on the score stored in the storage unit A pattern for calculating, searching for a subgraph matching the path from the graph, increasing the score according to the number of searched subgraphs, and storing a pattern having a score greater than a predetermined threshold in the pattern storage means The graph search device according to
請求項4の本発明は、互いに異なるインスタンスをもつノード間がラベルをもつアークによって接続され且つ当該インスタンスのクラスが定義されたグラフ、に含まれる特徴的なパスのパターンであって、インスタンスをもつノードを両方の端位置に有し、各アークがラベルをもつ、パターンが予め記憶されるパターン記憶手段と、第1のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、第2のキーワードに等しいインスタンスをもつノードを他方の端位置に有する、パターンである第1パターンを前記パターン記憶手段から検索し、第1のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、第3のキーワードに等しいインスタンスをもつノードを他方の端位置に有する、パターンである第2パターンを前記パターン記憶手段から検索するパターン検索手段と、第1パターンと第2パターンとを、それぞれに共通に含まれる共通部分でマージするパターンマージ手段と、このパターンマージ手段によりマージされたパターンにマッチするサブグラフを前記グラフから検索するグラフ検索手段とを備えることを特徴とするグラフ検索装置をもって解決手段とする。 The invention according to claim 4 is a characteristic path pattern included in a graph in which nodes having different instances are connected by an arc having a label and the class of the instance is defined. A pattern storage means in which a pattern is pre-stored having nodes at both end positions, each arc having a label, and a node having an instance equal to the first keyword at one end position, and a second A first pattern which is a pattern having a node having an instance equal to the keyword at the other end position is retrieved from the pattern storage means, and a node having an instance equal to the first keyword is at one end position, A second pattern that is a pattern with a node having an instance equal to 3 keywords at the other end position A pattern search means for searching the pattern storage means, a pattern merge means for merging the first pattern and the second pattern at a common part included in each, and a pattern merged by the pattern merge means The graph search device includes a graph search means for searching for a subgraph to be searched from the graph.
請求項5の本発明は、前記グラフから、予め決めた内容をラベルに含むアークの先端が接続されたノードを両方の端位置に有するパスであるパターンを生成し、前記パターン記憶手段に記憶させるパターン生成手段を備えることを特徴とする請求項4記載のグラフ検索装置をもって解決手段とする。 According to a fifth aspect of the present invention, a pattern which is a path having a node connected to the tip of an arc including a predetermined content in a label at both end positions is generated from the graph and stored in the pattern storage means. The graph search device according to claim 4, further comprising a pattern generation unit.
請求項6の本発明は、前記グラフのアークがもつ各ラベルのスコアまたは前記グラフがもつノードに定義された各クラスのスコアが記憶された記憶手段と、前記グラフから、予め決めた内容をラベルに含むアークの先端が接続されたノードを両方の端位置に有するパスを検索し、当該パスのスコアを前記記憶手段に記憶されたスコアに基づいて計算し、スコアが予め定めたしきい値より大きいパターンを前記パターン記憶手段に記憶させるパターン生成手段とを備えることを特徴とする請求項4記載のグラフ検索装置をもって解決手段とする。 The present invention of claim 6 is a storage means for storing a score of each label possessed by an arc of the graph or a score of each class defined in a node possessed by the graph, and labeling predetermined contents from the graph. The path having the node to which the tip of the arc included in is connected at both end positions is searched, the score of the path is calculated based on the score stored in the storage means, and the score is based on a predetermined threshold value. The graph search device according to claim 4, further comprising: a pattern generation unit that stores a large pattern in the pattern storage unit.
請求項7の本発明は、請求項1ないし3のいずれかに記載のグラフ検索装置としてコンピュータを動作させるコンピュータプログラムをもって解決手段とする。 The seventh aspect of the present invention provides a computer program for causing a computer to operate as the graph search device according to any one of the first to third aspects.
請求項8の本発明は、請求項7記載のコンピュータプログラムが格納された記録媒体をもって解決手段とする。 The eighth aspect of the present invention provides a solution comprising a recording medium storing the computer program according to the seventh aspect.
本発明のグラフ検索装置によれば、互いに異なるインスタンスをもつノード間がラベルをもつアークによって接続され且つ当該インスタンスのクラスが定義されたグラフ、に含まれる特徴的なパスのパターンであって、インスタンスをもつノードを一方の端位置に有し、クラスが定義されたノードを他方の端位置に有し、各アークがラベルをもつ、パターンが予め記憶されるパターン記憶手段と、第1のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、指定されたクラスが定義されたノードを他方の端位置に有する、パターンである第1パターンを前記パターン記憶手段から検索し、第2のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、指定されたクラスが定義されたノードを他方の端位置に有する、パターンである第2パターンを前記パターン記憶手段から検索するパターン検索手段と、第1パターンおよび第2パターンを、他方の端位置のノードでマージするパターンマージ手段と、このパターンマージ手段によりマージされたパターンにマッチするサブグラフを前記グラフから検索するグラフ検索手段とを備えるので、第1のキーワードから検索されるサブグラフと第2のキーワードから検索されるサブグラフとの関係が明確なサブグラフを高速に検索することができる。 According to the graph search device of the present invention, there is a characteristic path pattern included in a graph in which nodes having different instances are connected by an arc having a label and the class of the instance is defined. A pattern storage means for storing a pattern in advance, a node having a node at one end position, a node having a class defined at the other end position, each arc having a label, and a first keyword A first pattern which is a pattern having a node having an equal instance at one end position and a node having a specified class defined at the other end position is retrieved from the pattern storage means, and a second keyword Has a node with an instance equal to at one end position and a node with the specified class defined at the other end position. The pattern search means for searching for the second pattern, which is a pattern, from the pattern storage means, the pattern merge means for merging the first pattern and the second pattern at the node at the other end position, and the pattern merge means for merging And a graph search means for searching the graph for a subgraph that matches the determined pattern, so that a subgraph in which the relationship between the subgraph searched from the first keyword and the subgraph searched from the second keyword is clear can be speeded up. You can search.
また、本発明のグラフ検索装置によれば、互いに異なるインスタンスをもつノード間がラベルをもつアークによって接続され且つ当該インスタンスのクラスが定義されたグラフ、に含まれる特徴的なパスのパターンであって、インスタンスをもつノードを両方の端位置に有し、各アークがラベルをもつ、パターンが予め記憶されるパターン記憶手段と、第1のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、第2のキーワードに等しいインスタンスをもつノードを他方の端位置に有する、パターンである第1パターンを前記パターン記憶手段から検索し、第1のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、第3のキーワードに等しいインスタンスをもつノードを他方の端位置に有する、パターンである第2パターンを前記パターン記憶手段から検索するパターン検索手段と、第1パターンと第2パターンとを、それぞれに共通に含まれる共通部分でマージするパターンマージ手段と、このパターンマージ手段によりマージされたパターンにマッチするサブグラフを前記グラフから検索するグラフ検索手段とを備えるので、第1のキーワードおよび第2のキーワードから検索されるサブグラフと第1のキーワードおよび第3のキーワードから検索されるサブグラフとの関係が明確なサブグラフを高速に検索することができる。 Further, according to the graph search device of the present invention, there is a characteristic path pattern included in a graph in which nodes having different instances are connected by an arc having a label and the class of the instance is defined. A pattern storage means having a node with an instance at both end positions, each arc having a label, a pattern pre-stored, and a node with an instance equal to the first keyword at one end position A first pattern which is a pattern having a node having an instance equal to the second keyword at the other end position is retrieved from the pattern storage means, and a node having an instance equal to the first keyword is at one end position. A putter with a node at the other end position with an instance equal to the third keyword A pattern search means for searching for the second pattern from the pattern storage means, a pattern merge means for merging the first pattern and the second pattern at a common part included in each, and merging by the pattern merge means And a graph search means for searching from the graph for a subgraph that matches the specified pattern, a subgraph searched from the first keyword and the second keyword, and a subgraph searched from the first keyword and the third keyword. It is possible to search a subgraph having a clear relationship with
以下、本発明の実施の形態を図面を参照して説明する。なお、同一のものには同一符号を付与し、重複説明を省略する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. In addition, the same code | symbol is provided to the same thing and duplication description is abbreviate | omitted.
[第1の実施の形態]
図1は、第1の実施の形態に係るグラフ検索装置の構成図である。
[First Embodiment]
FIG. 1 is a configuration diagram of a graph search apparatus according to the first embodiment.
グラフ検索装置1は、ユーザ端末2に接続され、ユーザ端末2には、表示装置3が接続されている。
The
グラフ検索装置1は、有向グラフであるグラフGを表示するためのデータ群が記憶されたグラフデータベース11と、グラフのサブグラフを検索する際に表示装置3に表示される入力用インタフェースを生成する入力用インタフェース生成部12とを備える。
The
図2は、グラフデータベース11に記憶されたデータ群を全て使って表示できるグラフGの一部を例示した図である。
FIG. 2 is a diagram illustrating a part of a graph G that can be displayed using all data groups stored in the
グラフデータベース11に記憶されたデータ群を全て使って、図2に一部を例示したグラフG、つまり互いに異なるインスタンスをもつノード間がラベルをもつアークによって接続され且つ当該インスタンスのクラスが定義されたグラフG、を表示することができる。逆にいえば、グラフGを表示するための過不足ないデータ群がグラフデータベース11に記憶されている。以下、そのデータ群を便宜的にグラフGという。また、なんらかのグラフ、サブグラフ(なんらかのグラフそのものまたはそれに含まれるグラフ)、パス(分岐および閉ループをもたないグラフ)などをクラスを含めて表示するための過不足ないデータ群を便宜的にグラフ、サブグラフ、パスなどという。
Using all the data groups stored in the
グラフGでは、例えば、「XML」や「Bプロジェクト」などのインスタンスをもつノードが、「rm:技術キーワード」や「rm:著者」などのラベルをもつアークで接続される。また、グラフGでは、ノードにそのインスタンス「Person:山田太郎」などの概念であるクラス「Person:人」などが定義される。 In the graph G, for example, nodes having instances such as “XML” and “B project” are connected by arcs having labels such as “rm: technical keyword” and “rm: author”. Further, in the graph G, a class “Person: person” or the like that is a concept such as an instance “Person: Taro Yamada” is defined in a node.
図3は、グラフデータベース11に記憶されたデータ群の一部を例示した図である。
FIG. 3 is a diagram illustrating a part of a data group stored in the
例えば、最初のデータ「<org:Dプロジェクト><rm:技術キーワード>”XML”」は、インスタンス「org:Dプロジェクト」をもつノードからインスタンス「XML」のノードへ向かうアークがラベル「rm:技術キーワード」をもつことを示している。また、例えば、最後のデータ「<person:鈴木花子><rdf:type><Person:人>」は、インスタンス「person:鈴木花子」をもつノードのクラスが「person:人」であることを示している。 For example, in the first data “<org: D project> <rm: technical keyword>“ XML ””, an arc from the node having the instance “org: D project” to the node of the instance “XML” is labeled “rm: technique”. It has shown that it has a keyword. For example, the last data “<person: Hanako Suzuki> <rdf: type> <Person: person>” indicates that the class of the node having the instance “person: Hanako Suzuki” is “person: person”. ing.
なお、各データは、実際にはRDF(以下の文献に記載)で表現されている。 Each data is actually expressed in RDF (described in the following document).
「Resource Description Framework(RDF)Model and Syntax Specification」, Ora Lassia, Ralph R.Swick編,[online], インターネット<URL:http://www.w3.org/TR/1999/REC-rdf-syntax-19990222/>
「RDF Vocabulary Description Language 1.0: RDF Schema」, Dan Brickley, R.V.Guha編,[online], インターネット<URL:http://www.w3.org/TR/rdf-schema/>
図1に戻り、グラフ検索装置1は、サブグラフの検索に用いられるパターンの生成に用いられるアークスコア記憶部13を備える。
"Resource Description Framework (RDF) Model and Syntax Specification", Ora Lassia, Ralph R. Swick, [online], Internet <URL: http://www.w3.org/TR/1999/REC-rdf-syntax- 19990222 />
"RDF Vocabulary Description Language 1.0: RDF Schema", Dan Brickley, RVGuha, [online], Internet <URL: http://www.w3.org/TR/rdf-schema/>
Returning to FIG. 1, the
図4は、アークスコア記憶部13の記憶内容を示す図である。アークスコア記憶部13は、グラフGのアークがもつ各ラベルのスコア(アークスコア)を記憶している。グラフGの各ノードのインスタンスをそのノードのクラスに置き換え、同一のインスタンス(クラス)をもつノードではその中の1つのみ残し、そのようにしてなるグラフにアークスコア記憶部13の各アークスコアを当てはめると、その一部は、例えば図5のようになる。この図に示すグラフでは、ノードのインスタンス(グラフGのノードのクラス)のクラスをインスタンスとしてもつノードの例として、インスタンス「org:Organization」をもつノードを示している。
FIG. 4 is a diagram showing the contents stored in the arc
図1に戻り、グラフ検索装置は、さらに、パターンを生成するパターン生成部14と、生成されたパターンが記憶されるパターンデータベース15と、パターンデータベース15からパターンを検索するパターン検索部16と、パターンをマージするパターンマージ部17と、グラフGのサブグラフを検索するグラフ検索部18と、パターン検索部16およびグラフ検索部18と各データベースとを中継するデータベースインタフェース19と、表示装置3に表示される出力用インタフェースを生成する出力用インタフェース生成部110とを備える。
Returning to FIG. 1, the graph search apparatus further includes a
グラフ検索装置1は、各部(データベース含む)でデータの送受信(受け渡し)が可能であればよい。つまり、各部を、同一のコンピュータに配置してもよいし、複数のコンピュータに分散配置してもよい。また、これらコンピュータをグラフ検索装置として動作させるコンピュータプログラムを通信回線を介して送受信してもよい。また、このコンピュータプログラムを、半導体メモリ、磁気ディスク、光ディスク、光磁気ディスク、磁気テープなどの記録媒体に記録し、その記録媒体を流通させてもよい。第2の実施の形態でも同様である。
The
(第1の実施の形態の動作)
図6は、パターン生成部14のフローチャートである。ここでは、パターン生成部14がグラフGを扱う際、グラフGからパスを取得する際、パターンをパターンデータベース15に記憶させる際、データベースインタフェース19にクエリを送信するのだが、それについては冗長なのでの言及しないこととする。
(Operation of the first embodiment)
FIG. 6 is a flowchart of the
パターン生成部14は、まず、グラフGのノードに、その重要度を示すこととなる、ノードスコアの初期値「1」を設定する(S1)。
First, the
次に、パターン生成部14は、各ノードにつき、図7の式により、ノードスコアを計算する(S3)。
Next, the
そして、このノードスコアで、グラフGに設定されたノードスコアの初期値を更新する(S5)。このような計算更新を、ノードスコアが収束するまで、再帰的に行う。これにより、ノードスコアが重要度を示すこととなる。 Then, the initial value of the node score set in the graph G is updated with this node score (S5). Such calculation update is performed recursively until the node score converges. As a result, the node score indicates the importance.
グラフGにアークスコア記憶部13の各アークスコアを当てはめたグラフの一部が、例えば図8に示すようなものであった場合、インスタンス「XML」をもつノードのノードスコアは0.5となる。インスタンス「Person:電々三郎」をもつノードのノードスコアは0.9となる。インスタンス「org:H3G」をもつノードのノードスコアは0.6となる。
If a part of the graph in which each arc score of the arc
次に、パターン生成部14は、グラフGから、予め決めた内容(例えば「キーワード」や「技術用語」)をラベルに含むアークの先端が接続されたノード(キーワードノード)を一方の端位置に有する、予め決めた長さ以下の、パスを取得する(S7)。
Next, from the graph G, the
次に、パターン生成部14は、図9の式により、その各パスのパススコアを計算する(S9)。
Next, the
次に、パターン生成部14は、その各パスにつき、キーワードノード以外のノードのインスタンスを変数に置き換える(S11)。
Next, the
次に、パターン生成部14は、全てのパスをパスグループ(同一のパスからなる)ごとに区分し、各パスグループにつき、図10の式により、スコアを計算する(S13)。そして、スコアが予め定めたしきい値以下の各パスグループを削除する(S15)。
Next, the
次に、パターン生成部14は、残った各パスグループにつき、1パス以外を削除する(S17)。
Next, the
次に、パターン生成部14は、残ったパス(パターンという)に、そのパターンスコアとして、元のパスグループのスコアを付与し、パターンデータベース15に記憶させる(S19)。
Next, the
これにより、図11に2つ示すようなパターンがパターンデータベース15に記憶される。
Thereby, two patterns as shown in FIG. 11 are stored in the
パターンは、グラフデータベース11に記憶されるデータ群(グラフG)の一部をなすデータ群と同様なものであり、それを本図ようにグラフ化できるので、便宜的にはグラフと言えるが、パターンは表示するものではなく、表示されるグラフの検索に使用されるものである。なお、データ群である実際のパターンを逐一説明するのが冗長なので、図11のように、グラフ化されたパターンで便宜的に説明する。
The pattern is the same as the data group forming a part of the data group (graph G) stored in the
一般的にパターンでは、ノードやアークの一部はインスタンスやラベルをもち、残りはそれらをもたない。そして、インスタンスやラベルをもたないノードやアークには変数が設定される。変数は、図に示すように、?とそれに後続する単語からなる。 In general, in a pattern, some nodes and arcs have instances and labels, and the rest do not. Variables are set for nodes and arcs that do not have instances or labels. Variables as shown in the figure? Followed by a word.
ここでのパターンは、一方の端位置のノードがインスタンスをもち、他のノードには変数が設定され、各アークがラベルをもつものである。 In this pattern, a node at one end position has an instance, a variable is set in the other node, and each arc has a label.
また、一般的にパターンでは、必要があれば、変数が設定された一部のノードに、そのパターンにより検索されるグラフにおける、同位置のノードがもつインスタンスの上位概念を示すクラスが予め定義される。 In general, in a pattern, if necessary, a class indicating a high-level concept of an instance of a node at the same position in a graph searched by the pattern is defined in advance for some nodes set with variables. The
ここでのパターンは、他方の端位置のノードにクラスが定義されたものである。 In this pattern, a class is defined for the node at the other end position.
このようなパターンによって、あるグラフから検索されるサブグラフは、以下の条件を備えるものである。 A subgraph retrieved from a certain graph by such a pattern has the following conditions.
つまり、検索されるのは、(1)そのグラフまたはそのサブグラフであって、(2)パターンの構造を過不足なく有し、(3)パターン内でのインスタンスやラベルを過不足なく有し、つまりパターン内でのインスタンスやラベルをもつノードやアークの位置に等しい位置にあるノードやアークが当該インスタンスに等しいインスタンスやラベルを有し、(4)場合によってはパターンに含まれるクラスが定義されたノードの位置に等しい位置にあるノードが当該クラスの下位概念であるインスタンスを有するものである。 In other words, what is searched is (1) the graph or its subgraph, (2) having a pattern structure without excess or deficiency, (3) having instances or labels within the pattern without deficiency, In other words, nodes and arcs at positions equal to the positions of nodes and arcs with instances and labels in the pattern have instances and labels equal to the instances, and (4) in some cases, classes included in the pattern are defined A node at a position equal to the position of the node has an instance that is a subordinate concept of the class.
なお、パターンにより、このようにしてサブグラフを検索することを、パターンにマッチするサブグラフを検索するという。 Note that searching for a subgraph in this way by pattern is referred to as searching for a subgraph that matches the pattern.
図12は、パターン生成部14が他の方法でパターンを生成するときに、アークスコア記憶部13に代えて用いるクラススコア記憶部の記憶内容を示す図である。クラススコア記憶部は、グラフGがもつノードに定義された各クラスのスコア(クラススコア)を記憶している。グラフGの各ノードのインスタンスをそのノードのクラスに置き換え、同一のインスタンス(クラス)をもつノードではその中の1つのみ残し、そのようにしてなるグラフにクラススコア記憶部の各クラススコアを当てはめると、その一部は、例えば図14のようになる。
FIG. 12 is a diagram illustrating the storage contents of the class score storage unit used instead of the arc
図13は、パターン生成部14が他の方法でパターンを生成するときのフローチャートである。図6のときと同様な理由から、データベースインタフェース19とクエリについては言及しない。
FIG. 13 is a flowchart when the
パターン生成部14は、まず、グラフGを取得し、そのグラフGの各ノードのインスタンスをそのノードのクラスに置き換え、同一のインスタンス(クラス)をもつ複数のノードではその中の1つのみ残しそれ以外を削除し、そのようにしてなるグラフにクラススコア記憶部の各クラススコアを設定(初期設定)する(S21)。その一部は、例えば図14のようになる。この図に示すグラフでは、ノードのインスタンス(グラフGのノードのクラス)のクラスをインスタンスとしてもつノードの例として、インスタンス「org:Organization」をもつノードを示している。このように、クラススコア記憶部は、いわばクラスのクラスについてのスコアをも記憶しており、ここでは、このようなノードにもクラススコアが設定される。
The
次に、各クラスにつき、つまり、図14に例示したグラフの各ノードにつき、図15の式により、クラススコアを計算する(S23)。そして、このクラススコアで、図14に例示したグラフのクラススコアを更新する(S25)。このような計算更新を、クラススコアが収束するまで、再帰的に行う。これにより、クラススコアが重要度を示すこととなる。 Next, for each class, that is, for each node of the graph illustrated in FIG. 14, a class score is calculated by the formula of FIG. 15 (S23). Then, the class score of the graph illustrated in FIG. 14 is updated with this class score (S25). Such calculation update is performed recursively until the class score converges. Thereby, a class score will show importance.
次に、パターン生成部14は、グラフGから、予め決めた内容(例えば「キーワード」や「技術用語」)をラベルに含むアークの先端が接続されたノード(キーワードノード)を一方の端位置に有する、予め決めた長さ以下の、パスを取得する(S27)。
Next, from the graph G, the
次に、パターン生成部14は、その各パスにつき、キーワードノード以外のノードのインスタンスを変数に置き換える(S29)。
Next, the
次に、パターン生成部14は、全てのパスをパスグループ(同一のパスからなる)ごとに区分し、各パスグループで1パス以外を削除する(S31)。
Next, the
次に、パターン生成部14は、図16の式により、残った各パスのパススコアを計算する(S33)。なお、ここでは、再帰計算後のクラススコアを用いるのだが、再帰的計算前のクラススコア(初期値)をそのまま利用してもよい。
Next, the
次に、パターン生成部14は、各パスにマッチするサブグラフをグラフGから取得する(S35)。
Next, the
なお、S27からS35は、以下のようにしてもよい。 Note that S27 to S35 may be as follows.
つまり、S27では、予め決めた長さ以下の、パスを取得し、S29では、その各パスのノードのインスタンスを変数に置き換え、S31では、全てのパスをパスグループ(同一のパスからなる)ごとに区分し、各パスグループで1パス以外を削除し、S33では、図16の式により、残った各パスのパススコアを計算し、S35では、各パスの一方の端位置のノードに、予め決めておいたインスタンス(例えば、「XML」や「ウェブサービス)を設定し、そのパスにマッチするサブグラフをグラフGから取得する。 That is, in S27, a path having a length equal to or less than a predetermined length is acquired. In S29, an instance of a node of each path is replaced with a variable. In S31, all paths are grouped by path groups (consisting of the same path). In step S33, the path score of each remaining path is calculated according to the equation in FIG. 16, and in step S35, a node at one end position of each path is preliminarily stored. A predetermined instance (for example, “XML” or “Web service”) is set, and a subgraph that matches the path is acquired from the graph G.
次に、パターン生成部14は、図17の式により、各パススコアを再計算する(S37)。 次に、パターン生成部14は、残ったものから、パススコアが予め定めたしきい値以下のパスを削除する(S39)。
Next, the
次に、パターン生成部14は、残ったパス(パターンという)に、そのパターンスコアとして、元のパススコアを付与し、パターンデータベース15に記憶させる(S41)。
Next, the
なお、図13のフローチャートで採用したパスのスコアの再計算を、図6のフローチャートで採用してもよい。また、図6のフローチャートで採用した、パスのスコアの計算にノードスコアを用いる方法を、図13のフローチャートで採用してもよい。 Note that the recalculation of the path score employed in the flowchart of FIG. 13 may be employed in the flowchart of FIG. Further, the method of using the node score for the path score calculation adopted in the flowchart of FIG. 6 may be adopted in the flowchart of FIG.
いずれにしても、パターンデータベース15にパターンスコアを含むパターンが記憶されると、最終的に得たいサブグラフの検索が可能となる。
In any case, when a pattern including a pattern score is stored in the
図18は、このサブグラフをグラフGから検索するときのシーケンス図である。図6などのときと同様な理由から、パターンを取得する説明では、データベースインタフェース19とクエリについて言及しない。
FIG. 18 is a sequence diagram when the sub graph is searched from the graph G. For the same reason as in FIG. 6 and the like, the description of acquiring the pattern does not refer to the
グラフ検索装置1では、入力用インタフェース生成部が入力用インタフェースを生成し、それをユーザ端末2に送信して(S101)、図19のように表示させる(S103)。ここでの操作により特定されたキーワードKW1、KW2およびクラスCLを、ユーザ端末2がグラフ検索装置1に送信する(S105)。
In the
これ以降、グラフ検索装置1は、これらキーワードおよびクラスを用いるのだが、ユーザ端末2から送信されたキーワードやクラスを用いるのでなく、かかるキーワードやクラスを予めグラフ検索装置1が記憶しておき、それを用いてもよい。以降の処理を、予め決めた時刻に行ってもよい。これは第2の実施の形態でも同様である。
Thereafter, the
さて、グラフ検索装置1では、パターン検索部16が、キーワードKW1に等しいインスタンスをもつノードを一方の端位置に有し、クラスCLが定義されたノードを他方の端位置に有する、パターン(第1パターンという)をパターンデータベース15から取得する(S107)。また、パターン検索部16は、キーワードKW2に等しいインスタンスをもつノードを一方の端位置に有し、クラスCLが定義されたノードを他方の端位置に有する、パターン(第2パターンという)をパターンデータベース15から取得する(S109)。
In the
なお、グラフ検索装置に、1以上のキーワード(例えば、「XML」、「ウェブサービス」、「RDF」および「セマンティックWeb」)と1つのインデクス(例えば、「技術キーワード」)とを含むレコードを1以上有するインデクス記憶部を設け、S107では、以下のようにしてもよい。 In the graph search device, one record including one or more keywords (for example, “XML”, “Web service”, “RDF”, and “Semantic Web”) and one index (for example, “technical keyword”) is recorded. The above-described index storage unit may be provided, and the following may be performed in S107.
つまり、S107では、このインデクス記憶部から、キーワードKW1に等しいキーワードを含むレコードを検索し、そのレコードに含まれたインデクスに等しいインスタンスをもつノードを一方の端位置に有し、クラスCLが定義されたノードを他方の端位置に有する、パターン(第1パターンという)をパターンデータベース15から取得する(S107)。なお、S109や、以下に説明するS407、S409およびS411でも同様である。 That is, in S107, a record including a keyword equal to the keyword KW1 is searched from this index storage unit, and a node having an instance equal to the index included in the record is at one end position, and the class CL is defined. A pattern (referred to as a first pattern) having the node at the other end position is acquired from the pattern database 15 (S107). The same applies to S109 and S407, S409, and S411 described below.
次に、パターンマージ部17は、第1パターンおよび第2パターンを他方の端位置のノードでマージする(S111)。
Next, the pattern merge
これにより、図20に2つ示すような、パターンが生成される。 As a result, patterns as shown in FIG. 20 are generated.
次に、グラフ検索部18が、そのパターンをクエリに変換し、それをデータベースインタフェース19に送信する(S115)ことで、そのパターンにマッチするサブグラフをグラフGから取得する(S117)。これにより、図21に2つ示すような、サブグラフが検索される。
Next, the
そして、グラフ検索部18は、図22の式により、各サブグラフのサブグラフスコアを計算する(S119)。
Then, the
次に、グラフ検索部18は、サブグラフをサブグラフスコアの順にソートする(S121)。ここで、複数のサブグラフを共通のインスタンスをもつノードでマージし、そのサブグラフのスコアとして、当該複数のサブグラフのサブグラフスコアの総和を計算してもよい。
Next, the
そして、出力用インタフェース生成部110が、各サブグラフがサブグラフスコアの高い順に並べた出力用インタフェースを生成し、これをユーザ端末2に送信し(S123)、表示させる(S125)。
Then, the output
なお、本実施の形態では、ユーザ端末2での操作で特定されたクラスが1つの場合を説明したが、複数の場合は、それぞれにつき上記処理を行えばよい。
In the present embodiment, the case where there is one class specified by the operation on the
また、本実施の形態では、ユーザ端末2での操作で特定されたキーワードが2つの場合を説明したが、3つ以上の場合は、その中の2つづつについて上記処理を行えばよい。
Further, in the present embodiment, the case has been described where the number of keywords specified by the operation on the
以上説明したように、第1の実施の形態によれば、グラフGに含まれる特徴的なパスのパターンであって、インスタンスをもつノードを一方の端位置に有し、クラスが定義されたノードを他方の端位置に有するパターンが予め記憶されるパターン記憶手段(パターンデータベース15)と、第1のキーワード(キーワードKW1)に等しいインスタンスをもつノード(キーワードノード)を一方の端位置に有し、指定されたクラス(クラスCL)が定義されたノードを他方の端位置に有する、パターンである第1パターンをパターン記憶手段から検索し(S107)、第2のキーワード(キーワードKW2)に等しいインスタンスをもつノードを一方の端位置に有し、指定されたクラス(クラスCL)が定義されたノードを他方の端位置に有する、パターンである第2パターンをパターン記憶手段から検索する(S109)パターン検索手段(パターン検索部16)と、第1パターンおよび第2パターンを、他方の端位置のノードでマージする(S111)パターンマージ手段(パターンマージ部17)と、このパターンマージ手段によりマージされたパターンにマッチするサブグラフをグラフGから検索する(S117)グラフ検索手段(グラフ検索部18)とを備えるので、第1のキーワードから検索されるサブグラフ(図28に例示)と第2のキーワードから検索されるサブグラフ(図28に例示)との関係が明確なサブグラフ(図21に例示)を高速に検索することができる。ここでは、検索時にはパターンを生成しないので、高速な検索が行える。また、その際には、パターンの指定が不要である。 As described above, according to the first embodiment, a characteristic path pattern included in the graph G has a node having an instance at one end position and a class defined. A pattern storage means (pattern database 15) in which a pattern having a second character at the other end position is stored in advance, and a node (keyword node) having an instance equal to the first keyword (keyword KW1) at one end position, A first pattern as a pattern having a node in which the designated class (class CL) is defined at the other end position is retrieved from the pattern storage means (S107), and an instance equal to the second keyword (keyword KW2) is obtained. Have a node with one class at one end and a node with the specified class (class CL) defined at the other end. The second pattern, which is a pattern, is retrieved from the pattern storage means (S109), and the pattern retrieval means (pattern retrieval unit 16) merges the first pattern and the second pattern at the node at the other end position (S111). Since there is a pattern merging means (pattern merging section 17) and a graph searching means (graph searching section 18) that searches the graph G for a subgraph that matches the pattern merged by the pattern merging means (S117) A subgraph (illustrated in FIG. 21) in which the relationship between the subgraph retrieved from the keyword (illustrated in FIG. 28) and the subgraph retrieved from the second keyword (illustrated in FIG. 28) is clear can be retrieved at high speed. Here, since a pattern is not generated at the time of search, high-speed search can be performed. In this case, it is not necessary to specify a pattern.
また、グラフGから、予め決めた内容をラベルに含むアークの先端が接続されたノードを一方の端位置に有するパスを検索し(S7)、当該ノード以外のノードのインスタンスを変数に置き換えてなるパターンを生成し(S11)、パターン記憶手段に記憶させる(S19)パターン生成手段(パターン生成部14)を備えるので、より詳しくは、グラフGのアークがもつ各ラベルのスコアまたはグラフGがもつノードに定義された各クラスのスコアが記憶された記憶手段(アークスコア記憶部13やクラススコア記憶部)と、グラフGから、予め決めた内容をラベルに含むアークの先端が接続されたノードを一方の端位置に有するパスを検索し(S7)、当該ノード以外のノードのインスタンスを変数に置き換え(S29)、当該パスのスコアを記憶手段に記憶されたスコアに基づいて計算し(S13)、当該パスにマッチするサブグラフをグラフGから検索し(S35)、検索されたサブグラフの数に応じてスコアを増加させ(S37)、スコアが予め定めたしきい値より大きいパターンをパターン記憶手段に記憶させる(S41)パターン生成手段(パターン生成部14)を備えるので、前記したパターン検索が行えるようになる。
Further, a path having a node connected to the tip of an arc including a predetermined content in a label at one end position is searched from the graph G (S7), and instances of nodes other than the node are replaced with variables. A pattern is generated (S11) and stored in the pattern storage means (S19). Since the pattern generation means (pattern generation unit 14) is provided, more specifically, the score of each label of the arc of the graph G or the node of the graph G Storage means (arc
[第2の実施の形態]
図23は、第2の実施の形態に係るグラフ検索装置の構成図である。
[Second Embodiment]
FIG. 23 is a configuration diagram of the graph search device according to the second embodiment.
グラフ検索装置1Aは、ユーザ端末2に接続され、ユーザ端末2には、表示装置3が接続されている。
The
グラフ検索装置1Aは、グラフデータベース11と、アークスコア記憶部13と、パターン生成部14Aと、パターンデータベース15と、パターン検索部16Aと、パターンマージ部17Aと、グラフ検索部18と、データベースインタフェース19と、出力用インタフェース生成部110とを備える。
The
(第2の実施の形態の動作)
図24は、パターン生成部14Aのフローチャートである。図6などのときと同様な理由から、データベースインタフェース19とクエリについては言及しない。
(Operation of Second Embodiment)
FIG. 24 is a flowchart of the
まず、パターン生成部14Aが、再帰的にステップS1、S3およびS5(図6と同様)を行う。これによりグラフGのノードスコアがノードの重要度を示すこととなる。
First, the
次に、パターン生成部14Aは、グラフGから、予め決めた内容(例えば「キーワード」や「技術用語」)をラベルに含むアークの先端が接続されたノード(キーワードノード)を両方の端位置に有する全てのパスを取得する(S201)。
Next, from the graph G, the
なお、パターン生成部14Aは、以下のようにして、パスを取得してもよい。
Note that the
つまり、パターン生成部14Aは、予め決めたインスタンスの組み合わせ(例えば「XML」と「ウェブサービス」)毎に、各インスタンスにのみ関連するサブグラフGsを取得する。そして、グラフGについて再帰的に行われたステップS1、S3およびS5(図6と同様)を、このサブグラフGsについて行う。
That is, the
そして、S201では、それらのインスタンスを両方の端位置に有する全てのパスを取得する。 In S201, all paths having these instances at both end positions are acquired.
サブグラフGsはグラフGよりも規模が小さいので高速な処理が可能となる。また、サブグラフGsは、後述するキーワードのペアの関連性を正確に反映しているので、そのキーワードのペアの関連性を正確に反映したサブグラフを検索する(S419)ことができるようになる。 Since the sub graph Gs is smaller in scale than the graph G, high-speed processing is possible. Further, since the subgraph Gs accurately reflects the relevance of the keyword pair described later, it is possible to search for a subgraph that accurately reflects the relevance of the keyword pair (S419).
いずれにしても、S201ではパスが取得されることとなる。なお、このパスにおいて、キーワードノード以外の部分またはそれに含まれる部分を中間部分という。 In any case, a path is acquired in S201. In this path, a part other than the keyword node or a part included in the part is called an intermediate part.
次に、パターン生成部14Aは、図9の式により、その各パスのパススコアを計算する(S203)。
Next, the
次に、パターン生成部14Aは、残ったパスから、パススコアが予め定めたしきい値以下のパスを削除する(S205)。
Next, the
次に、パターン生成部14Aは、残ったパス(パターンという)に、そのパターンスコアとして、元のパススコアを付与し、パターンデータベース15に記憶させる(S207)。
Next, the
これにより、図25に2つ示すような、各ノードがインスタンスをもち、各アークがラベルをもつ、パターンがパターンデータベース15に記憶される。
As a result, as shown in FIG. 25, each node has an instance, and each arc has a label, and a pattern is stored in the
このように、パターンデータベース15にパターンがスコアとともに記憶されると、最終的に得たいサブグラフの検索が可能となる。
As described above, when the pattern is stored in the
図26は、このサブグラフをグラフGから検索するときのシーケンス図である。図6などのときと同様な理由から、パターンを取得する説明では、データベースインタフェース19とクエリについて言及しない。
FIG. 26 is a sequence diagram when the sub graph is searched from the graph G. For the same reason as in FIG. 6 and the like, the description of acquiring the pattern does not refer to the
グラフ検索装置1Aでは、入力用インタフェース生成部12が入力用インタフェースを生成し、それをユーザ端末2に送信して(S401)、図19のように表示させる(S403)。ここでの操作により特定されたキーワードKW1、KW2およびKW3を、ユーザ端末2がグラフ検索装置1に送信する(S405)。
In the
グラフ検索装置1Aでは、パターン検索部16Aが、キーワードKW1に等しいインスタンスをもつノードを一方の端位置に有し、キーワードKW2に等しいインスタンスをもつノードを他方の端位置に有する、パターン(第1パターンという)をパターンデータベース15から取得する(S407)。また、パターン検索部16Aは、キーワードKW1に等しいインスタンスをもつノードを一方の端位置に有し、キーワードKW3に等しいインスタンスをもつノードを他方の端位置に有する、パターン(第2パターンという)をパターンデータベース15から取得する(S409)。また、パターン検索部16Aは、キーワードKW2に等しいインスタンスをもつノードを一方の端位置に有し、キーワードKW3に等しいインスタンスをもつノードを他方の端位置に有する、パターン(第3パターンという)をパターンデータベース15から取得する(S411)。
In the
次に、パターンマージ部17Aは、第1パターンと第2パターンとを、それぞれに共通に含まれる共通部分があればその共通部分でマージする(S413)。また、パターンマージ部17Aは、第1パターンと第3パターン、第2パターンと第3パターン、についても同様のことを行う(S415)。これにより、図27に示すような、パターンが生成される。
Next, the
次に、グラフ検索部18が、そのパターンをクエリに変換し、それをデータベースインタフェース19に送信する(S417)ことで、そのパターンにマッチするサブグラフをグラフGから取得する(S419)。これにより、図27に示すような、パターンと同じサブグラフが検索される。
Next, the
そして、グラフ検索部18は、図22の式により、各サブグラフのサブグラフスコアを計算する(S421)。
Then, the
次に、グラフ検索部18は、サブグラフをサブグラフスコアの順にソートする(S423)。ここで、複数のサブグラフを共通のインスタンスをもつノードでマージし、そのサブグラフのスコアとして、当該複数のサブグラフのサブグラフスコアの総和を計算してもよい。
Next, the
そして、出力用インタフェース生成部110が、各サブグラフがサブグラフスコアの高い順に並べた出力用インタフェースを生成し、これをユーザ端末2に送信し(S425)、表示させる(S427)。
Then, the output
なお、本実施の形態では、ユーザ端末2での操作で特定されたキーワードが3つの場合を説明したが、4つ以上の場合でも、同様に処理を行えばよい。
In the present embodiment, the case where the number of keywords specified by the operation on the
以上説明したように、第2の実施の形態によれば、グラフGに含まれる特徴的なパスのパターンであって、インスタンスをもつノードを両方の端位置に有し、各アークがラベルをもつ、パターンが予め記憶されるパターン記憶手段(パターンデータベース15)と、第1のキーワード(キーワードKW1)に等しいインスタンスをもつノードを一方の端位置に有し、第2のキーワード(キーワードKW2)に等しいインスタンスをもつノードを他方の端位置に有する、パターンである第1パターンをパターン記憶手段から検索し(S407)、第1のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、第3のキーワード(キーワードKW3)に等しいインスタンスをもつノードを他方の端位置に有する、パターンである第2パターンをパターン記憶手段から検索する(S409)パターン検索手段(パターン検索部16A)と、第1パターンと第2パターンとを、それぞれに共通に含まれる共通部分でマージする(S411)パターンマージ手段(パターンマージ部17A)と、このパターンマージ手段によりマージされたパターンにマッチするサブグラフをグラフGから検索する(S419)グラフ検索手段(グラフ検索部18)とを備えるので、第1のキーワードおよび第2のキーワードから検索されるサブグラフ(図25(a)のパターンに等しいサブグラフ)と第1のキーワードおよび第3のキーワードから検索されるサブグラフ(図25(a)のパターンに等しいサブグラフ)との関係が明確なサブグラフ(図27に例示)を高速に検索することができる。ここでは、検索時にはパターンを生成しないので、高速な検索が行える。また、その際には、パターンの指定が不要である。
As described above, according to the second embodiment, a characteristic path pattern included in the graph G has nodes having instances at both end positions, and each arc has a label. A pattern storage means (pattern database 15) in which a pattern is stored in advance and a node having an instance equal to the first keyword (keyword KW1) at one end position and equal to the second keyword (keyword KW2) A first pattern which is a pattern having a node having an instance at the other end position is retrieved from the pattern storage means (S407), a node having an instance equal to the first keyword is located at one end position, A pattern having a node having an instance equal to the keyword (keyword KW3) at the other end position A pattern is retrieved from the pattern storage means (S409), and the pattern retrieval means (
また、グラフGから、予め決めた内容をラベルに含むアークの先端が接続されたノードを両方の端位置に有するパスであるパターンを生成し(S205)、パターン記憶手段に記憶させる(S207)パターン生成手段を備えるので、より詳しくは、グラフGのアークがもつ各ラベルのスコアまたはグラフGがもつノードに定義された各クラスのスコアが記憶された記憶手段(アークスコア記憶部13やクラススコア記憶部)と、グラフGから、予め決めた内容をラベルに含むアークの先端が接続されたノードを両方の端位置に有するパスを検索し(S201)、当該パスのスコアを記憶手段に記憶されたスコアに基づいて計算し(S203)、スコアが予め定めたしきい値より大きいパターンをパターン記憶手段に記憶させる(S207)パターン生成手段(パターン生成部14A)とを備えるので、前記したパターン検索が行えるようになる。
Further, from the graph G, a pattern that is a path having a node connected to the tip of an arc whose predetermined content is included in the label at both end positions is generated (S205), and stored in the pattern storage means (S207). Since the generation means is provided, more specifically, the storage means (the arc
1、1A…グラフ検索装置
2…ユーザ端末
3…表示装置
11…グラフデータベース
12…入力用インタフェース生成部
13…アークスコア記憶部
14、14A…パターン生成部
15…パターンデータベース
16、16A…パターン検索部
17、17A…パターンマージ部
18…グラフ検索部
19…データベースインタフェース
110…出力用インタフェース生成部
DESCRIPTION OF
Claims (8)
第1のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、指定されたクラスが定義されたノードを他方の端位置に有する、パターンである第1パターンを前記パターン記憶手段から検索し、第2のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、指定されたクラスが定義されたノードを他方の端位置に有する、パターンである第2パターンを前記パターン記憶手段から検索するパターン検索手段と、
第1パターンおよび第2パターンを、他方の端位置のノードでマージするパターンマージ手段と、
このパターンマージ手段によりマージされたパターンにマッチするサブグラフを前記グラフから検索するグラフ検索手段と
を備えることを特徴とするグラフ検索装置。 A characteristic path pattern included in a graph in which nodes having different instances are connected by an arc having a label and the class of the instance is defined, and has a node having an instance at one end position. Pattern storing means for storing a pattern in advance, having a node having a class defined at the other end position, each arc having a label;
A first pattern which is a pattern having a node having an instance equal to the first keyword at one end position and a node having a specified class defined at the other end position is retrieved from the pattern storage means. A second pattern which is a pattern having a node having an instance equal to the second keyword at one end position and a node having a specified class defined at the other end position is retrieved from the pattern storage means. Pattern search means to perform,
Pattern merging means for merging the first pattern and the second pattern at a node at the other end position;
A graph search device comprising: a graph search unit that searches the graph for a subgraph that matches the pattern merged by the pattern merge unit.
を備えることを特徴とする請求項1記載のグラフ検索装置。 From the graph, search for a path having a node connected to the tip of an arc including a predetermined content in a label at one end position, and generate a pattern in which instances of nodes other than the node are replaced with variables, The graph search device according to claim 1, further comprising: a pattern generation unit that is stored in the pattern storage unit.
前記グラフから、予め決めた内容をラベルに含むアークの先端が接続されたノードを一方の端位置に有するパスを検索し、当該ノード以外のノードのインスタンスを変数に置き換え、当該パスのスコアを前記記憶手段に記憶されたスコアに基づいて計算し、当該パスにマッチするサブグラフを前記グラフから検索し、検索されたサブグラフの数に応じてスコアを増加させ、スコアが予め定めたしきい値より大きいパターンを前記パターン記憶手段に記憶させるパターン生成手段と
を備えることを特徴とする請求項1記載のグラフ検索装置。 Storage means for storing a score of each label of the arc of the graph or a score of each class defined in a node of the graph;
From the graph, search for a path having a node to which an arc tip including a predetermined content in a label is connected at one end position, replace an instance of a node other than the node with a variable, and calculate the score of the path Calculate based on the score stored in the storage means, search the graph for a subgraph that matches the path, increase the score according to the number of subgraphs searched, and the score is greater than a predetermined threshold The graph search device according to claim 1, further comprising: a pattern generation unit that stores a pattern in the pattern storage unit.
第1のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、第2のキーワードに等しいインスタンスをもつノードを他方の端位置に有する、パターンである第1パターンを前記パターン記憶手段から検索し、第1のキーワードに等しいインスタンスをもつノードを一方の端位置に有し、第3のキーワードに等しいインスタンスをもつノードを他方の端位置に有する、パターンである第2パターンを前記パターン記憶手段から検索するパターン検索手段と、
第1パターンと第2パターンとを、それぞれに共通に含まれる共通部分でマージするパターンマージ手段と、
このパターンマージ手段によりマージされたパターンにマッチするサブグラフを前記グラフから検索するグラフ検索手段と
を備えることを特徴とするグラフ検索装置。 A characteristic path pattern included in a graph in which nodes having different instances are connected by an arc having a label and the class of the instance is defined, and the node having the instance is present at both end positions. Pattern storing means for storing patterns in advance, each arc having a label;
A first pattern which is a pattern having a node having an instance equal to the first keyword at one end position and a node having an instance equal to the second keyword at the other end position is retrieved from the pattern storage means. The pattern storage means has a second pattern as a pattern having a node having an instance equal to the first keyword at one end position and a node having an instance equal to the third keyword at the other end position. Pattern search means to search from,
Pattern merging means for merging the first pattern and the second pattern at a common part included in common with each other;
A graph search device comprising: a graph search unit that searches the graph for a subgraph that matches the pattern merged by the pattern merge unit.
を備えることを特徴とする請求項4記載のグラフ検索装置。 Pattern generating means for generating, from the graph, a pattern that is a path having a node connected to the tip of an arc whose predetermined content is included in a label at both end positions, and storing the pattern in the pattern storage means. The graph search device according to claim 4.
前記グラフから、予め決めた内容をラベルに含むアークの先端が接続されたノードを両方の端位置に有するパスを検索し、当該パスのスコアを前記記憶手段に記憶されたスコアに基づいて計算し、スコアが予め定めたしきい値より大きいパターンを前記パターン記憶手段に記憶させるパターン生成手段と
を備えることを特徴とする請求項4記載のグラフ検索装置。 Storage means for storing a score of each label of the arc of the graph or a score of each class defined in a node of the graph;
From the graph, a path having a node connected to the tip of an arc including a predetermined content in a label at both end positions is searched, and a score of the path is calculated based on the score stored in the storage unit. The graph search device according to claim 4, further comprising: a pattern generation unit that stores a pattern having a score larger than a predetermined threshold in the pattern storage unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005330897A JP4628258B2 (en) | 2005-11-15 | 2005-11-15 | Graph search device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005330897A JP4628258B2 (en) | 2005-11-15 | 2005-11-15 | Graph search device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007140713A JP2007140713A (en) | 2007-06-07 |
JP4628258B2 true JP4628258B2 (en) | 2011-02-09 |
Family
ID=38203516
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005330897A Active JP4628258B2 (en) | 2005-11-15 | 2005-11-15 | Graph search device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4628258B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2570936A4 (en) * | 2010-05-14 | 2015-08-19 | Nec Corp | Information retrieval device, information retrieval method, computer program, and data structure |
JP5866922B2 (en) * | 2011-09-22 | 2016-02-24 | 富士ゼロックス株式会社 | Search device and program |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004234354A (en) * | 2003-01-30 | 2004-08-19 | Internatl Business Mach Corp <Ibm> | Method, system and program of creating structural pattern candidate |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3168829B2 (en) * | 1993-10-30 | 2001-05-21 | 富士ゼロックス株式会社 | Search formula creation support system |
-
2005
- 2005-11-15 JP JP2005330897A patent/JP4628258B2/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004234354A (en) * | 2003-01-30 | 2004-08-19 | Internatl Business Mach Corp <Ibm> | Method, system and program of creating structural pattern candidate |
Also Published As
Publication number | Publication date |
---|---|
JP2007140713A (en) | 2007-06-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109726274B (en) | Question generation method, device and storage medium | |
US8805861B2 (en) | Methods and systems to train models to extract and integrate information from data sources | |
CN102768681B (en) | Recommending system and method used for search input | |
KR100638695B1 (en) | Apparatus and method for searching data of structured document | |
KR100882766B1 (en) | A morpheme analysis apparatus, a morpheme analysis method and a morpheme analysis program | |
JPH02302876A (en) | Conversational language analyzer | |
CN107704102A (en) | A kind of text entry method and device | |
WO2008022581A1 (en) | Method and device for obtaining the new words and input method system | |
US11475065B2 (en) | Pre-emptive graph search for guided natural language interactions with connected data systems | |
WO2015010509A1 (en) | One-dimensional liner space-based method for implementing trie tree dictionary search | |
CN110147544A (en) | A kind of instruction generation method, device and relevant device based on natural language | |
CN105843882A (en) | Information matching method and apparatus | |
JPH08241192A (en) | Apparatus and method for generation of interface corresponding to code segment | |
JP2005165598A (en) | Device and method for searching variable-length character string, and program | |
CN104199954A (en) | Recommendation system and method for search input | |
CN110795526A (en) | Mathematical formula index creating method and system for retrieval system | |
JP4237813B2 (en) | Structured document management system | |
CN104268176A (en) | Recommendation method and system based on search keyword | |
CN105260396A (en) | Word retrieval method and apparatus | |
JP4628258B2 (en) | Graph search device | |
JP5210970B2 (en) | Common query graph pattern generation method, common query graph pattern generation device, and common query graph pattern generation program | |
JP4439497B2 (en) | Search processing apparatus and program | |
Olson | Robust dictionary attack of short simple substitution ciphers | |
US7805430B2 (en) | Evaluation of name prefix and suffix during a search | |
JPH1139327A (en) | Method and device for automatically restoring link information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080409 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20101021 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20101102 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20101109 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131119 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4628258 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |