A polynomial computation method and an incremental computation method of a relaxed tense graph schema

By employing a polynomial static computation method for relaxed temporal graph phantoms, the problems of high computational complexity and insufficient adaptability to low-quality data in temporal graph phantoms are solved. This method enables efficient identification of dynamic network patterns within polynomial time and is suitable for large graph scenarios and incremental updates.

CN120124233BActive Publication Date: 2025-11-18BEIHANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510274604.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-11-18
Estimated Expiration
2045-03-10

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently process temporal graph motifs due to their high computational complexity and insufficient adaptability to low-quality data, resulting in an inability to accurately identify patterns in dynamic networks in practical applications.

Method used

A polynomial static calculation method for relaxed temporal graph phantoms is proposed. This method addresses data quality issues by introducing the concept of relaxed temporal graph phantoms, thus solving existing problems in relaxed temporal graph phantom calculation methods. It allows edge labels to vary within a certain range to tolerate data noise.

Benefits of technology

It efficiently computes relaxed temporal graph phantoms in polynomial time, can identify patterns in dynamic networks, adapts to low-quality data, and supports incremental updates and large graph scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120124233B_ABST
    Figure CN120124233B_ABST
Patent Text Reader

Abstract

The present disclosure provides a polynomial static calculation method and an incremental calculation method for relaxed temporal graph motifs, comprising: obtaining temporal graph data and user-specified frequency threshold k, proportional relaxation constraint δ and constant relaxation constraint c; processing the temporal graph into a data structure that can be efficiently used; calculating all defined relaxation temporal network motifs on the entire temporal graph according to the frequency threshold k, the proportional relaxation constraint δ and the constant relaxation constraint c; after the dynamic update of the temporal graph, incrementally updating the calculation results of the temporal graph motifs according to the existing calculation results and intermediate results. The technical effects realized by the method provided by the present disclosure include: solving the problems of high complexity and low efficiency of most existing temporal graph motif calculation methods, and alleviating the problem that the existing polynomial solvable temporal graph motif calculation method cannot cope with low-quality data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer science, and more specifically, to a method for calculating the concept of a relaxation temporal graph motif and an incremental calculation method. Background Technology

[0002] Graphs, as a data structure capable of describing and modeling complex relationships, have wide applications in many systems, including natural, social, and engineering technologies. However, traditional graph data structures often describe static relationships, lacking the ability to represent the dynamic characteristics of many systems. In recent years, researchers have proposed using "temporal graphs" to better represent dynamic features. Compared to traditional graph data structures, temporal graphs have an additional time dimension, with vertices or edges associated with temporal information (timestamps), enabling the description and modeling of network dynamics. They have already found numerous applications, and temporal graph motifs are an important part of many graph mining problems involving temporal graphs.

[0003] Graph motifs are recurring and statistically significant patterns in a graph, used to better understand the structure and function of a system. They have been extensively studied in traditional graph data structures. Temporal graph motifs, on the other hand, are network motifs defined on temporal graphs. They take into account various relationships such as the order, time difference, and trend of the formation of vertices, edges, and attributes at different times.

[0004] Temporal graphs vary widely, and existing definitions of temporal graph motifs often differ. Researchers typically propose new definitions of temporal graph motifs (and even temporal graph definitions) and corresponding mining problems based on actual application scenarios, and study algorithms for quickly solving the temporal graph motif mining problem.

[0005] Most existing temporal graph motif algorithms, in order to find frequently occurring subgraph patterns, cannot avoid subgraph isomorphism testing (which has been proven to be an NPC problem). Using exact counting algorithms is inefficient. Most existing temporal graph motif concepts are polynomial unsolvable, and their exact algorithms cannot avoid subgraph isomorphism testing or subgraph enumeration with exponential time complexity, resulting in low computational efficiency. Generally, the number of vertices and edges in the temporal graph motif is limited. Approximation algorithms and parallel algorithms can effectively reduce the running time, but do not change the complexity of the problem itself. Therefore, proposing a temporal graph motif approximation concept that is suitable for practical applications and polynomial solvable is the key to overcoming the low efficiency problem of traditional temporal graph motif concepts.

[0006] The concept of a temporal plot modulus that is solvable by a polynomial is defined as follows:

[0007] Temporal diagram: defined as a quintuple G(V,E,T) b ,T e ,L), where: (1) V is the set of vertices; (2) It is a set of undirected edges; (3)T b and T e Representing the start and end times of the temporal diagram, respectively, denoted by [T] b ,T e ] indicates that the length of the temporal diagram is (T) e -T b +1) time interval. (4) For each time t∈[T b ,T e (Time is discrete), L t () is a labeling function that maps each edge in E to a label for each time t. For convenience, G(V,E,L) or G(V,E,T) can be used without affecting understanding. b ,T e ) represents a temporal diagram.

[0008] Temporal subgraph: defined as G(V) s E s , L s )satisfy and and for e∈E s and have

[0009] Temporal graph motif approximation concept: A temporal graph motif is a temporal subgraph and satisfies: (1) it is a connected graph, (2) for e∈E s have That is, each edge is in the interval The Chinese label remains unchanged, (3) k is called the frequency threshold.

[0010] Extensibility of the temporal graph motif approximation concept: Based on the aforementioned definition of temporal graph motifs, to reduce redundant mining results, the extensibility of temporal graph motifs is further proposed, defined as: for temporal graph motifs... For each edge e, if there exists an interval The edge labels in the data satisfy when When, the temporal graph modulus is left-expandable; when At that time, the temporal graph model is right-expandable.

[0011] The maximality of the temporal graph motif approximation concept: Based on the aforementioned definition of temporal graph motifs, the maximality of temporal graph motifs is further proposed, defined as: for temporal graph motifs... For any adjacent edge e', if there exists an interval The edge labels in the text do not meet the requirements. The temporal plot modulus is maximal; otherwise, it is not maximal.

[0012] Problem definition: Given a temporal graph G(V,E,1,T,L) and a frequency threshold k, output all maximal and non-scalable temporal graph motifs.

[0013] The existing temporal graph phantom approximation concept requires that the labels of all edges of the temporal graph phantom remain unchanged within its interval, which is too restrictive. Considering that in practical applications, data quality issues are widespread, including data noise, measurement errors, and other errors, which affect the calculation of the temporal graph phantom approximation concept, any change in edge label will result in the inability to obtain a temporal graph phantom containing that edge.

[0014] The existing concept of temporal graph phantom approximation is affected by widespread data quality issues (taking road traffic networks as an example).

[0015] Figure 1 This is a practical example from a road network. The left image shows a road traffic network where each edge represents a road monitored by sensors. The sensors label traffic conditions as "congested" or "free-flowing," marking them every minute for a day. For simplicity, only the time intervals for "congested" road labels are shown, ignoring all other timestamps for "free-flowing" edge labels. However, the sensors for roads "BC" and "CD" (between 7:23 and 7:24) and roads "CE" and "EF" (between 7:27 and 7:28) malfunction, and the roads are incorrectly labeled as "free-flowing." At this point, using the concept proposed in the prior art, only two relatively distant roads, "AB" and "FG" (marked with dashed circles in the right image), would be identified. In reality, these two roads are related. If data noise, i.e., labeling errors, can be accounted for, and all roads can be merged into a single traffic congestion pattern lasting at least 30 minutes, as shown in the overall right image, the practical application value of the temporal graph motif approximation concept can be significantly improved. Summary of the Invention

[0016] The purpose of this disclosure is to provide a method for calculating the concept of a relaxed temporal graph phantom, which solves the problems of high complexity and low efficiency of most existing temporal graph phantom calculation methods, and can alleviate the problem that existing polynomial-solvable temporal graph phantom calculation methods cannot handle low-quality data.

[0017] In a general sense, a polynomial static computation method for a relaxed temporal graph model is provided, including:

[0018] Step 1: Read the temporal graph G representing the traffic network composed of multiple roads, the frequent threshold k representing the traffic congestion pattern with a duration of at least k in the traffic network, the proportional relaxation constraint δ, and the constant relaxation constraint c.

[0019] Step 2: Initialize the left endpoint of the current calculation interval to m=1, and calculate in ascending order of the left endpoints of the interval;

[0020] Step 3: Based on whether the proportional relaxation constraint δ and constant relaxation constraint c are satisfied in the interval, filter out the edges from the edge set E that cannot be used to form the relaxation temporal graph module. Store the unfiltered edges in multiple edge sets R according to the maximum interval that can satisfy the relaxation constraints, with each edge set corresponding to an interval.

[0021] Step 4: Initialize the right endpoint of the current calculation interval to i = T, and calculate in descending order of the right endpoints of the interval;

