Object classification method, device, electronic device and storage medium

Through semi-supervised learning models and graph neural networks, the feature extraction and edge weight adjustment of graph data are optimized, which solves the accuracy problem of graph data object classification and achieves efficient classification in the case of few labels.

CN115130554BActive Publication Date: 2025-09-09MASHANG CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210602732.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2025-09-09
Estimated Expiration
2042-05-30

AI Technical Summary

Technical Problem

Existing technologies lack accuracy when classifying objects based on graph data, especially when the number of classification labels is small, making it difficult to achieve accurate predictions.

Method used

A semi-supervised learning model is used to train the object classification model multiple times to generate the target adjacency matrix and adjust the graph edge weights, optimize the feature extraction in the object classification process, and use the graph neural network to learn node features and process association relationships.

Benefits of technology

The accuracy of object classification is improved, especially when the number of classification labels is small, and accurate prediction of the classified objects can be achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115130554B_ABST
    Figure CN115130554B_ABST
Patent Text Reader

Abstract

Embodiments of this specification provide object classification methods, devices, electronic devices, and storage media, wherein an object classification method includes: obtaining graph data of an object to be classified; generating a target adjacency matrix used for the i-th training based on the graph edge training information used for the i-1th training; inputting the target adjacency matrix and node features into an object classification model for classification prediction, obtaining the i-th loss function value and the i-th classification result corresponding to the i-th training, and adding the training loss function value corresponding to the i-th training to a training reference information set; if the i-th training meets the training end condition, determining the j-th training loss function value that meets the training requirements from the training reference information set, and determining the j-th classification result as the target classification of the object to be classified, thereby improving the accuracy of object classification using graph data without changing the relationship graph structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of graph data, and in particular to an object classification method, device, electronic device and storage medium. Background Art

[0002] A vast amount of graph data exists in real life, for example in social networks, e-commerce, and bioinformatics. Graph data consists of a collection of nodes and edges, and can be used to naturally represent multiple objects and the relationships between them. Graph data has a complex structure and contains a wealth of information. Graph data can be applied to object classification. Specifically, the information contained in graph data can be used to predict the classification labels corresponding to the nodes to be classified in the graph data. This allows the use of graph data to classify the objects represented by each node. Accurately classifying objects based on graph data in a specific field has become a hot topic in current research. Summary of the Invention

[0003] Embodiments of the present application provide an object classification method, apparatus, electronic device, and storage medium to improve the accuracy of object classification using graph data.

[0004] In a first aspect, an embodiment of the present application provides an object classification method, comprising:

[0005] Obtain graph data of the objects to be classified; the graph data includes a relationship graph of the objects to be classified consisting of multiple object nodes and multiple edges, and node features of each object node, where one object node corresponds to one object to be classified;

[0006] Generate a target adjacency matrix for the i-th training according to the graph edge training information used in the i-1-th training; the graph edge training information includes any one or more of the following: an initial adjacency matrix, graph edge parameters to be trained, and graph edge parameter adjustment rules; i is an integer greater than or equal to 1; the initial adjacency matrix is ​​constructed based on the connection relationships between the plurality of object nodes in the relationship graph;

[0007] Inputting the target adjacency matrix and the node features into an object classification model for classification prediction, obtaining an i-th loss function value and an i-th classification result corresponding to the i-th training, and adding the training loss function value corresponding to the i-th training to a training reference information set, wherein the training reference information set stores the loss function value and classification result corresponding to each training in multiple trainings;

[0008] If the i-th training meets the training end condition, the j-th training loss function value that meets the training requirements is determined from the training reference information set, and the j-th classification result is determined as the target classification of the object to be classified.

[0009] In a second aspect, an embodiment of the present application provides an object classification device, comprising:

[0010] An acquisition unit is configured to acquire graph data of the objects to be classified; the graph data includes a relationship graph of the objects to be classified consisting of a plurality of object nodes and a plurality of edges, and a node feature of each object, wherein one object node corresponds to one object to be classified;

[0011] a generating unit, configured to generate a target adjacency matrix used in the i-th training according to the graph edge training information used in the i-1-th training; the graph edge training information includes any one or more of the following: an initial adjacency matrix, graph edge parameters to be trained, and graph edge parameter adjustment rules; i is an integer greater than or equal to 1; the initial adjacency matrix is ​​constructed based on the connection relationships between the plurality of object nodes in the relationship graph;

[0012] a prediction unit, configured to input the target adjacency matrix and the node features into an object classification model for classification prediction, obtain an i-th loss function value and an i-th classification result corresponding to the i-th training, and add the training loss function value corresponding to the i-th training to a training reference information set, wherein the training reference information set stores the loss function value and classification result corresponding to each training in multiple training sessions;

[0013] The first determination unit is used to determine the jth training loss function value that meets the training requirements from the training reference information set if the i-th training meets the training end condition, and determine the j-th classification result as the target classification of the object to be classified.

[0014] In a third aspect, an embodiment of the present application provides an electronic device comprising: a processor; and a memory configured to store computer-executable instructions, wherein the computer-executable instructions, when executed, cause the processor to execute the object classification method described in the first aspect.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium for storing computer-executable instructions, which, when executed by a processor, implement the object classification method as described in the first aspect.

[0016] It can be seen that in an embodiment of the present application, when it is necessary to classify an object to be classified, the graph data of the object to be classified must first be obtained; the graph data includes a relationship graph of the object to be classified consisting of multiple object nodes and multiple edges, as well as node features of each object node; further, based on the graph edge training information used for the i-1th training, the target adjacency matrix used for the i-th training is generated; the graph edge training information includes any one or more of the following: an initial adjacency matrix, graph edge parameters to be trained, and graph edge parameter adjustment rules; i is an integer greater than or equal to 1; the initial adjacency matrix is ​​constructed based on the connection relationship between multiple object nodes in the relationship graph; the target adjacency matrix and node features are input into the object classification model for classification prediction, and the i-th loss function value and the i-th classification result corresponding to the i-th training are obtained, and the training loss function value corresponding to the i-th training is added to the training reference information set, which stores the loss function value and classification result corresponding to each training in multiple trainings; if the i-th training meets the training end condition, the j-th training loss function value that meets the training requirements is determined from the training reference information set, and the j-th classification result is determined as the target classification of the object to be classified. In this way, the object classification model is trained multiple times based on the acquired graph data of the object to be classified, wherein the target adjacency matrix used in the i-th training, which can reflect the graph edge weights of the relationship graph, is generated based on the graph edge training information used in the i-1-th training. Therefore, without changing the structure of the relationship graph, the weights of each edge in the relationship graph are adjusted through training, thereby optimizing the target adjacency matrix used to assist in node feature extraction in the object classification process, thereby optimizing the feature extraction effect of the object classification model on the relationship graph, and improving the accuracy of object classification using graph data. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments described in this specification. Those skilled in the art can also derive other drawings based on these drawings without inventive work.

[0018] Figure 1 A processing flow chart of an object classification method provided in an embodiment of the present application;

[0019] Figure 2 A relationship diagram of objects to be classified provided in an embodiment of the present application;

[0020] Figure 3 A schematic diagram of a network architecture of an object classification model provided in an embodiment of the present application;

[0021] Figure 4A schematic diagram of the application of the object classification model in the commodity classification scenario provided by the embodiment of the present application;

[0022] Figure 5 A schematic diagram of an application of an object classification model provided in an embodiment of the present application;

[0023] Figure 6 A schematic diagram of an object classification device provided in an embodiment of the present application;

[0024] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0026] In real life, graph data is widely used in fields such as social networks, e-commerce, and bioinformatics. Graph data can include a relationship graph consisting of multiple nodes and multiple edges. Graph data has a complex structure and contains rich information, which can be used to predict the classification labels corresponding to the nodes to be classified in the graph data. In this way, graph data can be used to classify the objects to be classified represented by each node to be classified. However, with the development of science and technology, people have put forward higher requirements for the accuracy of object classification based on graph data. To this end, an embodiment of the present application provides an object classification method.

[0027] Figure 1 A processing flow chart of an object classification method provided in an embodiment of the present application. Figure 1 The object classification method can be executed by an electronic device, which can be a terminal device, such as a mobile phone, a laptop computer, an intelligent interactive device, etc.; or, the electronic device can also be a server, such as an independent physical server, a server cluster, or a cloud server capable of cloud computing. Figure 1 The object classification method provided in this embodiment specifically includes steps S102 to S106:

[0028] Step S102 , obtaining graph data of the objects to be classified; the graph data includes a relationship graph of the objects to be classified consisting of multiple object nodes and multiple edges, as well as node features of each object node, where one object node corresponds to one object to be classified.

[0029] The object to be classified can be a person or object, such as a product or article. In a relationship graph of objects to be classified, consisting of multiple object nodes and multiple edges, each object node corresponds to an object to be classified. Any two object nodes may be connected by an edge or not at all. The node features of an object node can be characteristic parameters of the object to be classified corresponding to that object node. These node features can be represented in the form of a multidimensional matrix.

[0030] The multiple object nodes may include multiple label nodes and multiple unlabel nodes. A label node may be an object node that carries a classification label; an unlabel node may be an object node that does not carry a classification label. For each label node, the classification label carried by the label node may be the actual classification result of an object to be classified corresponding to the label node. In this case, the actual classification result of each label node is known, and the actual classification result of each unlabel node is unknown. For a relationship graph of an object to be classified, the label nodes included in the relationship graph can be regarded as a training set in the model training process, and the unlabel nodes can be regarded as a test set in the model training process.

[0031] It is important to note that for any object to be classified, during model training, the relationship graph in any graph data includes both labeled nodes that can be used as a training set and unlabeled nodes that can be used as a test set. The graph data also includes the node features of each labeled node and the node features of each unlabeled node.

[0032] The number of labeled nodes can be greater than the number of unlabeled nodes, or less than or equal to the number of unlabeled nodes. For example, the relationship graph of the objects to be classified includes 100 nodes, of which 30 are labeled nodes and 70 are unlabeled nodes.

[0033] For example, the relationship diagram of the objects to be classified can refer to Figure 2 . Figure 2 A relationship diagram of objects to be classified provided in an embodiment of the present application.

[0034] like Figure 2 As shown, assuming that the number of objects to be classified is 7, Figure 2 The relationship diagram shown includes 7 object nodes corresponding to the 7 objects to be classified. The connecting lines between different object nodes are edges in the relationship diagram. For easy distinction, the labeled node 2011 and the labeled node 2012 are represented by black solid circles, and the unlabeled nodes 2021, 2022, 2023, 2024, and 2025 are represented by hollow circles. Figure 2 The relationship diagram shown includes two labeled nodes and five unlabeled nodes.

