A graph embedding method and device based on big data general construction

By using big data generalization and support point space model, graph data objects are abstracted into metric space elements and mapped to multidimensional space, solving the complexity problem of existing graph embedding methods and realizing efficient graph data vectorization and analysis.

CN119357191BActive Publication Date: 2025-11-04SHENZHEN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing graph embedding methods are complex to implement and perform poorly in some application scenarios, making it difficult to effectively process and analyze graph data.

Method used

By using a big data-based generalization approach, graph data objects are abstracted into elements in a metric space. The support point space model is used to map the data from the metric space to a multidimensional space, generating a vector representation of the target node. This process includes acquiring the dataset, generating point-edge relationships, distance information that satisfies the properties of the metric space, generating a distance matrix and a set of target support points, and finally generating a vector representation of the target node.

Benefits of technology

It enables the transformation of complex graph data into low-dimensional vector representations, simplifies the graph embedding process, improves processing and analysis efficiency, and supports downstream tasks such as node classification and link prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357191B_ABST
    Figure CN119357191B_ABST
Patent Text Reader

Abstract

The application provides a graph embedding method and device based on big data general construction, acquires a to-be-embedded data set, and determines the number of support points according to the to-be-embedded data set; wherein the to-be-embedded data set comprises node information of a graph and edge information of the graph; a point-edge relationship of the graph is generated according to the node information and the edge information; distance information meeting the metric space property in the graph node is generated according to the node information and the point-edge relationship; a distance matrix of the graph is generated according to the node information and the distance information; wherein the distance matrix comprises the graph node data set in the metric space and the distance information of the graph node; 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; and a vector representation of a target node is generated according to the distance matrix and the target support point set. Complex graph data is converted into a low-dimensional vector representation, and machine learning algorithms can be used to efficiently process and analyze the graph data.
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 particularly relates to a graph embedding method and device based on big data general structure. BACKGROUND

[0002] Graph data is ubiquitous in the real world, which can be used to represent various complex relationships in life, such as social networks, traffic networks, etc., therefore, graph analysis has gradually attracted 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, have shown great power in many fields. However, since graph data is a high-dimensional, non-Euclidean structure data, but 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 a graph embedding method, which well solves the above problems. Graph embedding is a technique that maps nodes in a graph to a low-dimensional space, which aims to preserve the similarity or relationship between nodes in the graph, so that nodes with connection relationship are close to each other, and nodes without connection are relatively far away, thereby capturing the original characteristics of the graph. This mapping makes graph data can be directly processed and analyzed by machine learning algorithms.

[0004] The emergence of graph embedding technology provides a new way for the processing and analysis of graph data, and is widely used in various analysis and processing tasks of graphs, such as node classification, link prediction, node clustering, network visualization, etc. and improves its performance, such as recommending possible friends or interesting content in social networks according to the social relationship of friends.

[0005] Existing graph embedding methods can be roughly divided into three categories: matrix decomposition-based graph embedding, random walk-based graph embedding, and graph neural network-based graph embedding, but the current implementation of these graph embedding methods is relatively complex, and performs poorly in some application scenarios. SUMMARY

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

[0007] A graph embedding method based on big data general structure comprises the steps of:

[0008] Obtaining a to-be-embedded data set, and determining the number of support points according to the to-be-embedded data set; wherein the to-be-embedded data set comprises node information of a graph and edge information of the graph;

[0009] generating point-edge relationship of the graph according to the node information and the edge information;

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

[0011] generating a distance matrix of the graph according to the node information and the distance information; wherein the distance matrix comprises a graph node dataset in a metric space and distance information of the graph nodes;

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

[0013] generating vector representation of the target nodes according to the distance matrix and the target support point set.

[0014] Further, the step of generating distance information of the graph nodes satisfying metric space properties according to the node information and the point-edge relationship comprises:

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

[0016] determining distance information of the graph nodes satisfying metric space properties according to the adjacency matrix.

[0017] Further, the step of generating an adjacency matrix of the graph according to the node information and the point-edge relationship comprises:

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

[0019] generating the corresponding adjacency matrix according to the point-edge relationship and the initial matrix; wherein the adjacency matrix comprises connection information and non-connection information.

[0020] Further, the step of determining distance information of the graph nodes satisfying metric space properties according to the adjacency matrix comprises:

[0021] generating a new adjacency matrix according to the adjacency matrix and the non-connection information;

[0022] determining distance information of each node to all other nodes satisfying the metric space properties according to the new adjacency matrix.

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

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

[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] generating the target support point set according to the target non-support point and the pre-selected support point set; wherein 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] Further, the step 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, comprises:

[0028] 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;

[0029] determining the target non-support point according to the shortest distance.

[0030] Further, the step of generating a vector representation of the target node according to the distance matrix and the target support point set, comprises:

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

[0032] determining the vector representation of the target node according to the distance from the target node to the target support point set.

[0033] A graph embedding device based on big data general construction, comprising:

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

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

[0036] a data metric module, configured to generate distance information of the graph nodes satisfying a metric space property according to the node information and the point-edge relationship; wherein the metric space property is positive definiteness, symmetry and triangle inequality;

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

