Node classification method and device and electronic equipment

By enhancing and cross-training the initial graph data, the problem of low node classification accuracy in graph neural networks in fraud detection is solved, and a more comprehensive and distinctive feature representation is achieved, which improves the robustness and accuracy of the model.

CN119475092AInactive Publication Date: 2025-02-18WEBANK (CHINA)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411559538.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, graph neural networks have low accuracy in fraud detection, mainly due to feature representation limitations caused by training of single graph data sets.

Method used

By constructing the initial graph data and enhancing it with the first enhancement function and the second enhancement function, multiple training graph data are generated. Then, these graph data are used to train the online classification model and the target classification model respectively, so that the model parameters can be optimized through cyclic optimization of classification losses.

Benefits of technology

This method allows the graph neural network to capture the representation of the same node under different views, reduce the misleading of the model decision by noise, improve the accuracy of the model's node classification, and reduce overfitting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119475092A_ABST
    Figure CN119475092A_ABST
Patent Text Reader

Abstract

Embodiments of the invention disclose a node classification method and apparatus, and an electronic device. The method comprises the steps of constructing initial graph data based on a user feature portrait and a user interaction relationship on a social platform; performing graph data enhancement on the initial graph data according to the first enhancement function and the second enhancement function to obtain first enhanced graph data and second enhanced graph data; respectively training an online classification model and a target classification model according to the initial graph data, the first enhanced graph data and the second enhanced graph data to obtain a trained online classification model; inputting the features and relationships of the to-be-classified nodes into a trained online classification model to obtain a node classification result; according to the method, the multiple training graph data are subjected to cross iteration training through the two models, the graph neural network can capture representation of the same node in different views, the models can keep stable performance under noise interference, misjudgment caused by noise is reduced, and therefore the node classification accuracy of the models is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data information processing technology; specifically, to a node classification method, device and electronic device. Background Art

[0002] In order to maintain the healthy development of social platforms, it is particularly important to accurately detect these fraudulent accounts. The massive user interaction data accumulated by social platforms can construct information-rich graph structure data. In this context, graph neural networks (GNNs) have attracted much attention due to their powerful ability to capture and represent complex relationships between nodes and are widely used in fraud detection.

[0003] However, currently, a single graph dataset is usually used to train graph neural networks, which results in limitations in the feature representation of model training and reduces the accuracy of node classification. Summary of the invention

[0004] In order to solve the above technical problems, the embodiments of the present application provide a node classification method, device and electronic device, which solve the problem of low node classification accuracy in related technologies.

[0005] According to one aspect of an embodiment of the present application, a node classification method is provided, the method comprising: constructing initial graph data based on user feature portraits and user interaction relationships on a social platform; performing graph data enhancement on the initial graph data according to a first enhancement function and a second enhancement function, respectively, to obtain first enhanced graph data and second enhanced graph data; training an online classification model and a target classification model according to the initial graph data, the first enhanced graph data, and the second enhanced graph data, respectively, so that the classification losses output by the online classification model and the target classification model cyclically optimize the parameters of the online classification model, to obtain a trained online classification model; inputting the features and relationships of the nodes to be classified into the trained online classification model, to obtain a node classification result.

[0006] Optionally, an online classification model and a target classification model are trained according to the initial graph data, the first enhanced graph data and the second enhanced graph data, respectively, so that the classification losses output by the online classification model and the target classification model cyclically optimize the parameters of the online classification model to obtain a trained online classification model, including: performing message propagation and probability prediction on the initial graph data, the first enhanced graph data and the second enhanced graph data according to the online classification model to obtain a first probability distribution, a second probability distribution and a third probability distribution; performing message propagation and probability prediction on the initial graph data, the first enhanced graph data and the second enhanced graph data according to the target classification model to obtain a first probability distribution, a second probability distribution and a third probability distribution. rate prediction, and obtain a fourth probability distribution, a fifth probability distribution, and a sixth probability distribution; calculate a current classification loss according to the first probability distribution, the second probability distribution, the third probability distribution, the fourth probability distribution, the fifth probability distribution, and the sixth probability distribution; optimize the online classification model according to the current classification loss, and obtain current online model parameters of the online classification model; after updating the model parameters of the target classification model according to the current online model parameters, repeat the steps of message propagation, probability prediction, and model parameter optimization, and if the current online model parameters converge to the optimal parameters, use the online classification model as the trained online classification model.

[0007] Optionally, when the online classification model includes an online encoder and a predictor, the initial graph data, the first enhanced graph data and the second enhanced graph data are respectively message propagated and probability predicted according to the online classification model to obtain a first probability distribution, a second probability distribution and a third probability distribution, including: based on the domain topology degree, the online encoder performs node sampling on the initial graph data, the first enhanced graph data and the second enhanced graph data to obtain a first node sampling set, a second node sampling set and a third node sampling set; the first node sampling set, the second node sampling set and the third node sampling set are respectively feature aggregated to obtain a first aggregated neighbor feature, a second aggregated neighbor feature and a third aggregated neighbor feature; the nodes are updated according to the first aggregated neighbor feature, the second aggregated neighbor feature and the third aggregated neighbor feature to obtain a first node embedding representation, a second node embedding representation and a third node embedding representation, respectively; the first node embedding representation, the second node embedding representation and the third node embedding representation are respectively input into the predictor for probability prediction to obtain the first probability distribution, the second probability distribution and the third probability distribution; wherein the probability distribution includes the probability of each node being a normal node and the probability of each node being a fraudulent node.

[0008] Optionally, based on domain topological similarity, the online encoder performs node sampling on the initial graph data to obtain a first node sampling set, including: determining the domain information corresponding to each node according to the adjacency matrix of each node in the initial graph data; wherein the domain information includes a neighbor node set and a complement outside the neighbor node set; calculating the edge distribution probability and joint distribution probability corresponding to each node according to the domain information corresponding to each node; calculating the topological similarity between each node and each neighbor node according to the edge distribution probability of each node and the joint distribution probability of each node; calculating the sampling probability of each neighbor node according to the topological similarity; optimizing the sampling of the neighbor node set according to the sampling probability of each neighbor node to obtain the first node sampling set.

