Graph embedding method and device based on big data generic construction

By abstracting graph data objects into elements in metric space, and using the support point space model to map data from metric space to multi-dimensional space, the problem of complexity and poor performance of existing graph embedding methods is solved, and the efficiency of graph data is achieved. Vectorization and analysis.

CN119357191AActive Publication Date: 2025-01-24SHENZHEN UNIV

Patent Information

Application Number
CN202411473969.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-01-24
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

The existing graph embedding methods are complex and perform poorly in some application scenarios, making it difficult to effectively process and analyze graphical data of high-dimensional, non-Euclidean structures.

Method used

Vectorization of graph data is achieved by abstracting graph data objects into elements in metric space and using the support point space model to map data from metric space to multi-dimensional space. Specific steps include obtaining the data set to be embedded, generating point-edge relationship and distance information, constructing a distance matrix, selecting a support point set, and finally generating a vector representation of the target node.

Benefits of technology

Simplified the implementation process of graph embedding method, improved the performance in certain application scenarios, can effectively convert complex graph data into low -dimensional vectors, and support efficient graph data processing and analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357191A_ABST
    Figure CN119357191A_ABST
Patent Text Reader

Abstract

The invention provides a graph embedding method and device based on big data generic construction, and the method comprises the steps: obtaining a to-be-embedded data set, and determining the number of supporting points according to the to-be-embedded data set; wherein the to-be-embedded data set comprises node information of the graph and side information of the graph; generating a point-side relationship of the graph according to the node information and the side information; according to the node information and the point-side relationship, generating distance information meeting the metric space property in the graph nodes; generating a distance matrix of the graph according to the node information and the distance information; wherein the distance matrix comprises a graph node data set in a metric space and distance information of graph nodes; generating a target supporting point set according to the number of supporting points and the distance matrix; wherein the number of the supporting points in the target supporting point set is the same as that of the supporting points; and generating vector representation of the target node according to the distance matrix and the target supporting point set. Complex graph data is converted into low-dimensional vector representation, and the graph data can be efficiently processed and analyzed by utilizing a machine learning algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of graph data processing, and in particular to a graph embedding method and device based on big data generalization. Background Art

[0002] Graph data is ubiquitous in the real world. It can be used to represent various complex relationships in life, such as social networks and transportation networks. Therefore, graph analysis has gradually received more and more attention. However, processing and analyzing graph data is not simple. With the increasing maturity of artificial intelligence technology, machine learning, especially deep learning methods, has shown great power in many fields. However, since graph data is a high-dimensional, non-Euclidean structured data, most existing machine learning methods and deep learning methods only support vector data and are not suitable for graph data.

[0003] With the continuous development of graphs, in the early 21st century, researchers proposed graph embedding methods to solve the above problems. Graph embedding is a technology that maps nodes in a graph into a low-dimensional space. It aims to preserve the similarities or relationships between nodes in the graph, so that nodes with connections are close to each other and nodes without connections are relatively far away, thereby capturing the original characteristics of the graph. This mapping allows graph data to be directly processed and analyzed using machine learning algorithms.

[0004] The emergence of graph embedding technology provides a new idea for the processing and analysis of graph data. It is widely used in various analysis and processing tasks of graphs, such as node classification, link prediction, node clustering, network visualization, and other tasks to improve their performance. For example, in social networks, it recommends friends that users may know or content that they are interested in based on their social relationships.

[0005] Existing graph embedding methods can be roughly divided into three categories: graph embedding based on matrix decomposition, graph embedding based on random walk, and graph embedding based on graph neural network. However, the implementation methods of these graph embedding methods are currently relatively complex and perform poorly in some application scenarios. Summary of the invention

[0006] In view of the above problems, the present application is proposed to provide a graph embedding method and device based on big data generalization to overcome the above problems or at least partially solve the above problems, including:

[0007] A graph embedding method based on big data pan-structure includes the following steps:

[0008] Acquire a data set to be embedded, and determine the number of supporting points according to the data set to be embedded; wherein the data set to be embedded includes node information and edge information of the graph;

[0009] Generate a vertex-edge relationship of a graph according to the node information and the edge information;

[0010] Generate distance information in the graph nodes that satisfies the properties of the metric space based on the node information and the point-edge relationship; wherein the metric space properties are positive definiteness, symmetry, and triangle inequality;

[0011] Generate a distance matrix of the graph according to the node information and the distance information; wherein the distance matrix includes a graph node data set and distance information of the graph nodes in the metric space;

[0012] Generate a target support point set according to the number of support points and the distance matrix; wherein the number of support points in the target support point set is the same as the number of support points;

[0013] A vector representation of a target node is generated according to the distance matrix and the target support point set.

[0014] Furthermore, the step of generating distance information satisfying the metric space property in the graph nodes according to the node information and the point-edge relationship includes:

[0015] Generate an adjacency matrix of the graph according to the node information and the point-edge relationship;

[0016] Distance information satisfying the metric space property in the graph nodes is determined according to the adjacency matrix.

[0017] Furthermore, the step of generating an adjacency matrix of the graph based on the node information and the point-edge relationship includes:

[0018] Determine an initial matrix of the graph according to the node information;

[0019] The corresponding adjacency matrix is ​​generated according to the point-edge relationship and the initial matrix; wherein the adjacency matrix includes connection information and non-connection information.

[0020] Furthermore, the step of determining the distance information satisfying the metric space property in the graph nodes according to the adjacency matrix includes:

[0021] generating a new adjacency matrix according to the adjacency matrix and the disconnection information;

[0022] The distance information from each node to all other nodes that satisfies the property of the metric space is determined according to the new adjacency matrix.

[0023] Furthermore, the step of generating a target support point set according to the number of support points and the distance matrix includes:

[0024] Determine a pre-selected support point set and a non-support point set according to the graph node data set;

[0025] Determining a target non-support point from the non-support point set according to the distance matrix and the pre-selected support point set;

[0026] The target support point set is generated according to the target non-support point and the pre-selected support point set; wherein the sum of the number of support points in the pre-selected support point set and the target non-support point is equal to the number of support points.

[0027] Furthermore, the step of determining a target non-support point from the non-support point set based on the distance matrix and the pre-selected support point set includes:

[0028] Determine the shortest distance from each non-support point in the non-support point set to the pre-selected support point set according to the distance matrix;

