Binary-group approximate counting method and device based on broomtree sampling

Through the approximate counting method of broom tree sampling, the problems of low efficiency and insufficient accuracy of binary group counting in large-scale graph datasets are solved, and efficient and accurate binary group counting is achieved, which is applied to social network recommendation, gene analysis and overlapping community detection.

CN120373429APending Publication Date: 2025-07-25ZHEJIANG UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510511630.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-23
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The prior art has low efficiency and insufficient accuracy in the calculation of bipartite group counting in large-scale graph data sets, especially when calculating the number of (5,9)-bipartite group in the graph data set Twitter, it produces a relative error of nearly 200%.

Method used

The approximate counting method of bipartite clumps based on broom tree sampling is adopted, including pre-processing of the bipartite graph, constructing the broom tree structure, calculating the number of broom tree sub-graphs using dynamic programming algorithms, and counting the number of bipartite clumps through probabilistic reverse sampling.

Benefits of technology

It significantly improves the efficiency and accuracy of the binary group count, up to 8 times the accuracy improvement and 50 times the efficiency improvement, and is suitable for social network recommendations, gene analysis and overlapping community detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120373429A_ABST
    Figure CN120373429A_ABST
Patent Text Reader

Abstract

The invention discloses a bipartite clustering approximate counting method and device based on broom tree sampling, and the method comprises the steps: obtaining a bipartite graph G (U, V, E), and receiving bipartite clustering scale parameters p and q, preprocessing the bipartite graph G, including Core-reduce pruning and graph dyeing, so as to obtain a preprocessed bipartite graph G '; a broom tree structure is constructed, and the broom tree is of a tree structure meeting specific edge connection conditions and is used for representing binary clusters in a sparse mode; using a dynamic programming algorithm to calculate the number B of the broom tree sub-graphs meeting the color increasing constraint; based on the dynamic planning result, reversely sampling the edges of the broom tree according to the probability, and counting the number of paths meeting the binary clustering constraint in the sampling paths; and calculating an approximate value of the number of the bipartite clusters according to a result of multiple times of sampling. According to the invention, the efficiency and precision of binary clustering counting are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data mining technology, and more specifically, to a method and device for approximate counting of bicliques based on broom tree sampling. Background Art

[0002] In the field of bipartite graph analysis, biclique counting has attracted wide attention. Biclique counting is used as a basic operator in cohesive subgraph analysis, information aggregation in graph neural networks, and densest subgraph mining. In many applications, it is sufficient to approximately calculate the number of bicliques. In the graph kernel method, bicliques are the basis for defining the similarity measure between graphs in tasks such as classification and anomaly detection. Since the graph kernel depends on relative similarity rather than exact counting, approximate counting can maintain the kernel performance while significantly reducing the computational overhead. This efficiency promotes similarity calculations in fields such as bioinformatics (e.g., comparing protein interaction networks) and network security (e.g., detecting similar attack patterns across networks). In recommendation systems, biclique counting helps to discover dense substructures between users or items, such as groups of users with common interests or items that are usually purchased together. In large-scale environments such as e-commerce or streaming platforms, allowing a small counting error can significantly reduce the runtime cost while still maintaining the effectiveness of downstream tasks.

[0003] The enumeration-based biclique counting method cannot be scaled to larger scales because the number of bicliques grows exponentially with respect to the size of the biclique. For example, in the graph dataset Twitter, the number of edges is less than 2×106, and there are more than 10 13 (5, 4)-bicliques and more than 10 18 (6, 3)-bicliques. The enumeration-based method cannot give results in a short time in these cases.

[0004] The existing best biclique approximate counting algorithm EP / Zz++ cannot guarantee the accuracy of the counting result when the biclique size increases. For example, when calculating the number of (5, 9)-bicliques in the graph dataset Twitter, a relative error of nearly 200% will occur. And there is also a problem of low computational efficiency in graphs with a data scale of more than ten million. Summary of the Invention

[0005] In this embodiment, a method, device, electronic device, and storage medium for approximate counting of bicliques based on broom tree sampling are provided to solve the problem of low computational efficiency in graphs with a data scale of more than ten million in the related art.