[0038] a support point selection module, 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;

[0039] a coordinate reconstruction module configured to generate a vector representation of a target node according to the distance matrix and the target support point set.

[0040] An apparatus comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program implementing the steps of the method for graph embedding based on big data generalization when executed by the processor.

[0041] A computer readable storage medium having stored thereon a computer program, the computer program implementing the steps of the method for graph embedding based on big data generalization when executed by a processor.

[0042] The present application has the following advantages:

[0043] In the embodiments of the present application, in view of the problems that the implementation manners of the existing graph embedding methods are relatively complex and perform poorly in some application scenarios, the present application provides a solution of abstracting graph data objects into elements in a metric space and mapping data from the metric space to a multi-dimensional space by using a support point space model, specifically: obtaining a to-be-embedded data set, and determining a number of support points according to the to-be-embedded data set; wherein the to-be-embedded data set includes node information of a graph and edge information of the graph; generating a point-edge relationship of the graph according to the node information and the edge information; generating distance information of the graph nodes that satisfy metric space properties according to the node information and the point-edge relationship; wherein the metric space properties are positive definiteness, symmetry, and triangle inequality; 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 in a metric space and distance information of the graph nodes; 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; and generating a vector representation of a target node according to the distance matrix and the target support point set. The present application only needs to find a distance function for graph nodes that satisfies the properties of the distance function of the metric space, and then can abstract complex graph data objects into elements in a metric space, and take the distance vector of the metric space data to multiple reference points as its coordinates, so as to realize the vectorization of the graph data. Converting complex graph data into low-dimensional vector representation can utilize machine learning algorithms to efficiently process and analyze the graph data, and is helpful to promote downstream tasks based on graph embedding, such as node classification, link prediction, etc. BRIEF DESCRIPTION OF DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the present application, the drawings needed to be used in the description of the present application will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without any creative effort on the basis of these drawings.

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

[0046] Figure 2 is a flow chart of a graph embedding method based on big data generalization provided by an embodiment of the present application;

[0047] Figure 3 is a flow chart of predicting the active state of an unlabeled user based on social network data provided by an embodiment of the present application;

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

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

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

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

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

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

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

[0055] In order to make the purposes, characteristics and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below in combination with the drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall 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 for converting graph data into vectors, that is, representing the nodes of the graph with vectors. The existing graph embedding scheme: CN202210297523.1 A graph embedding method based on a maximum spanning tree, sampling node paths based on a random walk algorithm in the original network community to obtain node sequences; constructing a weighted network based on the sampled node paths, generating a maximum spanning tree based on the weighted network; calculating the betweenness centrality of the maximum spanning tree to obtain a number of edge sets distributed between the original network communities as cut sets; splitting the original sequence based on the cut sets to obtain a fine-grained sequence; taking the original sequence as the initial embedding of the fine-grained sequence, and obtaining a more fine-grained embedding value through iteration until the final embedding result is obtained. However, this method relies on the random walk algorithm to sample node paths. The parameters of the random walk (such as step length, etc.) can significantly affect the generated node sequences, and in turn affect the effectiveness of the subsequent steps. Inappropriate parameters can cause sampling bias, which cannot 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 (such as ring structure, multiple connections, etc.) in the original graph. These information may be crucial for certain network analysis tasks (such as prediction, classification, etc.). Therefore, this method is more complex to process, and may not perform well in certain application scenarios.

[0057] Considering that big data genericity can vectorize different types of data, big data genericity as a general data management and analysis mode can abstract data to a metric space, only need to define a distance function that satisfies the properties of the metric space, and then reconstruct the coordinates of the metric space data through the support point space model. For this purpose, the inventors propose a graph embedding method based on big data genericity. Through big data genericity, complex graph data objects can be abstracted into elements in a metric space, and the support point space model is used to map data from the metric space to a multi-dimensional space, thereby efficiently realizing the vectorization of graph data.

[0058] Referring to Figure 1 and Figure 2 , a graph embedding method based on big data genericity provided by an embodiment of the present application is shown;

[0059] The method comprises:

[0060] S110, acquire a to-be-embedded dataset, and determine a number of support points according to the to-be-embedded dataset; wherein the to-be-embedded dataset comprises node information of a graph and edge information of the graph;

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

[0062] S130, generate distance information of the graph nodes satisfying a metric space property according to the node information and the point-edge relationship; wherein the metric space property is positive definiteness, symmetry and triangle inequality;

[0063] S140, generate a distance matrix of the graph according to the node information and the distance information; wherein the distance matrix comprises a graph node dataset in a metric space and distance information of the graph nodes;

[0064] S150, 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;

[0065] S160, generate a vector representation of a target node according to the distance matrix and the target support point set.

