JP4628258B2 - Graph search device - Google Patents

Graph search device Download PDF

Info

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
Application number
JP2005330897A
Other languages
Japanese (ja)
Other versions
JP2007140713A (en
Inventor
プラムディオノ イコ
宏之 佐藤
京士 飯塚
隆彦 村山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP2005330897A priority Critical patent/JP4628258B2/en
Publication of JP2007140713A publication Critical patent/JP2007140713A/en
Application granted granted Critical
Publication of JP4628258B2 publication Critical patent/JP4628258B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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 Document 2 retrieves frequent subgraphs from labeled graphs.

また、単純最短パスアルゴリズムを用いたグラフ検索装置では、あるグラフから、キーワードにマッチするノード間の最短パス(広義のサブグラフ)を検索する。   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 アルゴリズム)では、検索時にリンク解析を行うことで、サブグラフ同士の関係を表現する。
SPARQL Query Language for RDF, http://www.w3.org/TR/rdf-sparql-puery/ Complete Mining of Freqent from Graphs, Akihiro Inokuchi,Takashi Washio and Hiroshi Motoda:Complete Mining of Freqent Patterns from Graphs: Mining Graph Data, Machine Learning, Vol.50, pp.321-354,(2003)
In link analysis (HITS algorithm), the relationship between subgraphs is expressed by performing link analysis at the time of retrieval.
SPARQL Query Language for RDF, http://www.w3.org/TR/rdf-sparql-puery/ Complete Mining of Freqent from Graphs, Akihiro Inokuchi, Takashi Washio and Hiroshi Motoda: Complete Mining of Freqent Patterns from Graphs: Mining Graph Data, Machine Learning, Vol.50, pp.321-354, (2003)

しかしながら、図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 Non-Patent Document 1, there is a description of searching for a subgraph that matches a query. In Non-Patent Document 2, there is a description of searching for a frequent subgraph, but in any document, the relationship between subgraphs is described. There is no description. Further, in the technique described in Non-Patent Document 2, many subgraphs are searched regardless of the keyword that the user wants, so it is not clear which is related to the user's interest.

また、単純最短パスアルゴリズムを用いたグラフ検索装置では、最短パス(サブグラフ)のみの関係を提供し、有益なサブグラフ周辺の知識が十分に考慮されていない。つまり、最短パス(サブグラフ)同士の関係以外を表現できない。   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 claim 1 is characterized in that a characteristic path 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. Pattern storage means for storing a pattern in advance, having a node having an instance at one end position, a node having a class defined at the other end position, and 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 from the pattern storage means Search for a node with an instance equal to the second keyword at one end, and with the specified class defined A pattern search unit that searches the pattern storage unit for a second pattern that is a pattern at one end position, a pattern merge unit that merges the first pattern and the second pattern at a node at the other end position, and 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.

請求項2の本発明は、前記グラフから、予め決めた内容をラベルに含むアークの先端が接続されたノードを一方の端位置に有するパスを検索し、当該ノード以外のノードのインスタンスを変数に置き換えてなるパターンを生成し、前記パターン記憶手段に記憶させるパターン生成手段を備えることを特徴とする請求項1記載のグラフ検索装置をもって解決手段とする。   The present invention of claim 2 searches the graph for a path having, at one end position, a node to which a tip of an arc including a predetermined content in a label is connected, and uses an instance of a node other than the node as a variable. The graph search device according to claim 1, further comprising: a pattern generation unit that generates a replacement pattern and stores the pattern in the pattern storage unit.

請求項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 claim 1, comprising a generation unit.

請求項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 graph search device 1 is connected to a user terminal 2, and a display device 3 is connected to the user terminal 2.

グラフ検索装置1は、有向グラフであるグラフGを表示するためのデータ群が記憶されたグラフデータベース11と、グラフのサブグラフを検索する際に表示装置3に表示される入力用インタフェースを生成する入力用インタフェース生成部12とを備える。   The graph search device 1 is a graph database 11 in which a data group for displaying a graph G that is a directed graph is stored, and an input interface that generates an input interface that is displayed on the display device 3 when searching a subgraph of the graph. And an interface generation unit 12.

図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 graph database 11.