[0035] like Figure 2 As shown, labeled node 2011 and labeled node 2012 are connected by edge 2031; labeled node 2011 and unlabeled node 2021 are connected by edge 2032; labeled node 2012 and unlabeled node 2023 are connected by edge 2033; unlabeled node 2023 and unlabeled node 2024 are connected by edge 2034; unlabeled node 2023 and unlabeled node 2025 are connected by edge 2035; unlabeled node 2021 and unlabeled node 2022 are connected by edge 2036.

[0036] Object nodes can be connected by edges or not at all. The edges in the relationship graph of objects to be classified can be constructed based on the associations between the objects to be classified. Specifically, if there is a certain association between two objects to be classified, then an edge must be established between the object nodes corresponding to the two objects to be classified; conversely, if there is no certain association between the two objects to be classified, then no edge is required between the object nodes corresponding to the two objects to be classified.

[0037] In one embodiment, the association relationship between two objects to be classified may mean that the two objects to be classified have a common feature, which is at least one of the N pre-configured association features.

[0038] For example, if the objects to be classified are articles, each object node corresponds to an article. For any two articles, if they cite the same dataset, then they are determined to be associated with each other, and the object nodes corresponding to the two articles are connected by an edge. Object node 1 corresponds to article 1, object node 2 corresponds to article 2, and object node 3 corresponds to article 3. Articles 1 and 2 both cite dataset A, and both articles 1 and 3 cite dataset B. Then object nodes 1 and 2 are connected by edge 1, and object nodes 1 and 3 are connected by edge 2.

[0039] For another example, the objects to be classified are commodities. If two commodities belong to the same brand, then a first association relationship exists between the two commodities; if the two commodities have the same purpose, then a second association relationship exists between the two commodities; if the two commodities have the same place of origin, then a third association relationship exists between the two commodities. In specific implementation, the construction rules of the relationship graph of object nodes can be pre-configured as follows: if at least one of the first association relationship, the second association relationship, and the third association relationship exists between two commodities, then the two object nodes corresponding to the two commodities are connected by an edge; if at least one of the first association relationship, the second association relationship, and the third association relationship does not exist between the two commodities, then there is no connection relationship between the two object nodes corresponding to the two commodities.

[0040] In another embodiment, the existence of an association relationship between two objects to be classified may mean that the similarity of the same features of the two objects to be classified is less than or equal to a preset similarity threshold.

[0041] For example, let's assume the objects to be classified are news reports, and each object node corresponds to a news report. For any two news reports, if the text similarity between the two reports is greater than or equal to a preset similarity threshold, then the object nodes corresponding to the two reports are determined to be connected by an edge. For example, object node 1 corresponds to news report 1, object node 2 corresponds to news report 2, and object node 3 corresponds to news report 3. The preset similarity threshold is 80%, the text similarity between news reports 1 and 2 is 89%, the text similarity between news reports 2 and 3 is 82%, and the text similarity between news reports 1 and 3 is 69%. Therefore, object nodes 1 and 2 are connected by edge 1, object nodes 2 and 3 are connected by edge 2, and there is no connection between object nodes 1 and 3.

[0042] In another embodiment, the association relationship between two objects to be classified can also mean that the two objects to be classified have a certain inclusion relationship or a subordinate relationship. For example, if one object to be classified is unit A and the other object to be classified is an employee working at unit A, then there is also an association relationship between the two objects to be classified. In the relationship graph, an edge will exist between the object nodes corresponding to these two objects.

[0043] Optionally, the objects to be classified include commodities; the object nodes include commodity nodes; the node features of the object nodes include at least one of the weight, brand, price and sales volume of the commodities; and the commodity relationship graph is constructed based on the similarity between the commodity categories to which each commodity node belongs.

[0044] For example, a product relationship graph includes 100 product nodes, each corresponding to a product. The node features of each product node include the brand and price of the product to which it corresponds. For any two products, if the similarity between their product categories exceeds a preset similarity threshold of 70%, the product nodes corresponding to the two products are determined to be connected by an edge.

[0045] The 100 product nodes include 30 labeled nodes and 70 unlabeled nodes. Any labeled node carries a purchase history tag, which includes two categories: the first category indicates that the user has purchased the product, and the second category indicates that the user has not purchased the product. Any unlabeled node does not carry a purchase history tag. Step S104: Generate the target adjacency matrix for the i-th training run based on the graph edge training information used in the i-1-th training run.

[0046] It should be noted that the object classification model provided in the embodiment of the present application is a semi-supervised learning model, which performs model training and model testing simultaneously, thereby achieving accurate prediction of the object classification results of the objects to be classified when the number of classification labels is small.

[0047] Specifically, this object classification model does not first train the model multiple times based on multiple sample data until a training stop condition is met, then determine the model obtained from the last training as the trained model, and then use the trained model to predict test data that is different from the sample data. Instead, it trains the model multiple times on the same graph data that includes both sample data and test data, and the training sample data and the test data are tested simultaneously.

[0048] For example, the 100 object nodes included in the graph data may include 20 labeled nodes and 80 unlabeled nodes, where the 20 labeled nodes are sample data and the 80 unlabeled nodes are test data. If the actual classification results of the 20 labeled nodes are known, each labeled node can be used for model training; if the actual classification results of the 80 unlabeled nodes are unknown, each unlabeled node can be used for model testing. The i-th classification result obtained through the i-th training includes both the i-th classification prediction labels of the 20 node labels and the i-th classification prediction labels of the 80 unlabeled nodes.

[0049] The i-1th training may be the i-1th model training of an object classification model provided in an embodiment of the present application, where i is an integer greater than or equal to 1. The object classification model may be a graph neural network model including multiple convolutional layers. The number of convolutional layers included in the object classification model may be greater than a preset number threshold. The preset number threshold may be 3 or another preset natural number greater than 3.

[0050] GCN (Graph Convolutional Network) is often used for graph data processing. GCN can learn both node representations and the relationships between nodes, effectively completing graph data processing tasks on irregularly structured graphs, such as node classification.

[0051] In the classic GCN network, a convolutional layer (GCNConv) is equivalent to aggregating features from first-order neighboring nodes. If the network structure of a GCN-based graph data processing model is too deep, it can easily lead to over-smoothing. An overly deep network structure can mean that the number of convolutional layers included in the graph data processing model is greater than or equal to a preset threshold.

[0052] Each convolutional layer can be regarded as a low-pass filter. Each convolutional layer can make the signal passing through it smoother. If the number of convolutional layers connected in sequence is greater than the preset threshold, it may cause the signal to tend to be consistent, lose the diversity of node features, reduce the feature extraction effect of each convolutional layer, and affect the model performance.

[0053] However, in some graph data processing, it is necessary to use multiple convolutional layers connected in sequence, such as graph classification tasks. By setting up multiple convolutional layers connected in sequence, the aggregation radius can be increased, thereby obtaining more complete full-graph information, which is conducive to improving the accuracy of classification tasks.

[0054] The target adjacency matrix used in the i-th training is generated based on the graph edge training information used in the i-1th training. The generated target adjacency matrix can reflect the graph edge weights of the relationship graph in the i-th training. It can also be used to assist the various convolutional layers in the object classification model in the i-th training to extract node features, maintain the diversity of node features, avoid signals tending to be consistent, improve the feature extraction effect of each convolutional layer, and help improve the accuracy of classification.

[0055] The following can be combined with formula (1) to specifically illustrate how to generate the target adjacency matrix used in the i-th training. In the following, A' is used to represent the target adjacency matrix.

[0056] A'=softmax(A0*W0) (1)

[0057] In formula (1), * represents element multiplication, and the graph edge parameter matrix W0∈R V×V It follows a uniform distribution. W0 is composed of multiple graph edge parameters to be trained. V represents the number of object nodes in the relationship graph. The softmax function, also known as the normalized exponential function, is used to map the outputs of multiple neurons to the interval (0, 1). A0 is the initial adjacency matrix constructed, with 0 or 1 representing node connectivity.

[0058] For example, W0 is a 2x2 matrix, and the number of graph edge parameters to be trained is 4, and the 4 graph edge parameters are a1, a2, a3, and a4 respectively.

[0059] The initial adjacency matrix can be constructed based on the connection relationships between multiple object nodes in the relationship graph. In a specific implementation, if an edge exists between any two object nodes in the relationship graph, it is marked as 1, and if no edge exists between any two object nodes, it is marked as 0, thereby reflecting the connection relationships between the various object nodes in the form of a matrix.

[0060] For example, the relationship graph may include three object nodes, namely, object node 1, object node 2, and object node 3, and object node 1 is connected to object node 2 and object node 3, respectively. Then, a 3x3 initial adjacency matrix A0 can be constructed to reflect the connection relationship between the object nodes, as shown below:

[0061]

[0062] In A0, the three rows from top to bottom correspond to object node 1, object node 2, and object node 3, respectively, and the three columns from left to right correspond to object node 1, object node 2, and object node 3, respectively.

[0063] Each object node cannot connect to itself, so the elements in the first row and first column, the second row and second column, and the third row and third column are "0" by default.

[0064] The element "1" in the second column of the first row indicates that object node 1 is connected to object node 2; the element "1" in the third column of the first row indicates that object node 1 is connected to object node 3; the element "1" in the first column of the second row indicates that object node 2 is connected to object node 1; the element "0" in the third column of the second row indicates that object node 2 is not connected to object node 3; the element "1" in the first column of the third row indicates that object node 3 is connected to object node 1; the element "0" in the second column of the third row indicates that object node 3 is not connected to object node 2.

[0065] In the process of multiple training of the object classification model, each training is based on the same graph data. Therefore, the structure of the relationship graph is fixed. Furthermore, the value of the initial adjacency matrix A0 constructed based on the connection relationship between multiple object nodes in the relationship graph remains unchanged.

[0066] The values ​​of the graph edge parameters used in the i-th training can be determined by the graph edge training information used in the i-1-th training. Furthermore, the values ​​of the graph edge parameter matrix W0 used in the i-th training can be determined. After determining the values ​​of the graph edge parameter matrix W0 used in the i-th training, the fixed initial adjacency matrix A0 and the graph edge parameter matrix W0 used in the i-th training can be substituted into formula (1).

[0067] First, the initial adjacency matrix A0 is multiplied by the graph edge parameter matrix W0 used in the i-th training to obtain the first matrix; secondly, the first matrix obtained by element multiplication is input into the softmax function for mapping processing to obtain the target adjacency matrix A' used in the i-th training.

