Heterogeneous graph neural network acceleration method and system based on meta-path graph

By constructing meta-path maps and using graph division and layer-based encoding methods, the problems of semantic graph construction overhead, memory overhead and redundant calculation in heterogeneous graph neural networks are solved, and efficient heterogeneous graph neural network computing and inference are realized.

CN119623509AActive Publication Date: 2025-03-14HUAZHONG UNIV OF SCI & TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411569136.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-03-14
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

Existing heterogeneous graph neural networks have high semantic graph construction overhead, memory overhead and redundant computing problems when building semantic graphs and processing metapathic path instances, resulting in inference delay and inefficiency.

Method used

By building a meta-path map, the information in the heterogeneous map is effectively integrated, and graph division, workload division and layer-based encoding methods are adopted to reduce redundant computing and storage overhead and improve computing efficiency.

Benefits of technology

It significantly reduces the computational complexity of the heterogeneous graph neural network model, improves training speed and inference efficiency, and reduces storage overhead and redundant computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119623509A_ABST
    Figure CN119623509A_ABST
Patent Text Reader

Abstract

The invention relates to a heterogeneous graph neural network acceleration method and system based on a meta-path graph. The method comprises the following steps: constructing all meta-path instances into the meta-path graph in a graph form according to a given heterogeneous graph and a given type of meta-path; performing graph division on the meta-path graph to obtain a plurality of meta-path sub-graphs; carrying out workload division on the meta-path sub-graph; and according to the division of the workload, carrying out layer-based meta-path instance coding, combining the codes of all meta-path instance slices according to the interlayer relationship of the meta-path diagram to obtain the codes of meta-path instances, and carrying out internal aggregation of the meta-path instances and aggregation calculation between the meta-path instances to obtain the final feature of the target vertex. According to the method, redundant calculation in the heterogeneous graph neural network is greatly reduced, and then the model reasoning efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of heterogeneous graph neural network acceleration technology, and in particular to a heterogeneous graph neural network acceleration method and system based on a metapath graph. Background Art

[0002] A heterogeneous graph is a graph structure in which the vertices and edges of a heterogeneous graph are of different types. In a heterogeneous graph, the connection relationships between vertices and between vertices and edges can be diverse and complex, reflecting the various association relationships in the real world. There are some key concepts in heterogeneous graphs: Vertex type: Vertices in a heterogeneous graph can be divided into different types, each with specific properties and semantics. For example, in a social network, a vertex type can be a user, a group, or a page. Edge type: Edges in a heterogeneous graph can also be divided into different types, each type representing a relationship between different types of vertices. For example, in a social network, an edge type can be a friend relationship, a like relationship, or a comment relationship. Metapath defines a specific type of connection pattern between vertices. It describes how a path through a series of vertex and edge types reaches from one vertex to another. Metapath is an important tool for capturing complex relationships between vertices in a heterogeneous graph.

[0003] Heterogeneous Graph Neural Network (HGNN) is a neural network model for processing heterogeneous graph data. Compared with traditional graph neural networks (GNN), HGNN can effectively process different types of vertices and edges in heterogeneous graphs. The development of HGNN can be traced back to traditional graph representation learning methods such as vertex embedding and graph embedding. Then, with the development of deep learning, GNN was introduced to learn the representation of graph data. Due to the complexity of heterogeneous graphs, researchers began to propose various GNN-based heterogeneous graph models to meet the challenges of heterogeneous graph data. These models aim to learn the representation of different types of vertices in heterogeneous graphs and transfer and learn information through the connection relationships between vertices.

[0004] Considering the multivariate mapping relationship between heterogeneous graphs and meta-paths, the number of meta-path instances is often quite large. How to maintain a large number of meta-path instances is a challenge. Early studies matched meta-path instances in a breadth-first search (BFS) manner. BFS-based heterogeneous graph neural networks first list all meta-path instances and then store them in a large amount of memory space, which may be thousands of times larger than the original graph. When a meta-path instance is needed, the encoder can read it directly. Since all meta-path instances are stored separately, the encoding will suffer from a large amount of redundant calculations. However, encoding meta-path instances in the order of vertex indices will lead to load imbalance. Recent solutions use a depth-first search (DFS) approach to traverse meta-path instances from the original graph. DFS-based methods support matching meta-path instances when constructing semantic graphs. Once a meta-path instance is matched, its semantic information will be immediately encoded into the embedding and utilized to incrementally update the semantic graph, and finally discarded. Therefore, DFS-based HGNNs do not have to store meta-path instances, thereby reducing a lot of storage overhead. However, once a meta-path instance is used, discarding the meta-path instance may result in additional overhead for model reasoning to rematch the meta-path instance from the original graph, thereby increasing reasoning latency. The DFS-based solution can change the encoding order and matching direction of the meta-path instances, reducing redundant calculations between meta-path instances of the same target vertex, but redundant calculations between different vertices still exist. Neither of these two methods completely solves the problems existing in heterogeneous graph neural networks, such as high semantic graph construction overhead, memory overhead, redundant calculations, etc. Therefore, the design of the present invention is committed to building an efficient heterogeneous graph neural network system.

[0005] CN114298279A discloses a method for constructing a design space of a heterogeneous graph neural network with multiple design dimensions, proposes a unified heterogeneous graph neural network framework, and defines the design space of the heterogeneous graph neural network based on this unified framework. This invention makes up for the shortcomings of previous work that only evaluates heterogeneous graph neural networks from the model level, provides researchers with a perspective of module-level evaluation, and can further analyze the design dimensions that play an important role in the performance of the model. The invention also constructs a platform Space4HGNN for the design space of heterogeneous graph neural networks, and based on this platform, extracts the principled guidance of the design model, and provides standard evaluation and modular heterogeneous graph neural network implementation. The platform provides researchers with module-level evaluation, and can provide users with a simple interface to help them evaluate the impact of different design dimensions. However, this invention does not completely solve the problems existing in heterogeneous graph neural networks.

[0006] As mentioned above, heterogeneous graph neural networks based on meta-paths are widely used, and none of the disclosed invention patents solve the problem raised by the present invention. The present invention aims to propose an efficient method and system for generating meta-paths in heterogeneous graph neural networks.

[0007] In addition, on the one hand, there are differences in understanding among those skilled in the art; on the other hand, the applicant studied a large number of documents and patents when making the present invention, but due to space limitations, not all details and contents are listed in detail. However, this does not mean that the present invention does not have the characteristics of these prior arts. On the contrary, the present invention already has all the characteristics of the prior art, and the applicant reserves the right to add relevant prior art to the background technology. Summary of the invention

[0008] Current heterogeneous graph neural networks generally use a depth-first search (DFS) approach to traverse meta-path instances from the original graph. DFS-based methods support matching meta-path instances when constructing semantic graphs. Once a meta-path instance is matched, its semantic information is immediately encoded into the embedding and used to incrementally update the semantic graph before being discarded. Therefore, DFS-based HGNNs do not have to store meta-path instances, thereby reducing a large amount of storage overhead. However, once a meta-path instance is used, discarding the meta-path instance may result in additional overhead for each heterogeneous graph neural network model to rematch the meta-path instance from the original graph, thereby increasing inference latency. DFS-based solutions can change the encoding order and matching direction of meta-path instances, reducing redundant computations between meta-path instances of the same target vertex, but redundant computations between different vertices still exist. Neither of these two approaches completely solves the problems existing in heterogeneous graph neural networks, such as high semantic graph construction overhead, memory overhead, and redundant computations.