グラフデータベース11に記憶されたデータ群を全て使って、図2に一部を例示したグラフG、つまり互いに異なるインスタンスをもつノード間がラベルをもつアークによって接続され且つ当該インスタンスのクラスが定義されたグラフG、を表示することができる。逆にいえば、グラフGを表示するための過不足ないデータ群がグラフデータベース11に記憶されている。以下、そのデータ群を便宜的にグラフGという。また、なんらかのグラフ、サブグラフ(なんらかのグラフそのものまたはそれに含まれるグラフ)、パス(分岐および閉ループをもたないグラフ)などをクラスを含めて表示するための過不足ないデータ群を便宜的にグラフ、サブグラフ、パスなどという。   Using all the data groups stored in the graph database 11, the graph G partially illustrated in FIG. 2, that is, nodes having different instances are connected by arcs having labels, and classes of the instances are defined. A graph G can be displayed. Conversely, a data group for displaying the graph G is stored in the graph database 11. Hereinafter, the data group is referred to as a graph G for convenience. Also, for convenience, graphs and subgraphs can be used to display any graphs, subgraphs (some graphs themselves or graphs included in them), paths (graphs without branches and closed loops), etc. , Path and so on.

グラフ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 graph database 11.

例えば、最初のデータ「<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 graph search device 1 includes an arc score storage unit 13 used for generating a pattern used for searching for a subgraph.

図4は、アークスコア記憶部13の記憶内容を示す図である。アークスコア記憶部13は、グラフGのアークがもつ各ラベルのスコア(アークスコア)を記憶している。グラフGの各ノードのインスタンスをそのノードのクラスに置き換え、同一のインスタンス(クラス)をもつノードではその中の1つのみ残し、そのようにしてなるグラフにアークスコア記憶部13の各アークスコアを当てはめると、その一部は、例えば図5のようになる。この図に示すグラフでは、ノードのインスタンス(グラフGのノードのクラス)のクラスをインスタンスとしてもつノードの例として、インスタンス「org:Organization」をもつノードを示している。   FIG. 4 is a diagram showing the contents stored in the arc score storage unit 13. The arc score storage unit 13 stores a score (arc score) of each label of the arc of the graph G. The instance of each node in the graph G is replaced with the class of that node, and only one of the nodes having the same instance (class) is left, and each arc score in the arc score storage unit 13 is stored in the graph thus formed. When applied, a part of it becomes as shown in FIG. 5, for example. In the graph shown in this figure, a node having an instance “org: Organization” is shown as an example of a node having a node instance class (a node class of the graph G) as an instance.

図1に戻り、グラフ検索装置は、さらに、パターンを生成するパターン生成部14と、生成されたパターンが記憶されるパターンデータベース15と、パターンデータベース15からパターンを検索するパターン検索部16と、パターンをマージするパターンマージ部17と、グラフGのサブグラフを検索するグラフ検索部18と、パターン検索部16およびグラフ検索部18と各データベースとを中継するデータベースインタフェース19と、表示装置3に表示される出力用インタフェースを生成する出力用インタフェース生成部110とを備える。   Returning to FIG. 1, the graph search apparatus further includes a pattern generation unit 14 that generates a pattern, a pattern database 15 that stores the generated pattern, a pattern search unit 16 that searches for a pattern from the pattern database 15, and a pattern Is displayed on the display device 3, a pattern search unit 18 that searches for a subgraph of the graph G, a database interface 19 that relays the pattern search unit 16, the graph search unit 18, and each database. And an output interface generation unit 110 that generates an output interface.

グラフ検索装置1は、各部(データベース含む)でデータの送受信(受け渡し)が可能であればよい。つまり、各部を、同一のコンピュータに配置してもよいし、複数のコンピュータに分散配置してもよい。また、これらコンピュータをグラフ検索装置として動作させるコンピュータプログラムを通信回線を介して送受信してもよい。また、このコンピュータプログラムを、半導体メモリ、磁気ディスク、光ディスク、光磁気ディスク、磁気テープなどの記録媒体に記録し、その記録媒体を流通させてもよい。第2の実施の形態でも同様である。   The graph search device 1 only needs to be able to transmit and receive (deliver) data in each unit (including a database). That is, each unit may be arranged on the same computer or may be distributed on a plurality of computers. In addition, a computer program that causes these computers to operate as a graph search device may be transmitted and received via a communication line. The computer program may be recorded on a recording medium such as a semiconductor memory, a magnetic disk, an optical disk, a magneto-optical disk, or a magnetic tape, and the recording medium may be distributed. The same applies to the second embodiment.

(第1の実施の形態の動作)
図6は、パターン生成部14のフローチャートである。ここでは、パターン生成部14がグラフGを扱う際、グラフGからパスを取得する際、パターンをパターンデータベース15に記憶させる際、データベースインタフェース19にクエリを送信するのだが、それについては冗長なのでの言及しないこととする。
(Operation of the first embodiment)
FIG. 6 is a flowchart of the pattern generation unit 14. Here, when the pattern generation unit 14 handles the graph G, when acquiring a path from the graph G, when the pattern is stored in the pattern database 15, a query is transmitted to the database interface 19, but this is redundant. I will not mention it.

