A method and system for updating reachability index of graph data structure satisfying time and step constraints

By optimizing the graph data index update method through pruning-based local incremental maintenance and parallel processing, the problem of efficient dynamic maintenance in temporal bipartite graphs is solved, achieving high-performance index updates and queries.

CN122262385APending Publication Date: 2026-06-23DONGHUA UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONGHUA UNIV
Filing Date
2026-04-15
Publication Date
2026-06-23

Smart Images

  • Figure CN122262385A_ABST
    Figure CN122262385A_ABST
Patent Text Reader

Abstract

The application provides a reachability index updating method and system of a graph data structure satisfying time and step constraints, acquires a time two-part graph data, converts it into a time graph, and constructs an index based on a 2-hop label; a local incremental updating optimization strategy based on node degree sorting is used to update the index; and a parallel strategy is used to optimize the index updating. The local incremental updating strategy based on node degree sorting of the application combines a multi-level pruning mechanism, so that the updating process only performs a repair operation on the affected local area, avoiding repeated construction of a global index. Compared with a traditional full reconstruction method, the method can significantly reduce unnecessary propagation and checking operations, so that the index maintenance overhead is reduced by more than 50%. After identifying the independent affected area, a parallel strategy is used to synchronously update the local index, load decomposition of the updating task is realized, the overall updating throughput is greatly improved, and the real-time index maintenance requirement in a high dynamic rate scene can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of graph data mining technology, and in particular to a method and system for updating the reachability index of graph structure data that satisfies time and step size constraints. Background Technology

[0002] With the rapid development of information technology, graph-structured data has been widely used in various fields, including disease transmission modeling, metabolic pathway analysis, information diffusion tracking, and financial transaction research. Determining the reachability from one node to another is central to many critical tasks. Meanwhile, real-world interactions constantly evolve over time, necessitating that reachability indexes possess efficient dynamic update capabilities. Currently, graph data reachability technologies are relatively mature and can be mainly categorized into the following three types:

[0003] Full-scale reconstruction-based index update methods directly rebuild the entire index when the graph structure changes (e.g., adding or deleting edges), essentially discarding the existing index and generating a complete reachability index from the original graph. Its advantages include simplicity, consistent index structure, and no cumulative errors from partial updates. However, this method does not differentiate between update scopes; even if only a few nodes or edges change, the entire index system needs to be rebuilt. In large-scale dynamic graph scenarios, full-scale reconstruction results in huge update overhead, making it difficult to meet the requirements of real-time performance and high update frequency.

[0004] Local incremental maintenance-based index update methods analyze the impact of update operations on the graph structure, patching only the affected nodes or local regions without rebuilding the entire index. When adding edges or nodes, the reachability labels or related data structures of relevant nodes are updated by propagating changes in the affected region; when deletion occurs, the corresponding parts are modified by checking necessary dependencies. Local incremental updates are significantly more efficient than full reconstruction in dynamic environments, especially suitable for scenarios with high-frequency, small-scale structural changes. However, its limitations include the need for accurate identification of affected regions, complex algorithm design, and potentially high maintenance costs if update dependencies are deep or chain effects are too long.

[0005] On-demand update methods based on delayed repair do not immediately maintain indexes when the graph structure is updated. Instead, they record the changes in an invalidation flag. When a query touches an index node, if the index of that node is detected to be invalid, the node and its associated regions are repaired immediately before the query is executed. This "query-driven" update mechanism only repairs the actually accessed parts, thus avoiding the maintenance of unnecessary index regions, making it suitable for business scenarios where updates far outnumber queries. However, this method increases query latency, leading to unstable response performance; its effectiveness is limited in applications requiring strictly low-latency queries.

[0006] However, most existing index update methods do not adequately consider time constraints, making it difficult to meet the dynamic maintenance requirements in time-sensitive scenarios. For example, in temporal bipartite graphs, when new interaction events (such as user actions on content, investor trading behavior, or data transfer between devices) occur at a specific timestamp, existing indexes often require extensive reconstruction to maintain the correctness of reachability judgments, resulting in high update costs. Furthermore, in real-time risk monitoring, it is necessary to quickly determine whether the insertion of a new time edge will form a suspicious time-ordered path. Traditional indexes, lacking temporal semantics, cannot exclude candidate paths that do not meet time constraints during the update phase, easily leading to redundant maintenance. Therefore, proposing a reachability index update method that can simultaneously satisfy time constraints and dynamic update requirements is of great significance. Summary of the Invention