[0066] In the embodiments of the present application, in view of the problems that the implementation manners of the existing graph embedding methods in the prior art are relatively complex and perform poorly in some application scenarios, the present application provides a solution of abstracting a graph data object into an element in a metric space and mapping data from the metric space to a multi-dimensional space by using a support point space model, specifically: obtaining a to-be-embedded data set, and determining a number of support points according to the to-be-embedded data set; wherein the to-be-embedded data set includes node information of a graph and edge information of the graph; generating a point-edge relationship of the graph according to the node information and the edge information; generating distance information of the graph nodes that satisfy a metric space property according to the node information and the point-edge relationship; wherein the metric space property is positive definiteness, symmetry and triangle inequality; 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 in a metric space and distance information of the graph nodes; 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; and generating a vector representation of a target node according to the distance matrix and the target support point set. The present application only needs to find a distance function for the graph nodes that satisfies the distance function property of the metric space, and then the complex graph data object can be abstracted into an element in the metric space, and the distance vector of the metric space data to multiple reference points can be used as the coordinates, so as to realize the vectorization of the graph data. The complex graph data is converted into a low-dimensional vector representation, and machine learning algorithms can be used to efficiently process and analyze the graph data, which helps to promote downstream tasks based on graph embedding, such as node classification, link prediction, etc.

[0067] In the following, a graph embedding method based on big data generalization in the present exemplary embodiment will be further described.

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

[0069] It should be noted that a graph can be used to represent various complex relationships in life, such as social networks, transportation networks, etc., but it is not simple to process and analyze graph data. With the continuous development of artificial intelligence technology, it has shown strong 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, the present application first needs to abstract a complex graph data object into an element in a metric space, and then use the distance vector of the metric space data to multiple reference points as the coordinates, so as to realize the vectorization of the graph data.

[0070] As an example, the number of support points is the number of dimensions of the coordinates, and the determination of the number of support points can use the intrinsic dimension of the data as the number of support points, or can define the number of support points according to the needs, but the number of support points cannot exceed the number of nodes of the graph. The intrinsic dimension refers to the effective dimension number of a data set, that is, most of the information of the data set can be expressed by the least dimension. After determining the number of dimensions of the node, such as three-dimensional coordinates (x, y, z), the coordinate values of x, y, and z also need to be determined. The present application can abstract complex graph data objects into elements in a metric space through big data generalization, and map the data from the metric space to the multi-dimensional space by using the support point space model, so as to realize the vectorization of the graph data.

[0071] A graph is a data structure composed of a finite non-empty set of vertices and a set of edges between vertices (also called nodes) , which is usually represented as: , wherein, represents a graph, is the vertex set of the graph , and is the edge set of the graph . First, the original graph data of the graph is obtained, that is, the node set and the edge set connecting the nodes in the graph, to obtain the unique identifier (ID) and the name of the node and the weight of the edge.

[0072] As described in step S120, the point-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 of the graph and the edge information of the graph, the point-edge relationship of the graph is obtained based on the node information of the graph and the edge information of the graph, that is, the edge information of each node, including the start point and the end point of each edge, the weight of the edge, the direction, etc.

[0074] As described in step S130, the distance information in the graph node satisfying the metric space property is generated according to the node information and the point-edge relationship; wherein the metric space property is positive definiteness, symmetry and triangle inequality.

[0075] In an embodiment of the present application, the specific process of "generating distance information in the graph node satisfying the metric space property according to the node information and the point-edge relationship; wherein the metric space property is positive definiteness, symmetry and triangle inequality" described in step S130 can be further described in combination with the following description.

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

[0077] ​According to the node information and the point-edge relationship, an adjacency matrix of the graph is generated.

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

[0079] According to the node information, an initial matrix of the graph is determined;

[0080] According to the point-edge relationship and the initial matrix, a corresponding adjacency matrix is generated; wherein the adjacency matrix includes connection information and no-connection information.

[0081] As an example, based on the collected node information of the graph and the point-edge relationship of the graph, a framework of the adjacency matrix is constructed, the number of rows and the number of columns of which are 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" representing no connection between 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, create a n*n all "0" matrix, if there is an edge between two points, change "0" to "1" in the corresponding position of the all "0" matrix, and traverse all edges to obtain the adjacency matrix of the graph. In this way, the "1" and "0" finally filled in the adjacency matrix can reflect which nodes in the graph are directly connected, "1" represents connection information between nodes, and "0" represents no connection information between nodes.

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

[0084] According to the adjacency matrix and the no-connection information, a new adjacency matrix is generated;

[0085] According to the new adjacency matrix, the distance information of each node to all other nodes satisfying the metric space property is determined.

[0086] It should be noted that the metric space can be defined as a binary tuple (M, d), where M is a non-empty data set, and d is a distance function defined on the element pair of M with the following properties: (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) triangle inequality: for any x, y, z∈M, d(x, y)+d(y, z)≥d(x, z).

[0087] Considering that the main purpose of graph embedding is to vectorize graphs while preserving some information, a graph embedding method based on big data generalization is proposed. Big data generalization can abstract complex data into elements of a metric space. The metric space has no restrictions on the internal structure of the data; it only needs to define a distance function that conforms to the properties of the metric space. During the data management and analysis process of the metric space, only the three properties of the metric space satisfied by the distance function are used, without utilizing 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. However, the data is abstracted into points in the metric space. Although this improves universality, it also loses coordinate information. The only usable information is the distance value. The lack of coordinates makes many mathematical tools unusable directly. The support point space model provides a mechanism to map from the metric space to a multidimensional space and reconstruct the coordinates of the metric space data. In other words, big data generalization abstracts the original data into the metric space and then maps it to the support point space, which is a multidimensional vector space. Simply put, big data generalization can be used as a data vectorization method. For graphs, it can also be mapped to a low-dimensional vector space, which can be used as a graph embedding method.

