Associated transaction detection method and system
By combining distributed graph segmentation and strongly connected component extraction with BFS and recursive JOIN algorithms, the problems of low efficiency and poor accuracy in detecting associated transactions are solved, achieving efficient and accurate detection of multi-type edge associated transactions.
Patent Information
- Application Number
- CN202510901883.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-21
AI Technical Summary
Existing technologies suffer from low efficiency and poor accuracy in detecting related transactions, and are difficult to handle complex related scenarios involving large scale and multiple types of edges.
By employing a distributed graph partitioning strategy and strong connected component extraction, and combining the EdgePartition2D partitioning strategy and the strongConnectedComponents algorithm with BFS and recursive JOIN algorithms, multi-dimensional data filtering and path memory caching are performed on transaction, equity, and legal entity edges to achieve efficient segmentation and closed-loop subgraph classification.
It improved the accuracy of related-party transaction detection to 99.2%, reduced computation time by more than 40%, increased resource utilization by 60%, and adapted to complex financial related-party scenarios.
Smart Images

Figure CN120823037A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and specifically relates to a method and system for detecting related-party transactions. Background Art
[0002] With the surge in data volume in scenarios such as financial transactions and equity relationships, closed-loop detection of relationships has become a core requirement for risk control. Existing loop detection methods based on graph computing face the following challenges:
[0003] Low data processing efficiency: Traditional graph computing frameworks (such as stand-alone graph algorithms) are unable to cope with data with hundreds of millions of edges, and suffer from problems such as insufficient memory and calculation timeouts. In addition, the preprocessing stage lacks a multi-dimensional data screening mechanism for financial-related transactions, resulting in invalid data interfering with detection accuracy.
[0004] Uneven subgraph partitioning: Existing distributed graph partitioning strategies (such as random partitioning) easily lead to subgraph scale skew, with large subgraphs occupying too many computing resources while small subgraphs lack parallelism, resulting in an overall load imbalance.
[0005] Poor scalability of ring detection: A single detection algorithm (such as DFS traversal) cannot adapt to subgraphs of different sizes. When detecting large subgraphs, the recursive depth is out of control, leading to stack overflow or computational overrun. Small subgraph detection lacks lightweight strategies and has low resource utilization.
[0006] Difficulty in fusing multiple types of edges: Existing methods usually only support closed-loop detection of a single type of edge (such as transaction edges or equity edges), and are unable to handle complex association scenarios where multiple types of edges such as transactions, equity, and legal persons are mixed.
[0007] Application Contents
[0008] The purpose of the embodiments of the present application is to provide a method and system for detecting related-party transactions, so as to address the defects of low efficiency and accuracy in related-party transaction detection in the prior art.
[0009] In order to solve the above technical problems, this application is implemented as follows:
[0010] In a first aspect, a method for detecting related-party transactions is provided, comprising the following steps:
[0011] Obtaining an original transaction edge table, an equity edge table, and a legal person edge table, and generating a vertex-edge relationship table based on the original transaction edge table, the equity edge table, and the legal person edge table;
[0012] Constructing the vertex-edge relationship table into a weighted attribute graph, and performing distributed cutting on the weighted attribute graph to obtain an edge set and a vertex set with optimized distribution;
[0013] Performing strong connected component detection on the weighted attribute graph based on the optimized distributed edge set and vertex set, and extracting a subgraph set containing closed-loop relationships;
[0014] By detecting each subgraph in the subgraph set, it is determined whether there is a related transaction.
[0015] In a second aspect, a related-party transaction detection system is provided, comprising the following steps:
[0016] A generation module is used to obtain an original transaction edge table, an equity edge table, and a legal person edge table, and generate a vertex-edge relationship table based on the original transaction edge table, the equity edge table, and the legal person edge table;
[0017] A construction module, configured to construct the vertex-edge relationship table into a weighted attribute graph, and perform distributed cutting on the weighted attribute graph to obtain an edge set and a vertex set with optimized distribution;
[0018] An extraction module, configured to perform strong connected component detection on the weighted attribute graph based on the edge set and vertex set of the optimized distribution, and extract a subgraph set containing a closed loop relationship;
[0019] The detection module is used to determine whether there is a related transaction by detecting each subgraph in the subgraph set.
[0020] The embodiments of the present application use a distributed graph segmentation strategy and strongly connected component extraction to achieve efficient cutting and closed-loop subgraph classification, thereby improving the detection accuracy of related transactions, reducing redundant calculations, and reducing overall computing time. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flow chart of a method for detecting related transactions provided in an embodiment of the present application;
[0022] Figure 2 This is a structural diagram of a related-party transaction detection system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0024] The embodiments of the present application provide a ring detection method and system based on distributed graph computing, whose core objectives include: building an efficient large-scale graph data preprocessing mechanism to reduce invalid data interference through dynamic data screening and multi-edge type fusion; designing a load-balanced distributed graph partitioning strategy to optimize the extraction efficiency of strongly connected components (SCCs) and improve the rationality of subgraph classification; proposing a divide-and-conquer ring detection engine to adapt a lightweight BFS algorithm and a recursive JOIN strategy to SCC subgraphs of different sizes to achieve the optimal match between computing resources and detection efficiency; supporting mixed closed-loop detection of multiple edge types such as transactions, equity, and legal persons, and improving the applicability of complex financial correlation scenarios.
[0025] To achieve the above objectives, the technical solutions of the embodiments of the present application include:
[0026] The data preprocessing module is used to extract transaction edges, equity edges, and legal person edges from the Hive data warehouse, and to count multi-dimensional distribution characteristics such as amount, out-degree, and in-degree. It also filters invalid edges based on preset thresholds (single-edge amount > 200,000 yuan, out-degree < 50), removes isolated nodes, generates a vertex-edge relationship table, and persists it in Parquet format.
[0027] The distributed graph partitioning module is used to build weighted attribute graphs using Spark GraphX. It uses the EdgePartition2D partitioning strategy to perform two-dimensional spatial partitioning of edge data to ensure balanced subgraph sizes. It calls the strongConnectedComponents algorithm to iteratively extract strongly connected components and classifies SCC subgraphs into small (<30 nodes) and large subgraphs based on the number of nodes. These subgraphs are stored in a memory table and a distributed file system, respectively.
[0028] A divide-and-conquer loop detection engine is used for small subgraph detection: for subgraphs with ≤10 nodes, a hierarchical BFS algorithm is used, limiting the maximum search depth to 4 layers, and avoiding repeated traversals through path memory caching; for subgraphs with >10 and <30 nodes, multi-threaded parallel BFS is used to accelerate detection; for large subgraph detection, a recursive JOIN model is constructed, the path table is initialized, and edge relationships are expanded layer by layer. A dynamic pruning strategy is used to remove invalid intermediate paths, and Spark SQL syntax is used to iteratively generate and verify closed-loop paths.
[0029] The result standardization module is used to cross-validate the detected closed-loop paths and generate structured results based on node sequence, edge type, and amount range; it classifies and stores binary, ternary, and quadruple rings in Hive tables and provides a standard SQL query interface.
[0030] Compared with the prior art, the embodiments of the present application have the following significant advantages:
[0031] Efficiency and scalability: Through the EdgePartition2D partitioning strategy and the strongly connected component classification mechanism, load-balanced processing of billions of edge data is achieved, reducing computing time by more than 40% and improving system resource utilization by 60%.
[0032] Divide-and-conquer detection optimization: BFS and recursive JOIN algorithms are adapted for subgraphs of different sizes. Small subgraph detection latency is less than 1 second, and large subgraph detection supports dynamic expansion to hundreds of billions of edges.
[0033] Improved accuracy: Based on multi-dimensional data screening and path memory caching technology, invalid path calculations are reduced by 75%, and the closed-loop detection accuracy reaches 99.2%;
[0034] Multi-edge support: Integrates heterogeneous data features of transactions, equity, and legal entities to identify complex closed-loop paths across multiple types, covering over 90% of financial-related scenarios.
[0035] Resource Conservation: By storing small subgraphs in memory tables and using dynamic pruning strategies, cluster memory usage is reduced by 35% and CPU utilization is increased by 28%.
[0036] The following describes in detail a method for detecting related transactions provided by an embodiment of the present application through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0037] like Figure 1 FIG. 1 is a flow chart of a method for detecting related-party transactions provided in an embodiment of the present application, the method comprising the following steps:
[0038] Step 101: Obtain an original transaction edge table, an equity edge table, and a legal person edge table, and generate a vertex-edge relationship table based on the original transaction edge table, the equity edge table, and the legal person edge table.
[0039] Specifically, multi-dimensional statistics can be performed on the original transaction edge table, the equity edge table, and the legal person edge table: the edge data is filtered, and isolated nodes with a number of occurrences of 1 in all nodes are removed; the filtered transaction edges, equity edges, and legal person edges are deduplicated and merged to generate a vertex-edge relationship table.
[0040] Step 102: construct the vertex-edge relationship table into a weighted attribute graph, and perform distributed cutting on the weighted attribute graph to obtain an edge set and a vertex set with optimized distribution.
[0041] Specifically, the Spark GraphX framework can be used to construct the vertex-edge relationship table into a weighted attribute graph, and a partitioning strategy based on vertex degree is used to divide the edge data into two-dimensional space, and the weighted attribute graph is distributedly cut to obtain an edge set and vertex set with optimized distribution.
[0042] Step 103: Perform strong connected component detection on the weighted attribute graph based on the edge set and vertex set with the optimized distribution, and extract a subgraph set containing a closed-loop relationship.
[0043] Specifically, the strongConnectedComponents algorithm of GraphX may be called to perform strong connected component detection on the weighted attribute graph, and a subgraph set containing closed-loop relationships may be extracted through four iterative calculations.
[0044] Step 104 : Determine whether there is any related transaction by detecting each subgraph in the subgraph set.
[0045] In this embodiment, before detecting each subgraph in the subgraph set to determine whether there is a related transaction, the subgraph in the subgraph set whose number of nodes is less than a preset value can be marked as a small subgraph, and the small subgraph can be stored in the memory table; the subgraph in the subgraph set whose number of nodes is greater than or equal to the preset value can be marked as a large subgraph, and the large subgraph can be persisted to the distributed file system.
[0046] Accordingly, the breadth-first search (BFS) algorithm can be used to traverse the paths of small subgraphs and output the detection results. An initial path table can be constructed for large subgraphs, and the edge relationships can be recursively expanded in node order. New path segments can be generated through self-connection at each iteration, and paths that have formed closed loops can be filtered. Invalid intermediate paths can be removed using a dynamic pruning strategy. The detection results of small and large subgraphs can be cross-validated, and the loop data can be converted into a structured format and stored in categories according to loop length.
[0047] The embodiments of the present application use a distributed graph segmentation strategy and strongly connected component extraction to achieve efficient cutting and closed-loop subgraph classification, thereby improving the detection accuracy of related transactions, reducing redundant calculations, and reducing overall computing time.
[0048] In the embodiment of the present application, the specific implementation process of detecting related-party transactions includes:
[0049] Step 1: Data Preprocessing
[0050] 1) Raw data collection
[0051] The original transaction edge table, equity edge table, and legal person edge table are obtained from the Hive data warehouse. The data time range is from March 2023 to February 2024, and the total number of edges exceeds 310 million.
[0052] 2) Data distribution analysis
[0053] Multi-dimensional statistics are performed on transaction edges, equity edges, and legal person edges: transaction edges are statistically distributed according to the seller amount range, buyer amount range, and bilateral amount combination range; equity edges are statistically analyzed according to the shareholding ratio range and out-degree distribution range for node connection characteristics; legal person edges are statistically analyzed for node association frequency.
[0054] 3) Data filtering and formatting
[0055] Edge data is filtered based on preset rules: valid transaction edges with a single-side amount greater than 200,000 yuan and an out-degree less than 50 are retained; isolated nodes with an appearance of 1 among all nodes are removed; the filtered transaction edges, equity edges, and legal person edges are deduplicated and merged to generate a vertex-edge relationship table. The final input graph data contains approximately 7.73 million vertices and 32.71 million edges.
[0056] Step 2: Distributed graph segmentation and strongly connected component extraction
[0057] 1) Property graph construction and partitioning
[0058] The Spark GraphX framework is used to construct the preprocessed edge table data into a weighted attribute graph, and the graph is distributedly cut using the EdgePartition2D partitioning strategy. This strategy partitions the edge data into two-dimensional space based on vertex degrees to achieve subgraph load balancing.
[0059] 2) Strongly Connected Component (SCC) Extraction
[0060] Call GraphX's strongConnectedComponents algorithm to detect strongly connected components of the entire graph. After four iterative calculations, a set of subgraphs containing closed-loop relationships is extracted.
[0061] 3) Subgraph classification storage
[0062] Dynamically classify SCC subgraphs based on their size characteristics: SCC subgraphs with fewer than 30 nodes are marked as "small subgraphs" and stored in a memory table to support low-latency access; SCC subgraphs with 30 or more nodes are marked as "large subgraphs" and persisted to a distributed file system (Parquet format).
[0063] Step 3: Divide and conquer ring detection
[0064] 1) Small subgraph ring detection
[0065] For small subgraphs with ≤10 nodes, a breadth-first search (BFS) algorithm is used for path traversal. For binary subgraphs, closed-loop results are directly output. For subgraphs with 3-10 nodes, the maximum search depth is limited to 4 layers through hierarchical control, and a path memory cache mechanism is used to avoid repeated calculations.
[0066] 2) Large subgraph ring detection
[0067] For large subgraphs with >10 nodes, recursive multi-table JOIN operations are implemented based on Spark SQL:
[0068] Construct the initial path table and recursively expand the edge relationship in node order;
[0069] In each iteration, new path segments are generated by self-connection, and paths that have formed closed loops are filtered out;
[0070] A dynamic pruning strategy is used to remove invalid intermediate paths and reduce computational complexity.
[0071] Step 4: Result standardization and output
[0072] 1) Result verification and merging
[0073] Cross-validate the detection results of small and large subgraphs to ensure loop integrity;
[0074] 2) Format standardization
[0075] Convert loop data into a structured format according to preset rules (node sequence, edge type, amount range);
[0076] 3) Classified storage
[0077] The final detection results are stored in Hive tables according to the loop length, including types such as binary rings, ternary rings, and quadruple rings, and support query by downstream systems through SQL interfaces.
[0078] The embodiment of the present application uses a distributed graph partitioning strategy (EdgePartition2D) and strongly connected component extraction to achieve efficient cutting and closed-loop subgraph classification of data at the billion-level edge scale; adopts a divide-and-conquer ring detection engine (BFS+recursive JOIN) to take into account the real-time performance of small subgraphs and the scalability of large subgraphs, and the detection accuracy is improved to 99.2%; through path memory caching and dynamic pruning technology, redundant calculations are reduced, and the overall calculation time is reduced by more than 40%; it supports mixed closed-loop detection of multiple types of edges (transactions, equity, legal persons), adapts to complex business scenarios, and combines distributed computing, graph partitioning optimization and divide-and-conquer strategies to solve the efficiency and accuracy problems of closed-loop path detection in large-scale associated data.
[0079] like Figure 2 FIG. 1 is a schematic diagram of a related-party transaction detection system provided in an embodiment of the present application, including:
[0080] The generation module 210 is used to obtain the original transaction edge table, the equity edge table and the legal person edge table, and generate a vertex-edge relationship table based on the original transaction edge table, the equity edge table and the legal person edge table.
[0081] Specifically, the generation module 210 is specifically used to perform multi-dimensional statistics on the original transaction edge table, the equity edge table and the legal person edge table: filter the edge data and remove isolated nodes that appear 1 times in all nodes; de-duplicate and merge the filtered transaction edges, equity edges and legal person edges to generate a vertex-edge relationship table.
[0082] The construction module 220 is used to construct the vertex-edge relationship table into a weighted attribute graph, and perform distributed cutting on the weighted attribute graph to obtain an edge set and a vertex set with optimized distribution.
[0083] Specifically, the construction module 220 is specifically used to use the Spark GraphX framework to construct the vertex-edge relationship table into a weighted attribute graph, perform a partitioning strategy based on the vertex degree to divide the edge data into two-dimensional space, and perform distributed cutting on the weighted attribute graph to obtain an edge set and vertex set with optimized distribution.
[0084] The extraction module 230 is configured to perform strong connected component detection on the weighted attribute graph based on the edge set and vertex set of the optimized distribution, and extract a subgraph set containing a closed-loop relationship.
[0085] Specifically, the extraction module 230 is specifically configured to call the strongConnectedComponents algorithm of GraphX to perform strong connected component detection on the weighted attribute graph, and extract a subgraph set containing closed-loop relationships through four iterative calculations.
[0086] The detection module 240 is configured to detect each subgraph in the subgraph set to determine whether there is any related transaction.
[0087] In this embodiment, the above system further includes:
[0088] A classification module is configured to mark a subgraph whose number of nodes in the subgraph set is less than a preset value as a small subgraph, and store the small subgraph in a memory table; mark a subgraph whose number of nodes in the subgraph set is greater than or equal to a preset value as a large subgraph, and persist the large subgraph in a distributed file system;
[0089] Accordingly, the above-mentioned detection module 240 is specifically used to use the breadth-first search BFS algorithm to traverse the path of the small subgraph and output the detection results; construct an initial path table for the large subgraph, recursively expand the edge relationship in node order, and generate new path segments through self-connection in each iteration, filter the paths that have formed closed loops, and use the dynamic pruning strategy to remove invalid intermediate paths; cross-validate the detection results of the small subgraph and the large subgraph, convert the loop data into a structured format, and store them in categories according to the loop length.
[0090] The embodiments of the present application use a distributed graph segmentation strategy and strongly connected component extraction to achieve efficient cutting and closed-loop subgraph classification, thereby improving the detection accuracy of related transactions, reducing redundant calculations, and reducing overall computing time.
[0091] The present application also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the various processes of the above-described related-party transaction detection method embodiment and achieves the same technical effects. To avoid repetition, the details are not described here. The computer-readable storage medium may be, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0092] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0093] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0094] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.
Claims
1. A method for detecting related-party transactions, characterized in that: The following steps are involved: Obtaining an original transaction edge table, an equity edge table, and a legal person edge table, and generating a vertex-edge relationship table based on the original transaction edge table, the equity edge table, and the legal person edge table; Constructing the vertex-edge relationship table into a weighted attribute graph, and performing distributed cutting on the weighted attribute graph to obtain an edge set and a vertex set with optimized distribution; Performing strong connected component detection on the weighted attribute graph based on the optimized distributed edge set and vertex set, and extracting a subgraph set containing closed-loop relationships; By detecting each subgraph in the subgraph set, it is determined whether there is a related transaction.
2. The method according to claim 1, characterized in that Generating a vertex-edge relationship table according to the original transaction edge table, the equity edge table, and the legal person edge table specifically includes: Perform multi-dimensional statistics on the original transaction side table, the equity side table, and the legal person side table: Filter the edge data and remove isolated nodes that appear 1 times in all nodes; The filtered transaction edges, equity edges and legal person edges are deduplicated and merged to generate a vertex-edge relationship table.
3. The method according to claim 1, characterized in that The step of constructing the vertex-edge relationship table into a weighted attribute graph and performing distributed cutting on the weighted attribute graph to obtain an edge set and a vertex set with optimized distribution specifically includes: The Spark GraphX framework is used to construct the vertex-edge relationship table into a weighted attribute graph. A partitioning strategy is used to divide the edge data into two-dimensional space based on vertex degrees. The weighted attribute graph is distributedly cut to obtain an edge set and a vertex set with optimized distribution.
4. The method according to claim 1, wherein The step of performing strong connected component detection on the weighted attribute graph based on the optimized distributed edge set and vertex set to extract a subgraph set containing a closed-loop relationship specifically includes: The strongConnectedComponents algorithm of GraphX is called to perform strong connected component detection on the weighted attribute graph, and a subgraph set containing closed-loop relationships is extracted through four iterative calculations.
5. The method according to claim 1, wherein Before detecting each subgraph in the subgraph set to determine whether there is a related transaction, the method further includes: Marking a subgraph in the subgraph set whose number of nodes is less than a preset value as a small subgraph, and storing the small subgraph in a memory table; Marking a subgraph in the subgraph set whose number of nodes is greater than or equal to a preset value as a large subgraph, and persisting the large subgraph to a distributed file system; The detecting of each subgraph in the subgraph set to determine whether there is a related transaction specifically includes: Use the breadth-first search (BFS) algorithm to traverse the small subgraph and output the detection results; Construct an initial path table for large subgraphs, recursively expand edge relationships in node order, and generate new path segments through self-connection at each iteration. Paths that have formed closed loops are filtered out, and invalid intermediate paths are removed using a dynamic pruning strategy. The detection results of small and large subgraphs are cross-validated, and the loop data is converted into a structured format and stored in categories according to loop length.
6. A related-party transaction detection system, characterized in that: include: A generation module is used to obtain an original transaction edge table, an equity edge table, and a legal person edge table, and generate a vertex-edge relationship table based on the original transaction edge table, the equity edge table, and the legal person edge table; A construction module, configured to construct the vertex-edge relationship table into a weighted attribute graph, and perform distributed cutting on the weighted attribute graph to obtain an edge set and a vertex set with optimized distribution; An extraction module, configured to perform strong connected component detection on the weighted attribute graph based on the edge set and vertex set of the optimized distribution, and extract a subgraph set containing a closed loop relationship; The detection module is used to determine whether there is a related transaction by detecting each subgraph in the subgraph set.
7. The system according to claim 6, characterized in that The generation module is specifically used to perform multi-dimensional statistics on the original transaction edge table, the equity edge table and the legal person edge table: filter the edge data and remove isolated nodes with a number of occurrences of 1 from all nodes; The filtered transaction edges, equity edges and legal person edges are deduplicated and merged to generate a vertex-edge relationship table.
8. The system according to claim 6, wherein: The construction module is specifically used to use the Spark GraphX framework to construct the vertex-edge relationship table into a weighted attribute graph, perform a partitioning strategy for two-dimensional space division of edge data based on vertex degree, perform distributed cutting on the weighted attribute graph, and obtain an edge set and vertex set with optimized distribution.
9. The system according to claim 6, wherein: The extraction module is specifically used to call the strongConnectedComponents algorithm of GraphX to perform strong connected component detection on the weighted attribute graph, and extract a subgraph set containing closed-loop relationships through four iterative calculations.
10. The system according to claim 6, wherein: Also includes: a classification module, configured to mark a subgraph in the subgraph set whose number of nodes is less than a preset value as a small subgraph, and store the small subgraph in a memory table; Marking a subgraph in the subgraph set whose number of nodes is greater than or equal to a preset value as a large subgraph, and persisting the large subgraph to a distributed file system; The detection module is specifically configured to use a breadth-first search (BFS) algorithm to perform path traversal on a small subgraph and output detection results; construct an initial path table for a large subgraph, recursively expand edge relationships in node order, generate new path segments through self-connection at each iteration, filter paths that have formed closed loops, and remove invalid intermediate paths using a dynamic pruning strategy; cross-validate the detection results of the small and large subgraphs, convert loop data into a structured format, and store them in a classified manner according to loop length.