[0022] Step 5: For each interval, use the corresponding edge set obtained in Step 3 to construct the connected components of each interval according to the connectivity. Then, temporarily delete the edges in the connected components that do not satisfy the two relaxation constraints, recalculate the connected components, and construct the maximal relaxation temporal graph module for each connected component with the interval [m,i].

[0023] Step 6: Check whether each generated maximal temporal graph motif is scalable. The check range is limited by the interval corresponding to the set to which each edge belongs. Save the left-non-scalable relaxed temporal motif from Step 5 to the final result TF[m,i].

[0024] Step 7: Determine if the right endpoint i of the interval is greater than m+k-1. If so, decrease i by 1 and go to step 5.

[0025] Step 8: Determine if the left endpoint m of the interval is less than T-k+1. If so, increase m by 1 and go to step 3 to continue. If not, output the traffic pattern that finally meets the requirements as the result module set TF.

[0026] The specific method for filtering out edges from the edge set E that cannot be used to form the relaxed temporal graph model in step 3 is as follows: It is implemented based on a table structure DEL-Table of |E|×(|L|+T), divided into two parts. The first part records the edge label preservation information of each edge e with respect to the timestamp t. t Dis represents the label of edge e at timestamp t. t This indicates that edge e in the interval [1, t] is not labeled as lab. t The number of snapshots is used to speed up the calculation of edge e labels not being L in the interval [m,h]. m (e) Snapshot number, if L m (e)=L h (e), the label of edge e in the interval [m,h] is not L. m (e) has a snapshot number of dis h -dis mThe second part records the last timestamp of each label for each edge 'e', ​​using the tail symbol. lab express;

[0027] The specific process is as follows:

[0028] 1) Initialize each set R[m,i] as an empty set;

[0029] 2) Take the first edge e from edge set E;

[0030] 3) If m=1, scan the DEL-Table by calling the function scanDEL-Table to calculate the R set to which edge e belongs, and at the same time maintain the arrays maxIntv, scanT and tabuT;

[0031] 4) If m≠1 and L m (e)=L m-1 (e) only requires updating the array tabuT and determining the set R to which the edge belongs based on the array maxIntv and the updated tabuT;

[0032] 5) If m≠1 and L m (e)≠L m-1 (e) The process requires updating the array tabuT and determining whether to continue scanning the DEL-Table. If so, the function scanDELTable is called, starting from the timestamp max(m, scanT[e, L)). m (e)]) Start scanning the DEL-Table, while maintaining the arrays maxIntv, scanT and tabuT;

[0033] 6) Remove one edge e from the edge set E and go to step 3) to continue; if all edges have been traversed, the process returns the set R and the updated arrays maxIntv, scanT, and tabuT, and the process ends.

[0034] The specific method for constructing a maximal relaxation temporal graph motif with the interval [m,i] for each connected component in step 5 is as follows:

[0035] 1) Initialize sets CC[i,T] and checkCC[i,T] to CC[i+1,T] and checkCC[i+1,T], and initialize set maxCC to empty;

[0036] 2) Take the first edge e from the set R[m,i];

[0037] 3) Determine the connectivity between edge e and each connected component in set CC[i,T];

[0038] 4) If edge e is not connected to any connected component, then create a new connected component G. s Includes edge e, maintain G s .tabuTS and G s .ccScope, add G s Add the values ​​to CC[i,T] and checkCC[i,T];

[0039] 5) If edge e is connected to a connected component G s If the connection is established, add edge e to G. s In the middle, update G s .tabuTS and G s .ccScope, if G s G is not in the set checkCC[i,T], so it needs to be added. s Add it to checkCC[i,T];

[0040] 6) If edge e is connected to two connected components G s and G s' Connect, and G s and G s' And edge e is merged into a new connected component G. ss' Update and maintain G ss' .tabuTS and G ss' .ccScope, and use G in CC[i,T] and checkCC[i,T] ss' Replace G s and G s' ;

[0041] 7) Remove one edge e from set R[m,i] and go to step 3); if all edges have been traversed, remove the first connected component G from set checkCC[i,T]. s ;

[0042] 8) Update G s .tabuTS, G s .ccScope and scope array G s The corresponding value of each edge in G is obtained using G. s .tabuTS removes edges that do not belong to set S[m,i], i.e., L m If (e) ≠ Li(e) or an edge in the interval [m,i] that does not satisfy the relaxed constraint, then remove G from the set checkCC[i,T] if no edge is removed. s And store it in the set maxCC; otherwise, the connected components need to be recalculated and the newly obtained connected components stored in the set maxCC.

[0043] 9) Remove one connected component G from the set checkCC[i,T]. s Proceed to step 8) to continue; if all connected components have been traversed, the process returns the sets maxCC, CC[i,T] and checkCC[i,T] and the updated array scope, and the process ends.

[0044] The specific method for checking whether each generated maximal temporal graph phantom is scalable in step 6 is as follows:

[0045] 1) Initialize the set TF[m,i] to be an empty set;

[0046] 2) Take the first connected component G from the set maxCC. s ;

[0047] 3) Let G be the name of the class. s The ccScope value [l,r], if G s There exists an edge in the set R[m,i] such that l = m, G s It is not scalable and is stored in the set TF[m,i]; otherwise, it uses G. s .ccScope, check G s Can it be extended to any subinterval in the interval [l,r], and will the non-extendable G be...? s Store in set TF[m,i];

[0048] 4) Remove one connected component G from the set maxCC. s Proceed to step 3) to continue; if all connected components have been traversed, the process returns the set TF[m,i] and the process ends.

[0049] In another general aspect, an incremental computation method for the polynomial of a relaxed temporal graph motif is provided, comprising:

[0050] Step 1: Read the updated temporal graph G[1,T+ΔT], frequent threshold k, proportional relaxation constraint δ, constant relaxation constraint c, intermediate result sets EIntR and MIntR, and the calculated motif set TF;

[0051] Step 2: Initialize the left endpoint m of the current calculation interval to 1;

[0052] Step 3: When the left endpoint m of the current calculation interval is not greater than T-k+1, filter out edges from the input set EIntR that cannot be used to form a temporal graph module with intervals [m,T+1],…,[m,T+ΔT] based on whether the two relaxation constraints are satisfied in the interval. Store the unfiltered edges in multiple edge sets, i.e., sets R[m,T+1],…,R[m,T+ΔT], according to the largest interval that can satisfy the relaxation constraints. Only process the edges stored in set EIntR, not all edges of the temporal graph, and only consider temporal graph modules with intervals [m,T+1],…,[m,T+ΔT], not all intervals; otherwise, use the process of filtering out edges from edge set E that cannot be used to form a relaxed temporal graph module.

[0053] Step 4: Initialize the right endpoint i of the current calculation interval as i = T + ΔT;

[0054] Step 5: The process of constructing a maximal relaxation temporal graph motif with interval [m,i] using a maximal relaxation temporal graph motif corresponding to each connected component, and the process of checking whether each generated maximal relaxation temporal graph motif is scalable, and saving the maximal and non-scalable relaxation temporal graph motif to the final result TF[m,i];

[0055] Step 6: Determine if the right endpoint i of the interval is greater than T;

[0056] If so, decrease the right endpoint i of the interval by 1 and proceed to step 5.

[0057] Step 7: Check all temporal plot motifs with left endpoint m in the set MINTR. If a temporal plot motif is expandable, it means that the temporal plot motif is affected after the temporal plot is updated, and it needs to be deleted from the result TF. Increment the left endpoint TF of the interval by 1, and check if the row number m is greater than T-k+1; if not, go to step 3 to continue; otherwise, output the updated final result motif set TF, and the process ends.

[0058] The technical effects to be achieved by the embodiments of the present invention are as follows:

[0059] (1) A new relaxed temporal graph phantom and its parameters are proposed. The phantom is required to appear for a sufficient period of time in a network where the vertices and edges are fixed and the edges change over time. The edge labels are allowed to change within certain parameter constraints. While meeting the requirements of the original network phantom for repeated appearance and statistical significance, it can tolerate a certain degree of data quality problems and has more practical value.

[0060] (2) Based on the relaxed temporal graph motif, without limiting the size of the temporal graph motif structure, a method for calculating the relaxed temporal network motif is proposed. It can also be calculated efficiently in low-order polynomial time and is suitable for application in large graph scenarios.

[0061] (3) The relaxation temporal graph phantom calculation method also supports calculation in an incremental update environment. After the temporal graph is updated, the new calculation result can be obtained only based on the calculated result, the saved intermediate result and the graph data information within a certain range. Attached Figure Description

[0062] The above and other objects and features of this disclosure will become clearer from the following description taken in conjunction with the accompanying drawings.