[0088] As an example, graphs are typically represented using their adjacency matrix. First, the original graph data needs to be abstracted into elements in a metric space. This requires defining a distance function that satisfies the properties of the metric space (positive definiteness, symmetry, and trigonometric inequality). However, finding such a function is not easy, especially for non-Euclidean data like graphs. Considering that the purpose of the distance function is simply to measure the distance between pairs of data, we use the shortest path between any two nodes as the distance metric. There are many algorithms for calculating the shortest path between two nodes; Dijkstra's algorithm is one of the classic ones.

[0089] The distance between any two nodes obtained by Dijkstra's algorithm is called the Dijkstra distance. The following proves that the Dijkstra distance satisfies the metric space property.

[0090] Proof: For an undirected non-negative weighted graph The adjacency matrix is , It is a picture For any node label in the middle, first... Perform traversal preprocessing:

[0091]

[0092] Where max is a relatively large value, which 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 take 100 or other larger values, indicating that if there are two points unconnected, the distance between them is 100.

[0093] After preprocessing, only the values on the main diagonal of the adjacency matrix are 0, i.e., and the values at other positions are all greater than 0. For the new adjacency matrix after processing, the Dijkstra distance between two nodes is calculated, denoted as .

[0094] (1) Positive definiteness: for any node , obviously, ;

[0095] (2) Symmetry: because the algorithm always gets the shortest path between two nodes, and the graph is undirected, for any node , obviously ;

[0096] (3) Triangle inequality: for any node :

[0097] a. If are connected to each other, is the shortest path between , is the shortest path between , can be regarded as the intermediate node connecting and , then the shortest path from to is , which is no more than , i.e. ;

[0098] b. If and are unconnected, are connected, and there are , , then , , ;

[0099] c. If are unconnected, , , and there are .

[0100] In summary, for any node , there is .

[0101] Since the Dijkstra distance satisfies the metric space property, the set of graph nodes and the Dijkstra distance can constitute a metric space instance. In this way, the process of abstracting the original graph data to a metric space has been completed. The Dijkstra distance between two nodes in the metric space is the distance information, which can be used to obtain the distance matrix.

[0102] In a specific implementation, based on the adjacency matrix of the graph, the 0 values on the non-diagonal lines of the adjacency matrix are changed to a relatively large value max (max is a relatively large value that can measure the distance between two disconnected points, for example, the distance between two connected points in the entire graph is at most 14, then max can be taken as 100 or other larger values, indicating that if there are two disconnected points, the distance between them is 100), to obtain a new adjacency matrix. Based on the new adjacency matrix, the Dijkstra distance of each node to other nodes satisfying the metric space property is calculated, and these Dijkstra distances are the distance information.

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

[0104] As an example, based on the Dijkstra distance of each node to other nodes satisfying the metric space property, i.e. the distance information, the distance matrix of the graph is obtained, in which only the values on the diagonal lines are 0. Specifically, let n be the number of nodes of the graph, create an n*n all "0" matrix, and update the value of the target node corresponding position in the all "0" matrix according to the calculated Dijkstra distance of the target node to another node, and iterate accordingly, to obtain the distance matrix. Each row (or column) of the distance matrix represents the Dijkstra distance of a node to all other nodes in the graph. Among them, the values on the diagonal lines in the distance matrix are 0, indicating the distance of the node to itself.

[0105] The support point space model is a method for reconstructing coordinates of metric space data, that is, the metric space data is represented by a vector, and the basic idea is to use the distance vector of the metric space data to multiple reference points as its coordinates. The target support point set composed of multiple reference points can directly select the required number (number of support points) of support points, or can select the support points through the method provided in the present application, as follows:

[0106] 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.

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

[0108] The pre-selected support point set and the non-support point set are determined according to the graph node data set, as described in the following steps.

[0109] The target non-support point is determined from the non-support point set according to the distance matrix and the pre-selected support point set, as described in the following steps.

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

[0111] In an embodiment of the present application, the specific process of "determining the target non-support point from the non-support point set according to the distance matrix and the pre-selected support point set" can be further illustrated in combination with the following description.

[0112] The shortest distance from each non-support point in the non-support point set to the pre-selected support point set is determined according to the distance matrix, as described in the following steps.

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

