Graph data processing method and equipment cluster

Partial sub-graphs are collected and generated in parallel by the second set of devices in the device cluster, and the target device merges these partial sub-graphs, the problem of inefficient generation of community sub-graphs in graph data processing is solved, and efficient community sub-graph generation is realized, which is especially suitable for processing graph data in hotspot communities.

CN119719423AActive Publication Date: 2025-03-28ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411777623.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-28
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

When processing huge scale graph data, how to efficiently generate community subgraphs to simplify data structure and improve analysis efficiency is a huge challenge, especially when the number of point-edge information involved in hotspot communities is very large, the communication congestion and processing time complexity of the target device.

Method used

Partial sub-maps are collected and generated in parallel through a second set of devices in the device cluster, and these partial sub-maps are merged through the target device to generate community sub-maps of the target community. Using the computing resources and communication capabilities of multiple computing devices, the stored target point-edge information is distributed to reduce communication load and improve processing efficiency.

Benefits of technology

It significantly improves the efficiency of generating community subgraphs, slows down the communication overhead of computing devices, and avoids the communication congestion and processing time complexity of target devices, especially when dealing with hotspot communities, the efficiency is significantly improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719423A_ABST
    Figure CN119719423A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a graph data processing method and a device cluster. The method is used for generating a community sub-graph corresponding to a target community from an original graph, the original graph comprises multiple pieces of point side information, and the multiple pieces of point side information are stored in a first device set of a device cluster in a scattered mode. In the method, a device cluster determines multiple pieces of target point side information belonging to a target community in an original graph, and determines M storage devices storing the multiple pieces of target point side information in a first device set; collecting the multiple pieces of target point side information from the M storage devices through a second device set to generate N partial sub-graphs; collecting the N partial sub-graphs from the second equipment set through the target equipment, and combining the N partial sub-graphs to generate a community sub-graph corresponding to the target community; wherein the multiple pieces of target point side information are collected in parallel by at least part of equipment in the second equipment set, and the N partial sub-graphs are generated in parallel by at least part of equipment in the second equipment set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device cluster for processing graph data. Background Art

[0002] In today's data-driven era, graph data has become the core research object in many fields. These fields include but are not limited to social network analysis, bioinformatics, recommendation systems, information retrieval and text analysis, network security, and graph neural network learning. However, facing the huge scale of graph data, how to understand and analyze its internal structure has become a huge challenge. In this context, community clustering (community discovery) technology came into being, providing an effective solution for the analysis of graph data.

[0003] Based on community clustering, a community subgraph of a specific community can be generated from the original graph to simplify the complexity of the data structure in the original graph, focus the analysis core on a specific community, and improve the efficiency of data analysis, which is a key step in data analysis. Therefore, studying efficient community subgraph generation methods is of great significance to promoting the development of graph data analysis.

[0004] The content of the background technology section is only the information known to the inventor personally, and does not mean that the above information has entered the public domain before the application date of this disclosure, nor does it mean that it can become the prior art of the present disclosure. Summary of the invention

[0005] This specification provides a graph data processing method and a device cluster, which can improve the efficiency of generating community subgraphs.

[0006] In the first aspect, the present specification provides a method for processing graph data, which is applied to a device cluster and is used to generate a community subgraph corresponding to a target community from an original graph, wherein the original graph includes multiple point edge information, and the multiple point edge information is dispersedly stored in a first device set in the device cluster. The method includes: determining multiple target point edge information belonging to the target community in the original graph, and determining M storage devices storing the multiple target point edge information in the first device set, where M is an integer greater than 1; collecting the multiple target point edge information from the M storage devices through a second device set in the device cluster, and generating N partial subgraphs based on the multiple target point edge information, wherein the multiple target point edge information is collected in parallel by at least some of the devices in the second device set, and the N partial subgraphs are generated in parallel by at least some of the devices in the second device set, where N is an integer less than M; and collecting the N partial subgraphs from the second device set through the target device in the device cluster, and merging the N partial subgraphs to generate a community subgraph corresponding to the target community.

[0007] In some embodiments, the number of computing devices in the second device set is greater than N, and the second device set is divided into K subsets, where K is an integer greater than 1, and the number of devices in the i-th subset is P i , P i >P i+1 , P k =N;

[0008] The collecting the plurality of target point edge information from the M storage devices through the second device set in the device cluster, and generating N partial subgraphs based on the plurality of target point edge information, comprises:

[0009] The computing devices in the first subset perform a first operation in parallel to obtain P1 intermediate subgraphs, wherein the first operation includes: collecting part of the point edge information of the plurality of target point edge information, and generating an intermediate subgraph based on the collected part of the point edge information,

[0010] In the order in which i takes values ​​from 2 to K, the second operation is performed in parallel by each computing device in the i-th subset to obtain P i The second operation includes collecting P i-1 The collected partial intermediate subgraphs are merged to generate new intermediate subgraphs, and

[0011] The P generated by each computing device in the Kth subset k intermediate subgraphs as the N partial subgraphs.

[0012] In some embodiments, performing the first operation in parallel by each computing device in the first subset to obtain P1 intermediate subgraphs includes:

[0013] Divide the M storage devices into P1 device groups;

[0014] Determine a first correspondence between P1 computing devices in the first subset and the P1 device groups; and

[0015] Based on the first corresponding relationship, the first operation is performed in parallel by P1 computing devices in the first subset to obtain the P1 intermediate subgraphs, wherein the P1 computing devices respectively collect the target point edge information from the corresponding device groups when performing the first operation.

[0016] In some embodiments, dividing the M storage devices into P1 device groups includes:

[0017] Based on the distribution of the multiple target point edge information in the M storage devices and P1, the M storage devices are divided into the P1 device groups, wherein the quantity of the target point edge information stored in each of the P1 device groups meets a preset quantity balance condition.

[0018] In some embodiments, the second operation is performed in parallel by each computing device in the i-th subset to obtain P i Intermediate subgraphs, including:

[0019] Divide each computing device in the i-1th subset into P i Device groups;

[0020] Determine P in the i-th subset i A computing device and the P i A second correspondence relationship of the device groups; and

[0021] Based on the second corresponding relationship, through P in the i-th subset i The computing devices execute the second operation in parallel to obtain P i intermediate subgraphs, where the P i When executing the second operation, each computing device collects the partial intermediate subgraph from the corresponding device group.