[0068] Since the softmax function can map each element in the first matrix to the interval (0, 1), the mapping process can also be regarded as a normalization process.

[0069] In a specific implementation, the initial graph edge parameters may be pre-stored. The values ​​of the initial graph edge parameters may be random values ​​within a preset value range, for example, random values ​​within the interval [0, 1].

[0070] The graph edge parameter adjustment rule can be configured as follows: when i=1, read the pre-stored initial graph edge parameters; when i>1, adjust the graph edge parameters used in the i-1th training according to the preset adjustment rule to obtain the graph edge parameters used in the i-th training.

[0071] Optionally, if i is equal to 1, the graph edge training information used for the i-1th training includes the initial adjacency matrix and the graph edge parameter adjustment rules. According to the graph edge training information used for the i-1th training, the target adjacency matrix used for the i-th training is generated, including: reading the initial graph edge parameters from the graph edge parameter adjustment rules; adjusting the initial adjacency matrix according to the initial graph edge parameters, and using the adjusted initial adjacency matrix as the target adjacency matrix used for the i-th training.

[0072] If i equals 1, there is no zero-th training run. In practice, it can be pre-configured that when i = 1, the graph edge training information used for the i-1th training run includes the initial adjacency matrix and graph edge parameter adjustment rules. Then, according to the pre-configured graph edge parameter adjustment rules, when i = 1, the pre-stored initial graph edge parameters are read to determine the value of the graph edge parameter matrix W0 used for the first training run.

[0073] For example, the graph edge parameter matrix The pre-stored initial edge parameters read include: a1 = 0.5, a2 = 0.5, a3 = 0.5, a4 = 0.5, then the edge parameter matrix used in the first training is

[0074] The graph edge training information used in the first training includes the initial adjacency matrix A0.

[0075] The initial adjacency matrix is ​​adjusted according to the initial graph edge parameters, and the adjusted initial adjacency matrix is ​​used as the target adjacency matrix used in the first training. This can be achieved by adjusting the graph edge weights of the relationship graph corresponding to the initial adjacency matrix according to the graph edge weights as shown by the initial graph edge parameters to obtain the adjusted initial adjacency matrix. Each element in the adjusted initial adjacency matrix can reflect the adjusted graph edge weights of the relationship graph, and the adjusted initial adjacency matrix is ​​determined as the target adjacency matrix used in the first training.

[0076] In a specific implementation, the graph edge parameter matrix W0 used in the first training and the initial adjacency matrix A0 determined by the initial graph edge parameters are substituted into formula (1): the graph edge parameter matrix W0 used in the first training and the initial adjacency matrix A0 are element-wise multiplied to obtain a first matrix, and the first matrix is ​​input into the softmax function for mapping processing to obtain the value of the target adjacency matrix A' used in the first training.

[0077] Optionally, if i is greater than 1, the graph edge training information used for the i-1th training includes the initial adjacency matrix, the graph edge parameters to be trained, and the graph edge parameter adjustment rules. According to the graph edge training information used for the i-1th training, the target adjacency matrix used for the i-th training is generated, including: adjusting the graph edge parameters to be trained according to the graph edge parameter adjustment rules to obtain adjusted graph edge parameters; adjusting the initial adjacency matrix according to the adjusted graph edge parameters, and using the adjusted initial adjacency matrix as the target adjacency matrix used for the i-th training.

[0078] If i is greater than 1, the graph edge training information used in the (i-1)th training may include the initial adjacency matrix, the graph edge parameters to be trained, and the graph edge parameter adjustment rules. The graph edge parameters to be trained may be the graph edge parameters used in the (i-1)th training.

[0079] Specifically, if i=2, the i-1th training is the first training, and the graph edge parameters used in the first training are the graph edge parameter matrix used in the first training determined by the initial graph edge parameters.

[0080] If i>2, then the i-1th training can be the 2nd training, the 3rd training... the xth training, and so on (x is a natural number greater than 1). The graph edge parameters used in the i-1th training are the graph edge parameters used in the i-2nd training adjusted during the i-1th training, and the adjusted graph edge parameters are obtained.

[0081] For example, the graph edge parameter matrix used in the first training When i=2, the graph edge training information used in the first training includes the initial adjacency matrix, the graph edge parameter matrix used in the first training And the graph edge parameter adjustment rules.

[0082] For example, in the second training, the edge parameter matrix used in the first training is adjusted according to the edge parameter adjustment rule. Adjust to get the adjusted graph edge parameter matrix The adjusted edge parameter matrix is ​​determined as the edge parameter matrix used in the second training. Then, in the third training, the edge parameter matrix used in the second training is adjusted according to the edge parameter adjustment rule. Adjust to get the adjusted graph edge parameter matrix The adjusted graph-edge parameter matrix is ​​determined as the graph-edge parameter matrix used in the third training, and so on.

[0083] The graph edge parameter adjustment rule may include a preset adjustment rule. For example, the preset adjustment rule may be to calculate the graph edge parameters used in the i-th training by increasing or decreasing the preset values ​​of the graph edge parameters used in the i-1th training. Alternatively, the preset adjustment rule may be to adjust the graph edge parameters used in the i-1th training based on the loss function value corresponding to the i-1th training of the object classification model to determine the graph edge parameters used in the i-1th training.

[0084] When i is greater than 1, the graph edge parameters to be trained are adjusted according to the graph edge parameter adjustment rules to obtain the adjusted graph edge parameters. This can be achieved by adjusting the various graph edge parameters used in the i-1th training according to the preset adjustment rules to obtain the various graph edge parameters used in the i-th training, so as to determine the graph edge parameter matrix W0 used in the i-th training.

[0085] The initial adjacency matrix is ​​adjusted according to the adjusted graph edge parameters, and the adjusted initial adjacency matrix is ​​used as the target adjacency matrix used in the i-th training. This can be achieved by adjusting the graph edge weights of the relationship graph corresponding to the initial adjacency matrix according to the graph edge weights shown by the adjusted graph edge parameters to obtain the adjusted initial adjacency matrix. Each element in the adjusted initial adjacency matrix can reflect the adjusted graph edge weights of the relationship graph, and the adjusted initial adjacency matrix is ​​determined as the target adjacency matrix used in the i-th training.

[0086] In a specific implementation, the graph edge parameter matrix W0 and the initial adjacency matrix A0 used in the i-th training are substituted into formula (1): the graph edge parameter matrix W0 and the initial adjacency matrix A0 used in the i-th training are element-wise multiplied to obtain a first matrix, and the first matrix is ​​input into the softmax function for mapping processing to obtain the value of the target adjacency matrix A' used in the i-th training.

[0087] In step S106, the target adjacency matrix and node features are input into the object classification model for classification prediction, and the i-th loss function value and the i-th classification result corresponding to the i-th training are obtained. The training loss function value corresponding to the i-th training is added to the training reference information set, and the training reference information set stores the loss function value and classification result corresponding to each training in multiple trainings.

[0088] During the i-th training, the target adjacency matrix A' used in the i-th training and the node features in the graph data are input into the object classification model for classification prediction, and the i-th loss function value and the i-th classification result corresponding to the i-th training are obtained.

[0089] Since the graph data used to train the object classification model is the same graph data, the node features input into the object classification model in each training are fixed, while the target adjacency matrix A' will keep changing.

[0090] The classification prediction label of each labeled node may be the same as or different from the classification label carried by the labeled node. Each unlabeled node does not carry a classification label.

[0091] The i-th classification result includes the classification prediction label of each labeled node in the relationship graph and the classification prediction label of each unlabeled node. For example, the actual label carried by labeled node 1 is x1, and the corresponding classification prediction label is x1. The actual label carried by labeled node 2 is x2, and the corresponding classification prediction label is x3. The classification prediction label of unlabeled node 1 is x1, the classification prediction label of unlabeled node 2 is x2, the classification prediction label of unlabeled node 3 is x3, and so on.

[0092] Specifically, for example, the object to be classified is an article page of a creative app, and each article page is configured with a like control. The label node carries an x1 label to indicate that the user has liked the corresponding article page, or an x2 label to indicate that the user has not liked the corresponding article page. The classification results of each unlabeled node may be an x1 label, an x2 label, or other preset labels.

[0093] If the classification result of the unlabeled node is the x1 label, it means that the object classification model predicts yes for whether the user will like the corresponding article page. It can be inferred that the user may be interested in the article page, and the article can be pushed based on this; if the classification result of the unlabeled node is the x2 label, it means that the object classification model predicts no for whether the user will like the corresponding article page. It can be inferred that the user is unlikely to be interested in the article page, and there is no need to push the corresponding article to the user.

[0094] After the i-th training, the loss function value and classification result corresponding to the i-th training may be added to the training reference information set.

[0095] Optionally, the object classification model includes multiple convolutional layers connected in sequence, and the target adjacency matrix and node features are input into the object classification model for classification prediction to obtain the i-th loss function value corresponding to the i-th training and the i-th classification result, including: inputting the target adjacency matrix and node features into each convolutional layer in sequence, performing convolution operations in sequence based on the convolution parameters of each convolutional layer, obtaining the i-th loss function value corresponding to the i-th training and determining the i-th classification result.

[0096] The number of convolutional layers included in the object classification model can be greater than or equal to a preset number threshold. It should be understood that using more convolutional layers to process the relationship graph can continuously increase the aggregation radius, thereby obtaining more complete full-graph information and improving the accuracy of object classification.

[0097] The convolution parameters of each convolution layer are the parameters to be trained. The convolution parameters of each convolution layer used in the i-th training can be adjusted under the drive of the i-1th loss function value corresponding to the i-1th training, that is, the adjustment direction and adjustment value of the convolution parameters of each convolution layer used in the i-th training can be determined according to the i-1th loss function value.

[0098] During the i-th training process, the target adjacency matrix A' and the node feature input used in the i-th training are input into each convolutional layer in sequence, so as to perform convolution operations in sequence based on the convolution parameters of each convolutional layer used in the i-th training, obtain the i-th loss function value corresponding to the i-th training, and determine the i-th classification result.

[0099] Optionally, at least one intermediate convolution layer includes a first intermediate convolution layer and a second intermediate convolution layer; determining the i-th classification result includes: using the initial convolution layer, based on the convolution parameters of the initial convolution layer, performing a convolution operation on the target adjacency matrix and the node features to obtain the output result of the initial convolution layer; using the first intermediate convolution layer to perform a convolution operation on the target adjacency matrix and the output result of the initial convolution layer based on the convolution parameters of the first intermediate convolution layer to obtain a first intermediate vector; performing residual calculation processing on the output result of the initial convolution layer and the first intermediate vector to obtain the output result of the first intermediate convolution layer; using the second intermediate convolution layer to perform a convolution operation on the target adjacency matrix and the output result of the first intermediate convolution layer based on the convolution parameters of the second intermediate convolution layer to obtain a second intermediate vector; performing residual calculation processing on the output result of the first intermediate convolution layer and the second intermediate vector to obtain the output result of the second intermediate convolution layer; using the last convolution layer to perform a convolution operation on the target adjacency matrix and the output result of the second intermediate convolution layer based on the convolution parameters of the last convolution layer to obtain the i-th classification result.