[0063] Figure 1 It is a schematic diagram showing the traffic road network (left figure) and traffic congestion patterns (right figure, the two red boxes are the traffic congestion patterns that can be found by the existing temporal graph model, and the right figure as a whole is the traffic congestion patterns that can be found by the relaxed temporal graph model of the embodiment of this disclosure).

[0064] Figure 2 This is a schematic diagram illustrating the temporal diagram, relaxation temporal diagram phantom, and their scalability and maxima according to embodiments of the present disclosure;

[0065] Figure 3 This is a schematic flowchart illustrating a polynomial static calculation method for a relaxation temporal graph model according to an embodiment of the present disclosure;

[0066] Figure 4 This is a schematic diagram illustrating the DEL-Table data structure according to an embodiment of the present disclosure;

[0067] Figure 5 This is a schematic diagram illustrating the temporal graph update and addition of a relaxation temporal graph phantom according to an embodiment of the present disclosure;

[0068] Figure 6 This is a schematic flowchart illustrating a polynomial dynamic calculation method for a relaxation temporal graph model according to an embodiment of the present disclosure. Detailed Implementation

[0069] The following detailed embodiments are provided to aid the reader in gaining a comprehensive understanding of the methods, apparatus, and / or systems described herein. However, various changes, modifications, and equivalents of the methods, apparatus, and / or systems described herein will become apparent upon understanding this disclosure. For example, the order of operations described herein is merely illustrative and is not limited to those orders set forth herein, but may be changed as will become clear upon understanding this disclosure, except for operations that must occur in a specific order. Furthermore, for clarity and conciseness, descriptions of features known in the art may be omitted.

[0070] The features described herein may be implemented in different forms and should not be construed as limited to the examples described herein. Rather, the examples described herein are provided only to illustrate some of the many feasible ways of implementing the methods, apparatus, and / or systems described herein, which will become clear upon understanding the disclosure of this application.

[0071] As used herein, the term “and / or” includes any one of the associated listed items and any combination of any two or more.

[0072] Although terms such as “first,” “second,” and “third” may be used herein to describe various components, assemblies, regions, layers, or parts, these components, assemblies, regions, layers, or parts should not be limited by these terms. Rather, these terms are used only to distinguish one component, assembly, region, layer, or part from another. Thus, without departing from the teaching of the examples described herein, the first component, first assembly, first region, first layer, or first part referred to as the first component, first assembly, first region, first layer, or first part may also be referred to as the second component, second assembly, second region, second layer, or second part.

[0073] In the specification, when an element (such as a layer, region, or substrate) is described as being "on" another element, "connected to," or "bonded to" another element, the element may be directly "on" another element, directly "connected to," or "bonded to" the other element, or one or more other elements may be present in between. Conversely, when an element is described as being "directly on" another element, "directly connected to," or "directly bonded to" another element, no other elements may be present in between.

[0074] The terminology used herein is for the purpose of describing various examples only and is not intended to limit disclosure. Unless the context clearly indicates otherwise, the singular form is intended to include the plural form as well. The terms “comprising,” “including,” and “having” indicate the presence of the described features, quantities, operations, components, elements, and / or combinations thereof, but do not preclude the presence or addition of one or more other features, quantities, operations, components, elements, and / or combinations thereof.

[0075] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains upon understanding this disclosure. Unless expressly defined herein, terms (such as those defined in a general dictionary) shall be interpreted as having a meaning consistent with their meaning in the context of the relevant field and in this disclosure, and shall not be interpreted in an idealized or overly formalistic manner.

[0076] Furthermore, in the description of the examples, detailed descriptions of well-known related structures or functions will be omitted when it is believed that such detailed descriptions would lead to a vague interpretation of this disclosure.

[0077] Figure 3 This is a schematic diagram illustrating the architecture of a relaxation temporal graph phantom concept computation method according to an embodiment of the present disclosure.

[0078] To achieve the aforementioned objectives, this invention proposes a relaxation temporal graph phantom, and based on this phantom, provides a calculation method and optimization method for the relaxation temporal graph phantom, and finally provides the corresponding incremental calculation method.

[0079] First, the definition of the problem for calculating relaxation temporal diagram phantoms is given:

[0080] For a relaxed temporal graph motif, it is necessary to define a temporal graph and a temporal subgraph, and on this basis, define a new type of temporal graph motif (relaxed temporal graph motif), and then give the definition of the computation problem of the relaxed temporal graph motif based on it.

[0081] Temporal diagrams and temporal sub-diagrams:

[0082] Temporal diagram: defined as a quintuple G(V,E,T) b ,T e ,L), where: (1) V is the set of vertices; (2) It is a set of undirected edges; (3)T b and T e Representing the start and end times of the temporal diagram, respectively, denoted by [T] b ,T e ] indicates that the length of the temporal diagram is (T) e -T b +1) time interval. (4) For each time t∈[T b ,T e (Time is discrete), L t () is a labeling function that maps each edge in E to a label for each time t. For convenience, G(V,E,L) or G(V,E,T) can be used without affecting understanding. b ,T e ) represents a temporal diagram.

[0083] Temporal subgraph: defined as G(V) s E s , L s )satisfy and and for e∈E s and have

[0084] Relaxed Temporal Graph Module: Based on the definitions of temporal graph and temporal subgraph, a concept definition of a relaxed temporal graph module is proposed, which satisfies: (1) it is a connected temporal subgraph, and (2) for e∈E s In the interval The labels in (integer frequent threshold) satisfy It also satisfies both proportional relaxation and constant relaxation constraints. The proportional relaxation constraint requires that the label of edge e is not equal to 0. The proportion of the total number of snapshots to the total number of snapshots of the modulus is not greater than δ (δ is a decimal), and the constant relaxation constraint requires that the label of edge e is not 0. The number of consecutive snapshots is no greater than c (where c is an integer). This concept relaxes the strict requirement in the temporal graph phantom approximation concept that the edge labels remain fixed for a sufficiently long time. It only requires that the edge labels be the same at both ends of the interval of the temporal graph phantom, and allows the edge labels to change within conditional constraints at other times within the interval, i.e., label noise is allowed.

[0085] Extensibility of Relaxed Temporal Graph Motifs: Based on the aforementioned definition of relaxed temporal graph motifs, to reduce redundant mining results, the extensibility of relaxed temporal graph motifs is further proposed, defined as: for relaxed temporal graph motifs... For each edge e, if there exists an interval The edge labels in the data satisfy And it satisfies both proportional relaxation constraints and constant relaxation constraints, when When the model is open, the model is expandable to the left; when At that time, the phantom is expandable to the right.

[0086] Maximality of Relaxed Temporal Graph Modules: Based on the aforementioned definition of relaxed temporal graph modules, the maximality of relaxed temporal graph modules is further proposed, defined as: for relaxed temporal graph modules... For any adjacent edge e', if there exists an interval The edge labels in the data do not satisfy any of the relaxation constraints or The relaxation temporal graph modulus is maximal; otherwise, it is not maximal.

[0087] The problem of calculating relaxed temporal graph phantoms is as follows: Given a temporal graph G(V,E,1,T,L), a frequency threshold k, a proportional relaxation constraint δ, and a constant relaxation constraint c, output all maximal and non-scalable relaxed temporal graph phantoms that satisfy the condition that the labels at both ends of the interval are the same, the proportional relaxation constraint δ, and the constant relaxation constraint c.

[0088] Example: Figure 2It is a temporal graph G with 5 vertices, 6 edges and 10 snapshots. The B-D graph is three temporal subgraphs H1, H2, H3, with time intervals [1,7], [3,7], [3,9] respectively. Given the frequency threshold k = 5, the proportional relaxation constraint δ = 0.3 and the constant relaxation constraint c = 2, H1, δ2, H3 are all relaxed temporal graph motifs. Since the three temporal graph motifs are all connected temporal subgraphs, the time interval is not less than the frequency threshold k, and all edges satisfy the same labels at both endpoints of the time interval, the proportional relaxation constraint δ and the constant relaxation constraint c. Among them, H2 (C graph) is a left-extendable relaxed temporal graph motif because there exists an interval [1,7] such that all edges satisfy the same labels at both endpoints of the interval, the proportional relaxation constraint δ and the constant relaxation constraint c; H3 (D graph) is not a maximal relaxed temporal graph motif because there exists an edge (v1, v4) adjacent to H3 and satisfying the same labels at both endpoints of the interval [3,9], the proportional relaxation constraint δ and the constant relaxation constraint c; only H1 (B graph) is a maximal and non-extendable relaxed temporal graph motif because there does not exist a larger interval such that all edges satisfy the same labels at both endpoints of the interval, the proportional relaxation constraint δ and the constant relaxation constraint c, and there does not exist an adjacent edge satisfying the same labels at both endpoints of the time interval of the motif, the proportional relaxation constraint v and the constant relaxation constraint c.