[0007] This invention provides a method and system for updating the reachability index of graph data structures that satisfies time and step size constraints, in order to achieve dynamic maintenance of the reachability index for temporal bipartite graph structure data.

[0008] A method for updating the reachability index of a graph data structure that satisfies time and step size constraints includes the following steps:

[0009] S1: Obtain temporal bipartite graph data, convert it into a temporal graph, and build an index based on 2-hop labels;

[0010] S2: Use a local incremental update optimization strategy based on node degree sorting to update the index;

[0011] S3: Utilize parallel strategies to optimize index updates.

[0012] Preferably, the specific process of step S1 of the present invention is as follows: The graph is represented as a directed graph sequence G = (G0, ..., G...). |G-1| The nodes and time-related data of the temporal graph are extracted and sorted according to the temporal order of the edges. Each node is given an independent identifier, and the in-degree, out-degree, and frequency of occurrence at all times are calculated. Based on the two-hop labeling technique, a reachability index of the temporal graph is constructed. For each node v, in the snapshot graph at each time step, a breadth-first traversal is used in conjunction with optimization strategies to construct... and Set; in which, Record all intermediate nodes m that can reach v, and the path information from m to v; Record all intermediate nodes m that can be reached from v, and the path information from v to m; the path information includes the corresponding time and step size.

[0013] Preferably, the specific process of step S2 of the present invention is as follows: obtain the set of nodes that need to be updated, sort the degree of all nodes before the graph update, sort the degree of all nodes after the graph update, and sort the degree of all nodes by vertex. New label items are introduced directly by adding new edges; in this case, Starting from the first vertex, perform a breadth-first traversal along the time intervals, with the initial value increasing and the ending value decreasing, respectively, constructing new labels and adding them to the visited vertices. and The addition of an edge changes the priority order of vertices, causing existing labels to become redundant; suppose there exists a vertex... It meets the requirements before the update. However, the order changed after the update. If originally or There is a pointer in The tag item, then in After execution, by The newly generated tags will be written or At this time, the old one was... Write The label item becomes redundant and should be deleted; the new label item introduced by the added edge, and the associated vertex The order always satisfies the condition before and after the update. For this type of label, it should be from Starting from the beginning, continue the traversal in the direction of increasing (or decreasing) time, and then... The generated labels are appended to the corresponding vertices. or .

[0014] Preferably, the specific process of step S3 of the present invention is as follows: the processing of adding tags and deleting redundant tags for nodes is regarded as an independent process, which is suitable for being split into multiple parallel tasks; in the process of deleting redundant tags, since the redundant tag cleaning task of each node can be completed independently without depending on the state of other nodes, the task of this stage is assigned to multiple threads for parallel execution.

[0015] A system for implementing the reachability index update method of the present invention includes the following modules:

[0016] Temporal graph data preprocessing module: responsible for converting the raw temporal graph data into a format suitable for index construction, including nodes, edges, and each edge containing the start node, end node, and time information on the edge;

[0017] Index building module: Based on pruning Hop tagging technology and index optimization technology, it builds an reachability index that meets time and step size constraints;

[0018] Index Update Module: When a new edge is added to the graph structure, a pruning-style local incremental maintenance strategy is used to update the index of the affected node region. At the same time, local incremental updates based on node degree sorting pre-filter nodes that do not meet the update conditions, thereby efficiently generating the updated reachability index and ensuring the correctness of the index and query performance in dynamic environments.

[0019] The technical solution of this invention has the following advantages compared with the prior art:

[0020] 1. Hop tag indexing method with pruning incremental maintenance: Based on the traditional 2-hop index, a local pruning strategy oriented towards temporal graph is introduced. The index is only updated for node regions affected by new time edges or attribute changes, which effectively reduces redundant path storage and reduces the index size.

[0021] 2. Local incremental update optimization technique combined with node degree sorting: By filtering out nodes that do not meet the update conditions in advance during the update process, the update efficiency can be significantly improved;

