Network embedding method, device, electronic device and computer program product based on federated learning network

Through the federated learning network embedding method, the local network matrix is ​​encrypted and integrated and decomposed using a preset mask matrix, which solves the problem of poor data security of network embedding in a distributed environment and realizes the generation of a global embedding matrix with data security.

CN120321055BActive Publication Date: 2025-09-16PEKING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510820047.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-16
Estimated Expiration
2045-06-18

AI Technical Summary

Technical Problem

In a distributed environment, existing technologies cannot effectively solve the problem of poor data security embedded in the network, especially in terms of privacy protection across data centers, multi-party collaborative computing and large-scale data processing.

Method used

A network embedding method based on federated learning is adopted. The local network matrix is ​​encrypted by using a preset mask matrix to generate a local encrypted matrix, which is then integrated and decomposed on the embedding server side to finally generate a global encrypted matrix to ensure data security.

Benefits of technology

The data security of network embedding in a distributed environment is realized, ensuring that the local data of the data holder is not leaked and the embedded server cannot restore the original data, thus achieving the purpose of data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120321055B_ABST
    Figure CN120321055B_ABST
Patent Text Reader

Abstract

The present invention discloses a network embedding method, device, electronic device, and computer program product based on a federated learning network. The method comprises: obtaining local network matrices of multiple data holders in a federated learning network, wherein the data holders are participants in the federated learning network, the federated learning network is pre-divided into multiple local learning networks, and the local network matrix is ​​a matrix representation of the local learning network; encrypting the local network matrix using a preset mask matrix to obtain a local encryption matrix; uploading the local encryption matrices corresponding to the multiple data holders to an embedding server, and receiving a global encryption matrix obtained by integrating the multiple local encryption matrices from the embedding server; and decrypting the global encryption matrix based on the preset mask matrix to obtain a global embedding matrix. The present invention solves the technical problem of poor data security in network embedding in a distributed environment in the prior art.
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, and in particular to a network embedding method, device, electronic device and computer program product based on a federated learning network. Background Art

[0002] With the widespread adoption of federated learning (FL), achieving privacy-preserving network embedding (NE) in distributed environments has become increasingly important. Network embedding, a technique that maps network nodes into a low-dimensional vector space, is widely used in fields such as financial fraud detection and recommender systems. However, traditional network embedding methods mostly adopt a centralized approach, requiring data to be processed on a single server. This is impractical in today's distributed big data environments.

[0003] In distributed scenarios, data is typically stored in data centers across multiple locations, with each data center holding a portion of user or subgraph data. In this context, implementing cross-data center unsupervised network embedding (UNE) faces numerous challenges, including privacy protection, multi-party collaborative computation, and large-scale data processing.

[0004] In addition, in the distributed subgraph scenario, if the participants only hold some of the network nodes and edges, the traditional centralized approach is not applicable.

[0005] Current research on network embedding focuses on centralized methods, such as DeepWalk (random walk algorithm), LINE (Large-scale Information Network Embedding), Node2Vec (node ​​vector generation), and NetMF and NetSMF based on matrix factorization (MF). These methods perform well in single-datacenter environments, but suffer from the following drawbacks in distributed environments:

[0006] 1. Insufficient privacy protection: The centralized approach requires all data to be concentrated on a single server, which conflicts with the privacy protection requirements of distributed data.

[0007] 2. Lack of cross-data center solutions: Existing methods cannot be directly applied to distributed data scenarios with privacy protection requirements.

[0008] 3. Unable to cope with large-scale networks: Traditional methods have too high computing and storage costs when dealing with large-scale networks with millions of nodes.

[0009] Currently, only a few methods attempt to solve the problem of unsupervised network embedding in distributed environments, such as FedWalk (Federated Random Walk). However, these methods are only applicable to single-node (ego-level) network embedding scenarios and cannot meet the embedding requirements of distributed subgraph scenarios.

[0010] With respect to the problem of poor data security in network embedding in a distributed environment in the above-mentioned prior art, no effective solution has been proposed so far. Summary of the Invention

[0011] The embodiments of the present invention provide a network embedding method, device, electronic device and computer program product based on a federated learning network, so as to at least solve the technical problem of poor data security in the prior art of implementing network embedding in a distributed environment.

[0012] According to one aspect of an embodiment of the present invention, a network embedding method based on a federated learning network is provided, comprising: obtaining local network matrices of multiple data holders in the federated learning network, wherein the data holders are participants of the federated learning network, the federated learning network is pre-divided into multiple local learning networks, and the local network matrices are matrix representations of the local learning networks; encrypting the local network matrices using a preset mask matrix to obtain local encrypted matrices; uploading the local encrypted matrices corresponding to the multiple data holders to an embedding server, and receiving a global encrypted matrix obtained by the embedding server based on the integration of the multiple local encrypted matrices, wherein the global encrypted matrix is ​​a result of the embedding server decomposing the integration result based on the multiple local encrypted matrices; decrypting the global encrypted matrix based on the preset mask matrix to obtain a global embedding matrix, wherein the global embedding matrix is ​​the network embedding result of the federated learning network.

[0013] Optionally, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network, and obtaining the local network matrices of multiple data holders in the federated learning network includes: counting the number of nodes of the data holders in the federated learning network; when the number of nodes meets the first order of magnitude, performing a graph structure analysis on the local learning network local to each data holder to obtain the local adjacency matrix and the local degree matrix corresponding to the local learning network; when the number of nodes meets the second order of magnitude, performing path sampling on the local learning network local to each data holder to generate the local adjacency matrix and the local degree matrix corresponding to the local learning network, wherein the second order of magnitude is greater than the first order of magnitude.

[0014] Optionally, when the number of nodes conforms to the second order of magnitude, path sampling is performed on the local learning network locally of each data holder to generate the local adjacency matrix and the local degree matrix corresponding to the local learning network, including: when the number of nodes conforms to the second order of magnitude, random walks are performed on the local learning network locally of each data holder to generate a path set, wherein the local learning network includes multiple nodes, and the path set includes multiple path information generated by random walks based on multiple preset starting points, the preset starting point is the node predetermined as the starting point, and each path information is a sequence of multiple nodes; based on the path set, the local adjacency matrix and the local degree matrix corresponding to the local learning network are determined, wherein the elements in the local adjacency matrix are determined according to the adjacent situation of any two nodes in multiple paths, and the elements in the local degree matrix are determined according to the number of different nodes adjacent to the node in the multiple path information.

[0015] Optionally, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network, and the local adjacency matrix is ​​encrypted using a preset mask matrix to obtain a local encrypted matrix, including: when the number of nodes in the federated learning network conforms to the first order of magnitude, each data holder combines the local adjacency matrix and the local degree matrix to obtain a combined polynomial matrix; receives the preset mask matrix pre-generated by the mask server, wherein the mask server pre-generates a random orthogonal matrix as the preset mask matrix; and combines the random orthogonal matrix with the combined polynomial matrix to obtain a local encrypted matrix for each data holder.

[0016] Optionally, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network, and the local adjacency matrix is ​​encrypted using a preset mask matrix to obtain a local encrypted matrix. The method includes: when the number of nodes in the federated learning network meets the second order of magnitude, each data holder uploads the local degree matrix to the embedded server respectively, and receives a global degree matrix returned by the embedded server based on multiple local degree matrices; based on the local degree matrix and Laplace matrix of the same data holder, and the global degree matrix, determining a random walk polynomial matrix, wherein the Laplace matrix is ​​determined according to the difference between the local adjacency matrix and the local degree matrix of the same data holder, and the random walk polynomial matrix is ​​expressed as: , i is the data holder, is the random walk polynomial matrix of the data holder, D is the global degree matrix, is the local degree matrix of the data holder, is the Laplace matrix of the data holder; performing federated power iteration on the random walk polynomial matrix according to a preset number of iterations to generate a random walk submatrix, wherein the federated power iteration is used to indicate that the random walk polynomial matrix is ​​projected into a low-dimensional space; and encrypting the random walk submatrix using the preset mask matrix to obtain a local encrypted matrix.