[0114] 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 the support points, specifically: a point is randomly selected as the first support point to be added to the support point set (i.e. to obtain the 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 in the foregoing), 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 (i.e. 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.

[0115] It should be noted that after the mapping from the original data space to the metric space is implemented, the data is abstracted into points in the metric space, although the generality is improved, but at the same time the coordinate information is lost, the only available information is the distance value. The loss of coordinates leads to the fact that many mathematical tools cannot be directly applied, and the support point space model provides a mechanism for mapping from the metric space to the multi-dimensional space, which reconstructs the coordinates of the metric space data.

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

[0117] As an example, there are many ways to reconstruct coordinates for a metric space; for instance, the simplest method is to assign random coordinates to each data point. Different reconstruction methods yield different coordinates. This embodiment utilizes a support point space model to map data from the metric space to a multidimensional space, thereby achieving the vectorization of graph data. The basic idea of ​​the support point space model is to use the distance vectors from the metric space data to multiple reference points as its coordinates.

[0118] Based on the definition of support point space, for a graph node dataset in metric space , The distance function is Dijkstra's distance (denoted as ). ), From Selected size The set of support points .for any element in Using the distance vectors from each support point to its coordinates, a coordinate system can be defined from the metric space to... Mapping of the nonnegative real space This completes the process of assigning coordinates to each graph node, which means embedding complex graph data into... In a 3D vector space.

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

[0120] In one embodiment of the present invention, the specific process of "generating a vector representation of the target node based on the distance matrix and the target support point set" in step S160 can be further explained in conjunction with the following description.

[0121] As described in the following steps, the distance from the target node to the target support point set is determined based on the distance matrix;

[0122] As described in the following steps, the vector representation of the target node is determined based on the distance from the target node to the target support point set.

[0123] 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.

[0124] In one implementation, a vector representation is generated for each node based on the selected support points and the distance matrix. Each coordinate value of the vector is the Dijkstra distance of the node to a support point. In this way, each node is converted to a vector in a low-dimensional space. Specifically, based on the selected support points and the distance matrix, for each node, the distances of the node to all support points in the distance matrix are selected to obtain the vector representation of the node, and the vector representations of all nodes are obtained to complete the graph embedding.

[0125] The following is a specific example of the present application:

[0126] There is a social network dataset containing user nodes, friend relationship edges between users, and labels (such as "active user" or "inactive user") of some users. The goal is to realize the embedding of the social network using the technical solution of the present application, classify the users, and predict the active state of unlabeled users.

[0127] Since social network data usually contains a large number of users and complex relationships, it is very difficult to directly process such complex data. By mapping these high-dimensional data into a low-dimensional space using the technical solution of the present application, the data is more easily processed and analyzed. The specific steps are as shown in Figure 3

[0128] (1) Data input

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

[0130] Edge data: Friend relationships between users form edges of the social network graph.

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

[0132] (2) Data preprocessing

[0133] Graph construction: Construct a social network graph (generate an adjacency matrix of the graph) according to the node and edge data.

[0134] (3) Graph embedding generation

[0135] Using the technical solution of the present application, the low-dimensional vector representation of each node is generated based on the graph embedding method of big data general construction.

[0136] The graph embedding method is specifically:

[0137] ​Based on the original point-edge relationship of the graph, let n be the number of nodes of the graph, create an n*n all-0 matrix, if there is an edge between two points, change the 0 at the corresponding position in the all-0 matrix to 1, and traverse all edges in this way to obtain the adjacency matrix of the graph;

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

[0139] Based on the new adjacency matrix, calculate the Dijkstra distance of each node to all other nodes to obtain the distance matrix of the graph (in this matrix, only the value on the diagonal line is 0);

[0140] Determine the number of support points, which can use the intrinsic dimension of the data as the number of support points, or define the number of support points according to the requirements;

[0141] 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 in the shortest distance, then add the non-support point corresponding to the maximum value to the support point set, repeat this process until the required number of support points is obtained), or directly randomly select the required number of support points;

[0142] Based on the selected support points and the distance matrix, for each node, select the distance to all support points in the distance matrix as the vector representation of the node, and obtain the vector representation of all nodes to complete the graph embedding.

[0143] (4) User classification

[0144] Data division: divide the labeled user data into training set and test set.

[0145] Feature conversion: use the generated graph embedding vector as the input feature of the classifier.

[0146] Classifier training: use the label data and corresponding embedding vector in the training set to train the classifier such as logistic regression, support vector machine (SVM) or random forest.

[0147] Model evaluation: evaluate the performance of the classifier on the test set, such as using accuracy, F1 score, etc.

[0148] (5) Result output

[0149] Prediction result: using the trained classifier to predict the active state of unlabeled users.

[0150] The embodiment abstracts the complex graph data object into an element in a metric space by big data generalization, defines a distance function for the graph node satisfying the metric space property, and maps the graph data from the metric space to the multi-dimensional space by using the support point space model (i.e., the distance vector from the metric space data to multiple reference points as its coordinates), so as to realize the vectorization of the graph data. Since only a distance function for the graph node satisfying the metric space distance function property is needed, the complex graph data object can be abstracted into an element in a metric space, and the vectorization of the graph data can be realized by taking the distance vector from the metric space data to multiple reference points as its coordinates. Therefore, the graph embedding method is simpler under the condition that the performance meets the demand.

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

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

[0153] 1.2 Dataset:

[0154] (1) Dataset 1: Cora Dataset 1 is a citation network composed of machine learning papers. The selection method of the papers is that in the final corpus, each paper is cited by at least one other paper or cites at least one other paper. The label represents the topic of the paper.