[0100] The following can be combined Figure 3 Together, they explain how the object classification model determines the i-th classification result. Figure 3 A schematic diagram of the network architecture of an object classification model provided in an embodiment of the present application.

[0101] like Figure 3 As shown, the object classification model includes an initial convolutional layer 302, an intermediate convolutional layer 1 (i.e. Figure 3 The intermediate convolution layer 304 in the Figure 3 ), and the final convolutional layer 308. n can be a natural number greater than or equal to 1. Ellipses are used to indicate multiple convolutional layers that are not shown.

[0102] In the case of n=1, at least one intermediate convolutional layer only includes the intermediate convolutional layer 1, that is, the initial convolutional layer 302, the intermediate convolutional layer 1 and the final convolutional layer 308 are connected in sequence.

[0103] When n=2, at least one intermediate convolutional layer includes intermediate convolutional layer 1 and intermediate convolutional layer 2, that is, the initial convolutional layer 302, intermediate convolutional layer 1, intermediate convolutional layer 2 and the final convolutional layer 308 are connected in sequence.

[0104] When n>2, at least one intermediate convolutional layer includes intermediate convolutional layer 1 and intermediate convolutional layer 2...intermediate convolutional layer n and the final convolutional layer 308, that is, the initial convolutional layer 302, intermediate convolutional layer 1, intermediate convolutional layer 2...intermediate convolutional layer n and the final convolutional layer 308 are connected in sequence.

[0105] like Figure 3As shown, the input value of the object classification model is the graph data after graph edge weight initialization. Graph edge weight initialization refers to the generation of the target adjacency matrix used in the i-th training through the aforementioned step S104. The graph data after graph edge weight initialization can include node features in the graph data and the target adjacency matrix used in the i-th training. The output value of the object classification model is the classification result corresponding to the i-th training. Figure 3 The content in the dotted box on the right is used to magnify the content in the dotted box on the left, which can be regarded as being used to magnify a part of the middle convolutional layer.

[0106] exist Figure 3 In the dotted box on the right, Used to represent residual calculation processing, such as Figure 3 As shown, residual calculation processing is performed on the input and output values ​​of the intermediate convolution layer 1, and residual calculation processing is performed on the input and output values ​​of the intermediate convolution layer 2. The normalization and residual calculation processing will be specifically described in the following formulas and will not be repeated here.

[0107] The initial convolutional layer is used to perform a convolution operation on the target adjacency matrix and the node features based on the convolution parameters of the initial convolutional layer to obtain the output of the initial convolutional layer. In a specific implementation, the node features, the target adjacency matrix, and the convolutional layer parameter matrix of the initial convolutional layer can be multiplied in sequence to calculate a first product; the first product is input into the activation function of the initial convolutional layer for activation processing to generate the output of the initial convolutional layer.

[0108] The convolution calculation process of the initial convolution layer can be specifically described below in combination with formulas (2)-(4).

[0109] Z (l+1) =GCN(A, X (l) )=σ(AX (l) W (l+1) ) (2)

[0110]

[0111] The above formula (2) is the general calculation formula of the convolution layer. When l is greater than 0, X (l) Used to represent the output result of the lth layer; when l is equal to 0, X (0) It is used to represent the initial input value, which is determined by the input value of the object classification model. l represents the number of layers, for example, the number of layers of the initial convolutional layer is l = 1, the number of layers of the first intermediate convolutional layer is l = 2, the number of layers of the second intermediate convolutional layer is l = 3, and the number of layers of the final convolutional layer is l = 4. σ is the activation function. A∈R V×V Represents the normalized adjacency matrix. W∈R C×FIs the convolution layer parameter matrix, used to represent the convolution parameters to be trained, W can be used to perform affine transformation on X, X∈R V×C is the input vector of the convolutional layer, Z∈R V×F is the output vector of the convolutional layer. V represents the number of object nodes in the relationship graph, C represents the input dimension, and F represents the output dimension. The input dimension C can be determined by the node features of each object node in the graph data.

[0112] The normalized adjacency matrix may be obtained by converting each element in the adjacency matrix into a value between 0 and 1 through normalization.

[0113] The above formula (3) is the calculation formula of the initial convolution layer, which can be regarded as a specific application of formula (2). Specifically, the number of layers l is set to 0, and the initial input value X is (0) is the node feature of each object node in the graph data. The input value of the initial convolution layer includes the target adjacency matrix A' and the initial input value X (0) .

[0114] Combining formula (2) and formula (3), we can infer:

[0115]

[0116] In formula (4), is the output of the initial convolutional layer, A' is the aforementioned target adjacency matrix, X (0) is the initial node feature matrix composed of the node features of each object node in the graph data, W (1) is the convolutional layer parameter matrix of the initial convolutional layer, and σ is the activation function of the initial convolutional layer.

[0117] Based on formula (4), the node features and the target adjacency matrix A' are input into the activation function of the initial convolutional layer to perform activation processing based on the first product, and the output result of the initial convolutional layer is output. The first product is calculated by multiplying the node features with the target adjacency matrix A' and the convolutional layer parameter matrix of the initial convolutional layer.

[0118] A first intermediate convolution layer is used to perform a convolution operation on the target adjacency matrix and the output result of the initial convolution layer based on the convolution parameters of the first intermediate convolution layer to obtain a first intermediate vector; a residual calculation is performed on the output result of the initial convolution layer and the first intermediate vector to obtain the output result of the first intermediate convolution layer. In a specific implementation, the output result of the initial convolution layer, the target adjacency matrix, and the convolution layer parameter matrix of the first intermediate convolution layer are multiplied in sequence to obtain a second product; the second product is input into the activation function of the first intermediate convolution layer for activation processing to generate an activated second product, and the activated second product is determined as the first intermediate vector; a residual calculation is performed on the output result of the initial convolution layer and the first intermediate vector to obtain the output result of the first intermediate convolution layer.

[0119] The calculation process of performing a convolution operation on the target adjacency matrix and the output of the initial convolution layer based on the convolution parameters of the first intermediate convolution layer is similar to the calculation process of the convolution operation of the initial convolution layer. Refer to the aforementioned formula (4). The only difference is that the input values ​​of the initial convolution layer include node features and the target adjacency matrix, while the input values ​​of the first intermediate convolution layer include the output of the initial convolution layer and the target adjacency matrix. The residual processing calculation process is specifically described in the following formula and will not be repeated here.

[0120] The second intermediate convolution layer is used to perform a convolution operation on the target adjacency matrix and the output result of the first intermediate convolution layer based on the convolution parameters of the second intermediate convolution layer to obtain a second intermediate vector; the output result of the first intermediate convolution layer and the second intermediate vector are subjected to residual calculation processing to obtain the output result of the second intermediate convolution layer. In a specific implementation, the output result of the first intermediate convolution layer, the target adjacency matrix, and the convolution layer parameter matrix of the second intermediate convolution layer are multiplied in sequence to obtain a third product; the third product is input into the activation function of the second intermediate convolution layer for activation processing to generate the activated third product, and the activated third product is determined as the second intermediate vector; the output result of the first intermediate convolution layer and the second intermediate vector are subjected to residual calculation processing to obtain the output result of the second intermediate convolution layer.

[0121] The calculation process of performing a convolution operation on the target adjacency matrix and the output result of the first intermediate convolution layer using the convolution parameters of the second intermediate convolution layer is similar to the calculation process of the convolution operation of the initial convolution layer, and can refer to the aforementioned formula (4). The only difference is that the input value of the initial convolution layer includes the node features and the target adjacency matrix, while the input value of the second intermediate convolution layer includes the output result of the first intermediate convolution layer and the target adjacency matrix.

[0122] The target adjacency matrix and the output of the second intermediate convolutional layer are convolved by the final convolutional layer based on the convolution parameters of the final convolutional layer to obtain the i-th classification result. In a specific implementation, the output of the second intermediate convolutional layer, the target adjacency matrix, and the convolution layer parameter matrix of the final convolutional layer are multiplied in sequence to calculate the final product; the final product is input into the activation function of the final convolutional layer for activation processing to generate the output of the final convolutional layer, and the output of the final convolutional layer is determined as the i-th classification result.

[0123] The convolution calculation process of the initial convolution layer can be specifically described below by combining formula (5) and formula (6).

[0124]

[0125] Among them, A' is the target adjacency matrix, H (l+1) It is used to represent the intermediate convolutional layer connected to and before the final convolutional layer, for example, the second intermediate convolutional layer. Represents the classification result, that is, the output result of the final convolutional layer, E represents the number of categories corresponding to the classification result, and V represents the number of object nodes in the relationship graph.

[0126] In the case of l+1=3, combined with formula (2), we can infer:

[0127]

[0128] Among them, A′ is the target adjacency matrix, H (3) is the output result of the second intermediate convolutional layer, W (4) is the convolutional layer parameter matrix of the last convolutional layer, σ is the activation function of the last convolutional layer, is the output result of the last convolutional layer, and the number of the last convolutional layer is l=4.

[0129] Based on formula (6), the output result H of the second intermediate convolutional layer is (3) The target adjacency matrix A' is input into the activation function of the final convolution layer to perform activation processing based on the final product and output the output result of the final convolution layer. The final product is composed of the output result H of the second intermediate convolution layer. (3) With the target adjacency matrix A' and the convolution layer parameter matrix W of the initial convolution layer (4)The output result of the first intermediate convolution layer is obtained by multiplying them in sequence. Optionally, a residual calculation process is performed on the output result of the initial convolution layer and the first intermediate vector to obtain the output result of the first intermediate convolution layer, including: calculating the difference between a preset value and a preset first adjustment coefficient to obtain a second adjustment coefficient; multiplying the first intermediate vector by the second adjustment coefficient to obtain a first sub-product; multiplying the output result of the initial convolution layer by the first adjustment coefficient to obtain a second sub-product; and summing the first sub-product and the second sub-product to obtain the output result of the first intermediate convolution layer.

[0130] The residual processing calculation process can be specifically described below in combination with formula (7) and formula (8).