[0022] In some embodiments, the computing devices in the i-1th subset are divided into P i Device groups, including:

[0023] Based on the number P of devices in the i-1th subset i-1 and the P i , divide each computing device in the i-1th subset into the P i device groups, wherein the P i The number of computing devices included in each device group meets a preset quantity balance condition.

[0024] In some embodiments, the number of computing devices in the second device set is equal to N, and the collecting the plurality of target point edge information from the M storage devices through the second device set in the device cluster and generating N partial subgraphs based on the plurality of target point edge information includes:

[0025] The N partial subgraphs are obtained by performing the following operations in parallel through the N computing devices in the second device set: collecting partial point edge information from the multiple target point edge information, and generating a partial subgraph based on the collected partial point edge information.

[0026] In some embodiments, each point-edge information includes: information about an edge in the original graph and information about two nodes connected by the edge.

[0027] In some embodiments, merging the N partial subgraphs to generate a community subgraph corresponding to the target community includes:

[0028] One of the N partial subgraphs is used as the first partial subgraph, and the remaining partial subgraphs are added to the subgraph set. The first partial subgraph is updated N-1 times to obtain the community subgraph, wherein in each update:

[0029] Determine from the subgraph set a second partial subgraph having at least one common node with the first partial subgraph; and

[0030] Based on the same nodes between the first partial subgraph and the second partial subgraph, the vertex edge information in the second partial subgraph is updated to the first partial subgraph, and the second partial subgraph is deleted from the subgraph set.

[0031] In some embodiments, collecting the plurality of target point edge information from the M storage devices through the second device set in the device cluster, and generating N partial subgraphs based on the plurality of target point edge information, includes:

[0032] When the number of the plurality of target point edge information is greater than a preset number, the plurality of target point edge information is collected from the M storage devices through a second device set in the device cluster, and N partial subgraphs are generated based on the plurality of target point edge information.

[0033] In some embodiments, the method further includes: when the number of the multiple target point edge information is less than or equal to the preset number, collecting the multiple target point edge information from the M storage devices through the target device, and generating the community subgraph based on the multiple target point edge information.

[0034] In a second aspect, the specification also provides a device cluster, including multiple computing devices. Each computing device includes: at least one storage medium storing at least one instruction set for processing graph data; and at least one processor communicating with the at least one storage medium, wherein when the device cluster is running, the processors in the multiple computing devices read the corresponding instruction set and implement the method as described in the first aspect according to the instructions of the instruction set.

[0035] Other functions of the graph data processing method and device cluster provided in this specification will be partially listed in the following description. The creative aspects of the graph data processing method and device cluster provided in this specification can be fully explained by practicing or using the graph data processing method, device cluster and combination described in the following detailed examples. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0037] Figure 1 A schematic diagram of an original image provided according to an embodiment of the present specification is shown;

[0038] Figure 2 A schematic diagram showing a method for processing graph data provided according to an embodiment of this specification;

[0039] Figure 3 A schematic diagram of a community subgraph provided according to an embodiment of this specification is shown;

[0040] Figure 4 A schematic diagram of an application scenario of graph data processing provided according to an embodiment of this specification is shown;

[0041] Figure 5 A hardware structure diagram of a computing device provided according to an embodiment of this specification is shown;

[0042] Figure 6 A flowchart showing another method for processing graph data provided according to an embodiment of this specification;

[0043] Figure 7 A specific schematic diagram showing another method for processing graph data provided according to an embodiment of this specification;

[0044] Figure 8 Another specific schematic diagram showing another method for processing graph data provided according to an embodiment of this specification; and

[0045] Fig. 9 A schematic diagram of N partial subgraphs provided according to an embodiment of the present specification is shown. DETAILED DESCRIPTION

[0046] The following description provides specific application scenarios and requirements of this specification, with the purpose of enabling those skilled in the art to make and use the contents of this specification. Various local modifications to the disclosed embodiments will be apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of this specification. Therefore, this specification is not limited to the embodiments shown, but to the widest scope consistent with the claims.

[0047] The terms used herein are only used for the purpose of describing specific example embodiments and are not restrictive. For example, unless the context clearly indicates otherwise, as used herein, the singular forms "a", "an" and "the" may also include plural forms. When used in this specification, the terms "include", "comprise" and / or "contain" mean that the associated integers, steps, operations, elements and / or components exist, but do not exclude the existence of one or more other features, integers, steps, operations, elements, components and / or groups or that other features, integers, steps, operations, elements, components and / or groups may be added in the system / method.

[0048] In view of the following description, these and other features of the present specification, as well as the operation and function of the related elements of the structure, and the economy of the combination and manufacture of the parts can be significantly improved. Reference is made to the accompanying drawings, all of which form a part of this specification. However, it should be clearly understood that the drawings are for illustration and description purposes only and are not intended to limit the scope of this specification. It should also be understood that the drawings are not drawn to scale.

[0049] The flowcharts used in this specification illustrate the operations implemented by the system according to some embodiments in this specification. It should be clearly understood that the operations of the flowcharts may not be implemented in sequence. On the contrary, the operations may be implemented in reverse order or simultaneously. In addition, one or more other operations may be added to the flowchart. One or more operations may be removed from the flowchart.

[0050] For ease of understanding, this specification provides the following explanations for the terms that will appear below.

[0051] Community clustering (community discovery): is a technology that divides nodes into different communities based on the connection relationship between nodes in the complex network structure of the original graph. In the process of dividing nodes into different communities, the nodes in the same community can be connected relatively closely, forming a locally dense network structure; while the nodes between different communities are relatively sparse, showing obvious separation characteristics.

[0052] Community subgraph generation technology: extract the community subgraph corresponding to a specific community from the original graph, so that the community subgraph retains the key characteristics of the original graph to identify and understand the important structure in the original graph. Through the generation of community subgraphs, the core of the research can be focused on the local structure, namely the community subgraph, which can reduce the complexity of data analysis.

[0053] Original graph: The graph data used before community clustering, which can include vertex and edge information involving multiple communities, such as Figure 1 As shown, each part enclosed by a dotted box can be regarded as a community.

[0054] In some embodiments, Figure 1 As shown, the original graph includes point-edge information related to multiple communities, and the multiple communities include the target community. The point-edge information related to the multiple communities is dispersedly stored in multiple storage devices. The target device is used to generate a community subgraph corresponding to the target community from the original graph.

