Computer Science ›› 2026, Vol. 53 ›› Issue (5): 137-148.doi: 10.11896/jsjkx.250400006

• Database & Big Data & Data Science • Previous Articles     Next Articles

Efficient Algorithm for Counting the Shortest Cycle on Temporal Graphs

LI Tianqi, DU Ming, ZHOU Junfeng   

  1. School of Computer Science and Technology, Donghua University, Shanghai 201600, China
  • Received:2025-04-01 Revised:2025-06-28 Published:2026-05-08
  • About author:LI Tianqi,born in 2001,postgraduate.Her main research interests include efficient data storage and high-perfor-mance data query on large graphs.
    DU Ming,born in 1975,Ph.D,professor.His main research interests include natural language processing and information analysis.
  • Supported by:
    National Natural Science Foundation of China(62372101,61873337,62272097).

Abstract: Shortest cycle counting serves as a fundamental approach for analyzing graph data,with critical applications in key node identification,periodic structure analysis,and anomaly detection.However,in temporal graph analysis,existing methods face significant challenges in efficiently supporting shortest cycle counting across varying time windows due to the temporal nature of edges and query window requirements.For this issue,an index-based solution is proposed to enhance counting efficiency firstly,which is followed by an optimized index construction strategy that reduces index size while improving construction efficiency,so as to ensure both compact index storage and efficient query processing without compromising performance.Finally,experimental results on real-world temporal graphs demonstrate that the proposed method can efficiently construct the index and rapidly retrieve the count and length of shortest cycles passing through the given query vertice within arbitrary time windows.

Key words: Temporal graph, Shortest cycle counting, Index structure, Time duration query optimization, Index construction optimization

CLC Number: 

  • TP301