[0155] (2) Dataset 2: Citeseer Dataset 2 is similar to Dataset 1, which is also a citation network composed of scientific papers. The label represents the topic of the paper.

[0156] (3) Dataset 3: Wikipedia Dataset 3 is a network composed of various web pages, and the web pages have a hyperlink relationship. The label represents the category of the web page.

[0157] (4) Dataset 4: Blogcatalog Dataset 4 is a social relationship network of bloggers listed on the Blogcatalog website. The label represents the interest of the blogger.

[0158] The dataset information is shown in Table 1 as follows:

[0159]

[0160] Table I

[0161] 1.3 Baseline methods:

[0162] (1) Comparative Example 1: DeepWalk is a model that applies the idea from NLP field to the field of graph embedding. By performing a certain kind of walk on the graph, a plurality of sequences are obtained, graph representation learning is performed using the sequences, and the low-dimensional vector representation of the node is learned using the relationship between the nodes.

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

[0164] (3) Comparative Example 3: A biased random walk algorithm is used and combined with a Skip-gram algorithm to learn graph embedding. The DFS neighborhood and BFS neighborhood are comprehensively considered, and Node2vec (Comparative Example 3) can control the search strategy by parameter setting, thereby effectively balancing the homogeneity and structural effectiveness of the embedding.

[0165] 1.4 Experiments:

[0166] The method proposed in the application and Comparative Examples 1-3 are analyzed by experiments, and are evaluated in two downstream tasks of node classification and network visualization (the max in Dijkstra distance is set to 100, and the support point selection method is random selection).

[0167] 1.4.1 Node classification based on graph embedding:

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

[0169] We use Micro-F1 and Macro-F1 as evaluation metrics for classification tasks:

[0170]

[0171] where P denotes precision, R denotes recall, L denotes the set of labels, and F1(l) denotes the F1 score for the original label l.

[0172] The experimental results on the four datasets are shown in Figures 4-7 Figure 4 The experimental results for dataset 1 are shown in Figure 5 The experimental results for dataset 2 are shown in Figure 6 The experimental results for dataset 3 are shown in Figure 7 The experimental results for dataset 4 are shown in. The bolded numbers represent the highest performance in each column.

[0173] where ours is the graph embedding method of the present application, DeepWalk is Comparative Example 1, GraRep is Comparative Example 2, and Node2vec is Comparative Example 3. Figures 4-7 Figure 8 It can be seen from that for the method proposed in the present application, the higher the cost (computational and storage cost) paid, the better the performance tends to be, and when the same high cost is paid, the performance of the method of the present application tends to be better than other graph embedding methods. Overall, the method of the present application can better extract the structural features of graph nodes, generate low-dimensional vector representations of nodes, and be effectively used for node classification tasks.

[0174] Figures 4-7 1.4.2 Network visualization based on graph embedding:

[0175] Network visualization is to reduce the dimensionality of the obtained embedding and visualize it. A good graph embedding method should make nodes of the same class close to each other and nodes of different classes far away from each other. For the present application and all comparative examples, we set the embedding dimension to 1024, 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 class. The visualization results are shown in

[0176] From the results, it can be seen intuitively that on dataset 1, the method proposed in the present application has similar performance to Comparative Example 1 and Comparative Example 3, and is better than Comparative Example 2; on dataset 2, the method of the present application is significantly better than other benchmark methods; on dataset 3 and dataset 4, the performance of the four methods is poor, but on dataset 4, the method of the present application clearly divides the nodes into two large blocks. Figure 8

[0177]

[0178] ​​​​In general, the method has better performance in the visualization task, which reflects that part of the original graph information is preserved in the embedding, and the feasibility of the method is embodied.

[0179] In summary, the embedding method of the present application is used in node classification and network visualization tasks through four public data sets, and comparative experiments and evaluation are carried out with three kinds of comparative examples, which proves the effectiveness of the embedding method of the present application.

[0180] For the device embodiment, it is basically similar to the method embodiment, so it is described simply, and the related part refers to the part of the method embodiment.

[0181] Reference Figure 9 , a graph embedding device based on big data general construction is shown;

[0182] Specifically includes:

[0183] The data set acquisition module 910 is configured to acquire a to-be-embedded data set, and determine the number of support points according to the to-be-embedded data set; wherein the to-be-embedded data set includes node information of a graph and edge information of the graph.

[0184] The relationship generation module 920 is configured to generate a point-edge relationship of the graph according to the node information and the edge information.

[0185] The data metric module 930 is configured to generate distance information of the graph nodes that satisfy the metric space properties according to the node information and the point-edge relationship; wherein the metric space properties are positive definiteness, symmetry and triangular inequality.

[0186] The distance matrix generation module 940 is configured to generate a distance matrix of the graph according to the node information and the distance information; wherein the distance matrix includes the distance information of the graph node data set and the graph nodes in the metric space.

[0187] The support point selection module 950 is 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.

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

[0189] In an embodiment of the present application, the data metric module 930 includes:

[0190] The adjacency matrix generation submodule is configured to generate an adjacency matrix of the graph according to the node information and the point-edge relationship.