[0017] Optionally, each step of the federated power iteration includes: each data holder uses the preset mask matrix to encrypt the random walk polynomial matrix to obtain a local pre-encryption matrix; uploading the local pre-encryption matrix to the embedded server, wherein the embedded server is used to aggregate multiple local pre-encryption matrices to obtain a global pre-encryption matrix, and perform coefficient matrix decomposition on the global pre-encryption matrix to obtain an intermediate result matrix, and the intermediate result matrix is ​​a masked orthogonal matrix; receiving the intermediate result matrix returned by the embedded server, and removing the mask in the intermediate result matrix according to the preset mask matrix to obtain an intermediate encrypted matrix, wherein, when the number of iterations reaches the preset number of iterations, the intermediate encrypted matrix is ​​the random walk submatrix; when the number of iterations does not reach the preset number of iterations, the intermediate encrypted matrix is ​​the random walk polynomial matrix of the next iteration.

[0018] Optionally, the method further includes: aggregating the local encryption matrices uploaded by multiple data holders respectively through the embedded server to obtain a global aggregate matrix; and performing singular value decomposition on the global aggregate matrix to generate the global encryption matrix.

[0019] According to another aspect of an embodiment of the present invention, a network embedding device based on a federated learning network is also provided, including: an acquisition module, used to obtain local network matrices of multiple data holders in the federated learning network, wherein the data holders are participants of the federated learning network, the federated learning network is pre-divided into multiple local learning networks, and the local network matrix is ​​a matrix representation of the local learning network; an encryption module, used to encrypt the local network matrix using a preset mask matrix to obtain a local encryption matrix; an upload module, used to upload the local encryption matrices corresponding to the multiple data holders to an embedding server, and receive a global encryption matrix obtained by the embedding server based on the integration of the multiple local encryption matrices, wherein the global encryption matrix is ​​the result of the embedding server decomposing the integration result based on the multiple local encryption matrices; a decryption module, used to decrypt the global encryption matrix based on the preset mask matrix to obtain a global embedding matrix, wherein the global embedding matrix is ​​the network embedding result of the federated learning network.

[0020] According to another aspect of an embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned network embedding method based on the federated learning network through the computer program.

[0021] According to another aspect of an embodiment of the present invention, a computer program product is further provided, comprising computer instructions, which, when executed by a processor, implement the steps of the above-mentioned network embedding method based on a federated learning network.

[0022] In an embodiment of the present invention, each data holder in the federated learning network uploads a local encryption matrix encrypted by a preset mask matrix to the embedding server, ensuring that all intermediate calculation results in the embedding process are in encrypted form, ensuring that the local data of the data holder will not be leaked, and the embedding server cannot restore the original data of the data holder, thereby achieving the purpose of ensuring data security, thereby realizing the technical effect of realizing data security of network embedding in a distributed environment, and further solving the technical problem of poor data security of network embedding in a distributed environment in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0024] Figure 1 is a flowchart of a network embedding method based on a federated learning network according to an embodiment of the present invention;

[0025] Figure 2 is a schematic diagram of a federated sparse matrix factorization algorithm (FedNetSMF) according to an embodiment of the present invention;

[0026] Figure 3 is a schematic diagram of a privacy-preserving unsupervised federated network embedding method according to an embodiment of the present invention;

[0027] Figure 4 is a schematic diagram of a network embedding device based on a federated learning network according to an embodiment of the present invention;

[0028] Figure 5 It is a structural block diagram of a computer terminal according to an embodiment of the present invention. DETAILED DESCRIPTION

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

[0030] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] According to an embodiment of the present invention, an embodiment of a network embedding method based on a federated learning network is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] Figure 1 is a flow chart of a network embedding method based on a federated learning network according to an embodiment of the present invention. Figure 1 As shown, the method includes the following steps:

[0033] Step S102: obtaining local network matrices of multiple data holders in the federated learning network, wherein the data holders are participants in the federated learning network, the federated learning network is pre-divided into multiple local learning networks, and the local network matrices are matrix representations of the local learning networks;

[0034] Step S104: encrypting the local network matrix using a preset mask matrix to obtain a local encrypted matrix;

[0035] Step S106: Upload the local encryption matrices corresponding to the multiple data holders to the embedded server, and receive a global encryption matrix obtained by integrating the multiple local encryption matrices. The global encryption matrix is ​​a result of the embedded server decomposing the integration result based on the multiple local encryption matrices.

[0036] Step S108: decrypt the global encryption matrix based on a preset mask matrix to obtain a global embedding matrix, where the global embedding matrix is ​​a network embedding result of the federated learning network.

[0037] In an embodiment of the present invention, each data holder in the federated learning network uploads a local encryption matrix encrypted by a preset mask matrix to the embedding server, ensuring that all intermediate calculation results in the embedding process are in encrypted form, ensuring that the local data of the data holder will not be leaked, and the embedding server cannot restore the original data of the data holder, thereby achieving the purpose of ensuring data security, thereby realizing the technical effect of realizing data security of network embedding in a distributed environment, and further solving the technical problem of poor data security of network embedding in a distributed environment in the prior art.

[0038] In the above step S102, the federated learning network includes multiple data holders and at least one embedded server, wherein the federated learning network can be divided into multiple local learning networks, each data holder is assigned a local learning network, and each data holder can train the assigned local learning network based on local data. The local learning networks trained by multiple data holders can be sent to the embedded server for integration to obtain the trained federated learning network, thereby realizing distributed training of the federated learning network.

[0039] In the above step S102, the federated learning network can perform distributed learning on the graph neural network.

[0040] It should be noted that the learning network can describe the nodes and the connection relationships of the nodes in the learning network through the degree matrix and the adjacency matrix. Among them, the adjacency matrix mainly describes the connection relationship between nodes, and the degree matrix mainly describes the degree of the node, that is, the number of connections between each node and other nodes.

[0041] Optionally, the degree matrix and the adjacency matrix can be combined to obtain a Laplacian matrix for describing the overall structure of the learning network.

[0042] In the above step S104, the preset mask matrix is ​​a pre-generated orthogonal matrix. Each data holder can use the preset mask matrix as a mask of the local network matrix to encrypt the local network matrix.

[0043] In the above step S106, the embedded server can integrate the local network matrices uploaded by multiple data holders to obtain the global network matrix of the federated learning network. Furthermore, since the local encrypted matrices uploaded by the data holders are encrypted using a preset mask matrix, the embedded server can directly integrate the local encrypted matrices without decrypting them, and can integrate the global network matrix that has been encrypted by the preset mask matrix, that is, the global aggregation matrix.

[0044] This application uses a random orthogonal matrix as a mask (preset mask matrix) to ensure that the original data of each participant (that is, the data holder) will not be leaked during the federated network embedding process.

[0045] Optionally, the data holder generates a local encryption matrix locally and collaborates with other parties in calculations using a preset mask matrix. The entire process is coordinated by a semi-honest central server (such as an embedded server). This masking mechanism protects the sensitive information of the participants (i.e., the data holders) while ensuring the accuracy of the calculation results.