[0009] In view of the deficiencies in the prior art, the present invention provides, from a first aspect, a heterogeneous graph neural network acceleration method based on a meta-path graph, the method comprising: constructing a meta-path graph in the form of a graph for all meta-path instances according to a given heterogeneous graph and a given type of meta-path; partitioning the meta-path graph to obtain a number of meta-path sub-graphs; partitioning the meta-path sub-graphs into workloads; performing layer-based meta-path instance encoding according to the workload partitioning, merging the encodings of all meta-path instance slices according to the inter-layer relationship of the meta-path graph to obtain the encoding of the meta-path instance, performing internal aggregation of the meta-path instance and aggregation calculations between meta-path instances to obtain the final features of the target vertex.

[0010] The present invention effectively integrates the information in the heterogeneous graph by constructing a metapath graph, thereby accelerating the calculation of the graph neural network. The metapath graph not only provides a deep representation for specific types of relationships, but also optimizes the calculation process through efficient data structures. This method significantly reduces the computational complexity of the heterogeneous graph neural network model, making it possible to speed up training and improve reasoning efficiency when processing large-scale heterogeneous graphs.

[0011] According to a preferred embodiment, the step of constructing a meta-path graph includes: extracting vertices and edges in a heterogeneous graph according to the types appearing in the meta-path; copying the repeated vertices and edges to the previous partial meta-path graph, and further expanding them according to the meta-path pattern to form a complete meta-path graph. The meta-path graph thus formed not only has a high expressive power, but also ensures the integrity and consistency of the graph structure by copying and expanding repeated vertices and edges, thereby improving the ability of the neural network to learn complex relationships.

[0012] According to a preferred embodiment, the step of dividing the meta-path graph includes: collecting the vertices in the center layer of the meta-path graph to obtain all the vertices in the center layer of the meta-path graph; dividing the vertices in the center layer into several batches, and different batches contain the same number of center layer vertices; starting from all the vertices in each batch, traversing the meta-path graph according to the outgoing edge and incoming edge directions respectively, to obtain the meta-path subgraph corresponding to the batch.

[0013] When dividing the meta-path graph, by collecting the central layer vertices and processing them in batches, the amount of calculation is effectively reduced, and the graph structure of each batch is simpler, which is convenient for subsequent calculations. Through the batch strategy, multiple subgraphs can be processed in parallel, which improves the efficiency of overall calculations, especially in the scenario of large-scale graph data, significantly speeding up the training and reasoning speed of heterogeneous graph neural network models.

[0014] According to a preferred embodiment, the step of dividing the workload of the meta-path sub-graph includes: dividing the meta-path sub-graph into at least two parts by layer, each part contains continuous layers and constitutes a meta-path slice graph that contains a part of the meta-path instance; traversing the meta-path slice graph in the order of layers to obtain all meta-path instance slices.

[0015] Dividing the meta-path subgraph into multiple parts by layer and forming a meta-path slice graph can realize independent processing of information at different levels. This not only helps to use feature information at different levels for more efficient calculations, but also can extract more detailed meta-path instance features by traversing the slice graph layer by layer, so that the heterogeneous graph neural network model can capture the hierarchical structure more accurately during the learning process, thereby improving the performance of the heterogeneous graph neural network model.

[0016] According to a preferred embodiment, the step of obtaining the encoding of the meta-path instance includes: encoding the meta-path instance slices and obtaining partial encoding of the meta-path instance; utilizing the edge relationship between different layers to re-encode the encoding of the meta-path instance slices in different subgraphs to obtain all meta-path instance encodings; performing internal aggregation of meta-path instances on different meta-path subgraphs to obtain feature information of the target vertex; and performing aggregation between meta-path instances on the feature information of the same target vertex between different meta-path graphs to obtain the final features of all target vertices.

[0017] In the process of obtaining the meta-path instance encoding, the encodings of different sub-graphs are merged based on the inter-layer relationship, which can make full use of the structural information of the graph to improve the richness of feature representation. By performing internal and inter-aggregation calculations on the meta-path instances, the feature information of the target vertex is finally obtained, reflecting the significant technical effect of this method in improving the quality of feature fusion and the efficiency of information transmission. This will help achieve better performance in downstream tasks.

[0018] According to a preferred embodiment, the step of encoding the meta-path instance slices includes: determining whether there are completely identical continuous parts in the meta-path definition corresponding to the meta-path graph; if so, implementing priority layer division; otherwise, implementing layer-based division.

[0019] In the encoding work, by judging whether there are identical continuous parts in the meta-path graph and implementing priority layer division, the efficiency and accuracy of the encoding are effectively improved. Compared with traditional methods, this layer-based division strategy can quickly locate similar structures, reduce redundant calculations, and significantly improve the processing speed during the encoding process. This technical effect enables the heterogeneous graph neural network model to adapt to different computing needs more flexibly and efficiently when facing complex heterogeneous graph structures, which further improves the practicality of the heterogeneous graph neural network model.

[0020] The present invention provides a heterogeneous graph neural network acceleration system based on a metapath graph from a second aspect, and the system includes a construction module, a partitioning module, a calculation module and a merging module. The construction module is used to construct a metapath graph in the form of a graph from all metapath instances according to a given heterogeneous graph and a given type of metapath; the partitioning module is used to partition the metapath graph to obtain a number of metapath subgraphs; the calculation module is used to partition the metapath subgraphs into workloads; the merging module is used to perform layer-based metapath instance encoding according to the workload partitioning, merge the encodings of all metapath instance slices according to the inter-layer relationship of the metapath graph to obtain the encoding of the metapath instance, perform internal aggregation of the metapath instance and aggregation calculations between metapath instances to obtain the final features of the target vertex.

[0021] The modular design of the system enables each module to run in parallel on a dedicated hardware unit (such as a GPU or a multi-core CPU), thereby improving the speed and efficiency of information processing. At the hardware level, through parallel computing and efficient data transmission, the system can quickly process large-scale heterogeneous graph data, reduce computing latency, optimize resource utilization, and ensure high efficiency in real-time application scenarios.

[0022] According to a preferred embodiment, the construction module includes several construction sub-modules, which are used to construct a meta-path graph; wherein the several construction sub-modules include an extraction module and an expansion module, the extraction module extracts vertices and edges in the heterogeneous graph according to the types appearing in the meta-path; the expansion module copies the repeated vertices and edges to the previous partial meta-path graph, and further expands it according to the meta-path pattern to form a complete meta-path graph.

[0023] The extraction module and expansion module in the construction module quickly extract the vertices and edges of the heterogeneous graph and construct the meta-path graph through efficient data structures and memory management. This process optimizes memory access by utilizing the parallel read and write capabilities of the hardware, significantly increasing the speed of information processing. This efficient construction capability enables the system to quickly generate the necessary graph data when faced with complex graph structures, reducing construction time.

[0024] The design of the partitioning module allows the hardware to use parallel algorithms when partitioning the graph, thereby quickly generating multiple meta-path subgraphs. The effectiveness of this module lies in its ability to reduce the demand for computing resources. The hardware can efficiently use multiple cores or processing units to work simultaneously, reducing the overall computing burden and improving the efficiency of information processing. This process ensures the efficiency of subsequent calculations and lays the foundation for large-scale graph data processing.

[0025] According to a preferred embodiment, the calculation module includes several calculation sub-modules; the calculation sub-module is used to divide the workload of the meta-path sub-graph according to layers, obtain several meta-path slice graphs and perform encoding calculations; the calculation sub-module includes a load module and an encoding module; the load module is used to divide the meta-path sub-graph into at least two parts according to layers, each part contains continuous layers and constitutes a meta-path slice graph containing a part of the meta-path instance; the encoding module is used to traverse the meta-path slice graph in the order of layers to obtain all meta-path instance slices.