[0006] In a first aspect, an embodiment of the present invention provides a biclique approximate counting method based on broom tree sampling, which is applied to social network recommendation, gene analysis, or overlapping community detection. The biclique approximate counting method based on broom tree sampling includes: Obtain a bipartite graph G(U, V, E), where U and V are disjoint vertex sets, E is an edge set, and receive biclique size parameters p and q; Preprocess the bipartite graph G, including Core-reduction pruning and graph coloring, to obtain a preprocessed bipartite graph G'; Construct a broom tree structure, which is a tree structure that satisfies specific edge connection conditions and is used to sparsely represent a biclique; Use a dynamic programming algorithm to calculate the number B of broom tree subgraphs that satisfy the color increasing constraint; Based on the dynamic programming result, reversely sample the edges of the broom tree with probability and count the number of paths that satisfy the biclique constraint in the sampling path; According to the results of multiple samplings, calculate an approximation of the number of bicliques.

[0007] In an alternative embodiment, the preprocessing step includes: Perform Core-reduction pruning on the bipartite graph G, deleting the upper vertices with degrees less than p - 1 and the lower vertices with degrees less than q; Perform graph coloring on the pruned bipartite graph to ensure that the vertices on the same side in any biclique have different colors.

[0008] In an alternative embodiment, the graph coloring step specifically includes: Call the CalcColor function to color the vertex sets U and V respectively; During the coloring process, dynamically check the coloring legality to ensure that the colors of the vertices on the same side are unique.

[0009] In an alternative embodiment, the definition of the broom tree structure satisfies the following conditions: The edge set E of the broom tree is determined by a specific formula to ensure that it is a connected tree structure; The edges of the broom tree are arranged in order and satisfy the color number increasing constraint.

[0010] In an alternative embodiment, the dynamic programming algorithm includes: Initialize a two-dimensional array Dp to record the number of broom tree subgraphs; Gradually fill the Dp array in the order of edges and count the number B of broom tree subgraphs that satisfy the color increasing constraint.

[0011] In an alternative embodiment, the sampling step includes: Sample the edges of the broom tree from the dynamic programming result Dp according to the weight distribution; During the sampling process, check whether the current path satisfies the biclique constraint; Calculate the approximate value of the number of bicliques based on the product of the probabilities of the sampled paths and the results of multiple samplings.

[0012] In an alternative embodiment, the sampling step further includes: If the sampled path does not satisfy the biclique constraint, terminate the current sampling and start over; Improve the accuracy of the approximate counting by taking the average of multiple samplings.

[0013] Compared with the prior art, the beneficial effects of the biclique approximate counting method based on broom tree sampling of the present invention are as follows: The present invention adopts a biclique approximate counting process based on broom tree sampling. Specifically, a dynamic programming algorithm is used to count the number of broom trees. Based on the result of dynamic programming, each edge of the broom tree is sampled in reverse order according to the probability, and it is ensured that the point sets on both the left and right sides satisfy the biclique constraint. The number of bicliques is approximately calculated based on the product of the probabilities of the sampled paths and the results of multiple samplings, improving the efficiency and accuracy of biclique counting.

[0014] In a second aspect, an embodiment of the present invention provides a biclique approximate counting device based on broom tree sampling, including: An input module for receiving the bipartite graph G and parameters p and q; A preprocessing module for pruning and coloring the bipartite graph; A broom tree construction module for generating a broom tree structure; A dynamic programming calculation module for counting the number of broom tree subgraphs; A sampling module for sampling by probability and counting the number of bicliques; An output module for outputting the approximate value of the number of bicliques.

[0015] In an alternative embodiment, the preprocessing module further includes: A pruning unit for performing Core-reduction and degree pruning; A coloring unit for calling the CalcColor function to complete graph coloring.

[0016] In an alternative embodiment, the sampling module further includes: A path checking unit for verifying whether the sampled path satisfies the biclique constraint; A result calculation unit for calculating the approximate value based on the results of multiple samplings.

[0017] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the bus. The processor can call the logical instructions in the memory to execute the steps of the method provided in the first aspect.

[0018] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the method for approximate counting of bicliques based on broom tree sampling described in the first aspect.