[0009] Optionally, based on the domain information corresponding to each node, the edge distribution probability corresponding to each node is calculated, including: obtaining the probability that the node falls within its domain by dividing the number of neighbor nodes of the current node by a preset number of nodes; obtaining the probability that the node falls outside its domain by dividing the number of nodes in the complement of the current node by a preset number of nodes; wherein the preset number of nodes is the total number of nodes in the initial graph data except the current node, and the edge distribution probability includes the probability that the node falls within its domain and the probability that the node falls outside its domain.

[0010] Optionally, according to the domain information corresponding to each node, the joint distribution probability corresponding to each node is calculated, including: obtaining a first joint probability that node i falls within its neighborhood and neighbor node j falls within its neighborhood according to the number of elements after the intersection of node i's neighbor node set and node j's neighbor node set divided by the preset number of nodes; obtaining a second joint probability that node i falls within its domain and neighbor node j falls outside its domain according to the number of elements after the intersection of node i's neighbor node set and node j's complement divided by the preset number of nodes; obtaining a third joint probability that node i falls outside its domain and neighbor node j falls within its domain according to the number of elements after the intersection of node i's complement and node j's neighbor node set divided by the preset number of nodes; obtaining a fourth joint probability that node i falls outside its domain and neighbor node j falls outside its domain according to the number of elements after the intersection of node i's neighbor node set and node j's neighbor node set divided by the preset number of nodes; wherein the joint distribution probability corresponding to each node includes the first joint probability, the second joint probability, the third joint probability and the fourth joint probability.

[0011] Optionally, the current classification loss is calculated according to the first probability distribution, the second probability distribution, the third probability distribution, the fourth probability distribution, the fifth probability distribution and the sixth probability distribution, including: calculating the supervised loss according to the first probability distribution, the second probability distribution and the third probability distribution; evaluating the first probability distribution and the fourth probability distribution respectively through a labeled validation set to obtain a first evaluation score and a second evaluation score; weighting the second probability distribution, the third probability distribution, the fifth probability distribution and the sixth probability distribution respectively according to the first evaluation score and the second evaluation score to obtain a first target probability distribution and a second target probability distribution; calculating the unsupervised loss according to the second probability distribution, the third probability distribution, the first target probability distribution and the second target probability distribution; and obtaining the current classification loss according to the supervised loss and the unsupervised loss.

[0012] Optionally, the calculation formula of the first target probability distribution is:

[0013] The calculation formula for the second target probability distribution is:

[0014] Among them, s θ represents the first evaluation score, s φ represents the second evaluation score, represents the second distribution probability, represents the third distribution probability, represents the fifth distribution probability, Represents the sixth distribution probability.

[0015] According to one aspect of an embodiment of the present application, a node classification device is provided, the device comprising: an initial graph data construction module, used to construct initial graph data based on user feature portraits and user interaction relationships on a social platform; an enhanced graph data construction module, used to perform graph data enhancement on the initial graph data according to a first enhancement function and a second enhancement function, respectively, to obtain first enhanced graph data and second enhanced graph data; a model training module, used to train an online classification model and a target classification model according to the initial graph data, the first enhanced graph data and the second enhanced graph data, respectively, so that the classification losses output by the online classification model and the target classification model cyclically optimize the parameters of the online classification model to obtain a trained online classification model; a node classification module, used to input the features and relationships of the nodes to be classified into the trained online classification model to obtain a node classification result.

[0016] According to one aspect of an embodiment of the present application, a computer-readable medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the node classification method in the above technical solution is implemented.

[0017] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions so that the electronic device implements a node classification method as in the above technical solution.

[0018] According to one aspect of an embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the node classification method in the above technical solution is implemented.

[0019] The technical solution provided by this application includes at least the following beneficial effects:

[0020] This application enhances the initial graph data in different ways to obtain multiple training graph data, and cross-trains the multiple training graph data through two models and iteratively optimizes model parameters, so that the graph neural network can capture the representation of the same node under different views, and dig out subtle patterns and key features hidden in complex distributions, avoiding the limitations of a single view or model, so that the model can learn more comprehensive and discriminative feature representations, which helps to reduce overfitting; in addition, cross-comparison between multiple views and two models can reduce the misleading of noise on model decisions, so that the model can maintain stable performance under noise interference, reduce erroneous judgments caused by noise, and thus improve the accuracy of the model in node classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0022] Figure 1 The figure is a schematic diagram of a process flow of a node classification method provided in an embodiment of the present application;

[0023] Figure 2 Shown Figure 1 An exemplary flow chart of step S30 in FIG.

[0024] Figure 3 Shown Figure 2 An exemplary flow chart of step S310 in FIG.

[0025] Figure 4 Shown Figure 3 An exemplary flow chart of step S311 in FIG.

[0026] Figure 5 The figure shows a schematic diagram of the structure of a graph data provided by an embodiment of the present application;

[0027] Figure 6 The figure shows a schematic diagram of a sampled graph data structure provided in an embodiment of the present application;

[0028] Figure 7 The figure shows a schematic diagram of a cross-view and cross-model cross-comparison training provided in an embodiment of the present application;

[0029] Figure 8 Shown Figure 2 An exemplary flow chart of step S320 in FIG.

[0030] Fig. 9 The figure is a schematic diagram of the structure of a node classification device provided in an embodiment of the present application;

[0031] Fig.10 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

[0032] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0033] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0034] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0035] It should also be noted that the "multiple" mentioned in this application refers to two or more than two. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship.

[0036] Glossary:

[0037] GNN: Graph Neural Networks is a type of neural network that can process topological data and is used to complete tasks such as node classification and link prediction. Common topological data include financial transaction networks, social relationship networks, etc.

[0038] GNN message propagation: The current mainstream GNN is based on the message propagation paradigm, and almost all its variants can be composed of three main operations, namely sampling, aggregation, and updating. Sampling is to select neighbor nodes, and the aggregation operation propagates messages by aggregating the information of the collected neighbor nodes. The update operation mainly performs nonlinear transformation to extract high-order features.

[0039] Figure 1 FIG. 1 is a flow chart of a node classification method provided in an embodiment of the present application; Figure 1 As shown, the method specifically comprises the following steps:

[0040] Step S10 constructs initial graph data based on user feature portraits and user interaction relationships on the social platform.

[0041] In this embodiment, the user feature portrait includes but is not limited to the user's nickname length, gender, age, the proportion of active days of the user in the past month, the number of user followers, the number of fans, the historical number of likes, the historical number of likes, the historical number of comments, the historical number of comments, and a series of other features. In the model, they will be processed into N-dimensional feature vectors for easy model processing; user interaction relationships represent social relationships between users, such as account attention, comment likes, and other interactive operations. Users represent nodes, and the interaction relationship between users is connected by an edge; therefore, the initial graph data can be expressed as G = (V, E), where V represents a node set and E represents an edge set; the initial graph data can also be expressed as G = (X, A), where X represents a node feature matrix, and X∈R |V|×F ; A represents the node adjacency matrix, F is the feature dimension.

[0042] In this embodiment, the initial graph data includes labeled nodes and unlabeled nodes. A labeled node indicates that the node has been classified as a normal node or a fraud node, and an unlabeled node indicates that the node has not been classified.

[0043] Step S20: perform graph data enhancement on the initial graph data according to the first enhancement function and the second enhancement function respectively to obtain first enhanced graph data and second enhanced graph data.

[0044] In this embodiment, graph data enhancement means performing a series of operations on graph data to increase the diversity and richness of the data, thereby improving the generalization ability and robustness of the model; graph data enhancement methods include random node feature masking, relationship masking, node deletion, etc. Random node feature masking refers to randomly masking some nodes' features partially or completely, so that the model can learn to make accurate predictions even when the features are incomplete; relationship masking refers to randomly deleting or modifying the relationships of some edges to increase the diversity of the data. In practical applications, data enhancement can improve the robustness of the model to a certain extent, but it may also introduce noise and affect the original structure or semantics of the data.

[0045] In one embodiment, the formal representation of random masking of node features is: n ∈{0, 1} F A random binary mask representing a node attribute, where each element M n,i Independently follow the Bernoulli distribution B(1-p f ). For all the features X∈R of the nodes in the graph N×F , the feature representation after mask operation is where ⊙ denotes element-wise multiplication.

[0046] In one embodiment, the formal representation of edge random masking is: Let M e ∈{0, 1} E represents a random binary mask of edges, where each element M e,j Independently follow the Bernoulli distribution B(1-p e ). For the adjacency matrix A∈0,1 of the original graph N×N , the adjacency matrix after mask operation is expressed as

[0047] In this embodiment, noise is introduced into the initial graph data G = (X, A) using the first enhancement function Aug1 and the second enhancement function Aug2, respectively. The first enhancement function Aug1 and the second enhancement function Aug2 are a combination of two graph data enhancement operations: edge random masking and node feature random masking. Optionally, the probability of random masking of the edge of the first enhancement function Aug1 is set to 0.2, and the probability of random masking of the node feature is set to 0.3, and the first enhanced graph data is obtained. Optionally, the probability of random masking of the second enhancement function Aug2 edge is set to 0.3, and the probability of random masking of node features is set to 0.2, and the second enhanced graph data is obtained. The initial graph data G=(X, A) is still retained.

[0048] Step S30: train the online classification model and the target classification model according to the initial graph data, the first enhanced graph data and the second enhanced graph data respectively, so that the classification losses output by the online classification model and the target classification model cyclically optimize the parameters of the online classification model to obtain a trained online classification model.

[0049] In this embodiment, the online classification model and the target classification model have the same architecture, both including an encoder and a predictor; wherein, the encoder in the online classification model is called an online encoder, and the encoder in the target classification model is called a target encoder; the two classification models are trained separately through three graph data, so that the classification losses output by the online classification model and the target classification model cyclically optimize the parameters of the online classification model until the model parameters in the online classification model reach the optimal level, thereby obtaining a trained online classification model.

[0050] This embodiment allows different models to capture the representation of the same node in different views through cross-view and cross-model cross-comparison and cross-optimization of model parameters. By analyzing data from the perspectives of different views and different models, subtle patterns and key features hidden in complex distributions can be discovered, avoiding the limitations of a single view or model, thereby allowing the model to learn more comprehensive and more discriminative feature representations, which helps to reduce overfitting and improve the robustness of the model.

[0051] Step S40: Input the features and relationships of the nodes to be classified into the trained online classification model to obtain node classification results.

[0052] It should be noted that after the training of the online classification model is completed, the trained online classification model is used to classify the nodes in the social platform. Specifically, the trained online classification model includes a trained online encoder and a predictor, and the features and relationships of the nodes to be classified are input into the trained online encoder to obtain a node embedding vector, and the probability of the node belonging to each category is inferred by the predictor, and the category to which the node is most likely to belong is determined by comparing the probability values ​​of different categories, thereby obtaining a node classification result; wherein, the node classification result in this embodiment includes normal nodes and fraudulent nodes.

[0053] The technical solution provided in this embodiment has at least the following beneficial effects:

[0054] This application enhances the initial graph data in different ways to obtain multiple training graph data, and cross-trains the multiple training graph data through two models and iteratively optimizes model parameters, so that the graph neural network can capture the representation of the same node under different views, and dig out subtle patterns and key features hidden in complex distributions, avoiding the limitations of a single view or model, so that the model can learn more comprehensive and discriminative feature representations, which helps to reduce overfitting; in addition, cross-comparison between multiple views and two models can reduce the misleading of noise on model decisions, so that the model can maintain stable performance under noise interference, reduce erroneous judgments caused by noise, and thus improve the accuracy of the model in node classification.

[0055] Figure 2 Shown Figure 1 An exemplary flow chart of step S30 in FIG. Figure 2 The method of training an online classification model and a target classification model according to the initial graph data, the first enhanced graph data, and the second enhanced graph data, respectively, so that the classification losses output by the online classification model and the target classification model cyclically optimize the parameters of the online classification model to obtain a trained online classification model, specifically includes the following steps:

[0056] Step S310: perform message propagation and probability prediction on the initial graph data, the first enhanced graph data, and the second enhanced graph data according to the online classification model to obtain a first probability distribution, a second probability distribution, and a third probability distribution; perform message propagation and probability prediction on the initial graph data, the first enhanced graph data, and the second enhanced graph data according to the target classification model to obtain a fourth probability distribution, a fifth probability distribution, and a sixth probability distribution.

[0057] In one embodiment, if Figure 3 As shown, when the online classification model includes an online encoder and a predictor, the initial graph data, the first enhanced graph data, and the second enhanced graph data are respectively message propagated and probability predicted according to the online classification model to obtain a first probability distribution, a second probability distribution, and a third probability distribution, specifically including the following steps:

[0058] Step S311: Based on the domain topology degree, the online encoder performs node sampling on the initial graph data, the first enhanced graph data, and the second enhanced graph data, respectively, to obtain a first node sampling set, a second node sampling set, and a third node sampling set.

[0059] In one embodiment, if Figure 4 As shown, based on the domain topology phase, the online encoder performs node sampling on the initial graph data to obtain a first node sampling set, which specifically includes the following steps:

[0060] Step S3111: Determine the domain information corresponding to each node based on the adjacency matrix of each node in the initial graph data.

[0061] In this embodiment, the domain information includes a neighbor node set and a complement other than the neighbor node set; let v i Represents the i-th node in the graph data, A ij Represents the node v i The related adjacency matrix. If the node v j is node v i The neighbor node of A ij =1; otherwise, A ij = 0. Through the adjacency matrix A ij Calculate the node v i The neighbor node set N i and its complement The form is as follows:

[0062] N i = {v j ∈V|A ij =1}

[0063]

[0064] For example, Figure 5 The graph data shown includes 6 nodes, and the set is expressed as V = {v0, v1, v2, v3, v4, v5}. It should be noted that the number of nodes and edges in actual social graph data may reach billions or even tens of billions, and the nodes and edges have rich features. Here, the initial graph data structure is briefly explained by example, and the specific graph data structure and scale should not be limited. Assume that nodes v0, v1, v2, v3, and v4 are all normal nodes, and have certain associations with each other (solid lines). Node v5 is a fraudulent node that attempts to establish associations with more normal nodes to disguise itself. These associations are all abnormal edges (dashed lines). It can be concluded that the form of the adjacency matrix is:

[0065]

[0066] The neighbor node set and complement set corresponding to each node are shown in Table 1:

[0067] Table 1. Field information corresponding to each node

[0068]

[0069] Taking node v2 as an example, we know that the neighbor node set of v2 is N2 = {v1, v3, v5}, and the complement is

[0070] Step S3112: Calculate the edge distribution probability and joint distribution probability corresponding to each node based on the domain information corresponding to each node.

[0071] In this embodiment, when the edge distribution probability includes the probability of a node falling within its domain and the probability of a node falling outside its domain, the edge distribution probability corresponding to each node is calculated according to the domain information corresponding to each node, including: obtaining the probability of the node falling within its domain by dividing the number of neighbor nodes of the current node by the total number of nodes in the initial graph data except the current node; obtaining the probability of the node falling outside its domain by dividing the number of nodes in the complement of the current node by the total number of nodes in the initial graph data except the current node.

[0072] It should be noted that when randomly sampling in a sample space that does not include the node itself, the probability of sampling a neighbor node is the number of neighbor nodes divided by (number of nodes - 1), and the same is true outside the neighborhood; therefore, when randomly sampling a node, the probability calculation formula for the node falling within its own neighborhood (excluding the node itself) is: The probability that the node falls outside its own neighborhood is: The |·| in the formula represents the count value after deduplication of nodes in the set, that is, |N i | indicates the number of neighbor nodes of the current node, |VN i | represents the number of nodes in the complement of the current node, and |V|-1 represents the total number of nodes in the initial graph data except the current node.

[0073] Following the previous example, the probability that node v0 falls within its domain and the probability that it falls outside its domain are respectively:

[0074] The probability that node v1 falls within the neighborhood and the probability that it falls outside the neighborhood are:

[0075] The probability that node v2 falls within the neighborhood and the probability that it falls outside the neighborhood are:

[0076] The probability of node v3 falling within the neighborhood and the probability of falling outside the neighborhood are:

[0077] The probability that node v4 falls within the neighborhood and the probability that it falls outside the neighborhood are:

[0078] The probability that node v5 falls within the neighborhood and the probability that it falls outside the neighborhood are:

[0079] In this embodiment, the joint distribution probability represents the probability distribution of multiple random variables taking specific values ​​at the same time, specifically including the first joint probability that node i falls within its neighborhood and the neighbor node j falls within its neighborhood, the second joint probability that node i falls within its domain and the neighbor node j falls outside its domain, the third joint probability that node i falls outside its domain and the neighbor node j falls within its domain, and the fourth joint probability that node i falls outside its domain and the neighbor node j falls outside its domain; wherein, the first joint probability calculation formula is:

[0080]

[0081] Among them, |N i ∩N j | represents the number of elements after the intersection of the neighbor node set of node i and the neighbor node set of node j, |V| represents the total number of nodes, and |V|-1 represents the preset number of nodes.

[0082] The second joint probability calculation formula is:

[0083]

[0084] Among them, |N i ∩(VN j )| represents the number of elements after the intersection of the neighbor node set of node i and the complement set of node j.

[0085] The third joint probability calculation formula is:

[0086]

[0087] in, Represents the number of elements after the intersection of the complement of node i and the neighbor node set of node j.

[0088] The fourth joint probability calculation formula is:

[0089]

[0090] Among them, |(VN i )∩(VN j )| represents the number of elements in the intersection of the neighbor node set of node i and the neighbor node set of node j.

[0091] Continuing with the previous example, assuming that node v2 is the node to be embedded, the process of calculating the joint probability distribution between it and each neighboring node is as follows:

[0092] 1. Joint distribution probability of node v2 and its neighbor node v1:

[0093]

[0094] 2. Joint distribution probability of node v2 and its neighbor node v3:

[0095]

[0096] 3. Joint distribution probability of node v2 and its neighbor node v5:

[0097]

