Recommendation model construction method and system for Non-IID graph data

By screening and strengthening high centrality nodes, training local graph neural network models and performing parameter aggregation, the problems of data isolation and privacy leakage in the construction of Non-IID graph data recommendation models are solved, improving the efficiency and accuracy of the model, and ensuring Data security and personalized expression.

CN117874346BActive Publication Date: 2024-10-25CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410054894.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-15
Publication Date
2024-10-25
Estimated Expiration
2044-01-15

AI Technical Summary

Technical Problem

Existing technologies have data isolation problems and data privacy leak risks in the construction of recommendation models for Non-IID graph data, and the server-side parameter aggregation method does not take into account the personalized expression of each local client, resulting in low recommendation accuracy.

Method used

By obtaining the data graph of the local client, filtering high centrality nodes, performing node annotation and data subgraph enhancement, training the local graph neural network model and adding noise parameters to upload to the central server. The central server uses the preset parameter aggregation formula to aggregate and distribute the parameters. .

Benefits of technology

It improves the efficiency and accuracy of the recommendation model, ensures the anonymity and security of the data, reduces the data complexity between clients, and enhances the model's personalized expression and generalization capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117874346B_ABST
    Figure CN117874346B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and discloses a method for constructing a recommendation model for Non-IID graph data, including: obtaining a data graph of a local client, and screening nodes in the data graph using a node sorting method to obtain high centrality nodes; marking high centrality nodes in the data graph to obtain a node-marked data graph; sampling the data graph to obtain a data subgraph, and using high centrality nodes in the node-marked data graph to strengthen nodes in the data subgraph to obtain a strengthened subgraph; training a local graph neural network model according to the strengthened subgraph, and uploading the parameters of the local graph neural network model to a central server after adding noise parameters; the central server aggregates the parameters of each local client using a preset parameter aggregation formula to obtain an aggregated parameter, and distributes the aggregated parameter to the local client. The present invention can improve the efficiency of constructing a recommendation model for Non-IID graph data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and system for building a recommendation model for Non-IID graph data. Background Art

[0002] Graph Neural Networks (GNN) can show excellent performance in extracting information from graph data and deriving expressive node embeddings. Expressive node embeddings are helpful for downstream tasks such as recommendation model construction and link prediction for Non-IID graph data. However, if a well-trained graph neural network is needed, a large amount of training graph data is required. In practice, this data may be distributed among multiple data owners, and due to privacy issues, these data owners (also known as clients) may be unwilling to share data, thus leading to the problem of data isolation.

[0003] The development of graph neural networks has inspired the emergence of the field of Federated Graph Neural Networks (FedGNNs) in recent years, and the field has developed rapidly in recent years. The framework of federated learning solves the problem that graph neural networks require a large amount of data for training and breaks down the data barriers between clients, but at the same time, federated learning will encounter the problem of highly non-independent and identically distributed. For example, in the case of statistical heterogeneity between clients, which is common in graph mining tasks, the global model may not be able to generalize the local data of all clients well. Therefore, it is necessary to integrate personalization into federated graph learning instead of training for a single consensus model. That is, the client will adjust the global model according to its own data set and train a personalized local model.

[0004] In the process of building a recommendation model for non-IID graph data using a personalized federated graph neural network for social user recommendation, the recommendation model is mainly targeted at the scenario of multiple clients and one central server. The local client is used to communicate with other clients, or local data is enhanced through a third-party server. The local graph neural network model is trained with local data, and the local model parameters are uploaded to the federated learning server for aggregation. The server then broadcasts the aggregated parameters to all clients for updating. After multiple iterations, the model converges. Social network data is a kind of highly private data. Using the local client to communicate with other clients poses a risk of local client data privacy leakage. In addition, the processing of private data in the local client and the use of external data all rely on communication between the client and the client or between the client and the server, which increases the complexity of data communication and affects the efficiency of subsequent recommendation model establishment. In addition, in the prior art, the parameter aggregation on the server side usually adopts the average aggregation method, which does not take into account the personalized expression of each local client, resulting in low recommendation accuracy of the recommendation model in the local client. Summary of the invention