[0019] Compared with the prior art, the beneficial effects of the apparatus for approximate counting of bicliques based on broom tree sampling, the electronic device, and the storage medium of the present invention are the same as those of the method for approximate counting of bicliques based on broom tree sampling described in the first aspect, so they will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0021] Figure 1 It is a flowchart of the method for approximate counting of bicliques based on broom tree sampling in an embodiment of the present invention; Figure 2 It is a schematic diagram of a (6, 3)-broom tree in an embodiment of the present invention; Figure 3 It is a comparison chart of the average running time of different biclique counting algorithms for 3 ≤ p, q ≤ 9 in an embodiment of the present invention; Figure 4 It is a comparison chart of the average error of different biclique approximate counting algorithms for 3 ≤ p, q ≤ 9 in an embodiment of the present invention; Figure 5 In an embodiment of the present invention, in the Amazon dataset and value table; Figure 6 It is a schematic diagram of the abbreviation and scale description of the dataset in an embodiment of the present invention; Figure 7 It is a block diagram of the structure of the apparatus for approximate counting of bicliques based on broom tree sampling in an embodiment of the present invention; Figure 8 It is a block diagram of the structure of the electronic device in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] To more clearly understand the purpose, technical solution, and advantages of this application, the following describes and explains this application in combination with the accompanying drawings and embodiments.

[0023] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by those with ordinary skills in the technical field to which this application belongs. In this application, words such as "a", "one", "kind", "the", "these", etc. do not indicate a limitation in quantity, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent in these processes, methods, products, or devices. The terms "connect", "be connected", "couple" and other similar words involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether directly or indirectly connected. The "multiple" involved in this application means two or more. "And / or" describes the association relationship of associated objects and indicates that three relationships can exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, and B exists alone. Usually, the character " / " indicates that the objects associated before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific order for the objects.

[0024] In an embodiment of the present invention, a biclique approximation counting method based on broom tree sampling is provided, which is applied to social network recommendation, gene analysis, or overlapping community detection. It should be noted that in a social network recommendation system, biclique counting can discover dense substructures between users or items, such as groups of users with common interests or items that are usually purchased together. In large-scale environments such as e-commerce or streaming platforms, allowing a smaller increase in counting error can significantly reduce the runtime cost and improve the detection speed while still maintaining the effectiveness of downstream tasks.

[0025] In gene analysis, a biclique can represent the association relationship between genes and functional modules. Using biclique approximation counting can identify gene modules that are co-expressed under specific conditions. Improving the efficiency of approximation counting can directly improve the speed of gene analysis.

[0026] In overlapping community detection, bicliques can serve as local structures of overlapping communities. For example, a node may belong to multiple bicliques simultaneously, which means it may belong to multiple communities. By accelerating the speed of approximately counting bicliques, overlapping communities in the network can be identified more quickly. In addition, the number and structure of bicliques can be used as indicators of community quality. By approximately counting bicliques, the tightness and overlapping degree of communities can be evaluated. For the dataset abbreviations and scales in the embodiments, please refer to Figure 6 as shown.

[0027] Figure 1 is a flowchart of the biclique approximate counting method based on broom tree sampling according to the present invention. As shown in Figure 1 shown, this process includes the following steps: S100. Obtain a bipartite graph G(U, V, E), where U and V are disjoint vertex sets and E is the edge set, and receive the biclique size parameters p and q; Exemplarily, obtain a bipartite graph G with an upper vertex set U, a lower vertex set V, and an edge set E, and receive the biclique size parameters p and q that need to be approximately counted from the user.

[0028] S200. Preprocess the bipartite graph G, including Core-reduction pruning and graph coloring, to obtain a preprocessed bipartite graph G'; In this embodiment, the preprocessing steps include: Perform Core-reduction pruning on the bipartite graph G, deleting upper vertices with degrees less than p - 1 and lower vertices with degrees less than q; Perform graph coloring on the pruned bipartite graph to ensure that vertices on the same side in any biclique have different colors.

[0029] Specifically, this method uses a common technique, core-reduction, to prune the graph. The specific steps are as follows: Initialize the new graph G' as empty; Enumerate the points , take out the two-degree adjacent subgraph H of u, and delete the points in the upper vertex set of H with numbers less than or equal to u and all the corresponding connecting edges. , where H is renumbered and incorporated into G'. That is to say, G' is the union of a series of independent subgraphs; Delete the points in the upper vertex set of G' with degrees less than p - 1 and the points in the lower vertex set with degrees less than q. If new points with degrees less than p - 1 (q for the lower point set) are generated in this round of operation, recursively delete them.