[0046] It should be noted that network embedding is a technology that maps nodes or edges in graph-structured data (such as social networks, knowledge graphs, etc.) to a low-dimensional vector space. It aims to preserve the structure and semantic information of the graph to facilitate the processing and analysis of machine learning tasks.

[0047] In the above step S106, network embedding needs to be performed based on the global network of the federated learning network. Therefore, the network embedding process needs to be executed by the embedding server. Then, when the embedding server integrates the local network matrices uploaded by multiple data holders into a global network matrix, it can decompose the global network matrix. The result of the decomposition is the global embedding matrix of the federated learning network.

[0048] It should be noted that since the data holder uploads a local encryption matrix encrypted by a preset mask matrix, the embedded server cannot decrypt the local encryption matrix. Therefore, the embedded server can integrate and decompose based on the encrypted local encryption matrix, and the global encryption matrix obtained is equivalent to the global embedded matrix encrypted by the preset mask matrix.

[0049] In the above step S108, since the global encryption matrix is ​​determined based on the local encryption matrix, and the local encryption matrix is ​​encrypted by the data holder using a preset mask matrix, the global encryption matrix is ​​equivalent to the global embedding matrix encrypted using the preset mask matrix, and the data holder holds the preset mask matrix. Then, after receiving the global encryption matrix, the data holder can decrypt the global encryption matrix based on the preset mask matrix to obtain the global embedding matrix, thereby obtaining the network embedding result of the federated learning network and ensuring that the network embedding result cannot be stolen by objects other than the data holder.

[0050] As an optional embodiment, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network. Obtaining the local network matrices of multiple data holders in the federated learning network includes: counting the number of nodes in the federated learning network, wherein the number of nodes is the number of nodes with data processing capabilities; when the number of nodes meets the first order of magnitude, performing a graph structure analysis on the local learning network of each data holder to obtain the local adjacency matrix and local degree matrix corresponding to the local learning network; when the number of nodes meets the second order of magnitude, performing path sampling on the local learning network of each data holder to generate the local adjacency matrix and local degree matrix corresponding to the local learning network, wherein the second order of magnitude is greater than the first order of magnitude.

[0051] The above embodiments of the present application can be divided into small and medium-sized networks and large-scale networks according to the number of nodes in the federated learning network. Among them, the number of nodes in the small and medium-sized networks is not large, and the connection relationship and number of connections between the nodes can be directly obtained through graph structure analysis. However, the number of nodes in the large-scale network is too large, and the direct use of graph structure analysis has a slow analysis speed and low efficiency. Therefore, different strategies can be used for federated learning networks of different sizes to obtain the local network matrix of each data holder, thereby improving the efficiency of obtaining the local network matrix.

[0052] It should be noted that if the number of nodes in the federated learning network is large, the number of nodes in the local learning networks divided from the federated learning network will also be large. Therefore, counting the number of nodes in the federated learning network can also be achieved by counting the number of nodes in the local learning network of the data holder.

[0053] Optionally, the first order of magnitude may be an order of magnitude set for small and medium-sized networks. When the number of nodes meets the first order of magnitude, it indicates that the federated learning network is a small and medium-sized network. Then, the strategy pre-configured for small and medium-sized networks may be used to obtain the local learning network of each data holder.

[0054] Optionally, the second order of magnitude may be an order of magnitude set for a large-scale network. When the number of nodes meets the second order of magnitude, it indicates that the federated learning network is a large-scale network, and then the local learning network of each data holder can be obtained using a strategy pre-configured for a large-scale network.

[0055] As an optional embodiment, when the number of nodes conforms to the second order of magnitude, path sampling is performed on the local learning network of each data holder to generate a local adjacency matrix and a local degree matrix corresponding to the local learning network, including: when the number of nodes conforms to the second order of magnitude, a random walk is performed on the local learning network of each data holder to generate a path set, wherein the local learning network includes multiple nodes, and the path set includes multiple path information generated by random walks based on multiple preset starting points, the preset starting point is a node predetermined as the starting point, and each path information is a sequence of multiple nodes; according to the path set, the local adjacency matrix and local degree matrix corresponding to the local learning network are determined, wherein the elements in the local adjacency matrix are determined according to the adjacent situation of any two nodes in multiple paths, and the elements in the local degree matrix are determined according to the number of different nodes adjacent to the node in multiple path information.

[0056] In the above-mentioned embodiment of the present application, when the number of nodes conforms to the second order of magnitude, that is, when the federated learning network is a large-scale network, a random walk can be performed on the local learning network of the data holder based on the path sampling method, and multiple path information is generated based on the nodes in the local learning network to obtain a path set. Then, based on the path information in the path set, the connection relationship between the nodes in the local learning network and the number of connections between each node and other nodes can be determined. Therefore, based on the multiple path information in the path set, the local adjacency matrix and local degree matrix corresponding to the local learning network can be determined. Therefore, through the path sampling method, the local network matrix of each local learning network of the federated learning network belonging to the large-scale network can be obtained.

[0057] It should be noted that path sampling is a key technology for generating sparse matrices, which effectively reduces the computational complexity of large-scale networks. The path sampling algorithm generates a path sampling matrix (that is, a matrix representation of multiple path information) by performing random walks on the local network, approximating the global structural relationship of the network. Each data holder performs path sampling independently, randomly sampling a certain number of paths from the nodes of the local network (such as a local learning network). By converting the path into a sparse approximation of the adjacency matrix, the data holder generates a sparse network. The Laplace matrix calculated based on the sparse network It is further used for approximate calculations of polynomial matrices. The design of path sampling combines randomness and sparsity, which can effectively reduce memory and computational overhead and is a basic module for achieving large-scale network embedding.

[0058] As an optional example, different methods can be used for network embedding for federated learning networks or local learning networks of different scales. For example, when the federated learning network or local learning network is a small or medium-sized network, that is, when the number of nodes in the federated learning network is consistent with the first order of magnitude, the Federated Network Matrix Factorization Algorithm (FedNetMF) can be used; when the federated learning network or local learning network is a large-scale network, that is, when the number of nodes in the federated learning network is consistent with the second order of magnitude, the Federated Sparse Matrix Factorization Algorithm (FedNetSMF) can be used.

[0059] As an optional embodiment, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network, and the local adjacency matrix is ​​encrypted using a preset mask matrix to obtain a local encrypted matrix, including: when the number of nodes in the federated learning network meets the first order of magnitude, each data holder combines the local adjacency matrix and the local degree matrix to obtain a combined polynomial matrix; receives a preset mask matrix pre-generated by a mask server, wherein the mask server pre-generates a random orthogonal matrix as the preset mask matrix; and combines the random orthogonal matrix with the combined polynomial matrix to obtain a local encrypted matrix for each data holder.

[0060] In the above-mentioned embodiment of the present application, when the number of nodes in the federated learning network meets the first order of magnitude, that is, when the federated learning network is a small or medium-sized network, the local network matrix can be encrypted locally at the data holder using a preset mask matrix. The encryption process can be to combine the local adjacency matrix and the local degree matrix to obtain a combined polynomial matrix, and then use the preset mask matrix pre-generated by the mask server to combine the combined polynomial matrix, thereby obtaining a local encryption matrix for each data holder, thereby realizing encryption of the local network matrix.

[0061] As an alternative example, the Federated Network Matrix Factorization (FedNetMF) algorithm is based on the centralized NetMF algorithm and is designed for small and medium-sized networks, achieving lossless embedding results. The FedNetMF algorithm computes the network's polynomial matrix (such as the combined polynomial matrix) through distributed collaboration, ensuring privacy while maintaining embedding accuracy.