[0191] The distance information generation submodule is configured to determine distance information of nodes satisfying a metric space property according to the adjacency matrix.

[0192] In an embodiment of the present application, the adjacency matrix generation submodule comprises:

[0193] The initial matrix generation unit is configured to determine an initial matrix of the graph according to the node information.

[0194] The adjacency matrix generation unit is configured to generate the adjacency matrix according to the point-edge relationship and the initial matrix; wherein the adjacency matrix comprises connection information and non-connection information.

[0195] In an embodiment of the present application, the distance information generation submodule comprises:

[0196] The new adjacency matrix generation unit is configured to generate a new adjacency matrix according to the adjacency matrix and the non-connection information.

[0197] The distance information generation unit is configured to determine distance information of each node to all other nodes satisfying the metric space property according to the new adjacency matrix.

[0198] In an embodiment of the present application, the support point selection module 950 comprises:

[0199] The preselected support point set generation submodule is configured to determine a preselected support point set and a non-support point set according to the graph node data set.

[0200] The target non-support point generation submodule is configured to determine a target non-support point from the non-support point set according to the distance matrix and the preselected support point set.

[0201] The support point set generation submodule is configured to generate the target support point set according to the target non-support point and the preselected support point set; wherein the number of support points in the preselected support point set and the target non-support point is equal to the number of support points.

[0202] In an embodiment of the present application, the target non-support point generation submodule comprises:

[0203] The distance calculation unit is configured to determine the shortest distance of each non-support point in the non-support point set to the preselected support point set according to the distance matrix.

[0204] The target non-support point generation unit is configured to determine the target non-support point according to the shortest distance.

[0205] In an embodiment of the present application, the coordinate reconstruction module 960 comprises:

[0206] The coordinate element distance generating submodule is configured to determine distances from the target node to the target support point set according to the distance matrix;

[0207] The vector representation generating submodule is configured to determine a vector representation of the target node according to the distances from the target node to the target support point set.

[0208] Referring to Figure 10 The computer device of the present application is shown in a graph embedding method based on big data general construction, and can specifically include the following:

[0209] The computer device 12 is in the form of a general-purpose computing device, and the components of the computer device 12 can 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.

[0210] The bus 18 represents one or more of several types of buses 18, including a memory bus or memory controller, a peripheral bus, a graphics acceleration bus, a processor or local bus using any of a variety of bus architectures including an industry standard architecture (ISA) bus, a micro-channel architecture (MAC) bus, an enhanced ISA bus, a video electronics standards association (VESA) local bus, and a peripheral component interconnect (PCI) bus.

[0211] The computer device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by the computer device 12 and includes both volatile and non-volatile media, removable and non-removable media.

[0212] The system memory 28 can 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 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 34 can be provided for reading from and writing to non-removable, non-volatile magnetic media (typically called a "hard drive"). Figure 10 Although not shown in the computer device 12, a magnetic disk drive for reading from and writing to a removable, non-volatile magnetic data storage medium (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable, non-volatile optical disk storage medium (e.g., a CD-ROM, DVD-ROM or other optical media) can be provided. In such instances, each drive can be connected to the bus 18 by one or more data media interfaces. The memory can include at least one program product having a set (e.g., at least one) of program modules 42 configured to carry out the functions of embodiments of the application.

[0213] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules 42, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.

[0214] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, camera, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN)), wide area network (WAN), and / or public networks (e.g., the Internet) via network adapter 20. Figure 10 As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 10 Not shown, it can be combined with computer device 12 to use other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing unit 16, external disk drive array, RAID system, tape drive and data backup storage system 34, etc.

[0215] 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 generics provided in this embodiment of the invention.

[0216] That is, when the processing unit 16 executes the above program, it performs the following: obtaining the dataset to be embedded, and determining the number of support points based on the dataset to be embedded; wherein the dataset to be embedded includes node information and edge information of the graph; generating the vertex-edge relationship of the graph based on the node information and the edge information; generating distance information of the graph nodes that satisfy the metric space properties based on the node information and the vertex-edge relationship; wherein the metric space properties are positive definiteness, symmetry, and trigonometric 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 dataset 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; and generating a vector representation of the target node based on the distance matrix and the target support point set.

[0217] In the embodiments of the present application, the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement a graph embedding method based on big data general structure provided by all the embodiments of the present application.

[0218] That is, the computer program is executed by the processor to implement the following: obtaining a to-be-embedded data set, and determining a number of support points according to the to-be-embedded data set; wherein the to-be-embedded data set comprises node information of a graph and edge information of the graph; generating point-edge relationship of the graph according to the node information and the edge information; generating distance information of the graph nodes satisfying a metric space property according to the node information and the point-edge relationship; wherein the metric space property is positive definiteness, symmetry and triangle inequality; 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 the graph nodes; 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; and generating vector representation of a target node according to the distance matrix and the target support point set.

[0219] Any combination of one or more computer readable medium can be employed. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this application, the computer readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus, or device.

[0220] A computer readable signal medium can include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium can be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

[0221] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, 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 the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). The embodiments of the present application described above are implemented in a manner as follows, and each of the embodiments focuses on the difference from other embodiments. The same or similar parts among the embodiments are cross-referenced.