[0055] Exemplarily, the target device determines multiple target point edge information belonging to the target community in the original graph, and determines M storage devices to store the multiple target point edge information, where M is an integer greater than 1; then, the multiple target point edge information is collected from the M storage devices, and a community subgraph corresponding to the target community is generated based on the multiple target point edge information.

[0056] For example, Figure 2 As shown, the M storage devices determined by the target device include storage device 1 to storage device 7. Each storage device stores at least one target point edge information, and the number of target point edge information stored in each storage device is different. The target device needs to collect all target point edge information from storage device 1 to storage device 7, and then generate the following based on the collected target point edge information: Figure 3 The community subgraph shown.

[0057] In the above embodiment, the steps of collecting target point-edge information and generating community subgraphs are all completed by a single target device. For ordinary communities (communities involving a small amount of point-edge information), the implementation process is not a big problem. However, for hotspot communities (communities involving a greater amount of point-edge information than a preset amount), the following problems exist:

[0058] 1) The amount of point-edge information involved in the hotspot community is very large, and the communication rate of the target device is limited. Collecting a large amount of point-edge information through a target device in sequence may cause communication bottlenecks such as communication congestion or information loss of the target device;

[0059] 2) A target device generates a community subgraph based on all the vertex-edge information. The time complexity of the target device processing is high, that is, the process of generating the community subgraph is time-consuming.

[0060] In order to overcome the above problems, the embodiments of this specification provide a method and device cluster for processing graph data.

[0061] Combine the following Figure 4 This section introduces the application scenarios of graph data processing provided in this manual.

[0062] Figure 4 FIG. 1 shows a schematic diagram of an application scenario of graph data processing provided according to an embodiment of this specification. Figure 4 As shown, the application scenario includes a device cluster 100 , and the device cluster 100 includes a first device set 10 , a second device set 20 and a target device 30 .

[0063] The first device set 10 includes multiple computing devices, each of which is used to store some target point edge information in the original graph. In order to distinguish it from the second device set 20 mentioned later, the computing devices in the first device set 10 are referred to as storage devices in this specification.

[0064] The second device set 20 includes multiple computing devices, at least some of which are used to collect target point edge information belonging to the target community from the first device set in parallel, and at least some of the devices are used to generate partial subgraphs based on the collected target point edge information in parallel. The partial subgraph is a partial graph structure in the community subgraph corresponding to the target community. It can be understood that the number of partial subgraphs finally generated by the second device set 20 is multiple.

[0065] The target device 30 is used to collect multiple partial subgraphs from the second device set 20, so as to generate a community subgraph corresponding to the target community based on the collected multiple partial subgraphs.