[0089] Calculation method of relaxed temporal network motif:

[0090] After giving the relevant definitions and problem definitions of the relaxed temporal motif, the present invention provides a calculation method for this temporal network motif.

[0091] First, analyze the problem raised. First, divide the original problem into 3 sub-problems: (1) How to filter the edges that satisfy the two relaxation constraints and have the same labels at both ends in each interval? (2) How to construct the maximal relaxed temporal graph motif corresponding to each interval so that all edges in the motif still satisfy the two relaxation constraints and have the same labels at both ends in the interval? (3) Judging whether an edge satisfies the two relaxation constraints and has the same labels at both ends is independent of the size of the interval of the relaxed temporal graph motif. How to judge that a maximal relaxed temporal graph motif is non-extendable?

[0092] For the first sub-problem, first define the S set and the R set. The set S[m,i] represents all edges e that satisfy the two relaxation constraints and L m (e) = L i (e) in the interval [m,i]. The set R[m,j1] represents all edges e that satisfy the three conditions of the two relaxation constraints, and violate any of the conditions in all intervals [m,j2] (j1 < j2 ≤ T), formalized as m + k - 1 ≤ j1 < T; R[m,T] = S[m,T].

[0093] Proposition 7: For any k, δ, c > 0, there exists an edge e ∈ S[m, h] but (i ≤ m ≤ T - k + 1, m + k - 1 ≤ i < h ≤ T).

[0094] Proof 7: There are two cases. (1) Suppose there exists an edge e such that L t (e) = L m (e), t ∈ [m, i - 1] ∪ [i + 1, h], that is, L i (e) ≠ L m (e). If δ(h - m + 1) ≥ 1, then e ∈ S[m, h] but (2) Suppose there exists an edge e such that L t (e) = L m (e), t ∈ [m, i - 2] ∪ [i, g], that is, L i-1 (e) ≠ L m (e). If δ(h - m + 1) ≥ 1 > δ(i - m + 1), then e ∈ S[m, h] but Combining (1) and (2), the conclusion can be drawn.

[0095] For the convenience of using S * [m, i] to represent ∪ i≤h≤T R[m, h], the following proposition holds:

[0096] Proposition 8: Each edge e ∈ S * [m, i] satisfies the threshold c in the interval [m, i].

[0097] Proof 8: According to the definition of the R set, each edge e ∈ R[m, i] in the interval [m, i], i ∈ [m + k - 1, T] satisfies the threshold c, that is, the continuous snapshots where the label of each segment of the edge e is not L m (e) do not exceed the threshold c. This also holds for each edge e ∈ S * [m, i] = ∪ i≤h≤ T R[m, h] because all intervals [m, h], i ≤ h ≤ T contain the interval [m, i], and the conclusion can be drawn.

[0098] According to the definitions of the two sets and the two propositions, this sub - problem is transformed into calculating the R set, and each S set is calculated by dynamic update, avoiding constructing a maximum relaxed temporal graph motif with the same edges and saving storage space.

[0099] Proposition 9: Given the edge set S[m, i] (i ≤ m ≤ T - k + 1, m + k - 1 ≤ i < h ≤ T), each connected component of the temporal sub - graph G s (S[m, i]) corresponds to a maximum relaxed temporal graph motif.