[0062] The above embodiment of the present application, the Federated Network Matrix Decomposition Algorithm (FedNetMF), adopts a multi-party joint computing method to realize the matrix decomposition of the network; between data parties, a method combining distributed polynomial matrix calculation and a preset mask matrix is ​​used to ensure data privacy while achieving lossless embedding results. It is suitable for networks with medium node sizes (for example, thousands to tens of thousands of nodes).

[0063] Optionally, each data holder computes the degree matrix of its local network (e.g., local network matrix) (also known as the local degree matrix) and the normalized adjacency matrix (also known as the local adjacency matrix); then, the data holder encrypts the local matrix through the encryption mask matrix to generate the polynomial matrix (that is, the combined polynomial matrix), and the encrypted The data is sent to the embedding server, which aggregates the encryption results from all parties, performs singular value decomposition, and calculates the encrypted global embedding matrix (also known as the global encryption matrix). The global encryption matrix is ​​then distributed back to the data holders, who remove the mask and obtain the final embedding result (also known as the global embedding matrix).

[0064] The above-mentioned federated network matrix decomposition algorithm in this application is suitable for networks with smaller node sizes and can provide embedding quality comparable to that of the centralized NetMF while protecting privacy.

[0065] As an optional embodiment, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network. The local adjacency matrix is ​​encrypted using a preset mask matrix to obtain a local encrypted matrix. The method includes: when the number of nodes in the federated learning network meets the second order of magnitude, each data holder uploads the local degree matrix to the embedded server respectively, and receives the global degree matrix returned by the embedded server based on multiple local degree matrices; based on the local degree matrix and Laplace matrix of the same data holder, and the global degree matrix, determining a random walk polynomial matrix, wherein the Laplace matrix is ​​determined according to the difference between the local adjacency matrix and the local degree matrix of the same data holder, and the random walk polynomial matrix is ​​expressed as: , i is the data holder, is the random walk polynomial matrix of the data holder, D is the global degree matrix, is the local degree matrix of the data holder, is the Laplace matrix of the data holder; the random walk polynomial matrix is ​​subjected to federated power iteration according to a preset number of iterations to generate a random walk submatrix, where the federated power iteration is used to indicate that the random walk polynomial matrix is ​​projected into a low-dimensional space; the random walk submatrix is ​​encrypted using a preset mask matrix to obtain a local encrypted matrix.

[0066] In the above-mentioned embodiment of the present application, when the number of nodes in the federated learning network conforms to the second order of magnitude, that is, when the federated learning network is a large-scale network, the local adjacency matrix and the local degree matrix in the local network matrix are obtained by random walk based on path sampling, and then the data holder and the embedded server can perform federated power iteration for a preset number of iterations, and in the case of federated power iteration, a preset mask matrix is ​​used for encryption to obtain a local encrypted matrix.

[0067] Figure 2 is a schematic diagram of a federated sparse matrix decomposition algorithm (FedNetSMF) according to an embodiment of the present invention, such as Figure 2 As shown in Figure 3, the Federated Sparse Matrix Factorization algorithm (FedNetSMF) is an efficient embedding method for large-scale network design. It generates sparse matrices through path sampling technology, effectively reducing the complexity of calculation and storage.

[0068] Table 1 is a schematic table of a federated sparse matrix decomposition algorithm (FedNetSMF) according to an embodiment of the present invention. As shown in Table 1, various descriptions in the federated sparse matrix decomposition algorithm (FedNetSMF) are explained.

[0069] Table 1

[0070]

[0071] The above embodiment of the present application, the Federated Sparse Matrix Decomposition Algorithm (FedNetSMF), generates a sparse matrix through a path sampling method, which reduces computational and storage overheads while ensuring that the embedding results are consistent with the centralized method within an acceptable range (about 1% accuracy loss). It can handle networks with millions of nodes and is suitable for scenarios with multiple data participants (i.e., multiple data holders).

[0072] Optionally, each data holder performs path sampling on its local network (i.e., local learning network) to generate the Laplacian matrix of the sparse network , and calculate the polynomial matrix (such as random walk polynomial matrix); then, the data holder uses the federated power iteration method to Project to low-dimensional space to generate submatrix ; The data holder will encrypt Sent to the embedding server, the embedding server aggregates all sub-matrices and performs singular value decomposition to generate the final embedding matrix .

[0073] In the above-mentioned embodiment of the present application, the federated sparse matrix decomposition algorithm can effectively operate when the node scale reaches the million level, with only about 1% loss in embedding quality, which is particularly suitable for large-scale distributed network scenarios with limited resources.

[0074] Optionally, for the random walk polynomial matrix Perform federated power iteration according to the preset number of iterations to obtain the first matrix Q M ; The matrix Q M After returning to the data holder, the data holder can get the random walk polynomial matrix Submatrix obtained by projecting into low-dimensional space ; Then the submatrix Perform federated power iteration according to the preset number of iterations to obtain the second matrix Q B , and then the second matrix Q B After returning to the data holder, the second matrix Q B and submatrix Generate random walk matrix C i , use the preset mask matrix to encrypt the random walk submatrix C to obtain a local encryption matrix, and then send the local encryption matrix to the embedding server for integration and decomposition to obtain a global encryption matrix.

[0075] Optionally, the preset number of iterations may be 3 times.

[0076] As an optional embodiment, the steps of each federated power iteration include: each data holder uses a preset mask matrix to encrypt the random walk polynomial matrix to obtain a local pre-encryption matrix; uploading the local pre-encryption matrix to an embedded server, wherein the embedded server is used to aggregate multiple local pre-encryption matrices to obtain a global pre-encryption matrix, and perform coefficient matrix decomposition on the global pre-encryption matrix to obtain an intermediate result matrix, which is a masked orthogonal matrix; receiving the intermediate result matrix returned by the embedded server, and removing the mask in the intermediate result matrix according to the preset mask matrix to obtain an intermediate encrypted matrix, wherein when the number of iterations reaches the preset number of iterations, the intermediate encrypted matrix is ​​a random walk submatrix; when the number of iterations does not reach the preset number of iterations, the intermediate encrypted matrix is ​​the random walk polynomial matrix of the next iteration.

[0077] In the above embodiment of the present application, Federated Power Iteration (FPI) is a multi-party collaborative algorithm for calculating the orthogonal decomposition of a global matrix, which is particularly suitable for large-scale sparse matrices. The core of the algorithm of the federated power iteration is to gradually approximate the matrix's forward principal eigenvectors.

[0078] In the above-mentioned embodiment of the present application, in the sparse matrix decomposition, the federated power iteration algorithm is used to realize the orthogonal decomposition of the global matrix. Each data holder collaborates to complete multiple power iteration steps through a random mask matrix to avoid data leakage and improve the decomposition efficiency of large-scale sparse matrices.

[0079] Optionally, a random orthogonal mask matrix is ​​generated by the mask server and (ie, preset mask matrix) and distribute it to all data holders; each data holder calculates the mask version of its local matrix (such as local network matrix), such as local pre-encrypted matrix , and sends it to the embedding server; the embedding server aggregates all local pre-encrypted matrices and generates an intermediate result matrix, which is then sent back to the data holder for the next round of iteration. After multiple rounds of iteration, the embedding server obtains a masked version of the global orthogonal matrix (such as the global encrypted matrix), and the data holder removes the mask to obtain the final orthogonal matrix (Also, the global embedding matrix.) The design of federated power iteration ensures privacy protection throughout the entire process while significantly improving the efficiency of sparse matrix factorization.

