Ball graph coarsening classification method, system, equipment and medium
By dynamically adjusting the particle-ball graph coarse method of the particle-ball splitting strategy, the problem of lack of adaptability and dependence on hyperparameters in the existing technology is solved, and efficient and adaptive graph coarseness is achieved, and the graph data is improved. Processing efficiency and accuracy.
Patent Information
- Application Number
- CN202411761146.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-02-25
AI Technical Summary
The existing graph roughening methods lack adaptability and rely on hyperparameter settings, resulting in insufficient universality and generalization, especially inefficient when processing large-scale graph data.
A method of coarse sphere map coarse classification is proposed, and the initial sphere map is formed by integrating nodes, and the k-means++ algorithm is used for coarse division and subdivision, dynamically adjust the particle sphere splitting strategy, and adaptively coarse the graph.
Efficient and adaptive graph roughening is achieved, and the key topological information in the graph can be effectively saved and utilized in graph data of different scales and types, improving the efficiency and accuracy of graph classification and community detection.
Smart Images

Figure CN119516231A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of graph data processing, and in particular to a method, system, device and medium for coarsening and classifying a granular sphere graph. Background Art
[0002] In today's digital age, graph data applications are ubiquitous, covering a variety of fields from social network analysis to drug discovery, showing great research potential and application value. With the rapid development of information technology, large-scale graph data has become increasingly common in the real world. This trend is inherently positive, as the increase in the amount of data means that more information can be obtained, which helps to reveal deeper patterns and connections. However, the challenge that comes with it is that processing these huge graph data sets requires huge computing resources, which, as pointed out by Kumar et al. (2023), greatly increases computing costs and time.
[0003] In this context, graph coarsening technology came into being as a method to efficiently handle large-scale graph problems. The core goal of graph coarsening is to reduce the size of the graph—that is, reduce the number of nodes and edges—while retaining the basic properties and structural characteristics of the original graph as much as possible. In this way, the original graph can be approximated by a smaller and less computationally expensive graph, thereby simplifying the problem-solving process. This method not only helps reduce the resources required to process large-scale graph data, but also improves computational efficiency while maintaining the core characteristics of the data.
[0004] Currently, most graph coarsening methods lack adaptability and involve certain hyperparameters, which affect the versatility and generalization of the methods. They usually rely on a "single-granularity" analysis mode, resulting in insufficient information preservation of the graph given a set of hyperparameters and efficiency problems when processing large-scale data. To address these problems, we draw inspiration from the "global priority" cognitive mechanism and granular computing of the human brain and propose a graph coarsening method that is efficient, adaptive, and has strong fitting and generalization capabilities for large-scale graph coarsening. Summary of the invention
[0005] The present invention provides a method, system, device and medium for coarsening and classifying a granular sphere image. The method does not contain hyperparameters and can adaptively perform an image coarsening process.
[0006] The present invention is achieved through the following technical solutions:
[0007] A granular sphere image coarsening classification method, comprising:
[0008] Integrate all nodes that need to be coarsened and classified to form initial graph data, and regard all nodes with connection relationships as an initial sphere with the coarsest granularity, wherein the connection relationships between the nodes are diverse and dynamic;
[0009] In the coarse classification stage, select the one with the highest degree nodes as the center point, and based on the k-means++ algorithm, the cluster corresponding to the center point is obtained, and the cluster is set as a coarse-grained sphere. At the same time, the coarse-grained sphere is regarded as the initial parent sphere;
[0010] In the subdivision stage, the two nodes with the highest degree in the parent particle sphere are used as the splitting centers of the parent particle sphere, and each parent particle sphere is binary split based on the corresponding two splitting centers based on the k-means++ algorithm to obtain two daughter particle spheres;
[0011] Determine whether the sum of the average connectivity of the two daughter balls belonging to the same parent ball is lower than the average connectivity of the parent ball. If so, stop splitting and proceed to the next step. Otherwise, take the two daughter balls as new parent balls respectively and return to the previous step.
[0012] All the sub-spheres that are no longer split are aggregated, thereby completing the coarse classification of the initial graph data.
[0013] As an optimization, if the original graph composed of the nodes has disconnected nodes, the original graph is separated into a plurality of connected subgraphs, and then each of the connected subgraphs is regarded as an initial particle sphere.
[0014] As an optimization, the calculation formula of the average connectivity is:
[0015]
[0016] Among them, AC k represents the average connectivity of the kth sphere, E k represents the number of edges in the kth sphere, V k Represents the number of nodes in the kth sphere.
[0017] As an optimization, in the coarse classification stage, the time complexity of generating the coarse-grained sphere based on the k-means++ algorithm is:
[0018]
[0019] Where N is the number of nodes in the initial sphere, M is the number of edges in the initial sphere, and O(*) represents the time complexity.
[0020] As an optimization, in the subdivision stage, the time complexity of generating the sub-particle sphere based on the k-means++ algorithm is:
[0021]
[0022] Where n is the number of nodes in the parent sphere, m is the number of edges in the parent sphere, and O(*) represents the time complexity.
[0023] As an optimization, the time complexity of the initial sphere composed of all connected nodes is:
[0024]
[0025] As an optimization, the types of nodes include individuals in social networks, papers in citation networks, entities in knowledge graphs, traffic points in traffic networks, users and products in e-commerce networks, proteins or genes in bioinformatics networks, and devices or users in communication networks.
[0026] The present invention discloses a granular-sphere image coarsening classification system, which is used to implement the above-mentioned granular-sphere image coarsening classification method, comprising:
[0027] An integration module is used to integrate all nodes that need to be coarsened and classified to form an initial sphere graph, and regard all nodes with connection relationships as an initial sphere with the coarsest granularity, wherein the connection relationship between the nodes is diverse and dynamic;
[0028] Initialization module, used to select the highest degree in the coarse classification stage nodes as the center point, and based on the k-means++ algorithm, the cluster corresponding to the center point is obtained, and the cluster is set as a coarse-grained sphere. At the same time, the coarse-grained sphere is regarded as the initial parent sphere;
[0029] A binary splitting module is used to use the two nodes with the highest degree in the parent particle sphere as the splitting centers of the parent particle sphere in the subdivision stage, and each parent particle sphere is binary split according to the corresponding two splitting centers based on the k-means++ algorithm to obtain two daughter particle spheres;
[0030] A judgment module is used to judge whether the sum of the average connectivity of the two daughter particles belonging to the same parent particle ball is lower than the average connectivity of the parent particle ball. If so, the splitting is stopped and the aggregation module is entered. Otherwise, the two daughter particles are respectively used as new parent particles, and the new parent particles are binary-split again by the binary-split module;
[0031] The summarization module is used to summarize all the sub-particles that are no longer split, so as to complete the coarse classification of the initial graph data.
[0032] The present invention also discloses an electronic device, characterized in that it includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a granular sphere image coarsening classification method as described above.
[0033] The present invention also discloses a storage medium storing a computer program, characterized in that when the computer program is executed by a processor, the aforementioned particle-sphere image coarsening classification method is implemented.
[0034] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0035] In the current practice of graph data processing, most graph coarsening methods have a common limitation: they lack the necessary adaptability and need to rely on specific hyperparameter settings during implementation, which not only affects the versatility and generalization of the methods, but also largely limits their application effects in graph data of different types and scales. In particular, when these methods adopt the "single granularity" analysis mode, they often lead to insufficient preservation of key information in the graph under a given set of hyperparameter configurations. Especially when processing large-scale data sets, the efficiency problem of this method is more prominent. In response to this challenge, the present invention draws inspiration from the "global priority" cognitive mechanism of human brain information processing and the strategy of granular computing, and proposes a new graph coarsening method, which aims to overcome the limitations of the existing technology through its efficient and adaptive characteristics, as well as its powerful fitting and generalization capabilities, and is particularly suitable for processing large-scale social network graph data.
[0036] As one of the most active information exchange platforms in today's society, social networks generate data that is not only huge in magnitude but also complex in structure, which poses a huge challenge to the processing and analysis of graph data. The method of the present invention introduces a dynamic graph coarsening strategy, which no longer sticks to a single coarsening granularity, but can dynamically adjust the degree and strategy of coarsening according to the specific characteristics of the graph data and the requirements of the processing task. This adaptive ability enables our method to more effectively preserve and utilize key topological information in the graph in social network data of different scales and types, thereby improving the efficiency and accuracy of tasks such as graph classification and community detection.
[0037] In addition, the present invention also pays special attention to the generalization ability of the method. Through intelligent algorithm design, the graph coarsening method not only performs well in the currently known social network scenarios, but also can adapt to the development and changes of future social networks, as well as the emergence of emerging social network structures. Such a design concept ensures that the method of the present invention can maintain high efficiency and high accuracy in processing performance when facing the diversity and dynamics of social network data.
[0038] In summary, by drawing on the "global priority" cognitive mechanism of the human brain and the flexible strategy of granular computing, the present invention proposes an efficient, adaptive graph coarsening method that can be applied to large-scale graph coarsening and has strong fitting and generalization capabilities. This method is not only innovative in theory, but also has broad application prospects in practice. It can not only effectively cope with the processing challenges of large-scale social network data, but also provide more accurate and efficient tools for social network analysis, which is expected to promote the further development of social network analysis and graph data processing technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0040] Figure 1 It is a flow chart of a method for coarsening and classifying a granular sphere image according to the present invention;
[0041] Figure 2 for Figure 1 An image diagram of the flow chart in Figure 2. DETAILED DESCRIPTION
[0042] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0043] The term "coarsening" has a long history in scientific computing, especially when using multigrid (MG) and algebraic multigrid (AMG) methods to solve problems. These techniques effectively accelerate the solution process by iterating between grids of different fineness, especially in fields such as numerical simulation and engineering computing. In recent years, with the rapid development of machine learning and data science, graph coarsening technology has attracted the attention of more scholars and has become an important tool for processing complex network data, accelerating graph data analysis and graph learning algorithms. As Chen et al. (2022) stated, this technology not only has profound theoretical significance, but also shows great potential in practical applications, especially in fields that require processing large-scale graph data, such as social media analysis, bioinformatics, network security, and recommendation systems.
[0044] The main purpose of graph coarsening techniques is to reduce the size of a graph while maintaining its core structural properties, especially by maintaining spectral properties. The focus of this approach is to ensure that the eigenvalues between the original graph and the coarsened graph remain highly similar. The spectrum based on the Laplacian matrix reveals the deep structural information of the graph, making the spectral distance a key indicator for measuring the structural similarity between the two graphs. In this research field, following the pioneering work of Wilson & Zhu (2008), Loukas & Vandergheynst (2018) and Loukas (2019) introduced the advanced concept of restricted spectral similarity (RSS), requiring that the eigenvalues and vectors of the Laplacian operator of the coarsened graph should closely match the corresponding values of the original graph in the key feature subspace. Jin et al. (2020) proposed using spectral distance as the main indicator to measure the degree of preservation of spectral properties, and developed an algorithm to minimize the spectral distance between the original graph and the coarsened graph. Imre et al. (2020) designed an efficient spectral-preserving sparsification algorithm for large-scale graph data, which achieves almost linear time complexity. In addition, Zhao et al. (2019) developed a spectral-preserving reduction algorithmic framework combining a perceptual spectral sparsification method and an algebraic multigrid (AMG) Laplace solver for large undirected graphs, and adopted an innovative constrained stochastic gradient descent (SGD) optimization method to achieve efficient performance.
[0045] Although spectral methods excel in preserving graph structural information, they face significant challenges in terms of memory and computational resources when processing large-scale graph data. More importantly, these methods rely too much on the global properties of the graph and may not fully capture the subtle features present in highly nonlinear and complex graph structures. These limitations have prompted researchers to explore more comprehensive methods aimed at a deeper understanding and processing of the structural properties of complex graph data. Future research directions may tend to develop new graph coarsening techniques that not only preserve the spectral properties of the graph, but also effectively identify and preserve the local features of the graph, providing a richer and more accurate large-scale graph data analysis tool. Such progress will provide key technical support for understanding and analyzing large-scale network structures, such as social networks, biological networks, and transportation networks. Graph clustering, graph partitioning, graph cutting, and graph coarsening are interrelated key concepts in graph theory, and they play a vital role in processing and analyzing large-scale graph data. Graph coarsening, in particular, plays a central role in developing efficient graph partitioning methods, which provides a more concise representation for subsequent graph partitioning, clustering, or cutting by reducing the size of the graph while preserving its structural properties.
[0046] In this field, Safro et al. (2015) focused on the coarsening stage and proposed a multi-level graph partitioning coarsening scheme based on algebraic multigrid (AMG) to create a graph with a similar structure to the original graph but smaller in scale. Meyerhenke et al. (2017) improved the scalability and result quality of the graph partitioning coarsening and refinement stages by parallelizing the technology and adopting the label propagation technology originally developed for graph clustering. Dhillon et al. (2007) developed a fast and high-quality multi-level graph clustering algorithm that optimizes a variety of weighted graph clustering objectives, including the popular ratio cut, normalized cut, and ratio association criteria. Karypis et al. (1995) verified the effectiveness of multi-level algorithms in producing good graph partitions through theoretical analysis. Ma et al. (2022) proposed a graph sampling and coarsening scheme suitable for large-scale supply chain models to calculate high-quality approximate solutions. Rhouma et al. (2018) proposed a partition-based coarsening model MCCA (Multi-level Coarsening Compact Area) for the graph reduction problem in large-scale social networks. Khokher et al. (2013) used a weighted average graph based on a fuzzy rule system in a multi-level graph segmentation algorithm, while Kumar et al. (2023) proposed a new optimization-based graph coarsening framework that can jointly learn the coarsened graph matrix and the coarsened feature matrix while ensuring the desired properties.
[0047] Although graph clustering algorithms can effectively group nodes in a graph into clusters with similarities, they usually require manual setting of the number of clusters, a process that may rely on specific experience and prior knowledge. In addition, the performance of these algorithms is highly dependent on the selected model and parameter configuration, which may lead to unstable results. These algorithms may perform poorly when faced with data with large variations in cluster size and density, and their sensitivity to noise and outliers reduces their robustness.
[0048] Graph partitioning algorithms require precise parameter tuning to ensure efficient performance while partitioning a graph into multiple subgraphs, a task that can become particularly challenging when dealing with large-scale datasets. In addition, these algorithms may not fully consider the balance between subgraphs and minimize the number of cut edges, which can affect the quality of the final partitioning.
[0049] For graph cutting algorithms, finding the optimal cutting solution may encounter the problem of high computational cost when processing large-scale graph data. These algorithms often find it difficult to find local optimal solutions within an acceptable time, limiting their efficiency and feasibility in practical applications. In recent years, with the rapid development of deep learning technology, graph coarsening technology has shown great potential in enhancing the training efficiency and effect of graph neural networks (GNNs). Graph coarsening aims to simplify the graph structure by reducing the number of nodes and edges in the graph while retaining the key information and characteristics of the original graph as much as possible. This method has become increasingly important in deep learning, especially in the application of graph neural networks.
[0050] Fahrbach et al. (2020) proposed an innovative graph coarsening method based on Schur complement, which calculates vertex embeddings on a coarsened graph to effectively save time. The efficiency of this method lies mainly in its ability to retain key information related to vertices while reducing computational costs. Huang et al. (2021) demonstrated the application of graph coarsening in scalable training of GNNs. Even if the number of nodes in the graph is reduced by up to 10 times, there is no significant impact on the classification accuracy, which proves the effectiveness of graph coarsening technology in maintaining model performance. The multi-level coarsened GCN (MLC-GCN) method proposed by Xie et al. (2020) not only retains the local information of the graph but also captures the global information by learning graph representations at multiple levels, thereby improving the accuracy of graph classification. The coarsened graph hInfomaxPooling (CGIPool) technology introduced by Pang et al. (2021) effectively maintains graph-level dependencies by maximizing the mutual information between the input of each pooling layer and the coarsened graph.
[0051] Although graph coarsening technology has significant advantages in reducing network complexity and computational burden, it also faces some challenges. For example, if the coarsening process is not properly handled, it may lead to excessive information loss, which in turn affects model performance. To alleviate this problem, dataset concentration or dataset distillation techniques have been proposed as potential solutions. These techniques aim to construct a small synthetic dataset for training graph neural networks, thereby reducing computational costs and improving training efficiency. The DC method proposed by Zhao et al. (2020) is one of the representative works of dataset concentration. This method achieves the purpose of effective concentration by matching the network parameter gradients between a small synthetic dataset and a large real training data. The graph compression method GCOND proposed by Jin et al. (2021) focuses on compressing node features and structural information simultaneously in a supervised manner, thereby reducing the number of nodes. Jin et al. (2022) further proposed the DosCond framework, which effectively compresses the actual graph into a small number of information graphs with discrete structures through a one-step gradient matching strategy.
[0052] Academician Chen Lin's research results published in Sciences in 1982 pointed out that human cognition has the characteristic of "large-scale first": the large outline letters are seen first, and then the specific small letters in the outline letters are seen after further observation, and the whole process is adaptive (Chen 1982). Human brain cognition has a "large-scale first" cognitive mechanism. The visual system is particularly sensitive to global topological characteristics, from coarse-grained to fine-grained. Directly processing the finest-grained raw data does not conform to the laws of human cognition.
[0053] Processing is based on coarse-grained information input, so it has adaptive multi-granularity description capabilities and has computational characteristics such as high efficiency, robustness, and interpretability. Since the number of coarse-grained "granules" is less than the number of sample points, granule calculations are more efficient; the coarse-grained characteristics of granules are not easily affected by fine-grained sample points, so they are more robust; the multi-granularity structure of granules can generate topological structures and coarse-grained descriptions, so they are naturally interpretable.
[0054] Multi-granularity sphere computing is an important model method developed in the field of granular computing in recent years. This method can use "spheres" of different granularity sizes to adaptively represent and cover the sample space, and learn based on spheres. It uses multi-granularity spheres for multi-granularity representation and performs computational learning based on spheres. Xia et al. (2023) used spheres as the basic method for multi-granularity feature representation because the geometric shape of the sphere is completely symmetrical and has the most concise and unified mathematical model expression in any dimensional space, namely {x|(xc)d≤rd}, where x is the sample in the sphere, c and r are the center and radius of the sphere; only two data are needed to represent it in any dimension: center and radius. This is the same as the meaning of graph coarsening technology, so spheres can also be regarded as super nodes.
[0055] Inspired by this, the present invention proposes an efficient and adaptive granular ball graph coarsening method applicable to large-scale graph coarsening, referred to as GBGC. GBGC does not need to calculate the distance between any two graphs of the finest granularity, and can adaptively aggregate the nodes in the original graph into granular balls, which are super nodes in the coarsened graph.
[0056] Recently, Chen et al. (2023) first considered the graph as an element on a metric space with Gromov-Wasserstein (GW) distance, limited the distance difference between two graphs and their coarsened graphs, and used the weighted kernel K-means method to minimize this difference. They proposed a kernel coarsening method (KGC for short), which considers the Laplacian matrix designed only for specific downstream tasks such as graph classification and graph regression tasks.
[0057] However, the KGC method has certain disadvantages. The K-means method relies on the selection of the hyperparameter K value. When the location of the cluster center is not initialized properly, the clustering results will be seriously wrong. When the K value is given, this analysis mode is of single granularity. The KGC method also relies on the use of other effective graph coarsening methods as the initialization of the KGC method to a certain extent. For large-scale graph datasets, the KGC method is ineffective. Most existing graph coarsening methods also have a common problem, that is, they rely on using a given ratio, that is, the coarsening degree r∈(0,1) to control the number of nodes in the coarsened graph.
[0058] Based on this, the present invention proposes a new, more efficient and adaptive granular sphere graph coarsening method that can be applied to large-scale graph coarsening. The method does not contain hyperparameters and can adaptively perform the graph coarsening process.
[0059] According to the cognitive mechanism of "large-scale first", GBGC first regards the entire graph as a GB (Granular-Ball) of the coarsest granularity. At this time, the quality of GB is the worst and cannot effectively represent the properties of the original graph data. Therefore, it is necessary to further split into finer-grained GBs to characterize the distribution of the original graph data until all the granular balls obtained by splitting meet the adaptive quality requirements. In the continuous splitting, the division from coarse-grained to fine-grained is achieved. The size and number of granular balls generated in each part of the graph are dynamically adjusted through adaptive splitting conditions. A small number of large granular balls are used to represent simple distributed data, and a large number of small granular balls are used to represent complex distributed data, thereby achieving adaptive, multi-granular, and flexible coverage and representation of the distribution of the original graph data. Algorithm 1 gives a detailed description of the process of GBGC.
[0060]
[0061] Here, the particle ball generation method is S2-S4 introduced later in the present invention.
[0062] Through granular sphere partitioning, we can effectively handle the optimization problems of non-convex graphs. In optimization, the non-convexity of graphs usually leads to problems of solution space complexity and the existence of local optimal solutions. Especially under global complex distribution, the quality metric may fail due to non-convexity. Through granular sphere partitioning, we decompose the overall optimization problem into multiple sub-problems on local convex sets, which makes it easier to find effective solutions. Using the granular sphere graph coarsening method, we can better represent multi-granularity knowledge concepts and characterize the overall distribution of graph data. The following definition gives the basic mathematical model of the GBGC method.
[0063] Definition 1: Given a graph dataset G = {G1, G2, …, G |D|}, where |D| is the number of graphs in the dataset, N i is the number of nodes in the i-th graph. For the i-th original graph G i , the number of spheres generated from the data set is n, so we use To represent the supernode in the i-th coarsened graph GBG, the number of nodes in each coarsened graph GBG is n. That is to say, for an original graph G, the number of GBs generated by the GBGC method (grain-sphere graph coarsening method) in the present invention is the number of supernodes (the final sub-grain spheres) in the coarsened graph GBG. That is, a supernode is a sub-sphere, and the center of the supernode is the node with the highest degree in the sub-sphere.
[0064]
[0065]
[0066] quality(GB A )+quality(GB B ) <quality(GB)
[0067] In the target of the above model, → can be regarded as a mapping. When GBGC uses granules to generate super nodes, the traditional graph data input is transformed into the granule input of the granule coarsening model. G(V,E,A) represents the node set, edge set and adjacency matrix of the existing i-th graph data. GBG(V GB ,E GB ,A GB ) represents the super node generated by the sphere in the i-th coarsened graph, V GB ,E GB ,A GB They represent the node set, edge set, and adjacency matrix of the coarsened graph. In the first constraint objective, the first term represents the sample coverage rate. The higher the coverage rate, the better, and the less information loss. The second term n represents the number of spheres. Under the constraint condition, the fewer the number of spheres, the better, and the more efficient and robust the calculation of spheres. The second constraint objective is an adaptive rule, where quality(GB) represents the quality of the parent sphere, quality(GB A )+quality(GB B ) represents the sum of the masses of the two sub-spheres. The adaptive quality requirement makes the spherification result better maintain the basic properties of the original image.
[0068] After defining the basic mathematical model of GBGC, it is necessary to measure the quality of the sphere to determine when the sphere continues to split and when it should stop splitting. When the local data presents a uniform distribution, the average connectivity can reflect the density and stability of the sphere, and a high average connectivity usually means that the nodes in the sphere are more closely connected to each other. Therefore, the present invention uses the average connectivity to calculate the quality of the sphere. Next, the definition of the adaptive quality index of GB in the GBGC method is given.
[0069] Definition 2: For any sphere GB k Its quality is measured by the average connectivity (AC k ). AC is calculated by calculating the ratio of the number of edges to the number of points in a graph, that is:
[0070]
[0071] Among them, AC k represents the average connectivity of the k-th sphere, E k represents the number of edges in the kth sphere, V k Represents the number of nodes in the kth sphere.
[0072] Average Connectivity AC k The larger it is, the tighter the nodes in the sphere are connected, and the higher the quality of the sphere is.
[0073] Next, the particle sphere image coarsening method of the present invention is specifically introduced.
[0074] This embodiment 1 provides a method for coarsening and classifying a particle-sphere image, including:
[0075] S1. Integrate all nodes that need to be coarsened and classified to form an initial sphere graph, and regard all nodes with connection relationships as an initial sphere with the coarsest granularity;
[0076] In some embodiments, if the original graph composed of the nodes has disconnected nodes, the original graph is separated into a plurality of connected subgraphs, and then each of the connected subgraphs is regarded as an initial particle sphere.
[0077] S2. In the rough classification stage, select the one with the highest degree nodes as the center point, and based on the k-means++ algorithm, the cluster corresponding to the center point is obtained, and the cluster is set as a coarse-grained sphere. At the same time, the coarse-grained sphere is regarded as the initial parent sphere;
[0078] S3, in the subdivision stage, the two nodes with the highest degree in the parent particle sphere are used as the splitting centers of the parent particle sphere, and each parent particle sphere is binary split based on the corresponding two splitting centers based on the k-means++ algorithm to obtain two daughter particle spheres;
[0079] S4, judging whether the sum of the average connectivity of the two daughter balls belonging to the same parent ball is lower than the average connectivity of the parent ball, if so, stopping the splitting and going to S5, otherwise, taking the two daughter balls as new parent balls respectively and returning to S3;
[0080] That is, if the parent ball GB splits into a child ball GB A The sum of the balls GB B If the sum of the average connectivity of is lower than the average connectivity of the parent particle ball GB, the splitting is stopped and the algorithm converges.
[0081] S5. All the sub-particles that are no longer split are aggregated, thereby completing the coarse classification of the initial graph data.
[0082] In summary, the specific sphere generation of the GBGC method of the present invention is mainly divided into two stages, including one-to-many sphere initialization and fine-grained binary fission. In the one-to-many initialization stage, the present invention hopes to use this method to reduce the overall complexity, obtain a simple and uniform distribution of spheres, and make the quality metric more effective. Otherwise, the quality metric is invalid for complex distributed data. The present invention uses the first iteration of the one-to-many k-means++ algorithm to determine the initial distribution of the spheres. Select the node with the highest degree as the initial center point, and select The method can not only accelerate the subsequent granulation process, but also provide an effective granulation starting point for graphs with a small number of nodes.
[0083] In the fine-grained binary splitting stage, it is performed on the basis of the initialized particle-sphere distribution. At this time, the distribution within the sphere is simple and uniform, and simple binary splitting is used again, which can avoid splitting the sphere with out-degree, which is called over splitting. In each iteration, the algorithm selects the two nodes with the largest degree in each particle sphere as the splitting centers, and divides the particle sphere into two according to the shortest path. By comparing the weighted quality difference between the parent sphere and the split child sphere, it is decided whether to split the parent sphere, ensuring that the split particle sphere can better reflect the structural characteristics of the original graph. This adaptive splitting mechanism ensures that while reducing the scale of the graph through the GBGC method, the basic properties of the original graph are better preserved. Algorithms 2 and 3 give a description of the process of generating particle sphere graphs.
[0084]
[0085]
[0086]
[0087] The time complexity of the GBGC method of the present invention is as follows. Coarse-grained initialization of the granular ball: For an original graph with N nodes and M edges, Init_GB(graph) involves finding the node with the maximum degree, which requires a time complexity of Then, find The time complexity of finding the central node is N+M. Finally, assigning each non-central node only requires traversing the shortest distance between the non-central and central nodes, resulting in a time complexity of therefore,
[0088] Fine-grained binary splitting of granulocytes Split ball (GB graph): Suppose a granulocyte has n nodes and m edges. Fine-grained Split ball (GB graph) involves finding the node with the highest degree, which requires sorting with a time complexity of . Finding two central nodes involves calculating two single-source shortest paths in an unweighted graph, resulting in a time complexity of 2(n + m). Finally, assigning each non-central node only requires traversing the shortest distance between the non-central and the two central nodes, resulting in a time complexity of 2(n - 2). Therefore,
[0089] Generally speaking, since n is less than N and m is less than M, the overall time complexity of GBGC is The present invention compares the time complexity of the GBGC method with the state-of-the-art graph coarsening methods. The results are shown in Table 1, where c is the number of layers that can be regarded as a constant, Δ represents the maximum combinatorial degree, and Δ << N, k is the number of times the while loop is executed, where k < rN, T limits the number of k-means iterations, and r represents the coarsening ratio. Obviously, the time complexity of the GBGC method is always lower than that of the compared methods.
[0090] Table 1
[0091]
[0092] The core idea of the present invention is to generate granulocytes with different granularities by adaptively splitting granulocytes, so as to comprehensively cover and accurately represent the sample space. Its adaptability is reflected in the ability to dynamically adjust the splitting strategy of granulocytes according to the complexity and distribution of the data. For data with simple distributions, GBGC is represented by fewer large granulocytes, while for data with complex distributions, more small granulocytes are used to achieve a refined characterization of the data. This multi-granularity representation method enables GBGC to more efficiently capture the global structure and local features in graph data, thus significantly outperforming traditional methods in terms of data representation ability.
[0093] The design inspiration of the GBGC method comes from the "global priority" law in human cognition, that is, when dealing with graph data, first start from a global perspective and then gradually refine to local features. This strategy enables GBGC to achieve effective coarsening during the graph coarsening process without relying on prior knowledge in specific fields or complex parameter adjustments. Especially when facing large-scale and complex graph data, it reduces the workload of manual parameter tuning and significantly improves the generality and usability of the method.
[0094] Unlike traditional graph coarsening algorithms that mostly rely on graph clustering methods, the GBGC method avoids the problems of insufficient interpretability and high time complexity in the coarsening process of these methods. The granular-based graph coarsening algorithm accelerates the convergence speed of the coarsening process through the initial division of coarse grains; while the fine-grained binary splitting strategy effectively improves the quality of the granular balls and enhances the ability of the granular balls to describe the data, while maintaining the high interpretability of the coarsening process.
[0095] Embodiment 2 discloses a particle-sphere image coarsening classification system, which is used to implement a particle-sphere image coarsening classification method of embodiment 1, including:
[0096] An integration module is used to integrate all nodes that need to be coarsened and classified to form an initial sphere graph, and regard all nodes with connection relationships as an initial sphere with the coarsest granularity, wherein the connection relationship between the nodes is diverse and dynamic;
[0097] Initialization module, used to select the highest degree in the coarse classification stage nodes as the center point, and based on the k-means++ algorithm, obtain the cluster corresponding to the center point, let the cluster be the coarsened particle sphere, and at the same time, regard the coarsened particle sphere as the initial parent particle sphere;
[0098] A binary splitting module is used to use the two nodes with the highest degree in the parent particle sphere as the splitting centers of the parent particle sphere in the subdivision stage, and each parent particle sphere is binary split according to the corresponding two splitting centers based on the k-means++ algorithm to obtain two daughter particle spheres;
[0099] A judgment module is used to judge whether the sum of the average connectivity of the two daughter particles belonging to the same parent particle ball is lower than the average connectivity of the parent particle ball. If so, the splitting is stopped and the aggregation module is entered. Otherwise, the two daughter particles are respectively used as new parent particles, and the new parent particles are binary-split again by the binary-split module;
[0100] The summary module is used to summarize all the sub-spheres that are no longer split, so as to complete the classification of the sphere graph composed of all nodes.
[0101] Example 3 also discloses an electronic device, characterized in that it includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a particle sphere image coarsening classification method as in Example 1.
[0102] Embodiment 1 further discloses a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements a particle-sphere image coarsening classification method of embodiment 1.
[0103] This invention is at the forefront of computer science, with a particular focus on the sub-field of social network analysis and graph data processing. The core of its exploration is graph coarsening technology, which is applied to social network data, with the goal of significantly improving the processing efficiency and classification accuracy of graph classification tasks. This technology focuses on how to reduce computational complexity through carefully optimized granular graph coarsening methods, while still retaining key topological information in the graph in the process. Such technology allows us to analyze and classify complex structures and patterns in social networks more efficiently and effectively, whether it is tasks such as community discovery, influence assessment, or trend prediction.
[0104] The uniqueness of this technology lies in its interdisciplinary integration. It is not only deeply rooted in the rich theoretical foundation of graph theory, but also widely absorbs advanced technologies and methods in the fields of machine learning and data mining. Through this interdisciplinary integration, the present invention aims to break through the bottlenecks encountered by traditional graph data processing methods when facing large-scale social network data, such as slow processing speed, low accuracy, poor adaptability and other problems. Through a carefully designed graph coarsening strategy, this method can not only significantly reduce the size of the data while ensuring the quality of data processing, but also retain the most valuable information in the graph while reducing the dimension, thereby achieving higher accuracy and lower time cost in key tasks such as graph classification and node classification.
[0105] In addition, the present invention also focuses on the algorithm's adaptability and generalization ability. Through the intelligent graph coarsening process, the algorithm can automatically adjust the coarsening strategy according to the characteristics of different social networks and the size of the data set to achieve the best data processing effect. This adaptability makes the technology not only suitable for current social network platforms, but also can easily adapt to the development and changes of future social networks.
[0106] In summary, this invention provides an innovative solution in the field of social network analysis and graph data processing through its efficient, adaptive graph coarsening method with strong fitting and generalization capabilities. It will provide more powerful and flexible tools for processing and analyzing large-scale social network data, help reveal deeper social network structures and dynamics, and promote the development and progress of computer science, social network analysis, and related interdisciplinary disciplines.
[0107] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for coarsening and classifying a granular sphere image, characterized in that: include: Integrate all nodes that need to be coarsened and classified to form initial graph data, and regard all nodes with connection relationships as an initial sphere with the coarsest granularity, wherein the connection relationships between the nodes are diverse and dynamic; In the coarse classification stage, select the one with the highest degree nodes as the center point, and based on the k-means++ algorithm, the cluster corresponding to the center point is obtained, and the cluster is set as a coarse-grained sphere. At the same time, the coarse-grained sphere is regarded as the initial parent sphere; In the subdivision stage, the two nodes with the highest degree in the parent particle sphere are used as the splitting centers of the parent particle sphere, and each parent particle sphere is binary split based on the corresponding two splitting centers based on the k-means++ algorithm to obtain two daughter particle spheres; Determine whether the sum of the average connectivity of the two daughter balls belonging to the same parent ball is lower than the average connectivity of the parent ball. If so, stop splitting and proceed to the next step. Otherwise, take the two daughter balls as new parent balls respectively and return to the previous step. All the sub-spheres that are no longer split are aggregated, thereby completing the coarse classification of the initial graph data.
2. A method for coarsening and classifying a particle-sphere image according to claim 1, characterized in that: If the original graph composed of the nodes has disconnected nodes, the original graph is separated into a plurality of connected subgraphs, and then each of the connected subgraphs is regarded as an initial particle sphere.
3. A method for coarsening and classifying a particle-sphere image according to claim 1, characterized in that: The calculation formula of the average connectivity is: Among them, AC k represents the average connectivity of the k-th sphere, E k represents the number of edges in the kth sphere, V k Represents the number of nodes in the kth sphere.
4. The method for coarsening and classifying a particle-sphere image according to claim 1, characterized in that: In the coarse classification stage, the time complexity of generating the coarse-grained sphere based on the k-means++ algorithm is: Where N is the number of nodes in the initial sphere, M is the number of edges in the initial sphere, and O(o) represents the time complexity.
5. The method for coarsening and classifying a particle-sphere image according to claim 1, characterized in that: In the subdivision stage, the time complexity of generating the sub-particle spheres based on the k-means++ algorithm is: Where n is the number of nodes in the parent sphere, m is the number of edges in the parent sphere, and O(*) represents the time complexity.
6. A method for coarsening and classifying a particle-sphere image according to claim 1, characterized in that: The time complexity of the initial sphere composed of all connected nodes is:
7. The method for coarsening and classifying a particle-sphere image according to claim 1, characterized in that: The types of nodes include individuals in social networks, papers in citation networks, entities in knowledge graphs, traffic points in traffic networks, users and products in e-commerce networks, proteins or genes in bioinformatics networks, and devices or users in communication networks.
8. A particle-sphere image coarsening classification system, used to implement a particle-sphere image coarsening classification method according to any one of claims 1 to 7, characterized in that: include: An integration module is used to integrate all nodes that need to be coarsened and classified to form an initial sphere graph, and regard all nodes with connection relationships as an initial sphere with the coarsest granularity, wherein the connection relationship between the nodes is diverse and dynamic; Initialization module, used to select the highest degree in the coarse classification stage nodes as the center point, and based on the k-means++ algorithm, the cluster corresponding to the center point is obtained, and the cluster is set as a coarse-grained sphere. At the same time, the coarse-grained sphere is regarded as the initial parent sphere; A binary splitting module is used to use the two nodes with the highest degree in the parent particle sphere as the splitting centers of the parent particle sphere in the subdivision stage, and each parent particle sphere is binary split according to the corresponding two splitting centers based on the k-means++ algorithm to obtain two daughter particle spheres; A judgment module is used to judge whether the sum of the average connectivity of the two daughter particles belonging to the same parent particle ball is lower than the average connectivity of the parent particle ball. If so, the splitting is stopped and the aggregation module is entered. Otherwise, the two daughter particles are respectively used as new parent particles, and the new parent particles are binary-split again by the binary-split module; The summarization module is used to summarize all the sub-particles that are no longer split, so as to complete the coarse classification of the initial graph data.
9. An electronic device, characterized in that: It includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a granular sphere image coarsening classification method as described in any one of claims 1 to 7.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a method for coarsening and classifying a granular sphere image according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Task processing method and device of computer service platform and electronic equipment
CN122490065A