Abstract
In the context of searching a single data graph G, graph pattern matching is to find all the occurrences of a pattern graph Q in G, specified by a matching rule. It is of paramount importance in many real applications such as social network analysis and cyber security, among others. A wide spectrum of studies target general graph pattern matching. However, to analyze time-relevant services such as studying the spread of diseases and detecting attack patterns, it is attractive to study inexact temporal graph pattern matching. Hence, in this paper, we propose a relaxed matching rule called constrained temporal dual simulation, and study simulation-based constrained temporal graph pattern matching which guarantees that the matching result (i) preserves the ancestor and descendant temporal connectivities; and (ii) implements edge-to-temporal path mapping. We devise a decomposition-based matching method, which first decomposes the data graph into Source Temporal Connected Components, and then performs matching on decomposed subgraphs. To speed up the matching, we define child/parent dependency relation tables and propose an efficient double hierarchical traverse strategy. Considering that the temporal graphs are naturally dynamic, we further propose update algorithms. An extensive empirical study over real-world and synthetic temporal graphs has demonstrated the effectiveness and efficiency of our approach.
Similar content being viewed by others
Availability of data and materials
The datasets and materials are available in Github (https://github.com/ZJU-DAILY/CTGPM).
Notes
Highschool is available at http://www.sociopatterns.org/datasets/.
SNAP is available at https://snap.stanford.edu/data/.
JGraphT is available at http://jgrapht.org/.
Code of Timing is available at https://github.com/pkumod/timingsubg.
References
Mushlin, R.A., Kershenbaum, A., Gallagher, S.T., Rebbeck, T.R.: A graph-theoretical approach for pattern discovery in epidemiological research. IBM Syst. J. 46(1), 135–150 (2007)
Milajerdi, S.M., Eshete, B., Gjomemo, R., Venkatakrishnan, V.N.: POIROT: aligning attack behavior with kernel audit records for cyber threat hunting. In: CCS, pp. 1813–1830 (2019)
Li, Z., Chen, Q.A., Yang, R., Chen, Y., Ruan, W.: Threat detection and investigation with system-level provenance graphs: A survey. Comput. Secur. 106, 102282 (2021)
Cheng, Q., Shen, Y., Kong, D., Wu, C.: STEP: spatial-temporal network security event prediction. CoRR abs/2105.14932 (2021)
Mouden, Z.A.E., Taj, R.M., Jakimi, A., Hajar, M.: Towards using graph analytics for tracking covid-19. In: The 11th international conference on emerging ubiquitous systems and pervasive networks EUSPN, pp. 204–211 (2020)
Cavallaro, L., Bagdasar, O., Meo, P.D., Fiumara, G., Liotta, A.: Graph and network theory for the analysis of criminal networks. CoRR abs/2103.02504 (2021)
Ma, S., Cao, Y., Fan, W., Huai, J., Wo, T.: Capturing topology in graph pattern matching. PVLDB 5(4), 310–321 (2011)
Li, Y., Zou, L., Özsu, M.T., Zhao, D.: Time constrained continuous subgraph search over streaming graphs. In: ICDE, pp. 1082–1093 (2019)
Lai, L., Qing, Z., Yang, Z., Jin, X., Lai, Z., Wang, R., Hao, K., Lin, X., Qin, L., Zhang, W., et al.: Distributed subgraph matching on timely dataflow. Proceedings of the VLDB Endowment 12(10), 1099–1112 (2019)
Sun, S., Sun, X., Che, Y., Luo, Q., He, B.: Rapidmatch: A holistic approach to subgraph query processing. Proc. VLDB Endow. 14(2), 176–188 (2020)
Zeng, L., Zou, L., Özsu, M.T., Hu, L., Zhang, F.: GSI: gpu-friendly subgraph isomorphism. In: ICDE, pp. 1249–1260 (2020)
Zhu, K., Fletcher, G., Yakovets, N.: Leveraging temporal and topological selectivities in temporal-clique subgraph query processing. In: ICDE, pp. 672–683 (2021)
Yang, Z., Lai, L., Lin, X., Hao, K., Zhang, W.: Huge: An efficient and scalable subgraph enumeration system. In: Proceedings of the 2021 international conference on management of data, pp. 2049–2062 (2021)
Sun, S., Sun, X., He, B., Luo, Q.: Rapidflow: An efficient approach to continuous subgraph matching. Proc. VLDB Endow. 15(11), 2415–2427 (2022)
Locicero, G., Micale, G., Pulvirenti, A., Ferro, A.: Temporalri: A subgraph isomorphism algorithm for temporal networks. In: International conference on complex networks and their applications, pp. 675–687 (2020)
Shang, H., Zhang, Y., Lin, X., Yu, J.X.: Taming verification hardness: an efficient algorithm for testing subgraph isomorphism. Proc. VLDB Endow. 1(1), 364–375 (2008)
Redmond, U., Cunningham, P.: Subgraph isomorphism in temporal networks. CoRR abs/1605.02174 (2016)
Xu, Y., Huang, J., Liu, A., Li, Z., Yin, H., Zhao, L.: Time-constrained graph pattern matching in a large temporal graph. In: APWeb-WAIM, pp. 100–115 (2017)
Jin, X., Yang, Z., Lin, X., Yang, S., Qin, L., Peng, Y.: Fast: Fpga-based subgraph matching on massive graphs. In: ICDE, pp. 1452–1463 (2021). IEEE
Holme, P., Saramäki, J.: Temporal networks. Phys. Rep. 519(3), 97–125 (2012)
Wang, Y., Yuan, Y., Ma, Y., Wang, G.: Time-dependent graphs: Definitions, applications, and algorithms. Data Science and Engineering 4(4), 352–366 (2019)
Wang, X., Zhang, Q., Guo, D., Zhao, X.: A survey of continuous subgraph matching for dynamic graphs. Knowl. Inf. Syst. 65(3), 945–989 (2023)
Li, F., Zou, Z., Li, J., Yang, X., Wang, B.: Evolving subgraph matching on temporal graphs. Knowl. Based Syst. 258, 109961 (2022)
Li, F., Zou, Z., Li, J.: Durable subgraph matching on temporal graphs. IEEE Trans. Knowl. Data Eng. 35(5), 4713–4726 (2023)
Cao, Y., Fan, W., Huai, J., Huang, R.: Making pattern queries bounded in big graphs. In: ICDE, pp. 161–172 (2015)
Fan, W., Li, J., Ma, S., Tang, N., Wu, Y., Wu, Y.: Graph pattern matching: From intractable to polynomial time. PVLDB 3(1), 264–275 (2010)
Fan, W., Li, J., Ma, S., Tang, N., Wu, Y.: Adding regular expressions to graph reachability and pattern queries. In: ICDE, pp. 39–50 (2011)
Liu, G., Zheng, K., Wang, Y., Orgun, M.A., Liu, A., Zhao, L., Zhou, X.: Multi-constrained graph pattern matching in large-scale contextual social graphs. In: ICDE, pp. 351–362 (2015)
Henzinger, M.R., Henzinger, T.A., Kopke, P.W.: Computing simulations on finite and infinite graphs. In: Annual Symposium on Foundations of Computer Science, FOCS, pp. 453–462 (1995)
Ma, S., Cao, Y., Fan, W., Huai, J., Wo, T.: Strong simulation: Capturing topology in graph pattern matching. ACM Trans. Database Syst. 39(1), 4–1446 (2014)
Fan, W., Li, J., Luo, J., Tan, Z., Wang, X., Wu, Y.: Incremental graph pattern matching. In: SIGMOD, pp. 925–936 (2011)
Ma, S., Cao, Y., Huai, J., Wo, T.: Distributed graph pattern matching. In: WWW, pp. 949–958 (2012)
Liu, G., Liu, Y., Zheng, K., Liu, A., Li, Z., Wang, Y., Zhou, X.: MCS-GPM: multi-constrained simulation based graph pattern matching in contextual social graphs. IEEE Trans. Knowl. Data Eng. 30(6), 1050–1064 (2018)
Mahfoud, H.: Graph pattern matching with counting quantifiers and label-repetition constraints. Clust. Comput. 23(3), 1529–1553 (2020)
Mahfoud, H.: Towards a strong containment for efficient matching of expressive graph patterns. In: Proceedings of the 14th international conference on management of digital ecosystems, pp. 48–55 (2022)
Mahfoud, H.: Expressive top-k matching for conditional graph patterns. Neural Comput. Appl. 34(17), 14205–14221 (2022)
Song, C., Ge, T., Chen, C.X., Wang, J.: Event pattern matching over graph streams. PVLDB 8(4), 413–424 (2014)
Ma, Y., Yuan, Y., Liu, M., Wang, G., Wang, Y.: Graph simulation on large scale temporal graphs. GeoInformatica 24(1), 199–220 (2020)
Gao, Y., Zhang, T., Qiu, L., Linghu, Q., Chen, G.: Time-respecting flow graph pattern matching on temporal graphs. IEEE Trans. Knowl. Data Eng. 33(10), 3453–3467 (2021)
Zou, L., Chen, L., Özsu, M.T., Zhao, D.: Answering pattern match queries in large graph databases via graph embedding. VLDB J. 21(1), 97–120 (2012)
Zhang, H., Bai, Q., Lian, Y., Wen, Y.: A twig-based algorithm for top-k subgraph matching in large-scale graph data. Big Data Res. 30, 100350 (2022)
Sun, G., Liu, G., Wang, Y., Orgun, M.A., Sheng, Q.Z., Zhou, X.: Incremental graph pattern based node matching with multiple updates. IEEE Trans. Knowl. Data Eng. 33(4), 1585–1600 (2021)
Liu, Y., Ge, Q., Pang, Y., Zou, L.: Hop-constrained subgraph query and summarization on large graphs. In: DASFAA, pp. 123–139 (2021)
Wang, H., Zhang, Y., Qin, L., Wang, W., Zhang, W., Lin, X.: Reinforcement learning based query vertex ordering model for subgraph matching. In: ICDE, pp. 245–258 (2022)
Gudmundsson, J., Narasimhan, G., Smid, M.H.M.: Geometric spanners. In: Encyclopedia of Algorithms, pp. 846–852 (2016)
Zhang, T., Gao, Y., Qiu, L., Chen, L., Linghu, Q., Pu, S.: Distributed time-respecting flow graph pattern matching on temporal graphs. World Wide Web 23(1), 609–630 (2020)
Fan, W., Wang, X., Wu, Y., Deng, D.: Distributed graph simulation: Impossibility and possibility. Proceedings of the VLDB Endowment 7(12), 1083–1094 (2014)
Zhang, T., Gao, Y., Qiu, L., Chen, L., Linghu, Q., Pu, S.: Distributed time-respecting flow graph pattern matching on temporal graphs. World Wide Web 23, 609–630 (2020)
Gehani, A., Tariq, D.: Spade: Support for provenance auditing in distributed environments. In: 13th International middleware conference, pp. 101–120 (2012)
Acknowledgements
This work was supported by the National Natural Science Foundation of China under Grant No. 62302451, the Natural Science Foundation of Zhejiang Province of China under Grant No. LQ22F020018, the Key Research Project of Zhejiang Province of China under Grant No. 2023C01048, and the National Natural Science Foundation of China under Grant numbers 62276233, 62025206.
Funding
This work was supported by the National Natural Science Foundation of China under Grant No. 62302451, the Natural Science Foundation of Zhejiang Province of China under Grant No. LQ22F020018, the Key Research Project of Zhejiang Province of China under Grant No. 2023C01048, and the National Natural Science Foundation of China under Grant numbers 62276233, 62025206.
Author information
Authors and Affiliations
Corresponding authors
Ethics declarations
Conflicts of interest
The authors declare no conflicts of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Zhang, T., Cai, X., Chen, L. et al. Towards efficient simulation-based constrained temporal graph pattern matching. World Wide Web 27, 22 (2024). https://doi.org/10.1007/s11280-024-01259-2
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11280-024-01259-2