[0030] It is only necessary to count the number of (p - 1, q)-bicliques in G' to obtain the number of (p, q)-bicliques in the original graph G. In all subsequent processes, let .

[0031] Further, in this embodiment, the graph coloring step specifically includes: Call the CalcColor function to color the vertex sets U and V respectively; During the coloring process, dynamically check the coloring legality to ensure that the colors of vertices on the same side are unique.

[0032] Exemplarily, the goal of graph coloring is such that for any (p,q)-biclique, any two points belonging to the upper vertex set U have different colors; similarly, any two points belonging to the lower vertex set V have different colors. Here, let c(u) denote the color number of node u.

[0033] The present invention calls the function CalcColor(G,S,p,q) with G, U, p, and q as parameters to complete the coloring of the vertex set U. Similarly, call the function CalcColor(G,S,p,q) with G, V, q, and p as parameters to complete the coloring of the vertex set V. The specific steps of CalcColor(G,S,p,q) are as follows: S210. S represents the set that has not been colored yet, and K represents the new color number to be colored currently, initialized to 1.

[0034] S220. Whenever S is non-empty, initialize the array Cnt to all 0. Cnt[u] is used to represent how many neighbors v of node u satisfy that there exists a neighbor w of v, where the color of w is K. Initialize the Snext set to be empty, which is used to represent the set to be colored in the next round.

[0035] S230. Traverse u ∈ S, color u with K (i.e., c(u):=K). Update the Cnt array. Specifically, for all neighbors v of u, if v did not previously have a neighbor with color K, then for all neighbors w of v, Cnt[w]:=Cnt[w]+1.

[0036] S240. If there exists a node x such that Cnt[x]>=q, it means the coloring is illegal. Undo the coloring of u and the update operation of Cnt, and put u into the Snext set to wait for the next round of coloring.

[0037] S250. When this round of coloring with K ends, K:=K + 1, S:=Snext, and jump to step S220 for the next round of coloring. (Exit the function if S is an empty set) S300. Construct a broom tree structure. The broom tree is a tree structure that satisfies specific edge connection conditions and is used to sparsely represent the biclique; In this embodiment, the definition of the broom tree structure satisfies the following conditions: The edge set E of the broom tree is determined by a specific formula to ensure that it is a connected tree structure; The edges of the broom tree are arranged in order and satisfy the constraint of increasing color numbers.

[0038] Exemplarily, given a bipartite graph G((U, V), E), the size p of the upper vertex set U, the size q of the lower vertex set V, and the orders of the vertices U = {u1, u2, …, up}, V = {v1, v2, …, vq}. G is called a (p, q)-broom tree if and only if the following conditions are satisfied: ; where and respectively represent the floor and ceiling of

[0039] Figure 2 A diagram of a (6, 3)-broom tree is provided. It can be observed (and proved) that such a structure is actually a tree, which contains p + q - 1 edges and is connected. In the present invention, the i-th smallest binary tuple in the edge set E is called the i-th edge of E (the size of the binary tuple is defined as comparing the numbers of the first elements first, and in case of equality, comparing the sizes of the second elements). For example, in Figure 2 the third edge is (u3, v1), and the seventh edge is (u5, v3).

[0040] S400. Use a dynamic programming algorithm to calculate the number B of broom tree subgraphs that satisfy the color increasing constraint; In this embodiment, the dynamic programming algorithm includes: Initialize a two-dimensional array Dp to record the number of broom tree subgraphs; Gradually fill the Dp array according to the edge order to count the number B of broom tree subgraphs that satisfy the color increasing constraint.

[0041] Exemplarily, the present invention only counts the number of broom tree subgraphs G'((U', V'), E') that satisfy the color numbers of both edges increasing respectively. Specifically, U = {u1, u2, …, up} satisfies c(u1) < c(u2) < … < c(up) and V = {v1, v2, …, vq} satisfies c(v1) < c(v2) < … < c(vq). The advantage of this is that in the case of coloring, a bipartite clique will only correspond to one broom tree. In addition, by using the pruning of graph coloring, the number of broom trees is greatly reduced, improving the probability of finding a bipartite clique from the broom trees.