[0080] As an optional embodiment, the method further includes: aggregating local encryption matrices uploaded by multiple data holders through an embedded server to obtain a global aggregate matrix; performing singular value decomposition on the global aggregate matrix to generate a global encryption matrix.

[0081] In the above embodiment of the present application, the embedding server can aggregate the local encrypted matrices uploaded by multiple data holders to obtain a global aggregate matrix. Then, by performing singular value decomposition on the global aggregate matrix, the network embedding result of the federated learning network can be determined, and a global encrypted matrix can be generated, thereby realizing the generation of an encrypted global embedding matrix.

[0082] As an optional embodiment, a secure computing protocol that complies with the MPC privacy definition is adopted during the entire embedding process. A semi-honest central server is responsible for integrating the encryption matrices from all parties, and the semi-honest central server cannot restore the original data. It has been theoretically proven that the data security of the entire process can be guaranteed.

[0083] It should be noted that MPC stands for Multi-Party Computation, which means multi-party secure computing.

[0084] The present invention also provides a preferred embodiment, which provides a privacy-preserving, unsupervised federated network embedding algorithm framework to address the problem of secure network embedding in distributed subgraph scenarios. By designing FedNetMF (Federated Network Matrix Factorization) and FedNetSMF (Federated Sparse Matrix Factorization) specifically for distributed subgraph scenarios, it balances embedding quality, computational efficiency, and privacy protection, enabling efficient and scalable network embedding while protecting data privacy.

[0085] Optionally, this application uses the Federated Network Matrix Factorization algorithm (FedNetMF) and the Federated Network Sparse Matrix Factorization algorithm (FedNetSMF) to target the embedding requirements of small and medium-sized networks and large-scale networks respectively.

[0086] Alternatively, FedNetMF is suitable for small and medium-sized networks and can achieve lossless embedding results with the same accuracy as the centralized method; FedNetSMF is targeted at large-scale networks and uses sparse matrix decomposition technology to balance computational efficiency and embedding quality, adapting to federation scenarios with more participants.

[0087] As an optional example, the privacy-preserving unsupervised federated network embedding algorithm framework is an unsupervised federated network embedding (FNE) method that supports distributed subgraph scenarios. It ensures the privacy of the data of the participants and prevents the leakage of sensitive information in cross-party communication. While ensuring the quality of embedding, it should have good computing and communication efficiency and be able to handle large-scale networks. It supports collaborative embedding calculations of multiple participants and adapts to the growing network scale.

[0088] Figure 3 is a schematic diagram of a privacy-preserving unsupervised federated network embedding method according to an embodiment of the present invention, such as Figure 3 As shown in the figure, each data holder collaborates to complete the embedding task. At the same time, the local adjacency matrix determined based on the local network matrix of each data holder is encrypted through the encrypted mask matrix and federated power iteration (FPI), which can protect data privacy. The embedding server is only responsible for integrating the encrypted intermediate results, ensuring privacy protection throughout the process.

[0089] Table 2 is a schematic diagram of a privacy-preserving unsupervised federated network embedding method according to an embodiment of the present invention. As shown in Table 2, various descriptions of the privacy-preserving unsupervised federated network embedding method are explained.

[0090] Table 2

[0091]

[0092] This application uses an encrypted mask matrix mechanism to ensure that data privacy is not leaked during multi-party collaboration, and through theoretical analysis and experimental verification, the embedding results are close to the centralized method in accuracy.

[0093] This application uses encrypted mask matrices and federated power iteration technology to ensure that all intermediate calculation results during the embedding process are in encrypted form, so that the local data of the participants (i.e., data holders) will not be leaked and the embedded server cannot restore the original data; this privacy protection mechanism complies with the privacy definition of multi-party secure computing (MPC) and can meet the strict data privacy requirements in distributed scenarios; compared with traditional centralized methods, it ensures the data independence and security of all parties while achieving data collaboration.

[0094] The technical solution provided in this application designs a federated sparse matrix factorization algorithm (FedNetSMF) for large-scale network scenarios, which significantly reduces the computational and storage complexity in combination with path sampling technology. Sparse matrix decomposition can handle networks with a node scale of millions, and the computational efficiency is improved by several orders of magnitude compared to traditional methods. At the same time, the application of federated power iteration further optimizes the eigenvector calculation process, so that large-scale network embedding can still be completed efficiently with limited computing resources.

[0095] The technical solution presented in this application achieves embedding results that are nearly identical in accuracy to centralized methods while maintaining privacy protection and computational efficiency. For small and medium-sized networks, the Federated Network Matrix Factorization (FedNetMF) algorithm achieves lossless embedding quality. For large networks, sparse matrix factorization results in only approximately 1% accuracy loss and demonstrates superior macro F1 scores in experiments. This makes the embedding results of this invention suitable for a variety of downstream tasks (such as node classification and link prediction).

[0096] The technical solution proposed in this application utilizes a modular framework design to support a variety of distributed scenarios. It can accommodate multiple participants (i.e., data holders) and is extensible to other network embedding methods based on matrix decomposition. Furthermore, it has broad applicability, including financial fraud detection, social network analysis, and healthcare data analysis. It exhibits excellent scalability and applicability, whether in small-scale collaborative scenarios or distributed computing scenarios within large-scale data centers.

[0097] Compared with existing strategies, the technical solution provided by this application finally solves the problem of secure network embedding in distributed subgraph scenarios; as existing methods are unable to handle the problem of unsupervised network embedding in subgraph scenarios, this application fills the technical gap in this field.

[0098] According to an embodiment of the present invention, an embodiment of a network embedding device based on a federated learning network is also provided. It should be noted that the network embedding device based on a federated learning network can be used to execute the network embedding method based on a federated learning network in an embodiment of the present invention, and the network embedding method based on a federated learning network in an embodiment of the present invention can be executed in the network embedding device based on a federated learning network.

[0099] Figure 4 is a schematic diagram of a network embedding device based on a federated learning network according to an embodiment of the present invention. Figure 4 As shown, the device may include: an acquisition module 42, used to obtain local network matrices of multiple data holders in a federated learning network, wherein the data holders are participants of the federated learning network, the federated learning network is pre-divided into multiple local learning networks, and the local network matrix is ​​a matrix representation of the local learning network; an encryption module 44, used to encrypt the local network matrix using a preset mask matrix to obtain a local encryption matrix; an upload module 46, used to upload the local encryption matrices corresponding to the multiple data holders to the embedding server, and receive a global encryption matrix obtained by the embedding server based on the integration of the multiple local encryption matrices, wherein the global encryption matrix is ​​the result of the embedding server decomposing the integration result based on the multiple local encryption matrices; a decryption module 48, used to decrypt the global encryption matrix based on the preset mask matrix to obtain a global embedding matrix, wherein the global embedding matrix is ​​the network embedding result of the federated learning network.

[0100] It should be noted that the acquisition module 42 in this embodiment can be used to execute step S102 in the embodiment of the present application, the encryption module 44 in this embodiment can be used to execute step S104 in the embodiment of the present application, the upload module 46 in this embodiment can be used to execute step S106 in the embodiment of the present application, and the decryption module 48 in this embodiment can be used to execute step S108 in the embodiment of the present application. The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments.