[0005] The present invention provides a method and system for constructing a recommendation model for Non-IID graph data, which can improve the efficiency of constructing a recommendation model for Non-IID graph data.

[0006] To achieve the above object, the present invention provides a method for constructing a recommendation model for Non-IID graph data, comprising:

[0007] Obtaining a data graph of a local client, and screening nodes in the data graph using a preset node sorting method to obtain high centrality nodes, the data graph including a social user recommendation network graph;

[0008] Annotating the high centrality nodes in the data graph to obtain a node annotated data graph;

[0009] Sampling the data graph to obtain a data subgraph, and using the node annotation data graph to perform node reinforcement in the data subgraph to obtain a reinforced subgraph;

[0010] Training the local graph neural network model according to the reinforcement subgraph, and uploading the parameters of the local graph neural network model to the central server after adding noise parameters;

[0011] The central server aggregates the parameters of each local client using a preset parameter aggregation formula to obtain an aggregated parameter, and distributes the aggregated parameter to the local clients.

[0012] Optionally, the using a preset node sorting method to screen the nodes in the data graph to obtain high centrality nodes includes:

[0013] Calculate the Pagerank values ​​of all nodes in the data graph;

[0014] A preset number of nodes are selected according to the Pagerank value to obtain the high centrality nodes.

[0015] Optionally, calculating the Pagerank values ​​of all nodes in the data graph includes:

[0016] The Pagerank values ​​of all nodes in the data graph are calculated using the following formula:

[0017]

[0018] Among them, PR (v i ) is the node v i Pagerank value, PR (v j ) is the node v j Pagerank value, In(v i ) is the node set pointing to the i-th node, v j is the jth node in the node set pointing to the i-th node, Out(v j ) is the slave node v j The node set indicated, |Out(v j )| is node v j The size of the node set indicated by , d is the coefficient.

[0019] Optionally, sampling the data graph to obtain a data subgraph includes:

[0020] Performing unbiased random sampling on the data subgraph to obtain a source node set;

[0021] According to a preset sampling step, random walk sampling is performed in the source node set, and node selection is performed according to the node weight of the random walk sampling;

[0022] The selected nodes and the edges between the nodes are integrated to obtain the data subgraph.

[0023] Optionally, the step of using the high centrality nodes in the node annotation data graph to perform node enhancement in the data subgraph to obtain an enhanced subgraph includes:

[0024] Obtaining a node set of the data subgraph, and querying high centrality nodes from the node set;

[0025] Copying high centrality nodes in the data subgraph to obtain copy nodes;

[0026] Connecting the copy node and neighbor nodes of the original high centrality node of the copy node to obtain a copy subgraph;

[0027] Connecting neighbor nodes of high centrality nodes in all the data subgraphs and corresponding replica nodes of high centrality nodes to obtain a replica subgraph set;

[0028] The replicated subgraphs are integrated to obtain the enhanced subgraph.

[0029] Optionally, training the local graph neural network model according to the reinforcement subgraph includes:

[0030] Using a preset graph neural network to obtain node features of any node in the reinforcement subgraph and features of neighboring nodes of the node;

[0031] Constructing a recommendation model for Non-IID graph data according to the node features of the arbitrary node and the corresponding neighbor node features to obtain node prediction label distribution;

[0032] The loss value between the predicted label distribution and the true label distribution is calculated, and the parameters of the preset graph neural network are updated according to the loss value. After the parameter update is completed, the local graph neural network model is obtained.

[0033] Optionally, calculating the loss value between the predicted label distribution and the true label distribution includes:

[0034] The loss value is calculated using the following formula:

[0035]

[0036] in, is the node prediction label distribution, y is the node true label distribution, o is the sample, c is the category, C is the number of all categories, y o,c is the one-hot value of the category label distribution corresponding to sample o, is the one-hot value of the predicted label distribution corresponding to sample o, The loss value for each sample on all categories.

[0037] In order to solve the above problems, the present invention also provides a recommendation model construction system for Non-IID graph data, the system comprising: a local client and a central server; the central server communicates with the client and constructs a recommendation model in the local client based on the recommendation model construction method for Non-IID graph data.

