An activity graph-based collaborative pattern mining method
By constructing activity graphs and combining them with attribute and structural constraints, the inefficiency in frequent subgraph pattern mining is solved, revealing the patterns of collaborative behavior between entities and achieving efficient collaborative pattern mining and business recommendations.
Patent Information
- Application Number
- CN202410113583.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-26
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2044-01-26
AI Technical Summary
Existing technologies are inefficient in mining frequent subgraph patterns, ignoring the mutual influence between communities and time constraints, and failing to effectively capture the collaborative behavior patterns among multiple entities in the graph.
By constructing an activity graph and combining attribute and structural constraints, user activity data is extracted. This allows for the generation, embedding, pruning, and support counting of k-item collaboration pattern sets. A diameter-constrained graph clustering algorithm and time constraints are then used for rapid pattern mining.
It effectively captures the patterns of collaborative behavior among multiple entities, improving the efficiency and accuracy of pattern mining, and can provide targeted business advice for enterprises or individuals, thereby increasing profitability.
Smart Images

Figure CN117931930B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of data mining, and particularly relates to a collaborative mode mining method based on an activity graph. BACKGROUND
[0002] The purpose of graph mode mining is to discover relevant and interesting modes hidden in the network, and frequent subgraph mining and frequent item set mining are two most common mode mining problems. During the mode mining process, a mass of data sets will cause low mining efficiency, and especially for frequent subgraph mode mining, due to the existence of rigid topological structure constraints and complex isomorphism test, it is difficult to efficiently capture a large number of ambiguous modes existing in the graph. In addition, the traditional frequent item set mining focuses on the behavior of each person, and due to the lack of structure and time constraints, the mutual influence and interaction mode between social groups are ignored.
[0003] Early frequent item set mining mainly includes priori algorithm and mode growth algorithm. In recent years, some more efficient frequent subgraph mining algorithms have been proposed one after another, which combine various constraints into the mining process of frequent subgraphs, and effectively prune the search space by using the anti-monotonicity of constraints.
[0004] In the mining of connected large graphs, when calculating the support, there will be multiple different embeddings that appear overlapping, so that the support does not satisfy the downward closure property. Therefore, in order to find a suitable support definition, the maximum independent set algorithm is gradually derived to count the support, which effectively avoids the problem of not satisfying the closure caused by overlapping. On this basis, scholars in this field have improved the support counting method, and invented the minimum mirror algorithm to solve the problem.
[0005] However, the above methods do not make good use of attribute information to mine the association between attributes and structures. In the early 21st century, scholars proposed a graph mining method combining attributes and structures, that is, a kind of adjacent mode mining in large graphs, in which the adjacent mode is a set of labels that are closely connected and frequently appear in the graph, and the propagation characteristics of the labels are considered.
[0006] The patent application file with publication number CN116522016A discloses a frequent pattern mining method based on spatial index. By constructing a spatial index of a geographic social network, the geographic position information and the structural information within the region range of the network are stored in a tree index structure, and the range of the frequent pattern mining work is refined from the complete graph to a certain region in the graph. By comparing the frequent patterns of different regions, the differences in the behavior patterns and social preferences of users between regions can be analyzed. However, the structural constraints defined in the application are limited to geographic spatial positions, and the time dimension constraints are ignored during frequent pattern mining, resulting in that the mined frequent patterns cannot accurately reflect the behavior patterns of users, and the applicable range is also limited. SUMMARY
[0007] In order to overcome the shortcomings of the prior art, the purpose of the present application is to provide a collaborative pattern mining method based on activity graph, which can reveal the correlation of data in topological structure and time dimension by mining typical collaborative patterns, effectively capture the rules of collaborative behavior between multiple entities, and help enterprises or individuals to carry out some businesses in a targeted manner, thereby improving the yield rate in various industries.
[0008] In order to achieve the above purpose, the technical solution adopted by the present application is:
[0009] A collaborative pattern mining method based on activity graph, comprising the following steps:
[0010] Step 1: constructing a connected activity graph according to the interaction relationship between entities and the dynamic attribute data on the entities;
[0011] Step 2: extracting user activity data from the activity graph constructed in step 1, and extracting all attributes therefrom, obtaining a k-item collaborative pattern set Lk according to a single attribute support threshold;
[0012] Step 3: based on the a priori principle, combining all collaborative patterns in the k-item collaborative pattern set Lk(k≥1) obtained in step 2 in pairs to generate a candidate (k+1)-item collaborative pattern set C(k+1);
[0013] Step 4: taking a candidate collaborative pattern I from the candidate (k+1)-item collaborative pattern set C(k+1) in step 3, and embedding it into the activity graph to obtain an embedding Π, and pruning the embedding Π according to the structural constraint;
[0014] Step 5: constructing an activity set A(Π) according to the time constraint on the set Π pruned in step 4, mapping the candidate collaborative pattern I to the activity set A(Π) to obtain a set φ, and pruning the set φ according to the time constraint;
[0015] Step 6, support degree counting is performed on the occurrences in the set φ of step 5, and occurrences with a counting value lower than a minimum support degree threshold are discarded;
[0016] Step 7, let i = i + 1, repeat steps 4-6 until all candidate collaborative patterns in C(k+1) are checked, and go to step 8;
[0017] Step 8, take the set of all (k+1)-item collaborative patterns as Lk, let k = k + 1, repeat steps 3-7 until no collaborative pattern can be obtained, and go to step 9;
[0018] Step 9, take all the mined collaborative patterns as the result of this collaborative pattern mining and output.
[0019] The specific method of step 1 is:
[0020] According to the interaction relationship between entities and the dynamic attribute data on the entities, a connected activity graph G(V, E, L) is constructed, each entity is taken as a node v, the interaction relationship between each entity is taken as an edge e, and the activity occurring on the entity (node v) is represented as a binary tuple a(v) = <l, t>, wherein l represents an event label, and t represents a time stamp of the event occurrence; and the activity set triggered by each entity is represented as A(v).
[0021] The specific method of step 2 is:
[0022] User activity data is extracted from the activity graph constructed in step 1, and all attributes are extracted therefrom, the number of occurrences of these attributes is counted, attributes with a counting value higher than a single attribute support degree threshold are retained, a k-item collaborative pattern set Lk is obtained, wherein k represents the number of items contained in each collaborative pattern in the pattern set, and k is initially set as 1, and finally the set of all retained attributes constitutes a 1-item collaborative pattern set L1.
[0023] The specific method of step 4 is:
[0024] Step 4, a candidate collaborative pattern I is taken out from the candidate (k+1)-item collaborative pattern set C(k+1) of step 3, I is mapped to the node set V of the graph G to obtain a set Π composed of several embeddings, structural constraint checking is performed on each embedding in the set Π in turn, and embeddings not meeting the structural constraint are pruned.
[0025] The specific method of step 5 is:
[0026] Step 5, for each embedding pi in the pruned set Pi in step 4, let A(Pi) be all active sets in Pi, map the candidate collaboration pattern I to the active set A(Pi) to obtain a set of occurrences φ, and sequentially perform time constraint checking on each occurrence in the set φ, and prune the occurrences that do not meet the time constraint.
[0027] The specific method of the step 6 is:
[0028] Step 6, count the support of the occurrences in the set φ in step 5, count the number of occurrences that meet the time constraint and the anti-monotonicity constraint, and if the count value is greater than the minimum support threshold, the candidate collaboration pattern I is regarded as a (k+1)-item collaboration pattern, otherwise the candidate collaboration pattern is discarded.
[0029] In the step 4, when performing the structure constraint checking, the active graph in step 1 is clustered into graphs with diameter constraints, and an index table is constructed according to the clustering results.
[0030] Compared with the prior art, the beneficial effects of the present application are:
[0031] (1) The traditional frequent item set mining ignores the mutual influence between communities, and the frequent subgraph pattern mining cannot avoid isomorphic testing and is inefficient; the present application combines the traditional frequent item set mining with the frequent subgraph pattern mining, when mining in a large graph, first extracts the frequent attribute set through the traditional frequent item set mining algorithm, then embeds the attribute set into the large graph, and mines the different isomorphic frequent subgraphs according to the time and space constraints, and finally obtains the collaboration pattern with rules.
[0032] (2) The traditional attribute graph pattern mining often ignores the time constraint and does not consider the change of attributes with time; the present application associates each attribute in the attribute graph with time, and establishes a frequent graph pattern mining framework related to time and structure.
[0033] (3) In the pattern mining of a large graph, the traditional algorithm often consumes a large amount of time and space resources; the present application innovatively proposes a diameter-based graph clustering algorithm and an algorithm for fast calculation of the distance between cross-cluster nodes to greatly reduce the time and space resources required for pattern mining.
[0034] In summary, the present application mines a brand-new collaboration pattern, reveals the correlation of data in the topological structure and time dimension, effectively captures the rules of the collaboration behavior between multiple entities, and uses the rules to help enterprises or individuals to carry out business in a targeted manner, and has the advantages of improving the yield rate in various industries. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 is the implementation method flowchart of the present application.
[0036] Figure 2 is a subgraph of activity graph of the present application.
[0037] Figure 3 is a clustering result graph of the present application.
[0038] Figure 4 is an activity graph G of the present application.
[0039] Figure 5 is a schematic diagram of the occurrence set φ obtained after mapping of the candidate collaboration mode l1-l2 of the present application.
[0040] Figure 6 is a schematic diagram after time constraint pruning of the set φ of the present application.
[0041] Figure 7 is a schematic diagram after anti-monotonicity pruning of the set φ of the present application. DETAILED DESCRIPTION
[0042] The following is an experiment using the Last.fm dataset in combination with the above summary:
[0043] Dataset introduction of the embodiment of the present application
[0044] Last.fm is a foreign online music community, which contains the historical music listening records of all users and the social network situation, the network includes 1892 users and 12717 two-way user friend relationships, the dataset contains 17632 artist tags in total, each user will listen to their favorite songs at a specific time and label the artists. The present application extracts three artists that each user likes to listen to and the time stamp labeled by the user, and uses the (artist, time stamp) binary tuple as a set of activities. The collaboration mode mined from the dataset is a set of artist tags, which represents that some musicians with similar music styles are spread among a group of close friends within a period of time, and the music styles and tastes of friends influence and penetrate each other.
[0045] As shown in Figure 1 , the present application provides a collaboration mode mining method based on an activity graph, and the specific steps are as follows:
[0046] Step 1, according to the interaction relationship between entities and the dynamic attribute data on the entity, a connected activity graph is constructed;
[0047] A part of data is intercepted from the Last.fm dataset, and the results are shown in the following table.
[0048] Table 1.1 Schematic table of user friend relationship
[0049] UserId FriendId A B A G A D A E B G B C C I C J I J H G H J E F
[0050] Table 1.2 User activity graph schematic table
[0051]
[0052] The activity graph G(V, E, L) is composed of the above data set, taking each user of the music community as a node v, and connecting the nodes corresponding to two users into an edge e if there is a friendship relationship between the two users. Each activity triggered by a user is represented as a binary tuple a(v) = <l, t>, where l represents an event label occurring at a certain time node, i.e., the artist id listened to by the user, and t represents the timestamp of the event occurrence, i.e., the time when the user listened to the music, and the set of activities triggered by all users is represented as A(v). Since the complete activity graph is too large, this embodiment only performs collaborative pattern mining on a subgraph of the activity graph (as shown in Figure 2 The letters A to J represent different music community users, and l1 to l5 represent different artist labels, and the date after the label represents the time when the user listened to the works of the artist.
[0053] Step 2, extract user activity data from the activity graph G constructed in step 1, and extract all attributes therefrom, and obtain a 1-item collaborative pattern set L1 according to a single attribute support threshold, where the single attribute support threshold is set to 3, and the L1 generation result is shown in Table 1.3.
[0054] Table 1.3 Collaborative pattern L1 result statistical table
[0055] Attribute Tag Member User Support Count Whether to be counted in L1 l1 ACH 4 Yes l2 ABJ 4 Yes l3 CHJ 5 Yes l4 EGJ 3 Yes l5 DEFGI 5 Yes
[0056] Step 3, based on the priori principle, combine all collaborative patterns in the 1-item collaborative pattern set L1 obtained in step 2 in pairs to generate a candidate 2-item collaborative pattern set C2. The C2 generation result statistical situation is shown in Table 1.4.
[0057] Table 1.4 Candidate collaborative pattern C2 result statistical table
[0058]
[0059] Step 4, take the candidate collaborative pattern I1(l1, l2) from the candidate 2-item collaborative pattern set C2 generated in step 3, map I1 to the node set V of the graph G, and obtain the set Π composed of the embeddings, Π is {AB, CB, CA, HA, HB, HJ, AA, CJ}.
[0060] Then, structural constraint checks are performed on each embedding in set Π, and embeddings that do not meet the structural constraints are pruned. Structural constraints mean that the distance between adjacent nodes cannot exceed the diameter threshold, which is set to 2 here. When performing structural constraint checks, graph clustering with diameter constraints can be performed on the activity graph constructed in step 1. After clustering, the node set in graph G is divided into {A, B, D, G}, {C, H, I, J}, and {E, F} (clustering results are attached). Figure 3 (As shown).
[0061] After obtaining the clustering results, a distance calculation index table can be further constructed based on the BFS algorithm. Referencing the index table can effectively speed up the efficiency of structural constraint checking. The distance calculation index table is shown in Table 1.5 (with node A as the starting node). The result of structural constraint pruning of set Π is {AB, CB, CA, HA, HB, HJ, AA, CJ}.
[0062] Table 1.5 Index Table for Distance Calculation with A as the Original Node
[0063]
[0064] Step 5: For each embedding π in the pruned set Π from Step 4, let A(Π) be the set of all activities in Π, and map the candidate cooperation mode I1 to the activity set A(Π) (the mapping result is as follows). Figure 4 As shown), a set φ consisting of several occurrences (consisting of several activities) is obtained. All occurrences in set φ are shown in Table 1.6 below (see Appendix for details). Figure 5 ).
[0065] Table 1.6 Statistical table of all occurrences in set φ
[0066]
[0067]
[0068] A time constraint is applied to the above occurrence set, assuming a time threshold of 3 days. The time constraint is checked for each occurrence in set φ, and occurrences with a time difference exceeding 3 days are pruned. The pruning results are shown in Table 1.7 (see appendix for details). Figure 6 ).
[0069] Table 1.7 Schematic diagram of the results after time pruning of set φ
[0070] Appear 1 <<l1,2009.4.1>,<l2,2009.4.2>> 2 <<l1,2009.4.1>,<l2,2009.4.3>> 3 <<l1,2009.4.1>,<l2,2009.4.3>> 4 <<l1,2009.4.2>,<l2,2009.4.2>> 5 <<l1,2009.4.2>,<l2,2009.4.3>> 6 <<l1,2009.4.2>,<l2,2009.4.3>> 7 <<l1,2009.4.4>,<l2,2009.4.3>> 8 <<l1,2009.4.4>,<l2,2009.4.2>> 9 <<l1,2009.4.4>,<l2,2009.4.3>> 10 <<l1,2009.4.4>,<l2,2009.4.1>>
[0071] Step 6: Count the support of occurrences in set φ that have undergone time constraint checks, and simultaneously count the number of occurrences in set φ that follow the anti-monotonicity constraint. The statistics are shown in Table 1.8 (see attached table).Figure 7 As shown in the diagram, if the count value is greater than or equal to the minimum support threshold of 3, the current candidate pattern is considered a 2-term collaboration pattern; otherwise, the candidate collaboration pattern is discarded. For candidate collaboration patterns l1-l2, the final support count is 3, so l1-l2 is indeed a 2-term collaboration pattern.
[0072] Table 1.8 Schematic diagram of the results after pruning set φ with anti-monotonicity constraints
[0073] Appear 1 <<l1,2009.4.1>,<l2,2009.4.2>> 2 <<l1,2009.4.4>,<l2,2009.4.1>> 3 <<l1,2009.4.2>,<l2,2009.4.3>>
[0074] Step 7: Repeat steps 4-6 for the other candidate options in the candidate collaboration pattern set C2 until all candidate options in C2 have been checked. The resulting 2-option collaboration patterns are {l1, l2}, {l1, l3}, {l1, l4}, {l1, l5}, {l2, l3}, {l2, l4}, {l2, l5}, and {l4, l5}.
[0075] Step 8: Take the set of all the item collaboration patterns in the above process as L2, and repeat steps 3 to 7 to obtain higher-order (higher number of items) collaboration patterns until no more collaboration patterns can be obtained.
[0076] Step 9: Output all the discovered collaboration patterns as the results of this collaboration pattern mining. The final statistical results are shown in Table 1.9.
[0077] This result can reveal some interesting patterns that occur between closely related entities over a period of time, thereby providing better services to users.
[0078] Table 1.9 Results of Collaboration Pattern Mining from Activity Graph G
[0079]
[0080]
[0081] Application of experimental results: On the Last.fm music social platform, if within 3 days it is discovered that user A likes the singer Madonna, and user A's close friend user B likes the singer Britney Spears, then the platform can recommend singers Kylie Minogue and Aguilera to user A and user B's mutual close friend C. In this way, it is highly likely to increase user C's time spent on the music app and even their willingness to pay, thereby increasing the platform's daily active users and revenue.
[0082] In conclusion, currently there is no method in the field of social recommendation to recommend artists and related music based on friend relationships. However, this invention can provide a completely new perspective on recommending artists and music that users may be interested in. Similarly, this method can be extended to recommend products, movies, and books that users on internet platforms may be interested in, effectively increasing daily active users and user retention, thereby further increasing the potential for commercial revenue.
[0083] The key points and protection points of this invention are:
[0084] (1) Activity graph: A special type of attribute graph that uses <label, timestamp> tuples as attributes and allows a node to have multiple attributes.
[0085] (2) Collaboration mode: A set of frequently occurring attributes (event labels), which is a subset of the attribute set in the activity graph. The nodes to which these activities belong are structurally closely connected and occur within adjacent time intervals.
[0086] (3) Structural constraint: a non-rigid constraint that stipulates that the distance between any two nodes in an embedding cannot exceed the maximum diameter threshold.
[0087] (4) Time constraint: It is stipulated that the time interval between any two activities in an event cannot exceed a certain threshold.
[0088] (5) Solution for attribute overlap in candidate collaboration patterns: When counting the support of occurrences, it is necessary to check whether the activities in the occurrences have been marked. If an activity has been marked, the occurrences to which that activity belongs need to be pruned and cannot be counted; otherwise, the count value is incremented by 1.
[0089] (6) Fast graph clustering algorithm based on diameter: Fast graph clustering is performed by combining label propagation algorithm with diameter constraint.
[0090] (7) Distance calculation scheme between cross-cluster nodes: Create an index table for the activity graph and quickly calculate the distance between cross-cluster nodes based on the index table.
Claims
1. A method for mining collaboration patterns based on activity graphs, characterized in that: Includes the following steps: Step 1: Construct a connected activity graph based on the interaction relationships between entities and the dynamic attribute data of the entities; The specific method for step 1 is as follows: Based on the interaction relationships between entities and the dynamic attribute data of entities, a connected activity graph G(V,E,L) is constructed. Each entity is treated as a node v, and the interaction relationship between each entity is treated as an edge e. The activity occurring at node v is represented as a tuple a(v) = ...<l,t> Where l represents the event label and t represents the timestamp of the event; the set of activities triggered by each entity is represented as A(v); Step 2: Extract user activity data from the activity graph constructed in Step 1, extract all attributes from it, and obtain the k-item collaboration pattern set Lk based on the single attribute support threshold. Step 3: Based on the prior principle, all collaboration patterns in the k-item collaboration pattern set Lk (k≥1) obtained in Step 2 are combined in pairs to generate a candidate (k+1)-item collaboration pattern set C(k+1). Step 4: Extract candidate collaboration pattern I from the candidate (k+1)-item collaboration pattern set C(k+1) in Step 3, and embed it into the activity graph to obtain embedding Π. At the same time, prune embedding Π according to structural constraints. Step 5: Construct activity set A(Π) from the pruned set Π in Step 4 according to the time constraints, map candidate collaboration mode I onto activity set A(Π) to obtain set φ, and prune set φ according to the time constraints. Step 6: Count the support of occurrences in the set φ from Step 5, and discard occurrences with count values lower than the minimum support threshold; Step 7: Let i = i + 1, repeat steps 4-6 until all candidate cooperation patterns in C(k+1) have been checked, then go to step 8. Step 8: Take the set of all (k+1)-item collaboration patterns as Lk, let k = k+1, repeat steps 3-7 until no more collaboration patterns can be obtained, then go to step 9. Step 9: Output all the discovered collaboration patterns as the results of this collaboration pattern mining.
2. The method for mining collaboration patterns based on activity graphs according to claim 1, characterized in that: The specific method for step 2 is as follows: Extract user activity data from the activity graph constructed in step 1, extract all attributes from it, count the number of times these attributes appear, retain the attributes whose count value is higher than the single attribute support threshold, and obtain the k-item collaboration pattern set Lk, where k represents the number of items contained in each collaboration pattern in the pattern set, and the initial value of k is set to 1. Finally, the set of all retained attributes is the 1-item collaboration pattern set L1.
3. The method for mining collaboration patterns based on activity graphs according to claim 1, characterized in that: The specific method for step 4 is as follows: Step 4: Take out candidate collaboration mode I from the candidate (k+1)-item collaboration mode set C(k+1) in Step 3, map I to the node set V of the activity graph G, and obtain a set Π composed of several embeddings. Perform structural constraint checks on each embedding in set Π in turn, and prune the embeddings that do not meet the structural constraints.
4. The method for mining collaboration patterns based on activity graphs according to claim 1, characterized in that: The specific method for step 5 is as follows: Step 5: For each embedding π in the set Π after pruning in Step 4, let A(Π) be the set of all activities in Π. Map the candidate cooperation mode I onto the activity set A(Π) to obtain a set φ consisting of several occurrences. Perform time constraint checks on each occurrence in the set φ in turn, and prune the occurrences that do not meet the time constraints.
5. The method for mining collaboration patterns based on activity graphs according to claim 1, characterized in that: The specific method for step 6 is as follows: Step 6: Count the support of the occurrences in the set φ from Step 5. Count the number of occurrences that meet the time constraint and the anti-monotonicity constraint. If the count value is greater than the minimum support threshold, then the candidate cooperation pattern I is taken as a (k+1)-term cooperation pattern; otherwise, the candidate cooperation pattern is discarded.
6. The method for mining collaboration patterns based on activity graphs according to claim 1, characterized in that: In step 4, when performing structural constraint checks, the activity graph described in step 1 is clustered for graphs with diameter constraints, and an index table is constructed based on the clustering results.
Citation Information
Patent Citations
Spatial index-based frequent pattern mining method
CN116522016A
Method for mining frequent episodes of signal sequence with time constraint
CN106055672A
Method and device for correlation analysis
CN107102999A