A heterogeneous graph processing method, device, equipment and storage medium

By using a target graph neural network model to classify vertices and extract features from heterogeneous graphs, the problem of inaccurate vector representation in heterogeneous graphs is solved, and higher precision vertex representation is achieved.

CN116483876BActive Publication Date: 2026-01-16BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210031711.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-12
Publication Date
2026-01-16
Estimated Expiration
2042-01-12

AI Technical Summary

Technical Problem

Existing graph neural networks have simple network structures when processing heterogeneous graphs, resulting in poor accuracy of the vector representations of each node in the output heterogeneous graph.

Method used

A target graph neural network model is adopted. The vertex set is classified by a vertex classification network to determine the target vertex set. The vertex feature extraction network and vector representation output network are combined with neighbor sampling, feature encoding and multi-layer graph convolution module to generate the vector representation of the vertex.

Benefits of technology

It improves the accuracy of vector representation of each vertex in heterogeneous graphs, enhances the diversity of feature information and the accuracy of fused feature representation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116483876B_ABST
    Figure CN116483876B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a heterogeneous graph processing method, device and equipment and a storage medium. The method comprises: classifying a vertex set in a heterogeneous graph based on a vertex type set in the heterogeneous graph through a vertex classification network in a target graph neural network model to obtain at least one target vertex set; inputting the target vertex set and at least one target meta-path corresponding to the target vertex set into a vertex feature extraction network for each target vertex set to obtain vertex feature representations corresponding to each target meta-path respectively; and inputting the vertex feature representations into a vector representation output network to obtain vector representations corresponding to each vertex in the heterogeneous graph respectively. Embodiments of the present application solve the problem of too small feature sampling quantity of the existing graph neural network, and improve the accuracy of the vector representation output by the graph neural network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of neural network, and particularly relate to a heterogeneous graph processing method and device, equipment and storage medium. BACKGROUND

[0002] The rise and application of neural networks have promoted the research of pattern recognition and data mining. However, the commonly used neural network model, such as the convolutional network model, is based on the translational invariance of images, and performs translation on the images to extract features through convolution. However, in real-world scenarios, there are irregular graph structures, such as recommendation systems, academic networks, knowledge graphs, and e-commerce scenarios, which do not have translational invariance. Therefore, graph neural networks (GNN) have emerged. The design idea of graph neural networks is to learn a function mapping that generates a new vector representation by aggregating the feature information of a vertex itself and its neighbors.

[0003] In the process of implementing the present application, it is found that at least the following technical problems exist in the prior art:

[0004] Most of the graph neural networks are applied to undirected graphs and homogeneous graphs, and there are few graph neural networks that can be applied to heterogeneous graph processing. Moreover, the network structure of the existing graph neural networks is relatively simple, which leads to poor accuracy of the vector representation of each node in the heterogeneous graph output by the graph neural network. SUMMARY

[0005] Embodiments of the present application provide a heterogeneous graph processing method, device, equipment and storage medium to improve the accuracy of the vector representation output by the graph neural network.

[0006] In a first aspect, embodiments of the present application provide a heterogeneous graph processing method, which comprises:

[0007] inputting a heterogeneous graph to be processed and at least one meta-path corresponding to the heterogeneous graph into a target graph neural network model; wherein the heterogeneous graph comprises a vertex set and a vertex type set, and the target graph neural network model comprises a vertex classification network, a vertex feature extraction network and a vector representation output network;

[0008] classifying the vertex set based on the vertex type set through the vertex classification network to obtain at least one target vertex set, and determining at least one target meta-path corresponding to each target vertex set;

[0009] For each target vertex set, input the target vertex set and each target meta-path into the vertex feature extraction network to obtain a vertex feature representation corresponding to each target meta-path;

[0010] input each of the vertex feature representations into the vector representation output network to obtain a vector representation corresponding to each vertex in the heterogeneous graph.

[0011] In a second aspect, an embodiment of the present application further provides a processing device for a heterogeneous graph, the device comprising:

[0012] a heterogeneous graph input module configured to input a heterogeneous graph to be processed and at least one meta-path corresponding to the heterogeneous graph into a target graph neural network model; wherein the heterogeneous graph comprises a vertex set and a vertex type set, and the target graph neural network model comprises a vertex classification network, a vertex feature extraction network and a vector representation output network;

[0013] a vertex classification module configured to classify the vertex set based on the vertex type set by using the vertex classification network to obtain at least one target vertex set and determine at least one target meta-path corresponding to each target vertex set;

[0014] a vertex feature extraction module configured to input, for each target vertex set, the target vertex set and each target meta-path into the vertex feature extraction network to obtain a vertex feature representation corresponding to each target meta-path;

[0015] a vector representation output module configured to input each vertex feature representation into the vector representation output network to obtain a vector representation corresponding to each vertex in the heterogeneous graph.

[0016] In a third aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising:

[0017] one or more processors;

[0018] a memory configured to store one or more programs;

[0019] when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement any of the processing methods for a heterogeneous graph as described above.

[0020] In a fourth aspect, an embodiment of the present application further provides a storage medium containing computer executable instructions for executing any of the processing methods for a heterogeneous graph as described above when executed by a computer processor.

[0021] The embodiments of the above application have the following advantages or beneficial effects:

[0022] The embodiment of the present application inputs the target vertex set and at least one target meta-path into the vertex feature extraction network, obtains vertex feature representations corresponding to each target meta-path respectively, solves the problem of too few features sampled by the existing graph neural network, thereby improving the diversity of feature information represented by the fused feature representation, and further improves the accuracy of the vector representation of each vertex in the heterogeneous graph output by the target graph neural network model. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 is a flowchart of a heterogeneous graph processing method provided by the embodiment one of the present application;

[0024] Figure 2 is a schematic diagram of multi-order neighbor sampling provided by the embodiment one of the present application;

[0025] Figure 3 is a flowchart of the aggregation operation of a multi-layer graph convolution module provided by the embodiment one of the present application;

[0026] Figure 4 is a flowchart of a heterogeneous graph processing method provided by the embodiment two of the present application;

[0027] Figure 5 is a structural schematic diagram of a target graph neural network model provided by the embodiment two of the present application;

[0028] Figure 6 is a schematic diagram of a heterogeneous graph processing device provided by the embodiment three of the present application;

[0029] Figure 7 is a structural schematic diagram of an electronic device provided by the embodiment four of the present application. DETAILED DESCRIPTION

[0030] The present application will be further described below in conjunction with the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only the parts related to the present application are shown in the drawings, but not all the structures.

[0031] Embodiment one

[0032] Figure 1 is a flowchart of a heterogeneous graph processing method provided by the embodiment one of the present application, which can be applicable to the case of feature extraction of a heterogeneous graph. The method can be executed by a heterogeneous graph processing device, which can be realized in the form of software and / or hardware. The device can be configured in a terminal device, which can be a mobile terminal, a notebook computer, a desktop computer, a server, a tablet computer and other intelligent terminals. The specific steps include the following steps:

[0033] S110, input the heterogeneous graph to be processed and at least one meta-path corresponding to the heterogeneous graph into a target graph neural network model.

[0034] Specifically, the heterogeneous graph can include at least two types of vertices and one type of edge, or the heterogeneous graph can include one type of vertex and at least two types of edge, or the heterogeneous graph can include at least two types of vertices and at least two types of edges. For example, in an academic network, the vertex types include authors and references, and the edge types include citation, consultation, and retrieval, etc. In an e-commerce scenario, the vertex types include users and items, and the edge types include browsing, collecting, clicking, and purchasing, etc. In a recommendation system, the vertex types include users, movies, and short videos, and the edge types include retrieval, viewing, and liking, etc.

[0035] Specifically, the meta-path is used to represent a path passing through at least two vertices in the heterogeneous graph. For example, the edge type between vertex A and vertex B is clicking, and the edge type between vertex B and vertex C is purchasing. The path representing "click-purchase" between the initial vertex (vertex A) and the final vertex (vertex C) can be used as a meta-path, and the meta-path can be a type list composed of at least one edge type.

[0036] In this embodiment, the heterogeneous graph includes a vertex set and a vertex type set, and the target graph neural network model includes a vertex classification network, a vertex feature extraction network, and a vector representation output network.

[0037] Specifically, the vertex type set is used to represent the type to which the vertex in the heterogeneous graph belongs. For example, the vertex type set includes users and items. The vertex set includes all vertices in the heterogeneous graph, such as vertex set including user A, user B, user C, item A, item B, and item C. Specifically, the heterogeneous graph further includes an edge set, and the edges in the edge set can be used to represent the connection relationship between any two vertices in the vertex set.

[0038] S120, classify the vertex set based on the vertex type set through the vertex classification network to obtain at least one target vertex set, and determine at least one target meta-path corresponding to each target vertex set.

[0039] In an embodiment, optionally, based on the obtained vertex type mapping function, at least one target vertex set corresponding to the vertex type set in the vertex set is determined. The vertex type mapping function is used to represent the mapping relationship between the vertex type and the vertex in the heterogeneous graph, and specifically, one vertex type corresponds to at least one vertex. The vertex type mapping function can be input into the target graph neural network model by the user after being defined in advance. For example, assuming that the vertex type set T includes vertex type t1 and vertex type t2, the target vertex set V t1 and V t2 corresponding to the vertex type t1 and the vertex type t2 in the vertex set V is obtained through the vertex type mapping function.

[0040] For example, assuming that the vertex type corresponding to the target vertex set is a user type, the meta-path with the starting edge type of “click”, “purchase” or “contact” can be used as the target meta-path. The starting edge type in the target meta-path is related to the vertex type corresponding to the target vertex set.

[0041] In S130, for each target vertex set, the target vertex set and each target meta-path are input into the vertex feature extraction network to obtain a vertex feature representation corresponding to each target meta-path.

[0042] In an embodiment, optionally, the vertex feature extraction network includes a neighbor sampling module, a feature encoding module and a multi-layer graph convolution module. The neighbor sampling module is used to determine a multi-order neighbor vertex set corresponding to each target meta-path based on the target vertex set and the at least one target meta-path. The feature encoding module is used to perform an encoding operation on each multi-order neighbor vertex set to obtain a multi-order neighbor feature representation corresponding to each target meta-path. The multi-layer graph convolution module is used to perform an aggregation operation on each multi-order neighbor feature representation to obtain a vertex feature representation corresponding to each target meta-path.

[0043] In an embodiment, optionally, the heterogeneous graph further includes an edge type set. Correspondingly, the neighbor sampling module is used to determine a multi-order neighbor vertex set corresponding to each target meta-path based on the target meta-path and the edge type set. The target meta-path is used to represent a list of edge types on the path from the initial vertex to the maximum order vertex in the multi-order sampling, and the edge type set includes the types of edges between the vertices in the heterogeneous graph.

[0044] Specifically, for each target meta-path, the neighbor sampling module samples the heterogeneous graph based on a neighbor sampling function and the target meta-path to obtain a multi-order neighbor vertex set corresponding to the target meta-path.

[0045] In an example, in an e-commerce scenario, the target meta-path can be "browsing-similar", and the vertex sampling order corresponding to the target meta-path is 3-order. For example, user A browses item B, and item B is similar to item C. Assuming that the vertex sampling order corresponding to the target meta-path is K-order, each vertex in the target vertex set is located at the Kth layer, and the sampling process samples the neighbor vertices of each vertex in the target vertex set layer by layer from the inside to the outside according to the target meta-path. Specifically, the neighbor vertex set of each layer is expanded on the basis of the vertex set of the previous layer, that is, the neighbor vertex set of each layer includes all vertices of the previous layer and the neighbor vertices of the vertices of the previous layer at the current layer.

[0046] Figure 2 is a schematic diagram of multi-order neighbor sampling provided by an embodiment of the present application. Specifically, Figure 2 The black circle in represents a target vertex A in the target vertex set, the oblique line filled circle represents a first-order neighbor vertex corresponding to the target vertex A sampled based on the target meta-path 1, and the vertical line filled circle represents a second-order neighbor vertex corresponding to the target vertex A sampled based on the target meta-path 1.

[0047] Specifically, the multi-order neighbor sampling set includes the neighbor sampling set of each layer (V k ,V k-1 …V 0 ). In an example, assuming that the vertex sampling order corresponding to the target meta-path is K-order, the neighbor sampling set V k of the Kth layer is V t , the neighbor sampling set V k-1 of the K-1th layer is V k +V1, where V1 represents a first-order neighbor vertex set, the neighbor sampling set V k-2 of the K-2th layer is V k +V1+V2, where V2 represents a second-order neighbor vertex set, and so on, and the neighbor sampling set V 0 of the 0th layer is V k +V1+V2…+V k , where V k represents a k-order neighbor vertex set.

[0048] In an embodiment, optionally, the heterogeneous graph further includes a vertex feature set, and the feature encoding module is configured to: for each multi-order neighbor vertex set, determine a multi-order neighbor feature set corresponding to the multi-order neighbor vertex set based on the vertex feature set; the vertex feature set includes feature information corresponding to each vertex in the heterogeneous graph; and determine a multi-order neighbor feature representation corresponding to the target meta-path based on the multi-order neighbor feature set and model vector parameters in the feature encoding module.

[0049] The characteristic information of the vertex user A includes, for example, name, age, gender, and the like.

[0050] The characteristic information corresponding to each vertex in the multi-order neighbor vertex set is searched in the vertex characteristic set, and each characteristic information is used as a multi-order neighbor characteristic set. The model vector parameter is used to convert the characteristic information in the multi-order neighbor characteristic set into a characteristic vector. For example, the characteristic information is multiplied by the model vector parameter to obtain a characteristic representation corresponding to the characteristic information. Specifically, the model vector parameter is a vector parameter obtained by the target graph neural network model based on training data after training and learning.

[0051] In an embodiment, the multi-layer graph convolution module can optionally perform the following operations: for each multi-order neighbor characteristic representation, performing an aggregation operation on the multi-order neighbor characteristic representation based on a preset aggregation function to obtain an aggregated characteristic representation corresponding to the target meta path; and performing a conversion operation on the aggregated characteristic representation based on a fully connected layer to output a vertex characteristic representation corresponding to the target meta path.

[0052] The preset aggregation function includes, for example, but is not limited to, an AGGREGATE function, an LSTM (Long Short-Term Memory) aggregation function, and a pooling aggregation function. Taking the AGGREGATE function as an example, the AGGREGATE function adopts Mean aggregation, and is performed layer by layer from the outside to the inside. Specifically, the characteristic representations of the neighbor vertices of the current vertex are averaged, the average value is concatenated with the characteristic representation of the current vertex, and the concatenated characteristic representation is used as the target characteristic representation of the current vertex.

[0053] Figure 3 is a flowchart of the multi-layer graph convolution module provided in Embodiment One of the present application performing an aggregation operation. Taking a multi-order neighbor characteristic representation as an example, the K-order neighbor characteristic representation contains characteristic representations of the 0th layer to the Kth layer. The aggregation is performed layer by layer from the outside to the inside, and the 0th layer is the outermost layer. It is determined whether k is greater than K. If yes, the process is ended. If no, for each vertex in the kth layer, taking the current vertex as vertex u, the characteristic representations of the neighbor vertices of vertex u in the previous layer (k-1th layer) are selected out, and the selected characteristic representations are aggregated to obtain neighbor aggregated characteristic The characteristic representations of the neighbor vertices are selected out The aggregation operation is performed to obtain neighbor aggregated characteristic The neighbor aggregated characteristic is concatenated with the characteristic representation of vertex u in the current layer to obtain the aggregated characteristic representation corresponding to vertex u in the current layer The aggregated characteristic representation is converted based on the sigmoid activation function in the fully connected layer performing a transformation operation to obtain a vertex feature representation of the vertex u. Perform the aggregation operation of the next layer by setting k = k + 1 until k > K.

[0054] S140, input each vertex feature representation into a vector representation output network to obtain a vector representation corresponding to each vertex in the heterogeneous graph.

[0055] In an embodiment, optionally, the vector representation output network comprises a feature fusion network and a vector output network; for each target vertex set, input at least one vertex feature representation corresponding to the target vertex set into the feature fusion network to obtain a fusion feature representation corresponding to the target vertex set output by the feature fusion network based on an attention mechanism; input the fusion feature representation corresponding to each target vertex set into the vector output network to obtain a vector representation corresponding to each vertex in the heterogeneous graph.

[0056] Specifically, the feature fusion network can be used to fuse the vertex feature representations to obtain a fusion feature representation corresponding to the target vertex set.

[0057] In an embodiment, optionally, the feature fusion network is configured to: determine an attention weight based on the vertex feature representations, a first model weight matrix and a second model weight matrix in the feature fusion network; and perform a point multiplication operation on the attention weight and the at least one vertex feature representation to obtain the fusion feature representation corresponding to the target vertex set.

[0058] Specifically, the first model weight matrix and the second model weight matrix are weight matrices obtained by the target graph neural network model after training learning based on training data. Specifically, multiplying the vertex feature representations by the first model weight matrix obtains a first weight, performing an activation operation on the first weight using a tanh function, and multiplying the activated first weight by the second model weight matrix obtains a second weight. Performing a normalization operation on the second weight using a softmax function obtains the attention weight.

[0059] Specifically, the fusion feature representation includes fusion feature representations corresponding to each vertex in the target vertex set. For example, the fusion feature representation of vertex A is taken as the vector representation of vertex A. The vector representation is a feature vector used to represent the feature information of the vertex.

[0060] The vector output network integrates the fusion feature representations corresponding to each target vertex set to obtain a vector representation matrix. Specifically, the vector representation matrix includes the fusion feature representation corresponding to each vertex in each target vertex set, i.e., the fusion feature representation corresponding to a vertex is taken as the vector representation of the vertex.

[0061] The technical scheme of the embodiment is that the target vertex set and at least one target meta path are input into the vertex feature extraction network to obtain vertex feature representations corresponding to the respective target meta paths, thereby solving the problem of too few features sampled by the existing graph neural network. Furthermore, the vertex feature representations are input into the feature fusion network to obtain a fusion feature representation corresponding to the target vertex set output by the feature fusion network based on the attention mechanism, thereby solving the fusion problem of multiple vertex feature representations, improving the diversity of the feature information represented by the fusion feature representation, and further improving the accuracy of the vector representation of each vertex in the heterogeneous graph output by the target graph neural network model.

[0062] Embodiment two

[0063] Figure 4 is a flowchart of a heterogeneous graph processing method provided by the second embodiment of the application. The technical scheme of the embodiment is a further refinement based on the above-mentioned embodiment. Optionally, the vertex feature set includes a vertex sparse feature set and / or a vertex dense feature set, and correspondingly, the multi-order neighbor feature set includes a multi-order neighbor sparse feature set and / or a multi-order neighbor dense feature set, and the model vector parameter includes a sparse model vector parameter and / or a dense model vector parameter. The vertex sparse feature set contains integer-represented feature information corresponding to each vertex in the heterogeneous graph, and the vertex dense feature set contains floating-point number-represented feature information corresponding to each vertex in the heterogeneous graph.

[0064] The specific implementation steps of the embodiment include:

[0065] S210, input the heterogeneous graph to be processed and at least one meta path corresponding to the heterogeneous graph into a target graph neural network model.

[0066] In one embodiment, optionally, the heterogeneous graph includes an e-commerce heterogeneous graph, and correspondingly, the vertex type set includes a user type and an item type.

[0067] S220, classify the vertex set based on the vertex type set through a vertex classification network to obtain at least one target vertex set, and determine at least one target meta path corresponding to each target vertex set.

[0068] S230, for each target vertex set, determine a multi-order neighbor vertex set corresponding to each target meta path based on the target vertex set and the at least one target meta path through a neighbor sampling module.

[0069] S240, for each multi-order neighbor vertex set, determine a multi-order neighbor feature set corresponding to the multi-order neighbor vertex set based on the vertex feature set through a feature encoding module.

[0070] S250, determining the multi-order neighbor feature representation corresponding to the target meta-path based on the multi-order neighbor feature set and the model vector parameter in the feature encoding module.

[0071] In the embodiment, the vertex feature set includes a vertex sparse feature set and / or a vertex dense feature set, and correspondingly, the multi-order neighbor feature set includes a multi-order neighbor sparse feature set and / or a multi-order neighbor dense feature set, and the model vector parameter includes a sparse model vector parameter and / or a dense model vector parameter; the vertex sparse feature set contains the integer-represented feature information corresponding to each vertex in the heterogeneous graph, and the vertex dense feature set contains the floating-point number-represented feature information corresponding to each vertex in the heterogeneous graph.

[0072] For example, the feature information in the vertex sparse feature set can be the age and income of a user, or the category and price of an item, etc. The feature information in the vertex dense feature set can be the address information of a user, or the name, manufacturer and function of an item, etc.

[0073] Specifically, the sparse model vector parameter and / or the dense model vector parameter are vector parameters obtained by the target graph neural network model based on training learning of training data.

[0074] In one embodiment, the vertex feature set includes a vertex sparse feature set, and correspondingly, the feature encoding module includes a sparse feature encoding unit. The neighbor sparse features in the multi-order neighbor sparse feature set are encoded based on the sparse model vector parameter in the feature encoding module by the sparse feature encoding unit to obtain sparse feature representation, and the sparse feature representation is taken as the multi-order neighbor feature representation.

[0075] In another embodiment, the vertex feature set includes a vertex dense feature set, and correspondingly, the feature encoding module includes a dense feature encoding unit. The neighbor dense features in the multi-order neighbor dense feature set are encoded based on the dense model vector parameter in the feature encoding module by the dense feature encoding unit to obtain dense feature representation, and the dense feature representation is taken as the multi-order neighbor feature representation.

[0076] In another embodiment, optionally, the vertex feature set includes a vertex sparse feature set and a vertex dense feature set, and correspondingly, the feature encoding module includes a sparse feature encoding unit, a dense feature encoding unit, and a coded feature fusion unit; the sparse feature encoding unit encodes neighbor sparse features in the multi-order neighbor sparse feature set based on the sparse model vector parameters in the feature encoding module to obtain sparse feature representations; the dense feature encoding unit encodes neighbor dense features in the multi-order neighbor dense feature set based on the dense model vector parameters in the feature encoding module to obtain dense feature representations; and the coded feature fusion unit performs a fusion operation on the sparse feature representations and the dense feature representations based on a preset fusion function to obtain the multi-order neighbor feature representation corresponding to the target meta-path.

[0077] On the basis of the above-mentioned embodiments, optionally, the sparse feature encoding unit is configured to: search for at least one sparse vector parameter corresponding to at least one neighbor sparse feature in the multi-order neighbor sparse feature set from the sparse model vector parameters, and take the searched at least one sparse vector parameter as the sparse feature representation; and wherein the sparse model vector parameters include sparse vector parameters corresponding to at least one vertex sparse feature in the vertex sparse feature set.

[0078] Specifically, the sparse vector parameters are feature vectors of the sparse features. For example, the sparse model vector parameters include sparse vector parameter A, sparse vector parameter B, and sparse vector parameter C corresponding to vertex sparse feature A, vertex sparse feature B, and vertex sparse feature C, respectively. Assuming that the multi-order neighbor sparse feature set includes vertex sparse feature A and vertex sparse feature B, the sparse feature representation includes sparse vector parameter A and sparse vector parameter B.

[0079] On the basis of the above-mentioned embodiments, optionally, the dense feature encoding unit is configured to: multiply each neighbor dense feature in the multi-order neighbor dense feature set with a dense model vector parameter to obtain the dense feature representation.

[0080] Specifically, the dense model vector parameter is a common feature vector corresponding to the dense features. For example, assuming that the multi-order neighbor dense feature set includes vertex dense feature A and vertex dense feature B, multiplying vertex dense feature A and vertex dense feature B with the dense model vector parameter to obtain the dense feature representation.

[0081] For example, the preset fusion function can be an addition function or a concatenation function. Specifically, when the preset fusion function is the addition function, the feature dimensions of the sparse model vector parameters and the dense model vector parameters are the same. When the preset fusion function is the concatenation function, the feature dimensions of the sparse model vector parameters and the dense model vector parameters can be the same or different.

[0082] S260, performing an aggregation operation on each multi-order neighbor feature representation by the multi-layer graph convolution module to obtain a vertex feature representation corresponding to each target meta-path.

[0083] S270, inputting each vertex feature representation into the vector representation output network to obtain a vector representation corresponding to each vertex in the heterogeneous graph.

[0084] On the basis of the above embodiment, optionally, when the heterogeneous graph includes an e-commerce heterogeneous graph, the vector representation output network outputs a vector representation corresponding to a user type vertex and a vector representation corresponding to an item type vertex in the e-commerce heterogeneous graph.

[0085] On the basis of the above embodiment, optionally, the method further includes: obtaining a first vector representation corresponding to a target user vertex and a second vector representation corresponding to a target item vertex in the e-commerce heterogeneous graph, and determining a vector distance between the target user vertex and the target item vertex based on the first vector representation and the second vector representation; if the vector distance is less than or equal to a preset distance threshold, recommending a target item corresponding to the target item vertex to a target user corresponding to the target user vertex.

[0086] For example, the method of calculating the vector distance includes, but is not limited to, at least one of the Euclidean distance, the Manhattan distance, the Chebyshev distance, and the Mahalanobis distance.

[0087] On the basis of the above embodiment, further including: if the vector distance is greater than the preset distance threshold, indicating that the correlation degree between the target user and the target item is low, regarding the target item vertex corresponding to the target item as a non-associated item of the target user vertex corresponding to the target user.

[0088] On the basis of the above embodiment, optionally, the method further includes: regarding at least two target item vertices with a vector distance less than or equal to a preset distance threshold as recommendation vertices, sorting each recommendation vertex based on a vector distance corresponding to each recommendation vertex, and displaying target items corresponding to the recommendation vertices to the target user based on the sorting result.

[0089] In this embodiment, optionally, the training method of the target graph neural network model includes: inputting a training heterogeneous graph and at least one meta-path corresponding to the training heterogeneous graph into an initial graph neural network model to obtain a predicted vector representation corresponding to each vertex in the output training heterogeneous graph; determining at least one predicted vector distance based on the predicted vector representations of at least two preset vertices, and adjusting model parameters in the initial graph neural network model based on each predicted vector distance and a standard vector distance corresponding to each predicted vector distance, until a preset iteration condition is met, to obtain a trained target graph neural network model. The two preset vertices used to calculate the predicted vector distance can belong to associated vertices or non-associated vertices.

[0090] In this embodiment, optionally, the training method for the target graph neural network model includes: inputting the training heterogeneous graph input and at least one meta-path corresponding to the training heterogeneous graph into the initial graph neural network model to obtain the predicted vector representations corresponding to each vertex in the output training heterogeneous graph; inputting each predicted vector representation into the target classifier to obtain the predicted vertex labels corresponding to each vertex; and adjusting the model parameters in the initial graph neural network model based on the predicted vertex labels and standard vertex labels until a preset iteration condition is met to obtain the trained target graph neural network model.

[0091] In the above embodiments, the model parameters adjusted during the training process of the initial graph neural network model include, but are not limited to, model vector parameters, the first model weight matrix, and the second model weight matrix.

[0092] The training method for the target graph neural network model is not limited here.

[0093] Figure 5 This is a schematic diagram of the structure of a target graph neural network model provided in Embodiment 2 of the present invention. Specifically, the input data into the target graph neural network model includes a heterogeneous graph, a metapath group M corresponding to the heterogeneous graph, and a vertex type mapping function φ. Wherein, the heterogeneous graph = (V, E, T, A), where V represents the vertex set, E represents the edge set, T represents the type set, and A represents the vertex feature set, wherein the type set includes the vertex type set T. v And the set of edge types T e Specifically, the vertex classification network is based on the vertex type mapping function φ and the vertex type set T. v Classify the vertex set V to obtain at least one target vertex set V. t .

[0094] For each target vertex set V t Determine the target vertex set V t The corresponding target meta-path group contains M' target meta-paths, where m represents the m-th target meta-path. For each target meta-path, taking the m-th target meta-path as an example, the heterogeneous graph is sampled using the neighbor sampling module to obtain the multi-order neighbor vertex set N corresponding to the m-th target meta-path. t,m The feature encoding module is used to process the multi-order neighbor vertex set N. t,m Perform the encoding operation to obtain the multi-order neighbor feature representation F corresponding to the m-th target meta-path. t,m The multi-level graph convolution module is used to process the multi-level neighbor feature representation F. t,m Perform the aggregation operation to obtain the vertex feature representation F' corresponding to the m-th target metapath. t,mThe vertex feature representation F corresponding to each target vertex set V is obtained by fusing the vertex feature representation F corresponding to each target vertex set V through a feature fusion network. t,m t The vertex feature representation F corresponding to each target vertex set V is obtained by fusing the vertex feature representation F corresponding to each target vertex set V through a feature fusion network. t The vertex feature representation F corresponding to each target vertex set V is obtained by fusing the vertex feature representation F corresponding to each target vertex set V through a feature fusion network. t t The vector representation H corresponding to the heterogeneous graph is output by the vector output network, and the vector representation H includes the vertex feature representation F corresponding to each target vertex set V.

[0095] Due to the complex structure of the heterogeneous graph, the vertex feature corresponding to each vertex may include multiple types of feature information. The technical solution of the embodiment divides the feature information into sparse feature information and dense feature information, and encodes the feature information by using model vector parameters and encoding modes corresponding to each type of feature information, thereby solving the encoding problem of multiple types of feature information, improving the accuracy of the feature representation obtained by encoding, and further improving the accuracy of the vector representation of each vertex in the heterogeneous graph output by the target graph neural network model.

[0096] Embodiment three

[0097] Figure 6 is a schematic diagram of a heterogeneous graph processing device provided by an embodiment of the application. The embodiment can be applied to the case of feature extraction of a heterogeneous graph. The device can be realized in the form of software and / or hardware, and can be configured in a terminal device. The heterogeneous graph processing device includes a heterogeneous graph input module 310, a vertex classification module 320, a vertex feature extraction module 330, and a vector representation output module 340.

[0098] The heterogeneous graph input module 310 is configured to input the heterogeneous graph to be processed and at least one meta-path corresponding to the heterogeneous graph into a target graph neural network model. The heterogeneous graph includes a vertex set and a vertex type set, and the target graph neural network model includes a vertex classification network, a vertex feature extraction network, and a vector representation output network.

[0099] The vertex classification module 320 is configured to classify the vertex set based on the vertex type set through the vertex classification network to obtain at least one target vertex set, and determine at least one target meta-path corresponding to each target vertex set.

[0100] The vertex feature extraction module 330 is configured to input the target vertex set and the target meta-path into the vertex feature extraction network for each target vertex set to obtain a vertex feature representation corresponding to each target meta-path.

[0101] ​​The vector representation output module 340 is configured to input each vertex feature representation into a vector representation output network to obtain a vector representation corresponding to each vertex in the heterogeneous graph.

[0102] The technical scheme of the embodiment solves the problem of too few features sampled by the existing graph neural network, solves the fusion problem of multiple vertex feature representations, thereby improving the diversity of feature information represented by the fused feature representation, and further improves the accuracy of the vector representation corresponding to each vertex in the heterogeneous graph output by the target graph neural network model.

[0103] On the basis of the above technical scheme, the vector representation output network comprises a feature fusion network and a vector output network.

[0104] For each target vertex set, the at least one vertex feature representation corresponding to the target vertex set is input into the feature fusion network to obtain a fused feature representation corresponding to the target vertex set output by the feature fusion network based on an attention mechanism.

[0105] The fused feature representation corresponding to each target vertex set is input into the vector output network to obtain a vector representation corresponding to each vertex in the heterogeneous graph.

[0106] On the basis of the above technical scheme, the vertex feature extraction network comprises a neighbor sampling module, a feature encoding module, and a multi-layer graph convolution module.

[0107] The neighbor sampling module is configured to determine, based on the target vertex set and the at least one target meta-path, a multi-order neighbor vertex set corresponding to each target meta-path.

[0108] The feature encoding module is configured to perform an encoding operation on each multi-order neighbor vertex set to obtain a multi-order neighbor feature representation corresponding to each target meta-path.

[0109] The multi-layer graph convolution module is configured to perform an aggregation operation on each multi-order neighbor feature representation to obtain a vertex feature representation corresponding to each target meta-path.

[0110] On the basis of the above technical scheme, the heterogeneous graph further comprises an edge type set, and correspondingly, the neighbor sampling module is configured to:

[0111] For each target meta-path, the neighbor sampling module is configured to determine, based on the target meta-path and the edge type set, a multi-order neighbor vertex set corresponding to the target meta-path; wherein the target meta-path is used to represent a list of edge types on a path from an initial vertex to a maximum-order vertex in multi-order sampling, and the edge type set comprises types of edges between vertices in the heterogeneous graph.

[0112] On the basis of the above technical solutions, optionally, the heterogeneous graph further includes a vertex feature set, and a corresponding feature encoding module, which is configured to:

[0113] For each multi-order neighbor vertex set, based on the vertex feature set, a multi-order neighbor feature set corresponding to the multi-order neighbor vertex set is determined; wherein the vertex feature set contains feature information corresponding to each vertex in the heterogeneous graph respectively;

[0114] Based on the multi-order neighbor feature set and the model vector parameters in the feature encoding module, a multi-order neighbor feature representation corresponding to the target meta-path is determined.

[0115] On the basis of the above technical solutions, optionally, the vertex feature set includes a vertex sparse feature set and / or a vertex dense feature set, and the multi-order neighbor feature set includes a multi-order neighbor sparse feature set and / or a multi-order neighbor dense feature set, and the model vector parameters include sparse model vector parameters and / or dense model vector parameters; the vertex sparse feature set contains integer-represented feature information corresponding to each vertex in the heterogeneous graph, and the vertex dense feature set contains floating-point number-represented feature information corresponding to each vertex in the heterogeneous graph.

[0116] On the basis of the above technical solutions, optionally, the feature encoding module includes a sparse feature encoding unit, a dense feature encoding unit and an encoded feature fusion unit.

[0117] Through the sparse feature encoding unit, the neighbor sparse features in the multi-order neighbor sparse feature set are encoded based on the sparse model vector parameters in the feature encoding module to obtain a sparse feature representation.

[0118] Through the dense feature encoding unit, the neighbor dense features in the multi-order neighbor dense feature set are encoded based on the dense model vector parameters in the feature encoding module to obtain a dense feature representation.

[0119] Through the encoded feature fusion unit, a fusion operation is performed on the sparse feature representation and the dense feature representation based on a preset fusion function to obtain a multi-order neighbor feature representation corresponding to the target meta-path.

[0120] On the basis of the above technical solutions, optionally, the sparse feature encoding unit is configured to:

[0121] At least one sparse vector parameter corresponding to at least one neighbor sparse feature in the multi-order neighbor sparse feature set is searched in the sparse model vector parameters, and the searched at least one sparse vector parameter is taken as the sparse feature representation; wherein the sparse model vector parameters contain sparse vector parameters corresponding to at least one vertex sparse feature in the vertex sparse feature set respectively.

[0122] On the basis of the above technical solutions, optionally, the sparse feature encoding unit is configured to:

[0123] search for sparse vector parameters corresponding to at least one neighbor sparse feature in the multi-order neighbor sparse feature set respectively, and take the at least one sparse vector parameter as the sparse feature representation; wherein the sparse model vector parameters include sparse vector parameters corresponding to at least one vertex sparse feature in the vertex sparse feature set respectively.

[0124] On the basis of the above technical solutions, optionally, the multi-layer graph convolution module is configured to:

[0125] for each multi-order neighbor feature representation, perform an aggregation operation on the multi-order neighbor feature representation based on a preset aggregation function to obtain an aggregated feature representation corresponding to the target meta-path;

[0126] perform a conversion operation on the aggregated feature representation based on a fully connected layer to output a vertex feature representation corresponding to the target meta-path.

[0127] On the basis of the above technical solutions, optionally, the feature fusion network is configured to:

[0128] determine an attention weight based on each vertex feature representation, a first model weight matrix and a second model weight matrix in the feature fusion network;

[0129] perform a dot product operation on the attention weight and the at least one vertex feature representation to obtain a fusion feature representation corresponding to the target vertex set.

[0130] On the basis of the above technical solutions, optionally, the heterogeneous graph includes an e-commerce heterogeneous graph, and correspondingly, the vertex type set includes a user type and an item type, and the vector representation output network outputs a vector representation corresponding to a vertex of the user type and a vector representation corresponding to a vertex of the item type in the e-commerce heterogeneous graph.

[0131] On the basis of the above technical solutions, optionally, the device further includes an item recommendation device configured to:

[0132] obtain a first vector representation corresponding to a target user vertex and a second vector representation corresponding to a target item vertex in the e-commerce heterogeneous graph, and determine a vector distance between the target user vertex and the target item vertex based on the first vector representation and the second vector representation;

[0133] if the vector distance is less than or equal to a preset distance threshold, recommend a target item corresponding to the target item vertex to a target user corresponding to the target user vertex.

[0134] The heterogeneous graph processing apparatus provided by the embodiments of the present application can be used to execute the heterogeneous graph processing method provided by the embodiments of the present application, and has the functions and advantages corresponding to the execution method.

[0135] It is worth noting that, in the embodiments of the heterogeneous graph processing apparatus, each unit and module is only divided according to the function logic, but is not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for the convenience of mutual differentiation, and are not used to limit the protection scope of the present application.

[0136] Embodiment four

[0137] Figure 7 is a structural schematic diagram of an electronic device provided by Embodiment Four of the present application. Embodiment Four of the present application provides services for the implementation of the heterogeneous graph processing method of the above-mentioned embodiments of the present application, and can configure the heterogeneous graph processing apparatus in the above-mentioned embodiments. Figure 7 A block diagram of an exemplary electronic device 12 suitable for implementing embodiments of the present application is shown. Figure 7 The electronic device 12 shown is merely an example and should not limit the function and scope of use of the embodiments of the present application.

[0138] As shown in Figure 7 The electronic device 12 is shown in the form of a general-purpose computing device. The components of the electronic device 12 can include, but are not limited to, one or more processors or processing units 16, system memory 28, and a bus 18 that connects the various system components, including the system memory 28 and the processing unit 16.

[0139] The bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, an industry standard architecture (ISA) bus, a microchannel architecture (MAC) bus, an enhanced ISA bus, a video electronics standards association (VESA) local bus, and a peripheral component interconnect (PCI) bus.

[0140] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.

[0141] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (… Figure 7 Not shown; usually referred to as a "hard drive"). Although Figure 7 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0142] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0143] Electronic device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the electronic device 12, and / or with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 22. Furthermore, electronic device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. Figure 7 As shown, network adapter 20 communicates with other modules of electronic device 12 via bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0144] The processing unit 16 performs various functional applications and data processing by running programs stored in the system memory 28, such as implementing the processing method of the heterogeneous graph provided by the embodiment of the application.

[0145] By the above electronic device, the problem of too few features of the existing graph neural network sampling is solved, thereby improving the diversity of feature information of the fusion feature representation representation, and further improving the accuracy of the vector representation corresponding to each vertex in the heterogeneous graph output by the target graph neural network model.

[0146] Embodiment five

[0147] The embodiment five of the application also provides a storage medium containing computer executable instructions, which are used to execute a processing method of a heterogeneous graph when executed by a computer processor, and the method comprises the following steps:

[0148] inputting the heterogeneous graph to be processed and at least one meta-path corresponding to the heterogeneous graph into a target graph neural network model; wherein the heterogeneous graph comprises a vertex set and a vertex type set, and the target graph neural network model comprises a vertex classification network, a vertex feature extraction network and a vector representation output network;

[0149] classifying the vertex set based on the vertex type set through the vertex classification network to obtain at least one target vertex set, and determining at least one target meta-path corresponding to each target vertex set;

[0150] for each target vertex set, inputting the target vertex set and each target meta-path into the vertex feature extraction network to obtain a vertex feature representation corresponding to each target meta-path;

[0151] inputting each vertex feature representation into the vector representation output network to obtain a vector representation corresponding to each vertex in the heterogeneous graph.

[0152] The computer storage medium of the embodiments of the present application can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples (non-exhaustive list) of the computer-readable storage medium include an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0153] The computer-readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave in a propagated data signal, in which the computer-readable program code is contained. Such propagated data signal can take a variety of forms, including but not limited to electro-magnetic, optical or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium that is not a storage medium and that can be used to carry or propagate program code for use by or in connection with an instruction execution system, apparatus, or device.

[0154] The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wire line, optical fiber cable, RF, etc., or any suitable combination of the above.

[0155] The computer program code for carrying out operations of the present application can be written in one or more programming languages or combinations of languages including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages such as "C" or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments of the present application, electronic mail (email) can be utilized as the

[0156] Of course, the storage medium provided by the embodiments of the present application contains computer executable instructions, which are not limited to the method operations described above, but can also perform related operations in the processing method of the heterogeneous graph provided by any embodiment of the present application.

[0157] It should be noted that the above only describes the preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and those skilled in the art can make various obvious changes, readjustments and substitutions without departing from the scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A processing method of an e-commerce heterogeneous graph, characterized in that, The method comprises the following steps: inputting an e-commerce heterogeneous graph to be processed and at least one meta-path corresponding to the e-commerce heterogeneous graph into a target graph neural network model; wherein the e-commerce heterogeneous graph comprises a vertex set and a vertex type set, the target graph neural network model comprises a vertex classification network, a vertex feature extraction network and a vector representation output network; the vertex type set comprises a user type and an item type; classifying the vertex set based on the vertex type set through the vertex classification network to obtain at least one target vertex set, and determining at least one target meta-path corresponding to each target vertex set; for each target vertex set, inputting the target vertex set and each target meta-path into the vertex feature extraction network to obtain a vertex feature representation corresponding to each target meta-path; inputting each vertex feature representation into the vector representation output network to obtain a vector representation corresponding to each vertex in the e-commerce heterogeneous graph; wherein the vector representation output network outputs a vector representation corresponding to a vertex of the user type and a vector representation corresponding to a vertex of the item type in the e-commerce heterogeneous graph; obtaining a first vector representation corresponding to a target user vertex and a second vector representation corresponding to a target item vertex in the e-commerce heterogeneous graph, and determining a vector distance between the target user vertex and the target item vertex based on the first vector representation and the second vector representation; wherein the vector distance represents the correlation degree between a target user corresponding to the target user vertex and a target item corresponding to the target item vertex; if the vector distance is less than or equal to a preset distance threshold, recommending a target item corresponding to the target item vertex to a target user corresponding to the target user vertex.

2. The method of claim 1, wherein, The vector representation output network comprises a feature fusion network and a vector output network; for each target vertex set, inputting at least one vertex feature representation corresponding to the target vertex set into the feature fusion network to obtain a fusion feature representation corresponding to the target vertex set output by the feature fusion network based on an attention mechanism; inputting the fusion feature representation corresponding to each target vertex set into the vector output network to obtain a vector representation corresponding to each vertex in the e-commerce heterogeneous graph.

3. The method of claim 1, wherein, The vertex feature extraction network comprises a neighbor sampling module, a feature encoding module and a multi-layer graph convolution module; determining a multi-order neighbor vertex set corresponding to each target meta-path based on the target vertex set and the at least one target meta-path through the neighbor sampling module; performing an encoding operation on each multi-order neighbor vertex set through the feature encoding module to obtain a multi-order neighbor feature representation corresponding to each target meta-path; performing an aggregation operation on each multi-order neighbor feature representation through the multi-layer graph convolution module to obtain a vertex feature representation corresponding to each target meta-path.

4. The method of claim 3, wherein, The e-commerce heterogeneous graph further comprises an edge type set, and correspondingly, the neighbor sampling module is configured to: For each target meta-path, based on the target meta-path and the edge type set, a multi-order neighbor vertex set corresponding to the target meta-path is determined; wherein the target meta-path is used to represent a list of edge types on a path from an initial vertex to a maximum order vertex in multi-order sampling, and the edge type set contains types of edges between connected vertices in the e-commerce heterogeneous graph.

5. The method of claim 3, wherein, The e-commerce heterogeneous graph further includes a vertex feature set, and correspondingly, the feature encoding module is used to: For each multi-order neighbor vertex set, based on the vertex feature set, a multi-order neighbor feature set corresponding to the multi-order neighbor vertex set is determined; wherein the vertex feature set contains feature information corresponding to each vertex in the e-commerce heterogeneous graph. Based on the multi-order neighbor feature set and the model vector parameter in the feature encoding module, a multi-order neighbor feature representation corresponding to the target meta-path is determined.

6. The method of claim 5, wherein, The vertex feature set includes a vertex sparse feature set and / or a vertex dense feature set, and correspondingly, the multi-order neighbor feature set includes a multi-order neighbor sparse feature set and / or a multi-order neighbor dense feature set, and the model vector parameter includes a sparse model vector parameter and / or a dense model vector parameter; the vertex sparse feature set contains integer-represented feature information corresponding to each vertex in the e-commerce heterogeneous graph, and the vertex dense feature set contains floating-point number-represented feature information corresponding to each vertex in the e-commerce heterogeneous graph.

7. The method of claim 6, wherein, The feature encoding module includes a sparse feature encoding unit, a dense feature encoding unit, and an encoded feature fusion unit. Through the sparse feature encoding unit, the neighbor sparse features in the multi-order neighbor sparse feature set are encoded based on the sparse model vector parameter in the feature encoding module to obtain a sparse feature representation; Through the dense feature encoding unit, the neighbor dense features in the multi-order neighbor dense feature set are encoded based on the dense model vector parameter in the feature encoding module to obtain a dense feature representation; Through the encoded feature fusion unit, a fusion operation is performed on the sparse feature representation and the dense feature representation based on a preset fusion function to obtain a multi-order neighbor feature representation corresponding to the target meta-path.

8. The method of claim 7, wherein, The sparse feature encoding unit is used to: find at least one sparse vector parameter corresponding to at least one neighbor sparse feature in the multi-order neighbor sparse feature set in the sparse model vector parameter, and take the found at least one sparse vector parameter as a sparse feature representation; wherein the sparse model vector parameter contains sparse vector parameters corresponding to at least one vertex sparse feature in the vertex sparse feature set.

9. The method of claim 7, wherein, The dense feature encoding unit is used to: multiply each neighbor dense feature in the multi-order neighbor dense feature set with the dense model vector parameter to obtain a dense feature representation.

10. The method of claim 3, wherein, The multi-layer graph convolution module is used to: for each multi-order neighbor feature representation, a preset aggregation function is used to perform an aggregation operation on the multi-order neighbor feature representation to obtain an aggregated feature representation corresponding to the target meta-path; perform a transformation operation on the aggregated feature representation based on a fully connected layer, and output a vertex feature representation corresponding to the target meta-path.

11. The method of claim 2, wherein, The feature fusion network is used to: determine an attention weight based on each vertex feature representation, a first model weight matrix and a second model weight matrix in the feature fusion network; perform a dot product operation on the attention weight and at least one vertex feature representation to obtain a fused feature representation corresponding to the target vertex set.

12. A processing device for heterogeneous graphs in e-commerce, characterized in that, comprise: a heterogeneous graph input module configured to input a to-be-processed e-commerce heterogeneous graph and at least one meta-path corresponding to the e-commerce heterogeneous graph into a target graph neural network model; wherein the e-commerce heterogeneous graph comprises a vertex set and a vertex type set, and the target graph neural network model comprises a vertex classification network, a vertex feature extraction network and a vector representation output network; the vertex type set comprises a user type and an item type; a vertex classification module configured to classify the vertex set based on the vertex type set through the vertex classification network to obtain at least one target vertex set, and determine at least one target meta-path corresponding to each target vertex set respectively; a vertex feature extraction module configured to input, for each target vertex set, the target vertex set and each target meta-path into the vertex feature extraction network to obtain a vertex feature representation corresponding to each target meta-path respectively; a vector representation output module configured to input each vertex feature representation into the vector representation output network to obtain a vector representation corresponding to each vertex in the e-commerce heterogeneous graph respectively; wherein the vector representation output network outputs a vector representation corresponding to a vertex of the user type and a vector representation corresponding to a vertex of the item type in the e-commerce heterogeneous graph; The device further comprises an item recommendation device configured to: obtain a first vector representation corresponding to a target user vertex and a second vector representation corresponding to a target item vertex in the e-commerce heterogeneous graph, and determine a vector distance between the target user vertex and the target item vertex based on the first vector representation and the second vector representation; wherein the vector distance represents an association degree between a target user corresponding to the target user vertex and a target item corresponding to the target item vertex; if the vector distance is less than or equal to a preset distance threshold, recommend a target item corresponding to the target item vertex to a target user corresponding to the target user vertex.

13. An electronic device, comprising: The electronic device comprises: one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the processing method of the e-commerce heterogeneous graph according to any one of claims 1-11.

14. A storage medium containing computer-executable instructions, wherein: The computer executable instructions, when executed by a computer processor, are used to perform the processing method of the e-commerce heterogeneous graph according to any one of claims 1-11.

Citation Information

Patent Citations

  • Social network abnormal user detection method and device based on heterogeneous graph neural network

    CN112861967A

  • Heterogeneous graph information extraction method and device based on meta-path subgraph

    CN113569906A