パターン生成部14は、まず、グラフGのノードに、その重要度を示すこととなる、ノードスコアの初期値「1」を設定する(S1)。   First, the pattern generation unit 14 sets an initial value “1” of the node score, which indicates the importance level, to the node of the graph G (S1).

次に、パターン生成部14は、各ノードにつき、図7の式により、ノードスコアを計算する(S3)。   Next, the pattern generation unit 14 calculates a node score for each node according to the formula of FIG. 7 (S3).

そして、このノードスコアで、グラフ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 score storage unit 13 is applied to the graph G is as shown in FIG. 8, for example, the node score of the node having the instance “XML” is 0.5. . The node score of the node having the instance “Person: Dentsu Saburo” is 0.9. The node score of the node having the instance “org: H3G” is 0.6.

次に、パターン生成部14は、グラフGから、予め決めた内容(例えば「キーワード」や「技術用語」)をラベルに含むアークの先端が接続されたノード(キーワードノード)を一方の端位置に有する、予め決めた長さ以下の、パスを取得する(S7)。   Next, from the graph G, the pattern generation unit 14 sets a node (keyword node) to which one end of an arc including a predetermined content (for example, “keyword” or “technical term”) as a label is connected to one end position. A path having a predetermined length or less is acquired (S7).

次に、パターン生成部14は、図9の式により、その各パスのパススコアを計算する(S9)。   Next, the pattern generation unit 14 calculates a path score of each path using the formula of FIG. 9 (S9).

次に、パターン生成部14は、その各パスにつき、キーワードノード以外のノードのインスタンスを変数に置き換える(S11)。   Next, the pattern generation unit 14 replaces the instance of a node other than the keyword node with a variable for each path (S11).

次に、パターン生成部14は、全てのパスをパスグループ(同一のパスからなる)ごとに区分し、各パスグループにつき、図10の式により、スコアを計算する(S13)。そして、スコアが予め定めたしきい値以下の各パスグループを削除する(S15)。   Next, the pattern generation unit 14 classifies all the paths into path groups (consisting of the same path), and calculates a score for each path group using the formula of FIG. 10 (S13). Then, each path group whose score is equal to or less than a predetermined threshold is deleted (S15).

次に、パターン生成部14は、残った各パスグループにつき、1パス以外を削除する(S17)。   Next, the pattern generation unit 14 deletes other than one path for each remaining path group (S17).

次に、パターン生成部14は、残ったパス(パターンという)に、そのパターンスコアとして、元のパスグループのスコアを付与し、パターンデータベース15に記憶させる(S19)。   Next, the pattern generation unit 14 assigns the score of the original path group to the remaining path (referred to as a pattern) as the pattern score, and stores it in the pattern database 15 (S19).

これにより、図11に2つ示すようなパターンがパターンデータベース15に記憶される。   Thereby, two patterns as shown in FIG. 11 are stored in the pattern database 15.

パターンは、グラフデータベース11に記憶されるデータ群(グラフG)の一部をなすデータ群と同様なものであり、それを本図ようにグラフ化できるので、便宜的にはグラフと言えるが、パターンは表示するものではなく、表示されるグラフの検索に使用されるものである。なお、データ群である実際のパターンを逐一説明するのが冗長なので、図11のように、グラフ化されたパターンで便宜的に説明する。   The pattern is the same as the data group forming a part of the data group (graph G) stored in the graph database 11 and can be graphed as shown in this figure. Patterns are not displayed but are used to search the displayed graph. Since it is redundant to explain the actual pattern as a data group one by one, it will be explained for convenience with a graphed pattern as shown in FIG.

一般的にパターンでは、ノードやアークの一部はインスタンスやラベルをもち、残りはそれらをもたない。そして、インスタンスやラベルをもたないノードやアークには変数が設定される。変数は、図に示すように、?とそれに後続する単語からなる。   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 score storage unit 13 when the pattern generation unit 14 generates a pattern by another method. The class score storage unit stores a score (class score) of each class defined in a node of the graph G. Replace the instance of each node in the graph G with the class of that node, leave only one of the nodes having the same instance (class), and apply each class score in the class score storage unit to the graph thus formed. And a part of it is as shown in FIG. 14, for example.