[0038] Optionally, the central server receives parameters of the graph neural network model in the local client, and aggregates the parameters through a preset parameter aggregation formula to obtain aggregated parameters.

[0039] Optionally, after the central server distributes the aggregation parameters to the local client, the local client saves the aggregation parameters to the recommendation model.

[0040] The embodiment of the present invention uses a preset node sorting method to screen the nodes in the data graph to obtain high centrality nodes, which can achieve a clear distinction between important nodes in the data graph and improve the expressiveness of high centrality nodes in the data graph. The data graph is a social user recommendation network graph, and the nodes in the data graph represent social users. In addition, the high centrality nodes are marked in the data graph, and the data graph is divided by high centrality nodes. The subgraphs are divided by high centrality nodes to obtain representative features of the data graph, so that the local client does not need to communicate with other clients to obtain highly representative features. Furthermore, by strengthening the data subgraphs by high centrality nodes, the personalized expression of the data subgraphs can be enhanced, the accuracy of node classification in the data graph can be improved, and more expressive features can be provided for subsequent training of the local graph neural network model. Finally, the parameters of each local client are aggregated by the central server using a preset parameter aggregation formula, and the parameters are distributed to the local clients, so that the expressiveness of the parameters of each client can be achieved. The parameters obtained by the local client can ensure the anonymity of the data, thereby ensuring that the location of the representative features of the data graph cannot be obtained by the outside, and ensuring the security of the data graph in the local client. The present invention screens high centrality nodes, strengthens data subgraphs through high centrality nodes, and finally aggregates the parameters of each local client through the central server using a preset parameter aggregation formula. The overall process can not only ensure the personalization and security of the data graph in each client through high centrality nodes, but also protect the privacy of user social information. In addition, the overall process can also improve the efficiency of model establishment in the local client. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A schematic diagram of a flow chart of a method for constructing a recommendation model for Non-IID graph data provided by an embodiment of the present invention;

[0042] Figure 2 A general processing flow chart of a method for building a recommendation model for Non-IID graph data provided by an embodiment of the present invention;

[0043] Figure 3 A processing flow chart of a method for building a recommendation model for Non-IID graph data provided by one embodiment of the present invention;

[0044] Figure 4 A data subgraph strengthening process diagram for implementing a method for building a recommendation model for Non-IID graph data provided by an embodiment of the present invention;

[0045] Figure 5 A parameter aggregation flow chart for implementing a method for building a recommendation model for Non-IID graph data provided in one embodiment of the present invention.

[0046] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0048] Reference Figure 1 FIG. 1 is a flow chart of a method for constructing a recommendation model for Non-IID graph data provided by an embodiment of the present invention. In this embodiment, the method for constructing a recommendation model for Non-IID graph data includes:

[0049] S1. Obtain a data graph of a local client, and use a preset node sorting method to filter nodes in the data graph to obtain high centrality nodes, wherein the data graph includes a social user recommendation network graph.

[0050] In the embodiment of the present invention, the local client refers to a storage device for a data graph in federated learning.

[0051] Exemplarily, the data graph of the local client can be represented as G=(V,E), where the node set is V and the edge set is E, where the data graph can be a social network of users, the nodes represent users, and the edges represent social relationships between users, and the social relationships can be intimate, familiar, and unfamiliar, etc.

[0052] As an embodiment of the present invention, the method of screening the nodes in the data graph by using a preset node sorting method to obtain high centrality nodes includes:

[0053] Calculate the Pagerank values ​​of all nodes in the data graph;

[0054] A preset number of nodes are selected according to the Pagerank value to obtain the high centrality nodes.

[0055] In the embodiment of the present invention, the preset node sorting method refers to a method of sorting nodes according to the weights of the nodes. For example, in the embodiment of the present invention, the Pagerank algorithm is used to sort nodes.

[0056] In the embodiment of the present invention, the preset number refers to the number of selected high-center row nodes, and the preset number can be adjusted according to the scale of the data graph.

[0057] Furthermore, the calculating of the Pagerank values ​​of all nodes in the data graph includes:

[0058] The Pagerank values ​​of all nodes in the data graph are calculated using the following formula:

[0059]

[0060] Among them, PR (v i ) is the node v i Pagerank value, PR (v j ) is the node v j Pagerank value, In(v i ) is the node set pointing to the i-th node, v j is the jth node in the node set pointing to the i-th node, Out(v j ) is the slave node v j The node set indicated, |Out(v j )| is node v j The size of the node set indicated, d is the coefficient, where the value of d is generally 0.85.

[0061] S2. Label the high centrality nodes in the data graph to obtain a node labeling data graph.

[0062] The embodiment of the present invention marks the high centrality nodes in the data graph through a node marking function. By marking the high centrality nodes in the data graph, it is possible to clearly distinguish important nodes in the data graph. In addition, the data graph can be divided by high centrality nodes, and the sub-graphs divided by high centrality nodes are used to obtain representative features of the data graph. After the local client trains the sub-graph, the parameters obtained can ensure the anonymity of the data, thereby ensuring that the location of the representative features of the data graph cannot be obtained from the outside, thereby ensuring the security of the data graph.

[0063] In the embodiment of the present invention, the node marking function may adopt the following function:

[0064]

[0065]

[0066] Among them, tag(v i ) represents node v iThe labeling function is used to label high centrality nodes as 1 and other nodes as 0. HC is the high centrality node and V is all nodes.

[0067] S3. Sampling the data graph to obtain a data subgraph, and using the node annotation data graph to perform node reinforcement on the data subgraph to obtain a reinforced subgraph.

[0068] As an embodiment of the present invention, sampling the data graph to obtain a data subgraph includes:

[0069] Performing unbiased random sampling on the data subgraph to obtain a source node set;

[0070] According to a preset sampling step, random walk sampling is performed in the source node set, and node selection is performed according to the node weight of the random walk sampling;

[0071] The selected nodes and the edges between the nodes are integrated to obtain the data subgraph.

[0072] In the embodiment of the present invention, the unbiased random sampling refers to a sampling method in statistics, which can ensure that the probability of each sample being drawn is equal.

[0073] In the embodiment of the present invention, the source node set refers to nodes extracted by unbiased random sampling.

[0074] In the embodiment of the present invention, the preset sampling step size refers to the sampling space interval or sampling time interval selected when sampling.

[0075] Exemplarily, the process of sampling the data graph to obtain the data subgraph is as follows:

[0076] Each local client i has a data graph G i , G i =(V i ,E i ). i The set of nodes representing the data graph of client i, E i Represents the edge set of the client i data graph. For the local subgraph G i Perform unbiased random sampling to obtain S i The source node set:

[0077] 1) From the source node s∈S i Start and perform random walk sampling with a step size of K.

[0078] 2)walk s =(v0,v1,...,v K ), where v0 = s

[0079] v t+1 ~P(v t )

[0080] Among them, P(v t ) is based on the node v t The outgoing edge weight distribution is sampled to obtain the node v for the next transfer t+1 .

[0081] For any step t, we have:

[0082]

[0083] Among them, Out(v t ) is the node v t The outgoing edge set of is the edge (v t ,u)’s weight.

[0084] 3) Add all nodes in the walk sequence and the edges between nodes to the subgraph G s =(V s ,E s )

[0085] V s ={v|v in walk s}

[0086] E s ={(u,v)|u,v in walk s}

[0087] 4) Repeat the above steps until the source node set S i All nodes in are used as starting points to perform random walk sampling, and the data subgraph obtained on the local client is finally the union of the graphs consisting of all sampling sequences:

[0088]

[0089] As an embodiment of the present invention, the node reinforcement of the high centrality nodes in the node-annotated data graph to obtain the reinforced subgraph includes:

[0090] Obtaining a node set of the data subgraph, and querying high centrality nodes from the node set;

[0091] Copying high centrality nodes in the data subgraph to obtain copy nodes;

[0092] Connecting the copy node and neighbor nodes of the original high centrality node of the copy node to obtain a copy subgraph;

[0093] Connecting neighbor nodes of high centrality nodes in all the data subgraphs and corresponding replica nodes of high centrality nodes to obtain a replica subgraph set;