[0101] In an embodiment of the present invention, each data holder in the federated learning network uploads a local encryption matrix encrypted by a preset mask matrix to the embedding server, ensuring that all intermediate calculation results in the embedding process are in encrypted form, ensuring that the local data of the data holder will not be leaked, and the embedding server cannot restore the original data of the data holder, thereby achieving the purpose of ensuring data security, thereby realizing the technical effect of realizing data security of network embedding in a distributed environment, and further solving the technical problem of poor data security of network embedding in a distributed environment in the prior art.

[0102] As an optional embodiment, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network, and the acquisition module includes: a statistical unit, used to count the number of nodes in the federated learning network, wherein the number of nodes is the number of nodes with data processing capabilities; a first generation unit, used to perform a graph structure analysis on the local learning network of each data holder when the number of nodes conforms to a first order of magnitude, to obtain a local adjacency matrix and a local degree matrix corresponding to the local learning network; a second generation unit, used to perform path sampling on the local learning network of each data holder when the number of nodes conforms to a second order of magnitude, to generate a local adjacency matrix and a local degree matrix corresponding to the local learning network, wherein the second order of magnitude is greater than the first order of magnitude.

[0103] As an optional embodiment, when the number of nodes conforms to the second order of magnitude, the second generation unit includes: a generation subunit, which is used to perform random walks on the local learning network of each data holder when the number of nodes conforms to the second order of magnitude, and generate a path set, wherein the local learning network includes multiple nodes, and the path set includes multiple path information generated by random walks based on multiple preset starting points, the preset starting point is a node predetermined as the starting point, and each path information is a sequence of multiple nodes; a determination subunit, which is used to determine the local adjacency matrix and local degree matrix corresponding to the local learning network based on the path set, wherein the elements in the local adjacency matrix are determined according to the adjacent situation of any two nodes in multiple paths, and the elements in the local degree matrix are determined according to the number of different nodes adjacent to the node in multiple path information.

[0104] As an optional embodiment, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network, and the encryption module includes: a combining unit, which is used for each data holder to combine the local adjacency matrix and the local degree matrix when the number of nodes in the federated learning network meets the first order of magnitude to obtain a combined polynomial matrix; a receiving unit, which is used to receive a preset mask matrix pre-generated by a mask server, wherein the mask server pre-generates a random orthogonal matrix as the preset mask matrix; a first encryption unit, which is used to combine the random orthogonal matrix with the combined polynomial matrix to obtain a local encryption matrix for each data holder.

[0105] As an optional embodiment, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network. The encryption module includes: an uploading unit, which is used to upload the local degree matrix to the embedded server respectively when the number of nodes in the federated learning network meets the second order of magnitude, and receive the global degree matrix returned by the embedded server based on multiple local degree matrices; a determination unit, which is used to determine the random walk polynomial matrix based on the local degree matrix and Laplace matrix of the same data holder, and the global degree matrix, wherein the Laplace matrix is ​​determined based on the difference between the local adjacency matrix and the local degree matrix of the same data holder, and the random walk polynomial matrix is ​​expressed as: , i is the data holder, is the random walk polynomial matrix of the data holder, D is the global degree matrix, is the local degree matrix of the data holder, is the Laplace matrix of the data holder; an iteration unit is used to perform federated power iteration on the random walk polynomial matrix according to a preset number of iterations to generate a random walk submatrix, wherein the federated power iteration is used to indicate that the random walk polynomial matrix is ​​projected into a low-dimensional space; a second encryption unit is used to encrypt the random walk submatrix using a preset mask matrix to obtain a local encrypted matrix.

[0106] As an optional embodiment, the steps of each federated power iteration include: each data holder uses a preset mask matrix to encrypt the random walk polynomial matrix to obtain a local pre-encryption matrix; uploading the local pre-encryption matrix to an embedded server, wherein the embedded server is used to aggregate multiple local pre-encryption matrices to obtain a global pre-encryption matrix, and perform coefficient matrix decomposition on the global pre-encryption matrix to obtain an intermediate result matrix, which is a masked orthogonal matrix; receiving the intermediate result matrix returned by the embedded server, and removing the mask in the intermediate result matrix according to the preset mask matrix to obtain an intermediate encrypted matrix, wherein when the number of iterations reaches the preset number of iterations, the intermediate encrypted matrix is ​​a random walk submatrix; when the number of iterations does not reach the preset number of iterations, the intermediate encrypted matrix is ​​the random walk polynomial matrix of the next iteration.

[0107] As an optional embodiment, the device also includes: an aggregation submodule, which is used to aggregate the local encryption matrices uploaded by multiple data holders through an embedded server to obtain a global aggregation matrix; and a decomposition submodule, which is used to perform singular value decomposition on the global aggregation matrix to generate a global encryption matrix.

[0108] An embodiment of the present invention may provide an electronic device, which may be a computer terminal, and the computer terminal may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.

[0109] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of a computer network.

[0110] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the network embedding method based on the federated learning network: obtaining the local network matrices of multiple data holders in the federated learning network, wherein the data holders are participants of the federated learning network, the federated learning network is pre-divided into multiple local learning networks, and the local network matrix is ​​a matrix representation of the local learning network; using a preset mask matrix to encrypt the local network matrix to obtain a local encryption matrix; uploading the local encryption matrices corresponding to the multiple data holders to the embedding server, and receiving the global encryption matrix obtained by the embedding server based on the integration of multiple local encryption matrices, wherein the global encryption matrix is ​​the result after the embedding server decomposes the integration result based on the multiple local encryption matrices; decrypting the global encryption matrix based on the preset mask matrix to obtain a global embedding matrix, wherein the global embedding matrix is ​​the network embedding result of the federated learning network.

[0111] Figure 5 is a structural block diagram of a computer terminal according to an embodiment of the present invention. Figure 5 As shown, the computer terminal 50 may include: one or more (only one is shown in the figure) processors 52 and a memory 54 .

[0112] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the network embedding method and device based on the federated learning network in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned network embedding method based on the federated learning network. The memory may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely located relative to the processor, and these remote memories may be connected to the terminal 50 via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0113] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain the local network matrices of multiple data holders in the federated learning network, wherein the data holders are participants in the federated learning network, the federated learning network is pre-divided into multiple local learning networks, and the local network matrix is ​​a matrix representation of the local learning network; use a preset mask matrix to encrypt the local network matrix to obtain a local encryption matrix; upload the local encryption matrices corresponding to the multiple data holders to the embedding server, and receive the global encryption matrix obtained by the embedding server based on the integration of the multiple local encryption matrices, wherein the global encryption matrix is ​​the result of the embedding server decomposing the integration result based on the multiple local encryption matrices; decrypt the global encryption matrix based on the preset mask matrix to obtain a global embedding matrix, wherein the global embedding matrix is ​​the network embedding result of the federated learning network.

[0114] Optionally, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network. The above-mentioned processor can also execute the program code of the following steps: counting the number of nodes in the federated learning network, wherein the number of nodes is the number of nodes with data processing capabilities; when the number of nodes meets the first order of magnitude, performing a graph structure analysis on the local learning network of each data holder to obtain the local adjacency matrix and local degree matrix corresponding to the local learning network; when the number of nodes meets the second order of magnitude, performing path sampling on the local learning network of each data holder to generate the local adjacency matrix and local degree matrix corresponding to the local learning network, wherein the second order of magnitude is greater than the first order of magnitude.

