Embedding method and device of data network graph, computer device and storage medium

CN117523361BActive Publication Date: 2026-08-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210909021.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2026-08-21
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

然而,获得的数据集通常可能是不平衡数据集,因此对应的数据网络图中不同类别节点间的特征存在差异,采用传统方案中所得的数据网络图的嵌入向量在进行节点分类时,导致分类效果较差

Benefits of technology

[0057]上述数据网络图的嵌入方法、装置、计算机设备、存储介质和计算机程序产品,通过第一网络嵌入模型对数据网络图和负样本网络图进行节点特征提取,得到正样本嵌入向量和负样本嵌入向量;此外还通过第一网络嵌入模型对数据网络图的两个不同增强图进行节点特征提取,得到第一全局嵌入向量和第二全局嵌入向量;确定正样本嵌入向量与第一全局嵌入向量、第二全局嵌入向量之间的第一匹配度,以及确定负样本嵌入向量与第一全局嵌入向量、第二全局嵌入向量之间的第二匹配度,由于上述的增强图是由数据网络图增强所得的,因此正样本嵌入向量与第一全局嵌入向量、第二全局嵌入向量之间具有较高的匹配度,而负样本嵌入向量与第一全局嵌入向量、第二全局嵌入向量之间匹配度较低,因此依据第一匹配度和第二匹配度调整第一网络嵌入模型的参数,可以使调整后的第一网络嵌入模型学习到鲁棒的且能准确分类出数据网络图中各节点的嵌入向量。此外,在训练过程中,并没有使用节点的标签,因此模型学习过程中并不会受数据网络图中多数类的影响,从而即便数据网络图为不平衡网络图,模型也可以学习到平衡的特征空间,使嵌入向量包含重要的特征且更加鲁棒,进而能够在分类过程中有效提高分类效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117523361B_ABST
    Figure CN117523361B_ABST
Patent Text Reader

Abstract

The application relates to a data network graph embedding method and device, computer equipment, a storage medium and a computer program product. The method can be applied to the fields of artificial intelligence and intelligent traffic networks, and comprises the following steps: performing node feature extraction on a data network graph and a negative sample network graph by using a first network embedding model to obtain a positive sample embedding vector and a negative sample embedding vector; performing node feature extraction on a first enhanced graph and a second enhanced graph of the data network graph by using the first network embedding model to obtain a first global embedding vector and a second global embedding vector; determining a first matching degree and a second matching degree; adjusting parameters of the first network embedding model according to a loss value determined by the first matching degree and the second matching degree; and performing node feature extraction on the data network graph based on the adjusted first network embedding model to obtain an embedding vector used for classifying each node in the data network graph. The method can extract a robust embedding vector to improve the classification effect of the data network graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer device, storage medium, and computer program product for embedding a data network graph. Background Technology

[0002] In some application scenarios, after obtaining a dataset, it is necessary to classify the data within the dataset. Traditional data classification schemes typically convert the obtained dataset into a data network graph, then use a network embedding model to embed the nodes in the data network graph, obtaining embedding vectors, and then using these embedding vectors for classification. However, the obtained datasets are often imbalanced, resulting in differences in features between nodes of different categories in the corresponding data network graph. Therefore, using the embedding vectors obtained from the data network graph in traditional schemes leads to poor classification results when classifying nodes. Summary of the Invention

[0003] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for embedding data network graphs, which can extract robust embedding vectors to improve the classification performance of data network graphs, in order to address the above-mentioned technical problems.

[0004] Firstly, this application provides a method for embedding a data network graph. The method includes:

[0005] The first network embedding model is used to extract node features from the data network graph and the negative sample network graph to obtain positive sample embedding vectors and negative sample embedding vectors; the data network graph is a positive sample network graph, which is an imbalanced network graph constructed based on an imbalanced object dataset;

[0006] The first network embedding model is used to extract node features from the first and second augmented graphs of the data network graph to obtain the first global embedding vector and the second global embedding vector.

[0007] Determine a first matching degree between the positive sample embedding vector and the first global embedding vector and the second global embedding vector, and determine a second matching degree between the negative sample embedding vector and the first global embedding vector and the second global embedding vector;

[0008] The loss value is determined based on the first matching degree and the second matching degree, and the parameters of the first network embedding model are adjusted based on the loss value;

[0009] Based on the adjusted first network embedding model, node features are extracted from the data network graph to obtain embedding vectors for classifying each node in the data network graph.

[0010] Secondly, this application also provides a data network graph embedding device. The device includes:

[0011] The first extraction module is used to extract node features from the data network graph and the negative sample network graph through the first network embedding model to obtain positive sample embedding vectors and negative sample embedding vectors; the data network graph is a positive sample network graph, which is an imbalanced network graph constructed based on an imbalanced object dataset;

[0012] The second extraction module is used to extract node features from the first enhanced graph and the second enhanced graph of the data network graph through the first network embedding model to obtain the first global embedding vector and the second global embedding vector.

[0013] The determining module is used to determine a first matching degree between the positive sample embedding vector and the first global embedding vector and the second global embedding vector, and to determine a second matching degree between the negative sample embedding vector and the first global embedding vector and the second global embedding vector;

[0014] An adjustment module is used to determine a loss value based on the first matching degree and the second matching degree, and to adjust the parameters of the first network embedding model based on the loss value;

[0015] The third extraction module is used to extract node features from the data network graph based on the adjusted first network embedding model, and obtain embedding vectors for classifying each node in the data network graph.

[0016] In one embodiment, the device further includes:

[0017] An enhancement module is used to perform a first data enhancement process on the data network graph to obtain a first enhanced graph; and to perform a second data enhancement process on the data network graph to obtain a second enhanced graph; wherein the first data enhancement process and the second data enhancement process are feature masking, edge perturbation, or subgraph extraction, respectively.

[0018] In one embodiment, the enhancement module is further configured to select sampling nodes in the data network graph, and to perform progressive sampling with the first sampling node as the center point, and to place the neighboring nodes of each sample in the first sampling set during the progressive sampling process; when the number of nodes in the first sampling set reaches the target value, sampling is stopped to obtain the first enhanced graph; and feature masking is performed on the data network graph to obtain the second enhanced graph.

[0019] In one embodiment, the device further includes:

[0020] The shuffling module is used to shuffle the features corresponding to the nodes in the data network graph to obtain a negative sample network graph; wherein the node structure of the negative sample network graph is consistent with the node structure of the data network graph.

[0021] In one embodiment, the device further includes:

[0022] A construction module is used to obtain the object dataset and the association relationships between the object data within the object dataset; and to construct a data network graph with each object data in the object dataset as a node and the association relationships as edges of each node.

[0023] In one embodiment, the first augmented graph and the second augmented graph are augmented graphs obtained by performing data augmentation on the data network graph;

[0024] The second extraction module is further configured to extract the first local embedding vector and the second local embedding vector of each node from the first augmented graph and the second augmented graph respectively through the first network embedding model; and to perform pooling processing on the first local embedding vector and the second local embedding vector respectively to obtain the first global embedding vector and the second global embedding vector.

[0025] In one embodiment, the second extraction module is further configured to: obtain a first adjacency matrix and a first feature matrix for each node in the first augmented graph; input the first adjacency matrix and the first feature matrix into the first network embedding model, so that the first network embedding model generates a first local embedding vector for each node in the first augmented graph based on the first adjacency matrix, the degree matrix of the first adjacency matrix, the first feature matrix, and the weight matrix of the first network embedding model; obtain a second adjacency matrix and a second feature matrix for each node in the second augmented graph; input the second adjacency matrix and the second feature matrix into the first network embedding model, so that the first network embedding model generates a second local embedding vector for each node in the second augmented graph based on the second adjacency matrix, the degree matrix of the second adjacency matrix, the first feature matrix, and the weight matrix of the first network embedding model.

[0026] In one embodiment, the device further includes:

[0027] The fourth extraction module is used to extract node features from the data network graph through the second network embedding model, and reconstruct the target adjacency matrix based on the extracted node features.

[0028] The adjustment module is also used to adjust the parameters of the second network embedding model based on the loss value between the target adjacency matrix and the matrix label;

[0029] The fourth extraction module is further configured to obtain the structural information of each node in the data network graph through the adjusted second network embedding model when the adjusted second network embedding model reaches the convergence condition; and to use the concatenated vector between the embedding vector and the structural information as the target embedding vector for classifying each node in the data network graph.

[0030] In one embodiment, the device further includes:

[0031] The classification module is used to classify the target embedding vector using a classifier to obtain a prediction result;

[0032] The adjustment module is further configured to adjust the parameters of the classifier based on the loss value between the prediction result and the classification label; when the adjusted classifier reaches the convergence condition, the training process is stopped.

[0033] In one embodiment, the device further includes:

[0034] The first application module is used to obtain a literature citation relationship graph; extract a first embedding vector from the literature citation relationship graph through a first network embedding model; extract a first structural data from the literature citation relationship graph through a second network embedding model; and classify the target embedding vector obtained by splicing the first embedding vector and the first structural data through the classifier to obtain the topic or field of each literature.

[0035] In one embodiment, the device further includes:

[0036] The second application module is used to acquire a media interaction graph; extract a second embedding feature of the media interaction graph through the first network embedding model; extract a second structural data of the media interaction graph through the second network embedding model; classify the target embedding vector obtained by concatenating the second embedding feature and the second structural data through the classifier to obtain the interest type corresponding to the object node; and recommend target media to the media account corresponding to the object node according to the interest type.

[0037] In one embodiment, the device further includes:

[0038] The third application module is used to obtain a social relationship graph; extract the third embedding feature of the social relationship graph through the first network embedding model; extract the third structural data of the social relationship graph through the second network embedding model; classify the target embedding vector obtained by concatenating the third embedding feature and the third structural data through the classifier to obtain the communication groups of interest to the social object; and push the communication groups of interest to the social object.

[0039] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:

[0040] The first network embedding model is used to extract node features from the data network graph and the negative sample network graph to obtain positive sample embedding vectors and negative sample embedding vectors; the data network graph is a positive sample network graph, which is an imbalanced network graph constructed based on an imbalanced object dataset;

[0041] The first network embedding model is used to extract node features from the first and second augmented graphs of the data network graph to obtain the first global embedding vector and the second global embedding vector.

[0042] Determine a first matching degree between the positive sample embedding vector and the first global embedding vector and the second global embedding vector, and determine a second matching degree between the negative sample embedding vector and the first global embedding vector and the second global embedding vector;

[0043] The loss value is determined based on the first matching degree and the second matching degree, and the parameters of the first network embedding model are adjusted based on the loss value;

[0044] Based on the adjusted first network embedding model, node features are extracted from the data network graph to obtain embedding vectors for classifying each node in the data network graph.

[0045] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:

[0046] The first network embedding model is used to extract node features from the data network graph and the negative sample network graph to obtain positive sample embedding vectors and negative sample embedding vectors; the data network graph is a positive sample network graph, which is an imbalanced network graph constructed based on an imbalanced object dataset;

[0047] The first network embedding model is used to extract node features from the first and second augmented graphs of the data network graph to obtain the first global embedding vector and the second global embedding vector.

[0048] Determine a first matching degree between the positive sample embedding vector and the first global embedding vector and the second global embedding vector, and determine a second matching degree between the negative sample embedding vector and the first global embedding vector and the second global embedding vector;

[0049] The loss value is determined based on the first matching degree and the second matching degree, and the parameters of the first network embedding model are adjusted based on the loss value;

[0050] Based on the adjusted first network embedding model, node features are extracted from the data network graph to obtain embedding vectors for classifying each node in the data network graph.

[0051] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:

[0052] The first network embedding model is used to extract node features from the data network graph and the negative sample network graph to obtain positive sample embedding vectors and negative sample embedding vectors; the data network graph is a positive sample network graph, which is an imbalanced network graph constructed based on an imbalanced object dataset;

[0053] The first network embedding model is used to extract node features from the first and second augmented graphs of the data network graph to obtain the first global embedding vector and the second global embedding vector.

[0054] Determine a first matching degree between the positive sample embedding vector and the first global embedding vector and the second global embedding vector, and determine a second matching degree between the negative sample embedding vector and the first global embedding vector and the second global embedding vector;

[0055] The loss value is determined based on the first matching degree and the second matching degree, and the parameters of the first network embedding model are adjusted based on the loss value;

[0056] Based on the adjusted first network embedding model, node features are extracted from the data network graph to obtain embedding vectors for classifying each node in the data network graph.

[0057] The aforementioned data network graph embedding method, apparatus, computer equipment, storage medium, and computer program product extract node features from the data network graph and negative sample network graph using a first network embedding model to obtain positive sample embedding vectors and negative sample embedding vectors. Furthermore, the first network embedding model also extracts node features from two different augmented graphs of the data network graph to obtain a first global embedding vector and a second global embedding vector. A first matching degree is determined between the positive sample embedding vector and the first and second global embedding vectors, and a second matching degree is determined between the negative sample embedding vector and the first and second global embedding vectors. Since the augmented graphs are obtained by augmenting the data network graph, the positive sample embedding vector has a high matching degree with the first and second global embedding vectors, while the negative sample embedding vector has a low matching degree. Therefore, adjusting the parameters of the first network embedding model based on the first and second matching degrees allows the adjusted first network embedding model to learn robustly and accurately classify the embedding vectors of each node in the data network graph. Furthermore, no node labels are used during training, so the model is not affected by the majority class in the data network graph during learning. Thus, even if the data network graph is imbalanced, the model can learn a balanced feature space, making the embedding vectors contain important features and more robust, thereby effectively improving classification performance. Attached Figure Description

[0058] Figure 1 This is an application environment diagram of a data network graph embedding method in one embodiment;

[0059] Figure 2 This is a flowchart illustrating a method for embedding a data network graph in one embodiment;

[0060] Figure 3 This is a schematic diagram illustrating the transformation of a network data graph into a negative sample network graph in one embodiment;

[0061] Figure 4 This is a schematic diagram illustrating data augmentation of a network data graph and low-dimensional mapping of the resulting augmented graph in one embodiment.

[0062] Figure 5 This is a schematic diagram illustrating the process of training a second network embedding model and extracting structural information in one embodiment, as well as obtaining a target embedding vector based on the structural information and the embedding vector.

[0063] Figure 6 This is a schematic diagram illustrating the training of graph convolutional network model 1, graph convolutional network model 2, and classifier in one embodiment;

[0064] Figure 7This is a structural block diagram of a data network graph embedding device in one embodiment;

[0065] Figure 8 This is a structural block diagram of the data network graph embedding device in another embodiment;

[0066] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0068] The data network graph embedding method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.

[0069] Server 104 extracts node features from the data network graph and the negative sample network graph using a first network embedding model to obtain positive sample embedding vectors and negative sample embedding vectors; the data network graph is a positive sample network graph; the server extracts node features from the first augmented graph and the second augmented graph of the data network graph using the first network embedding model to obtain a first global embedding vector and a second global embedding vector; the server determines a first matching degree between the positive sample embedding vector and the first global embedding vector and the second global embedding vector, and determines a second matching degree between the negative sample embedding vector and the first global embedding vector and the second global embedding vector; the server determines a loss value based on the first matching degree and the second matching degree, and adjusts the parameters of the first network embedding model based on the loss value; the server extracts node features from the data network graph based on the adjusted first network embedding model to obtain embedding vectors used for classifying each node in the data network graph. Furthermore, an adjacency matrix can be constructed using a second network embedding model. The parameters of the second network embedding model are adjusted based on the loss value between the adjacency matrix and the true adjacency matrix, thereby minimizing the loss value and enabling the model to learn structural information consistent with or close to the true adjacency matrix. This structural information is then concatenated with the embedding vector to obtain a new target embedding vector for classifying nodes in the data network graph. This target embedding vector is used to train a classifier, and the trained first network embedding model, second network embedding model, and classifier are deployed. When a classification task needs to be performed, terminal 102 can initiate a classification request. Server 104 responds to the request, calling the first and second network embedding models for feature extraction and concatenation. The classifier then performs classification processing on the concatenated target embedding vector to obtain the classification result, such as... Figure 1 As shown.

[0070] Alternatively, after obtaining the embedding vectors used to classify each node in the data network graph, server 104 can directly use these embedding vectors to train a classifier and deploy the trained first network embedding model and classifier. When a classification task needs to be performed, terminal 102 can initiate a classification request, server 104 responds to the classification request, calls the first network embedding model to extract features, and uses the classifier to classify the extracted target embedding vectors to obtain the classification result.

[0071] The terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, IoT device, or portable wearable device. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices, etc.

[0072] Server 104 can be an independent physical server or a service node in a blockchain system. The service nodes in the blockchain system form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol that runs on top of the Transmission Control Protocol (TCP).

[0073] In addition, server 104 can also be a server cluster consisting of multiple physical servers, which can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0074] Terminal 102 and server 104 can be connected via Bluetooth, USB (Universal Serial Bus) or network, etc., and this application does not impose any restrictions.

[0075] In one embodiment, such as Figure 2 As shown, a method for embedding a data network graph is provided, which can be applied to... Figure 1 Taking server 104 as an example, the following steps are included:

[0076] S202, node features are extracted from the data network graph and the negative sample network graph using the first network embedding model to obtain positive sample embedding vectors and negative sample embedding vectors.

[0077] This data network graph is a positive sample network graph, an imbalanced network graph constructed based on an imbalanced object dataset. Specifically, it is an imbalanced network graph constructed with each object in the imbalanced object dataset as a node and the relationships between nodes as edges. This data network graph is a graphical dataset, and therefore can also be called a graph dataset. The object dataset is an imbalanced dataset (referred to as an imbalanced dataset), indicating that the quantity of different types of object data within the object dataset varies significantly. There can be multiple data network graphs.

[0078] A negative sample network graph can be a network graph that differs in features from the data network graph. The node structure of the negative sample network graph can be consistent with the node structure of the data network graph, such as... Figure 3 As shown.

[0079] The first network embedding model belongs to the self-supervised learning module and is used to map each node in the data network graph and the negative sample network graph to a low-dimensional space. Specifically, it can be a Graph Convolutional Network (GCN) model, a Graph Attention Network (GAN) model, or a Graph Isomorphism Network (GIN) model. This GCN model can be a network model including at least one layer of a graph convolutional network. The positive and negative sample embedding vectors extracted by this first network embedding model are the local embedding vectors of each node in the data network graph and the negative sample network graph, respectively, and belong to the feature vectors in the low-dimensional space. The corresponding feature matrices of each node in the data network graph and the negative sample network graph belong to the feature vectors in the high-dimensional space.

[0080] In one embodiment, prior to S202, the server obtains the object dataset and the relationships between the object data within the object dataset; the object dataset is an imbalanced dataset; a data network graph is constructed using the object data within the object dataset as nodes and the relationships as edges between the nodes.

[0081] The object data in this object dataset can be literature data, and the corresponding relationship can be a citation relationship. In addition, the object data in this object dataset can also be media data and object information, and the corresponding relationship can be an interaction relationship, such as when an object clicks on media data, thus there is an interaction relationship between the media data and the object. Furthermore, the object data in this object dataset can also be social object data, and the corresponding relationship can be a friend relationship between social objects.

[0082] In one embodiment, after constructing the data network graph, the server can further shuffle the features corresponding to the nodes in the data network graph to obtain a negative sample network graph. For example, the server can input the initial feature matrix and adjacency matrix (i.e., the structural information of the nodes) of each node in the data network graph into the erosion function, thereby generating a negative sample network graph. The expression of the erosion function is as follows:

[0083] (X′,A′)=C(X,A)

[0084] Where A′ = A, A represents the adjacency matrix of each node in the data network graph, A′ represents the adjacency matrix of each node in the negative sample network graph, and X′ = Shuffle(X), X represents the feature matrix of each node in the data network graph. X represents the feature matrix of each node in the negative sample network graph, and Shuffle() indicates that X is shuffled.

[0085] Therefore, a schematic diagram of processing data structure graphs using erosion functions can be found in [reference needed]. Figure 3 This erosion function preserves the node structure in the data network graph, while randomly disordering the features of each node in the data network graph.

[0086] In one embodiment, the server extracts the embedding vectors of each node in the data network graph using a first network embedding model to obtain the positive sample embedding vectors of each node in the data network graph; and the server extracts the embedding vectors of each node in the negative sample network graph using the first network embedding model to obtain the negative sample embedding vectors of each node in the negative sample network graph.

[0087] Specifically, the server obtains the adjacency matrix and feature matrix of each node in the data network graph; it inputs these matrices into a first network embedding model, enabling the first network embedding model to generate positive sample embedding vectors for each node in the data network graph based on the input adjacency matrix, the degree matrix of the adjacency matrix, the feature matrix, and the weight matrix of the first network embedding model; it then obtains the adjacency matrix and feature matrix of each node in the negative sample network graph; and inputs these matrices into the first network embedding model, enabling the first network embedding model to generate negative sample embedding vectors for each node in the negative sample network graph based on the input adjacency matrix, the degree matrix of the adjacency matrix, the feature matrix, and the weight matrix of the first network embedding model. The first network embedding model may include two network embedding branches, which extract node features for different network graphs respectively.

[0088] For example, in the extraction of node features from a data network graph, when the first network embedding model includes a network model with a single layer of graph convolutional network, the first network embedding model adds self-loops to the adjacency matrix of each node in the data network graph to obtain an adjacency matrix with self-loops. Then, based on the adjacency matrix with added self-loops, the degree matrix of the adjacency matrix, the feature matrix, and the weight matrix of the graph convolutional network, the positive sample embedding vector is determined.

[0089] When the first network embedding model includes a multi-layer graph convolutional network (GCB), the first-layer GCB adds self-loops to the adjacency matrix of each node in the data network graph, resulting in an adjacency matrix with self-loops. Then, based on the adjacency matrix with added self-loops, the degree matrix, the feature matrix, and the weight matrix of the first-layer GCB, the embedding vector output by the first-layer GCB is determined. Next, the embedding vector output by the first-layer GCB is used as the input data for the second-layer GCB, and the embedding vector output by the second-layer GCB is determined based on the adjacency matrix with added self-loops, the degree matrix, the input data of the second-layer GCB, and the weight matrix of the second-layer GCB. This process continues until the embedding vector output by the last-layer GCB is obtained, and this embedding vector is used as the positive sample embedding vector. To clearly illustrate the above calculation process, the calculation formulas for each layer of the graph convolutional network are given below:

[0090]

[0091] Among them, H (l) This represents the embedding vector output by the l-th layer graph convolutional network during the processing of the data network graph; A is the adjacency matrix of each node in the data network graph. To add the adjacency matrix of the self-loop I; for degree matrix; W (l) Let H be the weight matrix of the l-th layer graph convolutional network; σ() is the activation function. Specifically, when l = 0, H... (0) =X, where X represents the feature matrix of each node in the data network graph. If the first network embedding model has a total of N layers of graph convolutional networks, when l = N-1, This refers to the positive sample embedding vector of each node in the data network graph.

[0092] It should be noted that for the positive sample embedding vector of the i-th node in the data network graph in, Add a self-loop adjacency matrix to the i-th node. for The degree matrix; Output the embedding vector of the i-th node in the data network graph for the (N-1)-th layer graph convolutional network.

[0093] Similarly, the negative sample embedding vector can be calculated using the following formula:

[0094]

[0095] Among them, H′ (l)Let A' represent the embedding vector output by the l-th layer graph convolutional network during the processing of negative sample network graphs; A' is the adjacency matrix of each node in the negative sample network graph. To add the adjacency matrix of the self-loop I; for The degree matrix. Specifically, when l = 0, H′ (0) =X′, where X′ represents the feature matrix of each node in the negative sample network graph. If the first network embedding model has a total of N layers of graph convolutional networks, when l = N-1, This refers to the positive sample embedding vector of each node in the negative sample network graph.

[0096] It should be noted that for the negative sample embedding vector of the i-th node in the negative sample network graph... in, Let be the adjacency matrix of the i-th node in the negative sample network graph. for The degree matrix; Output the positive sample embedding vector for the i-th node in the negative sample network graph for the (N-1)-th layer graph convolutional network.

[0097] S204, extract node features from the first and second augmented graphs of the data network graph using the first network embedding model to obtain the first global embedding vector and the second global embedding vector.

[0098] The first augmented graph and the second augmented graph are augmented graphs obtained by performing data augmentation processing on the data network graph. The first global embedding vector and the second global embedding vector are the global embedding vectors of each node in the first augmented graph and the second augmented graph, respectively, and are feature vectors belonging to the low-dimensional space.

[0099] In one embodiment, S204 may specifically include: the server extracting the first local embedding vector and the second local embedding vector of each node from the first augmented graph and the second augmented graph respectively through the first network embedding model; and performing pooling processing on the first local embedding vector and the second local embedding vector respectively to obtain the first global embedding vector and the second global embedding vector.

[0100] Here, the first local embedding vector and the second local embedding vector are the local embedding vectors of each node in the first augmented graph and the second augmented graph, respectively, and are also feature vectors in the low-dimensional space. The pooling process described above can be average pooling or max pooling, etc.

[0101] The extraction of the first and second local embedding vectors includes the following steps: the server obtains the first adjacency matrix and the first feature matrix of each node in the first augmented graph; the first adjacency matrix and the first feature matrix are input into the first network embedding model, so that the first network embedding model adds a self-loop to the first adjacency matrix, and generates the first local embedding vector of each node in the first augmented graph based on the first adjacency matrix with self-loop, the first degree matrix, the first feature matrix and the weight matrix of the first network embedding model; the server obtains the second adjacency matrix and the second feature matrix of each node in the second augmented graph; in addition, the server also inputs the second adjacency matrix and the second feature matrix into the first network embedding model, so that the first network embedding model adds a self-loop to the second adjacency matrix, and generates the second local embedding vector of each node in the second augmented graph based on the second adjacency matrix with self-loop, the second degree matrix, the second feature matrix and the weight matrix.

[0102] For example, when the first network embedding model is a network model that includes a graph convolutional network layer, the first network embedding model adds self-loops to the first adjacency matrix and determines the first local embedding vector of each node in the first augmented graph based on the first adjacency matrix with self-loops, the first degree matrix, the first feature matrix and the weight matrix of the graph convolutional network.

[0103] When the first network embedding model is a network model including multiple layers of graph convolutional networks, the first layer of the graph convolutional network adds a self-loop to the first adjacency matrix, and determines the embedding vector output by the first layer based on the first adjacency matrix with added self-loops, the first degree matrix, the first feature matrix, and the weight matrix of the first layer graph convolutional network. Then, the embedding vector output by the first layer graph convolutional network is used as the input data for the second layer graph convolutional network, and the embedding vector output by the second layer graph convolutional network is determined based on the first adjacency matrix with added self-loops, the first degree matrix, the input data of the second layer graph convolutional network, and the weight matrix of the second layer graph convolutional network. This process continues until the embedding vector output by the last layer graph convolutional network is obtained, and the embedding vector output by the last layer graph convolutional network is used as the first local embedding vector for each node in the first augmented graph. To clearly illustrate the above calculation process, the calculation formulas for each layer of graph convolutional networks are given below:

[0104]

[0105] in, This represents the embedding vector output by the l-th layer graph convolutional network during the processing of the first augmented graph; A a This is the first adjacency matrix of each node in the first augmented graph. This is the first adjacency matrix with added self-loops; for The first degree matrix; W (l)Let be the weight matrix of the l-th layer graph convolutional network; σ() is the activation function. Specifically, when l = 0, X a Let represent the first feature matrix of each node in the first augmentation graph. If the first network embedding model has a total of N layers of graph convolutional networks, when l = N-1, ... That is, the first local embedding vector of each node in the first augmented graph.

[0106] Similarly, the second local embedding vector can be calculated using the following formula:

[0107]

[0108] in, This represents the embedding vector output by the l-th layer graph convolutional network during the processing of the second augmented graph; A b This is the second adjacency matrix for each node in the second augmented graph. To add a second adjacency matrix with self-loops; for The second degree matrix. Specifically, when l = 0, X b This represents the second feature matrix of each node in the second augmentation graph. If the second network embedding model has a total of N layers of graph convolutional networks, when l = N-1... This is the second local embedding vector of each node in the second augmented graph.

[0109] After calculating the first local embedding vector and the second local embedding vector, the server can use a conversion function to convert the first local embedding vector and the second local embedding vector into the first global embedding vector and the second global embedding vector, respectively. Let's assume the conversion function is `Readout()`, then:

[0110] First global embedding vector s a =Readout(H a );

[0111] Second global embedding vector s b =Readout(H b ).

[0112] Among them, Readout(H a ) and Readout(H b ) can be H a and H bAverage pooling or max pooling is performed to obtain the first global embedding vector and the second global embedding vector, respectively. Since the global embedding vector is shared by all nodes in the graph, the first global embedding vector of each node in the first augmented graph is the same, and the second global embedding vector of each node in the second augmented graph is also the same.

[0113] S206, determine the first matching degree between the positive sample embedding vector and the first global embedding vector and the second global embedding vector, and determine the second matching degree between the negative sample embedding vector and the first global embedding vector and the second global embedding vector.

[0114] Since both the first and second augmented graphs are obtained by augmenting the data network graph, the positive sample embedding vector has a high degree of matching with the first global embedding vector and the second global embedding vector, while the negative sample embedding vector has a low degree of matching with the first global embedding vector and the second global embedding vector. Therefore, the first matching degree is greater than the second matching degree.

[0115] The first matching degree can refer to the degree of matching between the positive sample embedding vector and the first global embedding vector and the second global embedding vector. The second matching degree can refer to the degree of matching between the negative sample embedding vector and the first global embedding vector and the second global embedding vector.

[0116] In one embodiment, the server can use a discriminator to calculate the similarity score between the positive sample embedding vector and the first global embedding vector, and to calculate the similarity score between the positive sample embedding vector and the second global embedding vector, respectively, and use the calculated similarity scores as the first matching degree between the positive sample embedding vector and the first global embedding vector and the second global embedding vector. Furthermore, the server can also use the discriminator to calculate the similarity score between the negative sample embedding vector and the first global embedding vector, and to calculate the similarity score between the negative sample embedding vector and the second global embedding vector, respectively, and use the calculated similarity scores as the second matching degree between the negative sample embedding vector and the first global embedding vector and the second global embedding vector.

[0117] The discriminator can be viewed as a scoring function, which calculates a similarity score. This score reflects the matching degree between the local embedding vectors of the data network graph and the global embedding vectors of the augmentation graph, as well as the matching degree between the local embedding vectors of the negative sample network graph and the global embedding vectors of the augmentation graph. The function expression of the discriminator is as follows:

[0118]

[0119] Among them, h ican represent the positive sample embedding vector of the i-th node in the data network graph, or the negative sample embedding vector of the i-th node in the negative sample network graph; s can represent the first global embedding vector of the first augmentation graph, or the second global embedding vector of the second augmentation graph; W b It is a learnable mapping matrix.

[0120] S208, determine the loss value based on the first matching degree and the second matching degree, and adjust the parameters of the first network embedding model based on the loss value.

[0121] The parameters of the first network embedding model can be the weight parameters of the first network embedding model. Each layer of the first network embedding model has corresponding weight parameters. Combining the weight parameters of each layer of the network can yield the weight matrix of that layer.

[0122] Specifically, the server backpropagates the loss value in the first network embedding model to obtain the gradient of each parameter in the first network embedding model, and adjusts the parameters of the first network embedding model according to the gradient.

[0123] The calculation steps for the loss value can specifically include: the server determines the number of nodes in the data network graph and the number of nodes in the negative sample network graph, and then inputs the number of nodes in the data network graph, the number of nodes in the negative sample network graph, the first matching degree, and the second matching degree into the objective function to obtain the loss value. After obtaining the loss value, the server can adjust the parameters of the first network embedding model based on the loss value, thereby optimizing the parameters of the first network embedding model and minimizing the value of the objective function.

[0124] It is important to emphasize that in unsupervised training, to learn high-quality embedding vectors, the goal is not to minimize the error between the initial feature matrix and the reconstructed feature matrix, but rather to maximize the mutual information between the two variables. For example, it's not about minimizing the loss between the initial feature matrix of each node in the data network graph and the positive sample embedding vector of each node, but about maximizing the mutual information between these two variables. This ensures that the embedding vectors learned by the first network embedding model contain as much key information (such as the most unique and important information) as possible from the data network graph. Furthermore, since mutual information refers to the KL (Kullback-Leibler) divergence of the product of the joint distribution and the marginal distributions of two variables, maximizing mutual information requires increasing the distance between the products of the joint distribution and the marginal distributions. To simplify the solution, KL divergence can be converted to JS (Jensen-Shannon) divergence. The conversion formula between KL divergence and JS divergence is as follows:

[0125]

[0126] The above transformation formula can be simplified and approximated through negative sampling and network modeling to obtain a function L′ similar to the loss function, as shown below:

[0127]

[0128] Among them, E (X,A) [] and E (X′,A′) [ ] represent the expectation function, E (X,A) [] indicates the calculation of logD(h) i The expected value of s), E (X′,A′) [] indicates the calculation of 1-D(h′) i The expected value of E(s). In practical applications, E (X,A) [logD(h i ,s)]=logD(h i ,s), and E (X′,A′) [log(1-D(h′ i ,s))]=log(1-D(h′ i ,s)), that is

[0129] Since s can represent the first global embedding vector of the first augmented graph or the second global embedding vector of the second augmented graph, the objective function can be obtained according to the above function L′, which is as follows:

[0130]

[0131] According to E (X,A) [logD(h i ,s)]=logD(h i ,s), and E (X′,A′) [log(1-D(h′ i ,s))]=log(1-D(h′ i The above expression can be simplified to:

[0132]

[0133] Therefore, the loss value can be determined based on the number of nodes in the data network graph, the number of nodes in the negative sample network graph, the first matching degree, and the second matching degree. By continuously adjusting the parameters of the first network embedding model, the loss function can be minimized. By minimizing the objective function, the mutual information between the original feature matrix and the reconstructed feature matrix can be maximized, as can the consistency of the embedding of each node in the data network graph in the augmented graphs from two different perspectives. For example, minimizing the objective function can maximize the mutual information between the initial feature matrix of each node in the data network graph and the positive sample embedding vector of each node in the data network graph, and can also maximize the mutual information between the initial feature matrix of each node in the first augmented graph and the first local embedding vector of each node in the first augmented graph.

[0134] S210, Based on the adjusted first network embedding model, node features are extracted from the data network graph to obtain embedding vectors for classifying each node in the data network graph.

[0135] The first network embedding model trained using the above method can extract a more robust embedding vector that contains important features in a balanced feature space.

[0136] In one embodiment, the server can train the classifier using the embedding vector and classification label until the prediction result is consistent with or close to the classification label, at which point the classifier training stops. After training is complete, the server can also deploy the trained first network embedding model and classifier. When a classification task needs to be performed, the server responds to the terminal's initiation of a classification request, calls the first network embedding model to extract features from the corresponding document citation graph, media interaction graph, or social relationship graph, and uses the classifier to classify the extracted target embedding vector to obtain the final classification result.

[0137] In the above embodiments, node features are extracted from the data network graph and the negative sample network graph using a first network embedding model to obtain positive sample embedding vectors and negative sample embedding vectors. Furthermore, node features are extracted from two different augmented graphs of the data network graph using the first network embedding model to obtain a first global embedding vector and a second global embedding vector. A first matching degree is determined between the positive sample embedding vector and the first and second global embedding vectors, and a second matching degree is determined between the negative sample embedding vector and the first and second global embedding vectors. Since the augmented graphs are obtained by augmenting the data network graph, the positive sample embedding vector has a high matching degree with the first and second global embedding vectors, while the negative sample embedding vector has a low matching degree. Therefore, adjusting the parameters of the first network embedding model based on the first and second matching degrees allows the adjusted first network embedding model to learn robustly and accurately classify the embedding vectors of each node in the data network graph. Furthermore, no node labels are used during training, so the model is not affected by the majority class in the data network graph during learning. Thus, even if the data network graph is imbalanced, the model can learn a balanced feature space, making the embedding vectors contain important features and more robust, thereby effectively improving classification performance.

[0138] In one embodiment, the server performs a first data augmentation process on the data network graph to obtain a first augmented graph; and performs a second data augmentation process on the data network graph to obtain a second augmented graph, such as... Figure 4 As shown; where the first data augmentation process and the second data augmentation process are feature masking, edge perturbation, and subgraph extraction, respectively. It should be noted that the first data augmentation process and the second data augmentation process can be the same type of data augmentation process or different types of data augmentation processes. The first augmented graph and the second augmented graph are augmented graphs of the data network graph, also referred to as subgraphs or augmented subgraphs.

[0139] Since both the first and second data augmentation processes can involve feature masking, edge perturbation, or subgraph extraction, the above data augmentation schemes can be described in the following four scenarios:

[0140] Scenario 1: Obtain the first and second augmented images through feature masking.

[0141] In one embodiment, the server performs feature masking on image blocks in the data network graph to obtain a first augmented image and a second augmented image. The feature values ​​within the masked image blocks are set to 0. When training the first network embedding model, the masked features can be inferred using the unmasked features in the data network graph.

[0142] Scenario 2: Obtain the first and second augmented graphs by perturbing the edges.

[0143] In one embodiment, the server randomly adds or deletes edges in the data network graph to obtain a first enhanced graph and a second enhanced graph. When adding or deleting edges in the data network graph, uniform sampling can be performed following the principle of independent and identically distributed edges. For example, edges in the data network graph can be randomly added or deleted according to a certain proportion, such as randomly deleting 5% or 10% of the edges, or randomly adding 5% or 10% of the edges.

[0144] Scenario 3: Obtain the first and second augmented images through subgraph extraction.

[0145] In one embodiment, the server can perform node sampling in the data network graph to obtain a first sampling node and a second sampling node. In the data network graph, sampling is progressively diffused from the first sampling node as the center point, and during the progressive diffusion sampling process, the neighboring nodes of each sample are placed in the first sampling set. When the number of nodes in the first sampling set reaches a target value, sampling stops, and a first augmented graph is obtained. In the data network graph, sampling is progressively diffused from the second sampling node as the center point, and during the progressive diffusion sampling process, the neighboring nodes of each sample are placed in the second sampling set. When the number of nodes in the second sampling set reaches a target value, sampling stops, and a second augmented graph is obtained.

[0146] The first sampling node and the second sampling node can be nodes that are randomly sampled or nodes that are sampled at fixed points.

[0147] For the acquisition process of the first and second augmented images, please refer to the algorithm flow in Table 1:

[0148] Table 1

[0149]

[0150] Scenario 4: Obtain the first and second augmented images through a hybrid approach.

[0151] In one embodiment, the server selects sampling nodes in the data network graph, expands sampling level by level with the first sampling node as the center point, and places the neighboring nodes of each sample into the first sampling set during the level-by-level expansion sampling process; when the number of nodes in the first sampling set reaches the target value, sampling stops to obtain the first enhanced graph; and the data network graph is feature masked to obtain the second enhanced graph.

[0152] In another embodiment, the server selects sampling nodes in the data network graph, and spreads sampling step by step with the first sampling node as the center point. During the step-by-step diffusion sampling process, the neighboring nodes of each sample are placed in the first sampling set. When the number of nodes in the first sampling set reaches the target value, sampling is stopped to obtain the first enhanced graph. Then, the data network graph is perturbed to obtain the second enhanced graph.

[0153] In another embodiment, the server performs feature masking on the data network graph to obtain a first enhanced graph; and performs edge perturbation on the data network graph to obtain a second enhanced graph.

[0154] In the above embodiments, by performing data augmentation processing on the data network graph, augmented graphs from different angles can be obtained. Therefore, when using the augmented graphs for model training, the model can be made universal and adaptable to various scenarios.

[0155] In one embodiment, to further improve classification performance, the embedding vector extracted by the first network embedding model can be concatenated with the structural information of the data network graph, and the concatenated vector can be used as the target embedding vector for classifying each node in the data network graph. Specifically, as follows... Figure 5 As shown, the method also includes:

[0156] S502, the node features of the data network graph are extracted through the second network embedding model, and the target adjacency matrix is ​​reconstructed based on the extracted node features.

[0157] The second network embedding model is a structure preservation module used to reconstruct the structure of the data network graph. This second network embedding model can be a graph convolutional network model, a graph attention network model, or a graph isomorphic network model. For example, a graph convolutional network model can be a network model that includes at least one layer of graph convolutional network.

[0158] In one embodiment, S502 may specifically include: the server obtaining the feature matrix and adjacency matrix of each node in the data network graph, inputting the feature matrix and adjacency matrix of each node in the data network graph into a second network embedding model, extracting the degree matrix corresponding to the adjacency matrix of each node in the data network graph through the second network embedding model, and determining the node features based on the adjacency matrix, degree matrix, feature matrix of each node in the data network graph, and weight matrix of the second network embedding model; then, reconstructing the target adjacency matrix based on the node features and the transpose matrix of the node features.

[0159] For example, when the second network embedding model is a network model that includes a graph convolutional network layer, the second network embedding model extracts the degree matrix corresponding to the adjacency matrix of each node in the data network graph, and determines the node features based on the adjacency matrix, degree matrix, feature matrix of each node in the data network graph and the weight matrix of the graph convolutional network.

[0160] To clearly illustrate the above calculation process, the calculation formula for graph convolutional networks is given below:

[0161]

[0162] Among them, H s This represents the node features output by the graph convolutional network; This is the adjacency matrix of each node in the data network graph. This adjacency matrix is ​​an adjacency matrix with self-loops added. for The degree matrix is ​​denoted by ; U is the learnable weight matrix of the graph convolutional network; σ() is the activation function.

[0163] After extracting node features, the server reconstructs the target adjacency matrix to ensure that the model embedding retains the original structural information of the data network graph. The reconstruction expression is as follows:

[0164]

[0165] in, To reconstruct the target adjacency matrix, is the transpose matrix of the node features.

[0166] S504, adjust the parameters of the second network embedding model based on the loss value between the target adjacency matrix and the matrix labels.

[0167] Here, the matrix label refers to the actual adjacency matrix of the data network graph. For example, it can be the adjacency matrix of each node in the data network graph with self-loops added, or the adjacency matrix without self-loops added.

[0168] In one embodiment, the server calculates the loss value between the target adjacency matrix and the matrix labels based on the target loss function, and then uses this loss value to adjust the parameters of the second network embedding model. The expression for the target loss function is as follows:

[0169]

[0170] Where L represents the loss value, N is the number of nodes in the data network graph, and i and j represent the i-th row and j-th column of the data network graph, respectively. For the reconstructed target adjacency matrix of the node in the i-th row and j-th column, Let be the true adjacency matrix of the node in the i-th row and j-th column of the data network graph.

[0171] S506, When the adjusted second network embedding model reaches the convergence condition, the structural information of each node in the data network graph is obtained through the adjusted second network embedding model.

[0172] Specifically, by minimizing the objective loss function, the second network embedding model reaches convergence, enabling it to learn how to extract the adjacency matrix that is closest to the true adjacency matrix. Therefore, after training the second network embedding model, structural information that preserves the original structure of the data network graph is obtained using this model.

[0173] S508 uses the concatenated vector between the embedding vector and structural information as the target embedding vector for classifying nodes in the data network graph.

[0174] In one embodiment, the server can obtain embedding vectors containing node features and structural information of each node through a first network embedding model and a second network embedding model, respectively. To give the nodes more comprehensive expressive power, the above embedding vectors and structural information are concatenated to obtain target embedding vectors used for classifying each node in the data network graph. The expression for the target embedding vector is as follows:

[0175] H f =(H tf ||H sf )

[0176] Among them, H f H represents the target embedding vector. tf H represents the embedding vector of each node in the data network graph extracted by the first network embedding model. sf This represents the structural information extracted by the second network embedding model.

[0177] In one embodiment, after S408, the method further includes: the server classifies the target embedding vector using a classifier to obtain a prediction result; the classifier's parameters are adjusted based on the loss value between the prediction result and the classification label; and the training process is stopped when the adjusted classifier reaches the convergence condition.

[0178] For the classifier, a linear model, such as a single-layer neural network or a support vector machine, can be chosen. It's important to note that choosing a linear model effectively reduces the influence of the classifier itself, making the classification performance primarily depend on the quality of the target embedding vectors learned by the model. The linear mapping formula for this classifier is as follows:

[0179]

[0180] in, This represents the prediction output of the classifier, which can be in matrix form; g() is an optional scaling function, such as softmax(), and W and b are learnable mapping matrices and biases. Next, the classifier is trained by minimizing the loss function:

[0181]

[0182] Here, Y represents the true classification label of a node in the data network graph. Different loss functions can be used for different classifiers, such as cross-entropy loss or hinge loss.

[0183] In the above embodiments, by training the second network embedding model, it learns to extract structural information, thereby extracting structural information that is consistent with or close to the original structure of the data network graph. This structural information is then concatenated with the embedding vector containing key node features extracted by the first network embedding model, resulting in a target embedding vector containing both key node features and structural information. This target embedding vector has a more comprehensive expressive power, robustness, and can effectively improve classification performance.

[0184] To make the scheme of this application clearer, this section combines... Figure 6 Further explanation is provided below:

[0185] The training process in this application involves training the three modules of the classification model separately: the self-supervised learning module, the network retention module, and the classifier. Assuming that both the self-supervised learning module and the network retention module use graph convolutional network models (i.e., graph convolutional network model 1 and graph convolutional network model 2), then during training, graph convolutional network model 1 and graph convolutional network model 2 can be trained simultaneously, followed by training the classifier. The specific training process is as follows:

[0186] First, a predefined graph augmentation algorithm is used to augment the original graph (such as a citation graph) to obtain two augmented subgraphs from different perspectives. Then, graph convolutional network model 1 is used to extract features from the augmented subgraphs, the original graph, and the negative sample graph to obtain the embedding vectors for the corresponding graphs. After that, contrastive learning combined with mutual information maximization is used to optimize graph convolutional network model 1 so that the learned embedding vectors contain robust and key feature information.

[0187] Then, the graph convolutional network model 2 is used to perform convolution and transformation operations on the nodes in the original graph to obtain the corresponding node features. The adjacency matrix is ​​then reconstructed based on the node features, so that the loss value between the reconstructed adjacency matrix and the real graph adjacency matrix is ​​minimized, thereby enabling the trained graph convolutional network model 2 to extract rich structural information.

[0188] Finally, the embedding vector containing node features obtained from Graph Convolutional Network Model 1 is concatenated with the structural information obtained from Graph Convolutional Network Model 2 to obtain the final target embedding vector. This target embedding vector contains important node features and rich structural information. A classifier is then trained using this target embedding vector and the node label information.

[0189] In particular, since the self-supervised module and the structure preservation module do not have a fixed execution order, their operations can be performed in parallel, improving the timeliness of the model.

[0190] To verify the technical effects of the embodiments of this application, the following data and comparison methods were used, as shown in Tables 2 to 5:

[0191] The Cora Graph Dataset is a graph dataset abstracted from the academic citation network. It consists of 2708 nodes, 5429 edges, and 7 labels, representing papers as nodes in a machine learning dataset. Each node in the Cora Graph Dataset represents a paper, the edges between nodes represent citation relationships between papers, the initial features of each paper are generated using a bag-of-words model, and the label of each node refers to the research topic of that paper.

[0192] The Citeseer graph dataset is a graph dataset about academic citation networks, containing 3327 nodes, 5429 edges, and 6 labels. Nodes and edges represent citation relationships between documents, respectively. Node features are generated using a bag-of-words model, and the label of each node indicates the research field to which the document belongs.

[0193] PubMed Graph Dataset: This graph dataset is based on biological research papers and contains 19,717 nodes, 44,338 edges, and 3 labels. The labels of the nodes in this dataset represent the types of diseases discussed in the corresponding biological papers (such as diabetes types), and the node features are generated using a bag-of-words model.

[0194] The Flickr Graph Dataset is a graph dataset extracted from the image and video sharing website, where users interact and communicate by sharing images and videos. This dataset contains 7575 nodes, 239738 edges, and 9 types of labels. Nodes represent users, edges between nodes represent relationships between users, and node labels represent the user's interest groups.

[0195] BlogCatalog Graph Dataset: This graph dataset originates from social media websites. Nodes represent users, edges between nodes represent follow relationships between users, node features are generated using the word2vec model, and node labels represent interest groups joined by users. The dataset contains 5196 nodes, 171743 edges, and 6 labels.

[0196] Table 2

[0197] Cora graph dataset 2708 5429 7 1433 Citeseer graph dataset 3327 4732 6 3703 PubMed graph dataset 19717 44338 3 500 Flickr image dataset 7575 239738 9 12047 BlogCatalog graph dataset 5196 171743 6 8189

[0198] To demonstrate the effectiveness of the model in this application, it will be compared with commonly used network embedding models and methods for handling imbalance problems, as well as with some recently published models designed for imbalance problems in network data. The comparison methods used in this application are described in detail below:

[0199] (1) Traditional network embedding model:

[0200] GCN: This is the most widely used benchmark model in network embedding, and most current network models are improvements upon it. It aggregates the embeddings of the neighborhood through topological relationships represented by an adjacency matrix, and learns a corresponding embedding vector for each node.

[0201] APPNP is a representative of network decoupling models. On the one hand, it reduces the number of parameters by deconstructing feature propagation and feature transformation. On the other hand, it improves the feature transmission method based on personalized PageRank, thus expanding the model's receptive domain.

[0202] SGC transforms the nonlinear GCN model into a simple linear model. It reduces the additional complexity of GCNs by folding the function into a linear transformation by removing the nonlinear computation between GCN layers, and its performance is better than GCN in some experiments.

[0203] (2) General methods for addressing imbalance problems:

[0204] Re-weighting methods belong to the cost-sensitive algorithm category. They assign higher loss weights to the minority class and lower weights to the majority class to alleviate the problem of the majority class dominating the direction of loss descent.

[0205] Oversampling: The specific method of oversampling is to repeatedly sample from the minority class samples and then add the sampled data back into the minority class sample set to make the dataset relatively balanced. In the experiment, the sampled nodes still retain their original adjacency relationships.

[0206] (3) Recent imbalanced network embedding methods:

[0207] RECT is an embedding model based on graph convolutional networks, designed to address the completely imbalanced problem. It uses feature decomposition, modeling inter-class relationships, and network structure to enable the model to learn the semantic information corresponding to each class of samples, thus assisting the learning of imbalanced models.

[0208] GraphSMOTE: First, new nodes of the minority class are generated by interpolation. Then, an edge classifier is trained to add edges to these nodes to balance the network. Finally, node embeddings are generated.

[0209] The above model performs node classification on graph datasets with different imbalance rates, yielding the following results:

[0210] Table 3 shows the graph dataset with an imbalance rate of 0.1.

[0211]

[0212] Table 4 shows the graph dataset with an imbalance rate of 0.3.

[0213]

[0214] Table 5 shows the graph dataset with an imbalance rate of 0.5.

[0215]

[0216] It should be noted that, for both Micro-F and Macro-F, the larger the data in Tables 3-5, the better the corresponding effect. Therefore, the data in Tables 3-5 show that, for both Micro-F and Macro-F, the scheme in this application achieved the best experimental results.

[0217] After obtaining the trained first network embedding model, second network embedding model, and classifier, these models can be combined into a classification model and deployed on the corresponding business service platform to execute the classification process upon receiving a classification request. The processing procedure of the classification model is further described below, using several specific application scenarios as examples:

[0218] Application scenario 1: Document classification scenario.

[0219] In one embodiment, the server receives a document classification request initiated by the terminal, obtains a document citation relationship graph corresponding to the document classification request, extracts a first embedding vector from the document citation relationship graph using a first network embedding model, extracts a first structural data from the document citation relationship graph using a second network embedding model, and performs classification processing on the target embedding vector obtained by splicing the first embedding vector and the first structural data using a classifier to obtain the topic or field of each document.

[0220] The citation graph can be a network graph constructed based on a dataset obtained from an academic citation network. Each node in the citation graph corresponds to a document, such as a paper; the edges between nodes in the citation graph represent citation relationships. For example, if document 1 cites document 2, then the nodes of document 1 and document 2 are connected.

[0221] Application scenario 2: categorizing and pushing media based on interests and preferences.

[0222] In one embodiment, the server receives a media recommendation request initiated by the terminal and obtains the media interaction graph corresponding to the media recommendation request; extracts the second embedding feature of the media interaction graph through a first network embedding model; extracts the second structural data of the media interaction graph through a second network embedding model; classifies the target embedding vector obtained by concatenating the second embedding feature and the second structural data through a classifier to obtain the interest type corresponding to the object node; and recommends target media to the media account corresponding to the object node according to the interest type.

[0223] The media interaction graph can be a network graph obtained from a media sharing platform to reflect the interaction between objects and media. The media can be any of the following: images, music, videos, and live streams. Interaction exists between objects and media, such as an object clicking on an image, playing music or a video, or watching a live stream. The media interaction graph includes object nodes and media nodes.

[0224] The above methods can accurately infer the target audience's interests, such as what type of media they are interested in, like science fiction movies or rock music. Then, target media that they are interested in can be recommended to them, thereby increasing the media's on-demand rate.

[0225] Application scenario 3: categorizing and pushing communication groups of interest.

[0226] In one embodiment, the server receives a group recommendation request initiated by the terminal, obtains the social relationship graph corresponding to the group recommendation request, extracts the third embedding feature of the social relationship graph through a first network embedding model, extracts the third structural data of the social relationship graph through a second network embedding model, classifies the target embedding vector obtained by concatenating the third embedding feature and the third structural data through a classifier, and obtains the communication groups of interest to the social object, and pushes the communication groups of interest to the social object.

[0227] This social relationship graph includes object nodes for social objects. If there is a follow relationship between social objects, the object nodes corresponding to those social objects are connected. By classifying this social relationship graph, communication groups (such as interest groups in group chats) that each social object is interested in can be obtained.

[0228] In the above embodiments, the trained first network embedding model, second network embedding model, and classifier can be applied to different application scenarios to achieve the corresponding classification process. For example, the first network embedding model and the second network embedding model can obtain a target embedding vector containing node features and structural data. The target embedding vector can be used to accurately classify the nodes in the document citation graph, media interaction graph, or social relationship graph, and obtain the topic or field of each document, the interest type of the object, and the communication group of interest, which effectively improves the classification effect. Moreover, it can accurately push target media or communication groups of interest.

[0229] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0230] Based on the same inventive concept, this application also provides an embedding device for a data network graph to implement the above-described embedding method. The solution provided by this device is similar to the implementation described in the above method. Therefore, the specific limitations in one or more data network graph embedding device embodiments provided below can be found in the limitations of the data network graph embedding method described above, and will not be repeated here.

[0231] In one embodiment, such as Figure 7 As shown, a data network graph embedding device is provided, comprising: a first extraction module 702, a second extraction module 704, a determining module 706, an adjusting module 708, and a third extraction module 710, wherein:

[0232] The first extraction module 702 is used to extract node features from the data network graph and the negative sample network graph through the first network embedding model to obtain positive sample embedding vectors and negative sample embedding vectors; the data network graph is a positive sample network graph, which is an imbalanced network graph constructed based on an imbalanced object dataset;

[0233] The second extraction module 704 is used to extract node features from the first and second augmented graphs of the data network graph through the first network embedding model to obtain the first global embedding vector and the second global embedding vector.

[0234] The determination module 706 is used to determine the first matching degree between the positive sample embedding vector and the first global embedding vector and the second global embedding vector, and to determine the second matching degree between the negative sample embedding vector and the first global embedding vector and the second global embedding vector;

[0235] The adjustment module 708 is used to determine the loss value based on the first matching degree and the second matching degree, and to adjust the parameters of the first network embedding model based on the loss value;

[0236] The third extraction module 710 is used to extract node features from the data network graph based on the adjusted first network embedding model, and obtain embedding vectors for classifying each node in the data network graph.

[0237] In the above embodiments, node features are extracted from the data network graph and the negative sample network graph using a first network embedding model to obtain positive sample embedding vectors and negative sample embedding vectors. Furthermore, node features are extracted from two different augmented graphs of the data network graph using the first network embedding model to obtain a first global embedding vector and a second global embedding vector. A first matching degree is determined between the positive sample embedding vector and the first and second global embedding vectors, and a second matching degree is determined between the negative sample embedding vector and the first and second global embedding vectors. Since the augmented graphs are obtained by augmenting the data network graph, the positive sample embedding vector has a high matching degree with the first and second global embedding vectors, while the negative sample embedding vector has a low matching degree. Therefore, adjusting the parameters of the first network embedding model based on the first and second matching degrees allows the adjusted first network embedding model to learn robustly and accurately classify the embedding vectors of each node in the data network graph. Furthermore, no node labels are used during training, so the model is not affected by the majority class in the data network graph during learning. Thus, even if the data network graph is imbalanced, the model can learn a balanced feature space, making the embedding vectors contain important features and more robust, thereby effectively improving classification performance.

[0238] In one embodiment, such as Figure 8 As shown, the device also includes:

[0239] The enhancement module 712 is used to perform a first data enhancement process on the data network graph to obtain a first enhanced graph; and to perform a second data enhancement process on the data network graph to obtain a second enhanced graph; wherein the first data enhancement process and the second data enhancement process are feature masking, edge perturbation or subgraph extraction, respectively.

[0240] In one embodiment, the enhancement module 712 is further configured to select sampling nodes in the data network graph, and to perform progressive sampling with the first sampling node as the center point, and to place the neighboring nodes of each sampling in the first sampling set during the progressive sampling process; when the number of nodes in the first sampling set reaches the target value, sampling is stopped to obtain the first enhanced graph; and feature masking is performed on the data network graph to obtain the second enhanced graph.

[0241] In the above embodiments, by performing data augmentation processing on the data network graph, augmented graphs from different angles can be obtained. Therefore, when using the augmented graphs for model training, the model can be made universal and adaptable to various scenarios.

[0242] In one embodiment, such as Figure 8 As shown, the device also includes:

[0243] The shuffling module 714 is used to shuffle the features corresponding to the nodes in the data network graph to obtain a negative sample network graph; wherein the node structure of the negative sample network graph is consistent with the node structure of the data network graph.

[0244] In one embodiment, such as Figure 8 As shown, the device also includes:

[0245] Module 716 is used to obtain the object dataset and the relationships between the object data within the object dataset; and to construct a data network graph with each object data in the object dataset as a node and the relationships as edges of each node.

[0246] In one embodiment, the first augmented graph and the second augmented graph are augmented graphs obtained by performing data augmentation on the data network graph, respectively.

[0247] The second extraction module 704 is further configured to extract the first local embedding vector and the second local embedding vector of each node from the first augmented graph and the second augmented graph respectively through the first network embedding model; and to perform pooling processing on the first local embedding vector and the second local embedding vector respectively to obtain the first global embedding vector and the second global embedding vector.

[0248] In one embodiment, the second extraction module 704 is further configured to obtain the first adjacency matrix and the first feature matrix of each node in the first augmented graph; input the first adjacency matrix and the first feature matrix into the first network embedding model, so that the first network embedding model generates the first local embedding vector of each node in the first augmented graph based on the first adjacency matrix, the degree matrix of the first adjacency matrix, the first feature matrix, and the weight matrix of the first network embedding model; obtain the second adjacency matrix and the second feature matrix of each node in the second augmented graph; input the second adjacency matrix and the second feature matrix into the first network embedding model, so that the first network embedding model generates the second local embedding vector of each node in the second augmented graph based on the second adjacency matrix, the degree matrix of the second adjacency matrix, the first feature matrix, and the weight matrix of the first network embedding model.

[0249] In one embodiment, such as Figure 8 As shown, the device also includes:

[0250] The fourth extraction module 718 is used to extract node features from the data network graph through the second network embedding model and reconstruct the target adjacency matrix based on the extracted node features.

[0251] The adjustment module 708 is also used to adjust the parameters of the second network embedding model based on the loss value between the target adjacency matrix and the matrix labels;

[0252] The fourth extraction module 718 is also used to obtain the structural information of each node in the data network graph through the adjusted second network embedding model when the adjusted second network embedding model reaches the convergence condition; and to use the concatenated vector between the embedding vector and the structural information as the target embedding vector for classifying each node in the data network graph.

[0253] In one embodiment, such as Figure 8 As shown, the device also includes:

[0254] The classification module 720 is used to classify the target embedding vector through a classifier to obtain the prediction result;

[0255] The adjustment module 708 is also used to adjust the parameters of the classifier based on the loss value between the prediction result and the classification label; when the adjusted classifier reaches the convergence condition, the training process is stopped.

[0256] In the above embodiments, by training the second network embedding model, it learns to extract structural information, thereby extracting structural information that is consistent with or close to the original structure of the data network graph. This structural information is then concatenated with the embedding vector containing key node features extracted by the first network embedding model, resulting in a target embedding vector containing both key node features and structural information. This target embedding vector has a more comprehensive expressive power, robustness, and can effectively improve classification performance.

[0257] In one embodiment, such as Figure 8 As shown, the device also includes:

[0258] The first application module 722 is used to obtain a literature citation relationship graph; extract the first embedding vector of the literature citation relationship graph through a first network embedding model; extract the first structural data of the literature citation relationship graph through a second network embedding model; and classify the target embedding vector obtained by splicing the first embedding vector and the first structural data through a classifier to obtain the topic or field of each literature.

[0259] In one embodiment, such as Figure 8 As shown, the device also includes:

[0260] The second application module 724 is used to acquire a media interaction graph; extract the second embedding feature of the media interaction graph through the first network embedding model; extract the second structural data of the media interaction graph through the second network embedding model; classify the target embedding vector obtained by splicing the second embedding feature and the second structural data through a classifier to obtain the interest type corresponding to the object node; and recommend target media to the media account corresponding to the object node according to the interest type.

[0261] In one embodiment, such as Figure 8 As shown, the device also includes:

[0262] The third application module 726 is used to obtain a social relationship graph; extract the third embedding feature of the social relationship graph through the first network embedding model; extract the third structural data of the social relationship graph through the second network embedding model; classify the target embedding vector obtained by splicing the third embedding feature and the third structural data through a classifier to obtain the communication groups of interest to the social object; and push the communication groups of interest to the social object.

[0263] In the above embodiments, the trained first network embedding model, second network embedding model, and classifier can be applied to different application scenarios to achieve the corresponding classification process. For example, the first network embedding model and the second network embedding model can obtain a target embedding vector containing node features and structural data. The target embedding vector can be used to accurately classify the nodes in the document citation graph, media interaction graph, or social relationship graph, and obtain the topic or field of each document, the interest type of the object, and the communication group of interest, which effectively improves the classification effect. Moreover, it can accurately push target media or communication groups of interest.

[0264] The modules in the aforementioned data network diagram embedding device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0265] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data network graphs, negative sample network graphs, and augmented graphs. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a data network graph embedding method.

[0266] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0267] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described data network graph embedding method.

[0268] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described data network graph embedding method.

[0269] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the above-described data network graph embedding method.

[0270] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0271] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0272] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0273] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for embedding a data network graph, characterized in that, The method includes: The first network embedding model is used to extract node features from the data network graph and the negative sample network graph to obtain positive sample embedding vectors and negative sample embedding vectors; the data network graph is a positive sample network graph, which is an imbalanced network graph constructed based on an imbalanced object dataset; The first network embedding model is used to extract node features from the first and second augmented graphs of the data network graph to obtain the first global embedding vector and the second global embedding vector. Determine a first matching degree between the positive sample embedding vector and the first global embedding vector and the second global embedding vector, and determine a second matching degree between the negative sample embedding vector and the first global embedding vector and the second global embedding vector; The loss value is determined based on the first matching degree and the second matching degree, and the parameters of the first network embedding model are adjusted based on the loss value; Based on the adjusted first network embedding model, node features are extracted from the data network graph to obtain embedding vectors for classifying each node in the data network graph. The classifier is trained using the embedding vector and the classification label until the prediction result matches the classification label. Training is then stopped to obtain the trained first network embedding model and the classifier. The trained first network embedding model and the classifier are then deployed. In response to a classification request, the deployed first network embedding model is invoked to extract features from the document citation graph, media interaction graph, or social relationship graph corresponding to the classification request. The extracted target embedding vectors are then classified using the deployed classifier to obtain the final classification result. The media interaction graph is a network graph reflecting the interaction between objects and images, music, videos, or live streams. The social relationship graph is a network graph reflecting the attention relationships between social objects. The classification result of the document citation graph is the topic or field of each document, the classification result of the media interaction graph is the interest type of the object, and the classification result of the social relationship graph is the communication groups that the social object is interested in.

2. The method according to claim 1, characterized in that, The method further includes: The data network graph is subjected to a first data augmentation process to obtain the first augmented graph; The data network graph is subjected to a second data augmentation process to obtain the second augmented graph; The enhancement processing of the first data includes feature masking, edge perturbation, or subgraph extraction, while the enhancement processing of the second data includes feature masking, edge perturbation, or subgraph extraction.

3. The method according to claim 2, characterized in that, The first data augmentation process performed on the data network graph to obtain the first augmented graph includes: In the data network graph, a first sampling node is selected, and sampling is carried out step by step with the first sampling node as the center point. During the step-by-step sampling process, the neighboring nodes of each sampling are placed in the first sampling set. When the number of nodes in the first sampling set reaches the target value, sampling stops, and the first augmented map is obtained; The second data augmentation process performed on the data network graph to obtain the second augmented graph includes: Feature masking is performed on the data network graph to obtain the second enhanced graph.

4. The method according to claim 1, characterized in that, The method further includes: The features corresponding to the nodes in the data network graph are shuffled to obtain a negative sample network graph. The node structure of the negative sample network graph is consistent with the node structure of the data network graph.

5. The method according to claim 1, characterized in that, The method further includes: Obtain the object dataset and the relationships between the object data within the object dataset; A data network graph is constructed using each object data in the object dataset as a node and the relationship as an edge of each node.

6. The method according to claim 1, characterized in that, The first augmented graph and the second augmented graph are augmented graphs obtained by performing data augmentation on the data network graph; The step of extracting node features from the first and second augmented graphs of the data network graph using the first network embedding model to obtain the first global embedding vector and the second global embedding vector includes: Using the first network embedding model, the first local embedding vector and the second local embedding vector of each node are extracted from the first augmented graph and the second augmented graph, respectively. The first local embedding vector and the second local embedding vector are pooled respectively to obtain the first global embedding vector and the second global embedding vector.

7. The method according to claim 6, characterized in that, The step of extracting the first local embedding vector and the second local embedding vector of each node from the first augmented graph and the second augmented graph respectively through the first network embedding model includes: Obtain the first adjacency matrix and the first feature matrix of each node in the first augmented graph; input the first adjacency matrix and the first feature matrix into the first network embedding model, so that the first network embedding model generates the first local embedding vector of each node in the first augmented graph based on the first adjacency matrix, the degree matrix of the first adjacency matrix, the first feature matrix and the weight matrix of the first network embedding model; Obtain the second adjacency matrix and the second feature matrix of each node in the second augmented graph; input the second adjacency matrix and the second feature matrix into the first network embedding model, so that the first network embedding model generates the second local embedding vector of each node in the second augmented graph based on the second adjacency matrix, the degree matrix of the second adjacency matrix, the first feature matrix and the weight matrix of the first network embedding model.

8. The method according to any one of claims 1 to 7, characterized in that, After extracting node features from the data network graph based on the adjusted first network embedding model to obtain embedding vectors for classifying each node in the data network graph, the method further includes: The data network graph is subjected to node feature extraction using a second network embedding model, and the target adjacency matrix is ​​reconstructed based on the extracted node features. Based on the loss value between the target adjacency matrix and the matrix labels, the parameters of the second network embedding model are adjusted; When the adjusted second network embedding model reaches the convergence condition, the structural information of each node in the data network graph is obtained through the adjusted second network embedding model; The concatenated vector between the embedding vector and the structural information is used as the target embedding vector for classifying each node in the data network graph.

9. The method according to claim 8, characterized in that, The method further includes: The target embedding vector is classified using a classifier to obtain the prediction result; Based on the loss value between the prediction result and the classification label, the parameters of the classifier are adjusted; The training process stops when the adjusted classifier reaches the convergence condition.

10. The method according to claim 9, characterized in that, The method further includes: Obtain a citation graph; The first embedding vector of the literature citation graph is extracted using the first network embedding model; The first structural data of the literature citation graph is extracted using the second network embedding model; The classifier is used to classify the target embedding vector obtained by concatenating the first embedding vector and the first structural data to obtain the topic or field of each document.

11. The method according to claim 9, characterized in that, The method further includes: Obtain media interaction diagrams; The second embedding feature of the media interaction graph is extracted using the first network embedding model; The second structural data of the media interaction graph is extracted using the second network embedding model; The classifier is used to classify the target embedding vector obtained by concatenating the second embedding feature and the second structural data to obtain the interest type corresponding to the object node. Recommend target media to the media account corresponding to the object node according to the interest type.

12. The method according to claim 9, characterized in that, The method further includes: Obtain a social relationship graph; The third embedding feature of the social relationship graph is extracted using the first network embedding model; The third structural data of the social relationship graph is extracted using the second network embedding model; The classifier is used to classify the target embedding vector obtained by concatenating the third embedding feature and the third structural data to obtain the communication groups that the social object is interested in. Push the communication groups of interest to the social object.

13. An embedding device for a data network graph, characterized in that, The device includes: The first extraction module is used to extract node features from the data network graph and the negative sample network graph through the first network embedding model to obtain positive sample embedding vectors and negative sample embedding vectors; the data network graph is a positive sample network graph, which is an imbalanced network graph constructed based on an imbalanced object dataset; The second extraction module is used to extract node features from the first enhanced graph and the second enhanced graph of the data network graph through the first network embedding model to obtain the first global embedding vector and the second global embedding vector. The determining module is used to determine a first matching degree between the positive sample embedding vector and the first global embedding vector and the second global embedding vector, and to determine a second matching degree between the negative sample embedding vector and the first global embedding vector and the second global embedding vector; An adjustment module is used to determine a loss value based on the first matching degree and the second matching degree, and to adjust the parameters of the first network embedding model based on the loss value; The third extraction module is used to extract node features from the data network graph based on the adjusted first network embedding model, and obtain embedding vectors for classifying each node in the data network graph. The classifier is trained using the embedding vector and the classification label until the prediction result matches the classification label. Training is then stopped to obtain the trained first network embedding model and the classifier. The trained first network embedding model and the classifier are then deployed. In response to a classification request, the deployed first network embedding model is invoked to extract features from the document citation graph, media interaction graph, or social relationship graph corresponding to the classification request. The extracted target embedding vectors are then classified using the deployed classifier to obtain the final classification result. The media interaction graph is a network graph reflecting the interaction between objects and images, music, videos, or live streams. The social relationship graph is a network graph reflecting the attention relationships between social objects. The classification result of the document citation graph is the topic or field of each document, the classification result of the media interaction graph is the interest type of the object, and the classification result of the social relationship graph is the communication groups that the social object is interested in.

14. The apparatus according to claim 13, characterized in that, The device further includes: An enhancement module is used to perform a first data enhancement process on the data network graph to obtain a first enhanced graph; and to perform a second data enhancement process on the data network graph to obtain a second enhanced graph. The enhancement processing of the first data includes feature masking, edge perturbation, or subgraph extraction, while the enhancement processing of the second data includes feature masking, edge perturbation, or subgraph extraction.

15. The apparatus according to claim 14, characterized in that, The enhancement module is further configured to select a first sampling node in the data network graph, and to perform progressive sampling with the first sampling node as the center point, and to place the neighboring nodes of each sample in the first sampling set during the progressive sampling process; when the number of nodes in the first sampling set reaches the target value, sampling is stopped to obtain the first enhancement graph; and feature masking is performed on the data network graph to obtain the second enhancement graph.

16. The apparatus according to claim 13, characterized in that, The device further includes: The shuffling module is used to shuffle the features corresponding to the nodes in the data network graph to obtain a negative sample network graph. The node structure of the negative sample network graph is consistent with the node structure of the data network graph.

17. The apparatus according to claim 13, characterized in that, The device further includes: A construction module is used to obtain the object dataset and the association relationships between the object data within the object dataset; and to construct a data network graph with each object data in the object dataset as a node and the association relationships as edges of each node.

18. The apparatus according to claim 13, characterized in that, The first augmented graph and the second augmented graph are augmented graphs obtained by performing data augmentation on the data network graph; The second extraction module is further configured to extract the first local embedding vector and the second local embedding vector of each node from the first augmented graph and the second augmented graph respectively through the first network embedding model; and to perform pooling processing on the first local embedding vector and the second local embedding vector respectively to obtain the first global embedding vector and the second global embedding vector.

19. The apparatus according to claim 18, characterized in that, The second extraction module is further configured to obtain the first adjacency matrix and the first feature matrix of each node in the first augmented graph; input the first adjacency matrix and the first feature matrix into the first network embedding model, so that the first network embedding model generates the first local embedding vector of each node in the first augmented graph based on the first adjacency matrix, the degree matrix of the first adjacency matrix, the first feature matrix and the weight matrix of the first network embedding model; and obtain the second adjacency matrix and the second feature matrix of each node in the second augmented graph. The second adjacency matrix and the second feature matrix are input into the first network embedding model, so that the first network embedding model generates the second local embedding vector of each node in the second augmented graph based on the second adjacency matrix, the degree matrix of the second adjacency matrix, the first feature matrix, and the weight matrix of the first network embedding model.

20. The apparatus according to any one of claims 13 to 19, characterized in that, The device further includes: The fourth extraction module is used to extract node features from the data network graph through the second network embedding model, and reconstruct the target adjacency matrix based on the extracted node features. The adjustment module is also used to adjust the parameters of the second network embedding model based on the loss value between the target adjacency matrix and the matrix label; The fourth extraction module is further configured to obtain the structural information of each node in the data network graph through the adjusted second network embedding model when the adjusted second network embedding model reaches the convergence condition; and to use the concatenated vector between the embedding vector and the structural information as the target embedding vector for classifying each node in the data network graph.

21. The apparatus according to claim 20, characterized in that, The device further includes: The classification module is used to classify the target embedding vector using a classifier to obtain a prediction result; The adjustment module is further configured to adjust the parameters of the classifier based on the loss value between the prediction result and the classification label; when the adjusted classifier reaches the convergence condition, the training process is stopped.

22. The apparatus according to claim 21, characterized in that, The device further includes: The first application module is used to obtain a literature citation relationship graph; extract a first embedding vector from the literature citation relationship graph through a first network embedding model; extract a first structural data from the literature citation relationship graph through a second network embedding model; and classify the target embedding vector obtained by splicing the first embedding vector and the first structural data through the classifier to obtain the topic or field of each literature.

23. The apparatus according to claim 21, characterized in that, The device further includes: The second application module is used to acquire a media interaction graph; extract a second embedding feature of the media interaction graph through the first network embedding model; extract a second structural data of the media interaction graph through the second network embedding model; classify the target embedding vector obtained by concatenating the second embedding feature and the second structural data through the classifier to obtain the interest type corresponding to the object node; and recommend target media to the media account corresponding to the object node according to the interest type.

24. The apparatus according to claim 21, characterized in that, The device further includes: The third application module is used to obtain a social relationship graph; extract the third embedding feature of the social relationship graph through the first network embedding model; extract the third structural data of the social relationship graph through the second network embedding model; classify the target embedding vector obtained by concatenating the third embedding feature and the third structural data through the classifier to obtain the communication groups of interest to the social object; and push the communication groups of interest to the social object.

25. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 12.

26. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.

27. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method described in any one of claims 1 to 12.

Citation Information

Patent Citations

  • Multi-view comparative learning-based citation network graph representation learning system and method

    CN113627463A

  • Social platform rumor detection model construction method and prediction method based on comparative learning

    CN113705099A