[0131] H (l+1 )=(1-α)*GCN(A′,H (l) )+αH (l) (7)

[0132] In formula (7), H (l+1) It is used to represent the output result of the l+1th convolution layer, which is an intermediate convolution layer and satisfies l+1 greater than 1. For example, if the number of layers of the first intermediate convolution layer is (l+1)=2, the output result of the first intermediate convolution layer can be expressed as H (2) α is the first adjustment coefficient, A′ is the target adjacency matrix, H (l) It is used to represent the output result of the lth convolutional layer. The lth convolutional layer may be the initial convolutional layer or any intermediate convolutional layer, satisfying that l is greater than 0.

[0133] Exemplarily, the value of the first adjustment coefficient α can be set to 0.1.

[0134] Formula (5) can be used to perform residual calculation on the convolution result of the l+1th convolution layer, thereby ensuring that the output result of the 1+1th convolution layer does not change significantly, thereby improving the stability of the object classification model.

[0135] For example, the number of layers of the first intermediate convolutional layer is (l+1)=2, α=0.1, and combined with formula (2), it can be inferred that:

[0136] H (2) =(1-α)*GCN(A′,H (1) )+αH (1) =(1-α)*σ(A′H (1) W (2) )+αH (1)

[0137] =0.9*σ(A′H (1) W (2) )+0.1H (1) (8)

[0138] Among them, H (1) is the output of the initial convolutional layer, H (2) is the output of the first intermediate convolutional layer, A' is the target adjacency matrix, W (2) is the convolutional layer parameter matrix of the first intermediate convolutional layer, and σ is the activation function of the first intermediate convolutional layer.

[0139] The output result H of the initial convolutional layer (1) , the target adjacency matrix A' and the convolutional layer parameter matrix W of the first intermediate convolutional layer (2) Multiply them in sequence to get the second product A′H (1) W (2) ; Multiply the second product A′H (1) W (2) Input the activation function σ of the first intermediate convolutional layer for activation processing to generate the activated second product σ(A′H (1) W (2) ), the second product after activation σ(A′H (1) W (2) ) is determined as the first intermediate vector.

[0140] The difference between the preset value "1" and the preset first adjustment coefficient "0.1" is calculated to obtain the second adjustment coefficient "0.9". The first intermediate vector σ(A′H (1) W (2) ) and the second adjustment coefficient "0.9" to obtain the first sub-product 0.9*σ(A′H (1) W (2) );The output result H of the initial convolutional layer (1) Multiply it by the first adjustment coefficient "0.1" to get the second sub-product 0.1H (1) ; Multiply the first sub-product 0.9*σ(A′H (1) W (2) ) and the second sub-product 0.1H (1) Sum and calculate the output result H of the first intermediate convolutional layer (2) The step of "performing residual calculation processing on the output result of the first intermediate convolution layer and the second intermediate vector to obtain the output result of the second intermediate convolution layer" is similar to the calculation process of the step of "performing residual calculation processing on the output result of the initial convolution layer and the first intermediate vector to obtain the output result of the first intermediate convolution layer", and will not be repeated here.

[0141] Optionally, multiple sequentially connected convolutional layers include an initial convolutional layer, at least one intermediate convolutional layer, and a final convolutional layer connected in sequence; the input of the subsequent convolutional layer is the output of the previous convolutional layer; the target adjacency matrix and node features are input into the object classification model for classification prediction to obtain the i-th loss function value corresponding to the i-th training, including: performing normalization constraint processing on the output results of each intermediate convolutional layer to obtain a normalized loss function; calculating the classification loss function of the node classification based on the classification prediction results of each label node and the corresponding classification label in the output results of the final convolutional layer; calculating the two-norm of the parameter matrix to be trained formed by each parameter to be trained in the object classification model, and determining the two-norm as the penalty term; the parameters to be trained include graph edge parameters and convolution parameters; calculating the i-th loss function value based on multiple preset loss function adjustment parameters, the classification loss function of the node classification, the normalized loss function, and the penalty term.

[0142] Taking at least one intermediate convolutional layer including a first intermediate convolutional layer and a second intermediate convolutional layer as an example, it is exemplified that the input of the latter convolutional layer is the output of the previous convolutional layer: the output of the initial convolutional layer is the input of the first intermediate convolutional layer; the output of the first intermediate convolutional layer is the input of the second intermediate convolutional layer; the output of the second intermediate convolutional layer is the input of the final convolutional layer.

[0143] The output results of each intermediate convolutional layer are normalized and constrained to obtain the normalized loss function, which can be explained in conjunction with formula (9) and formula (10) below.

[0144]

[0145] L Normal =tr(D M (B)-D M (A′))=I(B,A′) (10)

[0146] In formula (9) and formula (10), Sigmoid is the activation function, B∈R V×V is the output result H of the intermediate convolutional layer (l+1) The reconstructed adjacency matrix B can be used to represent a reconstructed graph, where the edge weight of the reconstructed graph is the probability that an edge exists between two object nodes, D M The function is used to calculate the degree matrix corresponding to the target adjacency matrix A' or the reconstructed adjacency matrix B, and the tr function is used to calculate the sum of the matrix diagonal elements. Normal is the normalized loss function, L NormalThis function is used to measure whether the reconstruction of the relationship graph based on the output of each intermediate convolutional layer has undergone significant changes. The smaller the value of this normalized loss function, the better. The I function can be a custom function used to calculate the adjacency matrix reconstruction error for the purpose of simplifying the formula.

[0147] The normalization constraints here are handled in the same way as Figure 3 The normalization in is the same concept.

[0148] According to the classification prediction results of each label node and the corresponding classification label in the output results of the final convolutional layer, the classification loss function of the node classification is calculated.

[0149] The bi-norm of a parameter matrix to be trained formed by various parameters to be trained in the object classification model is calculated, and the bi-norm is determined as a penalty term; the parameters to be trained include graph edge parameters and convolution parameters.

[0150] The i-th loss function value is calculated based on multiple preset loss function adjustment parameters, the classification loss function of the node classification, the normalized loss function, and the penalty term. In a specific implementation, the multiple preset loss function adjustment parameters may include a first loss function adjustment parameter and a second loss function adjustment parameter. In a specific implementation, the first loss function adjustment parameter is multiplied by the normalized loss function to calculate the first loss function; the second loss function adjustment parameter is multiplied by the penalty term to calculate the second loss function; and the node classification loss function, the first loss function, and the second loss function are summed to calculate the i-th loss function value.

[0151] Next, we can combine the formula to explain in detail how to adjust the parameters based on multiple preset loss functions, the classification loss function of node classification, the normalized loss function and the penalty term to calculate the i-th loss function value.

[0152]

[0153] Where β and λ are pre-set loss function adjustment parameters. GCN is the loss function for node classification, is the classification prediction result, that is, the output result of the final convolutional layer, Y is the actual classification result, and L Normal is the normalized loss function, L reg is the penalty term, J is the cross-entropy function, and θ represents all parameters to be trained in model training, such as graph edge parameters and the convolution parameters of each convolutional layer. ||θ||2 can be understood as finding the 2-norm of all parameters to be trained in model training.

[0154] Based on formula (11), the first loss function adjustment parameter β is multiplied by the normalized loss function I(B, A) to obtain the first loss function βI(B, A); the second loss function adjustment parameter λ is multiplied by the penalty term ||θ||2 to obtain the second loss function λ||θ||2; the loss function for node classification is The first loss function βI(B, A) and the second loss function λ||θ||2 are summed to calculate the i-th loss function

[0155] By setting the penalty term, L2 regularization of the object classification model can be achieved, the model complexity can be reduced, and the object classification model can be prevented from being overtrained and overfitting can be avoided.

[0156] Compared with the loss function of the traditional graph neural network model, the present invention obtains a normalized loss function by performing normalization constraint processing on the output results of each intermediate convolutional layer, and introduces the normalized loss function into the loss function of the object classification model. This can constrain the model training and prevent the reconstructed image from changing significantly, thereby improving the stability of the object classification model.

[0157] Step S108: If the i-th training meets the training end condition, the j-th training loss function value that meets the training requirements is determined from the training reference information set, and the j-th classification result is determined as the target classification of the object to be classified.

[0158] The training end condition can be configured to stop training when i is greater than the preset number of training times. The training requirements can be configured to determine the loss function value with the smallest numerical value in the training reference information set as the loss function value that meets the training requirements. Taking the preset number of training times as M as an example, where M is a natural number greater than 0, the object classification model provided in the embodiment of the present application is described. The object classification model provided in the embodiment of the present application performs M model training for a graph data that includes both labeled nodes and unlabeled nodes, and the model training and model testing are performed simultaneously to obtain M loss function values ​​and M classification results. Among the M loss function values, assuming that the loss function value of the j-th training is the smallest, the j-th classification result is determined as the target classification of the object to be classified. The target classification can be the classification result with the most accurate prediction effect in executing M training times.

[0159] For example, after 200 training runs, 200 classification results and 200 loss function values ​​are obtained. These 200 classification results and 200 loss function values ​​are written into the training reference information set. The lowest loss function value among the 200 training runs is determined to be the loss function value of the 80th training run. The classification result of the 80th training run is then determined as the target classification with the most accurate prediction effect.

[0160] Specifically, for example, graph data for an object to be classified includes a relationship graph A, which consists of 100 object nodes and multiple edges, wherein the 100 object nodes include 30 labeled nodes and 70 unlabeled nodes. During each training session, the relationship graph A is input into the object classification model, and the corresponding classification results and loss function values ​​are output and written into the training reference information set. The relationship graph A is input into the object classification model 200 times, resulting in 200 object classification results and 200 loss function values. The loss function value with the smallest value among the 200 loss function values ​​is selected, i.e., the minimum loss function value. For example, if the loss function value obtained in the 121st training run is the minimum loss function value, the classification result obtained in the 121st training run is determined as the target classification of the object to be classified. The target classification includes the classification results of the 100 object nodes, wherein the actual classification results corresponding to the object classification results of the 70 unlabeled nodes are unknown. The target classification predicts the classification results for these 70 unlabeled nodes, which can be used to represent the predicted probability of each unlabeled node in any of a plurality of preset classification results.

[0161] It should be noted that the object classification model provided in the embodiments of this application does not first train the model 200 times to obtain a mature model, and then use this mature model to test any graph data. Even if an object classification model with the highest prediction accuracy for a graph data is found, this object classification model cannot be used to make classification predictions for new graph data. If you want to make predictions for new graph data, you must train the new graph data a preset number of times.

[0162] Optionally, after determining the j-th classification result as the target classification of the object to be classified, the method further includes: determining the user's interest node in each product node according to the target classification; and recommending products to the user based on the interest node.