[1]ZHANG Y,YU J X.Hub labeling for shortest path counting[C]//Proceedings of the 2020 ACM SIGMOD International Confe-rence on Management of Data.2020:1813-1828.
[2]WANG Y,YUAN L,CHEN Z,et al.Towards efficient shortest path counting on billion-scale graphs[C]//2023 IEEE 39th International Conference on Data Engineering(ICDE).IEEE,2023:2579-2592.
[3]PENG Y,YU J X,WANG S.PSPC:efficient parallel shortest path counting on large-scale graphs[C]//2023 IEEE 39th International Conference on Data Engineering(ICDE).IEEE,2023:896-908.
[4]QIU X,CEN W,QIAN Z,et al.Real-time constrained cycle detection in large dynamic graphs[C]//Proceedings of the VLDB Endowment.2018:1876-1888.
[5]LI C,KYNG R,LIU Y P,et al.Almost-Linear Time Algorithms for Incremental Graphs:Cycle Detection,SCCs,s-t Shortest Path,and Minimum-Cost Flow[C]//Proceedings of the 56th Annual ACM Symposium on Theory of Computing.2024:1165-1173.
[6]JIN X X,ZHANG Y,LI L,et al.Robust PCA-Based Abnormal Traffic Flow Pattern Isolation and Loop Detector Fault Detection[J].Tsinghua Science and Technology,2008,13(6):829-835.
[7]HOLME P,SARAMAKI J.Temporal Networks[J].PhysicsReports,2012,519(3):97-125.
[8]JIANG Z H.Frequent Evolution Pattern Mining in Temporal Networks[J].Modern Computer(Professional Edition),2019,638(2):17-21.
[9]YANG Y,YAN D,WU H,et al.Diversified Temporal Subgraph Pattern Mining[C]//Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.2016:1965-1974.
[10]MA S,HU R,WANG L,et al.Fast Computation of Dense Temporal Subgraphs[C]//2017 IEEE 33rd International Conference on Data Engineering(ICDE).IEEE,2017:361-372.
[11]AKHTAR N,AHAMAD M V.Graph Tools for Social Network Analysis[M]//Research Anthology on Digital Transformation,Organizational Change,and the Impact of Remote Work.IGI Global,2021:485-500.
[12]SCHWEIMER C.Fast generation of simple directed social network graphs with reciprocal edges and high clustering[J].Social Network Analysis and Mining,2022,12(1):1-5.
[13]HAJDU L,KRÉSZ M.Temporal Network Analytics for Fraud Detection in the Banking Sector[C]//ADBIS,TPDL and EDA 2020 Common Workshops and Doctoral Consortium.2020:145-157.
[14]LYU X,ZHENG S,LI Z,et al.Application of graph databases in the communication and information asset management in power grid[C]//2016 International Conference on Automotive Engineering,Mechanical and Electrical Engineering(AEMEE 2016).2017:1-2.
[15]FENG Q,PENG Y,ZHANG W,et al.Towards real-time coun-ting shortest cycles on dynamic graphs:A hub labelingapproach[C]//2022 IEEE 38th International Conference on Data Engineering(ICDE).IEEE,2022:512-524.
[16]YANG Y,ZHOU J F,DU M.Shortest Cycle Counting Index Based on Strongly Connected Components[J].Computer Science,2025,52(4):169-176.
[17]FENG Q,PENG Y,ZHANG W,et al.DSPC:Efficiently An-swering Shortest Path Counting on Dynamic Graphs[J].arXiv:2307.05918,2023.
[18]KUMAR R,CALDERS T.Finding simple temporal cycles in an interaction network[EB/OL].https://ceur-ws.org/Vol-1929/paper2.pdf.
[19]KUMAR R,CALDERS T.2SCENT:An efficient algorithm for enumerating all simple temporal cycles[J].Proceedings of the VLDB Endowment,2018,11(11):1441-1453.
[20]PAN M J,LI R H,ZHAO Y H,et al.Fast Cycle Enumeration Algorithm for Temporal Graph Data[J].Journal of Software,2020,31(12):3823-3835.
[21]XIN C,SHI J M,YOU P,et al.Minimum Strongly Connected Subgraph Collection in Dynamic Graphs[J].Proceedings of the VLDB Endowment,2024,17(6):1324-1336.
[22]TARJAN R.Depth-first search and linear graph algorithms[C]//12th Annual Symposium on Switching and Automata Theory.1971:114-121.
[1] LIU Hongjian, ZOU Danping, LI Ping. Pedestrian Trajectory Prediction Method Based on Graph Attention Interaction [J]. Computer Science, 2026, 53(1): 97-103.
[2] BIAN Hui, MENG Changqian, LI Zihan, CHEN Zihaoand XIE Xuelei. Continuous Sign Language Recognition Based on Graph Convolutional Network and CTC/Attention [J]. Computer Science, 2025, 52(6A): 240400098-9.
[3] YANG Ying, ZHOU Junfeng, DU Ming. Index for Counting the Shortest Cycle Based on Strongly Connected Components [J]. Computer Science, 2025, 52(4): 169-176.
[4] HONG Mingjun, JI Qingge. SPP-STGCN:Spatio-Temporal Graph Convolutional Network for Pedestrian Trajectory Predictionwith Scene-Perdestrian-Perdestrain Interactions [J]. Computer Science, 2025, 52(12): 133-140.
[5] YUAN Jing, XIA Ying. Vehicle Trajectory Prediction Based on Spatial-Temporal Graph Attention Convolutional Network [J]. Computer Science, 2024, 51(12): 157-165.
[6] WANG Jiahao, LI Wenbin, GUO Shiyao, XIANG Ping. Urban Traffic Flow Prediction Based on Global Spatiotemporal Graph Convolutional NeuralNetwork [J]. Computer Science, 2024, 51(11A): 240200045-9.
[7] MENG Xiangfu, LI Tianshuo, ZHANG Xiaoyan. Hybrid Index Structure for Trajectory Range Query Combined with Spatio-Temporal Keywords [J]. Computer Science, 2024, 51(11A): 240200114-8.
[8] SHAO Yan-hua, LI Wen-feng, ZHANG Xiao-qiang, CHU Hong-yu, RAO Yun-bo, CHEN Lu. Aerial Violence Recognition Based on Spatial-Temporal Graph Convolutional Networks and Attention Model [J]. Computer Science, 2022, 49(6): 254-261.
[9] ZHANG Bin, LIU Chang-hong, ZENG Sheng, JIE An-quan. Speech-driven Personal Style Gesture Generation Method Based on Spatio-Temporal GraphConvolutional Networks [J]. Computer Science, 2022, 49(11A): 210900094-5.
[10] FANG Yang, ZHAO Ting, LIU Qi-lie, HE Dong, SUN Kai-wei, CHEN Qian-bin. Trajectory Prediction Method Based on Fusion of Graph Interaction and Scene Perception [J]. Computer Science, 2022, 49(10): 258-264.
[11] YE Song-tao, ZHOU Yang-zheng, FAN Hong-jie, CHEN Zheng-lei. Joint Learning of Causality and Spatio-Temporal Graph Convolutional Network for Skeleton- based Action Recognition [J]. Computer Science, 2021, 48(11A): 130-135.
[12] MU Cong-cong, WANG Yi-shu, YUAN Ye, QIAO Bai-you, MA Yu-liang. Top-k Densest Subgraphs Search in Temporal Graphs [J]. Computer Science, 2021, 48(10): 152-159.
[13] CHEN Yuan-yuan, YAN Li, ZHANG Zhe-qing, MA Zong-min. Temporal RDF Model and Index Method Based on Neighborhood Structure [J]. Computer Science, 2021, 48(10): 167-176.
[14] WANG Qian-ge, HE Pu, NIE Tie-zheng, SHEN De-rong, YU Ge. Survey of Data Storage and Query Techniques in Blockchain Systems [J]. Computer Science, 2018, 45(12): 12-18.
[15] ZHAO Er-ping, DANG Hong-en and LIU Wei. Research on Detail Level Index Technology of Massive 3D Point Cloud Data in Virtual Tourism [J]. Computer Science, 2017, 44(10): 171-176.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!