[0029] The target non-support point is determined according to the shortest distance.

[0030] Furthermore, the step of generating a vector representation of the target node based on the distance matrix and the target support point set includes:

[0031] Determining the distance from the target node to the target support point set according to the distance matrix;

[0032] A vector representation of the target node is determined according to a distance from the target node to the target support point set.

[0033] A graph embedding device based on big data pan-structure, comprising:

[0034] A data set acquisition module, used to acquire a data set to be embedded, and determine the number of support points according to the data set to be embedded; wherein the data set to be embedded includes node information and edge information of the graph;

[0035] A relationship generation module, used to generate a vertex-edge relationship of a graph according to the node information and the edge information;

[0036] A data metric module, used to generate distance information in the graph nodes that satisfies the properties of the metric space based on the node information and the point-edge relationship; wherein the metric space characteristics are positive definiteness, symmetry, and triangle inequality;

[0037] A distance matrix generation module, used to generate a distance matrix of the graph according to the node information and the distance information; wherein the distance matrix includes a graph node data set and distance information of the graph nodes in a metric space;

[0038] A support point selection module, used for generating a target support point set according to the number of support points and the distance matrix; wherein the number of support points in the target support point set is the same as the number of support points;

[0039] A coordinate reconstruction module is used to generate a vector representation of a target node based on the distance matrix and the target support point set.

[0040] A device comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of the graph embedding method based on big data generalization as described above are implemented.

[0041] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the graph embedding method based on big data generalization are implemented as described above.

[0042] This application has the following advantages:

[0043] In an embodiment of the present application, in view of the problem that the implementation methods of current graph embedding methods in the prior art are relatively complex and perform poorly in certain application scenarios, the present application provides a solution for abstracting graph data objects into elements in a metric space and mapping data from a metric space to a multidimensional space using a support point space model, specifically: obtaining a data set to be embedded, and determining the number of support points based on the data set to be embedded; wherein the data set to be embedded includes node information and edge information of the graph; generating the point-edge relationship of the graph based on the node information and the edge information; generating distance information in the graph nodes that satisfies the properties of the metric space based on the node information and the point-edge relationship; wherein the metric space characteristics are positive definiteness, symmetry, and triangle inequality; generating a distance matrix of the graph based on the node information and the distance information; wherein the distance matrix includes a graph node data set and distance information of the graph nodes in the metric space; generating a target support point set based on the number of support points and the distance matrix; wherein the number of support points in the target support point set is the same as the number of support points; generating a vector representation of the target node based on the distance matrix and the target support point set. This application only needs to find a distance function for graph nodes that satisfies the properties of the metric space distance function, so that complex graph data objects can be abstracted into elements in the metric space, and then the distance vectors from the metric space data to multiple reference points can be used as their coordinates to realize the vectorization of graph data. By converting complex graph data into low-dimensional vector representations, machine learning algorithms can be used to efficiently process and analyze graph data, which helps promote downstream tasks based on graph embedding, such as node classification, link prediction, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the description of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0045] Figure 1 This is a flowchart of a graph embedding method based on big data generalization provided by an embodiment of the present application;

[0046] Figure 2 It is a flowchart of a graph embedding method based on big data generalization provided in one embodiment of the present application;

[0047] Figure 3 is a flowchart of predicting the active status of unlabeled users based on social network data provided by an embodiment of the present application;

[0048] Figure 4 It is a graph embedding method based on big data generalization provided by an embodiment of the present application and the node classification result of the comparative example on data set 1;

[0049] Figure 5 It is a graph embedding method based on big data generalization provided by an embodiment of the present application and the node classification result of the comparative example on data set 2;

[0050] Figure 6 It is a graph embedding method based on big data generalization provided by an embodiment of the present application and the node classification result of the comparative example on data set 3;

[0051] Figure 7 It is a graph embedding method based on big data generalization provided by an embodiment of the present application and the node classification result of the comparative example on data set 4;

[0052] Figure 8 It is a visualization result of a graph embedding method based on big data generalization and a comparative example provided by an embodiment of the present application;

[0053] Fig. 9 This is a structural block diagram of a graph embedding device based on big data generalization provided by an embodiment of the present application;

[0054] Fig.10 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0055] In order to make the objects, features and advantages of the present application more obvious and understandable, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0056] The inventors found through analysis of the prior art that graph embedding is a technology that converts graph data into vectors, that is, the nodes of the graph are represented by vectors. Existing graph embedding solutions: CN202210297523.1 A graph embedding method based on a maximum spanning tree, which samples node paths in the original network community based on a random walk algorithm to obtain a node sequence; constructs a weighted network based on the sampled node paths, and generates a maximum spanning tree based on the weighted network; calculates the betweenness centrality of the maximum spanning tree, and obtains several groups of edges distributed between the original network communities as cut sets; divides the original sequence based on the cut set to obtain a fine-grained sequence; uses the original sequence as the initial embedding of the fine-grained sequence, and obtains a finer-grained embedding value through iteration until the final embedding result is obtained. However, this method relies on a random walk algorithm to sample node paths. The parameters of the random walk (such as step size, etc.) will significantly affect the generated node sequence, and then affect the effects of subsequent steps. Inappropriate parameters may lead to sampling bias and fail to accurately reflect the global or local structure of the network. Furthermore, although the maximum spanning tree simplifies the network structure, it may also lose some important information in the original graph (such as ring structure, multiple connections, etc.). This information may be crucial for certain network analysis tasks (such as prediction, classification, etc.). Therefore, this method is more complicated to handle and may not perform well in some application scenarios.

[0057] Considering that big data pan-structure can vectorize different types of data, big data pan-structure, as a general data management and analysis mode, can abstract data into metric space. It only needs to define a distance function that satisfies the properties of metric space, and then reconstruct the coordinates for metric space data through the support point space model. To this end, the inventor proposed a graph embedding method based on big data pan-structure. Through big data pan-structure, complex graph data objects can be abstracted into elements in metric space, and the support point space model is used to map data from metric space to multidimensional space, thereby efficiently realizing the vectorization of graph data.

[0058] Reference Figure 1 and Figure 2 , showing a graph embedding method based on big data generalization provided by an embodiment of the present application;

[0059] The method comprises:

[0060] S110, obtaining a data set to be embedded, and determining the number of supporting points according to the data set to be embedded; wherein the data set to be embedded includes node information and edge information of the graph;

[0061] S120, generating a vertex-edge relationship of a graph according to the node information and the edge information;

[0062] S130, generating distance information in the graph nodes that satisfies the properties of the metric space according to the node information and the point-edge relationship; wherein the metric space properties are positive definiteness, symmetry, and triangle inequality;

[0063] S140, generating a distance matrix of the graph according to the node information and the distance information; wherein the distance matrix includes a graph node data set and distance information of the graph nodes in a metric space;

[0064] S150, generating a target support point set according to the number of support points and the distance matrix; wherein the number of support points in the target support point set is the same as the number of support points;

[0065] S160: Generate a vector representation of the target node based on the distance matrix and the target support point set.

[0066] In an embodiment of the present application, in view of the problem that the implementation methods of current graph embedding methods in the prior art are relatively complex and perform poorly in certain application scenarios, the present application provides a solution for abstracting graph data objects into elements in a metric space and mapping data from a metric space to a multidimensional space using a support point space model, specifically: obtaining a data set to be embedded, and determining the number of support points based on the data set to be embedded; wherein the data set to be embedded includes node information and edge information of the graph; generating the point-edge relationship of the graph based on the node information and the edge information; generating distance information in the graph nodes that satisfies the properties of the metric space based on the node information and the point-edge relationship; wherein the metric space characteristics are positive definiteness, symmetry, and triangle inequality; generating a distance matrix of the graph based on the node information and the distance information; wherein the distance matrix includes a graph node data set and distance information of the graph nodes in the metric space; generating a target support point set based on the number of support points and the distance matrix; wherein the number of support points in the target support point set is the same as the number of support points; generating a vector representation of the target node based on the distance matrix and the target support point set. This application only needs to find a distance function for graph nodes that satisfies the properties of the metric space distance function, so that complex graph data objects can be abstracted into elements in the metric space, and then the distance vectors from the metric space data to multiple reference points can be used as their coordinates to realize the vectorization of graph data. By converting complex graph data into low-dimensional vector representations, machine learning algorithms can be used to efficiently process and analyze graph data, which helps promote downstream tasks based on graph embedding, such as node classification, link prediction, etc.

[0067] Next, a graph embedding method based on big data generalization in this exemplary embodiment will be further described.

[0068] As described in step S110, a data set to be embedded is obtained, and the number of supporting points is determined according to the data set to be embedded; wherein the data set to be embedded includes node information and edge information of the graph.

[0069] It should be noted that graphs can be used to represent various complex relationships in life, such as social networks, transportation networks, etc., but processing and analyzing graph data is not simple. With the continuous development of artificial intelligence technology, it has demonstrated powerful functions in many fields, but most existing machine learning methods only support vector data and are not suitable for graph data. In the process of realizing the vectorization of graph data, this application first needs to abstract the complex graph data objects into elements in the metric space, and then use the distance vectors from the metric space data to multiple reference points as its coordinates to realize the vectorization of graph data.

[0070] As an example, the number of support points is used as the number of dimensions of the coordinates. The number of support points can be determined by using the intrinsic dimension of the data as the number of support points, or by defining the number of support points according to the needs, but the number of support points must not exceed the number of nodes in the graph. Among them, the intrinsic dimension refers to the number of effective dimensions of a data set, that is, most of the information of the data set can be expressed with the least number of dimensions. After determining the number of dimensions of the node, such as three-dimensional coordinates (x, y, z), it is also necessary to determine the coordinate values ​​of x, y, and z. This application can abstract complex graph data objects into elements in the metric space through big data generalization, and use the support point space model to map the data from the metric space to the multidimensional space, thereby realizing the vectorization of graph data.

[0071] A graph is a data structure consisting of a finite non-empty set of vertices V(G) and a set of edges between vertices (also called nodes) E(G), usually expressed as: G = (V, E), where G represents a graph, V is the set of vertices in the graph G, and E is the set of edges in the graph G. We first obtain the original graph data of the graph, that is, the set of nodes in the graph and the set of edges connecting these nodes, and obtain the unique identifier (ID) of the node, the name, and the weight of the edge.

[0072] As described in step S120, the vertex-edge relationship of the graph is generated according to the node information and the edge information.

[0073] As an example, after obtaining the node information and edge information of the graph, the point-edge relationship of the graph, that is, the edge information of each node, is obtained based on the node information and edge information of the graph, including the starting point and end point of each edge, the weight and direction of the edge, etc.

[0074] As described in step S130, distance information satisfying the properties of the metric space in the graph nodes is generated based on the node information and the point-edge relationship; wherein the metric space properties are positive definiteness, symmetry, and triangle inequality.

[0075] In one embodiment of the present invention, the specific process of "generating distance information in the graph nodes that satisfies the properties of the metric space based on the node information and the point-edge relationship; wherein the metric space characteristics are positive definiteness, symmetry and triangle inequality" described in step S130 can be further explained in combination with the following description.

[0076] As described in the following steps, an adjacency matrix of the graph is generated according to the node information and the point-edge relationship;

[0077] As described in the following steps, distance information satisfying the metric space property in the graph nodes is determined according to the adjacency matrix.

[0078] In one embodiment of the present invention, the specific process of "generating an adjacency matrix of a graph according to the node information and the point-edge relationship" can be further explained in combination with the following description.

[0079] As described in the following steps, determining an initial matrix of the graph according to the node information;

[0080] As described in the following steps, the corresponding adjacency matrix is ​​generated according to the point-edge relationship and the initial matrix; wherein the adjacency matrix includes connection information and non-connection information.

[0081] As an example, based on the collected node information and the vertex-edge relationship of the graph, a framework of an adjacency matrix is ​​constructed, where the number of rows and columns is equal to the number of nodes in the graph, and each element (i, j) of the matrix is ​​initially initialized to a specific value "0" indicating that there is no connection between the nodes.

[0082] In a specific implementation, based on the original graph data of the graph, let n be the number of nodes of the graph, and create an n*n full "0" matrix. If there is an edge between two points, the "0" is changed to "1" in the corresponding position in the full "0" matrix. By traversing all the edges in this way, the adjacency matrix of the graph can be obtained. In this way, the last "1" and "0" filled in the adjacency matrix can reflect which nodes in the graph are directly connected. "1" indicates that there is connection information between the nodes, and "0" indicates that there is no connection information between the nodes.