[0026] The computing module can maximize the parallel computing capabilities of the hardware by intelligently dividing the workload of the metapath subgraph. The design of the load module and the encoding module ensures that the hardware can handle multiple tasks when performing encoding calculations, significantly improving the calculation speed. At the same time, the hierarchical traversal strategy makes the data processing process more efficient, reduces the occupation of memory bandwidth, and effectively improves the efficiency of information processing.

[0027] According to a preferred embodiment, the merging module includes several merging sub-modules; the merging sub-modules include an encoding merging module, an internal meta-path aggregation module and an inter-meta-path aggregation module; the encoding merging module is used to encode meta-path instance slices and obtain partial encodings of meta-path instances, and utilize the edge relationship between different layers to re-encode the encodings of meta-path instance slices in different subgraphs to obtain all meta-path instance encodings; the internal meta-path aggregation module is used to perform internal aggregation of meta-path instances of the same meta-path subgraph to obtain feature information of target vertices; the inter-meta-path aggregation module is used to perform inter-meta-path aggregation of feature information of the same target vertex between different meta-path graphs to obtain the final features of all target vertices.

[0028] The merging module achieves rapid integration of calculation results through the design of encoding merging, internal aggregation of meta-paths, and aggregation between meta-paths. At the hardware level, this module can effectively manage data flow, reduce the need for data transmission between different processing units, and thus improve the transmission speed. In addition, the efficiency of aggregate calculation enables the system to quickly obtain the final features of the target vertex, enhancing the overall performance and accuracy of information processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A flowchart of a heterogeneous graph neural network acceleration method based on a meta-path graph provided by an embodiment of the present invention;

[0030] Figure 2 An example diagram of a parallel implementation method of a heterogeneous graph neural network acceleration method based on a meta-path graph provided in an embodiment of the present invention;

[0031] Figure 3 An example of a method for constructing a meta-path graph in a heterogeneous graph neural network acceleration method based on a meta-path graph provided in an embodiment of the present invention;

[0032] Figure 4 An example of layer-based encoding operations in a heterogeneous graph neural network acceleration method based on a metapath graph provided in an embodiment of the present invention;

[0033] Figure 5 It is a schematic diagram of all meta-path instances of the meta-path APCPA of the heterogeneous graph and the corresponding meta-path graph;

[0034] Figure 6 A schematic diagram of the module connection relationship of a heterogeneous graph neural network acceleration system based on a meta-path graph provided in an embodiment of the present invention.

[0035] Reference numerals list

[0036] 101: construction module; 102: division module; 103: calculation module; 104: merging module; 105: construction submodule; 106: extraction module; 107: extension module; 108: division submodule; 109: calculation submodule; 110: load module; 111: encoding module; 112: merging submodule; 113: encoding merging module; 114: meta-path internal aggregation module; 115: meta-path aggregation module. DETAILED DESCRIPTION

[0037] The following is a detailed description with reference to the accompanying drawings.

[0038] First, some nouns appearing in the present invention are explained.

[0039] Heterogeneous graph: refers to a graph data structure with multiple vertex types or multiple edge types, which is different from a homogeneous graph (a homogeneous graph has only one vertex type and one edge type). It is usually expressed as G = (V, E, V t , E t ), where V is the set of all vertices in the graph, E is the set of all edges in the graph, and V t is the set of vertex types in the graph, E t is the set of edge types in the graph.

[0040] Meta-path: is a sequence of vertex type combination relations, usually represented as V1V2…V n , where V1, V2, …, V n ∈V t A meta-path represents a combination of relationships between multiple vertices.

[0041] Meta-path instance: A path in the graph whose vertex types satisfy the definition of a meta-path (i.e., an instantiated meta-path), usually represented as v1v2…v n , where v1, v2, …, v n ∈V.

[0042] Meta-path graph: A compressed storage format for meta-path instances in the present invention. This graph stores all meta-path instances.

[0043] Current heterogeneous graph neural networks usually use depth-first search (DFS) to traverse meta-path instances in the original graph. The DFS method can effectively match meta-path instances in the process of building a semantic graph. Once the match is completed, its semantic information is instantly encoded into the embedding vector and used to incrementally update the semantic graph, and eventually these meta-path instances are no longer needed. This DFS-based method does not need to save meta-path instances, which significantly reduces storage costs. However, discarding meta-path instances may cause the heterogeneous graph neural network model to re-match meta-path instances from the original graph at each reasoning, which will increase additional computational latency. The DFS-based strategy can adjust the encoding order and matching direction of meta-path instances to reduce unnecessary computations between meta-path instances for the same target vertex, but there is still the problem of redundant computations between different vertices. In summary, these two methods do not completely solve the key problems in heterogeneous graph neural networks, such as the high cost of building semantic graphs, memory usage, and redundant computations.

[0044] For example, on an online social media platform, users, posts, and comments form the core elements of interaction. User A posted a post about healthy eating and received multiple comments, among which users B and C expressed their interest in the content of the post. User B praised the recipe and user C asked if there were more recommendations. As time went on, user D also joined the discussion and expressed his interest in this diet and hoped to get more information.

[0045] In this context, the platform's recommendation system uses depth-first search (DFS) to analyze user-related content in order to provide personalized recommendations for new user E. However, since the system does not store previous comments and interaction instances, every time user E logs in, the system needs to recalculate all comments related to user A's posts. This not only wastes computing resources, but also significantly prolongs user E's waiting time, affecting the user experience.

[0046] If the recommendation system can effectively store this interactive information, it can directly reference the comments of user B, user C, and user D when processing user E's request, thereby reducing redundant calculations and improving recommendation efficiency.

[0047] In view of the shortcomings of the prior art, the present invention can provide a heterogeneous graph neural network acceleration method and system based on a metapath graph. The method and system of the present invention can be used for social network analysis. For example, the method can be used to efficiently analyze heterogeneous graph data in social networks, identify the relationship and influence between users, and support applications such as recommendation systems and community detection. The method and system of the present invention can also be used for knowledge graph construction. For example, the acceleration method can accelerate the construction and reasoning process of knowledge graphs, help quickly extract relationships and insights in a large amount of heterogeneous data, and provide support for intelligent question answering and information retrieval. The method and system of the present invention can also be used for bioinformatics research. In bioinformatics, the metapath graph acceleration method can be used to analyze complex biological networks and help identify interactions between genes and disease-related biomarkers. The method and system of the present invention can also be used to optimize logistics and supply chains. For example, analyze heterogeneous logistics networks, optimize path planning and resource allocation in supply chain management, improve operational efficiency and reduce costs. The method and system of the present invention can also be used for financial risk assessment. For example, using a heterogeneous graph neural network acceleration method, the complex relationship between customers, transactions and markets can be quickly analyzed in financial data to improve the accuracy of risk assessment and fraud detection.

[0048] The present invention can also provide an efficient graph data processing accelerator that can efficiently process the encoding and reasoning calculations of heterogeneous graph data and meta-path graphs, thereby improving the overall computing speed.

[0049] The present invention can also provide a heterogeneous graph neural network analysis device, which can be used for different types of heterogeneous graph neural network analysis, supports the construction and processing of meta-path graphs, and is suitable for research and industrial fields.

[0050] The present invention can also provide a meta-path graph partitioning and encoding optimization algorithm, aiming to optimize the partitioning and encoding process of the meta-path graph to improve the reasoning efficiency of the heterogeneous graph neural network and solve the performance bottleneck problem.

[0051] The present invention can also provide a heterogeneous graph neural network reasoning platform, which integrates the above method by building a software platform, provides a user-friendly interface and API, and facilitates users to perform reasoning and analysis of heterogeneous graph neural networks in various application scenarios.

[0052] The present invention also provides an intelligent heterogeneous graph neural network processing system and method, and proposes a complete system solution that supports data storage, graph partitioning, workload management and inference calculation of heterogeneous graphs, and is suitable for the needs of large-scale graph data processing.

