A method, device, electronic device and storage medium for graph data partitioning based on label characteristics

By extracting weakly connected components from graph data and determining their target partitions based on the clustering coefficient and the minimum non-zero eigenvalue, the problem of cross-partition same-label query connections is solved, and the processing efficiency and independent query capability of graph data are improved.

CN119888354BActive Publication Date: 2025-09-26NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510050905.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-09-26
Estimated Expiration
2045-01-13

AI Technical Summary

Technical Problem

The existing graph data partitioning method is difficult to avoid cross-partition same-label query connections in multi-label scenarios, resulting in reduced graph data processing efficiency.

Method used

By extracting weakly connected components from graph data, calculating their clustering coefficients and minimum non-zero eigenvalues ​​in preset partitions, and determining their target partitions based on these indicators, the computational complexity can be reduced and the partition independence can be improved.

Benefits of technology

It effectively reduces the interaction cost of graph data queries, improves partition quality and processing efficiency, and ensures the independent query capability of graph data within partitions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888354B_ABST
    Figure CN119888354B_ABST
Patent Text Reader

Abstract

The present application discloses a graph data partitioning method, device, electronic device and storage medium based on label characteristics, the method comprising: extracting N weakly connected components from the graph data; wherein a weakly connected component comprises a descriptive label between entity objects in the graph data, and N is an integer greater than 1; calculating the clustering coefficient and the minimum non-zero eigenvalue of the first weakly connected component of any one of the N weakly connected components in M ​​preset partitions; wherein the clustering coefficient is used to characterize the label density of the first weakly connected component in each of the M preset partitions, and the minimum non-zero eigenvalue is used to characterize the connectivity of the first weakly connected component in each of the M preset partitions; wherein M is an integer greater than 0; and determining the target partition of the first weakly connected component in the M preset partitions based on the clustering coefficient and the minimum non-zero eigenvalue of each of the M preset partitions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for graph data partitioning based on label characteristics. Background Art

[0002] Graph data, as a structure that describes complex relationships between entities, plays a crucial role in many fields. Graph data consists of vertices (V) and edges (E); vertices represent entities, while edges represent connections or relationships between these entities. Both have various entity types or labels (L). Graph data has broad applications in various fields, such as biomolecular research, social network design, and knowledge graph generation.

[0003] As graph data scales, performance bottlenecks in centralized graph data management become increasingly prominent, such as insufficient memory and high computing resource requirements. To improve graph data processing efficiency, graph data partitioning algorithms can be used to divide a large graph dataset into different nodes (partitions) for management, reducing complexity and improving efficiency.

[0004] Existing approaches to graph data partitioning aim to minimize edge and vertex cuts or maximize the tightness of the structure within the partitions. However, for multi-label graph data, these approaches struggle to avoid cross-partition query joins for the same label. Consequently, independent queries on graph data with the same label cannot be performed without inter-partition joins, reducing graph data processing efficiency. Summary of the Invention

[0005] The present application provides a graph data partitioning method, device, electronic device and storage medium based on label characteristics, which are used to avoid cross-partition query connections with the same label to improve the processing efficiency of graph data.

[0006] In a first aspect, a method for partitioning graph data based on label characteristics is provided, comprising:

[0007] Extracting N weakly connected components from the graph data; wherein a weakly connected component includes a descriptive label between entity objects in the graph data, and N is an integer greater than 1;

[0008] Calculating the clustering coefficient and the minimum non-zero eigenvalue of any first weakly connected component of the N weakly connected components in M ​​preset partitions; wherein the clustering coefficient is used to characterize the label density of the first weakly connected component in each of the M preset partitions, and the minimum non-zero eigenvalue is used to characterize the connectivity of the first weakly connected component in each of the M preset partitions; wherein M is an integer greater than 0;

[0009] According to the clustering coefficients and minimum non-zero eigenvalues ​​of the M preset partitions, a target partition of the first weakly connected component is determined among the M preset partitions.