[0042] The present invention calls the function CountingIndex(G, p, q) with G, p, q as parameters. Denote the neighbor set of u as N(u, G) below. The specific steps of the function are as follows: Sort the vertex sets U and V in ascending order according to the color numbers c(u) and c(v) respectively Sort the edge set \(E\) in ascending order according to the binary tuple \((c(u), c(v))\). Initialize the two-dimensional array \(Dp\) to all \(0\). \(Dp[len][last]\) represents the number of solutions where the first \(len\) edges of the broom tree have been determined and the current last edge is \(last\).

[0043] For \(len = 1\), each edge \((u, v)\in E\) can be used as the first edge of the broom tree. Therefore, initialize \(Dp[1][(u, v)] := 1\) for all edges \((u, v)\in E\).

[0044] Enumerate \(t\) from \(1\) to \(p + q - 2\), and deduce the number of solutions for the first \(t + 1\) edges from the number of solutions for the first \(t\) edges.

[0045] Enumerate the edge \((u, v)\in E\). If the point shared by the \(t\)-th edge and the \((t + 1)\)-th edge in the broom tree belongs to \(U\), then perform the calculation .

[0046] Otherwise, the point shared by the \(t\)-th edge and the \((t + 1)\)-th edge belongs to \(V\), and perform the calculation ; Calculate the total number of broom tree subgraphs of \(G\). .

[0047] Return \(Dp\) and \(B\) as the function results.

[0048] S500. Based on the results of dynamic programming, sample the edges of the broom tree in reverse according to the probability, and count the number of paths that satisfy the bipartite clique constraint in the sampled paths; S600. According to the results of multiple samplings, calculate the approximate value of the number of bipartite cliques.

[0049] In this embodiment, the sampling steps include: Sample the edges of the broom tree from the dynamic programming result \(Dp\) according to the weight distribution; During the sampling process, check whether the current path satisfies the bipartite clique constraint; According to the product of the probabilities of the sampled paths and the results of multiple samplings, calculate the approximate value of the number of bipartite cliques.

[0050] The sampling steps further include: If the sampled path does not satisfy the bipartite clique constraint, terminate the current sampling and start over; Take the average value through multiple samplings to improve the accuracy of approximate counting.

[0051] Exemplarily, after the calculation of \(CountingIndex(G, p, q)\), the number of \((p, q)\)-broom trees is \(B\). To approximate the relationship between \((p, q)\)-broom trees and \((p, q)\)-bipartite cliques, a direct method is: set a counter and are both initialized to 0. Sample one from B (p, q)-broom trees with equal probability, and increment the counter by 1. If the point set (U’, V’) of the sampled (p, q)-broom tree forms a (p, q)-biclique in the induced subgraph of the original graph G, increment the counter by 1. After a sufficient number of samplings, return as the approximate result.

[0052] However, this method is too inefficient. In the present invention, through the Sampling(G, p, q, Dp, B) function, using the dynamic programming calculation result Dp of the CountingIndex function, sample each edge of the broom tree in reverse order according to the probability, and ensure that the point sets on both the left and right sides satisfy the constraints of the biclique. The specific steps of the Sampling(G, p, q, Dp, B) function are as follows: Sample the last edge of the broom tree . The sampling needs to follow the weight distribution of Dp[p + q - 1][(u, v)] (representing the number of schemes for each edge to be the last edge of the broom tree), because it is necessary to ensure that all broom trees are sampled with equal probability in the end.

[0053] Initialize to represent the smallest edge that has been determined for the current broom tree.

[0054] Initialize . Here, ans will be used as the product of probabilities on the sampling path.

[0055] Enumerate i in reverse order from p + q - 2 to 1, and sample the i-th edge of the broom tree one by one.

[0056] Initialize , and S will represent the set of optional edges for the next edge (still ensuring satisfaction of the biclique constraint).