[0083] In one embodiment of the present invention, the specific process of "determining the distance information satisfying the metric space property in the graph nodes according to the adjacency matrix" can be further explained in combination with the following description.

[0084] As described in the following steps, a new adjacency matrix is ​​generated according to the adjacency matrix and the disconnection information;

[0085] As described in the following steps, distance information from each node to all other nodes that satisfies the properties of the metric space is determined according to the new adjacency matrix.

[0086] It should be noted that the metric space can be defined as a two-tuple (M, d), where M is a non-empty data set and d is a distance function defined on the element pairs of M with the following properties:

[0087] (1) Positive definiteness: For any x, y∈M, d(x, y) ≥ 0, and d(x, y) = 0x = y; (2) Symmetry: For any x, y∈M, d(x, y) = d(y, x); (3) Triangular inequality: For any x, y, z∈M, d(x, y) + d(y, z) ≥ d(x, z).

[0088] Considering that the main purpose of graph embedding is to vectorize the graph while retaining some information, a graph embedding method based on big data pan-construction is proposed. Big data pan-construction can abstract complex data into elements of metric space. Metric space has no restrictions on the internal structure of data. It only needs to define a distance function that conforms to the characteristics of metric space. In the process of metric space data management and analysis, only the three properties of metric space satisfied by the distance function are used, instead of the domain properties of specific metric space instances. Therefore, it is applicable to any metric space and has universality. The above realizes the mapping from the original data space to the metric space, but the data is abstracted into points in the metric space. Although the universality is improved, the coordinate information is also lost. The only available information is the distance value. The lack of coordinates makes many mathematical tools unable to be directly applied. The support point space model provides a mechanism for mapping from metric space to multidimensional space and reconstructing coordinates for metric space data. In other words, big data pan-construction abstracts the original data into metric space and then maps it to support point space, that is, multidimensional vector space. In short, big data pan-construction can be used as a data vectorization method. For graphs, they can also be mapped to low-dimensional vector space, that is, it can be used as a graph embedding method.

[0089] As an example, for a graph, it is usually represented by its adjacency matrix. First, the original graph data must be abstracted into elements in the metric space. It only needs to define a distance function that satisfies the properties of the metric space (positive definiteness, symmetry, and triangle inequality). However, it is not easy to find such a function, especially for non-Euclidean data such as graphs. Considering that the purpose of the distance function is only to measure the distance between two data, we use the shortest path between two nodes as the distance measure between two nodes. There are many algorithms for calculating the shortest path between two nodes, and the Dijkstra algorithm is one of the classic algorithms.

[0090] The distance between two nodes obtained by the Dijkstra algorithm is called the Dijkstra distance. The following proves that the Dijkstra distance satisfies the metric space properties.

[0091] Proof: For an undirected non-negative weighted graph G = (V, E), the adjacency matrix is ​​A, i, j are arbitrary node labels in the graph G, and A is first traversed and preprocessed:

[0092] if A[i][j]=0and i≠j,then A[i][j]=max

[0093] Among them, max is a relatively large value that can measure the distance between two unconnected points. For example, in the entire graph, the maximum distance between two connected points is 14, so max can be 100 or other larger values, indicating that if there are two unconnected points, the distance between them is 100.

[0094] After preprocessing, only the values ​​on the main diagonal in the adjacency matrix are 0, that is, and the values ​​at other positions are all greater than 0. For the processed new adjacency matrix, the Dijkstra distance between two nodes is calculated, which is recorded as d(i,j).

[0095] (1) Positive definiteness: For any node i, j, it is obvious that

[0096] (2) Symmetry: Because the algorithm always obtains the shortest path between two nodes and the graph is undirected, for any node i, j, it is obvious that d(i, j) = d(j, i);

[0097] (3) Triangle inequality: For any node i, j, k:

[0098] ① If i, j, and k are interconnected, d(i, j) is the shortest path from i to j, and d(i, k) is the shortest path from i to k. i can be regarded as the intermediate node connecting j and k. Then the shortest path d(j, k) from j to k does not exceed d(i, j) + d(i, k), that is, d(i, j) + d(i, k) ≥ d(j, k);

[0099] ②If i is not connected to j, k, but j, k are connected, then d(i, j) = d(j, i) = max, d(i, k) = d(k, i) = max, then d(i, j) + d(i, k) > d(j, k), d(j, i) + d(j, k) > d(i, k), d(k, i) + d(k, j) > d(i, j);

[0100] ③If i, j, k are not connected to each other, d(i, j) = max, d(i, k) = max, and d(i, j) + d(i, k) = d(j, k).

[0101] In summary, for any node i, j, k, d(i, j)+d(i, k)≥d(j, k).

[0102] Since Dijkstra distance satisfies the properties of metric space, the graph node set and Dijkstra distance can form a metric space instance. This has completed the process of abstracting the original graph data into the metric space. The Dijkstra distance between two nodes in the metric space is the distance information, which can be used to sort out the distance matrix later.

[0103] In a specific implementation, based on the adjacency matrix of the graph, the 0 value on the non-diagonal line in the adjacency matrix is ​​changed to a relatively large value max (max is a relatively large value that can measure the distance between two unconnected points. For example, in the entire graph, the maximum distance between two connected points is 14, then max can be 100 or other larger values, indicating that if there are two unconnected points, the distance between them is 100), and a new adjacency matrix is ​​obtained. Based on the new adjacency matrix, the Dijkstra distance from each node to other nodes that satisfies the metric space property is calculated, and these Dijkstra distances are the distance information.

[0104] As described in step S140, a distance matrix of the graph is generated based on the node information and the distance information; wherein the distance matrix includes a graph node data set in a metric space and distance information of the graph nodes.

[0105] As an example, based on the Dijkstra distance from each node to other nodes that satisfies the properties of the metric space, that is, the distance information, the distance matrix of the graph is obtained, in which only the values ​​on the diagonal are 0. Specifically, let n be the number of nodes in the graph, create an n*n full "0" matrix, and update the value of the corresponding position of the target node in the full "0" matrix based on the calculated Dijkstra distance from the target node to another node, and traverse in this way to obtain the distance matrix. Each row (or column) of the distance matrix represents the Dijkstra distance from a node to all other nodes in the graph. Among them, the value on the diagonal in the distance matrix is ​​0, indicating the distance from the node to itself.