[0100] Proof 9: Assume there exists a connected component that is not a maximally relaxed temporal graph motif G. s (V s E s (m,i), meaning there exists an edge. Adjacent to G s Furthermore, the interval [m,i] satisfies two relaxed constraints and the labels at both ends are the same, which contradicts the definition of a connected component, leading to the conclusion that...

[0101] For the second subproblem, based on the already computed set R, there are two approaches to compute the maximally relaxed temporal graph motif: left-to-right (R2L) and right-to-left (L2R).

[0102] The L2R scheme calculates the maximal relaxation temporal graph motif in the order of intervals [m,m+k-1], [m,m+k],…,[m,T]. First, it uses ∪ m+k-1≤i≤T In R[m,i], after deleting edges whose labels differ at both ends of the interval [m,m+k-1] or violate the proportional relaxation constraint, a connected component is calculated. Each connected component corresponds to a maximal relaxation temporal graph module in the interval [m,m+k-1]. Then, dynamically from ∪ m+k-1<i≤T After deleting edges in R[m,i-1] that have different labels at both ends of the interval [m,i] or violate the proportional relaxation constraint, as well as edges in R[m,i-1], the connected components are calculated. Each connected component corresponds to a maximal relaxation temporal graph module in the interval [m,i].

[0103] The R2L scheme calculates the maximal relaxation temporal graph module in the order of intervals [m,T], [m,T-1], ..., [m,m+k-1]. First, it calculates the connected components using the edges in R[m,T], with each connected component corresponding to a maximal relaxation temporal graph module in the interval [m,T]. Then, it dynamically adds edges in R[m,i] to the already calculated module and deletes edges with different labels at both ends of the interval [m,i] or that violate the proportional relaxation constraint before calculating the connected components, with each connected component corresponding to a maximal relaxation temporal graph module in the interval [m,i].

[0104] Analysis can be performed by deleting or adding edges. Both the R2L and L2R solutions require an increase of O(|∪). m+k-1≤i≤ The edges TR[m,i]|) are removed, but the R2L solution requires O(∑) edges to be removed. m+k-1≤i<T |S * For edges [m,i] / S[m,i]|), the L2R solution requires deleting O(∑ m+k-1≤i<T (|S * The R2L scheme requires fewer edges to be deleted because it has the edge [m,i] / S[m,i]|+|R[m,i]|). Therefore, the proposed algorithm uses the R2L scheme as its basis.

[0105] For the third sub - problem, this problem is essentially to check whether all the edges of the maximum relaxed temporal graph motif with the interval [m, j1] can have the same edge labels at both ends and satisfy two kinds of relaxation constraints in the intervals [1, j2], [2, j2], …, [m - 1, j2], where j1 < j2 ≤ T. The inspection range can be reduced by the R - sets to which each edge belongs.

[0106] Let the edge e ∈ R[p2, j2], …, R[p x , j x , p2, …, p x ≤ m, j1 ≤ j2, …, j x , and denote scope[e] = [min(p2, …, p x ), max(j2, …, j x )]. For the maximum relaxed temporal graph motif with the interval [m, j1], the inspection range is the intersection of scope[e] corresponding to each edge e in the motif, denoted as [scopeL, scopeR].

[0107] Proposition 10: For each maximum relaxed temporal graph motif with the interval in [m, i], if it contains the edge e ∈ R[m, i], then the relaxed temporal graph motif will not extend to the interval [m, h], where i + 1 ≤ h ≤ T.

[0108] Proof 10: Assume that a maximum relaxed temporal graph motif with the interval in [m, i] is generated using the set R[m, i], where m + k - 1 ≤ i ≤ T. Any edge e ∈ R[m, i] satisfies That is, if there exists an edge e ∈ R[m, i] in the maximum relaxed temporal graph motif and the edge e does not exist in any maximum relaxed temporal graph motif with the interval in [m, h], the conclusion can be drawn.

[0109] Proposition 11: To identify whether a maximum relaxed temporal graph motif with the interval in [m, i] can be extended, it can be done by checking whether it appears in the maximum relaxed temporal graph motifs with the intervals [n, h] (for scopel ≤ n ≤ m - 1, i ≤ h ≤ scopeR; for n = m, i + 1 ≤ h ≤ scopeR).

[0110] Proof 11: (1) Assume that the maximum relaxed temporal graph motif with the interval in [m, i] can appear in the interval [n, h], where 1 ≤ n ≤ m, scopeR + 1 ≤ h ≤ T. According to the definition of scope, it can be proved that there exists an edge e ∈ R[p2, j2], …, R[p x , j x satisfying p1, …, p x ∈ [1, m] and max(j2, …, j x ) = scopeR. According to the definition of the set R, there is Therefore, a maximally relaxed temporal graph module containing edge e cannot appear in the interval [p1,h],…,[p1,h]. x ,h], even the interval [n,h],1≤n≤m, which contradicts the assumption. (2) Similarly, it can be seen that there is no maximally relaxed temporal plot module in the interval [m,i] that appears in the interval [n,h],1≤n≤l-1,i+1≤h≤scopeR.

[0111] According to Proposition 10, check whether the maximally relaxed temporal graph module can be extended to the interval [scopeL,j2], [scopeL+1,j2], ..., [m,j2], j1≤j2≤scopeR. Furthermore, for the maximally relaxed temporal graph module constructed by the R2L scheme with the interval [m,j1], by Proposition 11, if there exists an edge e∈R[m,j1], the interval of this maximally relaxed temporal graph module cannot be extended to [m,j2],j1. <j2≤T。

[0112] The polynomial static computation method for relaxation temporal graph moduloes is designed for the following application scenarios: (The last part is incomplete and likely refers to a different context.) Figure 1 For example, (1) the structure of the temporal graph represents a traffic network composed of multiple roads, the interval represents the recording time of traffic conditions (e.g., recording once per minute, recording for one day), and the whole represents the traffic conditions of multiple roads in the interval (e.g., one day); (2) the frequency threshold k indicates that a traffic congestion pattern with a duration of at least k needs to be found from the traffic network, such as k=30 indicating that a traffic congestion pattern with a duration of at least 30 minutes needs to be found from the traffic network; (3) the proportional relaxation constraint δ of the relaxed temporal graph module ensures that the road condition label mismatch of each edge (road) of the traffic congestion pattern only occurs within a finite time. When the proportional relaxation constraint δ=5%, it is possible to identify, such as Figure 1 The complete traffic congestion pattern shown in the right figure has a time interval of [7:10, 7:50] because it meets the condition of lasting at least 30 minutes. Through proportional relaxation constraints, the mislabeled roads 'BC', 'CD', 'CE', and 'EF' are processed. (4) The constant relaxation constraint c ensures that the road condition label mismatch of each edge in the traffic congestion pattern only lasts for a finite time. When the proportional relaxation constraint δ = 5%, a similar pattern can also be identified. Figure 1The right figure shows the same traffic pattern, but the label of each edge is marked as 'fast' in the interval [0:00, 23:59]. However, this pattern essentially treats all edge labels in [0:00, 23:59] as 'fast', which is contradictory to the edge marked as 'congested' in [7:10, 7:50]. Therefore, the constant relaxation constraint c avoids this situation; (5) The output result module set TF represents all traffic patterns found from the traffic network that satisfy the parameters k, δ and c, such as the area composed of multiple roads with a continuous congestion time of k minutes and the congestion time, and allows the traffic conditions of some roads to be smooth for no more than c times each time, and the proportion of the total smooth time does not exceed δ. Overall, compared with the existing methods, the polynomial static calculation method of the relaxation temporal graph module has added proportional relaxation constraint δ and constant relaxation constraint c, which are designed for the widely existing data quality problems, such as data noise caused by sudden changes in traffic conditions or sensor failures in the traffic network, which is of practical significance.

[0113] Static Algorithm FRTM: Through the analysis of three sub-problems, this invention proposes a polynomial static computation method for relaxed temporal graph modulo structures. Specifically, the computation process consists of the following steps:

[0114] (1) Read the temporal graph G, the frequent threshold k, the proportional relaxation constraint δ and the constant relaxation constraint c.

[0115] (2) Initialize the left endpoint of the current calculation interval to m=1, and calculate in ascending order of the left endpoints of the interval (T2B scheme).

[0116] (3) Based on whether the two relaxation constraints are satisfied in the interval, filter out the edges that cannot be used to form the relaxation temporal graph module from the edge set E, and store the unfiltered edges in multiple edge sets (i.e., set R) according to the maximum interval that can satisfy the relaxation constraints. Each edge set corresponds to an interval (process compRES).

[0117] (4) Initialize the right endpoint of the current calculation interval to i = T, and calculate in descending order of the right endpoints of the interval (R2L scheme).

[0118] (5) For each interval, use the corresponding edge set obtained in step (3) to construct the connected components of each interval according to the connectivity. Then temporarily delete the edges in the connected components that do not satisfy the two relaxation constraints, recalculate the connected components, and construct a maximal relaxation temporal graph module (genMaxRTM) for each connected component with interval [m,i].

[0119] (6) Check whether each generated maximal temporal graph module is scalable. The check range is limited by the interval corresponding to the set to which each edge belongs. Save the non-scalable relaxed temporal module in step (5) to the final result TF[m,i] (process genNExpRTM).

[0120] (7) Determine if the right endpoint i of the interval is greater than m+k-1. If it is, decrease i by 1 and proceed to step (5).

[0121] (8) Determine whether the left endpoint m of the interval is less than T-k+1. If yes, increase m by 1 and go to step (3) to continue; if no, output the final result set TF.

[0122] Step (3): Filter out edges (compRES) from edge set E that cannot be used to form a relaxed temporal graph module.

[0123] The process `compRES` is primarily used to calculate the set R to which each edge belongs. This process is based on a table structure `DEL-Table` of type `|E|×(|L|+T)`, such as... Figure 4 As shown, it is divided into two parts. The first part records the edge label preservation information of each edge e with respect to the timestamp t. t This represents the label of edge e at timestamp t. t This indicates that edge e in the interval [1, t] is not labeled as lab. t The number of snapshots is used to speed up the calculation of edge e labels not being L in the interval [m,h]. m (e) Snapshot number, if L m (e)=L h (e) The label of edge e in the interval [m,h] is not L. m (e) has a snapshot number of dis h -dis m It is worth noting that if L m (e)≠L h (e) The interval [m,h] will not be an interval of any relaxed temporal graph module containing edge e, therefore this case need not be considered. t and aft t There are two semantic definitions, distinguished by positive and negative signs. bef t (or aft) t Taking a positive value indicates that the label is maintained until the timestamp t. t The number of snapshots remains constant (or the edge e can maintain the label lab starting from timestamp t). t (The maximum number of snapshots remains unchanged); bef t (or aft) t A negative value indicates the distance from the current timestamp t to the previous (or next) edge e, labeled as lab.t The number of timestamp snapshots, in addition, bef t (or aft) t When the timestamp is negative, the timestamp is always the label of edge e. t The start (or end) timestamp, i.e., Lt -1 (e)≠L t (e)(or Lt(e)≠L t+1 (e)). The second part records the last timestamp of each edge e as the label, using tail. lab express.

[0124] Example: For edge (v3,v5) and timestamp t=5, as shown in the figure above, edge (v3,v5) keeps label lab5=1 in the interval [5-max(bef5,1)+1,5+max(aft5,1)-1]=[4,7]. The timestamp with label 1 before (or after) the interval [4,7] is 4+bef4=2 (or 7-aft7=9). In addition, for the interval [1,9], the number of snapshots with label non-1 for edge (v3,v5) is dis9-dis1=2.

[0125] By scanning the DEL-Table, we can obtain the R set to which each edge belongs: starting the scan from the starting timestamp t = m, and simultaneously maintaining the set up to t + max(aft). t Until ,1)-1, the edge label is not L m (e) All snapshots are N, and the edge label is not L. m (e) has the number of consecutive snapshots contN and the edge label L. m (e) The last timestamp t (denoted as lastT) that satisfies both types of relaxation constraints in the interval [m,t] is stopped by scanning if allN>(T-m+1)×δ or contN>l or all timestamps have been scanned and lastT is not stopped. e If the edge e is greater than or equal to m + k - 1, then the edge e ∈ R[m, lastT]; otherwise... h∈[m+k-1,T].

[0126] Based on the DEL-Table, the compRES procedure can compute the set R to which each edge belongs more quickly. The arrays maxIntv, scanT, and tabuT maintain the values ​​for each edge e and each label, accelerating the computation of the compRES procedure and avoiding repeated scans of the DEL-Table. maxIntv[e,L] m (e)] is used to maintain all intervals [n,h], where n≤m includes the interval [m,m+k-1], satisfying two relaxation constraints and L n (e)=L h (e); scanT[e,Lm (e)] is used to maintain the stop timestamp t after scanning the DEL-Table; tabuT[e,L m (e)] is used to maintain the interval [m + k - 1, scanT[e,L m (e)] where Lt(e) ≠ L m (e) or all timestamps t for which the interval [m, t] does not satisfy two relaxation constraints form multiple intervals (consecutive timestamps are merged into one interval), and the intervals are sorted in ascending order of timestamps. The following gives the specific process of step (3):

[0127] 1) Initialize each set R[m,i] to be an empty set.

[0128] 2) Take the first edge e from the edge set E.

[0129] 3) If m = 1, calculate the R set to which the edge e belongs by scanning the DEL-Table (represented by the function scanDEL-Table), and at the same time maintain the arrays maxIntv, scanT, and tabuT.

[0130] 4) If m ≠ 1 and L m (e) = L m-1 (e), only update the array tabuT, and determine the R set to which the edge belongs according to the arrays maxIntv and the updated tabuT.