[0163] It's important to note that when constructing a product relationship graph based on the similarity between product categories for each product node, multiple convolutional layers are often required to aggregate features from distant nodes due to the sparse nature of the relationships between products. The number of these convolutional layers can be greater than or equal to a preset threshold. The definition of the preset threshold is as described above and will not be repeated here.

[0164] The following can be combined Figure 4 This section provides an example of how to apply the object classification model in a product classification scenario. Figure 4 This is a schematic diagram of the application of the object classification model in the commodity classification scenario provided in the embodiment of the present application.

[0165] like Figure 4As shown, the relationship graph includes seven object nodes, and each object node corresponds to a commodity. Among them, commodity 401 is a purchased commodity, and there is a preset association relationship between it and commodity 402, and there is an edge between the object nodes corresponding to the two. There is a preset association relationship between commodity 402 and commodity 403, and there is an edge between the object nodes corresponding to the two. There is a preset association relationship between commodity 401 and commodity 404, and there is an edge between the object nodes corresponding to the two. There is a preset association relationship between commodity 404 and commodity 405, and there is an edge between the object nodes corresponding to the two. There is a preset association relationship between commodity 405 and commodity 406, and there is an edge between the object nodes corresponding to the two. There is a preset association relationship between commodity 405 and commodity 407, and there is an edge between the object nodes corresponding to the two. In addition, commodities 403, 404, and 407 are commodities to be predicted for which it is necessary to determine whether the user has the intention to purchase. Figure 4 The product 403, the product 404 and the product 407 are marked with "whether to purchase".

[0166] In this relationship graph, labeled nodes within the product nodes can correspond to purchased items, while unlabeled nodes can correspond to items for which the user's purchase intention is unknown. In the relationship graph, a shorter distance between labeled and unlabeled nodes indicates a higher user willingness to purchase, while a longer distance indicates a lower user willingness to purchase.

[0167] In the relationship graph, only one layer of network connection is required between item 404 and item 401, reflecting a high user willingness to purchase, or a high purchase probability. Two layers of network connection are required between item 403 and item 401, reflecting a moderate user willingness to purchase, or a medium purchase probability. Three layers of network connection are required between item 407 and item 401, reflecting a low user willingness to purchase, or a low purchase probability. The number of network layers represents the distance between two item nodes. For example, if two item nodes are directly connected by an edge, they are connected by a single layer of network connection. If two item nodes are not directly connected by an edge but are indirectly connected through an intermediate item node and two edges, they are connected by a two-layer network connection.

[0168] The relationship graph is input into an object classification model provided in an embodiment of the present application, and a preset number of trainings are performed to obtain target classifications, thereby generating a target relationship graph labeled with the target classifications. The target classifications include: the purchase probability of product 403 is medium, the purchase probability of product 404 is high, and the purchase probability of product 407 is low.

[0169] In the context of product classification, using the object classification method provided by the embodiments of this application can alleviate the oversmoothing problem that often occurs in product classification models that include multiple convolutional layers, and improve the accuracy of product classification using product relationship graphs. The following uses products as an example to illustrate the application of this object classification method in the product classification scenario.

[0170] First, based on the similarity of product categories, an initial graph consisting of multiple product nodes and edges can be constructed. This initial graph can be represented by the initial adjacency matrix A0. The node features of the product nodes are represented as X0, which can be the product's weight, brand, price, sales volume, etc. Some product nodes correspond to products with category labels indicating that the user has purchased the product, while other product nodes correspond to products with category labels indicating that the user has not purchased the product, and some product nodes do not carry any labels.

[0171] The graph data of the initial graph is input into the aforementioned object classification model. By training the object classification model a preset number of times, testing while training, a target classification is obtained, and the target classification is used as the prediction result of the purchase probability of the corresponding product of the product node. The prediction result is for the product node that does not carry any label.

[0172] Furthermore, after obtaining the prediction results, products can be recommended to users based on the prediction results of the purchase probability of the products.

[0173] Specifically, the user's interest node can be determined based on the target classification, and the prediction result can be used to correspond to the product node of the purchase category in each product node, and then the corresponding product of the interest node can be recommended to the user.

[0174] In the above-mentioned commodity classification scenario, assuming that the influence of the node characteristics of the commodity nodes is not considered, and only the adjacent relationship of the commodity nodes is considered, the commodity nodes with labels transmit node information through the multi-layer convolution calculation of the object classification model. A layer of convolution only transmits the information of directly adjacent nodes. The object classification model of the present invention can aggregate the features of remote adjacent nodes through a multi-layer network. After multiple model trainings of the object classification model, the object classification model can directly predict the purchase probability of commodities for commodity nodes of unknown categories, reducing the dependence on labels. Thus, in scenarios where it is necessary to aggregate distant node features through a multi-layer network, and where the number of labels is small, a classification prediction result with higher accuracy can be obtained.

[0175] The object classification model can also be used in other scenarios related to object classification tasks, such as article push based on user interests, construction of blacklists and whitelists, etc., which will not be elaborated here.

[0176] The effectiveness of the object classification model provided by the present invention can be verified using multiple datasets. These datasets include, but are not limited to, the public datasets Cora, Citeseer, and Pubmed. These datasets are classic article citation network datasets. For detailed experimental results, see Table 1.

[0177] Table 1 shows the prediction accuracy of various models for predicting the category of articles based on citation relationships. Among them, Table 1 lists a total of 11 models, namely: ManiReg (manifold regularization) model, SemiEmb (Semi-supervised embedding) model, LP (Linear Programming) model, DeepWalk (graph walk algorithm) model, ICA (Independent Component Analysis) model, Planetoid model, Chebyshev model, GCN, PPNP (Personalized Propagation of Neural Predictions) model and an object classification model provided in an embodiment of the present application.

[0178] Model Dataset 1 Dataset 2 Dataset 3 ManiReg 59.5 60.1 70.7 SemiEmb 59.0 59.6 71.7 LP 68.0 45.3 63.0 DeepWalk 67.2 43.2 65.3 ICA 75.1 69.1 73.9 Planetoid 75.7 64.7 77.2 Chebyshev 81.2 69.8 74.4 GCN 81.5 70.3 79.0 PPNP 85.09±0.25 75.73±0.30 79.73±0.31 Object Classification Model 88.35±0.40 75.34±0.53 85.82±0.15

[0179] Table 1

[0180] As shown in Table 1, the data from Dataset 1 was input into the ManiReg model, and the categories of the articles were predicted based on their citation relationships. The m-th prediction result corresponding to the m-th category was obtained. The accuracy of the m-th prediction was determined based on the m-th category prediction result, where m is greater than 0 and less than or equal to 100. Furthermore, after the ManiReg model performed 100 predictions on the data from Dataset 1, the accuracies of these 100 predictions were averaged to obtain a first accuracy of 59.5 for the ManiReg model, which is used to characterize the predictive accuracy of the ManiReg model for Dataset 1. Similarly, after the ManiReg model performed 100 predictions on the data from Dataset 2, the second accuracy of 60.1 was obtained, which is used to characterize the predictive accuracy of the ManiReg model for Dataset 2. After the ManiReg model performed 100 predictions on the data from Dataset 3, the third accuracy of 70.7 was obtained, which is used to characterize the predictive accuracy of the ManiReg model for Dataset 3.

[0181] Dataset 1, Dataset 2, and Dataset 3 may be different datasets. For example, Dataset 1 may be a public dataset Cora, Dataset 2 may be a public dataset Citeseer, and Dataset 3 may be a public dataset Pubmed.

[0182] The accuracy of several models is introduced below as an example. The accuracy of other models is shown in Table 1 and will not be listed one by one.

[0183] Similar to the ManiReg model, the first accuracy of the GCN model is 81.5, which is used to characterize the prediction accuracy of the GCN model for dataset 1; the second accuracy of the GCN model is 70.3, which is used to characterize the prediction accuracy of the GCN model for dataset 2; the third accuracy of the GCN model is 79.0, which is used to characterize the prediction accuracy of the GCN model for dataset 3.

[0184] Similar to the ManiReg model, the first accuracy of the PPNP model is 85.09±0.25, which is used to characterize the prediction accuracy of the PPNP model for data set 1. The second accuracy of the PPNP model is 75.73±0.30, which is used to characterize the prediction accuracy of the PPNP model for data set 2. The third accuracy of the PPNP model is 79.73±0.31, which is used to characterize the prediction accuracy of the PPNP model for data set 3.

[0185] Among them, “85.09±0.25” is used to indicate that the value range of the first accuracy of the PPNP model is between 84.84 and 85.34. Other values ​​including “±” are similar to “85.09±0.25” and are not repeated below.

[0186] Similar to the ManiReg model, the first accuracy of the object classification model provided in the embodiment of the present application is 88.35±0.40, which is used to characterize the prediction accuracy effect of the object classification model on data set 1. The second accuracy of the object classification model is 75.34±0.53, which is used to characterize the prediction accuracy effect of the object classification model on data set 2. The third accuracy of the object classification model is 85.82±0.15, which is used to characterize the prediction accuracy effect of the object classification model on data set 3.

[0187] By comparison, the object classification model provided in the present embodiment achieves higher first, second, and third accuracies than the GCN model. Furthermore, the first and third accuracies of the object classification model are both higher than those of the PPNP model, and the second accuracy of the object classification model is close to that of the PPNP model. This data demonstrates that the object classification model provided in the present embodiment has the advantage of high prediction accuracy.

[0188] In such Figure 1 In the illustrated embodiment, when it is necessary to classify an object to be classified, graph data of the object to be classified must first be obtained; the graph data includes a relationship graph of the object to be classified consisting of multiple object nodes and multiple edges, as well as node features of each object node; further, based on the graph edge training information used for the i-1th training, a target adjacency matrix used for the i-th training is generated; the graph edge training information includes any one or more of the following: an initial adjacency matrix, graph edge parameters to be trained, and graph edge parameter adjustment rules; i is an integer greater than or equal to 1; the initial adjacency matrix is ​​constructed based on the connection relationship between multiple object nodes in the relationship graph; the target adjacency matrix and node features are input into the object classification model for classification prediction, and the i-th loss function value and i-th classification result corresponding to the i-th training are obtained, and the training loss function value corresponding to the i-th training is added to the training reference information set, which stores the loss function value and classification result corresponding to each training in multiple trainings; if the i-th training meets the training end condition, the j-th training loss function value that meets the training requirements is determined from the training reference information set, and the j-th classification result is determined as the target classification of the object to be classified. In this way, the object classification model is trained multiple times based on the acquired graph data of the object to be classified, wherein the target adjacency matrix used in the i-th training, which can reflect the graph edge weights of the relationship graph, is generated according to the graph edge training information used in the i-1-th training. Therefore, without changing the structure of the relationship graph, the weights of each edge in the relationship graph are adjusted through training, thereby optimizing the target adjacency matrix used to assist in node feature extraction in the object classification process, thereby optimizing the feature extraction effect of the object classification model on the relationship graph, and improving the accuracy of object classification using graph data.