[0022] 3. Parallelized local incremental update mechanism: By processing the structurally independent affected regions in parallel, the overall time of index update is significantly reduced, avoiding the performance bottleneck caused by serial updates; and by using dynamic task partitioning and load balancing strategies, the resource utilization in a multi-core environment is improved, so that the index can still maintain stable response performance in high-frequency dynamic update scenarios. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the method flow of the present invention;

[0024] Figure 2 This is a schematic diagram of the initial temporal bipartite diagram structure provided in an embodiment of the present invention;

[0025] Figure 3 This is a schematic diagram of the transformed temporal graph structure provided in an embodiment of the present invention;

[0026] Figure 4 A schematic diagram of the reachability index structure provided in an embodiment of the present invention;

[0027] Figure 5 This is a schematic diagram of the temporal bipartite graph after inserting the newly added time edge, provided in an embodiment of the present invention.

[0028] Figure 6 This is a schematic diagram of the updated temporal graph structure provided in an embodiment of the present invention;

[0029] Figure 7 This is a schematic diagram of a local incremental index update process provided in an embodiment of the present invention;

[0030] Figure 8 This is a schematic diagram of the updated reachability index structure provided in an embodiment of the present invention. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the present invention clearer, the following description, in conjunction with the accompanying drawings and specific embodiments, further illustrates the content of the present invention.

[0032] A method for updating the reachability index of a graph data structure that satisfies time and step size constraints, comprising:

[0033] 1) A pruning-style local incremental maintenance strategy is adopted to update the index of local regions of nodes affected by time edge insertion or attribute changes, thereby avoiding the repeated construction of the global index.

[0034] 2) Combining the temporal attributes and structural features of the temporal graph, a local incremental update optimization strategy based on node degree sorting is introduced. Different update processes are formulated according to the degree differences of affected nodes, and different incremental maintenance methods are adopted for high-degree and low-degree nodes to further reduce redundant updates.

[0035] 3) A parallelized local incremental update mechanism is adopted. After identifying the affected local areas, the independent areas are updated synchronously through parallel scheduling.

[0036] This invention designs a dynamically maintainable 2-hop reachability label structure, enabling the index to maintain high query performance even after updates. Simultaneously, by combining the temporal attributes and structural characteristics of temporal graphs, it introduces a local incremental update optimization strategy based on node degree sorting, improving the execution efficiency of index updates and ensuring that the updated index accurately reflects the reachability relationships over time. This invention can meet the time-sensitive reachability index update requirements in complex dynamic scenarios, such as time-dependent path planning in transportation networks and time-series information propagation analysis in social networks.

[0037] As the fundamental data model of this invention, the temporal bipartite graph refers to a directed graph sequence, which can be defined as G = (G0, ..., G...). |G-1| ), where each It is a snapshot of G at a certain point in time, where V, U, and E represent the upper-level node set, lower-level node set, and edge set of graph G, respectively. |G| is the number of snapshots in G, which is also the total number of times in G.

[0038] Regarding step 1) above, the update technique refers to introducing a multi-level pruning mechanism oriented towards temporal graph characteristics on the basis of the incremental index maintenance framework to achieve efficient updates of local regions. Pruned local incremental maintenance is a dynamic update method that only repairs the index of a subset of nodes affected by dynamic changes. Specifically, when a new temporal edge is inserted or a node attribute changes, the technique first locates the affected local region, and then only incrementally updates the reachability labels of these regions to avoid repeatedly building the global index. Based on this, this invention introduces various pruning techniques to further reduce the update scope and inspection overhead, including: influence domain pruning, path-related pruning, redundancy propagation pruning, and time consistency pruning. Through the above pruning techniques, updating irrelevant nodes and candidate paths that do not meet time constraints can be effectively avoided, thereby ensuring a more efficient incremental maintenance process.

[0039] Furthermore, regarding step 2) above, the local incremental update optimization strategy based on node degree ranking refers to determining whether the reachability label of an affected node needs to be updated by comparing the degree order of the affected node with other related nodes before and after the update, within the node degree ranking framework. Specifically, when a node triggers a local update due to time edge insertion or attribute change, the system checks the degree changes of potentially related nodes; if the relative positions of these nodes in the ranking have not changed or the changes are insufficient to affect the reachability judgment, the corresponding update step can be skipped.