[0010] In an embodiment of the present application, N weakly connected components are first extracted from the graphic data, and the clustering coefficient and the minimum non-zero eigenvalue of the first weakly connected component of any one of the N weakly connected components in M ​​preset partitions are calculated. The clustering coefficient is used to characterize the label density of the first weakly connected component in each of the M preset partitions, and the minimum non-zero eigenvalue is used to characterize the connectivity of the first weakly connected component in each of the M preset partitions. Then, based on the clustering coefficient and the minimum non-zero eigenvalue of each of the M preset partitions, the target partition of the first weakly connected component is determined in the M preset partitions, which reduces the computational complexity. After the first weakly connected component is assigned to the target partition, no information from other partitions is required in subsequent queries, so it can be executed independently internally, effectively reducing the interaction cost and improving the partition quality.

[0011] In some embodiments, determining the target partition of the first weakly connected component from the M preset partitions according to the clustering coefficients and minimum non-zero eigenvalues ​​of the M preset partitions includes:

[0012] Calculating the load balancing coefficient of each of the M preset partitions;

[0013] Determining, according to the respective minimum non-zero eigenvalues ​​of the M preset partitions and the respective clustering coefficients, the fixed-point repetition rates of the first weakly connected component in the M preset partitions;

[0014] According to the fixed-point repetition rates of the respective M preset partitions and the load balancing coefficients of the respective M preset partitions, a target partition of the first weakly connected component is determined in the M preset partitions.

[0015] In some embodiments, calculating the load balancing coefficient of each of the M preset partitions includes:

[0016] The load balancing coefficients of the M preset partitions are calculated according to the total number of edges and the partition size of the largest preset partition and the total number of edges and the partition size of the smallest preset partition among the M preset partitions.

[0017] In some embodiments, the load balancing coefficient satisfies the following expression:

[0018]

[0019] Among them, the Characterizes the load balancing coefficient of the i-th preset partition, Characterizing the harmonic parameters, the Characterizing the minimum value, the Characterizes the total number of edges and partition size of the largest preset partition among the M preset partitions, Characterizes the total number of edges and partition size of the i-th preset partition, the Indicates the total number of edges and the partition size of the smallest preset partition among the M preset partitions.

[0020] In some embodiments, the minimum non-zero eigenvalue is calculated using a Lanczos algorithm.

[0021] In a second aspect, a graphics data partitioning device is provided, comprising:

[0022] An extraction module, configured to extract N weakly connected components from the graph data; wherein a weakly connected component includes a descriptive label between entity objects in the graph data, and N is an integer greater than 1;

[0023] A calculation module, configured to calculate a clustering coefficient and a minimum non-zero eigenvalue of a first weakly connected component of any one of the N weakly connected components in M ​​preset partitions; wherein the clustering coefficient is used to characterize the label density of each of the first weakly connected component in the M preset partitions, and the minimum non-zero eigenvalue is used to characterize the connectivity of each of the first weakly connected component in the M preset partitions; wherein M is an integer greater than 0;

[0024] A determination module is configured to determine a target partition of the first weakly connected component from among the M preset partitions according to the clustering coefficients and minimum non-zero eigenvalues ​​of the respective M preset partitions.

[0025] In some embodiments, the determining module is specifically configured to:

[0026] Calculating the load balancing coefficient of each of the M preset partitions;

[0027] Determining, according to the respective minimum non-zero eigenvalues ​​of the M preset partitions and the respective clustering coefficients, the fixed-point repetition rates of the first weakly connected component in the M preset partitions;

[0028] According to the fixed-point repetition rates of the respective M preset partitions and the load balancing coefficients of the respective M preset partitions, a target partition of the first weakly connected component is determined in the M preset partitions.

[0029] In some embodiments, the determining module is specifically configured to:

[0030] The load balancing coefficient of each of the M preset partitions is calculated according to the total number of edges and the partition size of the largest preset partition and the total number of edges and the partition size of the smallest preset partition among the M preset partitions.

[0031] According to a third aspect, an electronic device is provided, including:

[0032] A memory for storing a computer program; a processor for implementing any one of the methods described in the first aspect when executing the computer program stored in the memory.

[0033] According to a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of the first aspects is implemented.

[0034] For each of the above-mentioned aspects from the second to the fourth aspects and the technical effects that may be achieved by each of the aspects, please refer to the above-mentioned description of the technical effects that can be achieved by the first aspect or various possible solutions in the first aspect, and no further details will be given here. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A flowchart of a method for dividing graph data based on label characteristics provided in an embodiment of the present application;

[0036] Figure 2 A partition quality assessment graph after the graphic data is divided provided in an embodiment of the present application;

[0037] Figure 3 A schematic diagram of the structure of a graphics data partitioning device provided in an embodiment of the present application;

[0038] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail with reference to the accompanying drawings. The specific operating methods in the method embodiments can also be applied to device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. A is connected to B, which can represent the following two situations: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0040] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are first explained below.

[0041] (1) The Lanczos algorithm is an algorithm that transforms a symmetric matrix into a symmetric tridiagonal matrix through an orthogonal similarity transformation.

[0042] (2) The Weakly Connected Components (WCC) algorithm is used to find the set of connected nodes in an undirected graph. Two nodes are considered connected if there is a path between them. All interconnected nodes form a connected component.

[0043] (3) A sparse matrix refers to a matrix in which most elements are zero. The storage formats of a sparse matrix include a compressed sparse row format and a compressed sparse column format. In the embodiment of the present application, the sparse matrix of the weakly connected components of each partition can be represented as a sparse bell-connected matrix, which is used to store the row index and column index of the non-zero elements. For example, the expression: ; Among them, if there are edges between vertices in a weakly connected component, ,but ;otherwise .

[0044] (4) The compressed sparse row format consists of three arrays: the val array is used to store the non-zero elements of the matrix. The col_ind and row_ind arrays are used to store the index in the val array, where each col and row starts. Given the size of the sparse matrix, the compressed sparse row format is defined as follows:

[0045]

[0046] in, are the non-zero elements of the sparse matrix; is the column index of the non-zero element; are the row indices of the nonzero elements.

[0047] To further illustrate the technical solutions provided by the embodiments of the present application, this is described in detail below with reference to the accompanying drawings and specific implementation methods. Although the embodiments of the present application provide the method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on routine or no creative labor. In the steps where there is no necessary causal relationship logically, the execution order of these steps is not limited to the execution order provided by the embodiments of the present application. The method may be executed or executed in parallel in the order of the methods shown in the embodiments or drawings during the actual processing process or when the device is executed.

[0048] Figure 1 This is a flowchart of a method for dividing graph data based on label characteristics provided in an embodiment of the present application. This process can be executed by a graph data division device, which can be implemented in software and / or hardware. Figure 1 As shown, the process includes the following steps:

[0049] 101: Extract N weakly connected components from the graphic data.

[0050] A weakly connected component (also called a weakly connected subgraph) includes a descriptive label between entity objects in the graph data, and N is an integer greater than 1.

[0051] In this step, all descriptive labels in the graph data are classified to obtain a series of weakly connected components representing different types.

[0052] 102: Calculate the clustering coefficient and the minimum non-zero eigenvalue of the first weakly connected component of any one of the N weakly connected components in the M preset partitions.

[0053] In this step, the clustering coefficient is used to characterize the label density of the first weakly connected component in each of the M preset partitions, which is convenient for subsequent evaluation of the quality of graphic data partitioning and the cost of graphic data query. The minimum non-zero eigenvalue is used to characterize the connectivity of the first weakly connected component in each of the M preset partitions. M is an integer greater than 0, and the specific value of M can be flexibly set according to actual needs.