[0189] Figure 5 A schematic diagram of an application of an object classification model provided in an embodiment of the present application. Figure 5 An exemplary relationship diagram is shown, and a target relationship diagram of target classification of ham products is obtained by classifying multiple ham products based on the relationship diagram through an object classification model. Figure 5As shown, the relationship graph includes six object nodes, each of which corresponds to a ham product. Among them, there is a preset association relationship between Ham Sausage A 501 and Ham A 502, and there is an edge between the object nodes corresponding to the two. There is a preset association relationship between Ham Sausage A 502 and Ham B 503, and there is an edge between the object nodes corresponding to the two. There is a preset association relationship between Ham Sausage A 501 and Ham Sausage C 504, and there is an edge between the object nodes corresponding to the two. There is a preset association relationship between Ham Sausage C 504 and Ham Sausage D 505, and there is an edge between the object nodes corresponding to the two. There is a preset association relationship between Ham Sausage D 505 and Ham Sausage E 506, and there is an edge between the object nodes corresponding to the two. In addition, the classification label of Ham Sausage A 501 is sausage, the classification label of Ham B 503 is ham, and the classification labels of other object nodes are unknown.

[0190] The above relationship diagram is input into an object classification model provided in an embodiment of the present application and trained a preset number of times to obtain target classifications, thereby generating a target relationship diagram labeled with the target classifications. The target classifications include: Ham A 502 is labeled "ham", Ham Sausage C 504 is labeled "sausage", Ham Sausage D 505 is labeled "sausage", and Ham Sausage E 506 is labeled "sausage".

[0191] because Figure 5 The technical concept of the embodiment is the same as the technical concept of the aforementioned object classification method embodiment, and the description is relatively simple. For the relevant parts, please refer to the corresponding description of the aforementioned object classification method embodiment.

[0192] An embodiment of an object classification device provided in this specification is as follows:

[0193] In the above embodiment, an object classification method is provided. Based on the same technical concept, the embodiment of the present application also provides an object classification device, which is described below with reference to the accompanying drawings.

[0194] Figure 6 Schematic diagram of an object classification device provided in an embodiment of the present application. This embodiment provides an object classification device, including:

[0195] An acquisition unit 601 is configured to acquire graph data of objects to be classified; the graph data includes a relationship graph of the objects to be classified consisting of multiple object nodes and multiple edges, as well as node features of each object, where one object node corresponds to one object to be classified;

[0196] A generating unit 602 is configured to generate a target adjacency matrix for use in the i-th training session based on the graph edge training information used in the i-1-th training session; the graph edge training information includes any one or more of the following: an initial adjacency matrix, graph edge parameters to be trained, and graph edge parameter adjustment rules; i is an integer greater than or equal to 1; the initial adjacency matrix is ​​constructed based on the connection relationships between multiple object nodes in the relationship graph;

[0197] A prediction unit 603 is configured to input the target adjacency matrix and node features into the object classification model for classification prediction, obtain the i-th loss function value and the i-th classification result corresponding to the i-th training, and add the training loss function value corresponding to the i-th training to a training reference information set, which stores the loss function value and classification result corresponding to each training in multiple training sessions;

[0198] The first determining unit 604 is configured to determine the jth training loss function value that meets the training requirements from the training reference information set if the i-th training meets the training end condition, and determine the j-th classification result as the target classification of the object to be classified.

[0199] Optionally, the object classification model includes multiple convolutional layers connected in sequence, and the prediction unit 603 is specifically used to: input the target adjacency matrix and node features into each convolutional layer in sequence, perform convolution operations in sequence based on the convolution parameters of each convolutional layer, obtain the i-th loss function value corresponding to the i-th training, and determine the i-th classification result.

[0200] Optionally, if i is equal to 1, the graph edge training information used for the i-1th training includes the initial adjacency matrix and the graph edge parameter adjustment rules, and the generation unit 602 is specifically used to: read the initial graph edge parameters from the graph edge parameter adjustment rules; adjust the initial adjacency matrix according to the initial graph edge parameters, and use the adjusted initial adjacency matrix as the target adjacency matrix used for the i-th training.

[0201] Optionally, if i is greater than 1, the graph edge training information used in the i-1th training includes the initial adjacency matrix, the graph edge parameters to be trained, and the graph edge parameter adjustment rules. The generation unit 602 is specifically used to: adjust the graph edge parameters to be trained according to the graph edge parameter adjustment rules to obtain adjusted graph edge parameters; adjust the initial adjacency matrix according to the adjusted graph edge parameters, and use the adjusted initial adjacency matrix as the target adjacency matrix used in the i-th training.

[0202] Optionally, multiple sequentially connected convolution layers include an initial convolution layer, at least one intermediate convolution layer and a final convolution layer connected in sequence; the input of the subsequent convolution layer is the output of the previous convolution layer; the prediction unit 603 is specifically used to: perform normalization constraint processing on the output result of each intermediate convolution layer to obtain a normalized loss function; calculate the classification loss function of the node classification based on the classification prediction result of each label node in the output result of the final convolution layer and the corresponding classification label; calculate the two norm of the parameter matrix to be trained formed by each parameter to be trained in the object classification model, and determine the two norm as a penalty term; the parameters to be trained include graph edge parameters and convolution parameters; according to multiple preset loss function adjustment parameters, the classification loss function of the node classification, the normalized loss function and the penalty term, calculate the i-th loss function value.

[0203] Optionally, at least one intermediate convolution layer includes a first intermediate convolution layer and a second intermediate convolution layer; the prediction unit 603 includes: a first calculation subunit, which is used to use the initial convolution layer to perform a convolution operation on the target adjacency matrix and the node features based on the convolution parameters of the initial convolution layer to obtain the output result of the initial convolution layer; a second calculation subunit, which is used to perform a convolution operation on the target adjacency matrix and the output result of the initial convolution layer based on the convolution parameters of the first intermediate convolution layer through the first intermediate convolution layer to obtain a first intermediate vector; a third calculation subunit, which is used to perform residual calculation on the output result of the initial convolution layer and the first intermediate vector. The fourth calculation subunit is used to perform a convolution operation on the target adjacency matrix and the output result of the first intermediate convolution layer based on the convolution parameters of the second intermediate convolution layer using the second intermediate convolution layer to obtain a second intermediate vector; the fifth calculation subunit is used to perform residual calculation processing on the output result of the first intermediate convolution layer and the second intermediate vector to obtain the output result of the second intermediate convolution layer; the sixth calculation subunit is used to perform a convolution operation on the target adjacency matrix and the output result of the second intermediate convolution layer based on the convolution parameters of the last convolution layer through the last convolution layer to obtain the i-th classification result.

[0204] Optionally, the third calculation subunit is specifically used to: calculate the difference between the preset value and the preset first adjustment coefficient to obtain the second adjustment coefficient; multiply the first intermediate vector by the second adjustment coefficient to obtain the first sub-product; multiply the output result of the initial convolution layer by the first adjustment coefficient to obtain the second sub-product; and sum the first sub-product and the second sub-product to obtain the output result of the first intermediate convolution layer.

[0205] Optionally, the objects to be classified include commodities; the object nodes include commodity nodes; the node features of the object nodes include at least one of the weight, brand, price and sales volume of the commodities; and the commodity relationship graph is constructed based on the similarity between the commodity categories to which each commodity node belongs.

[0206] Optionally, the object classification device further includes: a second determination unit, configured to determine the user's interest node in each commodity node according to the target classification; and a recommendation unit, configured to recommend commodities to the user based on the interest node.

[0207] The object classification device provided based on the embodiment of the present application includes an acquisition unit, a generation unit, a prediction unit and a first determination unit, wherein the acquisition unit can be used to obtain graph data of the object to be classified; the graph data includes a relationship graph of the object to be classified consisting of multiple object nodes and multiple edges, and the node features of each object, and one object node corresponds to one object to be classified; the generation unit can be used to generate the target adjacency matrix used in the i-th training based on the graph edge training information used in the i-1-th training; the graph edge training information includes any one or more of the following: an initial adjacency matrix, graph edge parameters to be trained and graph edge parameter adjustment rules; i is an integer greater than or equal to 1; the initial adjacency matrix The matrix is ​​constructed based on the connection relationship between multiple object nodes of the relationship graph; the prediction unit can be used to input the target adjacency matrix and node features into the object classification model for classification prediction, obtain the i-th loss function value and the i-th classification result corresponding to the i-th training, and add the training loss function value corresponding to the i-th training to the training reference information set, which stores the loss function value and classification result corresponding to each training in multiple trainings; the first determination unit can be used to determine the j-th training loss function value that meets the training requirements from the training reference information set if the i-th training meets the training end condition, and determine the j-th classification result as the target classification of the object to be classified. In this way, based on the graph data of the object to be classified obtained by the acquisition unit, the object classification model is trained multiple times through the generation unit and the prediction unit, and the target classification is obtained through the first determination unit, wherein the target adjacency matrix used in the i-th training that can reflect the graph edge weights of the relationship graph is generated according to the graph edge training information used in the i-1-th training, so that without changing the structure of the relationship graph, the weights of each edge in the relationship graph are adjusted through training, and the target adjacency matrix used to assist node feature extraction in the object classification process is optimized, thereby optimizing the feature extraction effect of the object classification model on the relationship graph, and improving the accuracy of object classification using graph data.

[0208] Corresponding to the object classification method described above, based on the same technical concept, an embodiment of the present application further provides an electronic device, which is used to execute the object classification method provided above. Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0209] like Figure 7As shown, electronic devices may have relatively large differences due to different configurations or performances, and may include one or more processors 701 and memory 702, and the memory 702 may store one or more storage applications or data. Among them, the memory 702 can be a temporary storage or a persistent storage. The application stored in the memory 702 may include one or more modules (not shown in the figure), each module may include a series of computer-executable instructions in the electronic device. Furthermore, the processor 701 can be configured to communicate with the memory 702 to execute a series of computer-executable instructions in the memory 702 on the electronic device. The electronic device may also include one or more power supplies 703, one or more wired or wireless network interfaces 704, one or more input / output interfaces 705, one or more keyboards 706, etc.