[0106] The support point space model is a method for reconstructing coordinates for metric space data, that is, to represent metric space data with vectors. The basic idea is to use the distance vectors from metric space data to multiple reference points as its coordinates. The target support point set composed of multiple reference points can directly randomly select the required number of support points (number of support points), or select support points through the method provided in this application, as follows:

[0107] As described in step S150, a target support point set is generated according to the number of support points and the distance matrix; wherein the number of support points in the target support point set is the same as the number of support points.

[0108] In an embodiment of the present invention, the specific process of "generating a target support point set according to the number of support points and the distance matrix" in step S150 can be further explained in combination with the following description.

[0109] As described in the following steps, determine the pre-selected support point set and non-support point set according to the graph node data set;

[0110] As described in the following steps, determining a target non-support point from the non-support point set according to the distance matrix and the pre-selected support point set;

[0111] As described in the following steps, the target support point set is generated according to the target non-support point and the pre-selected support point set; wherein the sum of the number of support points in the pre-selected support point set and the target non-support point is equal to the number of support points.

[0112] In an embodiment of the present invention, the specific process of “determining a target non-support point from the non-support point set according to the distance matrix and the pre-selected support point set” may be further explained in combination with the following description.

[0113] As described in the following steps, determining the shortest distance from each non-support point in the non-support point set to the pre-selected support point set according to the distance matrix;

[0114] As described in the following steps, the target non-support point is determined according to the shortest distance.

[0115] In a specific implementation, based on the distance matrix of the graph and the number of support points, the FFT (Farthest-first traversal) algorithm is used to select support points, specifically: randomly select a point as the first support point and add it to the support point set (that is, obtain a pre-selected support point set, the number of support points in the pre-selected support point set is less than the number of support points determined above), first find the shortest distance from each non-support point to the pre-selected support point set, and find the maximum value in the shortest distance, then add the non-support point corresponding to the maximum value found (that is, the target non-support point) to the pre-selected support point set, repeat this process until the required number of support points is obtained, and finally obtain the target support point set.

[0116] It should be noted that after the mapping from the original data space to the metric space is realized, the data is abstracted into points in the metric space. Although the versatility is improved, the coordinate information is also lost. The only available information is the distance value. The lack of coordinates makes it impossible to directly apply many mathematical tools. The support point space model provides a mechanism for mapping from the metric space to the multidimensional space and reconstructing the coordinates for the metric space data.

[0117] The following describes how to map graph data from the metric space to the multi-dimensional support point space.

[0118] As an example, there are many ways to reconstruct coordinates for the metric space. For example, the simplest way is to assign random coordinates to each data. Different reconstruction methods obtain different coordinates. This embodiment uses the support point space model to map data from the metric space to the multidimensional space, thereby realizing the vectorization of graph data. The basic idea of ​​the support point space model is to use the distance vector from the metric space data to multiple reference points as its coordinates.

[0119] According to the definition of the support point space, for a graph node dataset V in the metric space, V = {v1,v2,K,v n}, the distance function is Dijkstra distance (denoted as d), P is a set of support points of size k selected from V For any element v in V, using the distance vectors to all supporting points as its coordinates, we can define a mapping v from the metric space to the k-dimensional non-negative real space: p =(d(v,p1),d(v,p2),K,d(v,p k )). This completes the process of assigning coordinates to each graph node, which means embedding complex graph data into the k-dimensional vector space.

[0120] As described in step S160, a vector representation of the target node is generated according to the distance matrix and the target support point set.

[0121] In an embodiment of the present invention, the specific process of "generating a vector representation of a target node according to the distance matrix and the target support point set" in step S160 can be further explained in combination with the following description.

[0122] As described in the following steps, determining the distance from the target node to the target support point set according to the distance matrix;

[0123] As described in the following steps, a vector representation of the target node is determined according to a distance from the target node to the target support point set.

[0124] As an example, the number of support points in the target support point set is the vector dimension, and the distance from the target node to each support point in the target support point set is used as the coordinate value of the vector coordinate, thereby realizing the vectorization of each node.

[0125] In a specific implementation, a vector representation is generated for each node based on the selected support points and the distance matrix. Each coordinate value of this vector is the Dijkstra distance of the node to a support point. In this way, each node is converted into a vector in a low-dimensional space. Specifically, based on the selected support points and the distance matrix, for each node, the distance from all support points in the distance matrix is ​​selected as the vector representation of the node, and the vector representation of all nodes is obtained accordingly to complete the graph embedding.

[0126] The following are specific examples of the present invention:

[0127] There is a social network dataset that contains user nodes, friendship edges between users, and labels of some users (such as "active user" or "inactive user"). The goal is to use the technical solution of the present invention to embed the social network, classify users, and predict the active status of unlabeled users.

[0128] Since social network data usually contains a large number of users and complex relationships, it is very difficult to directly process such complex data. Through the technical solution of the present invention, these high-dimensional data are mapped into a low-dimensional space, making the data easier to process and analyze. The specific steps are as follows: Figure 3 As shown:

[0129] (1) Data input

[0130] Node data: Each user is a node with a unique ID and some basic attributes (such as age, gender, geographic location, etc.).

[0131] Edge data: The friendship relationships between users form the edges of the social network graph.

[0132] Label data: Some user nodes are labeled as "active users" or "inactive users".

[0133] (2) Data preprocessing

[0134] Graph construction: Based on the node and edge data, a social network graph is constructed (the adjacency matrix of the graph is generated).

[0135] (3) Graph Embedding Generation

[0136] By using the technical solution of the present invention, a low-dimensional vector representation of each node is generated based on a graph embedding method based on big data generalization.

[0137] The specific graph embedding method is as follows:

[0138] Based on the original point-edge relationship of the graph, let n be the number of nodes in the graph, create an n*n all-0 matrix. If there is an edge between two points, change 0 to 1 at the corresponding position in the all-0 matrix. In this way, traverse all edges to get the adjacency matrix of the graph.

[0139] Based on the adjacency matrix of the graph, change the 0 value on the non-diagonal line of the matrix to a relatively large value max (max is a relatively large value that can measure the distance between two unconnected points. For example, in the entire graph, the maximum distance between two connected points is 14, then max can be 100 or other larger values, indicating that if there are two unconnected points, the distance between them is 100);

