Frequency time sequence subgraph approximate mining method based on 2-edge time sequence subgraph relation graph

By constructing a 2-edge timing subgraph relationship diagram model and sampling to generate timing subgraph candidate sets, the problems of high complexity and low efficiency in frequent timing subgraph mining in timing charts are solved, and efficient timing subgraph mining is achieved.

CN119903481APending Publication Date: 2025-04-29CHANGSHA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411988577.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

The mining of timing charts faces huge challenges, including huge and complex search space, diverse types of timing sub-graphs, frequency calculation of NP-difficulty problems, and low computing efficiency problems.

Method used

By constructing a 2-edge timing subgraph relationship diagram model, sampling and generating timing subgraph candidate sets, calculating the type of each timing subgraph and its support degree, and outputting frequent timing subgraphs through support degree threshold or sorting until a frequent timing subgraph of a given edge number is generated.

Benefits of technology

It significantly reduces the search space of the timing subgraph, reduces the computational complexity, improves the efficiency of frequent timing subgraph mining, and solves the problem of low computing efficiency during frequent timing subgraph mining in the timing map.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119903481A_ABST
    Figure CN119903481A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a frequent time sequence subgraph approximate mining method based on a 2-edge time sequence subgraph relation graph, which belongs to the technical field of data processing, and specifically comprises the following steps of: 1, mining all 2-edge time sequence subgraphs on a time sequence graph G, and constructing the 2-edge time sequence subgraph relation graph according to the 2-edge time sequence subgraphs; 2, sampling according to the 2-edge time sequence sub-graph relation graph to generate a time sequence sub-graph candidate set; 3, calculating the type and the support degree of each time sequence sub-graph in the time sequence sub-graph candidate set; 4, judging whether the edge number l in the time sequence sub-graph candidate set is equal to the edge number L of a given frequent time sequence sub-graph, if so, outputting the frequent time sequence sub-graph according to a support degree threshold value, or outputting top-k frequent time sequence sub-graphs from high to low according to the support degree, if not, adding 1 to l, repeating the steps 2, 3 and 4, expanding to generate a new l-edge time sequence sub-graph candidate set, and if not, adding 1 to the edge number l; and the L-side frequent time sequence sub-graph is generated. Through the scheme of the invention, the calculation complexity is reduced, and the mining efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed embodiments relate to the field of data processing technology, and in particular to a frequent temporal subgraph approximation mining method based on a 2-edge temporal subgraph relationship graph. Background Art

[0002] A time-series graph is a multilateral network that contains important time information and can describe the dynamics of relationships that change over time. With the growth of various types of data such as social big data, communication big data, financial big data, and medical big data, research on mining time-series subgraphs has become a research hotspot in the field of data science in recent years. Frequent time-series subgraph mining research has broad application prospects, such as graph representation learning, time-aware recommendation systems, link prediction, monitoring network event evolution, monitoring traffic conditions, mining illegal transactions, and other fields.

[0003] However, mining time-series graphs faces huge challenges. First, as a large-scale and complex multi-edge graph, there can be multiple different time-series edges between the same pair of nodes, and there can be many different time-series subgraph patterns between the same node set, which leads to a large and complex search space, increased difficulty in mining frequent time-series subgraphs, and high computational complexity. Second, time-series subgraphs not only consider simple topological structures, but also consider the direction, sequence, and generation time of time-series edges. Therefore, there are many types of time-series subgraphs and scattered samples. For example, there are 32 different types of time-series subgraphs composed of 3 nodes. This makes it more difficult to calculate the frequency of time-series subgraphs. It has been proven that calculating the frequency of a single time-series k-star subgraph is an NP-hard problem. In addition, the prior properties are destroyed by the multilateral nature of the time-series graph, that is, there is no phenomenon that the frequency of the time-series subgraph decreases monotonically with the increase of time-series edges, which leads to the inability to prune according to the prior properties during the time-series subgraph mining process, resulting in a large number of invalid time-series subgraph candidate subsets, which greatly increases the model calculation amount and greatly reduces the efficiency.

[0004] In recent years, some works have proposed frequent temporal subgraph mining algorithms based on static graphs, that is, by converting the temporal graph into a static graph, enumerating the subgraphs in the static graph, and then restoring it to the dynamic network space to obtain the frequent temporal subgraph mining results. However, this method generates a large number of invalid subgraphs during the mining process, resulting in high computational complexity and low efficiency.

[0005] It can be seen that there is an urgent need for an approximate frequent temporal subgraph mining method based on a 2-edge temporal subgraph relationship graph that has low complexity, can efficiently reduce the search space, and effectively mine frequent temporal subgraphs. Summary of the invention