[0057] If the point shared by the i-th edge and the (i + 1)-th edge in the broom tree belongs to U, perform the calculation: ; Otherwise, the point shared by the i-th edge and the (i + 1)-th edge belongs to V, and perform the calculation: ; Perform the calculation . If ans is 0, it means that there is no broom tree in this sampling space that can serve as a biclique, and jump out of the enumeration loop in 3.5.

[0058] Sample the next edge of the broom tree . The sampling needs to follow the weight distribution of Dp[i][(u, v)].

[0059] Update , .

[0060] Return as an approximate result.

[0061] Given the number of samplings T, call the Sampling(G, p, q, Dp, B) function T times and obtain the average value of these T results , and use as the approximate value of the number of bicliques and return it.

[0062] The approximate counting process of bicliques using broom tree sampling: Use a dynamic programming algorithm to count the number of broom trees. Based on the results of dynamic programming, sample each edge of the broom tree in reverse order according to the probability, and ensure that the point sets on both the left and right sides satisfy the constraints of the biclique. Approximately calculate the number of bicliques according to the product of the probabilities of the sampling paths and the results of multiple samplings. This improves the efficiency and accuracy of biclique counting. In particular, in comparison with existing methods, our method shows an accuracy improvement of up to 8 times and an efficiency improvement of up to 50 times (see Figure 3 and Figure 4 ). The improvements in accuracy and efficiency can further improve the recommendation speed, gene analysis, and overlapping community detection speed in social networks, etc.

[0063] The broom tree structure proposed by the present invention can represent bicliques sparsely and try to maintain its characteristics, so that sampling the broom tree can more easily find bicliques. Experimental data (see Figure 5 ) also proves that the probability of containing a biclique in the broom tree is increased by up to 88 times compared with the probability of containing a biclique in the zigzag path.

[0064] The approximate method provided by the present invention is an unbiased estimate, which means that increasing the number of samplings can better obtain an approximate result with low error.

[0065] The embodiments of the present invention also provide a device for approximately counting bicliques based on broom tree sampling. This device is used to implement the above method embodiments, and those that have been described will not be repeated here. The terms "module", "unit", "sub-unit", etc. used below can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware or a combination of software and hardware is also possible and contemplated.

[0066] As Figure 7 shown Figure 7 is the structural block diagram of the device for approximately counting bicliques based on broom tree sampling in the present invention. This device includes: An input module 101 for receiving a bipartite graph G and parameters p and q; A preprocessing module 102 for pruning and coloring the bipartite graph; A broom tree construction module 103 for generating a broom tree structure; A dynamic programming calculation module 104 for counting the number of broom tree subgraphs; A sampling module 105 for sampling according to a probability and counting the number of bicliques; An output module 106 for outputting an approximation of the number of bicliques.

[0067] In this embodiment, the preprocessing module 102 further includes: A pruning unit for performing Core-reduction and degree pruning; A coloring unit for calling the CalcColor function to complete graph coloring.

[0068] The sampling module 105 further includes: A path checking unit for verifying whether the sampling path satisfies the biclique constraint; A result calculation unit for calculating an approximation based on multiple sampling results.

[0069] It should be noted that this device is used to implement the above method embodiment, and its beneficial effects and technical principles are the same as those of the biclique approximate counting method based on broom tree sampling described in the first aspect, so they will not be elaborated here.

[0070] Figure 8 This is a structural block diagram of an electronic device provided by an embodiment of the present invention. As Figure 8 shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640. Among them, the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 can call the logical instructions in the memory 630 to execute the following method: Obtain a bipartite graph G(U, V, E), where U and V are disjoint vertex sets and E is an edge set, and receive the biclique size parameters p and q; Preprocess the bipartite graph G, including Core-reduction pruning and graph coloring, to obtain a preprocessed bipartite graph G'; Construct a broom tree structure, where the broom tree is a tree structure that satisfies specific edge connection conditions and is used to sparsely represent bicliques; Use a dynamic programming algorithm to calculate the number B of broom tree subgraphs that satisfy the color increasing constraint; Based on the dynamic programming results, sample the edges of the broom tree in reverse according to probabilities, and count the number of paths that satisfy the bipartite clique constraint in the sampled paths; According to the results of multiple samplings, calculate the approximate value of the number of bipartite cliques.