[0210] In a specific embodiment, the electronic device includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the electronic device, and the one or more programs are configured to be executed by one or more processors, including computer-executable instructions for performing the following:

[0211] Obtain graph data of the objects to be classified; the graph data includes a relationship graph of the objects to be classified consisting of multiple object nodes and multiple edges, as well as node features of each object node, where one object node corresponds to one object to be classified;

[0212] Generate a target adjacency matrix for the i-th training session based on the graph edge training information used in the i-1th training session; the graph edge training information includes any one or more of the following: an initial adjacency matrix, graph edge parameters to be trained, and graph edge parameter adjustment rules; i is an integer greater than or equal to 1; the initial adjacency matrix is ​​constructed based on the connection relationships between multiple object nodes in the relationship graph;

[0213] Input the target adjacency matrix and node features into the object classification model for classification prediction, obtain the i-th loss function value and i-th classification result corresponding to the i-th training, and add the training loss function value corresponding to the i-th training to the training reference information set, which stores the loss function value and classification result corresponding to each training in multiple trainings;

[0214] If the i-th training meets the training end condition, the j-th training loss function value that meets the training requirements is determined from the training reference information set, and the j-th classification result is determined as the target classification of the object to be classified.

[0215] Corresponding to the object classification method described above, based on the same technical concept, an embodiment of the present application also provides a computer-readable storage medium.

[0216] The computer-readable storage medium provided in this embodiment is used to store computer-executable instructions. When the computer-executable instructions are executed by a processor, the following process is implemented:

[0217] Obtain graph data of the objects to be classified; the graph data includes a relationship graph of the objects to be classified consisting of multiple object nodes and multiple edges, as well as node features of each object node, where one object node corresponds to one object to be classified;

[0218] Generate a target adjacency matrix for the i-th training session based on the graph edge training information used in the i-1th training session; the graph edge training information includes any one or more of the following: an initial adjacency matrix, graph edge parameters to be trained, and graph edge parameter adjustment rules; i is an integer greater than or equal to 1; the initial adjacency matrix is ​​constructed based on the connection relationships between multiple object nodes in the relationship graph;

[0219] Input the target adjacency matrix and node features into the object classification model for classification prediction, obtain the i-th loss function value and i-th classification result corresponding to the i-th training, and add the training loss function value corresponding to the i-th training to the training reference information set, which stores the loss function value and classification result corresponding to each training in multiple trainings;

[0220] If the i-th training meets the training end condition, the j-th training loss function value that meets the training requirements is determined from the training reference information set, and the j-th classification result is determined as the target classification of the object to be classified.

[0221] It should be noted that the embodiment of the computer-readable storage medium in this specification and the embodiment of the object classification method in this specification are based on the same inventive concept. Therefore, the specific implementation of this embodiment can refer to the implementation of the corresponding method mentioned above, and the repeated parts will not be repeated.

[0222] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0223] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the embodiments of the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0224] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable electronic device to produce a machine, so that the instructions executed by the processor of the computer or other programmable electronic device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0225] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable electronic device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0226] These computer program instructions can also be loaded onto a computer or other programmable electronic device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0227] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0228] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0229] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0230] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0231] The embodiments of the present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0232] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0233] The foregoing description is merely an example of the present invention and is not intended to limit the present invention. Persons skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims herein.

Claims

1. A method for object classification, characterized in that: include: Obtain graph data of objects to be classified; the graph data includes a relationship graph of the objects to be classified consisting of multiple object nodes and multiple edges, and node features of each object node, where each object node corresponds to one object to be classified; the objects to be classified include people or objects to be classified; Generate the target adjacency matrix used in the i-th training according to the graph edge training information used in the i-1th training; If i is an integer greater than 1, the graph edge training information includes: an initial adjacency matrix, graph edge parameters to be trained, and graph edge parameter adjustment rules; the initial adjacency matrix is ​​constructed based on the connection relationship between the plurality of object nodes in the relationship graph; Inputting the target adjacency matrix and the node features into an object classification model for classification prediction, obtaining an i-th loss function value and an i-th classification result corresponding to the i-th training, and adding the training loss function value corresponding to the i-th training to a training reference information set, wherein the training reference information set stores the loss function value and classification result corresponding to each training in multiple trainings; If the i-th training meets the training end condition, the j-th training loss function value that meets the training requirements is determined from the training reference information set, and the j-th classification result is determined as the target classification of the object to be classified.

2. The method according to claim 1, characterized in that The object classification model includes a plurality of sequentially connected convolutional layers, and the target adjacency matrix and the node features are input into the object classification model for classification prediction, and the i-th loss function value and the i-th classification result corresponding to the i-th training are obtained, including: The target adjacency matrix and the node features are input into each convolution layer in sequence, and convolution operations are performed in sequence based on the convolution parameters of each convolution layer to obtain the i-th loss function value corresponding to the i-th training and determine the i-th classification result.

3. The method according to claim 1, characterized in that If i is equal to 1, the graph edge training information used in the (i-1)th training includes the initial adjacency matrix and the graph edge parameter adjustment rule, and generating the target adjacency matrix used in the (i-1)th training based on the graph edge training information used in the (i-1)th training includes: Reading initial graph edge parameters from the graph edge parameter adjustment rule; The initial adjacency matrix is ​​adjusted according to the initial graph edge parameters, and the adjusted initial adjacency matrix is ​​used as the target adjacency matrix used in the i-th training.

4. The method according to claim 1, wherein If i is greater than 1, the graph edge training information used in the (i-1)th training includes the initial adjacency matrix, the graph edge parameters to be trained, and the graph edge parameter adjustment rules. Generating the target adjacency matrix used in the i-th training based on the graph edge training information used in the (i-1)th training includes: Adjusting the graph edge parameters to be trained according to the graph edge parameter adjustment rule to obtain adjusted graph edge parameters; The initial adjacency matrix is ​​adjusted according to the adjusted graph edge parameters, and the adjusted initial adjacency matrix is ​​used as the target adjacency matrix used in the i-th training.

5. The method according to claim 2, characterized in that The multiple sequentially connected convolutional layers include an initial convolutional layer, at least one intermediate convolutional layer, and a final convolutional layer connected in sequence; the input of a subsequent convolutional layer is the output of a previous convolutional layer; the target adjacency matrix and the node features are input into an object classification model for classification prediction to obtain an i-th loss function value corresponding to the i-th training, including: Performing normalization constraint processing on the output results of each intermediate convolutional layer to obtain a normalized loss function; Calculate the classification loss function of the node classification based on the classification prediction result of each label node and the corresponding classification label in the output result of the last convolutional layer; Calculating a binary norm of a parameter matrix to be trained formed by each parameter to be trained in the object classification model, and determining the binary norm as a penalty term; the parameters to be trained include the graph edge parameters and the convolution parameters; The i-th loss function value is calculated based on a plurality of preset loss function adjustment parameters, the classification loss function of the node classification, the normalized loss function and the penalty term.

6. The method according to claim 5, characterized in that The at least one intermediate convolutional layer includes a first intermediate convolutional layer and a second intermediate convolutional layer; and determining the i-th classification result includes: Using the initial convolution layer, performing a convolution operation on the target adjacency matrix and the node features based on the convolution parameters of the initial convolution layer to obtain an output result of the initial convolution layer; performing a convolution operation on the target adjacency matrix and an output result of the initial convolution layer based on a convolution parameter of the first intermediate convolution layer through the first intermediate convolution layer to obtain a first intermediate vector; Performing residual calculation processing on the output result of the initial convolutional layer and the first intermediate vector to obtain an output result of the first intermediate convolutional layer; performing a convolution operation on the target adjacency matrix and an output result of the first intermediate convolution layer using the second intermediate convolution layer based on a convolution parameter of the second intermediate convolution layer to obtain a second intermediate vector; Performing residual calculation processing on the output result of the first intermediate convolutional layer and the second intermediate vector to obtain an output result of the second intermediate convolutional layer; The target adjacency matrix and the output result of the second intermediate convolutional layer are convolved by the last convolutional layer based on the convolution parameters of the last convolutional layer to obtain the i-th classification result.

7. The method according to claim 6, characterized in that The performing residual calculation on the output result of the initial convolutional layer and the first intermediate vector to obtain the output result of the first intermediate convolutional layer includes: The difference between the preset value and the preset first adjustment coefficient is calculated to obtain the second adjustment coefficient; multiplying the first intermediate vector by the second adjustment coefficient to obtain a first sub-product; Multiplying the output result of the initial convolutional layer by the first adjustment coefficient to obtain a second sub-product; The first sub-product and the second sub-product are summed to obtain an output result of the first intermediate convolutional layer.

8. The method according to any one of claims 1 to 7, characterized in that The object to be classified includes a commodity; the object node includes a commodity node; the node feature of the object node includes at least one of the weight, brand, price and sales volume of the commodity; The commodity relationship graph is constructed based on the similarity between commodity categories to which each commodity node belongs.

9. The method according to claim 8, characterized in that After determining the j-th classification result as the target classification of the object to be classified, the method further includes: Determining a user's interest node in each of the commodity nodes according to the target classification; Based on the interest nodes, product recommendations are made to the user.

10. An object classification device, characterized in that: include: an acquisition unit, configured to acquire graph data of objects to be classified; the graph data comprising a relationship graph of the objects to be classified consisting of a plurality of object nodes and a plurality of edges, and node features of each object, wherein one object node corresponds to one object to be classified; the objects to be classified may comprise people or objects to be classified; A generation unit, configured to generate a target adjacency matrix used in the i-th training according to the graph edge training information used in the i-1-th training; If i is an integer greater than 1, the graph edge training information includes: an initial adjacency matrix, graph edge parameters to be trained, and graph edge parameter adjustment rules; the initial adjacency matrix is ​​constructed based on the connection relationship between the plurality of object nodes in the relationship graph; a prediction unit, configured to input the target adjacency matrix and the node features into an object classification model for classification prediction, obtain an i-th loss function value and an i-th classification result corresponding to the i-th training, and add the training loss function value corresponding to the i-th training to a training reference information set, wherein the training reference information set stores the loss function value and classification result corresponding to each training in multiple training sessions; The first determination unit is used to determine the jth training loss function value that meets the training requirements from the training reference information set if the i-th training meets the training end condition, and determine the j-th classification result as the target classification of the object to be classified.

11. An electronic device, characterized in that: include: processor; and a memory configured to store computer-executable instructions, which, when executed, cause the processor to perform the object classification method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store computer-executable instructions, and when the computer-executable instructions are executed by a processor, the object classification method according to any one of claims 1 to 9 is implemented.