図13は、パターン生成部14が他の方法でパターンを生成するときのフローチャートである。図6のときと同様な理由から、データベースインタフェース19とクエリについては言及しない。   FIG. 13 is a flowchart when the pattern generation unit 14 generates a pattern by another method. For the same reason as in FIG. 6, the database interface 19 and the query will not be mentioned.

パターン生成部14は、まず、グラフGを取得し、そのグラフGの各ノードのインスタンスをそのノードのクラスに置き換え、同一のインスタンス(クラス)をもつ複数のノードではその中の1つのみ残しそれ以外を削除し、そのようにしてなるグラフにクラススコア記憶部の各クラススコアを設定(初期設定)する(S21)。その一部は、例えば図14のようになる。この図に示すグラフでは、ノードのインスタンス(グラフGのノードのクラス)のクラスをインスタンスとしてもつノードの例として、インスタンス「org:Organization」をもつノードを示している。このように、クラススコア記憶部は、いわばクラスのクラスについてのスコアをも記憶しており、ここでは、このようなノードにもクラススコアが設定される。   The pattern generation unit 14 first obtains the graph G, replaces the instance of each node of the graph G with the class of the node, and leaves only one of the plurality of nodes having the same instance (class). Are deleted, and each class score of the class score storage unit is set (initial setting) in the graph formed as described above (S21). A part of it is as shown in FIG. 14, for example. In the graph shown in this figure, a node having an instance “org: Organization” is shown as an example of a node having a node instance class (a node class of the graph G) as an instance. In this way, the class score storage unit also stores the score for the class of the class, and here, the class score is also set for such a node.

次に、各クラスにつき、つまり、図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 pattern generation unit 14 sets a node (keyword node) to which one end of an arc including a predetermined content (for example, “keyword” or “technical term”) as a label is connected to one end position. A path having a predetermined length or less is acquired (S27).

次に、パターン生成部14は、その各パスにつき、キーワードノード以外のノードのインスタンスを変数に置き換える(S29)。   Next, the pattern generation unit 14 replaces the instance of a node other than the keyword node with a variable for each path (S29).

次に、パターン生成部14は、全てのパスをパスグループ(同一のパスからなる)ごとに区分し、各パスグループで1パス以外を削除する(S31)。   Next, the pattern generation unit 14 classifies all paths into path groups (consisting of the same path), and deletes all but one path in each path group (S31).

次に、パターン生成部14は、図16の式により、残った各パスのパススコアを計算する(S33)。なお、ここでは、再帰計算後のクラススコアを用いるのだが、再帰的計算前のクラススコア(初期値)をそのまま利用してもよい。   Next, the pattern generation unit 14 calculates the path score of each remaining path using the formula of FIG. 16 (S33). Although the class score after recursive calculation is used here, the class score (initial value) before recursive calculation may be used as it is.

次に、パターン生成部14は、各パスにマッチするサブグラフをグラフGから取得する(S35)。   Next, the pattern generation unit 14 acquires a subgraph that matches each path from the graph G (S35).

なお、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 pattern generation unit 14 recalculates each path score according to the equation of FIG. 17 (S37). Next, the pattern generation unit 14 deletes a path whose path score is equal to or less than a predetermined threshold value from the remaining ones (S39).

次に、パターン生成部14は、残ったパス(パターンという)に、そのパターンスコアとして、元のパススコアを付与し、パターンデータベース15に記憶させる(S41)。   Next, the pattern generation unit 14 assigns the original path score to the remaining path (referred to as a pattern) as the pattern score, and stores it in the pattern database 15 (S41).

なお、図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 pattern database 15, a subgraph desired to be finally obtained can be searched.

図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 database interface 19 and the query.

グラフ検索装置1では、入力用インタフェース生成部が入力用インタフェースを生成し、それをユーザ端末2に送信して(S101)、図19のように表示させる(S103)。ここでの操作により特定されたキーワードKW1、KW2およびクラスCLを、ユーザ端末2がグラフ検索装置1に送信する(S105)。   In the graph search device 1, the input interface generation unit generates an input interface, transmits it to the user terminal 2 (S101), and displays it as shown in FIG. 19 (S103). The user terminal 2 transmits the keywords KW1, KW2 and the class CL specified by the operation here to the graph search device 1 (S105).