[0098] Step S3113: Calculate the topological similarity between each node and each neighboring node according to the edge distribution probability of each node and the joint distribution probability of each node.

[0099] It should be noted that mutual information can measure the degree of dependence between two random variables. When the two random variables are independent of each other, the mutual information is zero. In this embodiment, the mutual information is used to calculate the node v i With each of its neighbor nodes v j The topological similarity d(v i , v j ) is calculated as:

[0100]

[0101] In the above formula, the topological similarity of two nodes is expressed by the mutual information of the topological structures of the two nodes, that is, I(A i , A j ) represents the mutual information between node i and node j, A i represents the adjacency matrix of node i, A j represents the adjacency matrix of node j, and is regarded as a random variable representing the topological structure of the node neighborhood; p(A i )、p(A j ) represent the edge distribution probability of node i and node j respectively, p(A i , A j ) represents the joint distribution probability of node i and node j; the larger the value of d(v1, v2), the stronger the topological dependence between nodes v1 and v2; if d(v1, v2) is zero, nodes v1 and v2 are independent of each other; in addition, due to the presence of noise, negative numbers may appear in the mutual information calculation.

[0102] For example: Continuing with the previous example, the calculation process of the topological similarity between the node v2 to be embedded and each neighboring node is as follows:

[0103] 1. The topological similarity between node v2 and its neighbor node v1 is:

[0104]

[0105] Since the edge probabilities of nodes v3 and v1 and the joint probability distribution with node v2 are consistent, the topological similarity d(v2, v3) between v2 and its neighbor node v3 obtained by the above algorithm is the same as d(v2, v1).

[0106] 2. Topological similarity between node v2 and its neighbor node v5

[0107]

[0108]

[0109] Step S3114: Calculate the sampling probability of each neighbor node according to the topological similarity.

[0110] In this embodiment, a ranking function rank(d) is defined to i With each of its neighbors v j The topological similarities of are sorted from large to small. If d is in the nth position after sorting (the same similarity has the same rank), then rank(d) = n, and then a decreasing sampling probability is assigned according to the reciprocal of the rank:

[0111]

[0112] Continuing with the previous example, according to the obtained topological similarity sorting results, d(v2, V1) = d(v2, V3) > d(v2, V5), the rankings are 1, 1, and 2 respectively. Therefore, the sampling probabilities assigned to each neighbor node of node v2 are: P(v1|v2) = 1, P(v3|v2) = 1, P(v5|v2) = 0.5.

[0113] Similarly, the sampling probabilities of node v1 and each neighboring node are calculated as: P(v0|v1)=1, P(v2|v1)=0.5, P(v5|v1)=0.33.

[0114] The sampling probabilities of node v0 and each neighboring node are calculated as: P(v1|v0)=1, P(v5|v0)=0.5.

[0115] The sampling probabilities of node v3 and each neighboring node are calculated as: P(v4|v3)=1, P(v2|v3)=0.5, P(v5|v3)=0.33.

[0116] The sampling probabilities of node v4 and each neighboring node are calculated as: P(v3|v4)=1, P(v5|v4)=0.5.

[0117] Step S3115: Optimize the sampling of the neighbor node set according to the sampling probability of each neighbor node to obtain a first node sampling set.

[0118] It should be noted that, assuming that GNN calculates node v2 through 2 layers of message propagation, according to the above calculation results, the probability of sampling node v5 of node v2 is only 0.5, and the probability of sampling node v5 of the two first-degree neighbor nodes v1 and v3 of node v2 is only 0.33, and the possibility of v5 being sampled is very low. Finally, the set of first-degree neighbor nodes to be aggregated N is obtained. s (v2) = v1, v3. Second-degree neighbor node set N s (v1) = V0 and N s (v3) = v4; e.g. Figure 6 As shown in Figure 1, after sampling based on domain topology similarity optimization, the original message propagation direction changes from 6a to 6b, which is equivalent to removing the abnormal edges between the fraudulent nodes and the normal nodes.

[0119] Similarly, based on steps S3111 to S3115, node sampling is performed on the first enhanced graph data and the second enhanced graph data to obtain a second node sampling set and a third node sampling set.

[0120] Step S312: perform feature aggregation on the first node sampling set, the second node sampling set, and the third node sampling set, respectively, to obtain a first aggregated neighbor feature, a second aggregated neighbor feature, and a third aggregated neighbor feature.

[0121] The aggregation in this embodiment is to fuse the neighbor information of the node, and obtain a more accurate node representation by aggregating and updating the information; the result after aggregation is the new embedding of the node, which means the sum and average of the embeddings of each neighbor node of the node in the propagation process; common aggregation functions include mean aggregation, pooling aggregation, etc., taking mean aggregation as an example:

[0122] Step S313: update the node according to the first aggregated neighbor feature, the second aggregated neighbor feature, and the third aggregated neighbor feature to obtain a first node embedding representation, a second node embedding representation, and a third node embedding representation, respectively.

[0123] The node v i Feature representation at the k-1th layer With the aggregated neighbor features To splice:

[0124] The node v is obtained through a linear transformation and activation function i The feature representation at the kth layer is:

[0125]

[0126] Among them, Wk is the weight matrix of the kth layer, and σ is the activation function, such as ReLU.

[0127] After K layers of message propagation, we finally get the node embedding representation h K , which is used for subsequent node classification; the embedding representation of a node can be understood as the position of the node in the embedding space. The embedding representation can be used to measure the relative distance between nodes. The smaller the cosine distance between nodes, the more similar the nodes are, and vice versa.

[0128] Step S314: input the first node embedding representation, the second node embedding representation and the third node embedding representation into the predictor respectively for probability prediction to obtain the first probability distribution, the second probability distribution and the third probability distribution.

[0129] In this embodiment, the probability distribution includes the probability that each node is a normal node and the probability that each node is a fraudulent node.

[0130] like Figure 7 As shown, the initial graph data G = (X, A), the first enhanced graph data and the second enhanced graph data Input to the online encoder in the online classification model After the above message propagation, we get the first node embedding representation h θ,0 The second node embedding representation and the third node embedding representation Then embed the three nodes into the predictor representing the input into the online classification model to obtain the first probability distribution z θ,0 The second probability distribution and the third probability distribution