[0066] In some embodiments, the device cluster 100 may also include a control device ( Figure 4 (not shown), the control device can be used to disperse multiple point edge information in the original graph to each storage device in the first device set 10. The control device can also control the communication between each storage device in the first device set 10, each computing device in the second device set 20, and the target device 30, and the operations performed based on the communication content, and the specific operations are described in detail in the method P100 below.

[0067] It should be noted that the second device set 20 may be a device in the first device set 10; or, the second device set 20 may be a device outside the first device set 10; or, some of the devices in the second device set 20 are devices in the first device set 10, and some of the devices are devices outside the first device set 10. The target device 30 may be a device in the second device set 20, or may be a device outside the second device set 20. The control device may be a device in the first device set 10, the second device set 20, or the target device 30, or may be a device outside the first device set 10, the second device set 20, or the target device 30. This specification does not limit this.

[0068] In some embodiments, each device in the device cluster 100 may store data and instructions for implementing the graph data processing method, and may execute or be used to execute the data and instructions. In some embodiments, each device in the device cluster 100 may include a hardware device with data information processing function and a necessary program required to drive the hardware device to work.

[0069] Exemplarily, multiple point-edge information included in the original graph is dispersedly stored in the first device set in the device cluster 100. In the process of generating a community subgraph corresponding to the target community from the original graph, the device cluster 100 performs the following steps:

[0070] Determine multiple target point edge information belonging to the target community in the original graph, and determine M storage devices storing the multiple target point edge information in the first device set, where M is an integer greater than 1;

[0071] Collecting the plurality of target point edge information from M storage devices through a second device set, and generating N partial subgraphs based on the plurality of target point edge information, wherein the plurality of target point edge information is collected in parallel by at least some of the devices in the second device set, and the N partial subgraphs are generated in parallel by at least some of the devices in the second device set, and N is an integer less than M; and

[0072] The N partial subgraphs are collected from the second device set through the target device, and the N partial subgraphs are merged to generate a community subgraph corresponding to the target community.

[0073] Specifically, the specific operations performed by the devices in the device cluster 100 are described in detail in the method P100 below, and will not be repeated here.

[0074] Figure 5 A hardware structure diagram of an electronic device 200 provided according to an embodiment of this specification is shown.

[0075] The electronic device 200 may be any device in the device cluster 100 , for example, a storage device in the first device set 10 , a computing device in the second device set 20 , a target device 30 , or a control device.

[0076] like Figure 5 As shown, the electronic device 200 may include at least one storage medium 230 and at least one processor 220. In some embodiments, the electronic device 200 may further include a communication port 250 and an internal communication bus 210. In addition, the electronic device 200 may further include an I / O component 260.

[0077] The internal communication bus 210 can connect different system components. For example, the internal communication bus 210 can connect the storage medium 230, the processor 220, the communication port 250 and the I / O component 260.

[0078] The I / O component 260 supports input / output between the electronic device 200 and other components.

[0079] The communication port 250 is used for data communication between the electronic device 200 and the outside world. For example, the communication port 250 can be used for data communication between the electronic device 200 and a network. The communication port 250 can be a wired communication port or a wireless communication port.

[0080] In some embodiments, the network may be any type of wired or wireless network, or a combination thereof. For example, the network may include a cable network, a wired network, a fiber optic network, a telecommunications network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a public switched telephone network (PSTN), a Bluetooth network TM, a short-range wireless network (ZigBee TM), a near field communication (NFC) network, or a similar network.

[0081] In some embodiments, the network may include one or more network access points. For example, the network may include a wired or wireless network access point, such as a base station or an Internet exchange point. Through the access point, one or more components of each device corresponding to the electronic device 200 can be connected to the network to exchange data or information.

[0082] The storage medium 230 may include a data storage device. The data storage device may be a non-temporary storage medium or a temporary storage medium. For example, the data storage device may include one or more of a disk 232, a read-only storage medium (ROM) 234, or a random access storage medium (RAM) 236. The storage medium 230 also includes at least one instruction set stored in the data storage device. The instruction set may include a computer program code, and the computer program code may include a program, a routine, an object, a component, a data structure, a process, a module, etc. for executing the method for processing graph data provided in this specification.

[0083] The processor 220 may be in communication with the storage medium 230. The processor 220 is used to execute the at least one instruction set. When the electronic device 200 is running, the processor 220 reads the at least one instruction set and executes the method for processing image data provided in this specification according to the instructions of the at least one instruction set.

[0084] The processor 220 may be in the form of one or more processors. In some embodiments, the processor 220 may include one or more hardware processors, such as a microcontroller, a microprocessor, a reduced instruction set computer (RISC), an application specific integrated circuit (ASIC), an application specific instruction set processor (ASIP), a central processing unit (CPU), a graphics processing unit (GPU), a physical processing unit (PPU), a microcontroller unit, a digital signal processor (DSP), a field programmable gate array (FPGA), an advanced RISC machine (ARM), a programmable logic device (PLD), any circuit or processor capable of performing one or more functions, etc., or any combination thereof.

[0085] Just to illustrate the problem, Figure 5 Only one processor 220 is shown in the electronic device 200. However, it should be noted that the electronic device 200 in this specification may also include multiple processors. Therefore, the operations and / or method steps disclosed in this specification may be performed by one processor as described in this specification, or may be performed jointly by multiple processors. For example, if the processor 220 of the electronic device 200 in this specification performs step A and step B, it should be understood that step A and step B may also be performed jointly or separately by two different processors 220 (for example, the first processor performs step A, the second processor performs step B, or the first and second processors perform steps A and B together).

[0086] Figure 6A flowchart of a graph data processing method P100 provided according to an embodiment of the present specification is shown. As before, each device in the device cluster 100 can cooperate to execute the graph data processing method P100 to generate a community subgraph corresponding to the target community from the original graph. Specifically, the processor in each device in the device cluster 100 can read the instruction set stored in its local storage medium, and then cooperate to execute the graph data processing method P100 according to the provisions of the instruction set.

[0087] The original graph includes a plurality of point-edge information, and the plurality of point-edge information is dispersedly stored in a first device set of the device cluster 100 .

[0088] For example, the original image is Figure 1 As shown, it includes point-edge information corresponding to multiple communities, where the multiple communities include a target community. The point-edge information involved in the target community is called the target point-edge information. There may be multiple nodes and multiple edges in the graph structure of the original graph. For example, a node may represent an entity, and an edge may represent a relationship between two connected entities. In this specification, each point-edge information represents the information of one or more nodes in the original graph, and the information of one or more edges.

[0089] In some embodiments, each point edge information may include information about an edge in the original graph and information about two nodes connected by the edge.

[0090] For example, the specific form of each vertex edge information can be found in Figure 2 , Figure 7 and Figure 8 . For example, point edge information ①-⑥: represents the information of node ①, the information of node ⑥, and the information of the edge between node ① and node ⑥. Other point edge information can be understood in the same way. Node information can represent entities, such as people, groups, organizations, objects, places, etc. Edge information can represent the relationship between the nodes connected by the edge, for example, the type of relationship, the closeness of the relationship, etc. Edges can be directed edges or undirected edges, and this manual does not limit this.

[0091] The graph data unit of the original graph is vertex-edge information, which can intuitively display the structure of the graph data. This representation method makes the relationship between entities in complex networks clearer and helps to understand and analyze graph data.

[0092] like Figure 6 As shown, the processing P100 of graph data includes the following steps.

[0093] S110: Determine multiple target point edge information belonging to the target community in the original graph, and determine M storage devices storing the multiple target point edge information in the first device set, where M is an integer greater than 1.

[0094] Multiple point-edge information of the original graph are dispersed in the first device set. Some storage devices in the first device set store target point-edge information belonging to the target community, and some storage devices store point-edge information belonging to other communities. Therefore, the device cluster 100 needs to determine M storage devices that store the target point-edge information from the first device set.

[0095] Exemplarily, after the control device in the device cluster 100 performs community clustering on the original graph to identify the target community and other communities, the point-edge information corresponding to different communities can be distinguished by community identifiers. In the process of distributing multiple point-edge information of the original graph to the first device set, the control device can inform the storage devices in the first device set of the community identifiers corresponding to the point-edge information assigned to them. Thus, the control device can determine M storage devices from the first device set that store multiple target point-edge information corresponding to the community identifier of the target community. The M storage devices are, for example, Figure 7 and Figure 8 Storage devices 1 to 7 are shown.

[0096] S120: Collect the multiple target point edge information from M storage devices through a second device set, and generate N partial subgraphs based on the multiple target point edge information, wherein the multiple target point edge information are collected in parallel by at least some of the devices in the second device set, and the N partial subgraphs are generated in parallel by at least some of the devices in the second device set, and N is an integer less than M.

[0097] It can be understood that the device cluster 100 generates a community subgraph corresponding to the target community based on the multiple target point edge information in two stages. The first stage is the process of generating the N partial subgraphs based on the multiple target point edge information. The second stage is the process of generating the community subgraph based on the N partial subgraphs.

[0098] The first stage can be completed by the various computing devices in the second device set, and the second stage can be completed by the target device. The second device set can implement the computing tasks of the first stage in a variety of ways, and the following are two examples. Method 1: The first stage is not further divided; Method 2: The first stage is further divided into multiple sub-stages, and each sub-stage is implemented in parallel by computing devices in a subset of the second device set.

[0099] Method 1

[0100] In some embodiments, the number of computing devices in the second device set is equal to N. The device cluster 100 performs the following operations in parallel through the N computing devices in the second device set to obtain the N partial subgraphs: collect partial point edge information from the multiple target point edge information, and generate a partial subgraph based on the collected partial point edge information.

[0101] In this embodiment, the first stage is not further subdivided, and the operations performed in parallel by each computing device in the second device set are relatively simple, which can reduce the internal processing complexity of the second device set to complete the tasks of the first stage. At the same time, the N partial subgraphs can be generated in parallel by multiple computing devices, thereby improving the efficiency of generating the N partial subgraphs, so as to improve the efficiency of generating the community subgraph.

[0102] In some embodiments, the device cluster 100 divides the M storage devices into N device groups, determines the correspondence between the N computing devices in the second device set and the N device groups, and then each computing device can collect target point edge information from the corresponding device group based on the correspondence, and generates a partial subgraph based on the collected target point edge information. In this process, the device cluster 100 divides the work of the N computing devices, collects target point edge information from storage devices corresponding to different device groups, avoids the omission of some target point edge information during the collection process, or avoids the same computing device collecting repeated target point edge information, which wastes computing resources and computing time.

[0103] Exemplarily, the device cluster 100 divides the M storage devices into N device groups based on the distribution of the multiple target point edge information in the M storage devices and N, wherein the number of target point edge information stored in each of the N device groups satisfies the preset quantity balance condition #1, so that the time consumed by each computing device in collecting target point edge information and generating partial subgraphs is basically the same, so that the operations of each computing device can be synchronized as much as possible, and the waiting time can be reduced when the subsequent target device collects partial subgraphs.

[0104] For example, the control device in the device cluster 100 generates an identifier that can uniquely identify each target point edge information, generates a device index for N computing devices, and determines a hash mapping function, and determines the target point edge information corresponding to each computing device based on the identifier corresponding to each target point edge information and the hash mapping function. The hash mapping function is, for example, D id =edge id %M, where D id Indicates the device index of the computing device, edge id The identifier representing the edge information of the target point.

[0105] Assume N = 3, such as Figure 7As shown, the second device set includes computing device 1, computing device 2 and computing device 3. The control device determines through a hash mapping function that the target point edge information corresponding to computing device 1 is ①-⑥, ①-⑦, ②-⑥, ②-③, ⑤-④, ⑥-⑦; the target point edge information corresponding to computing device 2 is ③-②, ③-⑥, ③-④, ④-③, ④-⑥, ④-⑤; the target point edge information corresponding to computing device 3 is ⑥-①, ⑥-②, ⑥-③, ⑥-④, ⑦-①, ⑦-⑥. Then the control device can determine that there is a corresponding relationship between computing device 1 and device group #1 (storage device 1, storage device 2 and storage device 5), computing device 2 and device group #2 (storage device 3, storage device 4), and computing device 3 and device group #3 (storage device 6, storage device 7).

[0106] Further, computing device 1 collects target point edge information (①-⑥, ①-⑦, ②-⑥, ②-③, ⑤-④, ⑥-⑦) from device group #1, and generates partial subgraph #1 based on the collected target point edge information. Computing device 2 collects target point edge information (③-②, ③-⑥, ③-④, ④-③, ④-⑥, ④-⑤) from device group #2, and generates partial subgraph #2 based on the collected target point edge information. Computing device 3 collects target point edge information (⑥-①, ⑥-②, ⑥-③, ⑥-④, ⑦-①, ⑦-⑥) from device group #3, and generates partial subgraph #3 based on the collected target point edge information. Partial subgraph #1, partial subgraph #2 and partial subgraph #3 are the N partial subgraphs.

[0107] It should be noted that the number of target point edge information stored in each of the N device groups satisfies the preset quantity balance condition, which can be understood as: the number of target point edge information stored in each device group is as equal as possible. For example, quantity balance condition #1 indicates that the difference between the number of target point edge information stored in different device groups belongs to the first preset range; or the ratio between the number of target point edge information stored in different device groups belongs to the second preset range. For example, the N device groups include device group #1, device group #2, and device group #3. The number of target point edge information stored in all storage devices in device group #1 is quantity #1, the number of target point edge information stored in all storage devices in device group #2 is quantity #2, and the number of target point edge information stored in all storage devices in device group #3 is quantity #3. The difference between any two of quantity #1, quantity #2, and quantity #3 belongs to the first preset range (such as a range centered on 0); or, the ratio between any two of quantity #1, quantity #2, and quantity #3 belongs to the second preset range (such as a range centered on 1). In other words, quantity #1, quantity #2, and quantity #3 are made as close to the same as possible.

[0108] Method 2

[0109] In some embodiments, the number of computing devices in the second device set is greater than N, and the second device set is divided into K subsets, where K is an integer greater than 1, and the number of devices in the i-th subset is P. i , P i >P i+1 , P K = N. The device cluster 100 performs the first operation in parallel through each computing device in the first subset to obtain P1 intermediate subgraphs, and performs the second operation in parallel through each computing device in the ith subset in the order of i values ​​from 2 to K to obtain P i intermediate subgraphs, P generated by each computing device in the Kth subset K The intermediate subgraphs are used as the N partial subgraphs.

[0110] The first operation includes: collecting part of the point edge information among the plurality of target point edge information, and generating an intermediate subgraph based on the collected part of the point edge information.

[0111] The second operation includes: collecting P i-1 The collected partial intermediate subgraphs are collected from the intermediate subgraphs, and the collected partial intermediate subgraphs are merged to generate a new intermediate subgraph.

[0112] In this embodiment, the device cluster 100 further subdivides the first stage into multiple sub-stages, making full use of the computing resources of each computing device in the second device set, which can significantly shorten the time for the second device set to complete the first stage task and improve efficiency. In particular, when the amount of target point edge information is huge, the advantage of parallel computing in multiple sub-stages is more obvious. This method of dividing into multiple sub-stages can adjust the number of computing devices corresponding to each sub-stage according to task requirements, so that when the amount of target point edge information increases, resulting in an increase in computing requirements, it can be dealt with by adding computing devices in each sub-stage, thereby better adapting to the changing task requirements.

[0113] In some embodiments, the device cluster 100 divides the M storage devices into P1 device groups, determines a first correspondence between the P1 computing devices in the first subset and the P1 device groups, and then based on the first correspondence, performs a first operation in parallel through the P1 computing devices in the first subset to obtain the P1 intermediate subgraphs. Wherein, the P1 computing devices collect the target point edge information from the corresponding device groups respectively when performing the first operation. In this process, the device cluster 100 divides the work of the P1 computing devices in the first subset, collects part of the target point edge information from the storage devices corresponding to different device groups, avoids the omission of some target point edge information during the collection process or avoids the same computing device in the first subset from collecting repeated target point edge information, which wastes computing resources and computing time.

[0114] Exemplarily, the device cluster 100 divides the M storage devices into P1 device groups based on the distribution of the multiple target point edge information in the M storage devices and P1, wherein the quantity of target point edge information stored in each of the P1 device groups satisfies the preset quantity balance condition #1. Thus, the time consumed by each computing device in the first subset in collecting target point edge information and generating intermediate subgraphs is basically the same, so that the operation of each computing device can be synchronized as much as possible, and the waiting time can be reduced when the first subset collects intermediate subgraphs later.

[0115] Specifically, the manner in which the device cluster 100 divides the M storage devices into P1 device groups may refer to the manner in which the M storage devices are divided into N device groups described above, and will not be described in detail.

[0116] For example, Figure 8 As shown, the number of computing devices included in the second device set is 6, namely computing device 1 to computing device 6. Assume that K=2, that is, the device cluster 100 divides the devices in the second device set into 2 subsets. The number of computing devices P1 included in the first subset is 4, and the first subset includes computing devices 1 to computing devices 4. The number of computing devices included in the second subset is P2=N=2, and the second subset includes computing devices 5 and computing devices 6.

[0117] The first corresponding relationship determined by the control device includes: the corresponding relationship between the computing device 1 and the first storage device group (including storage device 1 and storage device 2), the corresponding relationship between the computing device 2 and the second storage device group (including storage device 3 and storage device 5), the corresponding relationship between the computing device 3 and the third storage device group (including storage device 4 and storage device 7), and the corresponding relationship between the computing device 4 and the fourth storage device group (including storage device 6).

[0118] The first operation performed by computing device 1 is: computing device 1 collects target point edge information (①-⑥, ①-⑦, ②-⑥, ②-③) from storage device 1 and storage device 2, and generates intermediate subgraph #1 based on the collected target point edge information, and so on, computing device 2 generates intermediate subgraph #2, computing device 3 generates intermediate subgraph #3, and computing device 4 generates intermediate subgraph #4.

[0119] Exemplarily, the device cluster 100 divides each computing device in the i-1th subset into v device groups; determines P in the i-th subset i A computing device and the P i a second correspondence relationship of the device groups; and based on the second correspondence relationship, through P in the i-th subset i The computing devices execute the second operation in parallel to obtain Pi intermediate subgraphs, where the P i When executing the second operation, each computing device collects the part of the intermediate subgraph from the corresponding device group. In this process, the device cluster 100 divides the computing devices in the i-th subset and collects the corresponding intermediate subgraphs from different device groups after the i-1-th subset is divided, so as to avoid missing some intermediate subgraphs during the collection process or avoid the same computing device in the i-th subset collecting repeated intermediate subgraphs, which wastes computing resources and computing time.

[0120] In some embodiments, the device cluster 100 calculates the number P of devices in the i-1th subset based on i-1 and the P i Divide each computing device in the i-1th subset into the P i device groups, wherein the P i The number of computing devices contained in the device group meets the preset quantity balance condition #2. As a result, the time consumed by each computing device in the i-th subset in collecting intermediate subgraphs and generating new intermediate subgraphs is basically the same, so that the operation of each computing device in the i-th subset can be synchronized as much as possible, and the waiting time can be reduced when the i+1-th subset collects new intermediate subgraphs.

[0121] Specifically, the device cluster 100 may also divide the computing devices in the i-1th subset into P i The details of this device group will not be repeated here.

[0122] The P i The number of computing devices contained in each device group satisfies the preset quantity balance condition #2, which can be understood as: the number of computing devices contained in each device group is as equal as possible. For example, quantity balance condition #2 indicates that the difference between the number of computing devices contained in different device groups belongs to the third preset range; or the ratio between the number of computing devices contained in different device groups belongs to the fourth preset range. The third preset range may be the same as or different from the first preset range. The fourth preset range may be the same as or different from the second preset range, and this specification does not limit this.

[0123] For example, Figure 8 As shown, the second corresponding relationship determined by the control device includes: the corresponding relationship between computing device 5 and the first computing device group (including computing device 1 and computing device 2), and the corresponding relationship between computing device 6 and the second computing device group (including computing device 3 and computing device 4).

[0124] The second operation performed by computing device 5 is: computing device 5 collects intermediate subgraph #1 from computing device 1, collects intermediate subgraph #2 from computing device 2, and generates intermediate subgraph #1-2 based on intermediate subgraph #1 and intermediate subgraph #2.

[0125] The second operation performed by computing device 6 is: computing device 6 collects intermediate subgraph #3 from computing device 3, collects intermediate subgraph #4 from computing device 4, and generates intermediate subgraph #3-4 based on intermediate subgraph #3 and intermediate subgraph #4.

[0126] Because the second subset is the last subset after the second device set is divided, the middle subgraph #1-2 and the middle subgraph #3-4 are used as the N partial subgraphs.

[0127] It should be noted that, when K is an integer of 3 or greater, the operations performed by each subset in the second device set can be inferred from the above description and will not be described in detail.

[0128] S130: Collect the N partial subgraphs from the second device set through the target device, and merge the N partial subgraphs to generate a community subgraph corresponding to the target community.

[0129] In some embodiments, the device cluster 100 uses one of the N partial subgraphs as the first partial subgraph, adds the remaining partial subgraphs to the subgraph set, and performs N-1 updates on the first partial subgraph to obtain the community subgraph, wherein in each update:

[0130] A second partial subgraph having at least one common node with the first partial subgraph is determined from the subgraph set; then, based on the common nodes between the first partial subgraph and the second partial subgraph, the point edge information in the second partial subgraph is updated to the first partial subgraph, and the second partial subgraph is deleted from the subgraph set.

[0131] For example, Fig. 9 As shown, the N partial subgraphs include partial subgraph #1, partial subgraph #2, and partial subgraph #3. The device cluster 100 selects partial subgraph #1 as the first partial subgraph, and adds partial subgraph #2 and partial subgraph #3 to the subgraph set. In the first update, partial subgraph #2 is selected from the subgraph set as the second partial subgraph, and the target point edge information in partial subgraph #2 is updated to the first partial subgraph based on the same nodes between partial subgraph #2 and partial subgraph #1, so as to obtain the first partial subgraph. Figure 2 .0, and delete partial subgraph #2 from the subgraph set. In the second update, partial subgraph #3 is selected from the subgraph set as the second partial subgraph, and the difference between partial subgraph #3 and the first partial subgraph is calculated. Figure 2.0 Update the target edge information in subgraph #3 to the first subgraph Figure 2 .0, get the first part Figure 3 .0, and delete part subgraph #3 from the subgraph set. At this time, there are no other subgraphs in the subgraph set, so the first subgraph Figure 3 .0 as Figure 3 The community subgraph shown.

[0132] In some embodiments, when the number of the plurality of target point edge information is greater than a preset number, the device cluster 100 executes S120 and S130. That is, when the target community is a hotspot community, the device cluster 100 uses S120 and S130 to generate a community subgraph, which can greatly improve the efficiency of generating a community subgraph by multiples.

[0133] In some embodiments, when the number of the plurality of target point edge information is less than or equal to a preset number, the device cluster 100 does not execute S120 and S130, and executes the third operation.

[0134] The third operation: collect the multiple target point edge information from the M storage devices through the target device, and generate the community subgraph based on the multiple target point edge information. That is to say, for non-hotspot communities, the target device can complete the collection of target point edge information and the generation of community subgraphs, the interaction between devices in the device cluster 100 is relatively simple, and the amount of point edge information involved in non-hotspot communities is small, and the impact on computing efficiency is not significant.

[0135] Through the solution provided in this specification, the device cluster 100 can adopt different execution modes for non-hotspot hot areas and hotspot communities, which is more flexible.

[0136] Specifically, assuming that the number of target edge points in the target community is m, the number of computing devices in the second device set is n, and the time complexity of the device cluster 100 executing S110, S120, and S130 is The time complexity of the device cluster 100 executing S110 and the third operation is O(m). It can be seen that when m is much larger than n, Approx. That is, when the amount of target point edge information involved in the target community is large enough, the device cluster 100 can execute S110 , S120 , and S130 nearly n times faster than executing S110 and the third operation.

[0137] In method P100, when each storage device in the M storage devices sends the target point edge information to the corresponding computing device in the second device set, it can be implemented through map-reduce (MapReduce) technology.

[0138] It should be noted that the term "parallel" in this specification can be understood as non-interference, for example Figure 8 As shown, computing device 1, computing device 2, computing device 3, and computing device 4 collect target point edge information and generate intermediate subgraphs without interfering with each other. The collection and generation operations of computing device 1, computing device 2, computing device 3, and computing device 4 can be performed synchronously, and the timing of collection can be dynamically scheduled by the control device, which is not limited in this specification.

[0139] Similarly, the calculation device 5 and the calculation device 6 collect the intermediate subgraphs to generate partial subgraphs respectively without interfering with each other. The collection and generation operations of the calculation device 5 and the calculation device 6 can be performed synchronously, and the timing of the collection can be dynamically scheduled by the control device, which is not limited in this specification.

[0140] To summarize, the graph data processing method and device cluster provided in this specification divide the task of generating a target community based on multiple target point edge information involved in the target community into at least two stages. The computing tasks of each stage can be processed in parallel by different computing devices, making rational use of computing resources, thereby improving the overall processing efficiency and reducing the communication overhead of each computing device.

[0141] On the other hand, the present specification provides a computer-readable non-transitory storage medium, storing at least one set of executable instructions for performing a method for processing graph data. When the executable instructions are executed by a processor, the executable instructions instruct the processor to implement the steps of the method P100 described in the present specification. In some possible implementations, various aspects of the present specification can also be implemented in the form of a program product, which includes a program code. When the program product is run on the device cluster 100, the program code is used to enable the device cluster 100 to perform the steps of the method P100 described in the present specification. The program product for implementing the above method can use a portable compact disk read-only memory (CD-ROM) to include program code and can be run on the device cluster 100. However, the program product of the present specification is not limited to this. In the present specification, the readable storage medium can be any tangible medium containing or storing a program, which can be used by the instruction execution system or used in combination with it. The program product can use any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media include: an electrical connection with one or more conductors, 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 of the above. The computer-readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above. Program code for performing the operations of the present specification may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the device cluster 100, partially on the device cluster 100, as a stand-alone software package, partially on the device cluster 100, partially on a remote computing device, or entirely on a remote computing device.

[0142] The term "and / or" in the embodiments of this specification describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0143] The terms "first", "second" and the like in this specification are used to distinguish similar or similar objects or entities, and are not necessarily meant to limit a specific order or sequence.