[0131] 5) If m ≠ 1 and L m (e) ≠ L m-1 (e), the process needs to update the array tabuT and determine whether to continue scanning the DEL-Table. If so, call the function scanDELTable and start scanning the DEL-Table from the timestamp max(m, scanT[e,L m (e)]), and at the same time maintain the arrays maxIntv, scanT, and tabuT.

[0132] 6) Take the next edge e from the edge set E and go back to step 3) to continue; if all edges have been traversed, the process returns the R set and the updated arrays maxIntv, scanT, tabuT, and the process ends.

[0133] Step (5): Construct the maximum relaxed temporal motif (genMaxRTM) with the interval [m,i]

[0134] The process genMaxRTM is primarily used to calculate connected components based on the R set obtained from the process compRES. Each connected component corresponds to a maximal relaxation temporal graph schema. The process inputs the R set, the array maxIntv, tabuT, and scope, the current computation interval [m,i], and two connected component sets CC[i+1,T] and checkCC[i+1,T]. The outputs are the connected component set maxCC (used for subsequent scalability checks), CC[i,T], checkCC[i,T], and the updated array scope. The array scope is the scope defined in the third sub-problem mentioned earlier (which needs to be calculated and maintained in this process), and the connected component set CC[i,T] represents ∪ i≤T The connected components formed by the edges in R[m,i] (for convenience, the empty set is represented by CC[T+1,T]). checkCC[i+1,T] is used to maintain whether the constituent edges e in CC[i,T] that need to be checked satisfy the relaxation constraints or L. m (e)≠L i (e) is the connected component cc.

[0135] In addition, this process maintains a set tabuTS and an interval ccScope for each connected component cc, denoted as cc.tabuTS and cc.ccScope, respectively. The set tabuTS is used to determine whether an edge in the connected component belongs to the set S[m,i] for all edges e in cc, and it maintains the set tabuT[e,L]. m The interval nIntv is formed by each timestamp in the interval [m+k-1,i] in (e)], and each element in the set is denoted as a tuple.<nIntv,e> Implemented using a max-heap, with the right endpoint of `nIntv` as the key. The interval `ccScope` is used to update all edges `e` in `cc` when `scope[e]` changes. Its left endpoint is implemented using a max-heap, and its right endpoint only needs to maintain a `maxIntvl[e,L]`. m The minimum value of the right endpoint ≥ i in each interval of (e)]. The specific process of step (5) is given below:

[0136] 1) Initialize sets CC[i,T] and checkCC[i,T] to CC[i+1,T] and checkCC[i+1,T], and initialize set maxCC to empty.

[0137] 2) Take the first edge e from the set R[m,i].

[0138] 3) Determine the connectivity between edge e and each connected component in set CC[i,T].

[0139] 4) If edge e is not connected to any connected component, then create a new connected component G.s Includes edge e, maintain G s .tabuTS and G s .ccScope, add G s Enter CC[i,T] and checkCC[i,T].

[0140] 5) If edge e is connected to a connected component G s If the connection is established, add edge e to G. s In the middle, update G s .tabuTS and G s .ccScope, if G s G is not in the set checkCC[i,T], so it needs to be added. s Go to checkCC[i,T].

[0141] 6) If edge e is connected to two connected components G s and G s' Connect, and G s and G s' And edge e is merged into a new connected component G. ss' Update and maintain G ss' .tabuTS and G ss' .ccScope, and use G in CC[i,T] and checkCC[i,T] ss' Replace G s and G s' .

[0142] 7) Remove one edge e from set R[m,i] and go to step 3); if all edges have been traversed, remove the first connected component G from set checkCC[i,T]. s .

[0143] 8) Update G s .tabuTS, G s .ccScope and scope array G s The corresponding value of each edge in G is obtained using G. s .tabuTS deletes edges that do not belong to set S[m,i] (i.e., L). m (e)≠L i (e) or edges in the interval [m,i] that do not satisfy the relaxed constraints; if no edges are deleted, then remove G from the set checkCC[i,T]. s The connected components are then stored in the set maxCC. Otherwise, the connected components need to be recalculated and the newly obtained connected components are stored in the set maxCC.

[0144] 9) Remove one connected component G from the set checkCC[i,T]. sProceed to step 8) to continue; if all connected components have been traversed, the process returns the sets maxCC, CC[i,T] and checkCC[i,T] and the updated array scope, and the process ends.

[0145] Step (6): Check whether each generated maximally relaxed temporal graph motif is scalable (genNExpRTM).

[0146] The process genNExpRTM is mainly used to check whether each generated maximal relaxation temporal graph motif is scalable. The process takes as input the connected component sets maxCC and CC[i,T], the array scope, and the current computation interval [m,i], and outputs the set TF[m,i] of all maximal and non-scalable relaxation temporal graph motifs. The specific flow of step (6) is given below:

[0147] 1) Initialize the set TF[m,i] to be an empty set.

[0148] 2) Take the first connected component G from the set maxCC. s .

[0149] 3) Let G be the name of the class. s The ccScope value [l,r], if G s There exists an edge in the set R[m,i] such that l = m, G s It is not scalable. It stores the values ​​in the set TF[m,i], otherwise it uses G. s .ccScope, check G s Can it be extended to any subinterval in the interval [l,r], and will the non-extendable G be...? s Store it in the set TF[m,i].

[0150] 4) Remove one connected component G from the set maxCC. s Proceed to step 3) to continue; if all connected components have been traversed, the process returns the set TF[m,i] and the process ends.