これ以降、グラフ検索装置1は、これらキーワードおよびクラスを用いるのだが、ユーザ端末2から送信されたキーワードやクラスを用いるのでなく、かかるキーワードやクラスを予めグラフ検索装置1が記憶しておき、それを用いてもよい。以降の処理を、予め決めた時刻に行ってもよい。これは第2の実施の形態でも同様である。   Thereafter, the graph search device 1 uses these keywords and classes. Instead of using the keywords and classes transmitted from the user terminal 2, the graph search device 1 stores the keywords and classes in advance. May be used. The subsequent processing may be performed at a predetermined time. The same applies to the second embodiment.

さて、グラフ検索装置1では、パターン検索部16が、キーワードKW1に等しいインスタンスをもつノードを一方の端位置に有し、クラスCLが定義されたノードを他方の端位置に有する、パターン(第1パターンという)をパターンデータベース15から取得する(S107)。また、パターン検索部16は、キーワードKW2に等しいインスタンスをもつノードを一方の端位置に有し、クラスCLが定義されたノードを他方の端位置に有する、パターン(第2パターンという)をパターンデータベース15から取得する(S109)。   In the graph search device 1, the pattern search unit 16 has a node having an instance equal to the keyword KW1 at one end position and a node having a class CL defined at the other end position (first (first) pattern). Is acquired from the pattern database 15 (S107). The pattern search unit 16 has a pattern (referred to as a second pattern) having a node having an instance equal to the keyword KW2 at one end position and a node having a class CL defined at the other end position. 15 (S109).

なお、グラフ検索装置に、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 unit 17 merges the first pattern and the second pattern at the node at the other end position (S111).

これにより、図20に2つ示すような、パターンが生成される。   As a result, patterns as shown in FIG. 20 are generated.

次に、グラフ検索部18が、そのパターンをクエリに変換し、それをデータベースインタフェース19に送信する(S115)ことで、そのパターンにマッチするサブグラフをグラフGから取得する(S117)。これにより、図21に2つ示すような、サブグラフが検索される。   Next, the graph search unit 18 converts the pattern into a query and transmits it to the database interface 19 (S115), thereby acquiring a subgraph that matches the pattern from the graph G (S117). Thereby, subgraphs as shown in FIG. 21 are searched.

そして、グラフ検索部18は、図22の式により、各サブグラフのサブグラフスコアを計算する(S119)。   Then, the graph search unit 18 calculates the subgraph score of each subgraph according to the formula of FIG. 22 (S119).

次に、グラフ検索部18は、サブグラフをサブグラフスコアの順にソートする(S121)。ここで、複数のサブグラフを共通のインスタンスをもつノードでマージし、そのサブグラフのスコアとして、当該複数のサブグラフのサブグラフスコアの総和を計算してもよい。   Next, the graph search unit 18 sorts the subgraphs in the order of the subgraph scores (S121). Here, a plurality of subgraphs may be merged at a node having a common instance, and the sum of the subgraph scores of the plurality of subgraphs may be calculated as the score of the subgraph.

そして、出力用インタフェース生成部110が、各サブグラフがサブグラフスコアの高い順に並べた出力用インタフェースを生成し、これをユーザ端末2に送信し(S123)、表示させる(S125)。   Then, the output interface generation unit 110 generates an output interface in which each subgraph is arranged in descending order of the subgraph score, and transmits this to the user terminal 2 (S123) and displays it (S125).

なお、本実施の形態では、ユーザ端末2での操作で特定されたクラスが1つの場合を説明したが、複数の場合は、それぞれにつき上記処理を行えばよい。   In the present embodiment, the case where there is one class specified by the operation on the user terminal 2 has been described. However, in the case where there are a plurality of classes, the above-described processing may be performed for each.

また、本実施の形態では、ユーザ端末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 user terminal 2 is two, but in the case of three or more, the above-described processing may be performed for two of them.

以上説明したように、第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 score storage unit 13 or class score storage unit) in which the score of each class defined in 1 is stored, and a node connected to the tip of the arc including a predetermined content in the label from graph G (S7), the instance of a node other than the node is replaced with a variable (S29), and the path of the path is A is calculated based on the score stored in the storage means (S13), the subgraph matching the path is searched from the graph G (S35), and the score is increased according to the number of subgraphs searched (S37). Since the pattern storage means (pattern generation unit 14) stores a pattern having a score larger than a predetermined threshold in the pattern storage means (S41), the above-described pattern search can be performed.