[0144] The term “plurality” mentioned in this specification shall mean two or more than two unless otherwise stated.

[0145] The above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require a specific order or a continuous order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0146] In summary, after reading this detailed disclosure, those skilled in the art will appreciate that the foregoing detailed disclosure may be presented only by way of example and may not be limiting. Although not explicitly stated herein, those skilled in the art will appreciate that this specification requires various reasonable changes, improvements and modifications to the embodiments. These changes, improvements and modifications are intended to be proposed by this specification and are within the spirit and scope of the exemplary embodiments of this specification.

[0147] In addition, certain terms in this specification have been used to describe embodiments of this specification. For example, "one embodiment", "an embodiment" and / or "some embodiments" mean that a particular feature, structure or characteristic described in conjunction with the embodiment may be included in at least one embodiment of this specification. Therefore, it can be emphasized and should be understood that two or more references to "an embodiment" or "one embodiment" or "an alternative embodiment" in various parts of this specification do not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics may be appropriately combined in one or more embodiments of this specification.

[0148] It should be understood that in the foregoing description of the embodiments of this specification, in order to help understand a feature and for the purpose of simplifying this specification, this specification combines various features in a single embodiment, figure or its description. However, this does not mean that the combination of these features is necessary. When reading this specification, it is entirely possible for a person skilled in the art to mark out some of the devices as separate embodiments. In other words, the embodiments in this specification can also be understood as the integration of multiple secondary embodiments. This is also true when the content of each secondary embodiment is less than all the features of a single aforementioned disclosed embodiment.