[0006] In view of this, an embodiment of the present disclosure provides a frequent temporal subgraph approximate mining method based on a 2-edge temporal subgraph relationship graph, which at least partially solves the problems of high complexity and poor mining efficiency in the prior art.

[0007] The embodiment of the present disclosure provides a frequent temporal subgraph approximation mining method based on a 2-edge temporal subgraph relationship graph, comprising:

[0008] Step 1, mining all 2-edge temporal subgraphs on the temporal graph G = (V, E), where V is the node set in the temporal graph, E is the temporal edge set in the temporal graph, and constructing a 2-edge temporal subgraph relationship graph based on this;

[0009] Step 2: Based on the 2-edge temporal subgraph relationship graph, sample and generate the temporal subgraph candidate set C (l) , where l represents the number of temporal subgraph edges in the temporal subgraph candidate set, the initial value of l is 3 and l≥3;

[0010] Step 3, calculating the type and support of each temporal subgraph in the temporal subgraph candidate set;

[0011] Step 4, determine whether the number of edges l in the temporal subgraph candidate set is equal to the given number of edges L of the frequent temporal subgraph. If so, output the frequent temporal subgraph according to the given support threshold, or sort the temporal subgraphs from high to low according to the support, and output the top-k frequent temporal subgraphs. If not, first add 1 to l and repeat steps 2, 3, and 4, combine the currently generated temporal subgraph candidate set with the 2-edge temporal subgraph relationship graph, and expand to generate a new l-edge temporal subgraph candidate set until an L-edge frequent temporal subgraph is generated.

[0012] According to a specific implementation of the embodiment of the present disclosure, step 1 specifically includes:

[0013] Step 1.1, given a timing graph G = (V, E), initialize the 2-edge timing subgraph relationship graph G (2) =(C,R) in which the node set C is an empty set and the edge set R of the relationship graph is an empty set;

[0014] Step 1.2, for each timing edge e in the timing graph i =(u i , v i , t i ), where e i is from node u i To node v i With timestamp t i Directed time-series edges, search for e i Adjacent in the time window [t i ,t i +δ]] in the set of all temporal edges C(e i )={e j |e j =(u j , v j , t j ),tj ∈[t i ,t i +δ]}δ is the preset time interval threshold, and each pair of adjacent two edges e i and e j Form a 2-edge sequential subgraph M 2 =(e i ,e j ), and use it as a 2-edge sequential subgraph relationship graph G (2) A node is added to the relationship graph node set C;

[0015] Step 1.3, for any two 2-edge sequential subgraphs M 2 =(e i ,e j ) and M′ 2 =(e j ,e d ), if they share a temporal edge e j , and the time order satisfies t(e i ) <t(e d ), then add a directed edge to the relationship graph <M 2 ,M′ 2 > and added to the edge set R of the relationship graph;

[0016] Step 1.4: Form a 2-edge temporal subgraph relationship graph G based on the node set and the directed edge set (2) .

[0017] According to a specific implementation of the embodiment of the present disclosure, step 2 specifically includes:

[0018] Step 2.1: Set the current temporal subgraph candidate set C (l-1) Each subgraph in l-2 Perform random uniform sampling. If l = 3 at this time, then the candidate set of temporal subgraph C (l-1) is a 2-edge sequential subgraph relationship graph G (2) The middle node set, get the sampling node M l-1 =(e 1 ,e 2 ,…,e l-1 );

[0019] Step 2.2, in the 2-edge sequential subgraph relationship graph G (2) Find the sampling node M on l-1 Middle picture (e l-2 ,e l-1 )'s outgoing adjacent node set C(M l-1 )

[0020] C(M l-1 )={(el-1 ,e l )|<(e l-2 ,e l-1 ),(e l-1 ,e l )>∈R};

[0021] Step 2.3, set C(M l-1 ) in any node (e l-1 ,e l ) and M l-1 Combine to generate l-edge sequential subgraph

[0022] M l =(e 1 ,e 2 ,…,e l-1 ,e l );

[0023] Step 2.4, in G (2) Find M on l-1 Middle picture (e 1 ,e 2 )'s inbound adjacent node set C(M l-1 )′

[0024] C(M l-1 )′={(e 0 ,e 1 )|<(e 0 ,e 1 ),(e 1 ,e 2 )>∈R};

[0025] Step 2.5, set C(M l-1 )′ in any node (e 0 ,e 1 ) and M l-1 Combine to generate an l-edge sequential subgraph:

[0026] M l =(e 0 ,e 1 ,e 2 ,…,e l-1 );

[0027] Step 2.6: Repeat steps 2.1 to 2.5 to generate a candidate set C of temporal subgraphs. (l) .

[0028] According to a specific implementation of the embodiment of the present disclosure, step 3 specifically includes:

[0029] Each time a new l-edge temporal subgraph instance is generated, isomorphism detection is used to determine whether it already exists in the temporal subgraph candidate set, and the frequency and support of each temporal subgraph type are calculated.

[0030] According to a specific implementation of the embodiment of the present disclosure, the step of calculating the frequency of each time series subgraph type includes:

[0031] Perform isomorphism detection on the generated sequential subgraph to determine whether the structure of the sequential subgraph already exists:

[0032]

[0033] in, is the i-th L-edge sequential subgraph type, M L is an L-edge sequential subgraph instance, is the frequency of the i-th L-edge sequential subgraph type;

[0034] If the time-series subgraph is a new structure, it is taken as a new time-series subgraph type and its frequency is initialized to 1;

[0035] If the time series subgraph is of an existing type, update the frequency of the type and add 1 to it.

[0036] According to a specific implementation method of the embodiment of the present disclosure, the expression of the support degree is:

[0037]

[0038] in, is the frequency of the i-th L-edge sequential subgraph type, p j , j=1,...L-2, is the sampling rate of the timing subgraph in step 2.1, and Z is the total number of L-edge timing subgraph types.

[0039] The frequent temporal subgraph approximate mining scheme based on the 2-edge temporal subgraph relationship graph in the embodiment of the present disclosure includes: step 1, mining all 2-edge temporal subgraphs on the temporal graph G = (V, E), where V is a node set in the temporal graph, E is a temporal edge set in the temporal graph, and constructing a 2-edge temporal subgraph relationship graph based on the 2-edge temporal subgraph relationship graph; step 2, sampling and generating a temporal subgraph candidate set C according to the 2-edge temporal subgraph relationship graph (l), where l represents the number of temporal subgraph edges in the temporal subgraph candidate set, the initial value of l is 3 and l≥3; step 3, calculate the type and support of each temporal subgraph in the temporal subgraph candidate set; step 4, determine whether the number of edges l in the temporal subgraph candidate set is equal to the given number of edges L of the frequent temporal subgraph. If so, output the frequent temporal subgraph according to the given support threshold, or sort the temporal subgraphs from high to low according to the support, and output the top-k frequent temporal subgraphs. If not, first add 1 to l and repeat steps 2, 3, and 4, combine the currently generated temporal subgraph candidate set with the 2-edge temporal subgraph relationship graph, and expand to generate a new l-edge temporal subgraph candidate set until an L-edge frequent temporal subgraph is generated.

[0040] The beneficial effects of the embodiments of the present disclosure are as follows: through the solution of the present disclosure, by constructing a 2-edge sequential subgraph relationship graph model, the structure and dependency relationship in the sequential graph are successfully simplified, and the search space of the sequential subgraph is significantly reduced. This not only reduces the computational complexity of mining frequent sequential subgraphs in large-scale sequential graphs, but also effectively solves the problem of low computational efficiency in the mining process of frequent sequential subgraphs in sequential graphs. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0042] Figure 1 A schematic diagram of a process flow of a frequent temporal subgraph approximate mining method based on a 2-edge temporal subgraph relationship graph provided in an embodiment of the present disclosure;

[0043] Figure 2 A schematic diagram of a specific implementation process of a frequent temporal subgraph approximate mining method based on a 2-edge temporal subgraph relationship graph provided in an embodiment of the present disclosure;

[0044] Figure 3 A model diagram of a sampling algorithm for mining frequent time-series subgraphs provided by an embodiment of the present disclosure, wherein (a) is a time-series graph G, and (b) is a 2-edge time-series subgraph relationship graph;

[0045] Figure 4 A method based on G provided in the embodiment of the present disclosure (2) Take sampling C as an example 2 Finally, a 4-edge timing subgraph flow chart is generated. DETAILED DESCRIPTION

[0046] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0047] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0048] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0049] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0050] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0051] The embodiment of the present disclosure provides a method for approximate mining of frequent temporal subgraphs based on a 2-edge temporal subgraph relationship graph, and the method can be applied to a temporal subgraph mining process in a temporal graph scenario.

[0052] See also Figure 1 , is a flow chart of a frequent temporal subgraph approximate mining method based on a 2-edge temporal subgraph relationship graph provided by an embodiment of the present disclosure. Figure 1 and Figure 2 As shown, the method mainly comprises the following steps:

[0053] Step 1, mining all 2-edge temporal subgraphs on the temporal graph G = (V, E), where V is the node set in the temporal graph, E is the temporal edge set in the temporal graph, and constructing a 2-edge temporal subgraph relationship graph based on this;

[0054] Furthermore, the step 1 specifically includes:

[0055] Step 1.1, given a timing graph G = (V, E), initialize the 2-edge timing subgraph relationship graph G (2) =(C,R) in which the node set C is an empty set and the edge set R of the relationship graph is an empty set;