[0115] Optionally, the processor may also execute the program code of the following steps: when the number of nodes conforms to the second order of magnitude, a random walk is performed on the local learning network of each data holder to generate a path set, wherein the local learning network includes multiple nodes, and the path set includes multiple path information generated by random walks based on multiple preset starting points, the preset starting point is a node predetermined as the starting point, and each path information is a sequence of multiple nodes; based on the path set, the local adjacency matrix and local degree matrix corresponding to the local learning network are determined, wherein the elements in the local adjacency matrix are determined according to the adjacent situation of any two nodes in multiple paths, and the elements in the local degree matrix are determined according to the number of different nodes adjacent to the node in multiple path information.

[0116] Optionally, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network. The above-mentioned processor can also execute the program code of the following steps: when the number of nodes in the federated learning network meets the first order of magnitude, each data holder combines the local adjacency matrix and the local degree matrix to obtain a combined polynomial matrix; receives a preset mask matrix pre-generated by the mask server, wherein the mask server pre-generates a random orthogonal matrix as the preset mask matrix; combines the random orthogonal matrix with the combined polynomial matrix to obtain a local encryption matrix for each data holder.

[0117] Optionally, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network. The processor may further execute program code of the following steps: when the number of nodes in the federated learning network meets the second order of magnitude, each data holder uploads the local degree matrix to the embedding server respectively, and receives the global degree matrix returned by the embedding server based on multiple local degree matrices; based on the local degree matrix and Laplace matrix of the same data holder, and the global degree matrix, a random walk polynomial matrix is ​​determined, wherein the Laplace matrix is ​​determined based on the difference between the local adjacency matrix and the local degree matrix of the same data holder, and the random walk polynomial matrix is ​​expressed as: , i is the data holder, is the random walk polynomial matrix of the data holder, D is the global degree matrix, is the local degree matrix of the data holder, is the Laplace matrix of the data holder; the random walk polynomial matrix is ​​subjected to federated power iteration according to a preset number of iterations to generate a random walk submatrix, where the federated power iteration is used to indicate that the random walk polynomial matrix is ​​projected into a low-dimensional space; the random walk submatrix is ​​encrypted using a preset mask matrix to obtain a local encrypted matrix.

[0118] Optionally, for each federated power iteration step, the processor may also execute the program code of the following steps: each data holder uses a preset mask matrix to encrypt the random walk polynomial matrix to obtain a local pre-encryption matrix; upload the local pre-encryption matrix to the embedded server, wherein the embedded server is used to aggregate multiple local pre-encryption matrices to obtain a global pre-encryption matrix, and perform coefficient matrix decomposition on the global pre-encryption matrix to obtain an intermediate result matrix, which is a masked orthogonal matrix; receive the intermediate result matrix returned by the embedded server, and remove the mask in the intermediate result matrix according to the preset mask matrix to obtain an intermediate encrypted matrix, wherein, when the number of iterations reaches the preset number of iterations, the intermediate encrypted matrix is ​​a random walk submatrix; when the number of iterations does not reach the preset number of iterations, the intermediate encrypted matrix is ​​the random walk polynomial matrix of the next iteration.

[0119] Optionally, the processor may further execute program code of the following steps: aggregating local encryption matrices uploaded by multiple data holders through an embedded server to obtain a global aggregate matrix; performing singular value decomposition on the global aggregate matrix to generate a global encryption matrix.

[0120] It can be understood by those skilled in the art that Figure 5 The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as , tablet computers, handheld computers, mobile Internet devices (MID), PAD and other terminal devices. Figure 5 It does not limit the structure of the above electronic device. For example, the computer terminal 50 may also include Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 5 Different configurations shown.

[0121] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a computer program. The computer program can be stored in a non-volatile medium. The non-volatile storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0122] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the network embedding method based on the federated learning network provided in the above embodiment.

[0123] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0124] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining local network matrices of multiple data holders in a federated learning network, wherein the data holders are participants in the federated learning network, the federated learning network is pre-divided into multiple local learning networks, and the local network matrix is ​​a matrix representation of the local learning network; encrypting the local network matrix using a preset mask matrix to obtain a local encryption matrix; uploading the local encryption matrices corresponding to the multiple data holders to the embedding server, and receiving a global encryption matrix obtained by integrating the multiple local encryption matrices based on the embedding server, wherein the global encryption matrix is ​​the result of the embedding server decomposing the integration result based on the multiple local encryption matrices; decrypting the global encryption matrix based on the preset mask matrix to obtain a global embedding matrix, wherein the global embedding matrix is ​​the network embedding result of the federated learning network.

[0125] Optionally, in this embodiment, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network, and the non-volatile storage medium is configured to store program code for executing the following steps: counting the number of nodes in the federated learning network, wherein the number of nodes is the number of nodes with data processing capabilities; when the number of nodes conforms to the first order of magnitude, performing a graph structure analysis on the local learning network of each data holder to obtain a local adjacency matrix and a local degree matrix corresponding to the local learning network; when the number of nodes conforms to the second order of magnitude, performing path sampling on the local learning network of each data holder to generate a local adjacency matrix and a local degree matrix corresponding to the local learning network, wherein the second order of magnitude is greater than the first order of magnitude.

[0126] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: when the number of nodes conforms to the second order of magnitude, performing a random walk on the local learning network of each data holder to generate a path set, wherein the local learning network includes multiple nodes, and the path set includes multiple path information generated by random walks based on multiple preset starting points, the preset starting point is a node predetermined as the starting point, and each path information is a sequence of multiple nodes; according to the path set, determining the local adjacency matrix and local degree matrix corresponding to the local learning network, wherein the elements in the local adjacency matrix are determined according to the adjacent situation of any two nodes in multiple paths, and the elements in the local degree matrix are determined according to the number of different nodes adjacent to the node in multiple path information.

[0127] Optionally, in this embodiment, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network, and the non-volatile storage medium is configured to store program code for executing the following steps: when the number of nodes in the federated learning network conforms to the first order of magnitude, each data holder combines the local adjacency matrix and the local degree matrix to obtain a combined polynomial matrix; receives a preset mask matrix pre-generated by the mask server, wherein the mask server pre-generates a random orthogonal matrix as the preset mask matrix; combines the random orthogonal matrix with the combined polynomial matrix to obtain a local encryption matrix for each data holder.

[0128] Optionally, in this embodiment, the local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network, and the non-volatile storage medium is configured to store program code for executing the following steps: when the number of nodes in the federated learning network meets the second order of magnitude, each data holder uploads the local degree matrix to the embedded server respectively, and receives a global degree matrix returned by the embedded server based on multiple local degree matrices; based on the local degree matrix and Laplace matrix of the same data holder, and the global degree matrix, a random walk polynomial matrix is ​​determined, wherein the Laplace matrix is ​​determined according to the difference between the local adjacency matrix and the local degree matrix of the same data holder, and the random walk polynomial matrix is ​​expressed as: , i is the data holder, is the random walk polynomial matrix of the data holder, D is the global degree matrix, is the local degree matrix of the data holder, is the Laplace matrix of the data holder; the random walk polynomial matrix is ​​subjected to federated power iteration according to a preset number of iterations to generate a random walk submatrix, where the federated power iteration is used to indicate that the random walk polynomial matrix is ​​projected into a low-dimensional space; the random walk submatrix is ​​encrypted using a preset mask matrix to obtain a local encrypted matrix.