[0040] Furthermore, regarding the parallelized local incremental update mechanism mentioned in step 3), after locating the local regions of the affected nodes, the structural independence of these regions is analyzed, and the sub-regions that do not have a dependency relationship with each other are divided into several update tasks that can be processed independently, and a parallel scheduling strategy is adopted for synchronous updates.

[0041] A reachability index update system for graph data structures that satisfies time and step size constraints includes the following modules:

[0042] Temporal graph data preprocessing module: responsible for converting the raw temporal graph data into a format suitable for index construction, including nodes, edges, and each edge containing the start node, end node, and time information on the edge;

[0043] Index building module: Based on pruning Hop tagging technology and index optimization technology, it builds an reachability index that meets time and step size constraints;

[0044] Index Update Module: When a new edge is added to the graph structure, a pruning-style local incremental maintenance strategy is used to update the index of the affected node region. At the same time, local incremental updates based on node degree sorting pre-filter nodes that do not meet the update conditions, thereby efficiently generating the updated reachability index and ensuring the correctness of the index and query performance in dynamic environments.

[0045] like Figure 1 As shown, a method for updating the reachability index of a graph data structure that satisfies time and step size constraints includes the following steps:

[0046] S1: Obtain temporal bipartite graph data, convert it into a temporal graph, and build an index based on 2-hop labels.

[0047] S1.1 data transformation, combined with Figure 2 The initial temporal bipartite graph shown first extracts the nodes and time-related data from the graph, identifies and extracts the wedge structures that can be formed, and then constructs a structure as follows. Figure 3 The transition time diagram shown.

[0048] S1.2 Information Statistics and Sorting: Subsequently, global sorting is performed according to the time order of the edges, an independent identifier is assigned to each node, and information such as its in-degree, out-degree, and frequency of occurrence in all time snapshots is statistically analyzed.

[0049] S1.3 Index Construction: During the index construction phase, for each node v in the transformation temporal graph, a breadth-first search (BFS) traversal is performed in each time snapshot graph using an optimization strategy to construct the inbound label set. and outgoing label set .in, Record all intermediate nodes m that can reach node v and their corresponding path information (i.e., time and step size). Record all intermediate nodes m that node v can reach, along with their corresponding path information. For example, for Figure 3 The constructed index is as follows Figure 4 As shown, with nodes Outgoing label set For example, this record represents the node. To other nodes (such as and The reachability of ) and its corresponding time and step size constraints.

[0050] S2: Use a local incremental update optimization strategy based on node degree sorting to update the index.

[0051] When the graph structure changes dynamically, this step performs precise repairs on the affected local areas by evaluating changes in node degree.

[0052] S2.1 Impact Scope Assessment, in order to Figure 5 For example, assuming a time edge is added to the graph, the technique first calculates the impact of these new edges on the transformation graph (e.g., ...). Figure 6 As shown, a time edge has been added. and ).

[0053] S2.2 Sorting comparison and update triggering: The technology obtains the set of nodes that need to be updated and compares the topological sorting of node degrees before and after the update. Figure 7 (a) Nodes Taking index updates as an example, assuming the topological sort before the update is... After the update, due to the change in degree, the sorting has changed to... .

[0054] S2.3 Differentiated Update Logic: Based on the aforementioned sorting changes, the technology performs targeted local update operations: cleaning up redundant tags (corresponding to Case-2), nodes... The sorting position was in the order of the previous update. Previously, the updated tags were moved to the next position. This caused existing tags generated based on that order to become invalid, so they needed to be changed from... Delete all entries in the index that are related to Related redundant label items. Add path change labels (corresponding to Case-3), add new edges. The original path topology was changed, making it possible to... arrive A new reachable path (i.e.) has been formed Therefore, it is necessary to [do something] at the node. Add corresponding new tag items to the index (such as...) Figure 7 (b) shows the process of handling the new labels introduced by the newly added edges (corresponding to Case-1). The newly added edges are directly established. arrive Based on the new reachability relationship, the technology will supplement the index of the relevant nodes with newly generated tag entries (such as...). Figure 7 (c) is shown.

[0055] S3: Employ parallel strategies to optimize the index update process and improve overall maintenance efficiency.

[0056] The specific process is as follows: The processing of adding tags and deleting redundant tags for nodes can be regarded as independent processes, suitable for being split into multiple parallel tasks to accelerate index updates. In the process of deleting redundant tags, since the redundant tag cleanup task of each node can be completed independently without depending on the state of other nodes, this stage can be assigned to multiple threads for parallel execution, thereby improving processing efficiency. Similarly, the processing of adding tags in the tag addition stage has a similar computational structure to the index building stage, and the parallelized index building method can be directly reused for acceleration.