[0071] In addition, when the logical instructions in the above-mentioned memory 630 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. And the aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0072] The embodiment of the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it is configured to execute the methods provided in the above-mentioned various embodiments.

[0073] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the technical solution, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disks, optical discs, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiments.

[0074] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A bipartite clique approximate counting method based on broom tree sampling, which is applied to social network recommendation or gene analysis or overlapping community detection, and is characterized in that, The bipartite clique approximate counting method based on broom tree sampling includes: Obtain a bipartite graph G(U, V, E), where U and V are disjoint vertex sets, E is the edge set, and receive the bipartite clique size parameters p and q; Preprocess the bipartite graph G, including Core-reduction pruning and graph coloring, to obtain the preprocessed bipartite graph G'; Construct a broom tree structure, which is a tree structure that satisfies specific edge connection conditions and is used to sparsely represent bipartite cliques; Use a dynamic programming algorithm to calculate the number B of broom tree subgraphs that satisfy the color increasing constraint; Based on the dynamic programming result, reverse sample the edges of the broom tree by probability and count the number of paths that satisfy the bipartite clique constraint in the sampling path; Calculate an approximation of the number of bipartite cliques according to the results of multiple samplings.

2. The method for approximately counting bicliques based on broom tree sampling according to claim 1, wherein The preprocessing step includes: Perform Core-reduction pruning on the bipartite graph G, deleting the upper vertices with degrees less than p - 1 and the lower vertices with degrees less than q; Perform graph coloring on the pruned bipartite graph to ensure that the vertices on the same side in any bipartite clique have different colors.

3. The bipartite clique approximation counting method based on broom tree sampling according to claim 1, characterized in that, The graph coloring step specifically includes: Call the CalcColor function to color the vertex sets U and V respectively; During the coloring process, dynamically check the coloring legality to ensure that the colors of the vertices on the same side are unique.

4. The method for approximately counting bicliques based on broom tree sampling according to claim 1, wherein, The definition of the broom tree structure satisfies the following conditions: The edge set E of the broom tree is determined by a specific formula to ensure that it is a connected tree structure; The edges of the broom tree are arranged in order and satisfy the color number increasing constraint.

5. The bipartite clique approximation counting method based on broom tree sampling according to claim 1, characterized in that The dynamic programming algorithm includes: Initialize a two-dimensional array Dp to record the number of broom tree subgraphs; Gradually fill the Dp array in the order of edges and count the number B of broom tree subgraphs that satisfy the color increasing constraint.

6. The method for approximately counting bicliques based on broom tree sampling according to claim 1, wherein The sampling step includes: Sample the edges of the broom tree from the dynamic programming result Dp according to the weight distribution; During the sampling process, check whether the current path satisfies the bipartite clique constraint; Calculate an approximation of the number of bipartite cliques according to the product of the probabilities of the sampling paths and the results of multiple samplings.

7. The method for approximately counting bicliques based on broom tree sampling according to claim 6, wherein The sampling step further includes: If the sampling path does not satisfy the bipartite clique constraint, terminate the current sampling and start over; Take the average value through multiple samplings to improve the accuracy of the approximate counting.

8. A bipartite clique approximate counting device based on broom tree sampling, characterized in that, Includes: An input module for receiving the bipartite graph G and the parameters p and q; A preprocessing module for pruning and coloring the bipartite graph; A broom tree construction module for generating a broom tree structure; A dynamic programming calculation module for counting the number of broom tree subgraphs; A sampling module for sampling by probability and counting the number of bipartite cliques; An output module for outputting an approximation of the number of bipartite cliques.

9. The bipartite clique approximation counting device based on broom tree sampling according to claim 8, wherein The preprocessing module further includes: A pruning unit for performing Core-reduction and degree pruning; A coloring unit for calling the CalcColor function to complete graph coloring.

10. The bipartite clique approximation counting device based on broom tree sampling according to claim 8, wherein The sampling module further includes: A path checking unit for verifying whether the sampling path satisfies the bipartite clique constraint; A result calculation unit for calculating the approximation according to the results of multiple samplings.

11. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the bipartite clique approximate counting method based on broom tree sampling as described in any one of claims 1 to 7.

12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for approximately counting bicliques based on broom tree sampling according to any one of claims 1 to 7.