A subgraph matching algorithm based on subgraph index for knowledge graph
Yunhao SUN1, Guanyu LI1(), Jingjing DU1, Bo NING1, Heng CHEN1,2
1. Faculty of Information Science and Technology, Dalian Maritime University, Liaoning 116026, China 2. Faculty of Software, Dalian University of Foreign Languages, Liaoning 116044, China
The problem of subgraph matching is one fundamental issue in graph search, which is NP-Complete problem. Recently, subgraph matching has become a popular research topic in the field of knowledge graph analysis, which has a wide range of applications including question answering and semantic search. In this paper, we study the problem of subgraph matching on knowledge graph. Specifically, given a query graph and a data graph , the problem of subgraph matching is to conduct all possible subgraph isomorphic mappings of on . Knowledge graph is formed as a directed labeled multi-graph having multiple edges between a pair of vertices and it has more dense semantic and structural features than general graph. To accelerate subgraph matching on knowledge graph, we propose a novel subgraph matching algorithm based on subgraph index for knowledge graph, called as -Match. The subgraph matching algorithm consists of two key designs. One design is a subgraph index of matching-driven flow graph ( ), which reduces redundant calculations in advance. Another design is a multi-label weight matrix, which evaluates a near-optimal matching tree for minimizing the intermediate candidates. With the aid of these two key designs, all subgraph isomorphic mappings are quickly conducted only by traversing . Extensive empirical studies on real and synthetic graphs demonstrate that our techniques outperform the state-of-the-art algorithms.
. [J]. Frontiers of Computer Science, 2022, 16(3): 163606.
Yunhao SUN, Guanyu LI, Jingjing DU, Bo NING, Heng CHEN. A subgraph matching algorithm based on subgraph index for knowledge graph. Front. Comput. Sci., 2022, 16(3): 163606.
a directed query multi-graph with , edge set and labeling function
( , , )
a directed data multi-graph with vertex set , edge set and labeling function
( , )
a matching tree of with node set and edge set
( , , , )
a matching-driven flow graph of on with a root , vertex set , edge set and labeling function
a query-data vertex pair with and
a subgraph isomorphic mapping of on ,
a partial subgraph isomorphic mapping
,
a set of subgraph isomorphic mappings s of on
a candidate set of ,
a candidate region of and adjacent to , ,
Tab.1
Fig.5
Semantic Dictionary
Data Dictionary of
University
GraduatedStudent
Student
Data Storage of Vertices
hasName
GraduatedFrom
, ,
Data Storage of Edges
( , )
Tab.2
Fig.6
Fig.7
Fig.8
Fig.9
Fig.10
Fig.11
Fig.12
Fig.13
Fig.14
Fig.15
Fig.16
Fig.17
Fig.18
Fig.19
Fig.20
Methods
Index Structures
Matching Order
TurboHOM
Adjacency List
Infrequent Node First
CFLMatch
Compact Path Index
Infrequent Path First
-Match
Subgraph Index
Cost-Balanced Matching Tree
Tab.3
Parameters
Dimensions
Query Size
Data Size
Density
Tab.4
Fig.21
Fig.22
Fig.23
Fig.24
Fig.25
Fig.26
1
S Hu , L Zou , J X Yu , H Wang , D Zhao . Answering natural language questions by subgraph matching over knowledge graphs. IEEE Transactions on Knowledge and Data Engineering, 2018, 30( 5): 824– 837
2
Xu Q, Wang X, Li J, Gan Y, Chai L, Wang J. StarMR: an efficient star-decomposition based query processor for SPARQL basic graph patterns using MapReduce. In: proceedings of Asia-Pacific Web (APWeb) and Web-Age Information Management (WAIM) Joint International Conference on Web and Big Data. 2018, 415-430
3
T Cai , J Li , A S Mian , T Sellis , J X Yu . Target-aware holistic influence maximization in spatial social networks. IEEE Transactions on Knowledge and Data Engineering, 2020,
4
Shekhar S, Xiong H, Zhou X. Encyclopedia of GIS: Resource Description Framework(RDF). 1st ed. Cham: Springer International Publishing, 2017
5
Garey M R, Johnson D S. Computers and Intractability: A Guide to the Theory of NP-Completeness. 1st ed. New York: W. H. Freeman, 1979
6
J Kim , H Shin , W H Han , S Hong , H Chafi . Taming subgraph isomorphism for RDF query processing. Proceedings of the VLDB Endowment, 2015, 8( 11): 1238– 1249
7
Ingalalli V, Ienco D, Poncelet P, Villata S. Querying RDF data using a multigraph-based approach. In: Proceedings of the 19th International Conference on Extending Database Technology. 2016, 245-256
8
H Ma , M A Langouri , Y Wu , F Chiang , J Pi . Ontology-based entity matching in attributed graphs. Proceedings of the VLDB Endowment, 2019, 12( 10): 1195– 1207
9
L P Cordella , P Foggia , C Sansone , M Vento . A (sub)graph isomorphism algorithm for matching large graphs. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2014, 26( 10): 1367– 1372
10
He H, Singh A K. Graphs-at-a-time: query language and accessmethods for graph databases. In: Proceedings of the ACM SIGMOD International Conference on Management of Data. 2008, 405-418
11
P Zhao , J Han . On graph query optimization in large networks. Proceedings of the VLDB Endowment, 2010, 3( 1): 340– 351
12
Han W, Lee J, Lee J H. Turboiso: towards ultrafast and robust subgraph isomorphism search in large graph databases. In: Proceedings of the ACM SIGMOD International Conference on Management of Data. 2013, 337–348
13
Bi F, Chang L, Lin X, Qin L, Zhang W. Efficient subgraph matching by postponing cartesian products. In: Proceedings of the ACM SIGMOD International Conference on Management of Data. 2016, 1199−1214
14
H Shang , Y Zhang , X Lin , J X Yu . Taming verification hardness: an efficient algorithm for testing subgraph isomorphism. Proceedings of the VLDB Endowment, 2008, 1( 1): 364– 375
15
Kim K, Seo I, Han W S, Hong S, Chafi H, Shin H, Jeong G. Turboflux: A fast continuous subgraph matching system for streaming graph data. In: Proceedings of the ACM SIGMOD International Conference on Management of Data. 2018, 411-426
16
J R Ullmann . An algorithm for subgraph isomorphism. Journal of the ACM, 1976, 23( 1): 31– 42
17
Jin X, Lai L. MPMatch: A Multi-core Parallel Subgraph Matching Algorithm. In: Proceedings of IEEE 35th International Conference on Data Engineering Workshops. 2019, 241−248
18
Bhattarai B, Liu H, Huang H. CECI: Compact Embedding Cluster Index for Scalable Subgraph Matching. In: Proceedings of the ACM SIGMOD International Conference on Management of Data. 2019, 1447−1462
19
P Peng , L Zou , Z Du , D Zhao . Using partial evaluation in holistic subgraph search. Frontiers of Computer Science, 2017, 12( 5): 966– 983
20
Y Ma , Y Yuan , M Liu , G Wang , Y Wang . Graph simulation on large scale temporal graphs. GeoInformatica, 2020, 24( 1): 199– 220
21
P Lin , Q Song , Y Wu . Fact checking in knowledge graphs with ontological subgraph patterns. Data Science and Engineering, 2018, 3 : 341– 358
22
Xu Y, Tong Y, Shi Y, Tao Q, Xu Ke, Li W. An Efficient Insertion Operator in Dynamic RideSharing Services. In: Proceedings of IEEE 35th International Conference on Data Engineering. 2019, 1022−1033
23
L Zou , M T Özsu , L Chen , X Shen , R Huang , D Zhao . gStore: a graph-based SPARQL query engine. The VLDB Journal, 2014, 23( 4): 565– 590
24
L Zeng , L Zou . Redesign of the gStore system. Frontiers of Computer science, 2018, 12( 4): 1– 19
25
X Wang , Le Chai , Q Xu , Y Yang , J Li , J Wang , Y Chai . Efficient subgraph matching on large RDF graphs using MapReduce. Data Science and Engineering, 2019, 4 : 24– 43
26
Q Xu , X Wang , J Li , Q Zhang , L Chai . Distributed subgraph matching on big knowledge graphs using pregel. IEEE Access, 2019, 7 : 116453– 116464
27
Malewicz G, Austern M H, Bik, A J C, Dehnert J C. Pregel: A system for large-scale graph processing. In: Proceedings of the ACM SIGMOD International Conference on Management of Data. 2010, 135−146
28
J Li , T Cai , K Deng , X Wang , T Sellis , F Xia . Community-diversified influence maximization in social networks. Information Systems, 2020, 92 : 101522–
29
Y Ma , Y Yuan , G Wang , X Bi , Z Wang , Y Wang . Rising star evaluation based on extreme learning machine in geo-social networks. Cognitive Computation, 2020, 12( 1): 296– 308
30
Wang Y, Tong Y, Long C, Xu P, Xu K, Lv W. Adaptive dynamic bipartite graph matching: a reinforcement learning approach. In: Proceedings of IEEE 35th International Conference on Data Engineering, 2019, 1478−1489
31
W Zheng , L Zou , W Peng , X Yan , S Song , D Zhao . Semantic SPARQL similarity search over RDF knowledge graphs. Proceedings of the VLDB Endowment, 2016, 9( 11): 840– 851