[0056] Step 1.2, for each timing edge e in the timing graph i =(u i , v i , t i ), where e i is from node u i To node v i With timestamp t i Directed time-series edges, search for e i Adjacent in the time window [t i ,t i +δ]] in the set of all temporal edges C(e i )={e j |e j =(u j , v j , t j ),t j ∈[t i ,t i +δ]}δ is the preset time interval threshold, and each pair of adjacent two edges e i and e j Form a 2-edge sequential subgraph M 2 =(e i ,e j ), and use it as a 2-edge sequential subgraph relationship graph G (2) A node is added to the relationship graph node set C;

[0057] Step 1.3, for any two 2-edge sequential subgraphs M 2 =(e i ,e j ) and M′ 2 =(e j ,e d ), if they share a temporal edge e j , and the time order satisfies t(e i ) <t(e d ), then add a directed edge to the relationship graph <M 2 ,M′2 > and added to the edge set R of the relationship graph;

[0058] Step 1.4: Form a 2-edge temporal subgraph relationship graph G based on the node set and the directed edge set (2) .

[0059] The definitions of relevant terms in this article are as follows:

[0060] 1. Timing graph: A timing graph G = (V, E) contains a set V of n vertices and a sequence E of m timing edges. Each timing edge e = (u, v, t) is a directed edge from u to v with a timestamp t, where u, v∈V, t∈R+.

[0061] 2. Timing-related edges: If two timing edges e i =(u i , v i , t i ) and e j =(u j , v j , t j ) adjacent, that is And |t i -t j |≤δ, then they are time-dependent.

[0062] 3. Timing subgraph: A timing subgraph M = (V M , E M ) consists of a connected graph with h vertices and a set of q edges E M ={e 1 , ..., e i ,e j , ..., e q}, where any two adjacent timing edges e i =(u i , v i , t i ) and e i =(u j , v j , t j ) are all time-dependent, i.e. |t i -t i |≤δ.

[0063] 4. Sequential subgraph isomorphism: If there exists a mapping f:E M1 →E M2 , so that

[0064] (1) If (u, v, t)∈E M1 , then f(u,v,t)∈EM2 ;

[0065] (2) If e i ,e j ∈E M1 And e i <e j , then f(e i ) <f(e j ), then the timing subgraph M 1 =(V M1 ,E M1 ) and M 2 =(V M1 ,E M2 ) isomorphic.

[0066] 5. Frequent time-series subgraph mining: Given a time-series graph G and a minimum support threshold τ, if a certain time-series subgraph in G Its support but is a frequent temporal subgraph.

[0067] 6. Adjacent node set: The adjacent node set C(M L ) for each node M′ L All G (2) A 2-edge sequential subgraph in C(M L )={M′ L =(e i ,e j )|(M L ,M′ L )∈R},C(M L )∈G (2) , so each time subgraph M L (L>2) are all G (2) The node combination in is generated.

[0068] In the specific implementation, construct a 2-edge sequential subgraph relationship graph G (2) The process is as follows:

[0069] First, given a timing graph G = (V, E), G is a timing graph as the original graph, and the 2-edge timing subgraph relationship graph G is initialized according to the definition of the timing subgraph (2) =(C,R), where C represents the set of nodes in the relationship graph, and R represents the set of directed edges in the relationship graph.

[0070] Generate relationship graph G (2) Node: For each time-series edge e in the time-series graph i =(u i , v i , t i ), search and ei Adjacent in the time window [t i ,t i +δ]] in the set of all temporal edges C(e i )={e j |e j =(u j , v j , t j ),t j ∈[t i ,t i +δ]}. Each pair of adjacent 2 edges e i and e j Form a 2-edge sequential subgraph M 2 =(e i ,e j ), and use it as a 2-edge sequential subgraph relationship graph G (2) A node of .

[0071] Construct the edge set of the relationship graph: For any two 2-edge sequential subgraphs M 2 =(e i ,e j ) and M′ 2 =(e j ,e d ), if they share a temporal edge e j , and the time order satisfies t(e i ) <t(e d ), then add a directed edge to the relationship graph <M 2 ,M′ 2 >

[0072] Then, a 2-edge temporal subgraph relationship graph G is formed based on the node set and the directed edge set. (2) .

[0073] Step 2: Based on the 2-edge temporal subgraph relationship graph, sample and generate the temporal subgraph candidate set C (l) , where l represents the number of temporal subgraph edges in the temporal subgraph candidate set, the initial value of l is 3 and l≥3;

[0074] Based on the above embodiment, step 2 specifically includes:

[0075] Step 2.1: Set the current temporal subgraph candidate set C (l-1) Each subgraph in l-2 Perform random uniform sampling. If l = 3 at this time, then the candidate set of temporal subgraph C (l-1) is a 2-edge sequential subgraph relationship graph G (2) The middle node set, get the sampling node M l-1 =(e 1 ,e2 ,…,e l-1 );

