JP6777903B2 - Search device, search method and search program - Google Patents
Search device, search method and search program Download PDFInfo
- Publication number
- JP6777903B2 JP6777903B2 JP2017230089A JP2017230089A JP6777903B2 JP 6777903 B2 JP6777903 B2 JP 6777903B2 JP 2017230089 A JP2017230089 A JP 2017230089A JP 2017230089 A JP2017230089 A JP 2017230089A JP 6777903 B2 JP6777903 B2 JP 6777903B2
- Authority
- JP
- Japan
- Prior art keywords
- search
- graph
- vertices
- failure
- data
- 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 search device, a search method, and a search program.
グラフ構造の中からクエリとして与えられた特定の部分構造すなわちサブグラフを発見する問題は、サブグラフマッチングと呼ばれる。従来、サブグラフマッチングでは、バックトラッキングと呼ばれる探索アルゴリズムに基づいて探索されていた(非特許文献1,2参照)。バックトラッキングでは、クエリグラフQおよびデータグラフGを入力として、データグラフGに含まれる全てのクエリグラフQの埋め込みが報告される。その際、クエリグラフQの頂点の割り当て先となり得るデータグラフGの候補頂点が抽出され、クエリグラフQの頂点の割り当て先を候補頂点の中から変更しながら選択して埋め込みを探索することにより、埋め込みが列挙される。
The problem of finding a specific subgraph, or subgraph, given as a query in a graph structure is called subgraph matching. Conventionally, in subgraph matching, a search algorithm called backtracking has been used for searching (see Non-Patent
しかしながら、従来のバックトラッキングによれば、探索対象であるデータグラフG中の埋め込みが存在しない部分に対しても、網羅的に探索を行うために、長い処理時間を要していた。そのため、例えば、グラフデータ向けに設計されたデータベースであるグラフデータベースに対する、サブグラフマッチングとして記述されるクエリを用いた対話的な作業や、グラフデータベースに依存するサービスの提供が困難な場合があった。また、グラフに対してサブグラフマッチングを用いて、例えば、特定のサブグラフの出現回数をグラフの特徴量として利用するデータマイニングを行う際に、現実的な時間で完了できない場合があった。 However, according to the conventional backtracking, a long processing time is required to comprehensively search even a portion of the data graph G to be searched where there is no embedding. Therefore, for example, it may be difficult to perform interactive work using a query described as subgraph matching for a graph database, which is a database designed for graph data, or to provide a service that depends on the graph database. Further, when subgraph matching is used for a graph, for example, data mining using the number of appearances of a specific subgraph as a feature amount of the graph is performed, it may not be completed in a realistic time.
本発明は、上記に鑑みてなされたものであって、データグラフの中からクエリグラフと同型な部分を探索するサブグラフマッチング処理を高速化することを目的とする。 The present invention has been made in view of the above, and an object of the present invention is to speed up a subgraph matching process for searching a part of a data graph having the same type as a query graph.
上述した課題を解決し、目的を達成するために、本発明に係る探索装置は、ラベルが付与された頂点と、隣接する頂点間を接続するエッジとで構成されるグラフのうち、検索対象のデータのグラフであるデータグラフから、検索に使用されるクエリのグラフであるクエリグラフと同型な部分を探索する際に、該探索の過程において発生する探索の失敗に基づいて、クエリグラフの頂点とデータグラフの頂点との組み合わせの集合を、探索の失敗の要因を表す失敗パターンとして抽出するパターン抽出部と、前記パターン抽出部により抽出された前記失敗パターンと合致する探索の状態を枝刈りして、前記データグラフから前記クエリグラフと同型な部分を探索する探索部と、を備えることを特徴とする。 In order to solve the above-mentioned problems and achieve the object, the search device according to the present invention is a search target among graphs composed of labeled vertices and edges connecting adjacent vertices. When searching for a part of the data graph that is a graph of data that is similar to the query graph that is the graph of the query used for the search, the top of the query graph and the top of the query graph are based on the search failure that occurs in the process of the search. A pattern extraction unit that extracts a set of combinations with the vertices of the data graph as a failure pattern representing the cause of the search failure, and a search state that matches the failure pattern extracted by the pattern extraction unit are pruned. , A search unit for searching a portion having the same type as the query graph from the data graph.
本発明によれば、データグラフの中からクエリグラフと同型な部分を探索するサブグラフマッチング処理を高速化することができる。 According to the present invention, it is possible to speed up the subgraph matching process for searching a part of the data graph having the same type as the query graph.
以下、図面を参照して、本発明の一実施形態を詳細に説明する。なお、この実施形態により本発明が限定されるものではない。また、図面の記載において、同一部分には同一の符号を付して示している。 Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. The present invention is not limited to this embodiment. Further, in the description of the drawings, the same parts are indicated by the same reference numerals.
[従来のサブグラフマッチング処理]
まず、従来のサブグラフマッチング処理について説明する。以下の説明において、頂点がラベルを持つ無向グラフG=(VG,EG,Σ,l)を処理の対象とする。以下、Gをデータグラフと記す。ここで、VGは頂点の集合、EG⊆VG×VGはエッジの集合、Σはラベルの集合、lは頂点とラベルとを対応させる関数を示す。同様に、クエリグラフQ=(VQ,EQ,Σ,l)を処理の対象とする。クエリグラフの頂点は、u1,u2,…,u|VQ|というように、番号付けされているものとする。
[Conventional subgraph matching process]
First, the conventional subgraph matching process will be described. In the following description, undirected graph G = the vertex has a label (V G, E G, Σ , l) is the target of processing. Hereinafter, G is referred to as a data graph. Here, V G represents a set of vertices, a set of E G ⊆V G × V G edge, sigma is a set of labels, l is a function for associating the vertex and labels. Similarly, the query graph Q = (V Q , EQ , Σ, l) is the target of processing. It is assumed that the vertices of the query graph are numbered such as u 1 , u 2 , ..., U | VQ | .
また、サブグラフマッチングとは、データグラフGとクエリグラフQとが与えられたときに、サブグラフ同型である部分への埋め込みMを列挙する問題と定義する。 Further, subgraph matching is defined as a problem of enumerating embedded Ms in parts having the same subgraph type when a data graph G and a query graph Q are given.
ここで、図1を参照して、サブグラフマッチングについて説明する。図1は、サブグラフマッチングに関する定義を示す図である。以下の説明において、図1の定義1に示すように、埋め込みを集合として表現する。サブグラフマッチングでは、クエリグラフの頂点(以下、クエリ頂点と記す。)から、データグラフの頂点(以下、データ頂点と記す。)への埋め込みM∈VQ×VGを探索する。
Here, subgraph matching will be described with reference to FIG. FIG. 1 is a diagram showing a definition regarding subgraph matching. In the following description, embedding is represented as a set, as shown in
また、探索の過程において、図1の定義2に示す部分埋め込み、すなわち、一部のクエリ頂点についてのみ、データ頂点が割り当てられた埋め込みを考える必要がある。なお、本実施形態において、定義域がVQ全体であるような埋め込みを完全な埋め込みと記す場合がある。 Further, in the process of search, it is necessary to consider the partial embedding shown in the definition 2 of FIG. 1, that is, the embedding in which the data vertices are assigned only to some query vertices. In the present embodiment, there is a case where domain is referred to as implantable complete embedded as a whole V Q.
また、次式(1)〜(3)に示す3つの制約を満たす埋め込みM:VQ→VGを定義できるときに、QはGに対してサブグラフ同型であるものする。 Also, embedding meet three constraints shown in equation (1) ~ (3) M : when you can define V Q → V G, Q are those which are subgraph isomorphism against G.
従来のサブグラフマッチング処理の主流は、バックトラッキングに基づく探索アルゴリズムである。上記したとおり、バックトラッキングは、主に、候補頂点の抽出と、埋め込みの列挙との2つの処理を含む。 The mainstream of conventional subgraph matching processing is a search algorithm based on backtracking. As mentioned above, backtracking mainly involves two processes: extraction of candidate vertices and enumeration of embeddings.
まず、候補頂点の抽出において、候補頂点すなわち各クエリ頂点の割り当て先となり得るデータ頂点の集合C[ui]⊆VGが抽出される。uiがデータ頂点vに割り当て可能か否かは、例えば、次式(4)〜(6)を用いて判定される(非特許文献1参照)。つまり、次式(4)〜(6)の全てを満たす場合に、uiがvに割り当て可能と判定される。 First, in the extraction of candidate vertices, the set of data vertex can be the candidate vertex or each query vertex is assigned C [u i] ⊆V G are extracted. u i whether assignable to data vertex v, for example, be determined using the following equation (4) to (6) (see Non-Patent Document 1). That is, if they meet all of the following formulas (4) ~ (6), u it is determined to be assigned to v.
上記式(4)では、まず、ラベルの一致が確認される。従って、C[ui]に含まれるデータ頂点は、ラベル制約を満たす。また、上記式(5)にて次数が比較され、上記式(6)にて隣接頂点のラベルごとに隣接頂点数が比較される。これらの条件では、vにui以上の数の隣接頂点がなければ、uiの隣接頂点をvの隣接頂点に割り当てることができないことが利用されている。このように、確認が容易な条件により、割り当て不可能なクエリ頂点とデータ頂点との組み合わせを除外して、以降の探索を高速化している。 In the above formula (4), first, label matching is confirmed. Therefore, data vertexes included in the C [u i] satisfies a label constraints. Further, the degree is compared by the above formula (5), and the number of adjacent vertices is compared for each label of the adjacent vertex by the above formula (6). In these conditions, if there is no adjacent vertices in the number of more than u i to v, can not be assigned to adjacent vertices of u i to the adjacent vertex of v is used. In this way, the combination of unassignable query vertices and data vertices is excluded under the condition that it is easy to confirm, and the subsequent search is speeded up.
次に、図2を参照して、埋め込みの列挙について説明する。埋め込みの列挙では、再帰関数Searchが呼び出され実行される。図2は、再帰関数の処理手順を示すフローチャートである。図2に示すフローチャートでは、まず、Search(φ)が呼び出される。ただし、φは空集合を表す。再帰関数Search(P)は、部分埋め込みPを引数として受け取り、まず、Pが完全な埋め込みであるか否かが確認される(ステップS100)。すなわち、k=|P|として、k=|VQ|であるか否かが確認される。Pが完全な埋め込みである場合(ステップS100,Yes)、Pは埋め込みとして報告され(ステップS180)、処理は関数の呼び出し元に戻る。 Next, the embedding enumeration will be described with reference to FIG. In the embedded enumeration, the recursive function Search is called and executed. FIG. 2 is a flowchart showing a processing procedure of the recursive function. In the flowchart shown in FIG. 2, First, Search (φ) is called. However, φ represents an empty set. The recursive function Search (P) receives the partially embedded P as an argument, and first, it is confirmed whether or not P is completely embedded (step S100). That is, it is confirmed whether or not k = | V Q | with k = | P |. If P is a complete embedding (step S100, Yes), then P is reported as an embedding (step S180) and the process returns to the caller of the function.
一方、Pが完全な埋め込みではない場合(ステップS100,No)、ステップS110に処理が進む。ステップS110の処理では、クエリ頂点uk+1がデータ頂点vに割り当てられる。その際、vをC[ui]から選択することによりラベル制約が満たされることになる。同時に、vは、既にPに含まれるクエリ頂点と、データ頂点に関してエッジ制約が満たされなければならない。具体的には、次式(7)に示すエッジ制約を満たすv∈C[ui]が選択される。 On the other hand, when P is not completely embedded (steps S100 and No), the process proceeds to step S110. In the process of step S110, the query vertex uk + 1 is assigned to the data vertex v. At that time, v so that the label constraint is satisfied by the selected from C [u i]. At the same time, v must satisfy the edge constraints for the query vertices already contained in P and the data vertices. Specifically, V∈C satisfying edge constraints shown in equation (7) [u i] is selected.
次に、Pに(uk+1,v)の割り当てが追加された部分埋め込みP+が作成され、P+について単射制約が確認される(ステップS120)。P+が単射であれば(ステップS120,Yes)、P+を引数として再帰関数Search(P+)が再帰呼び出しされる(ステップS140)。一方、P+が単射でなければ(ステップS120,No)、再帰関数Search(P+)は再帰呼び出しされず、呼び出し元に戻る(ステップS150)。 Next, a partially embedded P + with the assignment of (uk + 1 , v) added to P is created, and the injective constraint is confirmed for P + (step S120). If P + is injective (step S120, Yes), the recursive function Search (P + ) is recursively called with P + as an argument (step S140). On the other hand, if P + is not injective (step S120, No), the recursive function Search (P + ) is not recursively called and returns to the caller (step S150).
次に、図3および図4を参照して、従来のサブグラフマッチング処理を具体的に説明する。図3および図4は、サブグラフマッチング処理について説明するための説明図である。従来のサブグラフマッチング処理では、まず、上記式(4)〜(6)を用いて、候補頂点集合が抽出される。図3に示す例では、C[u1]={v1},C[u2]={v2,…,v5},C[u3]={v6,…,v9},C[u4]={v1,v10}が抽出される。 Next, the conventional subgraph matching process will be specifically described with reference to FIGS. 3 and 4. 3 and 4 are explanatory views for explaining the subgraph matching process. In the conventional subgraph matching process, first, a set of candidate vertices is extracted using the above equations (4) to (6). In the example shown in FIG. 3, C [u 1 ] = {v 1 }, C [u 2 ] = {v 2 , ..., v 5 }, C [u 3 ] = {v 6 , ..., v 9 }, C [u 4 ] = {v 1 , v 10 } is extracted.
この場合に、図4に示すバックトラッキングの探索木に従って、C[u1]={v1}であることから、最初にu1がv1に割り当てられる。またここでは、u2以降については、頂点番号の昇順に探索する場合について考える。すなわち、C[u2]からv2が選択され、C[u3]からv6が選択され、C[u4]からv10が選択される。この場合に、全てのクエリ頂点がデータ頂点に割り当てられるので、{(u1,v1),(u2、v2),(u3,v6),(u4,v10)}が埋め込みとして報告される。 In this case, according to the backtracking search tree shown in FIG. 4, since C [u 1 ] = {v 1 }, u 1 is first assigned to v 1 . Further, here, for u 2 and later, a case of searching in ascending order of vertex numbers will be considered. That is, v 2 is selected from C [u 2 ], v 6 is selected from C [u 3 ], and v 10 is selected from C [u 4 ]. In this case, all query vertices are assigned to the data vertices, so {(u 1 , v 1 ), (u 2 , v 2 ), (u 3 , v 6 ), (u 4 , v 10 )} Reported as an embedding.
さらに、他の埋め込みが探索される。u2の割り当て先の選択に戻り、u2がv3に割り当てられ、u3がv7に割り当てられる。この場合に、v7に隣接するu4の候補頂点v1には、既にu1が割り当てられており、単射制約の違反となるため、u4をv1に割り当てることができない。v7の隣接頂点には、他にu4の候補頂点が存在しないため、探索失敗となる。 In addition, other embeddings are searched. Returning to its assigned selection u 2, assigned to u 2 is v 3, u 3 is assigned to v 7. In this case, the candidate vertices v 1 of u 4 adjacent to v 7, already assigned u 1, to become a violation of injection constraints, can not be assigned to u 4 to v 1. The adjacent vertex of v 7, since the other there is no candidate vertices of u 4, the search fails.
u3の残りの候補頂点v8、v9についても、同様に、u4をv1に割り当てることができず、探索失敗となる。また、u2の割り当て先の選択に戻り、u2がv4に割り当てられた場合、およびu2がv5に割り当てられた場合にも、同様に、探索失敗となる。以上の処理により、全ての候補頂点について探索が行われたことになり、探索が終了する。 for the remaining candidate vertices v 8, v 9 of u 3, likewise, can not be assigned to u 4 to v 1, the search fails. Further, return to its assigned selection u 2, if u 2 is assigned to v 4, and even when u 2 is assigned to v 5, similarly, the search fails. By the above processing, the search has been performed for all the candidate vertices, and the search ends.
このように、従来のサブグラフマッチング処理は、クエリ頂点の割り当て先を変更しながら再帰呼び出しを繰り返すバックトラッキングに基づいて実行されている。 In this way, the conventional subgraph matching process is executed based on backtracking in which recursive calls are repeated while changing the allocation destination of query vertices.
[探索装置の処理概要]
次に、図5および図6を参照して、本実施形態に係る探索装置の処理概要を説明する。本実施形態の探索装置は、図3に示した例において、上記の従来のサブグラフマッチング処理と同様に、まず、{(u1,v1),(u2、v2),(u3,v6),(u4,v10)}を埋め込みとして報告する。
[Outline of search device processing]
Next, a processing outline of the search device according to the present embodiment will be described with reference to FIGS. 5 and 6. In the example shown in FIG. 3, the search device of the present embodiment first, in the same manner as the above-mentioned conventional subgraph matching process, first, {(u 1 , v 1 ), (u 2 , v 2 ), (u 3 , Report v 6 ), (u 4 , v 10 )} as embedding.
次に、探索装置は、バックトラッキングによってu2をv3に割り当て、u3をv7に割り当てて探索失敗となった場合に、失敗パターンとして記録する。すなわち、「u1のv1への割り当てと、u3のv7への割り当てとを同時に行うと、探索に失敗する」ということを失敗パターンとして抽出して記録しておく。同様に、u3をv8またはv9に割り当てて探索失敗となった場合にも、「u1のv1への割り当てと、u3のv8(またはv9)への割り当てとを同時に行うと、探索に失敗する」ということを失敗パターンとして抽出して記録しておく。 Next, the search device assigns u 2 to v 3 by backtracking and assigns u 3 to v 7 , and when the search fails, records it as a failure pattern. That is, "if u 1 is assigned to v 1 and u 3 is assigned to v 7 at the same time, the search fails" is extracted and recorded as a failure pattern. Similarly, when u 3 is assigned to v 8 or v 9 and the search fails, "assigning u 1 to v 1 and assigning u 3 to v 8 (or v 9 ) are performed at the same time. And, "the search fails" is extracted and recorded as a failure pattern.
また、探索装置が、u2の割り当て先をv4に変更した場合に、u3を隣接頂点v7,v8,v9に割り当てた部分埋め込みは、いずれも記録済みの失敗パターンに合致する。従って、u3を候補頂点に割り当てた部分埋め込みを作成することなく、探索失敗になることがわかる。u2の割り当て先をv5に変更した場合についても、同様に、探索失敗になることがわかる。 Further, when the search device changes the allocation destination of u 2 to v 4 , the partial embedding in which u 3 is assigned to the adjacent vertices v 7 , v 8 , and v 9 all match the recorded failure pattern. .. Therefore, without creating an embedded portion assigned to u 3 in candidate vertices, it is understood to be a search failure. Similarly, it can be seen that the search fails when the allocation destination of u 2 is changed to v 5 .
このように、本実施形態の探索装置によれば、図5に示す探索木のように、図4に示した従来のサブグラフマッチングの探索木と比較して、探索空間が減少する。すなわち、従来は、図4に示したように、u2をv3,v4,v5のいずれかに割り当てるような埋め込みが存在しないにもかかわらず、それぞれu3をv7,v8,v9に割り当てて探索していた。つまり、従来は、ある部分埋め込みPについて、P⊂Mであるような完全な埋め込みMが存在しない場合にも、バックトラッキングによる探索を行っていた。本実施形態の探索装置は、このような埋め込みの発見に至らない探索の枝刈りを行う。したがって、本実施形態の探索装置によれば、高速なサブグラフマッチングが可能となる。 As described above, according to the search device of the present embodiment, the search space is reduced as compared with the conventional subgraph matching search tree shown in FIG. 4, as in the search tree shown in FIG. That is, conventionally, as shown in FIG. 4, although there is no embedding that assigns u 2 to any of v 3 , v 4 , and v 5 , u 3 is assigned to v 7 , v 8 , and so on, respectively. v had been searching assigned to the 9. That is, conventionally, for a certain partially embedded P, a search by backtracking is performed even when there is no completely embedded M such as P⊂M. The search device of the present embodiment prunes the search that does not lead to the discovery of such an embedding. Therefore, according to the search device of the present embodiment, high-speed subgraph matching is possible.
また、図6のフローチャートに示すように、本実施形態の探索装置による埋め込みの列挙の処理は、図2に示した従来のサブグラフマッチング処理における再帰関数の処理手順と、ステップS130、S160〜S170が異なる。すなわち、図6に示すように、本実施形態の探索装置においては、失敗パターンが抽出されて記録される(ステップS160〜S170)。具体的には、再帰関数Search(P+)の再帰呼び出しにおいて埋め込みが一つも報告されなかった場合に(ステップS160,Yes)、Pから失敗パターンが抽出され記録される(ステップS170)。埋め込みが報告された場合には(ステップS160,No)、処理は関数の呼び出し元に戻る。 Further, as shown in the flowchart of FIG. 6, the process of enumerating the embedding by the search device of the present embodiment includes the processing procedure of the recursive function in the conventional subgraph matching process shown in FIG. 2, and steps S130 and S160 to S170. different. That is, as shown in FIG. 6, in the search device of the present embodiment, the failure pattern is extracted and recorded (steps S160 to S170). Specifically, when no embedding is reported in the recursive call of the recursive function Search (P + ) (step S160, Yes), the failure pattern is extracted from P and recorded (step S170). If the embedding is reported (step S160, No), the process returns to the caller of the function.
また、抽出された失敗パターンと照合される(ステップS130)。具体的には、作成された部分埋め込みP+が記録されている失敗パターンのいずれにも合致しない場合に(ステップS130,Yes)、再帰関数Search(P+)が再帰呼び出しされる(ステップS140)。P+がいずれかの失敗パターンに合致した場合には(ステップS130,No)、ステップS150に処理が進む。その他の処理は図2に示した従来のサブグラフマッチング処理と同様であるので、説明を省略する。 In addition, it is collated with the extracted failure pattern (step S130). Specifically, when the created partially embedded P + does not match any of the recorded failure patterns (step S130, Yes), the recursive function Search (P + ) is recursively called (step S140). .. If P + matches any of the failure patterns (steps S130, No), the process proceeds to step S150. Since the other processes are the same as the conventional subgraph matching process shown in FIG. 2, the description thereof will be omitted.
[探索装置の構成]
次に、図7を参照して、本実施形態に係る探索装置の概略構成を説明する。図7に示すように、本実施形態に係る探索装置1は、ワークステーションやパソコン等の汎用コンピュータで実現され、入力部11と出力部12と制御部13と記憶部14とを備える。探索装置1は、後述する探索処理を実行して、失敗パターンの枝刈りを行いながら、サブグラフマッチング処理を行う。
[Search device configuration]
Next, a schematic configuration of the search device according to the present embodiment will be described with reference to FIG. 7. As shown in FIG. 7, the
入力部11は、キーボードやマウス等の入力デバイスを用いて実現され、操作者による入力操作に対応して、制御部13に対して各種指示情報を入力する。また、本実施形態において、入力部11は、後述する探索処理の対象のデータグラフGおよびクエリグラフQを含むグラフデータを受け付けて制御部13に入力する。
The
出力部12は、液晶ディスプレイなどの表示装置、プリンター等の印刷装置、情報通信装置等によって実現され、例えば、後述する探索処理の処理結果であるサブグラフマッチング結果等を操作者に対して出力する。
The
また、探索装置1は、図示しない通信制御部を備える。通信制御部は、NIC(Network Interface Card)等で実現され、LAN(Local Area Network)やインターネットなどの電気通信回線を介したサーバ等の外部の装置と制御部13との通信を制御する。例えば、上記のグラフデータは、通信制御部を介して外部の装置から受け付けてもよい。また、サブグラフマッチング結果は、通信制御部を介して外部の装置に出力されてもよい。
Further, the
記憶部14は、RAM(Random Access Memory)、フラッシュメモリ(Flash Memory)等の半導体メモリ素子、または、ハードディスク、光ディスク等の記憶装置によって実現される。記憶部には、探索装置1を動作させる処理プログラムや、処理プログラムの実行中に使用されるデータなどが予め記憶され、あるいは処理の都度一時的に記憶される。例えば、後述する探索処理において、抽出された失敗パターンが記録される。この記憶部14は、通信制御部を介して制御部13と通信する構成でもよい。
The
制御部13は、CPU(Central Processing Unit)等の演算処理装置がメモリに記憶された処理プログラムを実行することにより、図3に例示するように、頂点抽出部13a、パターン抽出部13b、および探索部13cとして機能する。なお、制御部13は、後述する探索処理が実現されるならば、これらの機能部とは異なる機能単位で構成されていてもよい。
As illustrated in FIG. 3, the
また、本実施形態において、制御部13は複数CPUコアで実現されてもよい。これにより、バックトラッキングの各枝に対応する処理や、後述する探索処理における各データグラフの頂点に関する処理を、複数のCPUによる並行処理で行うことが可能となる。
Further, in the present embodiment, the
具体的には、制御部13は、ラベルが付与された頂点と、隣接する頂点間を接続するエッジとで構成されるグラフのうち、検索対象のデータのグラフであるデータグラフから、検索に使用されるクエリのグラフであるクエリグラフと一致する部分を探索する際に、以下の探索処理を実行する。
Specifically, the
すなわち、頂点抽出部13aは、データグラフの各頂点と隣接する頂点とのラベルの組み合わせに基づいて、クエリグラフの頂点と一致し得るデータグラフの頂点に隣接する頂点のうち、クエリグラフの頂点に隣接する頂点と一致し得る該データグラフの頂点を、データグラフの各頂点に対応する候補頂点として抽出する。具体的には、頂点抽出部13aは、従来のバックトラッキング処理と同様に、上記式(4)〜(6)を満たす候補頂点を抽出する。 That is, the vertex extraction unit 13a selects the vertices of the query graph among the vertices adjacent to the vertices of the data graph that can match the vertices of the query graph based on the combination of the labels of each vertex of the data graph and the adjacent vertices. The vertices of the data graph that can match the adjacent vertices are extracted as candidate vertices corresponding to each vertex of the data graph. Specifically, the vertex extraction unit 13a extracts candidate vertices satisfying the above equations (4) to (6) as in the conventional backtracking process.
また、パターン抽出部13bは、探索の過程において発生する探索の失敗に基づいて、クエリグラフの頂点とデータグラフの頂点との組み合わせの集合を、探索の失敗の要因を表す失敗パターンとして抽出する。具体的には、パターン抽出部13bは、以下に説明するように、抽出された候補頂点を用いて失敗パターンを抽出する。
Further, the
また、探索部13cは、パターン抽出部13bにより抽出された失敗パターンと合致する探索の状態を枝刈りして、データグラフからクエリグラフと同型な部分を探索する。
Further, the
ここで、図8は、本実施形態の探索装置による探索処理に関する定義および定理を示す図である。以下に説明する探索処理において、図8に示す定義および定理が適用される。すなわち、図8の定義3に示すように、失敗パターンが定義される。また、図8の定義4に示すように、パターンの合致が定義される。また、図8の定理1に示すように、失敗パターンの判定が定義される。
Here, FIG. 8 is a diagram showing a definition and a theorem regarding the search process by the search device of the present embodiment. The definitions and theorems shown in FIG. 8 are applied in the search process described below. That is, as shown in Definition 3 of FIG. 8, a failure pattern is defined. Further, as shown in Definition 4 of FIG. 8, pattern matching is defined. Further, as shown in
パターン抽出部13bは、図6に示したように、探索が失敗した場合に部分埋め込みから失敗パターンを抽出する(ステップS170)。パターン抽出部13bは、より多くの部分埋め込みに合致してより効果的に探索の枝刈りを行うため、より一般化された失敗パターンを抽出することが望ましい。すなわち、失敗パターンDに含まれる、クエリ頂点とデータ頂点との組み合わせの数|D|が小さいことが望ましい。そこで、パターン抽出部13bは、探索失敗であることがわかった部分埋め込みPから、クエリ頂点とデータ頂点との組み合わせの一部を抽出して失敗パターンDを作成する。したがって、作成される失敗パターンDは、抽出元の部分埋め込みをPとしたときにその部分集合となるため、次式(8)を満たす。
As shown in FIG. 6, the
失敗パターンは、探索失敗の原因に基づいて作成される。探索失敗の原因は、図6に示したように、エッジ制約を満たす候補頂点がないこと(ステップS110)、Pに新しい割り当てを追加して作成したP+がいずれも失敗であること(ステップS120〜S140)の2つに大別される。 The failure pattern is created based on the cause of the search failure. As shown in FIG. 6, the cause of the search failure is that there is no candidate vertex that satisfies the edge constraint (step S110), and that P + created by adding a new allocation to P is a failure (step S120). It is roughly divided into two (~ S140).
まず、エッジ制約を満たす候補頂点がない場合の失敗パターンの抽出方法について説明する。図6のステップS110の処理対象である上記式(7)を満たす候補頂点vの集合をCP[ui]とすると、次式(9)が成立する。 First, a method of extracting a failure pattern when there is no candidate vertex that satisfies the edge constraint will be described. Process is the object above formula in step S110 in FIG. 6 a set of candidate vertices v satisfying (7) When C P [u i], the following equation (9) holds.
ここで、図9は、本実施形態の探索装置による探索処理に関する定理を示す図である。クエリ頂点u1に対応する候補頂点がない状態は、空集合であるようなCP[ui]によって表される。また、まだデータ頂点が割り当てられていないクエリ頂点の候補頂点がなくなった場合に、探索失敗となる。換言すると、図9の定理2に示すように、式(10)が成立する。 Here, FIG. 9 is a diagram showing a theorem regarding the search process by the search device of the present embodiment. The absence candidate vertices corresponding to the query vertex u 1 is represented by C P [u i] such that empty set. Also, if there are no candidate vertices for query vertices to which data vertices have not been assigned, the search will fail. In other words, as shown in Theorem 2 of FIG. 9, equation (10) holds.
さらに、CP[ui]が空集合である場合について、図9に示す定理3が成立する。 Furthermore, C P [u i] is for the case where an empty set, the theorem 3 shown in FIG. 9 is established.
つまり、エッジ制約により候補頂点がなくなった場合に、CP[ui]が空集合となるuiが存在する。その場合のiについて、Di⊆PかつDead(Di)であるようなDiが存在し、上記式(8)を満たす。そこで、パターン抽出部13bは、CP[ui]が空集合であるような任意のDiを失敗パターンとして登録する。 That is, when there are no more candidate vertices by the edge constraint, C P [u i] exists u i as the empty set. For that case i, there are D i as a D i ⊆P and Dead (D i), satisfies the equation (8). Therefore, the pattern extracting unit 13b, C P [u i] registers as a failure pattern any D i such that empty set.
次に、P+がいずれも失敗である場合の失敗パターンの抽出方法について説明する。ここで、図10は、本実施形態の探索装置による探索処理に関する定理を示す図である。P+がいずれも失敗である場合に、図10に示す定理4および定理5が成立する。すなわち、P+がいずれも失敗である場合について、定理4の式(13)が成立することから、式(15)に示す失敗パターンの集合を定義できる。この場合の失敗パターンについて、定理5の式(16)が成立する。したがって、パターン抽出部13bは、式(16)を用いて作成した失敗パターンを登録する。
Next, a method of extracting a failure pattern when both P + are failures will be described. Here, FIG. 10 is a diagram showing a theorem regarding the search process by the search device of the present embodiment. When both P + are unsuccessful, Theorem 4 and Theorem 5 shown in FIG. 10 hold. That is, since the equation (13) of Theorem 4 holds in the case where all P + are failures, the set of failure patterns shown in the equation (15) can be defined. For the failure pattern in this case, the equation (16) of Theorem 5 holds. Therefore, the
次に、定理4の式(15)に示した失敗パターンの集合を得るために、P+からD+を抽出する方法について説明する。P+が失敗となる原因は、図6に示したように、P+が単射でないこと(ステップS120)、P+がいずれかの失敗パターンに合致すること(ステップS130)、再帰呼び出しした再帰関数が探索失敗となること(ステップS140)の3つである。このうち、P+がいずれかの失敗パターンに合致する場合については、失敗パターンが既に抽出され記録されている。また、再帰呼び出しした再帰関数が探索失敗となる場合は、再帰関数内で失敗パターンの抽出と記録とが行われる。したがって、パターン抽出部13bは、P+が単射でない場合にのみ、新たに失敗パターンの抽出を行う。
Next, a method of extracting D + from P + will be described in order to obtain a set of failure patterns shown in the equation (15) of Theorem 4. The reasons why P + fails are that P + is not injective (step S120), P + matches one of the failure patterns (step S130), and recursive recursion is called, as shown in FIG. There are three cases where the function fails to search (step S140). Of these, when P + matches any of the failure patterns, the failure pattern has already been extracted and recorded. If the recursive function called recursively fails in the search, the failure pattern is extracted and recorded in the recursive function. Therefore, the
部分埋め込みP+が単射でないこと、すなわち、同じデータ頂点に複数のクエリ頂点が割り当てられることによる失敗は、図11に示す定理6および定理7のように表される。すなわち、P+が単射でない場合について、定理6の式(18)が成立する。また、式(19)のDi +は、定理7の式(20)に示すように、それ自体が失敗パターンとなっている。 Failure due to the partial embedding P + not being injective, that is, the assignment of multiple query vertices to the same data vertices, is represented by Theorem 6 and Theorem 7 shown in FIG. That is, the equation (18) of Theorem 6 holds when P + is not injective. Further, Di + of the equation (19) itself is a failure pattern as shown in the equation (20) of Theorem 7.
なお、この探索アルゴリズムでは、再帰関数Searchには単射であることが確認された部分埋め込みが引き渡されている(ステップS120)。そのため、P+が単射でないことは、最後に追加されたukと、もう一つの他のクエリ頂点とが同じデータ頂点に割り当てられたことに起因する。したがって、P+が単射でないならば、|Dk +|=2である。この場合に、パターン抽出部13bは、Dk +をP+から抽出した失敗パターンとする。
In this search algorithm, a partial embedding confirmed to be injective is passed to the recursive function Search (step S120). Therefore, the fact that P + is not injective is due to the fact that the last added uk and another query vertex are assigned to the same data vertex. Therefore, if P + is not injective, then | D k + | = 2. In this case, the
[探索処理]
次に、図12を参照して、探索装置1の探索処理について説明する。図12は、本実施形態の探索処理手順を示すフローチャートである。図12のフローチャートは、図6に示したフローチャートに、失敗パターンを抽出するための処理が追加されたものである。ただし、失敗パターンの集合は、関数Searchのスコープ外で定義された大域変数であり、空集合で初期化されているものとする。
[Search processing]
Next, the search process of the
この探索処理では、パターン抽出部13bが、上記の定理3,5,7に基づいて失敗パターンDを作成し、作成したDを失敗パターン集合へ追加する。また、パターン抽出部13bは、関数Searchの戻り値としてPから抽出された失敗パターンを返す。ただし、パターン抽出部13bは、引数Pを含む埋め込みが発見された場合には空集合を返す。
In this search process, the
まず、図2に示した従来のサブグラフマッチング処理と同様に、探索部13cは、Pが完全な埋め込みであるか否かを確認する(ステップS100)。完全な埋め込みである場合には(ステップS100,Yes)、探索部13cは、Pを埋め込みとして報告する(ステップS180)。また、Pは失敗ではないので、探索部13cは、Pから抽出された失敗パターンDを空集合とする(ステップS161)。
First, similarly to the conventional subgraph matching process shown in FIG. 2, the
完全な埋め込みでなかった場合には(ステップS100,No)、探索部13cは、Pが図9に示した定理2に基づく失敗であるか否かを確認する(ステップS163)。失敗の場合には(ステップS163,Yes)、パターン抽出部13bは、図9に示した定理3に基づいて失敗パターンを抽出する(ステップS164)。失敗でない場合には(ステップS163,No)、探索部13cが、Pに新しい割り当てを追加したP+について処理を進める。
If it is not completely embedded (step S100, No), the
すなわち、探索部13cは、まず、P+のそれぞれから抽出された失敗パターンD+の集合を空集合で初期化する(ステップS165)。次に、探索部13cは、エッジ制約を満たす頂点v∈CP[uk+1]について、ループを実行する(ステップS110)。すなわち、探索部13cは、P+を作成し(ステップS121)、それが単射であるか否かを確認する(ステップS122)。ここで、Pは単射であるので、P+が単射でないことは、v∈val(P)であるか否かによって確認できる。
That is, the
単射でない場合に(ステップS122,Yes)、パターン抽出部13bが、図11に示した定理7に基づいて失敗パターンを失敗パターンの集合に追加する(ステップS131)。単射である場合に(ステップS122,No)、探索部13cは、P+が失敗パターンの集合に記録された失敗パターンに合致するか否かを確認する(ステップS132)。
When it is not injective (step S122, Yes), the
合致する失敗パターンD+が存在する場合には(ステップS132,Yes)、このD+はPから抽出された失敗パターンであるので、パターン抽出部13bは、このD+を失敗パターンの集合に追加する(ステップS133)。合致する失敗パターンがなければ(ステップS132,No)、探索部13cは、Search(P+)を再帰呼び出しし、戻り値をD+に代入する(ステップS141)。また、探索部13cは、戻り値D+を失敗パターンの集合に追加する(ステップS142)。
If a matching failure pattern D + exists (step S132, Yes), since this D + is a failure pattern extracted from P, the
以上の処理を、全てのv∈CP[uk+1]について実行したら、探索部13cは、P+の中に成功したものが存在したか否かを確認する。関数Searchは、探索に成功した場合に空集合を返すので、成功したものがあればステップS142の処理で空集合が追加されている。したがって、探索部13cは、失敗パターンの集合が空集合を含むか否かを確認する(ステップS166)。
The above process, if executed for all the v∈C P [u k + 1] , the
失敗パターンの集合が空集合を含む場合に(ステップS166,Yes)、Pを含む完全な埋め込みが存在することを意味するので、探索部13cは、失敗パターンDを空集合とする(ステップS167)。失敗パターンの集合が空集合を含まない場合には(ステップS166,No)、Pは探索失敗であるので、パターン抽出部13bは、図10に示した定理5に基づいて抽出した失敗パターンをDに代入する(ステップS168)。
When the set of failure patterns includes an empty set (step S166, Yes), it means that there is a complete embedding including P, so the
以上の処理の後に、Dが空集合でない場合、すなわち、Pが失敗であった場合に(ステップS169,Yes)、パターン抽出部13bは、Dを失敗パターンの集合に追加する(ステップS170)。これにより、またはDが空集合であった場合に(ステップS169,No)、関数Searchは、Dを返却して呼び出し元へ戻る。
After the above processing, when D is not an empty set, that is, when P is a failure (step S169, Yes), the
以上、説明したように、本実施形態の探索装置1は、ラベルが付与された頂点と、隣接する頂点間を接続するエッジとで構成されるグラフのうち、検索対象のデータのグラフであるデータグラフから、検索に使用されるクエリのグラフであるクエリグラフと同型な部分を探索する。その際に、パターン抽出部13bが、探索の過程において発生する探索の失敗に基づいて、クエリグラフの頂点とデータグラフの頂点との組み合わせの集合を、探索の失敗の要因を表す失敗パターンとして抽出する。また、探索部13cが、パターン抽出部13bにより抽出された失敗パターンと合致する探索の状態を枝刈りして、データグラフからクエリグラフと同型な部分を探索する。
As described above, the
これにより、データグラフの中からクエリグラフを含むものを探索するサブグラフマッチング処理を高速化することが可能となる。したがって、例えば、グラフデータ向けに設計されたデータベースであるグラフデータベースに対する、サブグラフマッチングとして記述されるクエリを用いた対話的な作業や、グラフデータベースに依存するサービスを容易に提供できる。また、グラフに対してサブグラフマッチングを用いて、例えば、特定のサブグラフの出現回数をグラフの特徴量として利用するデータマイニングを行う場合に、現実的な時間で完了できる。 As a result, it is possible to speed up the subgraph matching process for searching the data graph including the query graph. Therefore, for example, it is possible to easily provide an interactive work using a query described as subgraph matching for a graph database, which is a database designed for graph data, and a service that depends on the graph database. Further, when subgraph matching is used for a graph, for example, data mining using the number of appearances of a specific subgraph as a feature amount of the graph is performed, it can be completed in a realistic time.
なお、ラベルがエッジに付与された場合にも適用できる。すなわち、探索装置1は、頂点と、隣接する頂点間を接続するラベルが付与されたエッジとで構成されるグラフのうち、検索対象のデータのグラフであるデータグラフから、検索に使用されるクエリのグラフであるクエリグラフと同型な部分を探索してもよい。この場合に、パターン抽出部13bは、探索の過程において発生する探索の失敗に基づいて、クエリグラフの頂点とデータグラフの頂点との組み合わせの集合を、探索の失敗の要因を表す失敗パターンとして抽出する。これにより、探索処理を適用できる範囲が拡大する。
It can also be applied when a label is attached to an edge. That is, the
[他の実施形態]
上記実施形態において、探索装置1は、失敗パターンの集合の中から部分埋め込みに合致する失敗パターンを探索している(図12のステップS132)が、これに限定されない。図13は、他の実施形態の探索処理を説明するための説明図である。集合の中から特定の条件を満たす要素を探索する作業は、一つ一つの要素を確認する方法では要素の数に比例した処理時間を要し、処理時間が増大する。また、集合に追加される失敗パターンが膨大な数になり得るため、記憶装置に全ての情報を記録できないおそれがある。
[Other Embodiments]
In the above embodiment, the
そこで、図13に示すように、失敗パターンをハッシュテーブルによって保持してもよい。この場合に、探索装置1は、部分埋め込みPに最後に追加した割り当て(uk,P[uk])と、Pから抽出された失敗パターンとを対応付けて記憶部14に保持する。
Therefore, as shown in FIG. 13, the failure pattern may be held by the hash table. In this case, the
これにより、図12のステップS132の処理で確認される失敗パターンが一つになるため、処理時間が短縮される。また、ステップS170の処理において、ハッシュテーブルの値が上書きされ、古い値は保持されないため、記録される失敗パターンの数が減少する。存在し得るクエリ頂点とデータ頂点との組み合わせは、最大でも|VQ||VG|通りである。保持される失敗パターンの数はこれ以下の数となるため、抽出された失敗パターンの全てを保持した場合と比較して、圧倒的に少なくなる。したがって、限られた記憶装置を用いても探索処理を実行することが可能となる。 As a result, the failure patterns confirmed in the process of step S132 in FIG. 12 become one, so that the process time is shortened. Further, in the process of step S170, the value of the hash table is overwritten and the old value is not retained, so that the number of failed patterns recorded is reduced. The maximum number of combinations of query vertices and data vertices that can exist is | V Q | | V G |. Since the number of failed patterns to be retained is less than this, it is overwhelmingly smaller than the case where all of the extracted failure patterns are retained. Therefore, it is possible to execute the search process even if a limited storage device is used.
[プログラム]
上記実施形態に係る探索装置1が実行する処理をコンピュータが実行可能な言語で記述したプログラムを作成することもできる。一実施形態として、探索装置1は、パッケージソフトウェアやオンラインソフトウェアとして上記の探索処理を実行する探索プログラムを所望のコンピュータにインストールさせることによって実装できる。例えば、上記の探索プログラムを情報処理装置に実行させることにより、情報処理装置を探索装置1として機能させることができる。ここで言う情報処理装置には、デスクトップ型またはノート型のパーソナルコンピュータが含まれる。また、その他にも、情報処理装置にはスマートフォン、携帯電話機やPHS(Personal Handyphone System)などの移動体通信端末、さらには、PDA(Personal Digital Assistants)などのスレート端末などがその範疇に含まれる。また、ユーザが使用する端末装置をクライアントとし、当該クライアントに上記の探索処理に関するサービスを提供するサーバ装置として実装することもできる。例えば、探索装置1は、グラフデータを入力とし、サブグラフマッチング結果を出力する探索処理サービスを提供するサーバ装置として実装される。この場合、探索装置1は、Webサーバとして実装することとしてもよいし、アウトソーシングによって上記の探索処理に関するサービスを提供するクラウドとして実装することとしてもかまわない。以下に、探索装置1と同様の機能を実現する探索プログラムを実行するコンピュータの一例を説明する。
[program]
It is also possible to create a program in which the processing executed by the
図14は、探索プログラムを実行するコンピュータの一例を示す図である。コンピュータ1000は、例えば、メモリ1010と、CPU1020と、ハードディスクドライブインタフェース1030と、ディスクドライブインタフェース1040と、シリアルポートインタフェース1050と、ビデオアダプタ1060と、ネットワークインタフェース1070とを有する。これらの各部は、バス1080によって接続される。
FIG. 14 is a diagram showing an example of a computer that executes a search program. The
メモリ1010は、ROM(Read Only Memory)1011およびRAM1012を含む。ROM1011は、例えば、BIOS(Basic Input Output System)等のブートプログラムを記憶する。ハードディスクドライブインタフェース1030は、ハードディスクドライブ1031に接続される。ディスクドライブインタフェース1040は、ディスクドライブ1041に接続される。ディスクドライブ1041には、例えば、磁気ディスクや光ディスク等の着脱可能な記憶媒体が挿入される。シリアルポートインタフェース1050には、例えば、マウス1051およびキーボード1052が接続される。ビデオアダプタ1060には、例えば、ディスプレイ1061が接続される。
The
ここで、ハードディスクドライブ1031は、例えば、OS1091、アプリケーションプログラム1092、プログラムモジュール1093およびプログラムデータ1094を記憶する。上記実施形態で説明した各テーブルは、例えばハードディスクドライブ1031やメモリ1010に記憶される。
Here, the hard disk drive 1031 stores, for example, the
また、探索プログラムは、例えば、コンピュータ1000によって実行される指令が記述されたプログラムモジュール1093として、ハードディスクドライブ1031に記憶される。具体的には、上記実施形態で説明した探索装置1が実行する各処理が記述されたプログラムモジュール1093が、ハードディスクドライブ1031に記憶される。
Further, the search program is stored in the hard disk drive 1031 as, for example, a
また、探索プログラムによる情報処理に用いられるデータは、プログラムデータ1094として、例えば、ハードディスクドライブ1031に記憶される。そして、CPU1020が、ハードディスクドライブ1031に記憶されたプログラムモジュール1093やプログラムデータ1094を必要に応じてRAM1012に読み出して、上述した各手順を実行する。
Further, the data used for information processing by the search program is stored as
なお、探索プログラムに係るプログラムモジュール1093やプログラムデータ1094は、ハードディスクドライブ1031に記憶される場合に限られず、例えば、着脱可能な記憶媒体に記憶されて、ディスクドライブ1041等を介してCPU1020によって読み出されてもよい。あるいは、探索プログラムに係るプログラムモジュール1093やプログラムデータ1094は、LANやWAN(Wide Area Network)等のネットワークを介して接続された他のコンピュータに記憶され、ネットワークインタフェース1070を介してCPU1020によって読み出されてもよい。
The
以上、本発明者によってなされた発明を適用した実施形態について説明したが、本実施形態による本発明の開示の一部をなす記述および図面により本発明は限定されることはない。すなわち、本実施形態に基づいて当業者等によりなされる他の実施形態、実施例および運用技術等は全て本発明の範疇に含まれる。 Although the embodiment to which the invention made by the present inventor is applied has been described above, the present invention is not limited by the description and the drawings which form a part of the disclosure of the present invention according to the present embodiment. That is, all other embodiments, examples, operational techniques, and the like made by those skilled in the art based on the present embodiment are included in the scope of the present invention.
1 探索装置
11 入力部
12 出力部
13 制御部
13a 頂点抽出部
13b パターン抽出部
13c 探索部
14 記憶部
1
Claims (6)
前記パターン抽出部により抽出された前記失敗パターンと合致する探索の状態を枝刈りして、前記データグラフから前記クエリグラフと同型な部分を探索する探索部と、
を備えることを特徴とする探索装置。 Among the graphs composed of labeled vertices and edges connecting adjacent vertices, from the data graph which is the graph of the data to be searched to the query graph which is the graph of the query used for the search. When searching for the same type of part, a set of combinations of query graph vertices and data graph vertices is extracted as a failure pattern representing the cause of the search failure based on the search failure that occurs in the search process. Pattern extraction section and
A search unit that prunes the search state that matches the failure pattern extracted by the pattern extraction unit and searches the data graph for a portion having the same type as the query graph.
A search device characterized by comprising.
前記パターン抽出部は、抽出された前記候補頂点を用いて前記失敗パターンを抽出することを特徴とする請求項1に記載の探索装置。 Based on the combination of labels of each vertex of the data graph and adjacent vertices, among the vertices adjacent to the vertices of the data graph that can match the vertices of the query graph, the vertices adjacent to the vertices of the query graph A vertex extraction unit that extracts matching vertices of the data graph as candidate vertices corresponding to each vertex of the data graph is further provided.
The search device according to claim 1, wherein the pattern extraction unit extracts the failure pattern using the extracted candidate vertices.
前記パターン抽出部により抽出された前記失敗パターンと合致する探索の状態を枝刈りして、前記データグラフから前記クエリグラフと同型な部分を探索する探索部と、
を備えることを特徴とする探索装置。 Among the graphs composed of vertices and edges with labels connecting adjacent vertices, from the data graph which is the graph of the data to be searched to the query graph which is the graph of the query used for the search. When searching for the same type of part, a set of combinations of query graph vertices and data graph vertices is extracted as a failure pattern representing the cause of the search failure based on the search failure that occurs in the search process. Pattern extraction section and
A search unit that prunes the search state that matches the failure pattern extracted by the pattern extraction unit and searches the data graph for a portion having the same type as the query graph.
A search device characterized by comprising.
前記探索部は、該記憶部を参照して前記失敗パターンと合致する探索の状態を枝刈りして、前記データグラフから前記クエリグラフと同型な部分を探索することを特徴とする請求項1〜3のいずれか1項に記載の探索装置。 The pattern extraction unit records the failure pattern as a hash table in the storage unit, and records the failure pattern in the storage unit.
Claims 1 to 1, wherein the search unit prunes a search state that matches the failure pattern with reference to the storage unit, and searches the data graph for a portion having the same type as the query graph. The search device according to any one of 3.
ラベルが付与された頂点と、隣接する頂点間を接続するエッジとで構成されるグラフのうち、検索対象のデータのグラフであるデータグラフから、検索に使用されるクエリのグラフであるクエリグラフと同型な部分を探索する際に、該探索の過程において発生する探索の失敗に基づいて、クエリグラフの頂点とデータグラフの頂点との組み合わせの集合を、探索の失敗の要因を表す失敗パターンとして抽出するパターン抽出工程と、
前記パターン抽出工程において抽出された前記失敗パターンと合致する探索の状態を枝刈りして、前記データグラフから前記クエリグラフと同型な部分を探索する探索工程と、
を含むことを特徴とする探索方法。 A search method executed by a search device,
Among the graphs composed of labeled vertices and edges connecting adjacent vertices, from the data graph which is the graph of the data to be searched to the query graph which is the graph of the query used for the search. When searching for the same type of part, a set of combinations of query graph vertices and data graph vertices is extracted as a failure pattern representing the cause of the search failure based on the search failure that occurs in the search process. Pattern extraction process and
A search step of pruning a search state that matches the failure pattern extracted in the pattern extraction step and searching for a portion having the same type as the query graph from the data graph.
A search method characterized by including.
前記パターン抽出ステップにおいて抽出された前記失敗パターンと合致する探索の状態を枝刈りして、前記データグラフから前記クエリグラフと同型な部分を探索する探索ステップと、
をコンピュータに実行させることを特徴とする探索プログラム。 Among the graphs composed of labeled vertices and edges connecting adjacent vertices, from the data graph which is the graph of the data to be searched to the query graph which is the graph of the query used for the search. When searching for the same type of part, a set of combinations of query graph vertices and data graph vertices is extracted as a failure pattern representing the cause of the search failure based on the search failure that occurs in the search process. Pattern extraction steps to be performed and
A search step of pruning a search state that matches the failure pattern extracted in the pattern extraction step and searching for a portion having the same type as the query graph from the data graph.
A search program characterized by having a computer execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017230089A JP6777903B2 (en) | 2017-11-30 | 2017-11-30 | Search device, search method and search program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2017230089A JP6777903B2 (en) | 2017-11-30 | 2017-11-30 | Search device, search method and search program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2019101610A JP2019101610A (en) | 2019-06-24 |
JP6777903B2 true JP6777903B2 (en) | 2020-10-28 |
Family
ID=66973656
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017230089A Active JP6777903B2 (en) | 2017-11-30 | 2017-11-30 | Search device, search method and search program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6777903B2 (en) |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9529833B2 (en) * | 2014-02-19 | 2016-12-27 | Palo Alto Research Center Incorporated | Graph pruning in hipergraph |
-
2017
- 2017-11-30 JP JP2017230089A patent/JP6777903B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2019101610A (en) | 2019-06-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10860339B2 (en) | Autonomous creation of new microservices and modification of existing microservices | |
US10169347B2 (en) | Layer identification and dependency analysis for management of images | |
US9135289B2 (en) | Matching transactions in multi-level records | |
US8572607B2 (en) | System and method for performing designated service image processing functions in a service image warehouse | |
US20160364473A1 (en) | Source code search engine | |
US20140298321A1 (en) | Installation control method and installation control apparatus | |
CN107615240B (en) | Biological sequence based scheme for analyzing binary files | |
JP6689283B2 (en) | Method and apparatus for assigning device fingerprints to internet devices | |
KR101535813B1 (en) | System and method for dynamic updating of event composition rule for complex event processing | |
US20160098390A1 (en) | Command history analysis apparatus and command history analysis method | |
US11409631B2 (en) | Verification automation apparatus, verification automation method, and computer-readable recording medium | |
CN111026433A (en) | Method, system and medium for automatically repairing software code quality problem based on code change history | |
CN115470191A (en) | Database updating system, method and corresponding computer equipment and storage medium | |
CN110688305A (en) | Test environment synchronization method, device, medium and electronic equipment | |
CN112068812B (en) | Micro-service generation method and device, computer equipment and storage medium | |
CN110633084B (en) | Transcoding derivation method and device based on single sample | |
JP6777903B2 (en) | Search device, search method and search program | |
JP6623380B2 (en) | Search device, search method, and search program | |
CN111786808A (en) | Cloud system migration method and device and mixed cloud system | |
WO2018179065A1 (en) | Data analysis device and data analysis method | |
JP7246301B2 (en) | Program development support system and program development support method | |
Schlie et al. | Reengineering variants of matlab/simulink software systems | |
CN114564228A (en) | Application program updating method and device, computer equipment and storage medium | |
JP6705482B2 (en) | System construction parameter management device, system construction parameter management system, system construction parameter management method, and system construction parameter management program | |
US11947958B2 (en) | Method, device, and program product for managing object in software development project |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20171204 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20191118 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200907 |
|
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: 20200929 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20200930 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6777903 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |