Classification methods and apparatus

By actively learning from the nodes that have the greatest positive influence on their neighbors and/or the nodes with the lowest similarity to the class center in graph data, the graph neural network model is optimized, solving the semantic confusion problem in graph active learning and improving the accuracy of node classification and the learning efficiency of the model.

CN117371509BActive Publication Date: 2026-08-04SHENZHEN HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
Filing Date
2023-09-14
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing graph active learning methods have failed to effectively address the semantic confusion problem of connected nodes in graph data, resulting in poor accuracy of node classification by graph neural network models.

Method used

By acquiring node attribute information and edge information from graph data, the embedding vector of the node is calculated using a graph neural network model. The node with the greatest positive influence on its neighboring nodes and/or the lowest similarity to the category center is selected as the target node for active learning, thereby optimizing the graph neural network model.

Benefits of technology

It improves the accuracy of graph neural network models in node classification, reduces computational complexity and computational cost, and enhances the model's learning efficiency, adaptability, and generalization ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117371509B_ABST
    Figure CN117371509B_ABST
Patent Text Reader

Abstract

The classification method and apparatus provided in this application can improve the accuracy of graph neural network models in classifying nodes. The method may include: acquiring first graph data, which includes a plurality of first nodes, attribute information of each of the plurality of first nodes, and edge information between the plurality of first nodes; inputting the first graph data into a graph neural network model to obtain an embedding vector for each of the first nodes; determining at least one target node from the plurality of first nodes based on the embedding vector of each first node; and determining the classification result of a second node in the second graph data structure based on the at least one target node, the attribute information of each of the at least one target node, the edge information between the at least one target node, the graph neural network model, and the second graph data.
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 more specifically, to classification methods and apparatus in the field of artificial intelligence technology. Background Technology

[0002] In recent years, research on graph structure analysis using modeling has received increasing attention. Among them, graph neural networks (GNNs) based on deep learning have been widely applied in e-commerce search, recommendation, online advertising, financial risk control, and traffic prediction due to their excellent performance. Graph active learning (GAL) aims to find the nodes with the most information in the graph for annotation to maximize the performance of GNNs, such as improving the accuracy of GNN models in classifying nodes.

[0003] Existing GAL methods are mainly applied to independent and identically distributed data such as images. However, their performance is often poor when transferred to graph data. For example, GAL methods applied to graph data mainly design different measurement strategies based on the characteristics of graph data. The main methods currently include those based on graph node uncertainty and those based on node topological influence. However, these existing methods do not take into account the semantic confusion problem of connected nodes. Therefore, the labeled samples selected by existing GAL methods cannot effectively improve the model performance. In other words, the GNN model trained using labeled samples selected by existing GAL methods has poor accuracy in classifying nodes. Summary of the Invention

[0004] This application provides a classification method and apparatus that can improve the accuracy of graph neural network models in classifying nodes.

[0005] In a first aspect, embodiments of this application provide a classification method, which may include: acquiring first graph data, the first graph data including a plurality of first nodes, attribute information of each of the plurality of first nodes, and edge information between the plurality of first nodes, wherein the plurality of first nodes correspond to a plurality of users, the attribute information of each first node is used to describe the behavior and / or inherent characteristics of the user corresponding to each first node, and the edge information between the plurality of first nodes is used to describe the interaction between the plurality of users corresponding to the plurality of first nodes; inputting the first graph data into a graph neural network model to obtain the embedding vector of each first node, the graph neural network model being used to indicate the embedding vectors of the graph data and the nodes in the graph data. The mapping relationship between quantities; based on the embedding vector of each first node, at least one target node is determined from the plurality of first nodes, the at least one target node being the first node with the greatest positive influence on neighboring nodes and / or the lowest similarity to each category center; based on the at least one target node, the attribute information of each target node, the edge information between the at least one target node, the graph neural network model, and the second graph data, the classification result of the second node in the second graph data structure is determined, the second graph data including a plurality of second nodes, the attribute information of each second node, and the edge information between the plurality of second nodes.

[0006] The classification method provided in this application utilizes the embedding vector of a first node to select at least one target node from multiple first nodes that is more valuable for training the graph neural network model (i.e., has the greatest positive influence on neighboring nodes and / or the lowest similarity to the center of each category). This means excluding first nodes that may cause semantic confusion. Based on the relevant information of this at least one target node, active learning is further performed to optimize the graph neural network model. Existing active learning methods for graph neural networks do not consider the semantic confusion of connected nodes. Therefore, the classification method provided in this application can reduce the impact of semantic confusion on the active learning of the graph neural network model, thereby improving the accuracy of node classification in the optimized graph neural network model. In other words, the classification method provided in this application can improve the accuracy of node classification in the graph neural network model with the same amount of annotation.

[0007] In one possible implementation, determining at least one target node from the plurality of first nodes based on the embedding vector of each first node includes: determining a positive influence score and a diversity score for each first node based on the embedding vector of each first node, wherein the positive influence score of each first node is used to indicate the positive influence of each first node on its neighboring nodes, and the diversity score of each first node is used to indicate the minimum distance between each first node and the center of each of the at least one category, and the distance between each first node and the center of at least one preset category; determining a comprehensive score for each first node based on the positive influence score and the diversity score of each first node; and determining the at least one target node from the plurality of first nodes based on the comprehensive score of each first node.

[0008] The classification method provided in this application combines the positive influence of each first node on its neighboring nodes (i.e., positive influence score) and the distance of each first node to the center of different categories (i.e., diversity score) to select at least one more valuable target node from multiple first nodes. Existing graph neural network models' active learning methods are based on clustering or feature distance measurement between nodes, which has high computational complexity. Therefore, the classification method provided in this application can reduce computational complexity and computational load.

[0009] In one possible implementation, determining the classification result of the second node in the second graph data structure based on the at least one target node, the attribute information of each of the at least one target node, the edge information between the at least one target node, the graph neural network model, and the second graph data includes: training the graph neural network model based on the at least one target node, the attribute information of each of the at least one target node, and the edge information between the at least one target node to obtain a trained graph neural network model; and inputting the second graph data into the trained graph neural network model to obtain the classification result of each second node.

[0010] In one possible implementation, the graph neural network model is trained based on the at least one target node, the attribute information of each of the at least one target node, and the edge information between the at least one target node to obtain the trained graph neural network model. This includes: training the graph neural network model based on the at least one target node, the attribute information of each of the at least one target node, the edge information between the at least one target node, and the annotation information of each target node to obtain the trained graph neural network model. The annotation information of each target node is used to indicate the classification result obtained by manually annotating each target node.

[0011] The classification method provided in this application training method trains a graph neural network model based on the at least one target node, the attribute information of each target node, the edge information between the at least one target node, and the annotation information of each target node. That is, the graph neural network model is trained through supervised learning, which is beneficial to improving the model's learning efficiency, adaptability, and generalization ability.

[0012] In one possible implementation, the method further includes: obtaining feedback information from the at least one first node, the feedback information indicating the actual classification result of each target node; and updating the first graph data based on the feedback information from the at least one first node.

[0013] The classification method provided in this application improves the accuracy of the model by learning the graph neural network model based on the updated first graph data.

[0014] Secondly, embodiments of this application also provide another classification device, including: a processor and a communication interface, the processor and the communication interface being coupled; the communication interface is used to acquire first graph data, the first graph data including a plurality of first nodes, attribute information of each of the plurality of first nodes, and edge information between the plurality of first nodes, wherein the plurality of first nodes correspond to a plurality of users, the attribute information of each first node is used to describe the behavior and / or inherent characteristics of the user corresponding to each first node, and the edge information between the plurality of first nodes is used to describe the interaction between the plurality of users corresponding to the plurality of first nodes; the processor is used to input the first graph data acquired through the communication interface into a graph neural network model to obtain the embedding vector of each first node, the graph neural network... The model is used to indicate the mapping relationship between graph data and the embedding vectors of nodes in the graph data; based on the embedding vector of each first node, at least one target node is determined from the plurality of first nodes, the at least one target node being the first node with the greatest positive influence on neighboring nodes and / or the lowest similarity to each category center; based on the at least one target node, the attribute information of each target node, the edge information between the at least one target node, the graph neural network model, and the second graph data, the classification result of the second node in the second graph data structure is determined, the second graph data including a plurality of second nodes, the attribute information of each second node, and the edge information between the plurality of second nodes.

[0015] In one possible implementation, the processor is specifically configured to: determine a positive influence score and a diversity score for each first node based on the embedding vector of each first node, wherein the positive influence score of each first node indicates the positive influence of each first node on its neighboring nodes, and the diversity score of each first node indicates the minimum distance between each first node and the center of each of the at least one category, and the distance between each first node and the center of at least one preset category; determine a comprehensive score for each first node based on the positive influence score and the diversity score of each first node; and determine the at least one target node from the plurality of first nodes based on the comprehensive score of each first node.

[0016] In one possible implementation, the processor is specifically used to: train the graph neural network model based on the at least one target node, the attribute information of each of the at least one target node, and the edge information between the at least one target node, to obtain the trained graph neural network model; and input the second graph data into the trained graph neural network model to obtain the classification result of each second node.

[0017] In one possible implementation, the processor is specifically used to: train the graph neural network model based on the at least one target node, the attribute information of each of the at least one target node, the edge information between the at least one target node and the annotation information of each target node, to obtain the trained graph neural network model, wherein the annotation information of each target node is used to indicate the classification result obtained by manually annotating each target node.

[0018] In one possible implementation, the communication interface is further configured to acquire feedback information from the at least one first node, the feedback information indicating the actual classification result of each target node; the processor is further configured to update the first graph data based on the feedback information from the at least one first node.

[0019] Thirdly, this application also provides a classification device for implementing the method described in the first aspect or any possible implementation thereof, the device comprising units for implementing the method described in the first aspect or any possible implementation thereof.

[0020] Fourthly, this application also provides a computer-readable storage medium for storing a computer program, characterized in that the computer program includes instructions for implementing the method described in the first aspect or any possible implementation thereof.

[0021] Fifthly, this application also provides a computer program product, the computer program product including instructions, characterized in that, when the instructions are executed on a computer or processor, the computer or processor causes the computer or processor to implement the method described in the first aspect or any possible implementation thereof.

[0022] The separation device, computer storage medium, and computer program product provided in this application are all used to execute the classification method provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects of the classification method provided above, and will not be repeated here. Attached Figure Description

[0023] Figure 1 A schematic diagram of the figure data 100 provided in the embodiments of this application;

[0024] Figure 2 A schematic architecture diagram of the classification system 200 provided in an embodiment of this application;

[0025] Figure 3 A schematic flowchart of a classification method provided in an embodiment of this application;

[0026] Figure 4 This is a schematic diagram of another set of data provided in an embodiment of this application;

[0027] Figure 5 This is a schematic diagram of another set of data provided in an embodiment of this application;

[0028] Figure 6 Another illustrative flowchart of the classification method 400 provided in the embodiments of this application;

[0029] Figure 7 A schematic block diagram of a classification device 500 provided in an embodiment of this application;

[0030] Figure 8 This is a schematic block diagram of a classification device 600 provided in an embodiment of this application. Detailed Implementation

[0031] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0032] First, let me introduce some of the technical terms used in the embodiments of this application.

[0033] 1. Graph Data

[0034] Graph data consists of nodes and edges connecting the nodes.

[0035] Optionally, the nodes described in the embodiments of this application may also be referred to as vertices or intersections; the connection between two nodes through an edge may also be referred to as a link or pair between two nodes through an edge.

[0036] Example, Figure 1 A schematic diagram of the figure data 100 provided in an embodiment of this application is shown. For example... Figure 1 As shown, the graph data 100 may include nodes 111, 112, 121, 122, and 123. Node 111 is connected to node 112 via edge a, node 112 is connected to node 121 via edge b, node 112 is connected to node 122 via edge c, and node 112 is connected to node 123 via edge d. In other words, node 112 can be called a one-hop neighbor (or first-order neighbor) of node 111, and nodes 121, 122, and 123 can be called two-hop neighbors (or second-order neighbors) of node 111.

[0037] In one possible implementation, graph data can include two layers of information: attribute information (V) and edge information (E) between nodes. Attribute information (V) can usually be represented by a vector, called an attribute vector, while edge information can usually be represented by a matrix, called an adjacency matrix.

[0038] For example, adjacency matrices can typically be used to capture the relationships between nodes and edges in a graph. Assuming the graph data contains n nodes, the adjacency matrix is ​​an n*n matrix. If nodes are related, they are represented as 1 in the adjacency matrix; otherwise, they are represented as 0.

[0039] 2. Graph Neural Networks (GNNs)

[0040] GNNs learn to obtain the optimal representation of attribute vectors for graph data.

[0041] In one possible implementation, a Generative Neural Network (GNN) is an optimizable transformation of the attribute vectors of graph data. Its input is a graph, and its output is also a graph. It only transforms the attribute vectors to obtain optimized attribute vectors (also called embedding vectors), but it does not change the connectivity of the graph (i.e., which points are connected to each other remains unchanged after passing through the GNN). After obtaining the embedding vectors, a fully connected neural network is then applied, depending on the specific task, for classification and / or regression.

[0042] For example, suppose a taekwondo club has two coaches, A and B, and all members are nodes. One day, the two coaches, A and B, have a falling out. Would each member prefer to side with A or B? A Generative Neural Network (GNN) can be used for node classification in this scenario.

[0043] The classification system used in the classification method and apparatus provided in the embodiments of this application will be further described below.

[0044] Figure 2 A schematic block diagram of a classification system 200 provided in an embodiment of this application is shown. This classification system is applicable to various scenarios where nodes in graph data need to be classified using a GNN. Figure 2 As shown, the system 200 may include an input device 210, a sorting device 220, and an output device 230.

[0045] The input device 210 is used to acquire the original map data and send the original map data to the classification device 220.

[0046] The classification device 220 is used to input the original graph data into the graph neural network model to obtain the classification results of the nodes in the original graph data (the specific implementation of the classification device 220 will be described in detail below), and send the classification results of the nodes in the original graph data to the output device 230.

[0047] For example, in a fraud detection scenario, the classification result could include: fraudulent users or non-fraudulent users.

[0048] The following will combine Figure 2 The system 200 described herein further introduces the classification method and apparatus provided in the embodiments of this application.

[0049] Figure 3 A schematic flowchart of a classification method 300 provided in an embodiment of this application is shown. Figure 3 As shown, this method 300 can be applied to, for example... Figure 2 The system 100 shown is performed by the sorting device 220. The method 300 may include the following steps S310 to S360. It should be noted that the steps listed below may be performed in various orders and / or occur simultaneously, and are not limited to... Figure 3 The execution order is shown.

[0050] S310. Obtain graph data 1, which includes multiple nodes 1, attribute information of each node 1, and edge information between the multiple nodes 1. The multiple nodes 1 correspond to multiple users. The attribute information of each node 1 is used to describe the behavior and / or inherent characteristics of the user corresponding to each node 1. The edge information between the multiple nodes 1 is used to describe the interaction between the multiple users corresponding to the multiple nodes 1.

[0051] S320. Input the graph data 1 into the graph neural network model to obtain the embedding vector of each node 1. The graph neural network model is used to indicate the mapping relationship between the graph data and the embedding vectors of the nodes in the graph data.

[0052] It should be noted that this attribute information can be described by an attribute vector. The graph neural network model can optimize the attribute vector based on the edge information to obtain the optimized attribute vector, which is the embedding vector.

[0053] S330. Based on the embedding vector of each node 1, determine at least one node t from the plurality of nodes 1, wherein the at least one node t is the node 1 with the greatest positive influence on neighboring nodes and / or the lowest similarity to the center of each category among the plurality of nodes 1.

[0054] In one possible implementation, S330 may include: determining at least one node t from the plurality of nodes 1 based on the embedding vector of each node 1 and the edge information between the plurality of nodes 1.

[0055] In one possible implementation, S330 may include the following steps S331 to S333.

[0056] S331. Based on the embedding vector of each node 1, determine the positive influence score and the diversity score of each node 1. The positive influence score of each node 1 is used to indicate the positive influence of each node 1 on its neighboring nodes. The diversity score of each node 1 is used to indicate the minimum distance between each node 1 and the center of each of the at least one category, which is the distance between each node 1 and the center of at least one preset category.

[0057] It should be noted that the positive influence score of each node 1 can reflect the scope of each node 1's influence in terms of topology and semantics.

[0058] In one possible implementation, in S331, the positive influence score of each node 1 can be determined based on the embedding vector of each node 1 and the edge information of each node 1.

[0059] For example, taking a graph data including node u and node v, where node u is connected to node v through an edge, the positive influence of node u on node v is defined as the magnitude of the influence of node v's features on node u's features after k feature aggregations and propagations. This application provides a method for calculating the positive influence of a node, including the following steps (1) to (4).

[0060] (1) The influence of node u on node v can be calculated using formula (1):

[0061]

[0062] The larger I(u,v) is, the greater the influence of node u on node v.

[0063] (2) The feature similarity, i.e. semantic similarity, between node u and node v can be calculated using formula (2):

[0064]

[0065] Where, x u Let x represent the embedding vector of node u. v This represents the embedding vector of node v.

[0066] (3) The positive influence of node u on node v can be calculated using formula (3):

[0067] SI(u,v)=sim(u,v)·I(u,v) (3)

[0068] (4) The positive influence score of node u can be calculated using formula (4):

[0069] The positive influence score of node u is defined as the increment of positive influence that can be brought about by adding node u to set L.

[0070] INF(u)=|σ p (L i U{u})-σ p (L i (4)

[0071] Where L represents a pre-given training set, which includes a given number of nodes t, σ p (L i ) represents the number of nodes in L whose positive influence scores on their neighbors are greater than a set threshold, σ p (L i U{u}) represents the number of nodes in L whose positive influence score on neighboring nodes is greater than a set threshold after node u is added.

[0072] Example, Figure 4 This illustration shows a schematic diagram of another set of data provided in an embodiment of this application. For example... Figure 4 As shown, in the training set L, there is only node v, and three of its connected one-hop neighbors have a positive influence score greater than a given threshold. Then σ p (L i The value is 3.

[0073] It should be noted that the diversity score of each node 1 reflects the average distance of each node 1 from the training set. The higher the score, the farther the node is from the training set, and the greater the diversity should be provided.

[0074] In one possible implementation, in S331, the distance between each node 1 and the center of at least one preset category can be determined based on the embedding vector of each node 1; and the diversity score of each node 1 can be determined based on the distance between each node 1 and the center of at least one preset category.

[0075] Example, Figure 5 This illustration shows another schematic diagram of the data provided in an embodiment of this application. For example... Figure 5 As shown, the graph data includes node u, center p1 of category 1, center p2 of category 2, and center p3 of category 3. In each iteration of active learning, the diversity score of node u can be calculated using formula (5):

[0076]

[0077] Where, x u p represents the embedding vector of node u. j Represents the labeled category center j, min j This represents the minimum distance from node u to the center j of the category, where j is an integer greater than 0.

[0078] S332. Based on the positive influence score and the diversity score of each node 1, determine the overall score of each node 1.

[0079] It should be noted that the positive influence score reflects the topological and semantic influence range of a node, while the diversity score reflects the distance of a node from the training set. In order to properly fuse the two scores, this scheme first uses percentages to regularize them separately, and then performs linear fusion.

[0080] For example, let P be the denoted P. φ (u,U) represents the percentage of nodes whose scores are less than node u under the metric φ. The overall score of a node can be calculated using formula (6):

[0081] score(u)=(1-λ)·P INF (u,U)+λ·P DIS (u,U) (6)

[0082] Where λ is a hyperparameter that controls the fusion weight of the two scores, P INF (u,U) represents the percentage of node 1 whose positive influence score is less than that of node u, out of the total number of nodes 1. DIS (u,U) represents the percentage of node 1 whose diversity score is less than that of node u.

[0083] S333. Based on the comprehensive score of each node 1, determine at least one node t from the plurality of nodes 1.

[0084] In one possible implementation, since fraud samples are often very scarce in certain classification tasks, such as fraud detection tasks, and the data faces a serious imbalance problem, this application also proposes a method to maintain a balanced distribution of the labels of the selected samples, which may include the following steps (a) and (b).

[0085] (a) Set a balanced upper limit on the number of labels for each class of samples;

[0086] (b) Obtain the pseudo-labels of the filtered nodes. If the number of nodes of a certain type has reached the upper limit, discard the node and select nodes from other types for labeling.

[0087] S340. Based on the at least one node t, the attribute information of each node t in the at least one node t, the connection information between the at least one node t, the graph neural network model and the graph data 2, determine the classification result of node 2 in the structure of the graph data 2, wherein the graph data 2 includes multiple nodes 2, the attribute information of each node 2 in the multiple nodes 2 and the connection information between the multiple nodes 2.

[0088] In one possible implementation, S340 may include: training the graph neural network model based on the at least one node t, the attribute information of each node t in the at least one node t, and the edge information between the at least one node t, to obtain the trained graph neural network model; and inputting the graph data 2 into the trained graph neural network model to obtain the classification result of each node 2.

[0089] Optionally, the above-mentioned training of the graph neural network model based on the at least one node t, the attribute information of each of the at least one node t, and the edge information between the at least one node t to obtain the trained graph neural network model may include: training the graph neural network model based on the at least one node t, the attribute information of each of the at least one node t, the edge information between the at least one node t, and the annotation information of each node t to obtain the trained graph neural network model, wherein the annotation information of each node t is used to indicate the classification result obtained by manually annotating each node t.

[0090] Optionally, the annotation information may belong to the attribute information, or the annotation information and the attribute information may be two different types of information; this application does not limit this.

[0091] Optionally, after S340, the method 300 may further include: S350 to S360.

[0092] S350. Obtain feedback information from at least one node 1, which is used to indicate the actual classification result of each node t.

[0093] S360. Update the graph data 1 based on the feedback information from at least one node 1.

[0094] Figure 6 A schematic flowchart of a classification method 400 provided in an embodiment of this application is shown. Figure 6 As shown, this method 400 can be applied to, for example... Figure 2 The system 100 shown is used, and the sorting device 220 performs the sorting. The method 400 may include the following steps S410 to S440. It should be noted that the steps listed below may be performed in various orders and / or occur simultaneously, and are not limited to... Figure 6 The execution order is shown.

[0095] S410. Obtain first graph data, which includes multiple first nodes, attribute information of each of the multiple first nodes, and edge information between the multiple first nodes. The multiple first nodes correspond to multiple users. The attribute information of each first node is used to describe the behavior and / or inherent characteristics of the user corresponding to each first node. The edge information between the multiple first nodes is used to describe the interaction between the multiple users corresponding to the multiple first nodes.

[0096] S420. Input the first graph data into the graph neural network model to obtain the embedding vector of each first node. The graph neural network model is used to indicate the mapping relationship between the graph data and the embedding vectors of the nodes in the graph data.

[0097] S430. Based on the embedding vector of each first node, determine at least one target node from the plurality of first nodes, wherein the at least one target node is the first node among the plurality of first nodes that has the greatest positive influence on neighboring nodes and / or has the lowest similarity to each category center.

[0098] In one possible implementation, S430 may include: determining a positive influence score and a diversity score for each first node based on the embedding vector of each first node, wherein the positive influence score of each first node is used to indicate the positive influence of each first node on its neighboring nodes, and the diversity score of each first node is used to indicate the minimum distance between each first node and the center of each of the at least one category, and the distance between each first node and the center of at least one preset category; determining a comprehensive score for each first node based on the positive influence score and the diversity score of each first node; and determining the at least one target node from the plurality of first nodes based on the comprehensive score of each first node.

[0099] The classification method provided in this application combines the positive influence of each first node on its neighboring nodes (i.e., positive influence score) and the distance of each first node to the center of different categories (i.e., diversity score) to select at least one more valuable target node from multiple first nodes. Existing graph neural network models' active learning methods are based on clustering or feature distance measurement between nodes, which has high computational complexity. Therefore, the classification method provided in this application can reduce computational complexity and computational load.

[0100] S440. Based on the at least one target node, the attribute information of each target node in the at least one target node, the connection information between the at least one target node, the graph neural network model, and the second graph data, determine the classification result of the second node in the second graph data structure, wherein the second graph data includes multiple second nodes, the attribute information of each of the multiple second nodes, and the connection information between the multiple second nodes.

[0101] In one possible implementation, S440 may include: training the graph neural network model based on the at least one target node, the attribute information of each of the at least one target node, and the edge information between the at least one target node, to obtain the trained graph neural network model; and inputting the second graph data into the trained graph neural network model to obtain the classification result of each second node.

[0102] Optionally, training the graph neural network model based on the at least one target node, the attribute information of each of the at least one target node, and the edge information between the at least one target node to obtain the trained graph neural network model includes: training the graph neural network model based on the at least one target node, the attribute information of each of the at least one target node, the edge information between the at least one target node, and the annotation information of each target node to obtain the trained graph neural network model, wherein the annotation information of each target node is used to indicate the classification result obtained by manually annotating each target node.

[0103] The classification method provided in this application training method trains a graph neural network model based on the at least one target node, the attribute information of each target node, the edge information between the at least one target node, and the annotation information of each target node. That is, the graph neural network model is trained through supervised learning, which is beneficial to improving the model's learning efficiency, adaptability, and generalization ability.

[0104] Optionally, the method further includes: obtaining feedback information from the at least one first node, the feedback information being used to indicate the actual classification result of each target node; and updating the first graph data based on the feedback information from the at least one first node.

[0105] The classification method provided in this application improves the accuracy of the model by learning the graph neural network model based on the updated first graph data.

[0106] It should be noted that for the parts not described in detail in Method 400, please refer to the relevant descriptions in Method 300, which will not be repeated here.

[0107] The classification method provided in this application utilizes the embedding vector of a first node to select at least one target node from multiple first nodes that is more valuable for training the graph neural network model (i.e., has the greatest positive influence on neighboring nodes and / or the lowest similarity to the center of each category). This means excluding first nodes that may cause semantic confusion from the multiple first nodes. Based on the relevant information of this at least one target node, active learning is further performed to optimize the graph neural network model. Existing active learning methods for graph neural network models do not consider the semantic confusion problem of connected nodes. Therefore, the classification method provided in this application can reduce the impact of semantic confusion on the active learning of the graph neural network model, thereby improving the accuracy of node classification by the optimized graph neural network model. In other words, the classification method provided in this application can improve the accuracy of node classification by the graph neural network model with the same amount of annotation.

[0108] The above combination Figures 3 to 6 The classification method provided by the embodiments of this application has been introduced. The classification device provided by the embodiments of this application will be further described below.

[0109] Figure 7 A schematic diagram of the structure of a classification device 500 provided in an embodiment of this application is shown. The device 500 may include an acquisition unit 501 and a processing unit 502.

[0110] Optionally, the device 500 can be used in the system 200 described above. Further, the device 500 can be used in the classification device 220 in the system 200, such as a virtual device formed by software executed by a processor or controller on the classification device 220.

[0111] The acquisition unit 501 is used to acquire first graph data, which includes multiple first nodes, attribute information of each of the multiple first nodes, and edge information between the multiple first nodes. The multiple first nodes correspond to multiple users. The attribute information of each first node is used to describe the behavior and / or inherent characteristics of the user corresponding to each first node. The edge information between the multiple first nodes is used to describe the interaction between the multiple users corresponding to the multiple first nodes.

[0112] The processing unit 502 is used to input the first graph data acquired by the acquisition unit 501 into a graph neural network model to obtain the embedding vector of each first node. The graph neural network model is used to indicate the mapping relationship between the graph data and the embedding vectors of the nodes in the graph data. Based on the embedding vector of each first node, at least one target node is determined from the plurality of first nodes. The at least one target node is the first node with the greatest positive influence on its neighboring nodes and / or the lowest similarity to each category center. Based on the at least one target node, the attribute information of each target node, the edge information between the at least one target node, the graph neural network model, and the second graph data, the classification result of the second node in the second graph data structure is determined. The second graph data includes a plurality of second nodes, the attribute information of each second node, and the edge information between the plurality of second nodes.

[0113] In one possible implementation, the processing unit 502 is specifically configured to: determine the positive influence score and the diversity score of each first node based on the embedding vector of each first node, wherein the positive influence score of each first node is used to indicate the positive influence of each first node on its neighboring nodes, and the diversity score of each first node is used to indicate the minimum distance between each first node and the center of each of the at least one category, and the distance between each first node and the center of at least one preset category; determine the comprehensive score of each first node based on the positive influence score and the diversity score of each first node; and determine the at least one target node from the plurality of first nodes based on the comprehensive score of each first node.

[0114] In one possible implementation, the processing unit 502 is specifically used to: train the graph neural network model based on the at least one target node, the attribute information of each of the at least one target node and the edge information between the at least one target node, to obtain the trained graph neural network model; and input the second graph data into the trained graph neural network model to obtain the classification result of each second node.

[0115] In one possible implementation, the processing unit 502 is specifically used to: train the graph neural network model based on the at least one target node, the attribute information of each target node in the at least one target node, the edge information between the at least one target node and the annotation information of each target node, to obtain the trained graph neural network model, wherein the annotation information of each target node is used to indicate the classification result obtained by manually annotating each target node.

[0116] In one possible implementation, the acquisition unit 501 is further configured to acquire feedback information of the at least one first node, the feedback information being used to indicate the actual classification result of each target node; the processing unit 502 is further configured to update the first graph data based on the feedback information of the at least one first node.

[0117] It should be noted that the information interaction and execution process between the above-mentioned devices are based on the same concept as the method embodiments of this application. Their specific functions and technical effects can be found in the method embodiments section, and will not be repeated here. In an optional example, the device 500 may specifically be the classification device in the embodiments of method 300 or method 400 above. The device 500 can be used to execute the various processes and / or steps corresponding to the classification device in the embodiments of method 300 or method 400 above. To avoid repetition, these will not be described again here.

[0118] Figure 7One or more of the modules in the illustrated embodiments can be implemented by software, hardware, firmware, or a combination thereof. The software or firmware includes, but is not limited to, computer program instructions or code, and can be executed by a hardware processor. The hardware includes, but is not limited to, various integrated circuits, such as a central processing unit (CPU), a digital signal processor (DSP), a field-programmable gate array (FPGA), or an application-specific integrated circuit (ASIC).

[0119] Figure 8 A schematic block diagram of a classification device 600 provided in an embodiment of this application is shown. The device 600 may include a processor 601 and a communication interface 602, which are coupled together.

[0120] In an optional example, those skilled in the art will understand that the device 600 may specifically be the classification device in method 300 or method 400 described above, and the device 600 may be the physical hardware structure of the classification device 220. The classification device 600 may be used to execute the various processes and / or steps corresponding to the classification device in the embodiments of method 300 or method 400 described above, and will not be described again here to avoid repetition.

[0121] The processor 601 in this embodiment may include one or more processing units. Optionally, the processing unit may include, but is not limited to, a CPU, a general-purpose processor, a DSP, an ASIC, an FPGA, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor may be a microprocessor, a microcontroller, or any conventional processor.

[0122] For example, the processor 601 is used to acquire first graph data through the communication interface 602. The first graph data includes multiple first nodes, attribute information of each of the multiple first nodes, and edge information between the multiple first nodes. The multiple first nodes correspond to multiple users, the attribute information of each first node describes the behavior and / or inherent characteristics of the user corresponding to that first node, and the edge information between the multiple first nodes describes the interaction between the multiple users corresponding to the multiple first nodes. The processor 601 inputs the first graph data into a graph neural network model to obtain the embedding vector of each first node. The graph neural network model is used to indicate the relationship between the graph data and the embedding vectors of the nodes in the graph data. The mapping relationship is defined; based on the embedding vector of each first node, at least one target node is determined from the plurality of first nodes, the at least one target node being the first node with the greatest positive influence on neighboring nodes and / or the lowest similarity to each category center; based on the at least one target node, the attribute information of each target node, the edge information between the at least one target node, the graph neural network model, and the second graph data, the classification result of the second node in the second graph data structure is determined, the second graph data including a plurality of second nodes, the attribute information of each second node, and the edge information between the plurality of second nodes.

[0123] In an alternative example, those skilled in the art will understand that the device 600 can be the classification device described in the embodiments of method 300 or 400 above. The device 600 can be used to execute the various processes and / or steps corresponding to the classification device in the embodiments of method 300 or 400. To avoid repetition, it will not be described again here.

[0124] Optionally, the device 600 may also include a memory 603.

[0125] The memory 603 can be volatile memory or non-volatile memory, or may include both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DRRAM).

[0126] Specifically, memory 603 is used to store program code and instructions for the classification device. Optionally, memory 603 is also used to store data obtained by processor 601 during the execution of the above-described method 300 or 400 embodiments, such as the embedding vector of the first node.

[0127] Alternatively, the memory 603 may be a separate device or integrated into the processor 601.

[0128] It should be noted that, Figure 8 Only a simplified design of the device 600 is shown. In practical applications, the device 600 may also include other necessary components, including but not limited to any number of communication interfaces, processors, selectors, memories, etc., and all devices 600 that can implement this application are within the protection scope of this application.

[0129] In one possible design, the device 600 can be a chip. Optionally, the chip may further include one or more memories for storing computer-executable instructions, which, when the chip device is running, can be executed by a processor to cause the chip to perform the steps performed by the classification device described in methods 300 or 400 above.

[0130] Optionally, the chip device can be a field-programmable gate array, a dedicated integrated circuit, a system-on-a-chip, a central processing unit, a network processor, a digital signal processing circuit, a microcontroller, or a programmable controller or other integrated chip to implement the relevant functions.

[0131] This application embodiment also provides a terminal, which may include, for example, Figure 7 or Figure 8 The aforementioned classification device.

[0132] This application also provides a computer-readable storage medium storing computer instructions that, when executed on a computer, implement the classification method described in the above method embodiments.

[0133] This application also provides a computer program product that, when run on a processor, implements the classification method described in the above method embodiments.

[0134] The classification device, computer-readable storage medium, computer program product, or chip provided in the embodiments of this application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects described in the corresponding methods provided above, and will not be repeated here.

[0135] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0136] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0137] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0138] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0139] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0140] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0141] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0142] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A classification method, characterized in that, include: Acquire first graph data, which includes multiple first nodes, attribute information of each first node, and edge information between the multiple first nodes. The multiple first nodes correspond to multiple users. The attribute information of each first node is used to describe the behavior and / or inherent characteristics of the user corresponding to each first node. The edge information between the multiple first nodes is used to describe the interaction between the multiple users corresponding to the multiple first nodes. The first graph data is input into a graph neural network model to obtain the embedding vector of each first node. The graph neural network model is used to indicate the mapping relationship between the graph data and the embedding vectors of the nodes in the graph data. Based on the embedding vector of each first node, at least one target node is determined from the plurality of first nodes. The at least one target node is the first node among the plurality of first nodes that has the greatest positive influence on its neighboring nodes and the lowest similarity to each category center. Based on the at least one target node, the attribute information of each of the at least one target node, and the edge information between the at least one target node, the graph neural network model is trained to obtain the trained graph neural network model. The second graph data is input into the trained graph neural network model to obtain the classification result of each second node. The second graph data includes multiple second nodes, attribute information of each of the multiple second nodes, and edge information between the multiple second nodes.

2. The method according to claim 1, characterized in that, The step of determining at least one target node from the plurality of first nodes based on the embedding vector of each first node includes: Based on the embedding vector of each first node, a positive influence score and a diversity score of each first node are determined. The positive influence score of each first node is used to indicate the positive influence of each first node on its neighboring nodes, and the diversity score of each first node is used to indicate the minimum distance between each first node and the center of each of the at least one category, which is the distance between each first node and the center of at least one preset category. Based on the positive influence score and the diversity score of each first node, a comprehensive score is determined for each first node; Based on the comprehensive score of each first node, at least one target node is determined from the plurality of first nodes.

3. The method according to claim 1 or 2, characterized in that, The process of training the graph neural network model based on the at least one target node, the attribute information of each of the at least one target node, and the edge information between the at least one target node to obtain the trained graph neural network model includes: Based on the at least one target node, the attribute information of each target node, the edge information between the at least one target node, and the annotation information of each target node, the graph neural network model is trained to obtain the trained graph neural network model. The annotation information of each target node is used to indicate the classification result obtained by manually annotating each target node.

4. The method according to any one of claims 1-3, characterized in that, The method further includes: Obtain feedback information from at least one first node, the feedback information being used to indicate the actual classification result of each target node; The first graph data is updated based on the feedback information from at least one first node.

5. A sorting device, characterized in that, include: An acquisition unit is used to acquire first graph data, which includes multiple first nodes, attribute information of each of the multiple first nodes, and edge information between the multiple first nodes. The multiple first nodes correspond to multiple users, the attribute information of each first node is used to describe the behavior and / or inherent characteristics of the user corresponding to each first node, and the edge information between the multiple first nodes is used to describe the interaction between the multiple users corresponding to the multiple first nodes. The processing unit is configured to input the first graph data acquired by the acquisition unit into a graph neural network model to obtain the embedding vector of each first node. The graph neural network model is used to indicate the mapping relationship between the graph data and the embedding vectors of the nodes in the graph data. Based on the embedding vector of each first node, at least one target node is determined from the plurality of first nodes. The at least one target node is the first node among the plurality of first nodes that has the greatest positive influence on its neighboring nodes and the lowest similarity to each category center. Based on the at least one target node, the attribute information of each of the at least one target node, and the edge information between the at least one target node, the graph neural network model is trained to obtain a trained graph neural network model. The second graph data is input into the trained graph neural network model to obtain the classification result of each second node. The second graph data includes a plurality of second nodes, the attribute information of each of the plurality of second nodes, and the edge information between the plurality of second nodes.

6. The apparatus according to claim 5, characterized in that, The processing unit is specifically used for: Based on the embedding vector of each first node, a positive influence score and a diversity score of each first node are determined. The positive influence score of each first node is used to indicate the positive influence of each first node on its neighboring nodes, and the diversity score of each first node is used to indicate the minimum distance between each first node and the center of each of the at least one category, which is the distance between each first node and the center of at least one preset category. Based on the positive influence score and the diversity score of each first node, a comprehensive score is determined for each first node; Based on the comprehensive score of each first node, at least one target node is determined from the plurality of first nodes.

7. The apparatus according to claim 5 or 6, characterized in that, The processing unit is specifically used for: Based on the at least one target node, the attribute information of each target node, the edge information between the at least one target node, and the annotation information of each target node, the graph neural network model is trained to obtain the trained graph neural network model. The annotation information of each target node is used to indicate the classification result obtained by manually annotating each target node.

8. The apparatus according to any one of claims 5-7, characterized in that, The acquisition unit is further configured to acquire feedback information from the at least one first node, the feedback information being used to indicate the actual classification result of each target node; The processing unit is also used to update the first graph data based on the feedback information from the at least one first node.

9. A computer-readable storage medium for storing a computer program, characterized in that, The computer program includes instructions for implementing the method according to any one of claims 1 to 4.

10. A computer program product, the computer program product comprising instructions, characterized in that, When the instructions are executed on a computer or processor, the computer or processor performs the method of any one of claims 1 to 4.