[0094] The replicated subgraphs are integrated to obtain the enhanced subgraph.

[0095] In the embodiment of the present invention, the copy node is a node that is copied from the original high centrality node in the data subgraph.

[0096] For example, the data subgraph sampled by the client is G sub =(V sub ,E sub ), where V sub is the node set of the subgraph, E su b is the edge set of the subgraph.

[0097] 1): In the node set V sub In the query, we query the high centrality node set HC marked in the data graph:

[0098] HC=v|v∈V sub , and tag(v)=1

[0099] 2): For each u∈HC of these high centrality nodes, copy:

[0100] u′=copy(u)

[0101] Among them, u′ is the copy node of u.

[0102] 3): Connect the copied node u′ to the neighboring nodes of the original node u:

[0103] Add edge (u′,v)

[0104] Among them, Neighbor(u) represents the node u in the subgraph G sub The set of neighbor nodes in .

[0105] 4): After such an operation, the original high centrality node u gets a copy node u′ with the same neighbors in the subgraph.

[0106] 5) Repeat the above steps until all high centrality nodes are strengthened to obtain the strengthened subgraph.

[0107] The embodiment of the present invention strengthens the data subgraph through high centrality nodes, which can enhance the personalized expression of the data subgraph and provide more expressive features for the subsequent training of the local graph neural network model. In addition, the security of the data graph can also be achieved by strengthening the subgraph.

[0108] S4. Train the local graph neural network model according to the enhanced subgraph, and add noise parameters to the parameters of the local graph neural network model and upload them to the central server.

[0109] In an embodiment of the present invention, the local graph neural network model refers to a model for processing a data graph of a local client.

[0110] As an embodiment of the present invention, the training of the local graph neural network model according to the reinforcement subgraph includes:

[0111] Using a preset graph neural network to obtain node features of any node in the reinforcement subgraph and features of neighboring nodes of the node;

[0112] Constructing a recommendation model for Non-IID graph data according to the node features of the arbitrary node and the corresponding neighbor node features to obtain node prediction label distribution;

[0113] The loss value between the predicted label distribution and the true label distribution is calculated, and the parameters of the preset graph neural network are updated according to the loss value. After the parameter update is completed, the local graph neural network model is obtained.

[0114] In the embodiment of the present invention, in the present map neural network model, it is divided into a feature extraction layer and a fully connected layer. Among them, the feature extraction layer is divided into two layers, the first feature extraction layer extracts node features in the data graph, and the second feature extraction layer aggregates neighbor node features based on the extraction of node features.

[0115] Exemplarily, the first feature extraction layer may adopt the GraphSage model:

[0116]

[0117] in, is the feature representation of node v in the first feature extraction layer, N(v) is the set of neighbor nodes of node v, is the input feature of node u, Mean represents the mean aggregated neighbor node feature, W (1) is the learnable weight parameter of the first feature extraction layer, and σ1 is the nonlinear activation function of the first layer.

[0118] Exemplarily, the second feature extraction layer may adopt a GraphSage-like model:

[0119]

[0120] in, is the feature representation of node v in the second feature extraction layer, is the feature representation of node v in the first feature extraction layer, W (2)is the learnable weight parameter of the second feature extraction layer, and σ2 is the nonlinear activation function of the second layer.

[0121] For example, the fully connected layer uses a softmax function to transform the output:

[0122]

[0123] in, is the predicted label distribution of node v, W (fc) is the weight of the fully connected layer, It is the feature representation of node v in the second feature extraction layer.

[0124] Furthermore, the calculating the loss value between the predicted label distribution and the true label distribution includes:

[0125] The loss value is calculated using the following formula:

[0126]

[0127] in, is the node prediction label distribution, y is the node true label distribution, o is the sample, c is the category, C is the number of all categories, y o,c is the one-hot value of the category label distribution corresponding to sample o, is the one-hot value of the predicted label distribution corresponding to sample o, The loss value for each sample on all categories.

[0128] As an embodiment of the present invention, the adding of noise parameters to the parameters of the local graph neural network model and uploading to the central server includes:

[0129] The parameters of the local graph neural network model after training are extracted, and noise terms are added to the parameters using a covariance matrix, and the parameters of the local graph neural network model with the noise terms added are uploaded to a central server.

[0130] For example, for client k, when training is completed, the local model gradient parameter is set to Add noise to the gradient:

[0131]

[0132] in, represents the parameter after adding noise, ∈ represents the noise term, and its distribution is:

[0133] ∈~N(0,σ 2 I)

[0134] That is, the noise term has a mean of 0 and a covariance matrix of σ2 Gaussian distribution of I.

[0135] In the embodiment of the present invention, the central server refers to a server responsible for coordinating various clients to perform model training and updating.

[0136] S5. The central server aggregates the parameters of each local client using a preset parameter aggregation formula to obtain an aggregated parameter, and distributes the aggregated parameter to the local clients.

[0137] In the embodiment of the present invention, the preset parameter aggregation formula refers to a formula used to aggregate parameters. For example, the preset parameter aggregation formula may adopt a weighted average aggregation formula.

[0138] As an embodiment of the present invention, the central server aggregates the parameters of each local client using a preset parameter aggregation formula, including:

[0139] Calculate the weight of each local client, and aggregate the model parameters using a preset parameter aggregation formula according to the weight to obtain an aggregated parameter;

[0140] The central server distributes the aggregated parameters to all local clients.

[0141] For example, suppose there are K clients in total, and the parameter of the kth client is w k , the test set accuracy is acc k . The accuracy is used to score and then weights are assigned to the parameters of each client. The embodiment of the present invention calculates the weight of each local client using the following formula:

[0142]

[0143] Among them, p k is the weight, acc k Test set accuracy, μ and σ are Gaussian distribution parameters, acc i is the test set accuracy of the i-th client.

[0144] In the embodiment of the present invention, the test set accuracy refers to the prediction accuracy of the model on the test set, that is, the ratio of the number of samples correctly predicted by the model to the total number of samples in the test set. The test set accuracy is an important indicator for evaluating the generalization ability of the model and the performance of the model on unseen data.

[0145] In the embodiment of the present invention, the central server aggregates the parameters of each local client using a preset parameter aggregation formula and distributes the parameters to the local clients, thereby achieving the expressiveness of the parameters of each client and further improving the generalization ability and accuracy of the client local model.

[0146] As an embodiment of the present invention, the system of the recommendation model construction method for Non-IID graph data includes a local client and a central server; the central server communicates with the client and constructs a recommendation model in the local client based on any one of the recommendation model construction methods for Non-IID graph data; the central server receives the parameters of the graph neural network model in the local client, and aggregates the parameters through a preset parameter aggregation formula to obtain aggregated parameters; after the central server distributes the aggregated parameters to the local client, the local client saves the aggregated parameters to the recommendation model.

[0147] Reference Figure 2 As shown, it is a conventional processing flow chart of a method for building a recommendation model for Non-IID graph data provided by an embodiment of the present invention. In the conventional processing flow, communication between local clients is utilized, and then the data graph is enhanced. Communication between local clients will increase data complexity and reduce processing efficiency.

[0148] Reference Figure 3 As shown, it is a processing flow chart of a method for building a recommendation model for Non-IID graph data provided by one embodiment of the present invention. Each local client processes the data graph independently, which can reduce the data complexity of each local client while ensuring the anonymity and security of each local client.

[0149] Reference Figure 4 As shown, it is a data subgraph enhancement process diagram for implementing the method for building a recommendation model for Non-IID graph data provided by one embodiment of the present invention.

[0150] Reference Figure 5 As shown, it is a parameter aggregation flow chart for implementing the method for building a recommendation model for Non-IID graph data provided in one embodiment of the present invention.