[0076] Step 2.2, in the 2-edge sequential subgraph relationship graph G (2) Find the sampling node M on l-1 Middle picture (e l-2 ,e l-1 )'s outgoing adjacent node set C(M l-1 )

[0077] C(M l-1 )={(e l-1 ,e l )|<(e l-1 ,e l ),(e l-2 ,e l-1 )>∈R};

[0078] Step 2.3, set C(M l-1 ) in any node (e l-1 ,e l ) and M l-1 Combine to generate l-edge sequential subgraph

[0079] M l =(e 1 ,e 2 ,…,e l-1 ,e l );

[0080] Step 2.4, in G (2) Find M on l-1 Middle picture (e 1 ,e 2 )'s inbound adjacent node set C(M l )′

[0081] C(M l-1 )′={(e 0 ,e 1 )|<(e 0 ,e 1 ),(e 1 ,e 2 )>∈R};

[0082] Step 2.5, set C(M l-1 )′ in any node (e 0 ,e 1 ) and M l-1 Combine to generate an l-edge sequential subgraph:

[0083] M l =(e 0 ,e 1 ,e2 ,…,e l-1 );

[0084] Step 2.6: Repeat steps 2.1 to 2.5 to generate a candidate set C of temporal subgraphs. (l) .

[0085] In specific implementation, the process of node sampling to generate a candidate set of temporal subgraphs is as follows:

[0086] The 2-edge temporal subgraph relationship graph G constructed in step 1 (2) On the basis of probability p 1 Sample nodes and gradually generate candidate sets of temporal subgraphs containing more edges. The specific process is as follows:

[0087] Node sampling: For each node in the relationship graph, 1 Perform random uniform sampling.

[0088] Generate a candidate set of 3-edge temporal subgraphs: For the sampled node M 2 =(e i ,e j ), perform the following steps:

[0089] In G (2) Find M on 2 The outgoing adjacent node set C(M 2 ),in:

[0090] C(M 2 )={(e j ,e d )|<(e i ,e j ),(e j ,e d )>∈R}

[0091] The set C(M 2 ) in any node (e j ,e d ) and M 2 Combine to generate a 3-edge sequential subgraph:

[0092] M 3 =(e i ,e j ,e d ).

[0093] In G (2) Find M on 2 The incoming adjacent node set C(M 2 )',in:

[0094] C(M 2 )′={(eg ,e i )|<(e g ,e i ),(e i ,e j )>∈R}

[0095] The set C(M 2 )′ any node (e g ,e i ) and M 2 Combine to generate a 3-edge sequential subgraph:

[0096] M 3 =(e g ,e i ,e j ).

[0097] Put all generated 3-edge sequential subgraphs into set C (3) In order to facilitate the subsequent generation of a 4-edge timing subgraph.

[0098] Step 3, calculating the type and support of each temporal subgraph in the temporal subgraph candidate set;

[0099] Based on the above embodiment, step 3 specifically includes:

[0100] Each time a new l-edge temporal subgraph instance is generated, isomorphism detection is used to determine whether it already exists in the temporal subgraph candidate set, and the frequency and support of each temporal subgraph type are calculated.

[0101] Furthermore, the step of calculating the frequency of each time series subgraph type includes:

[0102] Perform isomorphism detection on the generated sequential subgraph to determine whether the structure of the sequential subgraph already exists:

[0103]

[0104] in, is the i-th L-edge sequential subgraph type, M L is an L-edge sequential subgraph instance, is the frequency of the i-th L-edge sequential subgraph type;

[0105] If the time-series subgraph is a new structure, it is taken as a new time-series subgraph type and its frequency is initialized to 1;

[0106] If the time series subgraph is of an existing type, update the frequency of the type and add 1 to it.

[0107] Furthermore, the expression of the support is:

[0108]

[0109] in, is the frequency of the i-th L-edge sequential subgraph type, p j , j=1,...L-2, is the sampling rate of the timing subgraph in step 2.1, and Z is the total number of L-edge timing subgraph types.

[0110] In the specific implementation, in order to analyze the frequency of the time-series subgraph, it is necessary to perform isomorphism detection and frequency calculation on the generated subgraph. Taking the 3-edge time-series subgraph as an example, the specific process is as follows:

[0111] Isomorphism detection: After each new instance is generated, an isomorphism detection is performed to determine whether the subgraph already exists in the candidate set. The purpose of isomorphism detection is to identify temporal subgraphs with different nodes but the same structure and temporal edge order in the original network. The steps of isomorphism detection include:

[0112] Encoding: Encode different nodes in the 3-edge sequential subgraph in the order of appearance from 0, 1, 2, ....