[0131] At the same time, the initial graph data G = (X, A), the first enhanced graph data and the second enhanced graph data Input the target encoder in the target classification model, and after the above message propagation, the fourth node embedding representation h φ,0 , the fifth node embedding representation and the sixth node embedding representation By embedding these three nodes into the predictor representing the input target classification model, the fourth probability distribution Z is obtained respectively. φ,0 , Fifth Probability Distribution And the sixth probability distribution

[0132] Step S320: Calculate a current classification loss according to the first probability distribution, the second probability distribution, the third probability distribution, the fourth probability distribution, the fifth probability distribution and the sixth probability distribution.

[0133] In this embodiment, if Figure 8 As shown, according to the first probability distribution, the second probability distribution, the third probability distribution, the fourth probability distribution, the fifth probability distribution and the sixth probability distribution, calculating the current classification loss specifically includes the following steps:

[0134] Step S321: Calculate the supervised loss according to the first probability distribution, the second probability distribution and the third probability distribution.

[0135] It should be noted that the vector z θ,0 , and The supervised classification loss is calculated together with the one-hot vector of the true label, such as Figure 7 The solid line in the figure is the supervised part, which calculates the three cross entropy losses and returns the gradient of the loss function to optimize the online model parameters.

[0136] Assume y c represents the value of the true label on category c (0 or 1), category c can be understood as a normal node category or a fraud node category, z θ,0,c represents the probability that the node on the initial graph data output by the predictor belongs to category c, Represents the predictor output in the first enhanced graph data The probability that a node on belongs to category c is, Represents the predictor output in the second enhanced graph data The probability that the node on belongs to category c.

[0137] The supervised classification loss is calculated using cross entropy on the labeled training data, including the supervised loss calculated by the original graph input and the weakly supervised loss calculated by the two enhanced graph inputs, as shown below:

[0138]

[0139] in, represents the cross entropy loss of the initial graph data, It represents the cross entropy loss between the first enhanced graph data and the second enhanced graph data. α is the weight coefficient for balancing the weak supervision loss with noise, which is set to 0.2 here. The manually set value gradually tends to zero as the number of model training iterations increases.

[0140] If z c is close to 1, the loss is small; if z cIf it is close to 0, the loss is large; assuming there are 2 categories, the output probability of the predictor is z = [0.3, 0.7], and the one-hot encoding of the true label is y = [0, 1], then the cross entropy loss is: L cε =-(0×log(0.3)+1×log(0.7))=-log(0.7).

[0141] Step S322: Evaluate the first probability distribution and the fourth probability distribution using a labeled validation set to obtain a first evaluation score and a second evaluation score.

[0142] In this embodiment, the graph data set includes initial graph data and verification graph data. The initial graph data is used to train the model, and the verification graph data is used to verify the training result. Therefore, the initial graph data is trained by the online classification model and the target classification model to obtain the first probability distribution z θ,0 And the fourth probability distribution Z φ,0 Then, the first probability distribution z is tested by using labeled validation graph data. θ,0 And the fourth probability distribution z φ,0 Perform an evaluation, using AUC as the evaluation indicator to obtain the first evaluation score s θ and the second assessment score s φ .

[0143] Step S323: weight the second probability distribution, the third probability distribution, the fifth probability distribution, and the sixth probability distribution according to the first evaluation score and the second evaluation score to obtain a first target probability distribution and a second target probability distribution.

[0144] It should be noted that the calculation formula for the first target probability distribution is:

[0145] The calculation formula for the second target probability distribution is:

[0146] Among them, s θ represents the first evaluation score, s φ represents the second evaluation score, represents the second distribution probability, represents the third distribution probability, represents the fifth distribution probability, Represents the sixth distribution probability.

[0147] For example, the z output by the two models on the initial graph data is θ,0 and z φ,0 After evaluation on the validation set, the AUC scores were 0.8 and 0.7, respectively. θ =0.8,s φ =0.7, and Weighted integration, we get The same applies to calculation.

[0148] Step S324: Calculate the unsupervised loss according to the second probability distribution, the third probability distribution, the first target probability distribution and the second target probability distribution.

[0149] It should be noted that this embodiment increases the difficulty of the consistency comparison task through a cross-view and cross-model comparison strategy, allowing the model to learn node representations under different views and guide the online model to align with the target model with enhanced output. Here, the mean square error loss between the model outputs is optimized to make the online model output closer to the target model output, which is equivalent to calculating the difference between the normalized cosine similarity of two vectors and 1. The more similar, the smaller the loss. The formal definition is:

[0150]

[0151] To calculate L for two probability distributions p = [0.3, 0.7] and q = [0.4, 0.6] unsup (θ, φ) as an example:

[0152] First, calculate the inner product: p·q=0.3×0.4+0.7×0.6=0.12+0.42=0.54;

[0153] Then calculate the norm:

[0154] Calculate cosine similarity:

[0155] Get the unsupervised loss: L unsup (θ,φ)=1-cos(p,q)=0.03.

[0156] Step S325: Obtain the current classification loss according to the supervised loss and the unsupervised loss.

[0157] In this embodiment, the current classification loss is the weighted sum of the supervised loss and the unsupervised loss, and the calculation formula is:

[0158]

[0159] Among them, λ is the weight coefficient for balancing the unsupervised loss, which gradually approaches the manually set value from zero as the number of model training iterations increases. Here, it is set to 0.2, that is, it gradually increases from 0 to 0.2 as the number of model training iterations increases. In this mode, the online model first learns knowledge from labeled data under supervised loss in the early stage of training, and gradually aligns the output to the enhanced target model under the guidance of the enhanced target model in the later stage of training, paying more attention to a large amount of unlabeled data, making better use of data and ensuring smooth model training.

[0160] Step S330: Optimize the online classification model according to the current classification loss to obtain current online model parameters of the online classification model.