[0054] In some embodiments, the minimum non-zero eigenvalue is calculated using a Lanczos algorithm. The higher the minimum non-zero eigenvalue is, the better the connectivity of the weakly connected component is.

[0055] In some embodiments, the minimum non-zero eigenvalue of the weakly connected component can be calculated by pre-constructing a Laplacian matrix L=DA; wherein, is the degree matrix, is the corresponding adjacency matrix; calculate the characteristic polynomial (f(λ) = det(L−λI)) based on the Laplace matrix, then solve the eigenvalues ​​of the characteristic polynomial and find the minimum non-zero eigenvalue among all eigenvalues.

[0056] In some embodiments, the clustering coefficient satisfies the following expression:

[0057]

[0058] in, Characterizes the number of descriptive labels in the first weakly connected component, Characterizes the number of open triples, which refers to a group of three nodes where at least one node is connected to two other nodes.

[0059] 103: Determine a target partition of the first weakly connected component from the M preset partitions according to the clustering coefficients and minimum non-zero eigenvalues ​​of the respective M preset partitions.

[0060] In this step, the load balancing coefficients of each of the M preset partitions are calculated. Then, based on the minimum non-zero eigenvalues ​​and clustering coefficients of each of the M preset partitions, the fixed-point repetition rates of the first weakly connected component in each of the M preset partitions are determined. Furthermore, based on the fixed-point repetition rates and load balancing coefficients of each of the M preset partitions, the target partition for the first weakly connected component is determined within the M preset partitions. The fixed-point repetition rate represents the proportion of repeated vertices between the preset partitions and is inversely proportional to the structural density of the subgraph (i.e., the weakly connected component). Generally, the denser the subgraph structure, the smaller the fixed-point repetition rate. The load balancing coefficient represents a quantitative score of the load balancing degree of the preset partitions. The smaller the difference between partitions, the larger the load balancing coefficient.

[0061] In some embodiments, the load balancing coefficient of each of the M preset partitions may be calculated as follows:

[0062] The load balancing coefficients of the M preset partitions are calculated according to the total number of edges and the partition size of the largest preset partition and the total number of edges and the partition size of the smallest preset partition.

[0063] Furthermore, the load balancing coefficient satisfies the following expression:

[0064]

[0065] in, Characterizes the load balancing coefficient of the i-th preset partition, Characterization of harmonic parameters Characterize the minimum value, Represents the total number of edges and partition size of the largest preset partition among the M preset partitions, Characterizes the total number of edges and partition size of the i-th preset partition, Indicates the total number of edges and partition size of the smallest preset partition among the M preset partitions.

[0066] In some embodiments, the fixed-point repetition rate satisfies the following expression:

[0067] +

[0068] Among them, the Characterizes the minimum non-zero eigenvalue in the i-th preset partition, which Represents the clustering coefficient in the i-th preset partition.

[0069] In the embodiment of the present application, a balanced partition with high internal connectivity is ensured by the clustering coefficient and the minimum non-zero eigenvalue of the Laplace matrix, thereby reducing the cost of graph data query and improving the quality of graph data partitioning.

[0070] In some embodiments, based on the fixed-point repetition rate of each of the M preset partitions and the clustering coefficient of each of the M preset partitions, the target partition of the first weakly connected component is determined among the M preset partitions. This can be: adding the fixed-point repetition rate and clustering coefficient of a preset partition among the M preset partitions to obtain a comprehensive metric of the preset partition (characterizing the performance, capacity, storage, etc. of the partition), and so on. The other preset partitions are also calculated in the above manner to calculate the comprehensive metric of each preset partition, and based on this, the above-mentioned first weakly connected component is allocated to the preset partition with the best comprehensive metric.