[0151] Algorithm complexity analysis: For each left endpoint m of the interval, the total time complexity of the compRES process is O(T|E|), and the total time complexity of the genMaxRTM process is O(T|E|). m,T |)(|E m,T |For G s (∪ m+k-1≤i≤T Given the number of edges in R[m,i]), the total time complexity of the execution process genNExpRTM is O(maxI). motif T|E m,T |)(maxI motif(The maximum number of expandable intervals that need to be checked for each temporal graph motif). Therefore, the overall time complexity of the FRTM algorithm is O(T). 2 (|E|+maxI motif ·maxE m,T ))=O(maxI motif ·T 2 |E|)(maxE m,T For |E m,T | (maximum value).

[0152] In terms of space complexity, the FRTM algorithm requires O(T|E|+T) 2 ·maxE m,T The space is mainly occupied by the data structure DEL-Table and the result set TF.

[0153] Algorithm Optimization: Considering that the sets S used in the genMaxRTM process of the FRTM algorithm to construct maximally relaxed temporal graph motifs share many edges, such as sets S[m,i] and S[m-1,i], it indicates that if all edges of a maximally relaxed temporal graph motif are in sets S[m,i] and S[m-1,i], the FRTM algorithm generates a scalable maximally relaxed temporal graph motif. Furthermore, for short intervals, the edge labels of the relaxed temporal graph motif will not contain perturbations, and the FRTM algorithm does not need to check edges not belonging to set S[m,i] or recalculate connected components in the genMaxRTM process. Therefore, two optimization strategies are proposed.

[0154] Strategy 1: Common Edge Identification. For m∈[2,T-k+1], let set R + [m] contains all edges e∈R[m,i](i∈[m-k+1,T]) and L. m-1 (e)=L m (e). This strategy only requires the following modifications to the FRTM algorithm: (1) CompRES procedure: only needs to be performed in L m (e)≠L m-1 In case (e), if e∈R[m,i], add the edge e to the set R. + [m]. (2) Process genMaxRTM: Add a mark (initialized to True) to each connected component. If the edge e∈R is added to the connected component, + [m], then change the mark to False if all edges of the connected component are... Therefore, no component edge of this connected component can correspond to a non-extendable connected component. Thus, connected components marked as False are no longer added to the set checkCC. After reconstructing the connected components, it is not necessary to add all edges... The connected components are added to the set maxCC. Strategy 1 does not change the time complexity of the FRTM algorithm, but requires O(maxE) time complexity. m,T The extra space storage set R + and mark.

[0155] Strategy 2: Short Interval Processing. Let maxI be the largest integer satisfying k≤maxI<1 / δ. This strategy only requires the following modifications to the FRTM algorithm: (1) For long intervals, i.e. [m,i] (m+maxI≤i≤T), it is equivalent to executing the FRTM algorithm with k=maxI+1. (2) For short intervals, maintain a set of connected components. Instead of set C, for set Each connected component only needs to maintain `ccScope`, and each generated connected component is directly stored in the set `maxCC` (no need for the set `checkCC`). Strategy 2 does not change the time complexity of the FRTM algorithm, but it only requires a shorter time to process short intervals, and the set... It requires less space than the CC set.

[0156] 3.2.3 Incremental Calculation Method for Relaxed Temporal Network Modules

[0157] The computational problem in dynamic scenarios is defined as follows: Based on the proposed concept of relaxed temporal graph motif approximation, this invention defines the temporal graph motif mining problem as follows: Given a temporal graph G'(V,E,1,T+ΔT,L), a frequency threshold k, a proportional relaxation constraint δ, and a constant relaxation constraint c, the problem yields a maximal and non-scalable set of relaxed temporal graph motifs TF for the same frequency threshold k, proportional relaxation constraint δ, and constant relaxation constraint c. The output is a set of all maximal and non-scalable relaxed temporal graph motifs TF after the temporal graph update. + The temporal plot update is reflected in the increase of the number of snapshots from T to T+ΔT.

[0158] Example: As shown in the figure below, the temporal graph in the left figure adds 2 snapshots, and its interval becomes [1,12]. The right figure shows the newly added relaxed temporal graph motif after the temporal graph is updated.

[0159] The following describes an incremental computation method for relaxed temporal network modules. Due to its support for dynamics, the incremental computation method is more efficient than directly using the method in 3.2.2. First, we analyze two issues arising from the temporal graph update: one is analyzing which edges belong to sets R that are unaffected and which are affected, i.e., edges belong to sets R[m,T+1],…,R[m,T+ΔT] after the temporal graph update; the other is analyzing which computed temporal graph modules are unaffected by the update and which may be affected, i.e., edges of computed maximal and non-scalable temporal graph modules become scalable after the temporal graph update.

[0160] Proposition 12: Unaffected Edge: For each edge that does not satisfy the threshold c in the interval [m, T], it cannot belong to the set R[m, i], where m ∈ [1, T - k + 1] and i ∈ [T + 1, T + ΔT].

[0161] Proof 12: Assume that an edge e does not satisfy the threshold c in the interval [m, T]. Let N be the number of snapshots in the interval [m, T] where the label of edge e is different from L m (e). Regardless of the size of ΔT, for any timestamp t ∈ [T + 1, T + ΔT], edge e does not satisfy the threshold c in the interval [m, t].

[0162] It is also easy to infer from Proposition 12 that if each edge satisfies the threshold c in the interval [m, T], as long as ΔT is large enough, for any timestamp t ∈ [T + 1, T + ΔT], there may exist an interval [m, t] such that edge e satisfies two relaxation constraints and has the same label at both ends of the interval.

[0163] Proposition 13: Unaffected Temporal Graph Motif: For a relaxed temporal graph motif in the set TF, if any edge is not an affected edge, then the relaxed temporal graph motif is unaffected.

[0164] Proof 13: Assume that an edge e is not an affected edge, that is, edge e does not satisfy the threshold c in the interval [m, T]. Obviously, edge e does not satisfy the threshold c in any interval [n, h], where n < m and h ∈ [T + 1, T + ΔT]. Therefore, any relaxed temporal graph motif in the set TF that contains edge e cannot be extended to the interval [n, j], that is, it is inextensible.

[0165] It is also easy to infer from Proposition 13 that if all edges are affected edges, the relaxed temporal graph motif is affected.

[0166] Through the proof, the scopes of affected edges and affected temporal graph motifs can be obtained:

[0167] · Affected edges are defined as all edges in the interval [m, T], where m ∈ [1, T - k + 1], whose number of consecutive moments with label not L m (e) ≤ c (satisfying the constant relaxation constraint) may be affected by the temporal graph update in the R set they belong to.

[0168] · Affected temporal graph motifs are defined as those for which all edges in the calculated temporal graph motifs belong to R sets that are all affected by the update, and the temporal graph motifs will be affected by the temporal graph update.

[0169] To use affected edges and affected temporal graph motifs, the static algorithm needs to be simply modified to store some intermediate results, including: the set EIntR is used to store the affected edges that may be affected by the update and auxiliary information maxIntv[e, Lm (e), scanT[e,L m (e)] and tabuT[e,L m (e)] The set MINtR is used to store temporal graph motifs that may be affected by updates. Since the information that sets EIntR and MINtR need to store is calculated in the original static algorithm, the modification does not change the time complexity of the original static algorithm.

[0170] By analyzing the affected edges and temporal graph modules that may be affected by updates, this invention proposes a polynomial dynamic algorithm DFRTM for relaxed temporal graph modules. The overall algorithm is based on a modified static algorithm, and the flowchart is shown in the figure below.

[0171] The polynomial incremental computation method for relaxation temporal graph modulo is designed for the following application scenarios: (The last part is incomplete and likely refers to a different context.) Figure 1 For example, for Figure 1 The roads in the left figure were calculated using the polynomial static calculation method of the relaxation temporal graph modulus described above. All traffic congestion patterns for the day were calculated. Then, as the second day passed, the traffic network was updated with traffic data from 0:00 to 23:59 on the second day. At this time, it is necessary to calculate all traffic congestion patterns from the previous two days, and the frequency threshold k, proportional relaxation constraint δ, and constant relaxation constraint c are set unchanged. This requires incremental calculation of traffic congestion patterns spanning two days based on the calculation results of the first day, which is more efficient than calculating from scratch. At this time, (1) the structure of the temporal graph still represents a traffic network composed of multiple roads, but the interval represents the traffic conditions of two days (i.e., recorded once per minute for two days), and the whole represents the traffic conditions of multiple roads in two days; (2) the meaning of the frequency threshold k, proportional relaxation constraint δ, and constant relaxation constraint c is the same as in the static calculation method; (3) the output result modulus set TF represents all traffic patterns that satisfy the k, δ, and c parameter settings found from the traffic network of the two days. Overall, the polynomial incremental calculation method for the relaxation temporal graph schema is applicable to scenarios with dynamic data updates, such as traffic network where road conditions are collected and updated over time, and has practical significance. This method also requires inputs of a proportional relaxation constraint δ and a constant relaxation constraint c, and targets the same application scenarios as the polynomial static calculation method for the relaxation temporal graph schema.

[0172] Specifically, the calculation process consists of the following steps:

[0173] (1) Read the updated temporal graph G[1,T+ΔT], frequent threshold k, proportional relaxation constraint δ, constant relaxation constraint c, intermediate result set EIntR and MIntR, and calculated motif set TF.

[0174] (2) Initialize the left endpoint m of the current calculation interval to 1.

[0175] (3) When the left endpoint m of the current calculation interval is not greater than T-k+1, the algorithm filters out edges from the input set EIntR that cannot be used to form temporal graph modules with intervals of [m,T+1],…,[m,T+ΔT] based on whether the two relaxation constraints are satisfied in the interval (process compRES). The edges that are not filtered out are stored in multiple edge sets (i.e., sets R[m,T+1],…,R[m,T+ΔT]) according to the largest interval that can satisfy the relaxation constraints. Since only the edges stored in set EIntR are processed instead of all edges of the temporal graph, and only temporal graph modules with intervals of [m,T+1],…,[m,T+ΔT] are considered instead of all intervals, redundant calculations are reduced; otherwise, the process compRES in the static algorithm FRTM is called.

[0176] (4) Initialize the right endpoint i of the current calculation interval i = T + ΔT.

[0177] (5) Call the processes genMaxRTM and genNExpRTM in the static algorithm FRTM to save the extremely large and non-expandable relaxed temporal modal to the final result TF[m,i].

[0178] (6) Determine if the right endpoint i of the interval is greater than T. If it is, decrease the right endpoint i of the interval by 1 and go to step (5) to continue.

[0179] (7) Check all temporal plot motifs with left endpoint m in the set MINTR. If a temporal plot motif is expandable, it means that the temporal plot motif is affected after the temporal plot is updated, and the temporal plot motif needs to be deleted from the result TF. Increase the left endpoint m of the interval by 1, and check whether the row number m is greater than T-k+1. If not, go to step (3) to continue; otherwise, output the updated final result motif set TF, and the process ends.

[0180] Compared with the static method, the incremental calculation method of the present invention has the following characteristics: 1) In step (3), the selection of edges from edge set E is changed to selection from edge set EIntR, which minimizes the calculation range and avoids redundant calculations; 2) When the left endpoint m of the interval is not greater than T-k+1, only the relaxed temporal module of the interval [m,j] (T≤j≤T+ΔT) is calculated, and the relaxed temporal modules of other intervals have been calculated and do not need to be calculated repeatedly; 3) Only when the left endpoint m of the interval is greater than T-k+1, the incremental calculation method is the same as the static method. In summary, the incremental calculation method has an efficiency advantage.

[0181] While some embodiments of this disclosure have been shown and described, those skilled in the art will understand that modifications may be made to these embodiments without departing from the principles and spirit of this disclosure, which are defined by the claims and their equivalents.

Claims