[0161] In this embodiment, gradient descent is used to optimize the model parameters of the online encoder. Specifically, the AdamW optimizer is used for parameter optimization, the learning rate is set to 0.01, the L2 weight decay is set to 0, and a custom linear warm-up adaptive decay planner (ReduceLROnPlateau) is used. The linear warm-up is set to 50 rounds, and the learning rate gradually increases from 0 to the initial setting of 0.01 as the iteration proceeds. The model performance is monitored on the validation set, the decay factor is set to 0.5, the tolerance rounds are set to 100 rounds, and the minimum learning rate is set to 0.0008. The maximum number of training rounds is 2000 rounds, and the early stopping technique is monitored and deployed on the AUC score of the validation set, and the early stopping tolerance rounds are 300 rounds. The above training settings are only one implementation method, and other values ​​can also be taken according to the actual application scenario and data conditions.

[0162] Step S340, after updating the model parameters of the target classification model according to the current online model parameters, repeat the message propagation, probability prediction and model parameter optimization steps, and if the current online model parameters converge to the optimal parameters, use the online classification model as the trained online classification model.

[0163] It should be noted that the parameters of the target encoder are updated by exponential moving average (EMA) calculation of the parameters of the online encoder: t =τφ t-1 +(1-τ)θ t , where θ t and φ t are the parameters of the online encoder and target encoder at time step t, respectively. τ is the smoothing coefficient, τ∈[0,1], which is used to control the weights of historical parameters and current parameters. Ramp-up training is adopted: in the first N rounds of training, the weight of consistency loss is increased from 0 to the final value. The τ in the rising stage is 0.99, and the τ in the later stage is 0.999. In addition, steps S310 to S340 are repeated until θ converges to the optimal parameter.

[0164] In summary, the heuristic sampling strategy based on neighborhood topological similarity described in this application ensures that GNN gives priority to the most relevant neighbor nodes during information propagation, while introducing sample diversity through graph data enhancement, reducing attention to noise or redundant nodes, more effectively propagating and aggregating information, obtaining better node representations, and improving model generalization capabilities and node classification accuracy. For fraudulent or abnormal nodes that establish unusual disguised connections with normal nodes, sampling based on neighborhood topological similarity can identify these low-probability abnormal connections and exclude them from the GNN sampling process, preventing the model from being misled into learning the wrong pattern and misjudging fraudulent nodes as normal nodes or missing real fraudulent nodes.

[0165] Optionally, the target enhancement of the dynamic weighted integration of the validation set feedback described in this application is combined with a cross-view and cross-model cross-comparison strategy, which allows the model to capture the representation of the same node in different views. By analyzing the data from the perspective of different views and models, it is possible to dig out subtle patterns and key features hidden in complex distributions, avoiding the limitations of a single view or model, so that the model can learn a more comprehensive and more discriminative feature representation, which helps to reduce overfitting and improve the robustness of the model. In addition, cross-comparison of multiple views and models can reduce the misleading of model decisions by noise, enable the model to maintain stable performance under noise interference, and reduce misjudgments caused by noise. Finally, dynamic weighted integration is achieved through validation set score feedback, making more use of the output of the model that performs better on the current data, so as to better adapt to the characteristics of the new data, guide the online model output to align with the better target output, and optimize the online model parameters in a better direction. Optimize the decision boundary and improve the node classification accuracy of the model.

[0166] Fig. 9 FIG. 1 is a schematic diagram of the structure of a node classification device provided in an embodiment of the present application; Fig. 9 As shown, the device comprises:

[0167] An initial graph data construction module 910 is used to construct initial graph data based on user feature portraits and user interaction relationships on the social platform;

[0168] An enhanced graph data construction module 920 is used to perform graph data enhancement on the initial graph data according to a first enhancement function and a second enhancement function, respectively, to obtain first enhanced graph data and second enhanced graph data;

[0169] A model training module 930 is used to train an online classification model and a target classification model according to the initial graph data, the first enhanced graph data, and the second enhanced graph data, respectively, so that the classification losses output by the online classification model and the target classification model cyclically optimize the parameters of the online classification model to obtain a trained online classification model;

[0170] The node classification module 940 is used to input the features and relationships of the nodes to be classified into the trained online classification model to obtain the node classification results.

[0171] Fig.10 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.

[0172] It should be noted that Fig.10 The computer system 1000 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0173] like Fig.10 As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage part 1008 to the random access memory (RAM) 1003, such as executing the method described in the above embodiment. In the RAM 1003, various programs and data required for system operation are also stored. The CPU 1001, the ROM 1002 and the RAM 1003 are connected to each other through the bus 1004. The input / output (I / O) interface 1005 is also connected to the bus 1004.

[0174] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed so that a computer program read therefrom is installed into the storage section 1008 as needed.

[0175] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1009, and / or installed from a removable medium 1011. When the computer program is executed by a central processing unit (CPU) 1001, various functions defined in the system of the present application are executed.

[0176] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium can include a data signal propagated in a baseband or as a part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0177] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0178] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not constitute limitations on the units themselves in some cases.

[0179] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. A person skilled in the art can easily make corresponding changes or modifications based on the main concept and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.

Claims

1. A node classification method, characterized in that: The method comprises: Build initial graph data based on user feature portraits and user interaction relationships on social platforms; Performing graph data enhancement on the initial graph data according to a first enhancement function and a second enhancement function respectively to obtain first enhanced graph data and second enhanced graph data; According to the initial graph data, the first enhanced graph data and the second enhanced graph data, respectively, an online classification model and a target classification model are trained, so that the classification losses output by the online classification model and the target classification model cyclically optimize the parameters of the online classification model to obtain a trained online classification model; The features and relationships of the nodes to be classified are input into the trained online classification model to obtain node classification results.

2. The method according to claim 1, characterized in that The online classification model and the target classification model are trained according to the initial graph data, the first enhanced graph data, and the second enhanced graph data, respectively, so that the classification losses output by the online classification model and the target classification model cyclically optimize the parameters of the online classification model to obtain a trained online classification model, including: According to the online classification model, message propagation and probability prediction are performed on the initial graph data, the first enhanced graph data, and the second enhanced graph data, respectively, to obtain a first probability distribution, a second probability distribution, and a third probability distribution; according to the target classification model, message propagation and probability prediction are performed on the initial graph data, the first enhanced graph data, and the second enhanced graph data, respectively, to obtain a fourth probability distribution, a fifth probability distribution, and a sixth probability distribution; Calculate a current classification loss according to the first probability distribution, the second probability distribution, the third probability distribution, the fourth probability distribution, the fifth probability distribution, and the sixth probability distribution; Optimizing the online classification model according to the current classification loss to obtain current online model parameters of the online classification model; After updating the model parameters of the target classification model according to the current online model parameters, the message propagation, probability prediction and model parameter optimization steps are repeated. If the current online model parameters converge to the optimal parameters, the online classification model is used as the trained online classification model.