[0140] Based on the new adjacency matrix, calculate the Dijkstra distance from each node to all other nodes, and thus obtain the distance matrix of the graph (in this matrix, only the values ​​on the diagonal are 0);

[0141] Determine the number of support points. You can use the intrinsic dimension of the data as the number of support points, or you can define the number of support points according to your needs.

[0142] Based on the distance matrix of the graph and the number of support points, the FFT algorithm can be used to select support points (randomly select a point as the first support point and add it to the support point set, first find the shortest distance from each non-support point to the selected support point set, and find the maximum value among the shortest distances, then add the non-support point corresponding to the maximum value found to the support point set, and repeat this process until the required number of support points is obtained), or you can directly randomly select the required number of support points;

[0143] Based on the selected support points and the distance matrix, for each node, the distance from it to all support points in the distance matrix is ​​selected and taken out as the vector representation of the node, and the vector representation of all nodes is obtained in this way to complete the graph embedding.

[0144] (4) User classification

[0145] Data partitioning: Divide the labeled user data into training set and test set.

[0146] Feature conversion: The generated graph embedding vector is used as the input feature of the classifier.

[0147] Classifier training: Use the labeled data and corresponding embedding vectors in the training set to train a classifier such as logistic regression, support vector machine (SVM), or random forest.

[0148] Model evaluation: Evaluate the performance of the classifier on the test set, such as using indicators such as accuracy and F1 score.

[0149] (5) Result output

[0150] Prediction results: Use the trained classifier to predict the activity status of unlabeled users.

[0151] This embodiment uses big data generalization to abstract complex graph data objects into elements in the metric space (including defining distance functions for graph nodes that satisfy the properties of the metric space), and uses the support point space model to map the graph data from the metric space to the multidimensional space (i.e., using the distance vectors from the metric space data to multiple reference points as its coordinates), thereby realizing the vectorization of the graph data. Since it is only necessary to find a distance function for the graph nodes that satisfies the properties of the metric space distance function, the complex graph data objects can be abstracted into elements in the metric space, and then the distance vectors from the metric space data to multiple reference points are used as its coordinates to realize the vectorization of the graph data. This makes the graph embedding method of this embodiment simpler while the performance meets the requirements.

[0152] The following experiments evaluate the performance of the graph embedding method based on big data generalization proposed in this paper in two application fields and compare it with three existing methods.

[0153] 1.1 Experimental environment: The software environment is: Windows 11 Professional operating system, Python3.11; the hardware environment is: CPU is Intel(R) Core(TM) i7-9700K, memory is 32G, GPU is NVIDIA GeForce RTX 4060Ti.

[0154] 1.2 Dataset:

[0155] (1) Dataset 1: Cora Dataset 1 is a citation network consisting of machine learning papers. The papers are selected in such a way that in the final corpus, each paper is cited by at least one other paper or cites at least one other paper. The labels represent the topics of the papers.

[0156] (2) Dataset 2: Citeseer Dataset 2 is similar to Dataset 1 and is also a citation network consisting of scientific papers, with labels representing the topics of the papers.

[0157] (3) Dataset 3: Wikipedia Dataset 3 is a network consisting of various web pages, with hyperlinks between them. The labels represent the categories of the web pages.

[0158] (4) Dataset 4: Blogcatalog Dataset 4 is a social relationship network of bloggers listed on the Blogcatalog website. Tags represent the interests of bloggers.

[0159] The data set information is shown in Table 1 below:

[0160]

[0161] Table 1

[0162] 1.3 Benchmark Methodology:

[0163] (1) Comparative Example 1: DeepWalk is a model that applies ideas from the NLP field to the field of graph embedding. It walks on the graph in a certain way to obtain multiple sequences, which are used to learn graph representations. The relationship between nodes is then used to learn low-dimensional vector representations of the nodes.

[0164] (2) Comparative Example 2: GraRep proposes an algorithm that maps the k-order information of a node to different subspaces. In order to capture the highest k-order information, k models are calculated separately. Each model captures information of a different order. Finally, the information expressions learned by each model are combined as the expression of all order information of a node, that is, the embedding of the node.

[0165] (3) Comparative Example 3: A biased random walk algorithm is used in combination with the Skip-gram algorithm to learn graph embedding, and the DFS neighborhood and BFS neighborhood are comprehensively considered. Node2vec (Comparative Example 3) can control the search strategy through parameter settings, thereby effectively balancing the homogeneity and structural validity of embedding.

[0166] 1.4 Experiment:

[0167] The method proposed in the present invention and comparative examples 1-3 were experimentally analyzed and evaluated in two downstream tasks: node classification and network visualization (the max value in Dijkstra distance was set to 100, and the support point selection method was random selection).

[0168] 1.4.1 Node Classification Based on Graph Embedding:

[0169] A good graph embedding method should be able to capture the structural information of the network, so it can be used for node classification tasks. For the method of the present invention and comparative examples 1-3, we use exactly the same experimental process to classify the nodes by using the obtained embedding as the feature of the node. Specifically, for the embedding dimension, that is, the dimension of the vector representation of the obtained node, we take it as 64, 128, 256, 512, 1024, and 2048 respectively to observe the performance of each method in different output dimensions; for the data set, we randomly divide the nodes in the original data set into training and test sets in a ratio of 7:3; for the classifier, we use two classifiers, support vector machine (SVM) and one-to-rest logistic regression (OvR), for classification. We repeated this process 20 times and show the average value of the evaluation index.

[0170] We use Micro-F1 and Macro-F1 as evaluation indicators for classification tasks:

[0171]

[0172] Where P represents precision, R represents recall, L represents the label set, and F1(l) represents the F1 score of the original label l.

[0173] The experimental results on four datasets are as follows Figure 4-Figure 7 As shown, Figure 4 The experimental results of dataset 1 are as follows. Figure 5 The experimental results of dataset 2 are as follows: Figure 6 The experimental results of dataset 3 are shown in Figure 2. Figure 7 Experimental results on dataset 4. The bold numbers indicate the highest performance in each column.