[0071] In an embodiment of the present application, N weakly connected components are first extracted from the graphic data, and the clustering coefficient and the minimum non-zero eigenvalue of the first weakly connected component of any one of the N weakly connected components in M ​​preset partitions are calculated. The clustering coefficient is used to characterize the label density of the first weakly connected component in each of the M preset partitions, and the minimum non-zero eigenvalue is used to characterize the connectivity of the first weakly connected component in each of the M preset partitions. Then, based on the clustering coefficient and the minimum non-zero eigenvalue of each of the M preset partitions, the target partition of the first weakly connected component is determined in the M preset partitions, which reduces the computational complexity. After the first weakly connected component is assigned to the target partition, no information from other partitions is required in subsequent queries, so it can be executed independently internally, effectively reducing the interaction cost and improving the partition quality.

[0072] like Figure 2 As shown, a partition quality assessment diagram after the graphic data is divided provided by an embodiment of the present application is exemplarily shown. Figure 2 In the figure, graph data partitioning using MDL and graph partitioning software (such as METIS) in freebase and DBpedia scenarios is shown, and quantitative evaluations of the duplicate vertex ratio P|Vcross| and the average number of descriptive label types of nodes |L| are shown respectively. From the perspective of global query, the graph data partitioning method using METIS is compared with the graph data partitioning method based on MDL in this application. Although the minimum edge splitting partitioning of METIS generates more duplicate vertices and a smaller average degree, MDL has fewer internal descriptive labels and better local target storage management query performance.

[0073] It should be noted that the above-mentioned graphical data includes but is not limited to data on gene-chemistry-interaction relationships, chemistry-disease associations, gene-disease associations, and personal attributes (such as citizenship, gender, and occupation).

[0074] Based on the same technical concept, an embodiment of the present application also provides a graph data partitioning device, which can implement the above-mentioned graph data partitioning method process based on label characteristics in the embodiment of the present application.

[0075] Figure 3 This is a schematic diagram of the structure of a graphic data segmentation device provided in an embodiment of the present application. The device includes: an extraction module 301, a calculation module 302, and a determination module 303.

[0076] Extraction module 301, configured to extract N weakly connected components from the graph data; wherein a weakly connected component includes a descriptive label between entity objects in the graph data, and N is an integer greater than 1;

[0077] A calculation module 302 is configured to calculate a clustering coefficient and a minimum non-zero eigenvalue of a first weakly connected component of any one of the N weakly connected components in M ​​preset partitions; wherein the clustering coefficient is used to characterize the label density of each of the first weakly connected component in the M preset partitions, and the minimum non-zero eigenvalue is used to characterize the connectivity of each of the first weakly connected component in the M preset partitions; wherein M is an integer greater than 0;

[0078] The determination module 303 is configured to determine a target partition of the first weakly connected component from among the M preset partitions according to the clustering coefficients and minimum non-zero eigenvalues ​​of the respective M preset partitions.

[0079] In some embodiments, the determining module 303 is specifically configured to:

[0080] Calculating the load balancing coefficient of each of the M preset partitions;

[0081] Determining, according to the respective minimum non-zero eigenvalues ​​of the M preset partitions and the respective clustering coefficients, the fixed-point repetition rates of the first weakly connected component in the M preset partitions;

[0082] According to the fixed-point repetition rates of the respective M preset partitions and the load balancing coefficients of the respective M preset partitions, a target partition of the first weakly connected component is determined in the M preset partitions.

[0083] In some embodiments, the determining module 303 is specifically configured to:

[0084] The load balancing coefficients of the M preset partitions are calculated according to the total number of edges and the partition size of the largest preset partition and the total number of edges and the partition size of the smallest preset partition among the M preset partitions.

[0085] It should be noted here that the above-mentioned device provided in the embodiment of the present application can implement all the method steps in the above-mentioned method embodiment and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.

[0086] Based on the same technical concept, an electronic device is also provided in an embodiment of the present application, which can realize the functions of the aforementioned graphic data division device.