1. A polynomial static calculation method for a relaxation temporal graph model, characterized in that, include: The relaxed temporal graph module satisfies: (1) it is a connected temporal subgraph (2) Opposite side In the interval That is, the labels in the frequent integer threshold satisfy... And satisfies the proportional relaxation constraint. and constant relaxation constraints ; Step 1: Read the temporal graph representing the traffic network consisting of multiple roads. This indicates searching within the transportation network for a duration of at least [duration missing]. Frequency threshold of traffic congestion patterns Proportional relaxation constraints and constant relaxation constraints The temporal diagram Each edge in the graph represents a road monitored by sensors, which label traffic conditions as "congested" or "uncongested"; the scale relaxation constraint of the relaxation temporal graph modulus is also included. This ensures that road condition label mismatch on each edge of the traffic congestion pattern occurs only within a finite time period, thanks to constant relaxation constraints. This ensures that the mismatch in road condition labels on each side of the traffic congestion mode only lasts for a limited time. Step 2: Initialize the left endpoint of the currently calculated interval as... Calculate according to the left endpoint of the interval in ascending order; Step 3: Determine whether the proportional relaxation constraint is satisfied within the interval. and constant relaxation constraints Edges that cannot be used to form the relaxed temporal graph module are filtered out from edge set E. The unfiltered edges are stored in multiple edge sets according to the maximum interval that can satisfy the relaxation constraints. In this context, each set of edges corresponds to a range; Step 4: Initialize the right endpoint of the currently calculated interval as... Calculate according to the right endpoints of the interval from largest to smallest; Step 5: For each interval, use the edge set obtained in Step 3 to construct a connected component for each interval based on connectivity. Then, temporarily delete edges in the connected components that do not satisfy the two relaxation constraints, recalculate the connected components, and each connected component corresponds to a maximal relaxation temporal graph modulus. The interval is then constructed as follows: The maximum relaxation temporal modulus; Step 6: Check whether each generated maximal temporal graph motif is scalable. The check range is limited by the interval corresponding to the set to which each edge belongs. Save the left-hand non-scalable relaxed temporal motif from Step 5 to the final result. middle; Step 7: Determine the right endpoint of the interval Is it greater than If so, Reduce by 1, proceed to step 5; Step 8: Determine the left endpoint of the interval Is it less than If so, If the increment is 1, proceed to step 3; otherwise, output the traffic patterns that finally meet the requirements as the result module set. The output result set of motifs This represents all the satisfactions found from the transportation network. , and Traffic mode settings, including duration of continuous congestion. The area comprises multiple roads within minutes, and the duration of congestion is limited, with some roads allowed to experience periods of smooth traffic flow not exceeding [a certain timeframe]. The percentage of total time with smooth traffic does not exceed .

2. The polynomial static calculation method for a relaxation temporal graph model as described in claim 1, characterized in that, The specific method for filtering out edges from the edge set E that cannot be used to form the relaxation temporal graph module in step 3 is as follows: based on a The table structure is implemented using DEL-Table, which is divided into two parts. The first part records each edge. Information about edge labels for timestamp t. Representing an edge The label at timestamp t Representing an edge The label is not in the interval [1, t]. The number of snapshots is used to speed up the calculation of intervals. Middle The tag is not The number of snapshots, if , interval Middle The tag is not The number of snapshots is The second part records each edge. For the last timestamp of each tag, use express; The specific process is as follows: 1) Initialize each collection It is an empty set; 2) From the edge set Take the first edge ; 3) If The edges of the DEL-Table are calculated by calling the scanDEL-Table function. Belonging to The set maintains arrays maxIntv, scanT, and tabuT simultaneously; 4) If and We only need to update the array tabuT, and determine the edge's origin based on the array maxIntv and the updated tabuT. gather; 5) If and The process requires updating the `tabuT` array and determining whether to continue scanning the `DEL-Table`; if so, the function `scanDELTable` is called to retrieve the data from the timestamp. Start scanning the DEL-Table, while maintaining arrays maxIntv, scanT, and tabuT; 6) From edge set Take one edge from the middle Proceed to step 3) to continue; if all edges have been traversed, return to the previous step. The process ends with the collection and updated arrays maxIntv, scanT, and tabuT.

3. The polynomial static calculation method for a relaxation temporal graph model as described in claim 2, characterized in that, Each connected component in step 5 corresponds to a maximal relaxation temporal graph motif construction interval. The specific method for obtaining the maximally relaxed temporal motif is as follows: 1) Initialize collection CC and checkCC For CC and checkCC Initialize the set maxCC to empty; 2) From the set Take the first edge ; 3) Determine the edges With set CC The connectivity of each connected component in the equation; 4) If the edge If it is not connected to any other connected component, then create a new connected component. Includes edges ,maintain .tabuTS and .ccScope, add To CC and checkCC middle; 5) If the edge With a connected component If connected, then the edges will be connected. Add to In progress, updates .tabuTS and .ccScope, if Not in the set checkCC In, it is necessary to add To checkCC middle; 6) If the edge With two connected components and Connect, will and and the edge Merge into a new connected component Update and maintenance .tabuTS and .ccScope, and in CC and checkCC Chinese replace and ; 7) From the set Take one edge from the middle Proceed to step 3); if all edges have been traversed, proceed from set checkCC. Take the first connected component ; 8) Update .tabuTS, .ccScope and the scope array The corresponding value of each edge in the middle, using .tabuTS deletes items that do not belong to the set The edge, that is Or in the range Edges that do not satisfy the relaxation constraints are removed from the set checkCC if no edges are deleted. Delete And store it in the set maxCC; otherwise, the connected components need to be recalculated and the newly obtained connected components stored in the set maxCC. 9) From the set checkCC Take one connected component from the middle Proceed to step 8); if all connected components have been traversed, the process returns sets maxCC and CC. and checkCC With the updated array `scope`, the process ends.

4. The polynomial static calculation method for a relaxation temporal graph model as described in claim 3, characterized in that, The specific method for checking whether each generated maximal temporal graph phantom is scalable in step 6 is as follows: 1) Initialize the collection It is an empty set; 2) Take the first connected component from the set maxCC. ; 3) Record ccScope value ,if There is an edge in the set And , It is not extensible and is stored in a collection. Otherwise use .ccScope, check Can it be extended to an interval? Any subinterval in the array will not be expandable. Store in collection ; 4) Take one connected component from the set maxCC. Proceed to step 3); if all connected components have been traversed, the process returns a set. The process is over.

5. A method for calculating the polynomial increment of a relaxation temporal graph model, wherein the calculation is performed using the calculation method described in any one of claims 1-4, characterized in that, include: Step 1: Read the updated temporal graph representing the traffic network consisting of multiple roads. This indicates searching within the transportation network for a duration of at least [duration missing]. Frequency threshold of traffic congestion patterns Proportional relaxation constraints Constant relaxation constraints The intermediate result sets EIntR and MIntR, and the calculated set of traffic pattern phantoms that meet the requirements. ; Step 2: Initialize the left endpoint of the current calculation interval ; Step 3: The left endpoint m of the current calculation interval is not greater than... At that time, based on whether the two relaxation constraints are satisfied in the interval, filters out those that cannot be used to form the interval from the input set EIntR. The edges of the temporal graph modulus are used to store unfiltered edges in multiple edge sets based on the maximum interval that can satisfy the relaxation constraints. It only processes the edges stored in the set EIntR, not all edges in the temporal graph, and only considers intervals of 0. The temporal graph module is selected from all intervals, not all intervals; otherwise, the process of filtering out edges from the edge set E that cannot be used to form the relaxed temporal graph module is adopted. Step 4: Initialize the right endpoint of the current calculation interval ; Step 5: Using a maximal relaxation temporal graph phantom corresponding to each connected component, construct the interval as follows: The process of generating maximal relaxation temporal motifs and checking whether each generated maximal temporal graph motif is scalable, saving maximal and non-scalable relaxation temporal motifs to the final result. middle; Step 6: Determine the right endpoint of the interval Is it greater than ; If so, the right endpoint of the interval Decrease by 1, then proceed to step 5. Step 7: Examine all temporal plot phantoms in the set MINTR with left endpoint m. If a temporal plot phantom is expandable, it means that the temporal plot phantom is affected after the temporal plot is updated, and it needs to be examined from the results. Delete the temporal diagram modifier; change the left endpoint of the interval. Increase by 1, then check the row number. Is it greater than ; If not, proceed to step 3. Otherwise, output the updated set of traffic pattern result modalities that finally meet the requirements. The process is over.

Citation Information

Patent Citations

  • Temporal network motif calculation method and system supporting incremental updating

    CN113849947A

  • Short-time community search method based on time span optimization

    WO2022236760A1