[0222] While the preferred embodiments of the application have been described, additional variations and modifications can be made to the embodiments by those of skill in the art once they have the benefit of the present disclosure. Therefore, the appended claims are intended to cover all such variations and modifications as falling within the scope of the application.

[0223] Finally, it should be noted that the terms "first", "second", and the like, herein do not denote any order, quantity, combination, or importance, but rather are used to distinguish one element from another, and are not intended to denote a practical, positional relationship between such elements. Also, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0224] The above describes in detail a graph embedding method and device based on big data generalization provided by the present application. The principles and implementation manners of the present application are described by using specific examples. The above description of the embodiments is only used to help understand the method and core idea of the present application. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges can be changed. In summary, the content of the specification should not be understood as limiting the present application.

Claims

1. A graph embedding method based on big data general construction, characterized in that, The method comprises the steps of: obtaining a to-be-embedded dataset, and determining the number of support points according to the to-be-embedded dataset; wherein the to-be-embedded dataset comprises node information of a graph and edge information of the graph, the node information is that each user is a node, has a unique ID and basic attributes, and the basic attributes comprise age, gender, and geographical location, and part of the user nodes are marked as active users or non-active users; the edge information is the friendship between users, forms the edge of the social network graph; generating the point-edge relationship of the graph according to the node information and the edge information; generating distance information of the graph nodes satisfying the metric space property according to the node information and the point-edge relationship; wherein the metric space property is positive definiteness, symmetry and triangular inequality; specifically, generating an adjacency matrix of the graph according to the node information and the point-edge relationship; wherein the adjacency matrix comprises connection information and non-connection information; generating a new adjacency matrix according to the adjacency matrix and the non-connection information; determining the distance information of each node to all other nodes satisfying the metric space property according to the new adjacency matrix; generating a distance matrix of the graph according to the node information and the distance information; wherein the distance matrix comprises the graph node dataset in the metric space and the distance information of the graph nodes; 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; generating the vector representation of the target node according to the distance matrix and the target support point set, thereby obtaining the vector representation of all nodes, completing the graph embedding; taking the generated graph embedding vector as the input feature of the classifier; and using the trained classifier to predict the active state of the unlabeled user.

2. The method of claim 1, wherein, The step of generating the adjacency matrix of the graph according to the node information and the point-edge relationship comprises: determining an initial matrix of the graph according to the node information; generating the corresponding adjacency matrix according to the point-edge relationship and the initial matrix.

3. The method of claim 1, wherein, The step of generating the target support point set according to the number of support points and the distance matrix comprises: determining a preselected support point set and a non-support point set according to the graph node dataset; determining a target non-support point from the non-support point set according to the distance matrix and the preselected support point set; generating the target support point set according to the target non-support point and the preselected support point set; wherein the number of support points in the preselected support point set and the target non-support point is equal to the number of support points.

4. The method of claim 3, wherein, The step of determining the target non-support point from the non-support point set according to the distance matrix and the preselected support point set comprises: determining the shortest distance from each non-support point in the non-support point set to the preselected support point set according to the distance matrix; determining the target non-support point according to the shortest distance.

5. The method of claim 1, wherein, The step of generating the vector representation of the target node according to 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; determining the vector representation of the target node according to the distance from the target node to the target support point set.

6. A graph embedding device based on big data general construction, characterized in that, The method comprises: a data set acquisition module, configured to acquire a to-be-embedded data set, and determine a number of support points according to the to-be-embedded data set; wherein the to-be-embedded data set comprises node information of a graph and edge information of the graph, the node information is that each user is a node, has a unique ID and basic attributes, the basic attributes comprise age, gender, and geographical position, and part of the user nodes are labeled as active users or non-active users; the edge information is a friend relationship between users, forms an edge of a social network graph; a relationship generation module, configured to generate a point-edge relationship of the graph according to the node information and the edge information; a data metric module, configured to generate distance information of a graph node that satisfies a metric space property according to the node information and the point-edge relationship; wherein the metric space property is positive definiteness, symmetry and triangle inequality; specifically, an adjacency matrix of the graph is generated according to the node information and the point-edge relationship; wherein the adjacency matrix comprises connection information and non-connection information; a new adjacency matrix is generated according to the adjacency matrix and the non-connection information; distance information of each node to all other nodes that satisfies the metric space property is determined according to the new adjacency matrix; a distance matrix generation module, configured to generate 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 the graph node; a support point selection module, 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; a coordinate reconstruction module, configured to generate a vector representation of a target node according to the distance matrix and the target support point set, obtain vector representations of all nodes in this way, complete graph embedding, take the generated graph embedding vector as an input feature of a classifier, and use the trained classifier to predict an active state of an unlabeled user.

7. An apparatus, comprising: The computer program is stored on the computer readable storage medium and is executed by the processor to implement the method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium and is executed by the processor to implement the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Graph embedding method based on maximum spanning tree

    CN114726738A

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

    CN112084328A

  • Graph database query method of subgraph matching algorithm based on graph embedding distance prediction

    CN117932122A