[0174] in, Figure 4-Figure 7 as well as Figure 8 In the figure, ours is the graph embedding method of the present invention, DeepWalk is comparative example 1, GraRep is comparative example 2, and Node2vec is comparative example 3.

[0175] pass Figure 4-7 It can be seen that for the method proposed in the present invention, when the cost (computation and storage cost) is higher, the performance is often better. When the same high cost is paid, the performance of the method of the present invention is often better than other graph embedding methods. In general, the method of the present invention can better extract the structural features of graph nodes, generate low-dimensional vector representations of nodes, and can be effectively used for node classification tasks.

[0176] 1.4.2 Network visualization based on graph embedding:

[0177] Network visualization is to reduce the dimension of the obtained embedding and visualize it. A good graph embedding method should make nodes of the same category close to each other and nodes of different categories far away from each other. For the present invention and all comparative examples, we set the embedding dimension to 1024, and then input the obtained embedding into t-SNE, set the output dimension to 2, and use the same color to represent nodes of the same category. The visualization results are shown in Figure 2. Figure 8 shown.

[0178] It can be seen intuitively from the results that on dataset 1, the performance of the method proposed by the present invention is similar to that of comparative examples 1 and 3, and is better than comparative example 2; on dataset 2, the method of the present invention is significantly better than other benchmark methods; on datasets 3 and 4, the performance of the four methods is poor, but on dataset 4, the method of the present invention clearly divides the nodes into two large areas.

[0179] In general, the method proposed in this paper has better performance in visualization tasks, which to a certain extent reflects that some information of the original graph is retained in the embedding, demonstrating the feasibility of this method.

[0180] In summary, the embedding method of the present invention is used in two tasks, node classification and network visualization, through four public datasets, and compared with three comparison examples for experimental and evaluation, which proves the effectiveness of the embedding method of the present invention.

[0181] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0182] Reference Fig. 9 , showing a graph embedding device based on big data generalization provided by an embodiment of the present application;

[0183] Specifically include:

[0184] The data set acquisition module 910 is used to acquire the data set to be embedded and determine the number of support points according to the data set to be embedded; wherein the data set to be embedded includes the node information and the edge information of the graph;

[0185] A relationship generation module 920, configured to generate a vertex-edge relationship of a graph according to the node information and the edge information;

[0186] A data metric module 930, configured to generate distance information in the graph nodes that satisfies the properties of the metric space based on the node information and the point-edge relationship; wherein the metric space properties are positive definiteness, symmetry, and triangle inequality;

[0187] A distance matrix generation module 940 is used to generate a distance matrix of the graph according to the node information and the distance information; wherein the distance matrix includes a graph node data set and distance information of the graph nodes in the metric space;

[0188] A support point selection module 950, configured to generate a target support point set according to the number of support points and the distance matrix; wherein the number of support points in the target support point set is the same as the number of support points;

[0189] The coordinate reconstruction module 960 is used to generate a vector representation of the target node according to the distance matrix and the target support point set.

[0190] In one embodiment of the present invention, the data metric module 930 includes:

[0191] An adjacency matrix generation submodule, used to generate an adjacency matrix of a graph according to the node information and the point-edge relationship;

[0192] The distance information generation submodule is used to determine the distance information in the graph nodes that satisfies the properties of the metric space based on the adjacency matrix.

[0193] In one embodiment of the present invention, the adjacency matrix generation submodule includes:

[0194] An initial matrix generating unit, used to determine an initial matrix of the graph according to the node information;

[0195] The adjacency matrix generating unit is used to generate the corresponding adjacency matrix according to the point-edge relationship and the initial matrix; wherein the adjacency matrix includes connection information and non-connection information.

[0196] In one embodiment of the present invention, the distance information generating submodule includes:

[0197] A new adjacency matrix generating unit, used for generating a new adjacency matrix according to the adjacency matrix and the disconnection information;

[0198] A distance information generating unit is used to determine the distance information from each node to all other nodes that satisfies the property of the metric space according to the new adjacency matrix.

[0199] In one embodiment of the present invention, the support point selection module 950 includes:

[0200] A pre-selected support point set generation submodule, used to determine a pre-selected support point set and a non-support point set according to the graph node data set;

[0201] A target non-support point generation submodule, configured to determine a target non-support point from the non-support point set according to the distance matrix and the pre-selected support point set;

[0202] The support point set generation submodule is used to generate the target support point set according to the target non-support point and the pre-selected support point set; wherein the sum of the number of support points in the pre-selected support point set and the target non-support point is equal to the number of support points.

[0203] In one embodiment of the present invention, the target non-support point generation submodule includes:

[0204] A distance calculation unit, configured to determine the shortest distance from each non-support point in the non-support point set to the pre-selected support point set according to the distance matrix;

[0205] A target non-support point generating unit is used to determine the target non-support point according to the shortest distance.

[0206] In one embodiment of the present invention, the coordinate reconstruction module 960 includes:

[0207] A coordinate element distance generation submodule, used to determine the distance from the target node to the target support point set according to the distance matrix;

[0208] The vector representation generation submodule is used to determine the vector representation of the target node according to the distance from the target node to the target support point set.

[0209] Reference Fig.10 , showing a computer device of a graph embedding method based on big data generalization of the present invention, which may specifically include the following:

[0210] The computer device 12 is in the form of a general-purpose computing device, and the components of the computer device 12 may include but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 connecting different system components (including the system memory 28 and the processing unit 16).

[0211] The bus 18 represents one or more of several types of bus 18 structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus 18 architectures. These architectures include, by way of example, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, an Audio Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0212] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0213] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write to non-removable, non-volatile magnetic media (commonly referred to as a "hard drive"). Although Fig.10 Not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical medium) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42, which are configured to perform the functions of various embodiments of the present invention.

[0214] A program / utility 40 having a set (at least one) of program modules 42 may be stored in, for example, a memory, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules 42, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.

[0215] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, cameras, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., local area networks (LANs)), wide area networks (WANs), and / or public networks (e.g., the Internet) via a network adapter 20. Fig.10 As shown, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be understood that although Fig.10 Not shown, other hardware and / or software modules may be used in conjunction with the computer device 12, including but not limited to: microcode, device drivers, redundant processing units 16, external disk drive arrays, RAID systems, tape drives, and data backup storage systems 34, etc.

[0216] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing a graph embedding method based on big data generalization provided by an embodiment of the present invention.