[0149] Each patent, patent application, publication of patent applications, and other materials, such as articles, books, specifications, publications, documents, articles, etc., cited herein, except to the extent that it is inconsistent or conflicting with this document or that has a limiting effect on the broadest scope of the claims, may be incorporated herein by reference and used for all purposes now or hereafter associated with this document. In addition, in the event of any inconsistency or conflict between the description, definition, and / or use of a term in any material and the description, definition, and / or use of a term in this document, the term in this document shall prevail.

[0150] Finally, it should be understood that the embodiments of the application disclosed herein are explanations of the principles of the embodiments of this specification. Other modified embodiments are also within the scope of this specification. Therefore, the embodiments disclosed in this specification are only used as examples and not as limitations. Those skilled in the art can adopt alternative configurations according to the embodiments in this specification to implement the applications in this specification. Therefore, the embodiments of this specification are not limited to the embodiments accurately described in the application.

Claims

1. A graph data processing method, applied to a device cluster, for generating a community subgraph corresponding to a target community from an original graph, wherein the original graph includes a plurality of point-edge information, and the plurality of point-edge information is dispersedly stored in a first device set in the device cluster, the method comprising: Determine multiple target point edge information belonging to the target community in the original graph, and determine M storage devices storing the multiple target point edge information in the first device set, where M is an integer greater than 1; Collecting the plurality of target point edge information from the M storage devices through a second device set in the device cluster, and generating N partial subgraphs based on the plurality of target point edge information, wherein the plurality of target point edge information is collected in parallel by at least some of the devices in the second device set, and the N partial subgraphs are generated in parallel by at least some of the devices in the second device set, where N is an integer less than M; as well as The N partial subgraphs are collected from the second device set through the target device in the device cluster, and the N partial subgraphs are merged to generate a community subgraph corresponding to the target community.