[0113] Matching: For any 3-edge sequential subgraph type, set a 6-tuple to record the nodes on each edge in chronological order. When a new 3-edge sequential subgraph instance is generated, also set a 6-tuple and match it with the sequential subgraph type. When the two tuples are equal, it means that the match is successful and the new instance belongs to the sequential subgraph type.

[0114] Frequency update: For each newly generated 3-edge sequential subgraph M 3 , calculate its frequency of occurrence. If the time series subgraph M 3 After structural matching with a certain timing sub-graph type If the subgraph type is isomorphic, the frequency of this subgraph type is increased by 1, otherwise it is treated as a new time series subgraph type. And initialize its frequency to 1. The frequency calculation formula is:

[0115]

[0116] Support calculation: Based on the frequency of the subgraph, estimate its support in the entire time series graph. The support calculation formula is:

[0117]

[0118] where p 1 For M 2 The probability of sampling, is the frequency of the 3-edge sequential subgraph type of the i-th type. Because each sequential subgraph instance has two ways of generation (combining incoming adjacent nodes and outgoing adjacent nodes), the same sequential subgraph will be generated twice, so each calculation must be divided by 2.

[0119] Step 4, determine whether the number of edges l in the temporal subgraph candidate set is equal to the given number of edges L of the frequent temporal subgraph. If so, output the frequent temporal subgraph according to the given support threshold, or sort the temporal subgraphs from high to low according to the support, and output the top-k frequent temporal subgraphs. If not, first add 1 to l and repeat steps 2, 3, and 4, combine the currently generated temporal subgraph candidate set with the 2-edge temporal subgraph relationship graph, and expand to generate a new l-edge temporal subgraph candidate set until an L-edge frequent temporal subgraph is generated.

[0120] In specific implementation, after obtaining the temporal subgraph candidate set, it is necessary to first determine whether the number of temporal subgraph edges in the temporal subgraph candidate set meets the given frequent temporal subgraph edge number L. For example, determine whether the number of temporal subgraph edges in the temporal subgraph candidate set meets the preset number L. If so, then filter out L-edge temporal subgraphs with a support greater than τ according to a preset support threshold τ, or sort the L-edge temporal subgraph types from high to low according to the support, and finally select the top k L-edge temporal subgraphs with the highest support as the result output. If not, then add 1 to l and return to step 2, and the currently generated temporal subgraph candidate set C is generated. (l) Combine the 2-edge temporal subgraph relationship graph with new probability sampling to generate a new temporal subgraph candidate set until it meets the preset conditions.

[0121] The frequent temporal subgraph approximate mining method based on the 2-edge temporal subgraph relationship graph provided in this embodiment successfully simplifies the structure and dependency relationship in the temporal graph by constructing a 2-edge temporal subgraph relationship graph model, and significantly reduces the search space of the temporal subgraph. This not only reduces the computational complexity of frequent subgraph mining in large-scale temporal graphs, but also effectively solves the problem of low computational efficiency in the process of frequent subgraph mining in temporal graphs.

[0122] Beneficial effects include: 1. Efficient temporal subgraph mining: By introducing a 2-edge temporal subgraph relationship graph model, frequent temporal subgraphs can be quickly located, the generation of invalid candidate subgraphs is reduced, and the efficiency of frequent temporal subgraph mining is improved.

[0123] 2. Support for multi-edge temporal subgraphs: The present invention can not only mine complex temporal subgraphs with L (L>2) edges, but also process complex multi-edge relationships in temporal graphs and support dynamically changing network structures. This enables the present method to adapt to more diverse network scenarios, such as social networks, communication networks, and financial transaction networks.

[0124] 3. Wide application fields: The efficient and frequent time-series subgraph mining method provided by the present invention has broad application prospects in multiple fields such as recommendation systems, network event monitoring, and illegal transaction detection. By efficiently mining the interaction patterns of different time nodes in the time-series graph, it can help better understand the dynamic behavior in the network and support more real-time data analysis scenarios.

[0125] 4. Improve mining accuracy: By introducing the sampling algorithm, the accuracy of the frequent subgraph mining results can be effectively guaranteed, while reducing resource consumption, so that the present invention can process large-scale complex time series graphs with limited computing resources.

[0126] The method of the present invention will be further described below with reference to a specific embodiment. Figure 3 As shown, a 4-node 6-edge time series graph G and its 2-edge time series subgraph relationship graph G are shown. (2) Example graph, where the time interval threshold δ is 10, and it is necessary to output the top-k 4-edge sequential subgraphs. (2) is the set of all 2-edge sequential subgraphs, i.e., sequential edge pairs