[0217] That is, when the processing unit 16 executes the program, it implements: obtaining the data set to be embedded, and determining the number of support points based on the data set to be embedded; wherein the data set to be embedded includes the node information and the edge information of the graph; generating the point-edge relationship of the graph based on the node information and the edge information; generating the distance information in the graph nodes that satisfies the properties of the metric space based on the node information and the point-edge relationship; wherein the metric space characteristics are positive definiteness, symmetry and triangle inequality; generating the distance matrix of the graph based on the node information and the distance information; wherein the distance matrix includes the graph node data set and the distance information of the graph nodes in the metric space; generating the target support point set based on the number of support points and the distance matrix; wherein the number of support points in the target support point set is the same as the number of support points; generating the vector representation of the target node based on the distance matrix and the target support point set.

[0218] In an embodiment of the present invention, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a graph embedding method based on big data generalization as provided in all embodiments of the present application:

[0219] That is, when the program is executed by the processor, it is implemented as follows: obtaining a data set to be embedded, and determining the number of support points based on the data set to be embedded; wherein the data set to be embedded includes the node information and edge information of the graph; generating the point-edge relationship of the graph based on the node information and the edge information; generating the distance information in the graph nodes that satisfies the properties of the metric space based on the node information and the point-edge relationship; wherein the metric space characteristics are positive definiteness, symmetry and triangle inequality; generating a distance matrix of the graph based on the node information and the distance information; wherein the distance matrix includes the graph node data set and the distance information of the graph nodes in the metric space; generating a target support point set based on the number of support points and the distance matrix; wherein the number of support points in the target support point set is the same as the number of support points; generating a vector representation of the target node based on the distance matrix and the target support point set.

[0220] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device or device.

[0221] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0222] The computer program code for performing the operation of the present invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet). The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other.

[0223] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0224] Finally, it should be noted that, in this application, relational terms such as first and second, etc., are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises", or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article, or terminal device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, article, or terminal device including the element.

[0225] The above is a detailed introduction to a graph embedding method and device based on big data pan-structure provided by the present application. Specific examples are used in the present application to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A graph embedding method based on big data pan-structure, characterized in that: Includes steps: Acquire a data set to be embedded, and determine the number of supporting points according to the data set to be embedded; wherein the data set to be embedded includes node information and edge information of the graph; Generate a vertex-edge relationship of a graph according to the node information and the edge information; Generate distance information in the graph nodes that satisfies the properties of the metric space based on the node information and the point-edge relationship; wherein the metric space properties are positive definiteness, symmetry, and triangle inequality; Generate a distance matrix of the graph according to the node information and the distance information; wherein the distance matrix includes a graph node data set and distance information of the graph nodes in the metric space; Generate a target support point set according to the number of support points and the distance matrix; wherein the number of support points in the target support point set is the same as the number of support points; A vector representation of a target node is generated according to the distance matrix and the target support point set.

2. The method according to claim 1, characterized in that The step of generating distance information satisfying the metric space property in the graph nodes according to the node information and the point-edge relationship comprises: Generate an adjacency matrix of the graph according to the node information and the point-edge relationship; Distance information satisfying the metric space property in the graph nodes is determined according to the adjacency matrix.

3. The method according to claim 2, characterized in that The step of generating an adjacency matrix of a graph based on the node information and the point-edge relationship comprises: Determine an initial matrix of the graph according to the node information; The corresponding adjacency matrix is ​​generated according to the point-edge relationship and the initial matrix; wherein the adjacency matrix includes connection information and non-connection information.

4. The method according to claim 3, characterized in that The step of determining distance information satisfying the metric space property in the graph nodes according to the adjacency matrix comprises: generating a new adjacency matrix according to the adjacency matrix and the disconnection information; The distance information from each node to all other nodes that satisfies the property of the metric space is determined according to the new adjacency matrix.

5. The method according to claim 1, characterized in that The step of generating a target support point set according to the number of support points and the distance matrix comprises: Determine a pre-selected support point set and a non-support point set according to the graph node data set; Determining a target non-support point from the non-support point set according to the distance matrix and the pre-selected support point set; The target support point set is generated according to the target non-support point and the pre-selected support point set; wherein the sum of the number of support points in the pre-selected support point set and the target non-support point is equal to the number of support points.

6. The method according to claim 5, characterized in that The step of determining a target non-support point from the non-support point set based on the distance matrix and the pre-selected support point set comprises: Determine the shortest distance from each non-support point in the non-support point set to the pre-selected support point set according to the distance matrix; The target non-support point is determined according to the shortest distance.

7. The method according to claim 1, characterized in that The step of generating a vector representation of a target node based on the distance matrix and the target support point set comprises: Determining the distance from the target node to the target support point set according to the distance matrix; A vector representation of the target node is determined according to a distance from the target node to the target support point set.

8. A graph embedding device based on big data pan-structure, characterized in that: include: A data set acquisition module, used to acquire a data set to be embedded, and determine the number of support points according to the data set to be embedded; wherein the data set to be embedded includes node information and edge information of the graph; A relationship generation module, used to generate a vertex-edge relationship of a graph according to the node information and the edge information; A data metric module, used to generate distance information in the graph nodes that satisfies the properties of the metric space based on the node information and the point-edge relationship; wherein the metric space characteristics are positive definiteness, symmetry, and triangle inequality; A distance matrix generation module, used to generate a distance matrix of the graph according to the node information and the distance information; wherein the distance matrix includes a graph node data set and distance information of the graph nodes in a metric space; A support point selection module, used for generating a target support point set according to the number of support points and the distance matrix; wherein the number of support points in the target support point set is the same as the number of support points; A coordinate reconstruction module is used to generate a vector representation of a target node based on the distance matrix and the target support point set.

9. A device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by the processor.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Graph embedding method based on maximum spanning tree

    CN114726738A

  • Directed network space embedding method based on hyperbolic geometry

    CN111209611A

  • Scientific and technological paper clustering analysis method based on variational diagram auto-encoder and K-Means

    CN112084328A

  • Method and apparatus for generating graph vector representation of graph data structure

    CN115238134A

  • Heterogeneous graph embedding method and system based on relation mining

    CN117807275A

Cited By

  • User behavior data storage optimization method based on approximate neighbor retrieval algorithm

    CN120803371A