[第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 graph search device 1 </ b> A is connected to a user terminal 2, and a display device 3 is connected to the user terminal 2.

グラフ検索装置1Aは、グラフデータベース11と、アークスコア記憶部13と、パターン生成部14Aと、パターンデータベース15と、パターン検索部16Aと、パターンマージ部17Aと、グラフ検索部18と、データベースインタフェース19と、出力用インタフェース生成部110とを備える。   The graph search device 1A includes a graph database 11, an arc score storage unit 13, a pattern generation unit 14A, a pattern database 15, a pattern search unit 16A, a pattern merge unit 17A, a graph search unit 18, and a database interface 19. And an output interface generation unit 110.

(第2の実施の形態の動作)
図24は、パターン生成部14Aのフローチャートである。図6などのときと同様な理由から、データベースインタフェース19とクエリについては言及しない。
(Operation of Second Embodiment)
FIG. 24 is a flowchart of the pattern generation unit 14A. For the same reason as in FIG. 6 etc., the database interface 19 and the query will not be mentioned.

まず、パターン生成部14Aが、再帰的にステップS1、S3およびS5(図6と同様)を行う。これによりグラフGのノードスコアがノードの重要度を示すこととなる。   First, the pattern generation unit 14A recursively performs steps S1, S3, and S5 (similar to FIG. 6). As a result, the node score of the graph G indicates the importance of the node.

次に、パターン生成部14Aは、グラフGから、予め決めた内容(例えば「キーワード」や「技術用語」)をラベルに含むアークの先端が接続されたノード(キーワードノード)を両方の端位置に有する全てのパスを取得する(S201)。   Next, from the graph G, the pattern generation unit 14A sets a node (keyword node) to which the tip of the arc including a predetermined content (for example, “keyword” or “technical term”) as a label is connected to both end positions. All the paths it has are acquired (S201).

なお、パターン生成部14Aは、以下のようにして、パスを取得してもよい。   Note that the pattern generation unit 14A may acquire a path as follows.

つまり、パターン生成部14Aは、予め決めたインスタンスの組み合わせ(例えば「XML」と「ウェブサービス」)毎に、各インスタンスにのみ関連するサブグラフGsを取得する。そして、グラフGについて再帰的に行われたステップS1、S3およびS5(図6と同様)を、このサブグラフGsについて行う。   That is, the pattern generation unit 14A acquires a subgraph Gs related only to each instance for each combination of predetermined instances (for example, “XML” and “Web service”). Then, steps S1, S3 and S5 (same as FIG. 6) recursively performed on the graph G are performed on the subgraph Gs.

そして、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 pattern generation unit 14A calculates the path score of each path using the formula of FIG. 9 (S203).

次に、パターン生成部14Aは、残ったパスから、パススコアが予め定めたしきい値以下のパスを削除する(S205)。   Next, the pattern generation unit 14A deletes a path whose path score is equal to or less than a predetermined threshold value from the remaining paths (S205).

次に、パターン生成部14Aは、残ったパス(パターンという)に、そのパターンスコアとして、元のパススコアを付与し、パターンデータベース15に記憶させる(S207)。   Next, the pattern generation unit 14A assigns the original path score to the remaining path (referred to as a pattern) as the pattern score, and stores it in the pattern database 15 (S207).

これにより、図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 pattern database 15.

このように、パターンデータベース15にパターンがスコアとともに記憶されると、最終的に得たいサブグラフの検索が可能となる。   As described above, when the pattern is stored in the pattern database 15 together with the score, the subgraph desired to be finally obtained can be searched.

図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 database interface 19 and the query.

グラフ検索装置1Aでは、入力用インタフェース生成部12が入力用インタフェースを生成し、それをユーザ端末2に送信して(S401)、図19のように表示させる(S403)。ここでの操作により特定されたキーワードKW1、KW2およびKW3を、ユーザ端末2がグラフ検索装置1に送信する(S405)。   In the graph search device 1A, the input interface generation unit 12 generates an input interface, transmits it to the user terminal 2 (S401), and displays it as shown in FIG. 19 (S403). The user terminal 2 transmits the keywords KW1, KW2, and KW3 specified by the operation here to the graph search device 1 (S405).

グラフ検索装置1Aでは、パターン検索部16Aが、キーワードKW1に等しいインスタンスをもつノードを一方の端位置に有し、キーワードKW2に等しいインスタンスをもつノードを他方の端位置に有する、パターン(第1パターンという)をパターンデータベース15から取得する(S407)。また、パターン検索部16Aは、キーワードKW1に等しいインスタンスをもつノードを一方の端位置に有し、キーワードKW3に等しいインスタンスをもつノードを他方の端位置に有する、パターン(第2パターンという)をパターンデータベース15から取得する(S409)。また、パターン検索部16Aは、キーワードKW2に等しいインスタンスをもつノードを一方の端位置に有し、キーワードKW3に等しいインスタンスをもつノードを他方の端位置に有する、パターン(第3パターンという)をパターンデータベース15から取得する(S411)。   In the graph search device 1A, a pattern (first pattern) in which the pattern search unit 16A has a node having an instance equal to the keyword KW1 at one end position and a node having an instance equal to the keyword KW2 at the other end position. Is obtained from the pattern database 15 (S407). The pattern search unit 16A also has a pattern (referred to as a second pattern) having a node having an instance equal to the keyword KW1 at one end position and a node having an instance equal to the keyword KW3 at the other end position. Obtained from the database 15 (S409). The pattern search unit 16A also has a pattern (referred to as a third pattern) having a node having an instance equal to the keyword KW2 at one end position and a node having an instance equal to the keyword KW3 at the other end position. Obtained from the database 15 (S411).

次に、パターンマージ部17Aは、第1パターンと第2パターンとを、それぞれに共通に含まれる共通部分があればその共通部分でマージする(S413)。また、パターンマージ部17Aは、第1パターンと第3パターン、第2パターンと第3パターン、についても同様のことを行う(S415)。これにより、図27に示すような、パターンが生成される。   Next, the pattern merging unit 17A merges the first pattern and the second pattern at the common part if there is a common part included in common (S413). The pattern merging unit 17A also performs the same for the first pattern and the third pattern, and the second pattern and the third pattern (S415). Thereby, a pattern as shown in FIG. 27 is generated.

次に、グラフ検索部18が、そのパターンをクエリに変換し、それをデータベースインタフェース19に送信する(S417)ことで、そのパターンにマッチするサブグラフをグラフGから取得する(S419)。これにより、図27に示すような、パターンと同じサブグラフが検索される。   Next, the graph search unit 18 converts the pattern into a query and transmits it to the database interface 19 (S417), thereby acquiring a subgraph matching the pattern from the graph G (S419). As a result, the same subgraph as the pattern as shown in FIG. 27 is retrieved.

そして、グラフ検索部18は、図22の式により、各サブグラフのサブグラフスコアを計算する(S421)。   Then, the graph search unit 18 calculates the subgraph score of each subgraph according to the formula of FIG. 22 (S421).

次に、グラフ検索部18は、サブグラフをサブグラフスコアの順にソートする(S423)。ここで、複数のサブグラフを共通のインスタンスをもつノードでマージし、そのサブグラフのスコアとして、当該複数のサブグラフのサブグラフスコアの総和を計算してもよい。   Next, the graph search unit 18 sorts the subgraphs in the order of the subgraph scores (S423). Here, a plurality of subgraphs may be merged at a node having a common instance, and the sum of the subgraph scores of the plurality of subgraphs may be calculated as the score of the subgraph.

そして、出力用インタフェース生成部110が、各サブグラフがサブグラフスコアの高い順に並べた出力用インタフェースを生成し、これをユーザ端末2に送信し(S425)、表示させる(S427)。   Then, the output interface generation unit 110 generates an output interface in which each subgraph is arranged in descending order of the subgraph score, and transmits this to the user terminal 2 (S425) to display it (S427).

なお、本実施の形態では、ユーザ端末2での操作で特定されたキーワードが3つの場合を説明したが、4つ以上の場合でも、同様に処理を行えばよい。   In the present embodiment, the case where the number of keywords specified by the operation on the user terminal 2 is three has been described, but the same processing may be performed even when there are four or more keywords.

以上説明したように、第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 (pattern retrieval unit 16A) and the first pattern and the second pattern are merged at a common part included in each (S411) pattern merge means ( Since the pattern merging unit 17A) and the graph G are searched for a subgraph that matches the pattern merged by the pattern merging unit (S419), the first keyword and the second There is a relationship between a subgraph retrieved from the keyword (a subgraph equal to the pattern in FIG. 25A) and a subgraph retrieved from the first keyword and the third keyword (a subgraph equal to the pattern in FIG. 25A). It is possible to search a clear subgraph (illustrated in FIG. 27) at high speed. That. 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から、予め決めた内容をラベルに含むアークの先端が接続されたノードを両方の端位置に有するパスであるパターンを生成し(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 score storage unit 13 or the class score storage) in which the score of each label of the arc of the graph G or the score of each class defined in the node of the graph G is stored. Part) and the graph G are searched for a path having a node connected to the tip of the arc having a predetermined content in the label at both end positions (S201), and the score of the path is stored in the storage means. Calculation is performed based on the score (S203), and a pattern whose score is larger than a predetermined threshold value is stored in the pattern storage means (S207). Because and a turn generating means (pattern generation unit 14A), will allow the pattern search described above.