[0057] After the above steps, the final updated index is as follows: Figure 8 As shown.

[0058] This invention employs multiple optimization strategies during the index update process, effectively improving performance. Significantly improved index update efficiency: A local incremental update strategy based on node degree sorting, combined with a multi-level pruning mechanism, ensures that the update process only performs repair operations on the affected local areas, avoiding the repeated construction of the global index. Compared to the traditional full reconstruction method, this method significantly reduces unnecessary propagation and inspection operations, lowering index maintenance overhead by more than 50%. Parallelized incremental updates bring throughput improvements: After identifying independently affected areas, this invention utilizes a parallel strategy to synchronously update the local index, achieving load decomposition of the update task and significantly improving the overall update throughput, meeting the real-time index maintenance needs of high dynamic rate scenarios.

[0059] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A method for updating reachability indexes of graph data structures that satisfy time and step size constraints, characterized in that... Includes the following steps: S1: Obtain temporal bipartite graph data, convert it into a temporal graph, and build an index based on 2-hop labels; S2: Use a local incremental update optimization strategy based on node degree sorting to update the index; S3: Utilize parallel strategies to optimize index updates.

2. The reachability index update method according to claim 1, characterized in that... The specific process of step S1 above is as follows: The graph is represented as a directed graph sequence G = (G0, ..., G...). |G-1| The nodes and time-related data of the temporal graph are extracted and sorted according to the temporal order of the edges. Each node is given an independent identifier, and the in-degree, out-degree, and frequency of occurrence at all times are calculated. Based on the two-hop labeling technique, a reachability index of the temporal graph is constructed. For each node v, in the snapshot graph at each time step, a breadth-first traversal is used in conjunction with optimization strategies to construct... and Set; in which, Record all intermediate nodes m that can reach v, and the path information from m to v; Record all intermediate nodes m that can be reached from v, and the path information from v to m; the path information includes the corresponding time and step size.

3. The reachability index update method according to claim 2, characterized in that... The specific process of step S2 above is as follows: Obtain the set of nodes that need to be updated; sort the degree of all nodes before the graph update; sort the degree of all nodes after the graph update; and sort by vertex... New label items are introduced directly by adding new edges; in this case, Starting from the first vertex, perform a breadth-first traversal along the time intervals, with the initial value increasing and the ending value decreasing, respectively, constructing new labels and adding them to the visited vertices. and The addition of an edge changes the priority order of vertices, causing existing labels to become redundant; suppose there exists a vertex... It meets the requirements before the update. However, the order changed after the update. If originally or There is a pointer in The tag item, then in After execution, by The newly generated tags will be written or At this time, the old one was... Write The label item becomes redundant and should be deleted; the new label item introduced by the added edge, and the associated vertex The order always satisfies the condition before and after the update. ; For this type of label, it should be from Starting from the beginning, continue the traversal in the direction of increasing (or decreasing) time, and then... The generated labels are appended to the corresponding vertices. or .

4. The reachability index update method according to claim 3, characterized in that... The specific process of step S3 above is as follows: The processing of adding tags and deleting redundant tags is regarded as an independent process for nodes, which is suitable to be split into multiple parallel tasks; in the process of deleting redundant tags, since the redundant tag cleaning task of each node can be completed independently without depending on the state of other nodes, the task of this stage is assigned to multiple threads for parallel execution.

5. A system for implementing the reachability index update method according to any one of claims 1-4, characterized in that... Includes the following modules: Temporal graph data preprocessing module: responsible for converting the raw temporal graph data into a format suitable for index construction, including nodes, edges, and each edge containing the start node, end node, and time information on the edge; Index building module: Based on pruning Hop tagging technology and index optimization technology, it builds an reachability index that meets time and step size constraints; Index Update Module: When a new edge is added to the graph structure, a pruning-style local incremental maintenance strategy is used to update the index of the affected node region. At the same time, local incremental updates based on node degree sorting pre-filter nodes that do not meet the update conditions, thereby efficiently generating the updated reachability index and ensuring the correctness of the index and query performance in dynamic environments.