[0127] {((d,a,15)(b,a,16)),((d,a,15)(a,b,23)),((b,a,16),(a,b,23)),(a,b,23),(b,c,33)),((d,c,26),(b,c,33))}. Because the timing edge pairs ((d,a,15)(b,a,16)) and ((b,a,16),(a,b,23)) share a timing edge (b,a,16) in graph G, and the time of the timing edge (d,a,15) is less than that of (a,b,23), so G (2) There is a directed edge between ((d,a,15)(b,a,16)) and ((b,a,16),(a,b,23)) in the relationship graph, and so on, to obtain the complete 2-edge sequential subgraph relationship graph G (2) like Figure 4 Middle (b).

[0128] Then with random probability p 1 Sampling nodes, such as Figure 4 As shown, assuming p 1 =0.2, Figure C 2 Sampled: ① According to the 2-edge timing subgraph relationship graph G (2) Find C 2 The outgoing adjacent node set C(C 2 ), where C(C 2 )={C 4}; Subgraph C 2 and C 4 Combining to generate 3-edge sequential subgraph

[0129] M 3 =({b,a,16},{a,b,23},{b,c,33}). ② According to the 2-edge sequential subgraph relationship graph G (2) Find the incoming adjacent node set C(C 2 )′, where C(C 2 )′={C 1}; Subgraph C 2 With subgraph C 1 Combine to generate a 3-edge sequential subgraph M′ 3 =({d,a,15},{b,a,16},{a,b,23}). Add the generated 3-edge sequential subgraph to the 3-edge sequential subgraph set C (3) , used for subsequent calculations. And so on, after traversing the sampling G (2) Then all the 3-edge timing subgraphs that meet the conditions can be generated.

[0130] When generating a 3-edge sequential subgraph instance each time, according to M 3 The number of nodes, direction and order of the time series edges are calculated by isomorphism to obtain M 3 Type At the same time, its frequency Add 1. In this process, each 3-edge sequential subgraph instance has two combinations of generation methods, namely (e i ,e j )+(e j ,e d ) and (e i ,e j )+(e g ,e i ), therefore, after traversing all 2-side sequential subgraphs, the support of each type of 3-side sequential subgraph is calculated In the above example, when generating a 3-edge sequential subgraph M 3 Then, calculate M 3 =({b,a,16},{a,b,23},{b,c,33}), the tuple obtained after encoding is ({0,1}{1,0}{0,2}), and when another 3-edge sequential subgraph ({d,a,15},{b,a,16},{a,b,23}) is generated, the tuple obtained after encoding is ({0,1}{2,1}{1,2}), the two do not match, so M 3 =({b,a,16},{a,b,23},{b,c,33}) is a new type of sequential subgraph Its frequency is 1 and its support

[0131] For each 3-edge sequential subgraph M3 =(e i ,e j ,e g ), with probability p 2 Sampling it. Assume that p 2 = 0.5, and sample the 3-edge sequential subgraph M we just generated 3 =

[0132] ({d,a,15},{b,a,16},{a,b,23}), enumerate the M in two ways 3 ① According to the 2-edge timing subgraph relationship graph G (2) Find M 3 The outgoing adjacent node set C(M 3 ), where M 3 is the subgraph C 2 With subgraph C 1 Combinatorial generation, i.e. searching for C 2 = {b,a,16},{a,b,23} outgoing adjacent nodes, C(M 3 )={C 4}; Then through the relationship graph G (2) Discover C 4 With C 2 Connected by a directed edge, and M 3 It is made by C 1 and C 2 Combination generation, so it meets the conditions, M 3 With C 2 Combine to generate 4-edge sequential subgraph M 4 =({d,a,15},{b,a,16},{a,b,23},{b,c,33}), and add it to the 4-edge sequential subgraph set C(4) for subsequent calculations. Then, according to the number of nodes, the direction and order of the sequential edges, isomorphic calculations are performed to obtain M 4 Category And the number of this type of time series subgraph Initialized to 1. ② According to the 2-edge sequential subgraph relationship graph G (2) Find the incoming adjacent node set C(M 3 )′, that is, search for C 1 = the incoming adjacent node set of ({d,a,15},{b,a,16}), C(M 3 )′={}, so it does not meet the conditions. By analogy, after traversing the sampling, C (3) Then all 4-edge timing subgraphs that meet the conditions can be generated.

[0133] Calculate the support of the 4-edge sequential subgraph Finally, the 4-edge temporal subgraph classes are sorted according to the support, and the top-k 4-edge temporal subgraphs are output.

[0134] It should be understood that various parts of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof.