[0151] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0152] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0153] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A method for constructing a recommendation model for Non-IID graph data, characterized in that: The method comprises: Obtain a data graph of a local client, and use a preset node sorting method to screen the nodes in the data graph to obtain high centrality nodes, wherein the use of a preset node sorting method to screen the nodes in the data graph to obtain high centrality nodes includes: calculating the Pagerank values ​​of all nodes in the data graph; selecting a preset number of nodes according to the Pagerank values ​​to obtain the high centrality nodes, the data graph is a social user recommendation network graph, the nodes in the data graph represent social users, and the edges in the data graph represent social relationships between social users; Annotating the high centrality nodes in the data graph to obtain a node annotated data graph; Sampling the data graph to obtain a data subgraph, using the node annotation data graph to strengthen the nodes in the data subgraph to obtain a strengthened subgraph, wherein using the node annotation data graph to strengthen the nodes in the data subgraph to obtain a strengthened subgraph includes: obtaining a node set of the data subgraph, and querying high centrality nodes from the node set; copying the high centrality nodes in the data subgraph to obtain a copied node; connecting the copied node and the neighbor nodes of the original high centrality nodes of the copied node to obtain a copied subgraph; connecting the neighbor nodes of all high centrality nodes in the data subgraph and the corresponding copied nodes of the high centrality nodes to obtain a copied subgraph set; integrating the copied subgraph set to obtain the strengthened subgraph; Training the local graph neural network model according to the reinforcement subgraph, and uploading the parameters of the local graph neural network model to the central server after adding noise parameters; The central server aggregates the parameters of each local client using a preset parameter aggregation formula to obtain an aggregate parameter, and distributes the aggregate parameter to the local client, wherein the preset parameter aggregation formula is a weighted average aggregation formula.

2. The method for constructing a recommendation model for Non-IID graph data according to claim 1, characterized in that: The calculating the Pagerank values ​​of all nodes in the data graph includes: The Pagerank values ​​of all nodes in the data graph are calculated using the following formula: Among them, PR (v i ) is the node v i Pagerank value, PR (v j ) is the node v j Pagerank value, In(v i ) is the node set pointing to the i-th node, v j is the jth node in the node set pointing to the i-th node, Out(v j ) is the slave node v j The node set indicated, |Out(v j )| for node v j The size of the node set indicated by , d is the coefficient.

3. The method for constructing a recommendation model for Non-IID graph data according to claim 1, characterized in that: The step of sampling the data graph to obtain a data subgraph includes: Performing unbiased random sampling on the data graph to obtain a source node set; According to a preset sampling step, random walk sampling is performed in the source node set, and node selection is performed according to the node weight of the random walk sampling; The selected nodes and the edges between the nodes are integrated to obtain the data subgraph.

4. The method for constructing a recommendation model for Non-IID graph data according to claim 1, characterized in that: The step of training the local graph neural network model according to the reinforcement subgraph includes: Using a preset graph neural network to obtain node features of any node in the reinforcement subgraph and features of neighboring nodes of the node; Constructing a recommendation model for Non-IID graph data according to the node features of the arbitrary node and the corresponding neighbor node features to obtain node prediction label distribution; The loss value between the predicted label distribution and the true label distribution is calculated, and the parameters of the preset graph neural network are updated according to the loss value. After the parameter update is completed, the local graph neural network model is obtained.

5. The method for constructing a recommendation model for Non-IID graph data according to claim 4, characterized in that: The calculating the loss value of the predicted label distribution and the true label distribution includes: The loss value is calculated using the following formula: in, is the node prediction label distribution, y is the node true label distribution, o is the sample, c is the category, C is the number of all categories, y o,c is the one-hot value of the category label distribution corresponding to sample o, is the one-hot value of the predicted label distribution corresponding to sample o, The loss value for each sample on all categories.

6. A system based on the method for building a recommendation model for Non-IID graph data as claimed in any one of claims 1 to 5, characterized in that: It includes a local client and a central server; the central server communicates with the client and builds a recommendation model in the local client based on the recommendation model construction method for Non-IID graph data described in any one of claims 1 to 5.

7. The system for constructing a recommendation model for Non-IID graph data according to claim 6, characterized in that: The central server receives the parameters of the graph neural network model in the local client, and aggregates the parameters through a preset parameter aggregation formula to obtain aggregated parameters.

8. The system for constructing a recommendation model for Non-IID graph data according to claim 7, characterized in that: After the central server distributes the aggregation parameters to the local clients, the local clients save the aggregation parameters to the recommendation model.