2. The method according to claim 1, wherein: The number of computing devices in the second device set is greater than N, and the second device set is divided into K subsets, where K is an integer greater than 1, wherein the number of devices in the i-th subset is P i , P i >P i+1 , P K =N; The collecting the plurality of target point edge information from the M storage devices through the second device set in the device cluster, and generating N partial subgraphs based on the plurality of target point edge information, comprises: The computing devices in the first subset perform a first operation in parallel to obtain P1 intermediate subgraphs, wherein the first operation includes: collecting part of the point edge information of the plurality of target point edge information, and generating an intermediate subgraph based on the collected part of the point edge information, In the order in which i takes values ​​from 2 to K, the second operation is performed in parallel by each computing device in the i-th subset to obtain P i The second operation includes collecting P i-1 The collected partial intermediate subgraphs are merged to generate a new intermediate subgraph, and The P generated by each computing device in the Kth subset k intermediate subgraphs as the N partial subgraphs.

3. The method according to claim 2, wherein: The step of performing the first operation in parallel by each computing device in the first subset to obtain P1 intermediate subgraphs includes: Divide the M storage devices into P1 device groups; Determine a first correspondence between P1 computing devices in the first subset and the P1 device groups; and Based on the first corresponding relationship, the first operation is performed in parallel by P1 computing devices in the first subset to obtain the P1 intermediate subgraphs, wherein the P1 computing devices respectively collect the target point edge information from the corresponding device groups when performing the first operation.

