Methods, systems, devices, and storage media for embedding graph nodes
By calculating and synchronizing the N-degree relationships of intersection graph nodes and virtual graphs among multiple participants, and using neural network training and mean-averaging, the problems of incomplete graph data and inaccurate node vectors in graph embedding methods are solved, achieving more accurate graph node representation and data privacy protection.
Patent Information
- Application Number
- CN202211160818.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-09-22
AI Technical Summary
Existing graph embedding methods suffer from incomplete graph data network relationships and inaccurate graph node vector representations, leading to significant errors in downstream machine learning tasks.
By determining the intersection graph node IDs between at least two participants, calculating and synchronizing N-degree relationships between their respective participants, a virtual graph is generated. The graph is then trained using a neural network to obtain vector representations of the intersection graph nodes, and mean-based processing is performed to improve accuracy.
Without disclosing local source data, a more accurate graph node vector representation is achieved, improving the performance of downstream machine learning tasks and protecting the data privacy of all parties.
Smart Images

Figure CN115796229B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of graph node embedding technology, and in particular to a graph node embedding method, system, device and storage medium. Background Technology
[0002] If the federated graph neural network method is to be used in practice, at least a low-dimensional vector representation of the graph node data is required.
[0003] Currently, graph embedding methods aim to learn the distributed representations of graph nodes in graph networks. Key graph embedding methods include: DeepWalk, which uses the word2vec method to learn graph node representations. Its process treats the sequence of graph nodes generated by random walks as sentences, considers adjacent graph nodes in the sequence as semantically similar words, and uses the skip-gram algorithm to achieve a vector representation for each graph node; Node2vec replaces DeepWalk's random walk strategy with weights, allowing users to adjust the use of breadth-first or depth-first traversal strategies to generate graph node sequences according to actual needs; and the LINE method combines first-order and second-order similarity in the graph structure to obtain richer graph node representation results.
[0004] Most current graph embedding methods are based on the independent computation of graph nodes and edges in local graph data. Due to the scale of local graph data and the limitations of business applications, the graph node representation of the graph embedding calculated using only local data may not accurately represent the state of the actual graph nodes, resulting in significant errors in downstream machine learning tasks, such as supervised and unsupervised learning.
[0005] Due to business data relationships, the network relationships in this map data may be incomplete. If graph nodes are embedded on incomplete graph data to generate graph node vectors, inaccurate representation of graph node vectors may occur during the generation process. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to overcome the defects of existing graph embedding methods in the prior art, such as incomplete graph data network relationships and inaccurate graph node vector representation, and to provide a graph node embedding method, system, device and storage medium.
[0007] The present invention solves the above-mentioned technical problems through the following technical solution:
[0008] The first aspect of the present invention provides a method for embedding graph nodes, the embedding method comprising:
[0009] Determine the intersection graph node IDs between at least two participants;
[0010] The intersection graph node IDs are sent to each of the participants, so that each participant can calculate and send its own N-degree relationship based on the received intersection graph node IDs;
[0011] The system receives the N-degree relationship sent by each participant and sends the N-degree relationships of at least two participants to each participant respectively, so that each participant generates its own virtual graph to be added based on the N-degree relationships of other participants. Each participant trains its own neural network according to the original graph node IDs after adding the virtual graph and according to a preset number of iterations. Each participant obtains and sends the vector representation of its own intersection graph node IDs from the trained neural network.
[0012] Preferably, the step of determining the intersection graph node IDs between the at least two participants includes:
[0013] Receive the original graph node IDs sent by at least two participants;
[0014] Determine the intersection graph node ID between the at least two participants based on the original graph node ID;
[0015] And / or,
[0016] The embedding method further includes:
[0017] Receive vector representations of the intersection graph node IDs sent by the at least two participating parties;
[0018] The vector representation of the intersection graph node ID is averaged to obtain the averaged vector representation of the intersection graph node ID;
[0019] The vector representation of the mean-normalized intersection graph node ID is sent to the corresponding participant according to the intersection graph node ID of each participant, so that each participant replaces the vector representation of the intersection graph node ID before mean-normalization with the received vector representation of the mean-normalized intersection graph node ID, and each participant trains its own neural network according to the vector representation of the mean-normalized intersection graph node ID for a preset number of iterations.
[0020] Preferably, the step of receiving the N-degree relationship sent by each of the participating parties and sending the N-degree relationships of the at least two participating parties to each of the participating parties respectively, so that each participating party generates its own virtual graph to be added based on the N-degree relationships of the other participating parties, includes:
[0021] Receive the N-degree relationship sent by each of the participants, and send the N-degree relationships of the at least two participants to each of the participants respectively, so that each participant compares its own N-degree relationship with the N-degree relationships of the other participants to generate its own virtual graph node ID to be added;
[0022] or,
[0023] The step of receiving the N-degree relationship sent by each of the participating parties, and sending the N-degree relationships of the at least two participating parties to each of the participating parties respectively, so that each participating party generates its own virtual graph to be added based on the N-degree relationships of the other participating parties, includes:
[0024] Receive the N-degree relationship sent by each of the participants, and send the N-degree relationships of the at least two participants to each of the participants respectively, so that each participant compares its own N-degree relationship with the N-degree relationships of the other participants to generate its own virtual edge to be added;
[0025] or,
[0026] The step of receiving the N-degree relationship sent by each of the participating parties, and sending the N-degree relationships of the at least two participating parties to each of the participating parties respectively, so that each participating party generates its own virtual graph to be added based on the N-degree relationships of the other participating parties, includes:
[0027] The system receives the N-degree relationship sent by each of the participating parties, and sends the N-degree relationships of the at least two participating parties to each of the participating parties respectively, so that each participating party compares its own N-degree relationship with the N-degree relationships of the other participating parties to generate its own virtual graph node ID and virtual edge to be added.
[0028] Preferably, the step of receiving the original graph node IDs sent by at least two participants includes:
[0029] Receive the encrypted original graph node IDs sent by the at least two participating parties;
[0030] The step of determining the intersection graph node ID between the at least two participants based on the original graph node ID includes:
[0031] The intersection graph node ID between the at least two participants is determined based on the encrypted original graph node ID.
[0032] A second aspect of the present invention provides an embedding system for graph nodes, the embedding system comprising a determining module, a first sending module, and a first processing module;
[0033] The determining module is used to determine the intersection graph node IDs between at least two participants;
[0034] The first sending module is used to send the intersection graph node IDs to each of the participants, so that each participant can calculate and send its own N-degree relationship based on the received intersection graph node IDs;
[0035] The first processing module is used to receive the N-degree relationship sent by each of the participants, and send the N-degree relationships of the at least two participants to each of the participants respectively, so that each participant generates its own virtual graph to be added based on the N-degree relationships of other participants. Each participant trains its own neural network according to the original graph node IDs after adding the virtual graph and according to a preset number of iterations. Each participant obtains and sends the vector representation of its own intersection graph node IDs from the trained neural network.
[0036] Preferably, the determining module includes a receiving unit and a determining unit;
[0037] The receiving unit is used to receive the original graph node IDs sent by at least two participants;
[0038] The determining unit is used to determine the intersection graph node ID between the at least two participants based on the original graph node ID;
[0039] And / or,
[0040] The embedded system further includes a receiving module, a second processing module, and a second transmitting module;
[0041] The receiving module is used to receive the vector representation of the intersection graph node ID sent by the at least two participating parties;
[0042] The second processing module is used to perform mean-normalization on the vector representation of the intersection graph node IDs to obtain the mean-normalized vector representation of the intersection graph node IDs;
[0043] The second sending module is used to send the vector representation of the mean-normalized intersection graph node ID to the corresponding participant according to the intersection graph node ID of each participant, so that each participant replaces the vector representation of the intersection graph node ID before mean-normalization with the received vector representation of the mean-normalized intersection graph node ID, and each participant trains its own neural network according to the vector representation of the mean-normalized intersection graph node ID for a preset number of iterations.
[0044] Preferably, the first processing module is used to receive the N-degree relationship sent by each of the participants, and send the N-degree relationships of the at least two participants to each of the participants respectively, so that each participant compares its own N-degree relationship with the N-degree relationships of the other participants to generate its own virtual graph node ID to be added;
[0045] or,
[0046] The first processing module is used to receive the N-degree relationship sent by each of the participants, and send the N-degree relationships of the at least two participants to each of the participants respectively, so that each participant can compare its own N-degree relationship with the N-degree relationships of the other participants to generate its own virtual edge to be added;
[0047] or,
[0048] The first processing module is used to receive the N-degree relationship sent by each of the participants, and send the N-degree relationships of the at least two participants to each of the participants respectively, so that each participant can compare its own N-degree relationship with the N-degree relationships of the other participants to generate its own virtual graph node ID and virtual edge to be added.
[0049] Preferably, the receiving unit is specifically used to receive the encrypted original graph node IDs sent by the at least two participating parties;
[0050] The determining unit is specifically used to determine the intersection graph node ID between the at least two participants based on the encrypted original graph node ID.
[0051] A third aspect of the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the graph node embedding method as described in the first aspect.
[0052] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the graph node embedding method as described in the first aspect.
[0053] The positive and progressive effects of this invention are as follows:
[0054] This invention is based on federated graph node embedding calculation by multiple participants, synchronizing the mean vectors of intersection graph nodes, and adding virtual graph nodes and / or virtual edges. The actual values of their respective graph data are not disclosed to each other. Federated graph embedding training is performed using the graph node IDs of multiple participants. While ensuring that each participant does not disclose its local source data, more effective graph node vector representations can be accurately obtained. Attached Figure Description
[0055] Figure 1 This is a first flowchart of the graph node embedding method according to Embodiment 1 of the present invention.
[0056] Figure 2 This is a flowchart of step 101 of the graph node embedding method in Embodiment 1 of the present invention.
[0057] Figure 3 This is a second flowchart of the graph node embedding method of Embodiment 1 of the present invention.
[0058] Figure 4 A schematic diagram showing the addition of virtual graph nodes and / or virtual edges to the participants in Embodiments 1 and 2 of the present invention.
[0059] Figure 5 This is a schematic diagram of the structure for mean-averaging the vector representation of the intersection graph node IDs of at least two participants in Embodiments 1 and 2 of the present invention.
[0060] Figure 6 This is a schematic diagram of the module of the graph node embedding system in Embodiment 2 of the present invention.
[0061] Figure 7 This is a schematic diagram of the electronic device according to Embodiment 3 of the present invention. Detailed Implementation
[0062] The present invention will be further illustrated by way of embodiments below, but the present invention is not limited to the scope of the embodiments described herein.
[0063] Example 1
[0064] This embodiment provides a method for embedding graph nodes, such as... Figure 1 As shown, the embedding method includes:
[0065] Step 101: Determine the intersection graph node IDs between at least two participants;
[0066] In this embodiment, the entire process requires a server to execute, which is used to collect relevant encrypted data and perform related calculations. It should be noted that the server can be a central server; the encrypted data refers to the encrypted graph node IDs.
[0067] In the specific implementation process, the intersection graph node ID between at least two participants is determined by the server;
[0068] In this embodiment, the participants can be different banks, different operators, or other entities; no specific limitations are made here.
[0069] In this embodiment, a graph is used as an abstract data structure to represent the relationships between multiple objects. It is described using vertices, edges, and properties. Vertices represent objects, edges represent the relationships between objects, and properties represent the specific values of each vertex object.
[0070] In this embodiment, graph embedding assigns a fixed-length vector representation to each node in the graph. Graph embedding captures information such as the graph's topology and the relationships between vertices.
[0071] In this embodiment, the intersection node ID is the same as the common node ID.
[0072] Step 102: Send the intersection graph node IDs to each participant, so that each participant can calculate and send its own N-degree relationship based on the received intersection graph node IDs;
[0073] In this embodiment, the server sends the intersection graph node IDs to each participant. Each participant calculates its own N-degree relationship based on the received intersection graph node IDs and sends its own N-degree relationship to the server.
[0074] In this embodiment, N-degree relationship refers to a relationship within N degrees, or an N-hop neighbor relationship. An N-degree relationship can be a first-degree relationship, a second-degree relationship, a third-degree relationship, or a relationship of other values.
[0075] Step 103: Receive the N-degree relationship sent by each participant, and send the N-degree relationships of at least two participants to each participant respectively, so that each participant can calculate the virtual graph to be added based on the N-degree relationships of other participants. Each participant trains its own neural network according to the original graph node IDs after adding the virtual graph and according to the preset number of iterations. Each participant obtains and sends the vector representation of its own intersection graph node IDs from the trained neural network.
[0076] In this embodiment, the server receives the N-degree relationship sent by each participant and sends the N-degree relationships of at least two participants to each participant respectively. Each participant calculates its own virtual graph to be added based on the N-degree relationships of other participants. Each participant trains its own neural network according to the original graph node IDs after adding the virtual graph and according to the preset number of iterations. Each participant obtains and sends the vector representation of its own intersection graph node IDs from the trained neural network.
[0077] In this embodiment, the virtual graph includes virtual graph nodes and / or virtual edges.
[0078] In this embodiment, the neural network is a graph neural network. It should be noted that a graph neural network is a general term for algorithms that use neural networks to learn graph structure data, extract and discover features and patterns in graph structure data, and meet the needs of graph learning tasks such as clustering, classification, prediction, segmentation, and generation.
[0079] It should be noted that the preset number of training iterations should be set according to the actual situation, and no specific limit is set here.
[0080] In a feasible solution, such as Figure 2 As shown, step 101 includes:
[0081] Step 1011: Receive the original graph node IDs sent by at least two participants;
[0082] Step 1012: Determine the intersection graph node IDs between at least two participants based on the original graph node IDs.
[0083] In the implementation process, each participant performs a hash function on the graph node ID according to a specific rule, generating anonymized graph node IDs (graph node IDs can be users' mobile phone numbers, ID card numbers, or other numbers) data (i.e., encrypted data). Each participant sends the anonymized graph node IDs to the server. The server collects the encrypted graph node IDs sent by each participant and performs pairwise intersection, three-way intersection, or multiple-way intersection of the node IDs among the participants.
[0084] In a feasible solution, such as Figure 3 As shown, the embedding method also includes:
[0085] Step 104: Receive vector representations of the intersection graph node IDs sent by at least two participants;
[0086] Step 105: Perform mean-normalization on the vector representation of the intersection graph node IDs to obtain the mean-normalized vector representation of the intersection graph node IDs;
[0087] Step 106: Send the vector representation of the mean-normalized intersection graph node ID to the corresponding participant according to the intersection graph node ID of each participant, so that each participant replaces the vector representation of the intersection graph node ID before mean-normalization with the received vector representation of the mean-normalized intersection graph node ID, and each participant trains its own neural network according to the vector representation of the mean-normalized intersection graph node ID for a preset number of iterations.
[0088] In the specific implementation process, each participant sends the vector representation of its respective intersection graph node IDs to the server. The server performs a mean-square operation on the received vector representations of intersection graph node IDs, and then sends the mean-squared vector representations of intersection graph node IDs to the corresponding participants according to the intersection graph node IDs owned by each participant. Each participant replaces the vector representation of the intersection graph node IDs before mean-squared processing with the received mean-squared vector representations of intersection graph node IDs (that is, each participant replaces the original vector representations of intersection graph node IDs with the received mean-squared vector representations of intersection graph node IDs). Each participant then performs the next batch of training until the maximum number of training batches is reached. That is, each participant trains its own neural network according to the mean-squared vector representations of intersection graph node IDs for a preset number of iterations.
[0089] In one feasible scheme, step 103 includes: receiving the N-degree relationship sent by each participant, and sending the N-degree relationships of at least two participants to each participant respectively, so that each participant compares its own N-degree relationship with the N-degree relationships of other participants to generate its own virtual graph node ID to be added;
[0090] Alternatively, step 103 includes: receiving the N-degree relationship sent by each participant, and sending the N-degree relationships of at least two participants to each participant respectively, so that each participant compares its own N-degree relationship with the N-degree relationships of other participants to generate its own virtual edge to be added;
[0091] Alternatively, step 103 includes: receiving the N-degree relationship sent by each participant, and sending the N-degree relationships of at least two participants to each participant respectively, so that each participant compares its own N-degree relationship with the N-degree relationships of other participants to generate its own virtual graph node ID and virtual edge to be added.
[0092] In one feasible scheme, step 1011 includes: receiving encrypted original graph node IDs sent by at least two participants;
[0093] In this embodiment, the encrypted original graph node ID is encrypted data (i.e., the desensitized data).
[0094] Step 1012 includes: determining the intersection graph node IDs between at least two participants based on the encrypted original graph node IDs.
[0095] The following examples illustrate this:
[0096] For example, taking three participants as an example, the three participants hash the graph node IDs according to a specific rule, generating anonymized graph node ID data (i.e., encrypted data). The three participants send the anonymized graph node IDs to the server. The server collects the encrypted graph node IDs sent by the three participants and performs pairwise intersection of the graph node IDs among the participants. If participant A's graph node IDs are {1,2,3,4,5,6}, participant B's graph node IDs are {2,3,7,8,9,10}, and participant C's graph node IDs are {4,5,6,7,8,11,12}, then A∩B={2,3}, A∩C={4,5,6}, and B∩C={7,8}. The server synchronizes the pairwise intersection results of the graph node IDs of the three participants to each participant. For example, the server sends the results to participant A's common graph nodes (i.e., intersection node IDs) {2,3,4,5,6}, to participant B's common graph nodes {2,3,7,8}, and to participant C's common graph nodes {4,5,6,7,8}. The three participants train their Graph Embedding node vectors, meaning each participant iterates the training process the same number of times simultaneously. Before training the Graph Embedding node vectors, virtual graph nodes and / or virtual edges need to be added to each participant's graph based on the common graph nodes. This allows each participant to train its neural network more thoroughly. The process of adding virtual graph nodes and / or virtual edges is as follows: Figure 4 As shown, participant A adds a virtual edge between graph nodes 4 and 5. The reason for this second-degree relationship is that there is a closer distance relationship between graph nodes 4 and 5 in participant C's graph (i.e., participant A adds a virtual edge between its own graph nodes 4 and 5 based on the distance relationship between graph nodes 4 and 5 in participant C). Participant B adds a virtual graph node and two virtual edges between graph nodes 2 and 3. The reason for this is that there are two distance relationships between graph nodes 2 and 3 in participant A's graph. Therefore, participant B adds a virtual graph node x', and the virtual edges between 2 and x' and 3 and x' form two virtual distance relationships between graph nodes 2 and 3 in participant B's graph. Similarly, participant C adds a virtual edge between graph nodes 7 and 8 because there is a closer distance relationship between graph nodes 7 and 8 in participant B's graph. The process of adding virtual graph nodes and virtual edges is performed between participants, and the addition process does not require server participation in the calculation.
[0097] After the three participants add virtual graph nodes and virtual edges (virtual edges can increase normalized weight values), each participant performs its own graph embedding training process. After training completes the same number of iterations, each participant sends the training result vector corresponding to the common graph node to the server. The server performs a mean-square operation on the received common graph node vector, such as... Figure 5As shown, the mean-normalized result vector is sent to the corresponding participants according to the common graph nodes owned by the three participants. For example, the mean-normalized graph node vectors 2, 3, 4, 5, and 6 are synchronized to participant A, the mean-normalized graph node vectors 2, 3, 7, and 8 are synchronized to participant B, and the mean-normalized graph node vectors 4, 5, 6, 7, and 8 are synchronized to participant C. The mean-normalized graph node vectors of the three participants replace the corresponding original node vectors, and the three participants then proceed to the next batch of training until the maximum number of training batches is reached. It should be noted that the maximum number of training batches is set according to the actual situation.
[0098] In this embodiment, federated learning is a machine learning framework that addresses the dilemma of data silos and data privacy. It is a solution proposed by multiple institutions and scholars that can effectively help multiple institutions to use data and perform machine learning modeling while meeting the requirements of user privacy protection, data security and government regulations.
[0099] Furthermore, the use of graph data structures for machine learning modeling is gaining increasing attention, especially in industries such as finance and e-commerce. Graph data structures have inherent advantages; their vertex-edge structure naturally resembles the real world, intuitively representing entities and their corresponding relationships. Using this natural graph data structure as input for machine learning makes modeling, classification, and regression tasks easier and more accurate. However, the accuracy of the low-dimensional vector representation of graph nodes is crucial. Excellent and complete node vector representations directly impact the modeling results of downstream machine learning. This embodiment uses federated graph embedding training with multiple participant business graph datasets, ensuring that each participant can accurately obtain more effective graph node vector representations without disclosing their local source data.
[0100] It should be noted that during the federated graph node embedding calculation process, each participant cannot directly obtain the actual node or edge data of the others, thus protecting the graph data of each participant. Furthermore, the federated graph node embedding method in this embodiment is more reasonable and effective than the node vectors obtained by each participant training independently.
[0101] This embodiment performs federated graph node embedding calculations based on multiple participants, synchronizes the mean vectors of intersection graph nodes, and adds virtual graph nodes and / or virtual edges. The actual values of their respective graph data are not disclosed to each other. Federated graph embedding training is performed using the graph node IDs of multiple participants. While ensuring that each participant does not disclose its local source data, a more effective graph node vector representation can be accurately obtained.
[0102] Example 2
[0103] This embodiment provides a graph node embedding system, such as... Figure 6 As shown, the embedded system includes a determining module 21, a first sending module 22, and a first processing module 23;
[0104] Module 21 is used to determine the intersection graph node IDs between at least two participants;
[0105] In this embodiment, the entire process requires a server to execute, which is used to collect relevant encrypted data and perform related calculations. It should be noted that the server can be a central server; the encrypted data refers to the encrypted graph node IDs.
[0106] In the specific implementation process, the intersection graph node ID between at least two participants is determined by the server;
[0107] In this embodiment, the participants can be different banks, different operators, or other entities; no specific limitations are made here.
[0108] In this embodiment, a graph is used as an abstract data structure to represent the relationships between multiple objects. It is described using vertices, edges, and properties. Vertices represent objects, edges represent the relationships between objects, and properties represent the specific values of each vertex object.
[0109] In this embodiment, graph embedding assigns a fixed-length vector representation to each node in the graph. Graph embedding captures information such as the graph's topology and the relationships between vertices.
[0110] In this embodiment, the intersection node ID is the same as the common node ID.
[0111] The first sending module 22 is used to send the intersection graph node IDs to each participant respectively, so that each participant can calculate and send its own N-degree relationship based on the received intersection graph node IDs;
[0112] In this embodiment, the server sends the intersection graph node IDs to each participant. Each participant calculates its own N-degree relationship based on the received intersection graph node IDs and sends its own N-degree relationship to the server.
[0113] In this embodiment, N-degree relationship refers to a relationship within N degrees, or an N-hop neighbor relationship. An N-degree relationship can be a first-degree relationship, a second-degree relationship, a third-degree relationship, or a relationship of other values.
[0114] The first processing module 23 is used to receive the N-degree relationship sent by each participant and send the N-degree relationship of at least two participants to each participant respectively, so that each participant can calculate the virtual graph to be added based on the N-degree relationship of other participants. Each participant trains its own neural network according to the original graph node ID after adding the virtual graph and according to the preset number of iterations. Each participant obtains and sends the vector representation of its own intersection graph node ID from the trained neural network.
[0115] In this embodiment, the server receives the N-degree relationship sent by each participant and sends the N-degree relationships of at least two participants to each participant respectively. Each participant calculates its own virtual graph to be added based on the N-degree relationships of other participants. Each participant trains its own neural network according to the original graph node IDs after adding the virtual graph and according to the preset number of iterations. Each participant obtains and sends the vector representation of its own intersection graph node IDs from the trained neural network.
[0116] In this embodiment, the virtual graph includes virtual graph nodes and / or virtual edges.
[0117] In this embodiment, the neural network is a graph neural network. It should be noted that a graph neural network is a general term for algorithms that use neural networks to learn graph structure data, extract and discover features and patterns in graph structure data, and meet the needs of graph learning tasks such as clustering, classification, prediction, segmentation, and generation.
[0118] It should be noted that the preset number of training iterations should be set according to the actual situation, and no specific limit is set here.
[0119] In a feasible solution, such as Figure 6 As shown, the determining module 21 includes a receiving unit 211 and a determining unit 212;
[0120] The receiving unit 211 is used to receive the original graph node IDs sent by at least two participants;
[0121] The determining unit 212 is used to determine the intersection graph node IDs between at least two participants based on the original graph node IDs.
[0122] In the implementation process, each participant performs a hash function on the graph node ID according to a specific rule, generating anonymized graph node IDs (graph node IDs can be users' mobile phone numbers, ID card numbers, or other numbers) data (i.e., encrypted data). Each participant sends the anonymized graph node IDs to the server. The server collects the encrypted graph node IDs sent by each participant and performs pairwise intersection, three-way intersection, or multiple-way intersection of the node IDs among the participants.
[0123] In a feasible solution, such as Figure 6 As shown, the embedded system also includes a receiving module 24, a second processing module 25, and a second transmitting module 26;
[0124] The receiving module 24 is used to receive vector representations of intersection graph node IDs sent by at least two participants;
[0125] The second processing module 25 is used to perform mean-normalization on the vector representation of the intersection graph node IDs to obtain the mean-normalized vector representation of the intersection graph node IDs.
[0126] The second sending module 26 is used to send the vector representation of the mean-normalized intersection graph node ID to the corresponding participant according to the intersection graph node ID of each participant, so that each participant replaces the vector representation of the intersection graph node ID before mean-normalization with the received vector representation of the mean-normalized intersection graph node ID, and each participant trains its own neural network according to the vector representation of the mean-normalized intersection graph node ID according to a preset number of iterations.
[0127] In the specific implementation process, each participant sends the vector representation of its respective intersection graph node IDs to the server. The server performs a mean-square operation on the received vector representations of intersection graph node IDs, and then sends the mean-squared vector representations of intersection graph node IDs to the corresponding participants according to the intersection graph node IDs owned by each participant. Each participant replaces the vector representation of the intersection graph node IDs before mean-squared processing with the received mean-squared vector representations of intersection graph node IDs (that is, each participant replaces the original vector representations of intersection graph node IDs with the received mean-squared vector representations of intersection graph node IDs). Each participant then performs the next batch of training until the maximum number of training batches is reached. That is, each participant trains its own neural network according to the mean-squared vector representations of intersection graph node IDs for a preset number of iterations.
[0128] In one feasible scheme, the first processing module 23 is used to receive the N-degree relationship sent by each participant, and send the N-degree relationships of at least two participants to each participant respectively, so that each participant compares its own N-degree relationship with the N-degree relationships of other participants to generate its own virtual graph node ID to be added;
[0129] Alternatively, the first processing module 23 is used to receive the N-degree relationship sent by each participant, and send the N-degree relationships of at least two participants to each participant respectively, so that each participant can compare its own N-degree relationship with the N-degree relationships of other participants to generate the virtual edges to be added to each participant.
[0130] Alternatively, the first processing module 23 is used to receive the N-degree relationship sent by each participant, and send the N-degree relationships of at least two participants to each participant respectively, so that each participant can compare its own N-degree relationship with the N-degree relationships of other participants to generate its own virtual graph node ID and virtual edge to be added.
[0131] In one feasible scheme, the receiving unit 211 is specifically used to receive the encrypted original graph node IDs sent by at least two participants;
[0132] In this embodiment, the encrypted original graph node ID is encrypted data (i.e., the desensitized data).
[0133] The determining unit 212 is specifically used to determine the intersection graph node ID between at least two participants based on the encrypted original graph node ID.
[0134] The following examples illustrate this:
[0135] For example, taking three participants as an example, the three participants hash the graph node IDs according to a specific rule, generating anonymized graph node ID data (i.e., encrypted data). The three participants send the anonymized graph node IDs to the server. The server collects the encrypted graph node IDs sent by the three participants and performs pairwise intersection of the graph node IDs among the participants. If participant A's graph node IDs are {1,2,3,4,5,6}, participant B's graph node IDs are {2,3,7,8,9,10}, and participant C's graph node IDs are {4,5,6,7,8,11,12}, then A∩B={2,3}, A∩C={4,5,6}, and B∩C={7,8}. The server synchronizes the pairwise intersection results of the graph node IDs of the three participants to each participant. For example, the server sends the results to participant A's common graph nodes (i.e., intersection node IDs) {2,3,4,5,6}, to participant B's common graph nodes {2,3,7,8}, and to participant C's common graph nodes {4,5,6,7,8}. The three participants train their Graph Embedding node vectors, meaning each participant iterates the training process the same number of times simultaneously. Before training the Graph Embedding node vectors, virtual graph nodes and / or virtual edges need to be added to each participant's graph based on the common graph nodes. This allows each participant to train its neural network more thoroughly. The process of adding virtual graph nodes and / or virtual edges is as follows: Figure 4As shown, participant A adds a virtual edge between graph nodes 4 and 5. The reason for this second-degree relationship is that there is a closer distance relationship between graph nodes 4 and 5 in participant C's graph (i.e., participant A adds a virtual edge between its own graph nodes 4 and 5 based on the distance relationship between graph nodes 4 and 5 in participant C). Participant B adds a virtual graph node and two virtual edges between graph nodes 2 and 3. The reason for this is that there are two distance relationships between graph nodes 2 and 3 in participant A's graph. Therefore, participant B adds a virtual graph node x', and the virtual edges between 2 and x' and 3 and x' form two virtual distance relationships between graph nodes 2 and 3 in participant B's graph. Similarly, participant C adds a virtual edge between graph nodes 7 and 8 because there is a closer distance relationship between graph nodes 7 and 8 in participant B's graph. The process of adding virtual graph nodes and virtual edges is performed between participants, and the addition process does not require server participation in the calculation.
[0136] After the three participants add virtual graph nodes and virtual edges (virtual edges can increase normalized weight values), each participant performs its own graph embedding training process. After training completes the same number of iterations, each participant sends the training result vector corresponding to the common graph node to the server. The server performs a mean-square operation on the received common graph node vector, such as... Figure 5 As shown, the mean-normalized result vector is sent to the corresponding participants according to the common graph nodes owned by the three participants. For example, the mean-normalized graph node vectors 2, 3, 4, 5, and 6 are synchronized to participant A, the mean-normalized graph node vectors 2, 3, 7, and 8 are synchronized to participant B, and the mean-normalized graph node vectors 4, 5, 6, 7, and 8 are synchronized to participant C. The mean-normalized graph node vectors of the three participants replace the corresponding original node vectors, and the three participants then proceed to the next batch of training until the maximum number of training batches is reached. It should be noted that the maximum number of training batches is set according to the actual situation.
[0137] In this embodiment, federated learning is a machine learning framework that addresses the dilemma of data silos and data privacy. It is a solution proposed by multiple institutions and scholars that can effectively help multiple institutions to use data and perform machine learning modeling while meeting the requirements of user privacy protection, data security and government regulations.
[0138] Furthermore, the use of graph data structures for machine learning modeling is gaining increasing attention, especially in industries such as finance and e-commerce. Graph data structures have inherent advantages; their vertex-edge structure naturally resembles the real world, intuitively representing entities and their corresponding relationships. Using this natural graph data structure as input for machine learning makes modeling, classification, and regression tasks easier and more accurate. However, the accuracy of the low-dimensional vector representation of graph nodes is crucial. Excellent and complete node vector representations directly impact the modeling results of downstream machine learning. This embodiment uses federated graph embedding training with multiple participant business graph datasets, ensuring that each participant can accurately obtain more effective graph node vector representations without disclosing their local source data.
[0139] It should be noted that during the federated graph node embedding calculation process, each participant cannot directly obtain the actual node or edge data of the others, thus protecting the graph data of each participant. Furthermore, the federated graph node embedding method in this embodiment is more reasonable and effective than the node vectors obtained by each participant training independently.
[0140] This embodiment performs federated graph node embedding calculations based on multiple participants, synchronizes the mean vectors of intersection graph nodes, and adds virtual graph nodes and / or virtual edges. The actual values of their respective graph data are not disclosed to each other. Federated graph embedding training is performed using the graph node IDs of multiple participants. While ensuring that each participant does not disclose its local source data, a more effective graph node vector representation can be accurately obtained.
[0141] Example 3
[0142] Figure 7 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the graph node embedding method of Embodiment 1. Figure 7 The electronic device 30 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0143] like Figure 7 As shown, the electronic device 30 can be manifested as a general-purpose computing device, such as a server device. The components of the electronic device 30 may include, but are not limited to: at least one processor 31, at least one memory 32, and a bus 33 connecting different system components (including memory 32 and processor 31).
[0144] Bus 33 includes a data bus, an address bus, and a control bus.
[0145] The memory 32 may include volatile memory, such as random access memory (RAM) 321 and / or cache memory 322, and may further include read-only memory (ROM) 323.
[0146] The memory 32 may also include a program / utility 325 having a set (at least one) of program modules 324, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0147] The processor 31 executes various functional applications and data processing by running computer programs stored in the memory 32, such as the graph node embedding method of Embodiment 1 of the present invention.
[0148] Electronic device 30 can also communicate with one or more external devices 34 (e.g., keyboard, pointing device, etc.). This communication can be performed via input / output (I / O) interface 35. Furthermore, the model-generating device 30 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 36. Figure 7 As shown, network adapter 36 communicates with other modules of the model-generated device 30 via bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the model-generated device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems.
[0149] It should be noted that although several units / modules or sub-units / modules of the electronic device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.
[0150] Example 4
[0151] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the graph node embedding method provided in Embodiment 1.
[0152] The readable storage medium may be more specifically adopted, including but not limited to: portable disk, hard disk, random access memory, read-only memory, erasable programmable read-only memory, optical storage device, magnetic storage device, or any suitable combination thereof.
[0153] In a possible implementation, the present invention can also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to execute the graph node embedding method described in Embodiment 1.
[0154] The program code for executing the present invention can be written in any combination of one or more programming languages. The program code can be executed entirely on the user device, partially on the user device, as a standalone software package, partially on the user device and partially on a remote device, or entirely on a remote device.
[0155] While specific embodiments of the present invention have been described above, those skilled in the art should understand that these are merely illustrative examples, and the scope of protection of the present invention is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but all such changes and modifications fall within the scope of protection of the present invention.
Claims
1. A method for embedding graph nodes, characterized in that, The embedding method includes: Determine the intersection graph node IDs between at least two participants; The intersection graph node IDs are sent to each of the participants, so that each participant can calculate and send its own N-degree relationship based on the received intersection graph node IDs; The system receives the N-degree relationship sent by each participant and sends the N-degree relationship of at least two participants to each participant respectively, so that each participant generates its own virtual graph to be added based on the N-degree relationship of other participants. Each participant trains its own neural network according to the original graph node ID after adding the virtual graph and according to the preset number of iterations. Each participant obtains and sends the vector representation of its own intersection graph node ID from the trained neural network. The step of determining the intersection graph node IDs between the at least two participants includes: Receive the original graph node IDs sent by at least two participants; Determine the intersection graph node ID between the at least two participants based on the original graph node ID; And / or, The embedding method further includes: Receive vector representations of the intersection graph node IDs sent by the at least two participating parties; The vector representation of the intersection graph node ID is averaged to obtain the averaged vector representation of the intersection graph node ID; The vector representation of the mean-normalized intersection graph node ID is sent to the corresponding participant according to the intersection graph node ID of each participant, so that each participant replaces the vector representation of the intersection graph node ID before mean-normalization according to the received vector representation of the mean-normalized intersection graph node ID, and each participant trains its own neural network according to the vector representation of the mean-normalized intersection graph node ID according to a preset number of iterations. The step of receiving the N-degree relationship sent by each of the participating parties, and sending the N-degree relationships of the at least two participating parties to each of the participating parties respectively, so that each participating party generates its own virtual graph to be added based on the N-degree relationships of the other participating parties, includes: The system receives the N-degree relationship sent by each of the participating parties, and sends the N-degree relationships of the at least two participating parties to each of the participating parties respectively, so that each participating party compares its own N-degree relationship with the N-degree relationships of the other participating parties, so as to generate its own virtual graph node ID to be added, or generate its own virtual edge to be added, or generate its own virtual graph node ID and virtual edge to be added.
2. The graph node embedding method as described in claim 1, characterized in that, The step of receiving the original graph node IDs sent by at least two participants includes: Receive the encrypted original graph node IDs sent by the at least two participating parties; The step of determining the intersection graph node ID between the at least two participants based on the original graph node ID includes: The intersection graph node ID between the at least two participants is determined based on the encrypted original graph node ID.
3. A graph node embedding system, characterized in that, The embedded system includes a determining module, a first sending module, and a first processing module; The determining module is used to determine the intersection graph node IDs between at least two participants; The first sending module is used to send the intersection graph node IDs to each of the participants, so that each participant can calculate and send its own N-degree relationship based on the received intersection graph node IDs; The first processing module is used to receive the N-degree relationship sent by each of the participants, and send the N-degree relationships of the at least two participants to each of the participants respectively, so that each participant generates its own virtual graph to be added based on the N-degree relationships of other participants. Each participant trains its own neural network according to the original graph node ID after adding the virtual graph and according to a preset number of iterations. Each participant obtains and sends the vector representation of its own intersection graph node ID from the trained neural network. The determining module includes a receiving unit and a determining unit; The receiving unit is used to receive the original graph node IDs sent by at least two participants; The determining unit is used to determine the intersection graph node ID between the at least two participants based on the original graph node ID; And / or, The embedded system further includes a receiving module, a second processing module, and a second transmitting module; The receiving module is used to receive the vector representation of the intersection graph node ID sent by the at least two participating parties; The second processing module is used to perform mean-normalization on the vector representation of the intersection graph node IDs to obtain the mean-normalized vector representation of the intersection graph node IDs; The second sending module is used to send the vector representation of the mean-normalized intersection graph node ID to the corresponding participant according to the intersection graph node ID of each participant, so that each participant replaces the vector representation of the intersection graph node ID before mean-normalization according to the received vector representation of the mean-normalized intersection graph node ID, and each participant trains its own neural network according to the vector representation of the mean-normalized intersection graph node ID according to a preset number of iterations. The first processing module is used to receive the N-degree relationship sent by each of the participants, and send the N-degree relationships of the at least two participants to each of the participants respectively, so that each participant compares its own N-degree relationship with the N-degree relationships of the other participants, so as to generate its own virtual graph node ID to be added or generate its own virtual edge to be added or generate its own virtual graph node ID and virtual edge to be added.
4. The graph node embedding system as described in claim 3, characterized in that, The receiving unit is specifically used to receive the encrypted original graph node IDs sent by the at least two participating parties; The determining unit is specifically used to determine the intersection graph node ID between the at least two participants based on the encrypted original graph node ID.
5. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the graph node embedding method as described in any one of claims 1-2.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the graph node embedding method as described in any one of claims 1-2.
Citation Information
Patent Citations
Information interaction system and method suitable for federated learning
CN111553470A
Potential customer identification method and device, equipment and readable computer storage medium
CN112989059A