3. The method according to claim 2, characterized in that When the online classification model includes an online encoder and a predictor, message propagation and probability prediction are performed on the initial graph data, the first enhanced graph data, and the second enhanced graph data according to the online classification model to obtain a first probability distribution, a second probability distribution, and a third probability distribution, including: Based on the domain topology phase, the online encoder performs node sampling on the initial graph data, the first enhanced graph data, and the second enhanced graph data respectively to obtain a first node sampling set, a second node sampling set, and a third node sampling set; Performing feature aggregation on the first node sampling set, the second node sampling set, and the third node sampling set, respectively, to obtain a first aggregated neighbor feature, a second aggregated neighbor feature, and a third aggregated neighbor feature; Update the node according to the first aggregated neighbor feature, the second aggregated neighbor feature, and the third aggregated neighbor feature to obtain a first node embedding representation, a second node embedding representation, and a third node embedding representation, respectively; The first node embedding representation, the second node embedding representation and the third node embedding representation are respectively input into the predictor for probability prediction to obtain the first probability distribution, the second probability distribution and the third probability distribution; wherein the probability distribution includes the probability of each node being a normal node and the probability of each node being a fraudulent node.

4. The method according to claim 3, characterized in that Based on the domain topology phase, the online encoder performs node sampling on the initial graph data to obtain a first node sampling set, including: Determine the domain information corresponding to each node according to the adjacency matrix of each node in the initial graph data; wherein the domain information includes a neighbor node set and a complement set other than the neighbor node set; According to the domain information corresponding to each node, the edge distribution probability and the joint distribution probability corresponding to each node are calculated; According to the edge distribution probability of each node and the joint distribution probability of each node, the topological similarity between each node and each neighbor node is calculated; According to the topological similarity, the sampling probability of each neighbor node is calculated; The neighbor node set is optimized and sampled according to the sampling probability of each neighbor node to obtain a first node sampling set.

5. The method according to claim 4, characterized in that According to the domain information corresponding to each node, the edge distribution probability corresponding to each node is calculated, including: According to the number of neighbor nodes of the current node divided by the preset number of nodes, the probability of the node falling within its domain is obtained; The probability that a node falls outside its domain is obtained by dividing the number of nodes in the complement of the current node by the preset number of nodes; wherein the preset number of nodes is the total number of nodes in the initial graph data except the current node, and the edge distribution probability includes the probability that a node falls within its domain and the probability that a node falls outside its domain.

6. The method according to claim 5, characterized in that According to the domain information corresponding to each node, the joint distribution probability corresponding to each node is calculated, including: According to the number of elements after the intersection of the neighbor node set of node i and the neighbor node set of node j, divided by the preset number of nodes, a first joint probability that node i falls within its neighborhood and neighbor node j falls within its neighborhood is obtained; The second joint probability that node i falls within its domain and neighbor node j falls outside its domain is obtained by dividing the number of elements after the intersection of the neighbor node set of node i and the complement of node j by the preset number of nodes; The third joint probability that node i falls outside its domain and neighbor node j falls within its domain is obtained by dividing the number of elements obtained by intersecting the complement of node i and the neighbor node set of node j by the preset number of nodes; According to the number of elements obtained by intersecting the neighbor node set of node i and the neighbor node set of node j, divided by the preset number of nodes, a fourth joint probability that node i falls outside its domain and the neighbor node j falls outside its domain is obtained; The joint distribution probability corresponding to each node includes the first joint probability, the second joint probability, the third joint probability and the fourth joint probability.

7. The method according to claim 2, characterized in that Calculating a current classification loss according to the first probability distribution, the second probability distribution, the third probability distribution, the fourth probability distribution, the fifth probability distribution, and the sixth probability distribution includes: Calculating a supervised loss according to the first probability distribution, the second probability distribution, and the third probability distribution; The first probability distribution and the fourth probability distribution are evaluated respectively using a labeled validation set to obtain a first evaluation score and a second evaluation score; According to the first evaluation score and the second evaluation score, the second probability distribution, the third probability distribution, the fifth probability distribution, and the sixth probability distribution are weighted respectively to obtain a first target probability distribution and a second target probability distribution; Calculating an unsupervised loss based on the second probability distribution, the third probability distribution, the first target probability distribution, and the second target probability distribution; According to the supervised loss and the unsupervised loss, the current classification loss is obtained.

8. The method according to claim 7, characterized in that The calculation formula for the first target probability distribution is: The calculation formula for the second target probability distribution is: Among them, s θ represents the first evaluation score, s φ represents the second evaluation score, represents the second distribution probability, represents the third distribution probability, represents the fifth distribution probability, Represents the sixth distribution probability.

9. A node classification device, characterized in that: The device comprises: An initial graph data construction module is used to construct initial graph data based on user feature portraits and user interaction relationships on social platforms; An enhanced graph data construction module, used to perform graph data enhancement on the initial graph data according to a first enhancement function and a second enhancement function, respectively, to obtain first enhanced graph data and second enhanced graph data; A model training module, used to train an online classification model and a target classification model according to the initial graph data, the first enhanced graph data and the second enhanced graph data, respectively, so that the classification losses output by the online classification model and the target classification model cyclically optimize the parameters of the online classification model to obtain a trained online classification model; The node classification module is used to input the features and relationships of the nodes to be classified into the trained online classification model to obtain the node classification results.

10. An electronic device, characterized in that: include: processor; as well as A memory for storing executable instructions of the processor; wherein the processor is configured to execute the executable instructions to enable the electronic device to implement the node classification method as described in any one of claims 1 to 8.