[0135] The above is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present disclosure should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A frequent temporal subgraph approximate mining method based on a 2-edge temporal subgraph relationship graph, characterized in that: include: Step 1, mining all 2-edge temporal subgraphs on the temporal graph G = (V, E), where V is the node set in the temporal graph, E is the temporal edge set in the temporal graph, and constructing a 2-edge temporal subgraph relationship graph based on this; Step 2: Based on the 2-edge temporal subgraph relationship graph, sample and generate the temporal subgraph candidate set C (l) , where l represents the number of temporal subgraph edges in the temporal subgraph candidate set, the initial value of l is 3 and l≥3; Step 3, calculating the type and support of each temporal subgraph in the temporal subgraph candidate set; Step 4, determine whether the number of edges l in the temporal subgraph candidate set is equal to the given number of edges L of the frequent temporal subgraph. If so, output the frequent temporal subgraph according to the given support threshold, or sort the temporal subgraphs from high to low according to the support, and output the top-k frequent temporal subgraphs. If not, first add 1 to l and repeat steps 2, 3, and 4, combine the currently generated temporal subgraph candidate set with the 2-edge temporal subgraph relationship graph, and expand to generate a new l-edge temporal subgraph candidate set until an L-edge frequent temporal subgraph is generated.

2. The method according to claim 1, characterized in that The step 1 specifically includes: Step 1.1, given a timing graph G = (V, E), initialize the 2-edge timing subgraph relationship graph G (2) =(C,R) in which the node set C is an empty set and the edge set R of the relationship graph is an empty set; Step 1.2, for each timing edge e in the timing graph i =(u i , v i , t i ), where e i is from node u i To node v i With timestamp t i Directed time-series edges, search for e i Adjacent in the time window [t i ,t i +δ]] in the set of all temporal edges C(e i )={e j |e j =(u j , v j , t j ),t j ∈[t i ,t i +δ]}δ is the preset time interval threshold, and each pair of adjacent two edges e i and e j Form a 2-edge sequential subgraph M2 = (e i ,e j ), and use it as a 2-edge sequential subgraph relationship graph G (2) A node is added to the relationship graph node set C; Step 1.3, for any two 2-edge sequential subgraphs M2=(e i ,e j ) and M′2=(e j ,e d ), if they share a temporal edge e j , and the time order satisfies t(e i ) <t(e d ), then add a directed edge to the relationship graph<M2,M′2> And add it to the edge set R of the relationship graph; Step 1.4: Form a 2-edge temporal subgraph relationship graph G based on the node set and the directed edge set (2) .

3. The method according to claim 2, characterized in that The step 2 specifically includes: Step 2.1: Set the current temporal subgraph candidate set C (l-1) Each subgraph in l-2 Perform random uniform sampling. If l = 3 at this time, then the candidate set of temporal subgraph C (l-1) is a 2-edge sequential subgraph relationship graph G (2) The middle node set, get the sampling node M l-1 =(e1,e2,…,e l-1 ); Step 2.2, in the 2-edge sequential subgraph relationship graph G (2) Find the sampling node M on l-1 Middle picture (e l-2 ,e l-1 )'s outgoing adjacent node set C(M l-1 ) C(M l-1 )={(and l-1 ,And l )|<(and l-2 ,And l-1 ),(And l-1 ,And l )>∈R}; Step 2.3, set C(M l-1 ) in any node (e l-1 ,e l ) and M l-1 Combine to generate l-edge sequential subgraph M l =(e1,e2,…,e l-1 ,the l ); Step 2.4, in G (2) Find M on l-1 The incoming adjacent node set C(M l-1 )′ C(M l-1 )′={(e0,e1)|<(e0,e1),(e1,e2)>∈R}; Step 2.5, set C(M l-1 Any node (e0,e1) in M l-1 Combine to generate an l-edge sequential subgraph: M′ l =(e0,e1,e2,…,e l-1 ); Step 2.6: Repeat steps 2.1 to 2.5 to generate a candidate set C of temporal subgraphs. (l) .

4. The method according to claim 3, characterized in that The step 3 specifically includes: Each time a new l-edge temporal subgraph instance is generated, isomorphism detection is used to determine whether it already exists in the temporal subgraph candidate set, and the frequency and support of each temporal subgraph type are calculated.

5. The method according to claim 4, characterized in that The step of calculating the frequency of each time series subgraph type comprises: Perform isomorphism detection on the generated sequential subgraph to determine whether the structure of the sequential subgraph already exists: in, is the i-th L-edge sequential subgraph type, M L is an L-edge sequential subgraph instance, is the frequency of the i-th L-edge sequential subgraph type; If the time-series subgraph is a new structure, it is taken as a new time-series subgraph type and its frequency is initialized to 1; If the time series subgraph is of an existing type, update the frequency of the type and add 1 to it.

6. The method according to claim 5, characterized in that The expression of the support is in, is the frequency of the i-th L-edge sequential subgraph type, p j , j=1,...L-2, is the sampling rate of the timing subgraph in step 2.1, and Z is the total number of L-edge timing subgraph types.