[0087] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0088] At least one processor 401, and a memory 402 connected to the at least one processor 401. The specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application. Figure 4 In the example, the processor 401 and the memory 402 are connected via a bus 400. Figure 4 The bus 400 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The diagram is represented by only one thick line, but this does not mean that there is only one bus or one type of bus. Alternatively, the processor 401 may also be referred to as a controller, without limitation to the name.

[0089] In the embodiment of the present application, the memory 402 stores instructions that can be executed by at least one processor 401. The at least one processor 401 can execute the above-mentioned method of dividing graph data based on label characteristics by executing the instructions stored in the memory 402. The processor 401 can implement Figure 3 The functions of each module in the device shown.

[0090] Among them, the processor 401 is the control center of the device, which can use various interfaces and lines to connect the various parts of the entire control device, and monitor the device as a whole by running or executing instructions stored in the memory 402 and calling data stored in the memory 402, the various functions of the device and processing data.

[0091] In the embodiment of the present application, the processor 401 may include one or more processing units. The processor 401 may integrate an application processor and a modem processor. The application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily processes wireless communications. It is understood that the modem processor may not be integrated into the processor 401. In some embodiments, the processor 401 and the memory 402 may be implemented on the same chip. In some embodiments, they may also be implemented on separate chips.

[0092] The processor 401 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method for segmenting graph data based on label characteristics disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.

[0093] The memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 402 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 402 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 402 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0094] By designing and programming the processor 401, the code corresponding to the graph data partitioning method based on label characteristics introduced in the above embodiment can be fixed into the chip, so that the chip can execute Figure 1The embodiment shown is a graph data partitioning method based on label characteristics. How to design and program the processor 401 is a technology well known to those skilled in the art and will not be described in detail here.

[0095] It should be noted here that the above-mentioned electronic device provided in the embodiment of the present application can implement all the method steps implemented in the above-mentioned method embodiment and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as those in the method embodiment will not be described in detail here.

[0096] Based on the same technical concept, embodiments of the present application provide a computer storage medium comprising computer program code. When executed on a computer, the computer executes any of the aforementioned methods for segmenting graph data. Because the principles underlying the problem solved by the aforementioned computer storage medium are similar to those of the aforementioned methods for segmenting graph data, the implementation of the aforementioned computer storage medium can be referenced to the implementation of the aforementioned methods, and any repetitions will not be repeated.

[0097] In a specific implementation process, computer storage media may include: Universal Serial Bus Flash Drive (USB), mobile hard disk, Read-Only Memory (ROM), Random Access Memory (RAM), magnetic disk or optical disk, and other storage media that can store program code.

[0098] Based on the same technical concept, embodiments of the present application also provide a computer program product, comprising computer program code. When executed on a computer, the computer program code causes the computer to execute any of the aforementioned methods for segmenting graph data. Because the principles underlying the problems solved by the aforementioned computer program product are similar to those of the aforementioned methods for segmenting graph data, the implementation of the aforementioned computer program product can be referenced to the implementation of the aforementioned methods, and any repetitions will not be repeated.

[0099] The computer program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0100] The methods described herein can be implemented in whole or in part using software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described herein are performed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, a core network device, an OAM, or other programmable device.

[0101] The computer program or instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired or wireless method. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; an optical medium, such as a digital video disk; or a semiconductor medium, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.

[0102] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage) containing computer-usable program code.

[0103] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that performs the functions specified in one or more boxes.