第1の実施の形態に係るグラフ検索装置の構成図である。It is a lineblock diagram of a graph search device concerning a 1st embodiment. グラフGの一部を例示した図である。6 is a diagram illustrating a part of a graph G. FIG. グラフGを表示するためのデータ群の一部を例示した図である。6 is a diagram illustrating a part of a data group for displaying a graph G. FIG. アークスコア記憶部に記憶されたアークスコアの一部を示した図である。It is the figure which showed a part of arc score memorize | stored in the arc score memory | storage part. アークスコアの一部をグラフに当てはめた図である。It is the figure which applied a part of arc score to the graph. パターンを生成するときのフローチャートを示した図である。It is the figure which showed the flowchart when producing | generating a pattern. ノードスコアの計算式を示した図である。It is the figure which showed the calculation formula of a node score. ノードスコア計算の例にしたグラフを示す図である。It is a figure which shows the graph made into the example of node score calculation. パススコアの計算式を示した図である。It is the figure which showed the calculation formula of a pass score. パスグループのスコアの計算式を示した図である。It is the figure which showed the calculation formula of the score of a pass group. 生成されたパターンを例示した図である。It is the figure which illustrated the produced | generated pattern. クラススコア記憶部に記憶されたクラススコアの一部を示した図である。It is the figure which showed a part of class score memorize | stored in the class score memory | storage part. パターンを生成する別のフローチャートを示した図である。It is the figure which showed another flowchart which produces | generates a pattern. クラススコアの一部をグラフに当てはめた図である。It is the figure which applied a part of class score to the graph. クラススコアの計算式を示した図である。It is the figure which showed the calculation formula of a class score. パススコアの計算式を示した図である。It is the figure which showed the calculation formula of a pass score. パススコアの再計算式を示した図である。It is the figure which showed the recalculation formula of the pass score. 第1の実施の形態のシーケンス図である。It is a sequence diagram of a 1st embodiment. 表示された入力用インタフェースを例示した図である。It is the figure which illustrated the displayed interface for input. マージされたパターンを例示した図である。It is the figure which illustrated the merged pattern. 検索されたサブグラフを例示した図である。It is the figure which illustrated the searched subgraph. サブグラフスコアの計算式を示した図である。It is the figure which showed the calculation formula of a subgraph score. 第2の実施の形態に係るグラフ検索装置の構成図である。It is a block diagram of the graph search apparatus which concerns on 2nd Embodiment. パターンを生成するときのフローチャートを示した図である。It is the figure which showed the flowchart when producing | generating a pattern. 生成されたパターンを例示した図である。It is the figure which illustrated the produced | generated pattern. 第2の実施の形態のシーケンス図である。It is a sequence diagram of a 2nd embodiment. マージされたパターンを例示した図である。It is the figure which illustrated the merged pattern. 従来のグラフ検索装置で検索されるサブグラフを例示した図である。It is the figure which illustrated the subgraph searched with the conventional graph search device.