[0129] Optionally, in this embodiment, for each step of federated power iteration, the non-volatile storage medium is configured to store program code for executing the following steps: each data holder uses a preset mask matrix to encrypt the random walk polynomial matrix to obtain a local pre-encryption matrix; upload the local pre-encryption matrix to the embedded server, wherein the embedded server is used to aggregate multiple local pre-encryption matrices to obtain a global pre-encryption matrix, and perform coefficient matrix decomposition on the global pre-encryption matrix to obtain an intermediate result matrix, which is a masked orthogonal matrix; receive the intermediate result matrix returned by the embedded server, and remove the mask in the intermediate result matrix according to the preset mask matrix to obtain an intermediate encrypted matrix, wherein when the number of iterations reaches the preset number of iterations, the intermediate encrypted matrix is ​​a random walk submatrix; when the number of iterations does not reach the preset number of iterations, the intermediate encrypted matrix is ​​the random walk polynomial matrix of the next iteration.

[0130] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: aggregating local encryption matrices uploaded by multiple data holders through an embedded server to obtain a global aggregate matrix; performing singular value decomposition on the global aggregate matrix to generate a global encryption matrix.

[0131] An embodiment of the present invention further provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, the steps of the network embedding method based on the federated learning network provided in the above embodiment are implemented.

[0132] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.

[0133] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0134] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

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

[0136] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0137] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a non-volatile storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned non-volatile storage medium includes various media that can store program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), a mobile hard drive, a magnetic disk, or an optical disk.

[0138] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A network embedding method based on a federated learning network, characterized in that: include: Obtaining local local network matrices of multiple data holders in a federated learning network, wherein the data holders are participants of the federated learning network, the federated learning network is pre-divided into multiple local learning networks, and the local network matrices are matrix representations of the local learning networks; Using a preset mask matrix to encrypt the local network matrix to obtain a local encrypted matrix; Uploading the local encryption matrices corresponding to the plurality of data holders to an embedded server, and receiving a global encryption matrix obtained by the embedded server based on the integration of the plurality of local encryption matrices, wherein the global encryption matrix is ​​a result of the embedded server decomposing the integration result based on the plurality of local encryption matrices; The global encryption matrix is ​​decrypted based on the preset mask matrix to obtain a global embedding matrix, wherein the global embedding matrix is ​​a network embedding result of the federated learning network.

2. The method according to claim 1, characterized in that The local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network. Obtaining the local network matrices of multiple data holders in the federated learning network includes: Counting the number of nodes in the federated learning network, wherein the number of nodes is the number of nodes with data processing capabilities; When the number of nodes meets the first order of magnitude, performing graph structure analysis on the local learning network of each data holder to obtain the local adjacency matrix and the local degree matrix corresponding to the local learning network; When the number of nodes conforms to the second order of magnitude, path sampling is performed on the local learning network of each data holder to generate the local adjacency matrix and the local degree matrix corresponding to the local learning network, wherein the second order of magnitude is greater than the first order of magnitude.

3. The method according to claim 2, characterized in that When the number of nodes meets the second order of magnitude, performing path sampling on the local learning network of each data holder to generate the local adjacency matrix and the local degree matrix corresponding to the local learning network includes: When the number of nodes meets the second order of magnitude, a random walk is performed on the local learning network of each data holder to generate a path set, wherein the local learning network includes multiple nodes, and the path set includes multiple path information generated by random walks based on multiple preset starting points, where the preset starting point is the node predetermined as the starting point, and each piece of path information is a sequence of multiple nodes; According to the path set, the local adjacency matrix and the local degree matrix corresponding to the local learning network are determined, wherein the elements in the local adjacency matrix are determined according to the adjacency of any two nodes in multiple paths, and the elements in the local degree matrix are determined according to the number of different nodes adjacent to the node in the multiple path information.

4. The method according to claim 1, wherein The local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network. The local adjacency matrix is ​​encrypted using a preset mask matrix to obtain a local encrypted matrix including: When the number of nodes in the federated learning network meets the first order of magnitude, each of the data holders combines the local adjacency matrix and the local degree matrix to obtain a combined polynomial matrix; receiving the preset mask matrix pre-generated by a mask server, wherein the mask server pre-generates a random orthogonal matrix as the preset mask matrix; The random orthogonal matrix is ​​combined with the combined polynomial matrix to obtain a local encryption matrix of each data holder.

5. The method according to claim 1, wherein The local network matrix includes at least: a local adjacency matrix and a local degree matrix corresponding to the local learning network. The local adjacency matrix is ​​encrypted using a preset mask matrix to obtain a local encrypted matrix including: When the number of nodes in the federated learning network meets the second order of magnitude, each of the data holders uploads the local degree matrix to the embedding server, and receives a global degree matrix returned by the embedding server based on the multiple local degree matrices; A random walk polynomial matrix is ​​determined based on the local degree matrix and the Laplacian matrix of the same data holder, and the global degree matrix, wherein the Laplacian matrix is ​​determined based on the difference between the local adjacency matrix and the local degree matrix of the same data holder, and the random walk polynomial matrix is ​​expressed as: , i is the data holder, is the random walk polynomial matrix of the data holder, D is the global degree matrix, is the local degree matrix of the data holder, is the Laplace matrix of the data holder; Performing a federated power iteration on the random walk polynomial matrix according to a preset number of iterations to generate a random walk submatrix, wherein the federated power iteration is used to indicate that the random walk polynomial matrix is ​​projected into a low-dimensional space; The random walk submatrix is ​​encrypted using the preset mask matrix to obtain a local encrypted matrix.

6. The method according to claim 5, characterized in that Each step of the federated power iteration includes: Each of the data holders uses the preset mask matrix to encrypt the random walk polynomial matrix to obtain a local pre-encrypted matrix; Uploading the local pre-encryption matrix to the embedded server, wherein the embedded server is used to aggregate multiple local pre-encryption matrices to obtain a global pre-encryption matrix, and perform coefficient matrix decomposition on the global pre-encryption matrix to obtain an intermediate result matrix, where the intermediate result matrix is ​​a masked orthogonal matrix; Receive the intermediate result matrix returned by the embedded server, and remove the mask in the intermediate result matrix according to the preset mask matrix to obtain an intermediate encryption matrix, wherein, when the number of iterations reaches the preset number of iterations, the intermediate encryption matrix is ​​the random walk submatrix; when the number of iterations does not reach the preset number of iterations, the intermediate encryption matrix is ​​the random walk polynomial matrix of the next iteration.

7. The method according to claim 1, characterized in that The method further comprises: Aggregating the local encryption matrices uploaded by multiple data holders respectively through the embedded server to obtain a global aggregate matrix; Singular value decomposition is performed on the global aggregation matrix to generate the global encryption matrix.

8. A network embedding device based on a federated learning network, characterized in that: include: an acquisition module, configured to acquire local network matrices of multiple data holders in a federated learning network, wherein the data holders are participants in the federated learning network, the federated learning network is pre-divided into multiple local learning networks, and the local network matrices are matrix representations of the local learning networks; An encryption module, configured to encrypt the local network matrix using a preset mask matrix to obtain a local encrypted matrix; an uploading module, configured to upload the local encryption matrices corresponding to the plurality of data holders to an embedded server, and receive a global encryption matrix obtained by the embedded server based on the integration of the plurality of local encryption matrices, wherein the global encryption matrix is ​​a result of the embedded server decomposing the integration result based on the plurality of local encryption matrices; A decryption module is used to decrypt the global encryption matrix based on the preset mask matrix to obtain a global embedding matrix, wherein the global embedding matrix is ​​a network embedding result of the federated learning network.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the network embedding method based on the federated learning network according to any one of claims 1 to 7 through the computer program.

10. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the network embedding method based on the federated learning network described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Graph neural network federal recommendation method for privacy protection

    CN113420232A

  • Longitudinal graph federal information recommendation method based on separation learning and related device

    CN115952550A