[0104] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0105] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0106] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of the present invention fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A graph data partitioning method based on label characteristics, characterized in that: include: Extracting N weakly connected components from the graph data; wherein a weakly connected component includes a descriptive label between entity objects in the graph data, and N is an integer greater than 1; Calculating the clustering coefficient and the minimum non-zero eigenvalue of any first weakly connected component of the N weakly connected components in M ​​preset partitions; wherein the clustering coefficient is used to characterize the label density of the first weakly connected component in each of the M preset partitions, and the minimum non-zero eigenvalue is used to characterize the connectivity of the first weakly connected component in each of the M preset partitions; wherein M is an integer greater than 0; Determining a target partition of the first weakly connected component among the M preset partitions according to the clustering coefficient and the minimum non-zero eigenvalue of each of the M preset partitions; The step of determining the target partition of the first weakly connected component from the M preset partitions according to the clustering coefficients and the minimum non-zero eigenvalues ​​of the respective M preset partitions includes: Calculating the load balancing coefficient of each of the M preset partitions; Determining, according to the respective minimum non-zero eigenvalues ​​of the M preset partitions and the respective clustering coefficients, the fixed-point repetition rates of the first weakly connected component in the M preset partitions; According to the fixed-point repetition rate of each of the M preset partitions and the load balancing coefficient of each of the M preset partitions, a target partition of the first weakly connected component is determined in the M preset partitions; wherein The load balancing coefficient satisfies the following expression: ; in, Characterizes the load balancing coefficient of the i-th preset partition, Characterize the harmonic parameters, Characterize the minimum value, Characterizes the total number of edges and the partition size of the largest preset partition among the M preset partitions, Characterize the total number of edges and partition size of the i-th preset partition, Indicates the total number of edges and the partition size of the smallest preset partition among the M preset partitions.

2. The method according to claim 1, wherein The calculating of the load balancing coefficients of the M preset partitions includes: The load balancing coefficients of the M preset partitions are calculated according to the total number of edges and the partition size of the largest preset partition and the total number of edges and the partition size of the smallest preset partition among the M preset partitions.

3. The method according to claim 1, wherein The minimum non-zero eigenvalue is calculated using the Lanczos algorithm.

4. A graphic data segmentation device based on label characteristics, characterized in that: include: An extraction module, configured to extract N weakly connected components from the graph data; wherein a weakly connected component includes a descriptive label between entity objects in the graph data, and N is an integer greater than 1; A calculation module, configured to calculate a clustering coefficient and a minimum non-zero eigenvalue of a first weakly connected component of any one of the N weakly connected components in M ​​preset partitions; wherein the clustering coefficient is used to characterize the label density of each of the first weakly connected component in the M preset partitions, and the minimum non-zero eigenvalue is used to characterize the connectivity of each of the first weakly connected component in the M preset partitions; wherein M is an integer greater than 0; A determination module is configured to determine a target partition of the first weakly connected component in the M preset partitions according to the clustering coefficient and the minimum non-zero eigenvalue of each of the M preset partitions; wherein The determining module is specifically configured to: Calculating the load balancing coefficient of each of the M preset partitions; Determining, according to the respective minimum non-zero eigenvalues ​​of the M preset partitions and the respective clustering coefficients, the fixed-point repetition rates of the first weakly connected component in the M preset partitions; According to the fixed-point repetition rate of each of the M preset partitions and the load balancing coefficient of each of the M preset partitions, a target partition of the first weakly connected component is determined in the M preset partitions; wherein The load balancing coefficient satisfies the following expression: ; in, Characterizes the load balancing coefficient of the i-th preset partition, Characterize the harmonic parameters, Characterize the minimum value, Characterizes the total number of edges and the partition size of the largest preset partition among the M preset partitions, Characterize the total number of edges and partition size of the i-th preset partition, Indicates the total number of edges and the partition size of the smallest preset partition among the M preset partitions.

5. The device according to claim 4, characterized in that The determining module is specifically configured to: The load balancing coefficients of the M preset partitions are calculated according to the total number of edges and the partition size of the largest preset partition and the total number of edges and the partition size of the smallest preset partition among the M preset partitions.

6. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 3 when executing the computer program stored in the memory.

7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Distributed SPARQL query optimization method based on minimum attribute cut

    CN114116785A

  • Deep relation search method and device for large-scale data and search engine

    CN118690056A