[0053] The present invention provides a heterogeneous graph neural network acceleration method based on metapath graph, see Figure 1 After the start step, the method may include the following steps.

[0054] S1: Meta-path graph construction.

[0055] According to a given heterogeneous graph and a given type of meta-path, all meta-path instances are stored in the form of a graph, which is called a meta-path graph.

[0056] S2: Meta-path graph partitioning.

[0057] The meta-path graph is partitioned to obtain several meta-path sub-graphs.

[0058] S3: If there are duplicate parts, perform priority layer division. If there are no duplicate parts, perform workload division for the meta-path subgraph based on layer division.

[0059] S4: Layer-based encoding and aggregation.

[0060] According to the division of workloads, layer-based meta-path instance encoding is performed to obtain the encodings of all meta-path instances and perform subsequent inference calculations of heterogeneous graph neural networks.

[0061] Finish.

[0062] Specifically, step S1 includes the following steps.

[0063] S11: For a certain meta-path, extract the vertices and edges in the heterogeneous graph according to their types appearing in the meta-path, and these vertices and edges will form part of the meta-path graph.

[0064] S111: Determine a meta-path. The structure of a meta-path includes a starting vertex, a target vertex, and the types and order between them. For example, a meta-path may be represented as "user-purchase-product", where "user" and "product" are vertices and "purchase" is the type of edge.

[0065] S112: Identify the type in the meta-path.

[0066] Analyze the type of each vertex and edge in the meta-path and record the definition of each type in the heterogeneous graph. Different types of vertices and edges may affect the structure and characteristics of the graph.

[0067] S113: Extract vertices and edges from heterogeneous graphs.

[0068] Use database queries or graph traversal algorithms (such as depth-first search or breadth-first search) to extract vertices and edges corresponding to each type in the meta-path from the heterogeneous graph. Ensure that the vertices connected by the extracted edges meet the order and type requirements of the meta-path.

[0069] S114: Construct the initial meta-path graph part.

[0070] The extracted vertices and edges are combined together to form the initial part of the meta-path graph. This part of the graph may contain scattered vertices and edges and has not yet formed a complete structure.

[0071] S12: Copy the repeated vertices and edges to the previous partial meta-path graph, and further expand them according to the meta-path pattern to form a complete meta-path graph.

[0072] S121: Check for duplicates.

[0073] Traverse the extracted vertices and edges and check which ones already exist in the constructed meta-path graph.

[0074] Use hash tables or sets to efficiently store and find existing vertices and edges.

[0075] S122: Copy operation.

[0076] For each repeated vertex and edge, copy it and add it to the already constructed meta-path graph, making sure the edge connections remain unchanged. Record their positions in the meta-path graph for subsequent processing.

[0077] S123: Expand according to the meta-path pattern.

[0078] Use the structure and pattern of the meta-path (e.g., the order in which vertices are connected by a particular edge) to further extend the graph, adding new vertices and edges. Make sure that the new elements added are consistent with the existing elements in the graph, following the definition of the meta-path.

[0079] S124: forming a complete meta-path graph.

[0080] After all vertices and edges have been added, the connectivity of the metapath graph is checked to ensure that there are no isolated vertices or edges so that the graph fully represents the logical structure of the metapath.

[0081] S13: For different meta-paths, repeat steps S11 to S12 to obtain meta-path graphs corresponding to all meta-paths.

[0082] The metapath graph is a hierarchical multipartite graph. The vertices of the metapath graph can be divided into several layers, and the number of layers is equal to the length of the metapath plus 1. The number of layers of the metapath graph is equal to the length of the metapath plus 1, which means that each layer corresponds to a vertex in the metapath.

[0083] The vertices of each layer can only be connected to the vertices of the adjacent layers through edges, forming an ordered hierarchical structure that facilitates graph reasoning and computation.

[0084] The adjacency matrix of the metapath graph is a sparse block matrix, where only the blocks between each layer of vertices and the next layer of vertices contain non-zero elements, and all other blocks are zero. In other words, the non-zero elements in the adjacency matrix of the metapath graph only appear in the blocks corresponding to each layer of vertices and the next layer of vertices, and all other blocks are zero blocks. This setting not only reduces the storage space requirements, but also improves the computational efficiency, because most operations only need to focus on the connections between adjacent layers.

[0085] S131: Prepare different meta-paths.

[0086] Determines the set of different meta-paths to process. Each meta-path may have different vertex and edge types and therefore needs to be processed independently.

[0087] S132: Iteratively process the meta-path.

[0088] For each meta-path, steps S11 and S12 are repeatedly performed.

[0089] Step S11 is used to extract the vertices and edges corresponding to the current meta-path and form a preliminary meta-path graph portion. Step S12 is used to check and copy duplicate vertices and edges, and then expand according to the meta-path pattern to form a complete meta-path graph.

[0090] S133: Collect all meta-path graphs.

[0091] After all meta-paths are processed, all generated meta-path graphs are collected to ensure they can be used in subsequent steps.

[0092] Step S2 includes the following steps.

[0093] S21: For a specific meta-path graph, collect the vertices in the center layer of the meta-path graph to obtain all the vertices in the center layer of the meta-path graph.

[0094] First, let’s clarify the definition of the “central layer” in the meta-path graph. Generally speaking, the central layer refers to the key vertices that are responsible for connecting the upper and lower layers in the meta-path. These vertices are usually the middle vertices in the meta-path.

[0095] Traverse the metapath graph to identify and extract all vertices in the central layer. This can be achieved using a graph traversal algorithm (such as breadth-first search or depth-first search). During the traversal, each vertex is labeled with a level to distinguish vertices at different levels.

[0096] All identified core-layer vertices are stored in a list or set to ensure the uniqueness and integrity of these vertices. By effectively collecting and identifying core-layer vertices, a clear data basis can be provided for subsequent processing, ensuring that the structure and relationships of the graph are fully utilized. The selection of core-layer vertices directly affects the efficiency and effectiveness of subsequent algorithms.

[0097] S22: Divide the vertices of the central layer into several batches, and different batches contain the same number of central layer vertices.

[0098] Specifically, the number of central layer vertices in each batch is determined based on actual needs and computing resources. This number should be kept reasonable to avoid excessive computing burden during traversal. The collected central layer vertices are grouped according to the set batch size. If the total number of vertices cannot be divided by the batch size, the last batch can contain the remaining vertices. Use algorithms (such as blocking algorithms) to achieve uniform division of vertices and ensure that the load of each batch is as close as possible.

[0099] In this way, dividing the central layer vertices into batches can improve the efficiency of parallel processing, so that multiple batches can be processed simultaneously during subsequent traversals, improving computing performance.

[0100] S23: Starting from all vertices in each batch, the meta-path graph is traversed according to the outgoing and incoming directions respectively to obtain the meta-path subgraph corresponding to the batch.

[0101] Specifically, determine the direction of traversal (outgoing edges and incoming edges), and design corresponding traversal strategies for the vertices in each batch. Outgoing edge traversal means accessing the adjacent lower-level vertices from the vertex, while incoming edge traversal is the reverse operation. Starting from the vertices in each batch, traverse the outgoing edges and incoming edges separately. For example, depth-first search (DFS) or breadth-first search (BFS) can be used to complete this process. During the traversal process, the visited vertices and edges are recorded to form a meta-path subgraph corresponding to the batch. Based on the traversal results, construct the meta-path subgraph corresponding to each batch. Each subgraph will contain the vertices of the batch and the edges connected to it, forming a relatively independent structure.

[0102] Through effective traversal strategies and subgraph construction, complex metapath graphs can be decomposed into multiple manageable parts, thereby reducing computational complexity and providing a clear graph structure for subsequent analysis.

[0103] S24: For different meta-path graphs, repeat steps S21 to S23 to divide all meta-path graphs and obtain all meta-path subgraphs. Meta-path subgraphs are subgraphs extracted based on the structure and vertex relationships of a specific meta-path graph. Meta-path subgraphs are composed of vertices and their edges that satisfy a specific meta-path, reflecting the relationship between vertices in a specific context.

[0104] Step S3 includes the following steps.

[0105] S31: For the meta-path subgraph, the meta-path subgraph is divided into several parts by layer, each part contains multiple consecutive layers, forming a subgraph. Each subgraph contains a part of the meta-path instance, which is called a meta-path slice graph.

[0106] Specifically, for the meta-path subgraph, different hierarchical structures are identified and divided. The meta-path subgraph is divided into several parts by layer, ensuring that each part contains multiple consecutive layers. Each part constitutes a new subgraph, namely the meta-path slice graph. Each meta-path slice graph will contain a part of the meta-path instance, focusing on preserving the relationship between consecutive layers and ensuring the coherence of information.

[0107] This layered approach can effectively reduce computational complexity, making subsequent encoding and analysis more efficient. It also helps preserve inter-layer relationships and enhances the ability of heterogeneous graph neural network models to process multi-layer information in complex heterogeneous graphs.

[0108] S32: By traversing the meta-path slice graph in the order of layers, all meta-path instance slices can be obtained.

[0109] Specifically, each meta-path slice graph is traversed in the order of layers, from bottom to top or from top to bottom. During the traversal process, the vertices and edges related to the meta-path are extracted to form a complete meta-path instance slice. For each meta-path instance slice, its structural features and connection relationships are recorded.

[0110] This step ensures the integrity and correctness of each metapath instance slice, so that subsequent analysis can be performed based on accurate structural information. The efficient implementation of the traversal algorithm can further improve the data processing speed and reduce the calculation time.

[0111] S33: For different meta-path slice graphs, repeat steps S31 to S32 to obtain all meta-path instance slices.

[0112] Specifically, for different meta-path slice graphs, steps S31 and S32 are repeated. After processing a meta-path slice graph each time, all the corresponding meta-path instance slices are stored to ensure that the consistency and integrity of the data are maintained during the processing.

[0113] By systematically processing each meta-path slice graph, we can eventually obtain all relevant meta-path instance slices, providing sufficient data basis for subsequent aggregation and encoding. This systematic repetitive processing not only improves the data coverage, but also enhances the adaptability of the heterogeneous graph neural network model to different meta-paths and improves the generalization ability of the heterogeneous graph neural network model.

[0114] Step S4 includes the following steps.

[0115] S41: For all meta-path instance slices of a specific meta-path graph, encoding is performed on the meta-path instance slices to obtain partial encodings of the meta-path instances.

[0116] Specifically, determine whether there are identical continuous parts in the meta-path definition corresponding to the meta-path graph. If so, implement priority layer division, that is, prioritize these identical continuous parts and divide them into sub-graphs. Otherwise, implement layer-based division, that is, directly divide the meta-path graph into two layers as one sub-graph.

[0117] S42: After obtaining the encoding of the meta-path instance slices in the meta-path graph, the encoding of the meta-path instance slices in different sub-graphs is re-encoded using the edge relationship between different layers to obtain all meta-path instance encodings.

[0118] Specifically, after obtaining the encoding of the meta-path instance slices in each meta-path graph, the edge relationships between different layers are identified. Based on these edge relationships, the encodings of the meta-path instance slices in different sub-graphs are fused and re-encoded. Aggregation functions (such as summation, average or other complex aggregation methods) are used to integrate the encodings of different layers to generate a global encoding representation.

[0119] This re-encoding enhances the relationship information between vertices, helps capture cross-level features, and improves the ability of heterogeneous graph neural network models to understand complex relationships. By effectively fusing the encodings of different subgraphs, a more comprehensive and rich feature representation can be obtained.

[0120] S43: After completing the meta-path instance encoding for all meta-path graphs, internal aggregation of meta-path instances is performed on different meta-path subgraphs, that is, meta-path instances of the same target vertex are aggregated to obtain feature information of the target vertex.

[0121] Specifically, after encoding the meta-path instances of all meta-path graphs, for each meta-path subgraph, the meta-path instances of the same target vertex are aggregated. Aggregation methods (such as maximum pooling, average pooling, etc.) are used to integrate the feature information of the same target vertex and generate a feature representation for each target vertex. Ensure that the consistency and integrity of information is maintained during the aggregation process to avoid information loss.

[0122] This aggregation step can effectively reduce noise, highlight the core features of the target vertex, and improve the accuracy of subsequent analysis. Through internal aggregation, the feature information of different meta-path instances is integrated, ensuring the richness and accuracy of the target vertex features.

[0123] S44: Slice all meta-path instances of different meta-path graphs, and repeat steps S41 to S43 to obtain feature information of all target vertices under different meta-paths.

[0124] S45: Aggregate the feature information of the same target vertex between different meta-path graphs between meta-path instances to obtain final features of all target vertices.

[0125] Specifically, the feature information of the same target vertex in different meta-path graphs is aggregated to identify repeated target vertices. Appropriate aggregation strategies (such as weighted average, voting, etc.) are used to integrate the features of the same target vertex to generate the final feature representation. Ensure that the impact of different meta-paths on the target vertex features is considered during the aggregation process to maintain the diversity and accuracy of the information.

[0126] Cross-graph aggregation can integrate information from different meta-path graphs to provide a more comprehensive and accurate representation of vertex features. This process helps improve the performance of the final heterogeneous graph neural network model on specific tasks (such as classification, regression, etc.), providing more robust support for subsequent decision-making.

[0127] For ease of understanding and explanation, the present invention provides a specific application scenario of a heterogeneous graph neural network acceleration method based on a metapath graph, see Figure 3 and Figure 4 .

[0128] like Figure 3 As shown, Figure 3 (a) shows a heterogeneous graph of paper citations, including three types of vertices, namely Author (A), Paper (P) and Conference (C), which represent the information of the author, paper and conference respectively. The graph also contains two types of edges: AP indicates that the author wrote a paper, and PC indicates that the paper was published at a conference. For a given meta-path APA, the meta-path indicates that two authors wrote a paper together. The extraction module 106 extracts the vertices and edges that meet the meta-path in the heterogeneous graph and generates Figure 3 (b) shows the meta-path. The expansion module 107 is responsible for converting the extracted part (such as Figure 3 (b)) is constructed as a complete meta-path graph, generating Figure 3 (c) The complete meta-path graph is shown.

[0129] In the prior art, semantic information is generally captured based on a semantic graph and a meta-path instance list. The present invention fundamentally changes the existing technical solution and uses a meta-path graph to capture semantic information, so there is no need to construct a semantic graph and store all meta-path instances, which avoids the high semantic graph construction overhead and significantly reduces the overhead of storing meta-path instances.

[0130] Figure 5 is a table and meta-path diagram showing Figure 3 All meta-path instances of the meta-path APCPA of the heterogeneous graph in (a), the meta-path graph can be divided into 5 layers (L1 to L5). Storing these meta-path instances involves a large number of repeated vertices. Figure 4 All meta-path instances are stored in the form of a meta-path graph.

[0131] like Figure 4 As shown in the figure, the meta-path APCPA contains two parts "AP" and "PA", and these two continuous parts are the same, so the corresponding encoding only needs to be calculated once. According to statistics, all meta-path instances of APCPA in the heterogeneous graph contain 25 in total. In this process, the redundant calculations in the heterogeneous graph neural network are mainly reflected in the encoding stage of the meta-path instance, which requires each meta-path instance (such as 1-4-8-4-1) to be encoded into a vector. This encoding operation is a simple linear operation, such as MEAN (averaging the feature vectors of each vertex of the meta-path instance). Therefore, for different meta-path instances, such as 1-4-8-4-1 and 1-4-8-4-3, there are a lot of redundant calculations, that is, the common parts (1-4-8-4) between different meta-path instances need to be encoded multiple times. In the encoding stage, the traditional method requires 100 (25*4) calculations, while the layer-based encoding method only requires 39 calculations, which significantly reduces redundant calculations, greatly compresses storage overhead, and improves the reasoning efficiency of the heterogeneous graph neural network model.

[0132] like Figure 2 As shown, the present invention proposes a parallel implementation system of a heterogeneous graph neural network acceleration method based on a meta-path graph. The system includes a construction module 101, a division module 102, a calculation module 103 and a merging module 104. The construction module 101 establishes a connection relationship with the division module 102. The division module 102 establishes a connection relationship with the calculation module 103. The calculation module 103 establishes a connection relationship with the merging module 104.

[0133] Preferably, the construction module 101, the partitioning module 102, the calculation module 103 and the merging module 104 can be run in a multi-core processor or a multi-threaded server. Each module can be run as a separate thread or process, and multi-threaded parallel processing is used to improve performance. For example, the multi-core processor (e.g., 8 cores or more) can be an Intel Xeon E5-2699 v4 (22 cores / 44 threads), or it can be an AMD EPYC 7742 (64 cores / 128 threads). The multi-threaded server can be a Dell Power Edge R740 server, configured with two Intel Xeon Scalable processors, supporting up to 56 cores, or it can be an HPE ProLiant DL380 Gen10 server, configured with two AMD EPYC processors, supporting up to 128 cores.

[0134] The construction module 101 and the partitioning module 102 can use a high-speed bus (such as QPI (Quick Path Interconnect) or Infinity Fabric) inside the server to perform data transmission within the multi-core processor. The partitioning module 102 and the computing module 103 can be connected using high-speed memory access (such as NUMA architecture). The computing module 103 and the merging module 104 can use a high-speed bus (such as QPI or Infinity Fabric) inside the server to perform data transmission between modules.

[0135] like Figure 2 and Figure 6 As shown, the construction module 101 is responsible for constructing a meta-path graph from a given heterogeneous graph and different meta-paths. The construction module 101 is composed of several construction sub-modules 105. The construction sub-module 105 includes an extraction module 106 and an expansion module 107. The extraction module 106 extracts the vertices and edges that conform to the meta-path in the heterogeneous graph. The expansion module 107 is responsible for constructing the extracted parts into a complete meta-path graph. After the construction is completed, the meta-path graph will be sent to the partitioning module 102.

[0136] In the case where the construction module 101 is an independent processor, the construction module 101 may be a high-performance multi-core CPU, such as Intel Xeon E5-2699 v4 (22 cores / 44 threads).

[0137] In the case where the construction module 101 is composed of several hardware, the construction submodule 105 may include a data processing unit, a memory, and an input and output port. The construction submodule 105 may include a processor or an FPGA (field programmable gate array) for performing the computing tasks of the extraction module 106 and the expansion module 107. These hardware can efficiently process graph data and perform complex calculations. In order to store heterogeneous graphs, extracted vertices and edges, and constructed meta-path graphs, the construction submodule 105 may also include some memory components, such as SRAM or DRAM. The construction submodule 105 may have some connection ports (such as USB, Ethernet, etc.) for receiving the input heterogeneous graph and sending the constructed meta-path graph to the partitioning module 102. If a large amount of data needs to be processed efficiently, the construction submodule 105 may have parallel processing capabilities, using multiple cores or processing units to process multiple data streams simultaneously.

[0138] In the case where the extraction module 106 and the extension module 107 are hardware components constituting the construction submodule 105, the extraction module 106 includes a data acquisition unit, a processor or an accelerator, a memory, and a port. The data acquisition unit is, for example, a data receiving port, which can receive data from a heterogeneous graph to ensure that the information of vertices and edges can be accessed and read. The processor or accelerator is, for example, a CPU or a GPU, which can run a graph algorithm to analyze a heterogeneous graph to identify and extract vertices and edges that conform to a specific meta-path. The memory is, for example, a DDR4 RAM, with sufficient storage space to cache the extracted vertices and edges for subsequent processing. The port is used to transmit the extracted data to the extension module 107.

[0139] The expansion module 107 includes a computing unit, a memory, and a port. The computing unit is, for example, a CPU (such as an AMD EPYC or Intel Xeon processor) or a GPU (such as an NVIDIA A100), which can process the extracted vertices and edges and execute the logic and algorithms required to build a complete meta-path graph. The memory is, for example, a DDR4 or DDR5 RAM, with enough memory to store the intermediate results of the construction process and the final meta-path graph for quick access and modification. The port can be a network interface card (NIC), such as an Ethernet card from Broadcom or Intel, for sending the meta-path graph data to the partitioning module 102. Alternatively, the output module can also be a direct storage interface: such as a SATA or NVMe interface, for storing the generated graph in a hard disk or solid-state drive for subsequent processing. Figure 2 and Figure 6 As shown, the partitioning module 102 is composed of several partitioning sub-modules 108. The partitioning sub-module 108 is responsible for partitioning the meta-path graph into multiple sub-graphs. After the partitioning is completed, the obtained meta-path sub-graphs will be sent to the calculation module 103.

[0140] In the case where the partition module 102 is an independent processor, the partition module 102 can be a high-performance multi-core CPU, such as AMD EPYC 7742 (64 cores / 128 threads).

[0141] Preferably, when the partitioning module 102 is composed of several hardware components, the partitioning submodule 108 may include a processor, a memory, a storage device, and a port. First, the processor may be a high-performance multi-core CPU, such as AMD EPYC 7742, which has 64 cores and 128 threads and can process multiple partitioning tasks in parallel, thereby significantly improving the computing efficiency. Secondly, the memory may use high-bandwidth DDR4 or DDR5 memory to store the metapath graph and the intermediate results of its partitioning, ensuring sufficient storage capacity and fast access speed when processing large-scale graph data. In addition, in order to achieve fast data reading and writing, the use of NVMe solid-state drives (SSDs) such as Samsung 970EVO or Western Digital Black SN750 is an ideal choice, which will help to quickly store and retrieve the partitioned graph data. In order to further accelerate the graph partitioning algorithm, the partitioning submodule 108 may also be equipped with a GPU (such as NVIDIA A100 / Tesla V100) or an FPGA (such as the Xilinx Virtex series), especially when processing complex graph structures, these accelerators can significantly improve the parallel computing performance. At the same time, in order to ensure the efficiency of data transmission, it is also necessary to equip it with a high-performance Ethernet card (such as the Mellanox ConnectX series), which will ensure that the divided sub-graphs can be quickly sent to the computing module 103 for further processing. Through the combination of these hardware, the division sub-module 108 can efficiently complete its functions and lay a solid foundation for subsequent computing processing.

[0142] like Figure 2 and Figure 6 As shown, the calculation module 103 is composed of several calculation submodules 109. The calculation submodule 109 is responsible for encoding and calculating the metapath subgraph. The calculation submodule 109 includes a load module 110 and an encoding module 111. The load module 110 is responsible for performing layer-based load partitioning on the metapath subgraph and generating a metapath slice graph. The encoding module 111 is responsible for traversing the metapath slice graph and encoding it.

[0143] When computing module 103 is an independent processor, computing module 103 may be a high-performance multi-core CPU, such as AMD EPYC 7742 (64 cores / 128 threads).

[0144] In the case where the computing submodule 109 is a processor, the processor can select a multi-core CPU, such as Intel Xeon or AMD Ryzen series. These high-performance processors can support parallel computing and are suitable for processing complex encoding tasks. At the same time, graphics processing units (GPUs) such as NVIDIA RTX series or AMD Radeon series can be used to accelerate parallel computing of large-scale data, especially when traversing and encoding metapath slice graphs, which can provide significant performance improvements. In addition, large-capacity DDR4 or DDR5 memory is essential to support high-speed data access to ensure that there is no bottleneck when processing metapath slice graphs. In terms of storage, the use of high-speed NVMe solid-state drives (SSDs), such as Samsung970EVO or Western Digital BlackSN850, will help to quickly access the data of metapath subgraphs and slice graphs.

[0145] As components of the computing submodule 109, the load module 110 and the encoding module 111 are each composed of specific physical hardware. The load module 110 is mainly responsible for layer-based load partitioning, and its hardware can include multi-core processors, such as AMD Ryzen 9 5950X or Intel Core i9-11900K, with high-frequency DDR4 or DDR5 memory modules, such as the Corsair Vengeance LPX series. In addition, load balancers such as F5 BIG-IP and Mellanox ConnectX-6 network interface cards can ensure efficient resource management and fast data transmission. The encoding module 111 focuses on traversing the metapath slice graph and encoding, and is usually equipped with a powerful graphics processing unit (GPU), such as NVIDIA A100 or RTX 3080, and Intel Xeon Gold processor to improve encoding efficiency. It also requires high-speed SSD storage, such as Samsung 970 NVMe SSD, for fast access to encoded data, while large-capacity DDR4 or DDR5 memory ensures stability during processing. Through the optimized combination of these hardware, the load module 110 and the encoding module 111 can work together efficiently to improve the overall performance of the computing submodule. Figure 2 and Figure 6As shown, the merging module 104 is composed of several merging sub-modules 112. The merging sub-module 112 is responsible for merging the meta-path instance slice codes and performing subsequent aggregation calculations. The merging sub-module 112 includes a coding merging module 113, a meta-path internal aggregation module 114 and a meta-path between aggregation module 115. The coding merging module 113 is responsible for merging the meta-path instance slice codes to obtain the codes of all meta-path instances. The meta-path internal aggregation module 114 is used to perform aggregation operations on the codes of all meta-path instances of the same target vertex under the same meta-path to generate feature information of the target vertex. The meta-path between aggregation module 115 is used to aggregate the feature information of all the same target vertices under different meta-paths again to obtain the final feature.

[0146] In the case where the merging module 104 is an independent processor, the merging module 104 can be a high-performance multi-core CPU and GPU, such as NVIDIA Tesla V100 or A100, for accelerated computing.

[0147] If the construction module 101 and the partitioning module 102 are located on different physical servers, a high-speed Ethernet (such as 10GbE or 40GbE) can be used for network connection. The partitioning module 102 and the computing module 103 use the PCIe (PCI Express) bus to connect the CPU and GPU, supporting high-speed data transmission. The computing module 103 and the merging module 104 use the PCIe (PCI Express) bus for data transmission between the CPU and the GPU.

[0148] With this setup, the system achieves efficient meta-path graph construction and encoding calculation, and significantly improves the reasoning efficiency of heterogeneous graph neural networks. The independence and parallel processing capabilities of each module enable the system to process large-scale heterogeneous graph data and meet practical application needs.

[0149] As a component of the merging module 104, the merging submodule 112 has physical hardware composed of multiple components to realize the functions of merging metapath instance slice encoding and subsequent aggregation calculation. The merging submodule 112 can be equipped with a multi-core processor, such as AMD Ryzen 9 5900X or Intel Xeon Platinum series, which provide powerful multi-threaded processing capabilities and are suitable for complex merging and aggregation calculations. The merging submodule 112 also includes a high-performance graphics processing unit (GPU), such as NVIDIA RTX 3080 or AMD Radeon RX 6900XT, which can accelerate encoding merging and aggregation operations, especially when processing large-scale data, significantly improving computing efficiency. The merging submodule 112 also includes a large-capacity memory, such as Corsair Vengeance LPX 32GB DDR4 memory, which helps to ensure that there is enough memory space to store temporary data and calculation results when performing large-scale aggregation calculations. In order to quickly access data, the merging submodule 112 can also be configured with high-speed SSD storage, such as Samsung 970EVO Plus NVMe SSD, to provide superior data reading and writing capabilities. The port of the merging submodule 112 is equipped with a Mellanox ConnectX-6 network interface card to support high-speed data transmission between modules, thereby ensuring the high efficiency of the merging submodule 112 in processing data.

[0150] As part of the hardware components of the merging submodule 112, the meta-path internal aggregation module 114 and the meta-path inter-aggregation module 115 respectively undertake different aggregation computing tasks, so their physical hardware design and selection have different focuses. For the meta-path internal aggregation module 114, its hardware may include a multi-core processor, such as AMD Ryzen 7 5800X or IntelCore i7 series, which has efficient multi-threading capabilities and can handle a large number of aggregation computing encoded by meta-path instances of the same target vertex. In addition, 32GB or more of DDR4 memory (such as Corsair Vengeance LPX) can support the storage and processing of large amounts of data in the aggregation operation to increase the computing speed, and is equipped with high-speed SSD storage such as Samsung 970EVO NVMe SSD to ensure fast access and access to required data when processing aggregation computing. Relatively speaking, the hardware of the meta-path aggregation module 115 may include a high-performance graphics processing unit (GPU), such as NVIDIA A100 or RTX 3090. These GPUs can accelerate the aggregation calculation of the same target vertex feature information under different meta-paths, have powerful processing capabilities, and are suitable for complex data processing tasks. In addition, multi-core processors of the Intel Xeon Silver or AMD EPYC series can also be used in the meta-path aggregation module 115 to support large-scale data processing and complex aggregation operations, and are equipped with 64GB or higher DDR4 memory to ensure that there is sufficient memory space for efficient calculation when processing the aggregation of feature information between different meta-paths. Through the combination of these hardware, the meta-path internal aggregation module 114 and the meta-path aggregation module 115 can efficiently complete their respective aggregation calculation tasks, thereby improving the overall computing performance and efficiency of the merging module 104.

[0151] Furthermore, in this system, the ports of each module are assigned unique numbers to ensure smooth transmission and processing of data from the heterogeneous graph to the final feature information.

[0152] First, the extraction module 106 includes a first port for receiving heterogeneous graph data and a second port for sending the extracted data. The expansion module 107 includes a third port for receiving the extracted data and a fourth port for sending the constructed meta-path graph. The second port is connected to the third port. The connection between the second port and the third port can use a wired connection, such as a Cat 6 Ethernet cable connection.

[0153] Then, the expansion module 107 sends the constructed meta-path graph to the 5th port of the segmentation module 102 through the 4th port, realizing seamless connection from extraction to expansion. The 4th port and the 5th segment port can also be connected by wire, such as using a Cat 6 Ethernet cable.

[0154] The division submodule 108 receives the meta-path graph from the construction module 101 through the fifth port, and sends the divided meta-path subgraph to the seventh port of the load module 110 through the sixth port. The sixth port is connected to the seventh port of the load module 110. The connection between the sixth port and the seventh port is a wired connection, using a Cat 6 Ethernet cable to transmit data in a sequential data stream.

[0155] The load module 110 receives the meta-path subgraph through the 7th port, and sends the generated meta-path slice graph to the 9th port of the encoding module 111 through the 8th port, wherein the 8th port is connected to the 9th port in a structured data exchange manner.

[0156] Next, the encoding module 111 receives the meta-path slice graph through the 9th port, and sends the encoded meta-path instance slice graph to the 11th port of the merging module 104 through the 10th port, and the connection method is a unified encoding format. The 10th port and the 11th port can be connected by wire, such as using an optical fiber line for structured data exchange, to ensure high-speed data transmission and stability.

[0157] The code merging module 113 receives data through the 11th port, and sends the merged meta-path instance code to the 13th port of the meta-path internal aggregation module 114 through the 12th port, and the connection mode is data integration. The 12th port and the 13th port can be connected by wire, such as using an optical fiber line for data integration.

[0158] The meta-path internal aggregation module 114 receives the merged meta-path instance code through the 13th port, and sends the aggregated target vertex feature information to the 15th port of the meta-path inter-aggregation module 115 through the 14th port, and the connection mode is feature aggregation. The 14th port and the 15th port can be connected by wire, for example, using an optical fiber line to transmit information in the form of feature aggregation.

[0159] Finally, the meta-path aggregation module 115 receives the aggregated target vertex feature information through the 15th port, and outputs the final feature information through the 16th port, thus realizing a closed loop of the entire data processing.

[0160] It should be noted that the above-mentioned specific embodiments are exemplary, and those skilled in the art can come up with various solutions inspired by the disclosure of the present invention, and these solutions also belong to the disclosure scope of the present invention and fall within the protection scope of the present invention. Those skilled in the art should understand that the present invention specification and its drawings are illustrative and do not constitute a limitation on the claims. The scope of protection of the present invention is defined by the claims and their equivalents. The present invention specification contains multiple inventive concepts, such as "preferably" and "according to a preferred embodiment", which means that the corresponding paragraph discloses an independent concept, and the applicant reserves the right to file a divisional application based on each inventive concept.

Claims

1. A heterogeneous graph neural network acceleration method based on meta-path graph, characterized in that: The method comprises: According to a given heterogeneous graph and a given type of meta-path, all meta-path instances are constructed into a meta-path graph in the form of a graph; Partitioning the meta-path graph to obtain a plurality of meta-path sub-graphs; Partitioning the workload of the meta-path subgraph; According to the workload division, layer-based metapath instance encoding is performed, and the encodings of all metapath instance slices are merged according to the inter-layer relationship of the metapath graph to obtain the encoding of the metapath instance. Aggregation calculations are performed within the meta-path instance and between meta-path instances to obtain final features of the target vertex.

2. The heterogeneous graph neural network acceleration method based on meta-path graph according to claim 1 is characterized in that: The steps to construct a meta-path diagram include: Extract vertices and edges in a heterogeneous graph based on the types that appear in the meta-path; The repeated vertices and edges are copied to the previous partial meta-path graph and further expanded according to the meta-path pattern to form a complete meta-path graph.

3. The heterogeneous graph neural network acceleration method based on meta-path graph according to claim 1 or 2, characterized in that: The steps of graph partitioning the meta-path graph include: Collect the vertices in the center layer of the meta-path graph to obtain all the vertices in the center layer of the meta-path graph; Divide the vertices of the central layer into several batches, and different batches contain the same number of central layer vertices; Starting from all vertices in each batch, the meta-path graph is traversed in the outgoing and incoming directions respectively to obtain the meta-path subgraph corresponding to the batch.

4. The heterogeneous graph neural network acceleration method based on meta-path graph according to any one of claims 1 to 3, characterized in that: The step of dividing the workload of the meta-path subgraph includes: Dividing the meta-path subgraph into at least two parts by layer, each part comprising a continuous layer and constituting a meta-path slice graph comprising a part of the meta-path instance; The meta-path slice graph is traversed in the order of layers to obtain all meta-path instance slices.

5. The heterogeneous graph neural network acceleration method based on meta-path graph according to any one of claims 1 to 4, characterized in that: The steps to obtain the encoding of a meta-path instance include: Encoding the meta-path instance slices and obtaining partial encoding of the meta-path instance; Using the edge relationship between different layers, the encodings of the meta-path instance slices in different subgraphs are re-encoded to obtain all meta-path instance encodings; Perform internal aggregation of meta-path instances on different meta-path subgraphs to obtain feature information of the target vertex; The feature information of the same target vertex between different meta-path graphs is aggregated between meta-path instances to obtain the final features of all target vertices.

6. The heterogeneous graph neural network acceleration method based on meta-path graph according to any one of claims 1 to 5, characterized in that: The steps to encode a meta path instance slice include: Determine whether there are identical continuous parts in the meta-path definition corresponding to the meta-path graph; If yes, priority tier division is implemented; otherwise, tier-based division is implemented.

7. A heterogeneous graph neural network acceleration system based on meta-path graph, characterized in that: The system comprises: A construction module (101) constructs a meta-path graph from all meta-path instances in the form of a graph according to a given heterogeneous graph and a given type of meta-path; A partitioning module (102) partitions the meta-path graph to obtain a plurality of meta-path sub-graphs; A computing module (103) divides the workload of the meta-path subgraph; The merging module (104) performs layer-based meta-path instance encoding according to the division of workload, merges the encodings of all meta-path instance slices according to the inter-layer relationship of the meta-path graph to obtain the encoding of the meta-path instance, and performs internal aggregation calculations of the meta-path instance and aggregation calculations between meta-path instances to obtain the final features of the target vertex.

8. The heterogeneous graph neural network acceleration system based on meta-path graph according to claim 7 is characterized in that: The construction module (101) includes a plurality of construction submodules (105), The construction submodule (105) is used to construct a meta-path graph; The plurality of construction submodules (105) include an extraction module (106) and an expansion module (107). The extraction module (106) extracts vertices and edges in the heterogeneous graph according to the types appearing in the meta-path; The expansion module (107) copies the repeated vertices and edges into the previous partial meta-path graph, and further expands it according to the meta-path pattern to form a complete meta-path graph.

9. The heterogeneous graph neural network acceleration system based on meta-path graph according to claim 7 or 8, characterized in that: The calculation module (103) includes a plurality of calculation submodules (109); The calculation submodule (109) is used to divide the workload of the meta-path subgraph according to the layer, obtain a plurality of meta-path slice graphs and perform coding calculation; The calculation submodule (109) includes a load module (110) and an encoding module (111); The load module (110) is used to divide the meta-path subgraph into at least two parts by layer, each part comprising a continuous layer and constituting a meta-path slice graph comprising a part of a meta-path instance; The encoding module (111) is used to traverse the meta-path slice graph in the order of layers to obtain all meta-path instance slices.

10. The heterogeneous graph neural network acceleration system based on meta-path graph according to any one of claims 7 to 9, characterized in that: The merging module (104) includes a plurality of merging submodules (112); The merging submodule (112) includes an encoding merging module (113), an internal meta-path aggregation module (114) and an inter-meta-path aggregation module (115); The coding merging module (113) is used to encode the meta-path instance slices and obtain partial codes of the meta-path instance, and to re-encode the codes of the meta-path instance slices in different subgraphs by using the relationship between the edges of different layers to obtain all the meta-path instance codes; The meta-path internal aggregation module (114) is used to perform internal aggregation of meta-path instances on the same meta-path subgraph to obtain feature information of the target vertex; The meta-path aggregation module (115) is used to aggregate the feature information of the same target vertex between different meta-path graphs between meta-path instances to obtain the final features of all target vertices.

Citation Information

Patent Citations

  • Implementation method of multi-view heterogeneous hypergraph convolutional network model

    CN117634561A

  • Heterogeneous graph neural network node classification method of double-view normal form based on network mode and meta-path

    CN118228103A

  • Heterogeneous tree graph neural network for label prediction

    US20240330679A1

  • Target task execution vehicle determination method, and system

    WO2021139738A1