4. The method according to claim 3, wherein: The dividing the M storage devices into P1 device groups includes: Based on the distribution of the multiple target point edge information in the M storage devices and P1, the M storage devices are divided into the P1 device groups, wherein the quantity of the target point edge information stored in each of the P1 device groups meets a preset quantity balance condition.

5. The method according to claim 2, wherein: The second operation is performed in parallel by each computing device in the i-th subset to obtain P i Intermediate subgraphs, including: Divide each computing device in the i-1th subset into P i Device groups; Determine P in the i-th subset i A computing device and the P i A second correspondence relationship of the device groups; and Based on the second corresponding relationship, through P in the i-th subset i The computing devices execute the second operation in parallel to obtain P i intermediate subgraphs, where the P i When executing the second operation, each computing device collects the partial intermediate subgraph from the corresponding device group.

6. The method according to claim 5, wherein: The computing devices in the i-1th subset are divided into P i Device groups, including: Based on the number P of devices in the i-1th subset, i-1 and the P i , divide each computing device in the i-1th subset into the P i device groups, wherein the P i The number of computing devices included in each device group meets a preset quantity balance condition.

7. The method according to claim 1, wherein: The number of computing devices in the second device set is equal to the N, and the collecting of the plurality of target point edge information from the M storage devices through the second device set in the device cluster and generating N partial subgraphs based on the plurality of target point edge information include: The N partial subgraphs are obtained by performing the following operations in parallel through the N computing devices in the second device set: collecting partial point edge information from the multiple target point edge information, and generating a partial subgraph based on the collected partial point edge information.

8. The method according to claim 1, wherein: Each point edge information includes: information about an edge in the original graph, and information about two nodes connected by the edge.

9. The method according to claim 8, wherein: The merging of the N partial subgraphs to generate a community subgraph corresponding to the target community includes: One of the N partial subgraphs is used as the first partial subgraph, and the remaining partial subgraphs are added to the subgraph set. The first partial subgraph is updated N-1 times to obtain the community subgraph, wherein in each update: Determine from the subgraph set a second partial subgraph having at least one common node with the first partial subgraph; and Based on the same nodes between the first partial subgraph and the second partial subgraph, the vertex edge information in the second partial subgraph is updated to the first partial subgraph, and the second partial subgraph is deleted from the subgraph set.

10. The method according to claim 1, wherein: The collecting the plurality of target point edge information from the M storage devices through the second device set in the device cluster, and generating N partial subgraphs based on the plurality of target point edge information, comprises: When the number of the plurality of target point edge information is greater than a preset number, the plurality of target point edge information is collected from the M storage devices through a second device set in the device cluster, and N partial subgraphs are generated based on the plurality of target point edge information.

11. The method according to claim 10, wherein: The method further comprises: When the number of the plurality of target point edge information is less than or equal to the preset number, the plurality of target point edge information is collected from the M storage devices through the target device, and the community subgraph is generated based on the plurality of target point edge information.

12. A device cluster, comprising a plurality of computing devices, each computing device comprising: at least one storage medium storing an instruction set for processing graph data; as well as At least one processor is communicatively connected to the at least one storage medium, wherein when the device cluster is running, the processors in the plurality of computing devices read the corresponding instruction set and implement the method as described in any one of claims 1-11 according to the instructions of the instruction set.

Citation Information

Patent Citations

  • Community division method and device, computing equipment and storage medium

    CN109408722A

  • GPU cluster deep learning task parallelization method, device and electronic equipment

    CN110399222A

  • Data acquisition method and device, electronic equipment and storage medium

    CN111885159A

  • Community graph recognition and sampling method, electronic equipment and computer readable storage medium

    CN113191428A

  • Graph data processing method and device and storage medium

    CN114756714A