符号の説明Explanation of symbols

1、1A…グラフ検索装置
2…ユーザ端末
3…表示装置
11…グラフデータベース
12…入力用インタフェース生成部
13…アークスコア記憶部
14、14A…パターン生成部
15…パターンデータベース
16、16A…パターン検索部
17、17A…パターンマージ部
18…グラフ検索部
19…データベースインタフェース
110…出力用インタフェース生成部
DESCRIPTION OF SYMBOLS 1, 1A ... Graph search apparatus 2 ... User terminal 3 ... Display apparatus 11 ... Graph database 12 ... Input interface generation part 13 ... Arc score memory | storage part 14, 14A ... Pattern generation part 15 ... Pattern database 16, 16A ... Pattern search part 17, 17A ... Pattern merge unit 18 ... Graph search unit 19 ... Database interface 110 ... Interface generation unit for output

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.
請求項1ないし3のいずれかに記載のグラフ検索装置としてコンピュータを動作させるコンピュータプログラム。   A computer program for operating a computer as the graph search device according to claim 1. 請求項7記載のコンピュータプログラムが格納された記録媒体。   A recording medium in which the computer program according to claim 7 is stored.
JP2005330897A 2005-11-15 2005-11-15 Graph search device Active JP4628258B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3168829B2 (en) * 1993-10-30 2001-05-21 富士ゼロックス株式会社 Search formula creation support system

Patent Citations (1)

* Cited by examiner, † Cited by third party
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