WO2020015464A1 - 关系网络图嵌入的方法及装置 - Google Patents

关系网络图嵌入的方法及装置 Download PDF

Info

Publication number
WO2020015464A1
WO2020015464A1 PCT/CN2019/089022 CN2019089022W WO2020015464A1 WO 2020015464 A1 WO2020015464 A1 WO 2020015464A1 CN 2019089022 W CN2019089022 W CN 2019089022W WO 2020015464 A1 WO2020015464 A1 WO 2020015464A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
neighbor
embedding vector
association
strength
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/089022
Other languages
English (en)
French (fr)
Inventor
向彪
刘子奇
周俊
李小龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Publication of WO2020015464A1 publication Critical patent/WO2020015464A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures

Definitions

  • One or more embodiments of the present specification relate to the field of computer information processing, and in particular, to a method and an apparatus for embedding a relational network graph.
  • a relational network diagram is a description of the relationships between entities in the real world. It is currently widely used in various computer information processing.
  • a relational network graph contains a set of nodes and a set of edges. Nodes represent entities in the real world and edges represent connections between entities in the real world. For example, in a social network, a person is an entity, and a relationship or connection between people is an edge.
  • each node (entity) in a relational network graph with coordinate values in a multi-dimensional space, that is, to map each node to a multi-dimensional space, and use points in the multi-dimensional space to represent the node.
  • Multidimensional space can be 2D, 3D, or higher dimensional. Representing the nodes in the graph with coordinates in multidimensional space can be used to calculate the similarity between nodes and nodes, find the community structure in the graph, predict the possible edge connections in the future, and visualize the graph.
  • the process of mapping nodes in a graph to a multidimensional space is called graph embedding.
  • Graph embedding is a very important basic technical capability.
  • a variety of graph embedding methods have been developed in the academic community, such as DeepWalk, node2vec, GraphRep and so on.
  • these algorithms use the Monte Carlo sampling method internally, the calculation efficiency is relatively low.
  • the scale of the graph becomes very large (such as the Alipay Friendship Network with more than 500 million nodes), it will consume huge computing resources to perform graph embedding calculations.
  • One or more embodiments of the present specification describe a graph embedding method for a relational network graph, which can efficiently embed nodes in a complex relational network graph into a multi-dimensional space to facilitate subsequent information processing.
  • a method for embedding a relational network graph into a multi-dimensional space includes a plurality of nodes, and the nodes having an association relationship among the plurality of nodes are connected to each other with a certain association strength.
  • Methods include:
  • each node i For each node i, obtain a neighbor node connected to the node i, and the strength of the association between the node i and each neighbor node;
  • Obtain a position initial term and a position offset term of the node i and determine a current embedding vector Ei of the node i according to the position initial term and the position offset term, where the position initial term is based on the initial embedding vector Ci It is determined that the position offset term is determined according to a predetermined attenuation coefficient ⁇ , a current embedding vector of each neighboring node, and an association strength between the node i and each neighboring node;
  • the embedding vector of each node i in the multi-dimensional space is determined.
  • the neighbor node information of node i is obtained in the following manner:
  • an adjacency matrix that records the network relationship of the relationship network graph, and the elements in the m-th row and the k-th column in the adjacency matrix correspond to the strength of the association between the m-th node and the k-th node;
  • the neighbor nodes of node i and the strength of association between node i and each neighbor node are determined.
  • determining each neighbor node of node i through the adjacency matrix, and each association strength includes:
  • a node corresponding to a non-zero element in the i-th row element or an i-th column element is determined as a neighbor node of the node i; and a value of the non-zero element is determined as an association strength between the node i and a corresponding neighbor node.
  • the position initial term is determined based on the initial embedding vector Ci and the predetermined attenuation coefficient.
  • the position offset of node i is obtained in the following manner:
  • the position offset term is determined based on at least the predetermined attenuation coefficient ⁇ and the neighbor center position.
  • the position offset of node i is obtained in the following manner:
  • the product of the center position of the neighbor and the predetermined attenuation coefficient ⁇ is used as the position offset term.
  • the predetermined convergence condition may be: for each node, the difference between the current embedding vector determined this time and the current embedding vector determined last time is less than the first predetermined value; or the current time of each node The sum of the difference between the determined current embedded vector and the previously determined current embedded vector is less than the second predetermined value.
  • the foregoing predetermined convergence condition may be that the number of times that the current embedding vector Ei of each node i is determined to reach a predetermined number of thresholds.
  • the embedded vector of node i is determined as the difference between the current embedded vector Ei of node i and its initial position when the predetermined convergence condition is satisfied.
  • a device for embedding a relational network graph into a multi-dimensional space includes a plurality of nodes, and the nodes having an association relationship among the plurality of nodes are connected to each other with a certain association strength.
  • the device include:
  • An initial position determining unit configured to randomly determine an initial embedding vector Ci of each node i of the plurality of nodes in a multi-dimensional space
  • the neighbor node determining unit is configured to obtain, for each node i, a neighbor node connected to the node i, and an association strength between the node i and each neighbor node;
  • a neighbor location determining unit configured to determine a current embedding vector of each neighbor node of the node i;
  • the node position determining unit is configured to obtain a position initial term and a position offset term of the node i, and determine a current embedding vector Ei of the node i according to the position initial term and the position offset term, where the position initial term is based on The initial embedding vector Ci is determined, and the position offset term is determined according to a predetermined attenuation coefficient ⁇ , a current embedding vector of each neighboring node, and a strength of association between the node i and each neighboring node;
  • the condition determining unit is configured to determine whether a predetermined convergence condition is satisfied, and if the predetermined convergence condition is not satisfied, cause the neighbor position determination unit to determine a current embedding vector of each neighbor node of the node i again, and the node position The determining unit determines the current embedding vector Ei of node i again until the predetermined convergence condition is satisfied;
  • the embedding position determining unit is configured to determine an embedding vector of each node i in the multi-dimensional space based on at least a current embedding vector Ei of each node i that satisfies the predetermined convergence condition.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed in a computer, the computer is caused to execute the method of the first aspect.
  • a computing device including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method of the first aspect is implemented .
  • a relational network graph can be efficiently embedded in a multi-dimensional space, which facilitates subsequent node information processing.
  • FIG. 1 is a schematic diagram of a relationship network diagram according to an embodiment disclosed in the specification
  • FIG. 2 illustrates a method of embedding a relational network graph into a multi-dimensional space according to one embodiment
  • FIG. 3 shows an example of a relational network graph embedded in a two-dimensional space
  • FIG. 4 shows a schematic block diagram of a graph embedding apparatus according to an embodiment.
  • FIG. 1 is a schematic diagram of a relationship network diagram according to an embodiment disclosed in this specification.
  • the relationship network diagram includes multiple nodes. For clarity, these nodes are numbered in FIG. 1.
  • the nodes with association relationship are connected by edges.
  • the nodes in Figure 1 represent people or users in the social network.
  • the two nodes are connected by edges, which means that the corresponding two users have social associations, such as transfers, messages, communications, etc. .
  • the association relationship between the nodes also has different association strengths.
  • different association strengths are set for different social interaction behaviors, for example, the association strength of users who perform transfer interaction is 0.8, the association strength of users who perform message operations is 0.5, and so on.
  • the attribute of the edge or the weight of the edge may be used to represent the strength of the association between the two users connected to the edge.
  • the locations of each node are schematically shown. In fact, the network diagram does not set the location of the nodes.
  • the method of graph embedding is needed to map each node into a multi-dimensional space. The method of graph embedding provided by the embodiment of the present specification is described below.
  • FIG. 2 illustrates a method for embedding a relational network graph into a multi-dimensional space according to an embodiment, where the relational network graph includes a plurality of nodes, and nodes having an association relationship among the multiple nodes are connected to each other with a certain association strength.
  • the above method can be executed by any device, device, platform, or device cluster with computing and processing capabilities. As shown in FIG.
  • the method includes: step 21, randomly determining an initial embedding vector Ci of each node i in a plurality of nodes in a multi-dimensional space; step 22, for each node i, obtaining a neighbor node connected to the node i And the strength of the association between the node i and each neighbor node; step 23, determine the current embedding vector of each neighbor node of the node i; step 24, obtain the initial position and position offset terms of the node i, and according to The position initial term and position offset term determine a current embedding vector Ei of node i, wherein the position initial term is determined based on the initial embedding vector Ci, and the position offset term is based on a predetermined attenuation coefficient ⁇ , the The current embedding vector of each neighbor node and the strength of the association between this node i and each neighbor node are determined; step 25, it is determined whether the predetermined convergence condition is satisfied; if the predetermined convergence condition is not satisfied, each neighbor of this node i is determined again The current embed
  • an initial embedding vector Ci of each node i in a multi-dimensional space among a plurality of nodes in the relation network graph is randomly determined.
  • the relational network graph contains N nodes, and the dimension of the multidimensional space to be embedded is s, then for each node i of the N nodes, an s-dimensional vector Ci is randomly generated as its initial embedding vector.
  • step 22 for each node i, a neighbor node connected to the node i and the strength of the association between the node i and each neighbor node are obtained.
  • nodes with an association relationship are connected to each other, and nodes connected to each other are neighbor nodes to each other.
  • the topology of the relational network graph can be recorded in a variety of ways. For example, in one example, the connection relationships of a relational network diagram are recorded by a chart. At this time, the neighbor node information of each node i and the strength of the association between node i and the neighbor node can be read from the above-mentioned graph.
  • connection relationships of the relational network graph are recorded by a matrix.
  • a matrix describing a relational network graph may have an adjacency matrix, a degree matrix, a Laplacian matrix, and the like.
  • the neighbor information and association strength information of the nodes are obtained by recording the adjacency matrix of the network relationships of the relationship network graph.
  • matrix A is an adjacency matrix of a relational network graph G
  • matrix A can be expressed as:
  • the element a mk in the m-th row and the k-th column corresponds to the strength of the association between the node m and the node k.
  • the neighbor information and association strength information of each node can be easily obtained.
  • the i-th row element or the i-th column element corresponding to the node i in the adjacency matrix A is obtained, that is, a ij or a ji ;
  • Node j is determined as the neighbor of node i, and the value of the non-zero element is determined as the strength of association between node i and the corresponding neighbor node.
  • step 23 the current embedding vector Ej of each neighbor node j of node i is determined.
  • the initial embedding vector is randomly generated for each node in step 21, when the step 23 is first performed, for the neighbor node j that has not updated the current embedding vector, its current embedding vector Ej is its corresponding The initial embedding vector Cj.
  • the current embedding vector of each node will be updated in subsequent iterations, which will be described in subsequent steps.
  • the current embedding vector Ei of node i is determined.
  • the current embedding vector Ei of the node i can be considered to be composed of two parts: a position initial term VI and a position offset term VD:
  • the position initial term VI is determined based on the initial embedding vector Ci, and the position offset term VD is determined according to a predetermined attenuation coefficient ⁇ , the current embedding vector Ej of each neighboring node j, and the strength of association a ij between the node i and each neighboring node. .
  • the initial position VI of the position of node i is its initial embedding vector Ci, that is:
  • the initial position term may be an initial embedding vector Ci multiplied by a certain coefficient.
  • the coefficient may be related to the attenuation coefficient ⁇ introduced in the position offset term. Therefore, in one embodiment, the position initial term can be determined based on the initial embedding vector Ci and the attenuation coefficient ⁇ . Specifically, in one example, the position initial term VI is determined as:
  • the initial position item is determined, it is fixed during subsequent update iterations.
  • the position offset term VD of the node i is also determined.
  • the position offset term VD is determined according to a predetermined attenuation coefficient ⁇ , a current embedding vector Ej of each neighboring node j, and an association strength a ij between the node i and each neighboring node.
  • the attenuation coefficient ⁇ is used to adjust the step size or size of the position offset adjustment, and is generally preset to a value between 0 and 1.
  • the current embedding vector Ej of each neighbor node j is summed to determine the center position of the neighbor; then based on a predetermined attenuation coefficient ⁇ , the neighbor The center position determines the position offset VD.
  • the position offset term VD is determined as:
  • N (i) represents the set of neighbor nodes of node i.
  • VD is more suitable for the case where the correlation strength a ij itself is defined between 0 and 1. If the range of the correlation strength a ij is large, it can be set to a smaller value when the attenuation coefficient is set in advance.
  • the position offset term VD of node i is determined by determining the sum value di of the association strength between node i and all its neighboring nodes j; and determining the association strength aij between node i and each neighboring node j The ratio to the sum value di is taken as the relative correlation strength; the current embedding vector Ej of each neighbor node j is summed to determine the neighbor center position using the relative correlation strength as a weight; the neighbor center position and a predetermined attenuation coefficient ⁇ The product of, as the position offset term VD.
  • the position offset term VD is determined as:
  • the position offset VD can reflect the bias toward the center of the neighbor. The distance moved.
  • the current embedding vector Ei of node i can be determined as:
  • steps 23 and 24 above are performed for each node i in the relational network graph, thereby determining the current embedding vector for each node.
  • step 25 it is determined whether a predetermined convergence condition is satisfied. If the predetermined convergence condition is not satisfied, return to step 23 and step 24 to determine the current embedding vector of each neighboring node of node i again, and the current embedding vector Ei of node i again.
  • step 23 is performed for each node in the relational network graph, so each time the loop of steps 23 and 24 is executed, the current embedding vector of each node will be updated.
  • step 23 is performed at the (n + 1) th time, for the same node i, the current embedding vector Ej of its neighbor node j is different from that at the nth time.
  • step 24 is executed. In this way, the position offset term in step 24 will be changed each time the above-mentioned loop is executed, so that the current embedding vector of each node i is constantly updated.
  • Such a loop is repeatedly performed until a predetermined convergence condition is satisfied.
  • the predetermined convergence condition is set according to an offset adjustment amount that corresponds to an offset between a position determined this time and a position determined previously.
  • the predetermined convergence condition may be set such that, for each node, the difference between the current embedding vector determined this time and the current embedding vector determined last time is less than the first predetermined value. For example, for N nodes in a relational network graph, if the difference between the current embedding vector of each node and the last determined embedding vector, that is, the offset distance, is less than a distance threshold, then it means that the node The position adjustment has been reduced to a certain extent, and the position of the nodes tends to stabilize and converge, so as to reach the convergence condition.
  • the predetermined convergence condition may be set such that the sum of the difference between the current embedded vector determined this time and the previously determined current embedded vector of each node is less than the second predetermined value. That is, consider the sum DT of the offset distances of N nodes:
  • Di is the offset distance of node i, that is, the difference between the current embedding vector and the embedding vector determined last time.
  • a preset number of executions of the loop may be used as the convergence condition. That is, when it is determined that the number of times the current embedding vector Ei of each node i reaches a predetermined number of thresholds, it is considered that a convergence condition is satisfied.
  • the above execution times can generally be set between 10-20 times.
  • step 26 determines the embedding vector Qi of each node i in the multi-dimensional space based on at least the current embedding vector Ei of each node i that meets the predetermined convergence condition.
  • the embedding vector of node i is determined as the difference between the current embedding vector Ei of node i and its initial position when the predetermined convergence condition is met, that is:
  • VI is associated with the initial embedding vector Ci, for example equal to Ci, or equal to Ci multiplied by a certain coefficient, such as (1- ⁇ ) Ci.
  • the nodes in the relational network graph can be embedded into the multi-dimensional space.
  • the nodes embedded in the multi-dimensional space have position information, and since the connection relationship and connection strength between nodes are considered in the embedding process, the position information also reflects the association relationship between the nodes. For example, there is a stronger association between nodes that are close to each other in a multi-dimensional space. In this way, it is very helpful for further processing of node relationship information, such as clustering nodes, finding groups formed by nodes, calculating similarity between nodes, predicting potential edge connections of nodes, and so on.
  • the relational network diagram is embedded in a two-dimensional space or a three-dimensional space, it is also very helpful for the visual presentation of the relational network.
  • FIG. 3 shows an example of a relational network diagram embedded in a two-dimensional space. More specifically, FIG. 3 is an example of embedding the relationship network graph of FIG. 1 into a two-dimensional space by using the method shown in FIG. 2.
  • the positions of the nodes in FIG. 3 contain more information, which reflects the association relationship between the nodes. Some nodes are very close to each other, which means that these nodes have a stronger association relationship.
  • an embodiment of the present specification further provides an apparatus for embedding a relational network graph into a multi-dimensional space, wherein the relational network graph to be embedded includes a plurality of nodes, and the nodes having the association relationship among the multiple nodes have a certain association strength. Connected to each other.
  • FIG. 4 shows a schematic block diagram of a graph embedding apparatus according to an embodiment. As shown in FIG.
  • the graph embedding apparatus 400 includes: an initial position determining unit 41 configured to randomly determine an initial embedding vector Ci of each node i in the multi-dimensional space in the plurality of nodes; a neighbor node determining unit 42 configured to Node i, to obtain a neighbor node connected to the node i, and the strength of the association between the node i and each neighbor node; the neighbor location determination unit 43 is configured to determine the current embedding vectors of each neighbor node of the node i; node The position determining unit 44 is configured to obtain a position initial term and a position offset term of the node i, and determine a current embedding vector Ei of the node i according to the position initial term and the position offset term, wherein the position initial term is based on The initial embedding vector Ci is determined, and the position offset term is determined according to a predetermined attenuation coefficient ⁇ , the current embedding vector of each neighbor node, and the strength of the association between the node i and each neighbor node;
  • the neighbor node determining unit 42 is configured to obtain an adjacency matrix that records a network relationship of the relationship network graph, and the elements in the m-th row and the k-th column of the adjacency matrix correspond to the m-th node and the k-th node
  • the strength of association between the nodes; the neighbor matrix of node i and the strength of association between node i and each neighboring node are determined through the adjacency matrix.
  • the neighbor node determination unit 42 determines neighbor node information in the following manner: obtaining the i-th row element or the i-th column element corresponding to the node i in the adjacency matrix; A node corresponding to a non-zero element in a row element or an i-th column element is determined as a neighbor node of the node i; a value of the non-zero element is determined as a strength of association between the node i and a corresponding neighbor node.
  • the node position determination unit 44 includes an initial term determination module 441 configured to determine the position initial term based on the initial embedding vector Ci and the predetermined attenuation coefficient.
  • the node position determination unit 44 includes an offset term determination module 442 for determining an offset term.
  • the offset determination module 442 is configured to: sum the current embedded vectors of each neighbor node with the strength of the association between node i and each neighbor node to determine the center position of the neighbor; based at least on the predetermined The attenuation coefficient ⁇ , the position of the neighbor center, determines the position offset term.
  • the offset term determination module 442 is configured to: determine the sum of the association strength of node i and all its neighbor nodes; determine the ratio of the association strength between node i and each neighboring node to the sum value, as Relative correlation strength; using the relative correlation strength as a weight, summing the current embedding vectors of each neighbor node to determine the center position of the neighbor; and using the product of the center position of the neighbor and the predetermined attenuation coefficient ⁇ as the position offset term .
  • the predetermined convergence condition on which the condition determining unit 45 is based may be: for each node, the difference between the current embedding vector determined this time and the current embedding vector determined last time is less than the first predetermined value; or , The sum of the differences between the current embedded vector determined by the current node and the current embedded vector determined previously is less than the second predetermined value.
  • the predetermined convergence condition may also be that the number of times that the current embedding vector Ei of each node i is determined reaches a predetermined number of thresholds.
  • the embedding position determining unit 46 is configured to determine the embedding vector of the node i as the difference between the current embedding vector Ei of the node i and its initial position when the predetermined convergence condition is satisfied.
  • a complex relational network graph can be quickly and efficiently embedded in a multi-dimensional space of any dimension, thereby facilitating subsequent node information processing.
  • a computer-readable storage medium having stored thereon a computer program, and when the computer program is executed in a computer, the computer is caused to execute the method described in conjunction with FIG. 2.
  • a computing device including a memory and a processor, where the memory stores executable code, and when the processor executes the executable code, the implementation described in conjunction with FIG. 2 is implemented. method.
  • the functions described in the present invention may be implemented by hardware, software, firmware, or any combination thereof.
  • the functions may be stored on a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本说明书实施例提供一种将关系网络图嵌入到多维空间的方法和装置,在该方法中,首先随机确定各个节点i在多维空间的初始嵌入向量Ci,然后对于各个节点i,获取其邻居节点,以及与各个邻居节点之间的关联强度。此外,还确定节点i的各个邻居节点的当前嵌入向量。基于预定的衰减系数、上述关联强度以及邻居节点的当前位置,形成节点i的位置初始项和位置偏移项,并据此确定节点i的当前嵌入向量。反复执行上述步骤直到收敛条件得到满足,此时即可以确定各个节点i在多维空间的嵌入向量。如此,高效地将关系网络图嵌入到多维空间中。

Description

关系网络图嵌入的方法及装置 技术领域
本说明书一个或多个实施例涉及计算机信息处理领域,尤其涉及关系网络图嵌入的方法和装置。
背景技术
关系网络图是对现实世界中实体之间的关系的描述,目前广泛地应用于各种计算机信息处理中。一般地,关系网络图包含一个节点集合和一个边集合,节点表示现实世界中的实体,边表示现实世界中实体之间的联系。例如,在社交网络中,人就是实体,人和人之间的关系或联系就是边。
在许多情况下,希望将关系网络图中的每个节点(实体)用多维空间中的坐标值来表示,也就是将各个节点映射到一个多维空间中,用多维空间中的点代表图中的节点。多维空间可以是2维、3维空间,也可以是更高维空间。用多维空间的坐标来表达图中的节点,可以应用于计算节点和节点之间的相似度,发现图中的社团结构,预测未来可能形成的边联系,以及对图进行可视化等。将图中的节点映射到多维空间的过程称为图嵌入。
图嵌入是一种非常重要的基础技术能力。当前学术界已研究出多种图嵌入方法,如DeepWalk,node2vec,GraphRep等。但由于这些算法内部均采用了蒙特卡洛采样方法,计算效率比较低。当图的规模变得很大时(如支付宝朋友关系网络有5亿以上节点),进行图嵌入计算将耗费巨大的计算资源。
因此,希望能有改进的方案,更加快速有效地进行关系网络图的图嵌入过程。
发明内容
本说明书一个或多个实施例描述了一种关系网络图的图嵌入方法,可以高效地将复杂关系网络图中的节点嵌入到多维空间中,以便于后续的信息处理。
根据第一方面,提供了一种将关系网络图嵌入到多维空间的方法,所述关系网络图包括多个节点,所述多个节点中具有关联关系的节点以一定关联强度互相连接,所述方法包括:
随机确定所述多个节点中各个节点i在多维空间的初始嵌入向量Ci;
对于各个节点i,获取与该节点i相连接的邻居节点,以及该节点i与各个邻居节点之间的关联强度;
确定该节点i的各个邻居节点的当前嵌入向量;
获取该节点i的位置初始项和位置偏移项,并根据所述位置初始项和位置偏移项,确定节点i的当前嵌入向量Ei,其中所述位置初始项基于所述初始嵌入向量Ci而确定,所述位置偏移项根据预定衰减系数α、所述各个邻居节点的当前嵌入向量以及该节点i与各个邻居节点之间的关联强度而确定;
判断预定收敛条件是否得到满足,在不满足该预定收敛条件的情况下,再次确定该节点i的各个邻居节点的当前嵌入向量,以及再次确定节点i的当前嵌入向量Ei,直到该预定收敛条件得到满足;
至少基于满足所述预定收敛条件的各个节点i的当前嵌入向量Ei,确定各个节点i在所述多维空间的嵌入向量。
根据一种实施方式,通过以下方式获取节点i的邻居节点信息:
获取记录所述关系网络图的网络关系的邻接矩阵,邻接矩阵中第m行第k列的元素对应于第m节点与第k节点之间的关联强度;
通过所述邻接矩阵,确定节点i的邻居节点,以及节点i与各个邻居节点之间的关联强度。
进一步地,通过邻接矩阵确定节点i的各个邻居节点,以及各个关联强度包括:
获取邻接矩阵中与节点i对应的第i行元素或第i列元素;
将所述第i行元素或第i列元素中非零元素对应的节点确定为节点i的邻居节点;将所述非零元素的值确定为节点i与对应邻居节点之间的关联强度。
根据一个实施例,位置初始项基于初始嵌入向量Ci以及所述预定衰减系数而确定。
在一个实施例中,通过以下方式获取节点i的位置偏移项:
以节点i与各个邻居节点之间的关联强度为权重,对各个邻居节点的当前嵌入向量求和,确定邻居中心位置;
至少基于所述预定衰减系数α,所述邻居中心位置,确定所述位置偏移项。
在另一实施例中,通过以下方式获取节点i的位置偏移项:
确定节点i与其所有邻居节点的关联强度的和值;
确定节点i与各个邻居节点之间的关联强度与所述和值的比例,作为相对关联强度;
以所述相对关联强度为权重,对各个邻居节点的当前嵌入向量求和,确定邻居中心位置;
将邻居中心位置与所述预定衰减系数α的乘积,作为所述位置偏移项。
根据一种可能的设计,上述预定收敛条件可以是:对于每个节点,本次确定的当前嵌入向量与前次确定的当前嵌入向量的差值小于第一预定值;或者,各个节点的本次确定的当前嵌入向量与前次确定的当前嵌入向量的差值的总和小于第二预定值。
根据另一种可能的设计,上述预定收敛条件可以是,确定各个节点i的当前嵌入向量Ei的次数达到预定次数阈值。
在一个实施例中,将节点i的嵌入向量确定为,满足所述预定收敛条件时节点i的当前嵌入向量Ei与其位置初始项之差。
根据第二方面,提供一种将关系网络图嵌入到多维空间的装置,所述关系网络图包括多个节点,所述多个节点中具有关联关系的节点以一定关联强度互相连接,所述装置包括:
初始位置确定单元,配置为随机确定所述多个节点中各个节点i在多维空间的初始嵌入向量Ci;
邻居节点确定单元,配置为对于各个节点i,获取与该节点i相连接的邻居节点,以及该节点i与各个邻居节点之间的关联强度;
邻居位置确定单元,配置为确定该节点i的各个邻居节点的当前嵌入向量;
节点位置确定单元,配置为获取该节点i的位置初始项和位置偏移项,并根据所述位置初始项和位置偏移项,确定节点i的当前嵌入向量Ei,其中所述位置初始项基于所述初始嵌入向量Ci而确定,所述位置偏移项根据预定衰减系数α、所述各个邻居节点的当前嵌入向量以及该节点i与各个邻居节点之间的关联强度而确定;
条件判定单元,配置为判断预定收敛条件是否得到满足,在不满足该预定收敛条件的情况下,使得所述邻居位置确定单元再次确定该节点i的各个邻居节点的当前嵌入向量,所述节点位置确定单元再次确定节点i的当前嵌入向量Ei,直到该预定收敛条件得 到满足;
嵌入位置确定单元,配置为至少基于满足所述预定收敛条件的各个节点i的当前嵌入向量Ei,确定各个节点i在所述多维空间的嵌入向量。
根据第三方面,提供了一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行第一方面的方法。
根据第四方面,提供了一种计算设备,包括存储器和处理器,其特征在于,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现第一方面的方法。
通过本说明书实施例提供的方法和装置,可以高效地将关系网络图嵌入到多维空间中,便于后续的节点信息处理。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为本说明书披露的一个实施例的关系网络图的示意图;
图2示出根据一个实施例的将关系网络图嵌入到多维空间的方法;
图3示出嵌入到二维空间的关系网络图的示例;
图4示出根据一个实施例的图嵌入装置的示意性框图。
具体实施方式
下面结合附图,对本说明书提供的方案进行描述。
图1为本说明书披露的一个实施例的关系网络图的示意图。如图1所示,该关系网络图包括多个节点,为了清楚起见,图1中为这些节点进行了编号。在这些节点中,具有关联关系的节点之间用边进行连接。在一个例子中,图1中的节点表示社交网络中的人或用户,两个节点之间通过边连接起来,即表示对应的两个用户存在社交上的关联,例如转账、留言、通讯等等。
在一个实施例中,节点之间的关联关系还具有不同的关联强度。例如,在一个例子 中,针对不同的社交交互行为,设定不同的关联强度,比如,进行转账交互的用户的关联强度为0.8,进行留言操作的用户的关联强度为0.5,等等。在一个实施例中,在关联关系具有不同关联强度的情况下,可以利用边的属性或边的权值来表示该边所连接的两个用户之间的关联强度。
在图1中的关系网络图中,为了示出各个节点以及节点间的连接关系,而示意性地示出各个节点的位置。实际上,网络关系图并不对节点的位置进行设置。对于节点的位置,需要采用图嵌入的方法,将各个节点映射到多维空间中。下面描述本说明书实施例所提供的图嵌入的方法。
图2示出根据一个实施例的将关系网络图嵌入到多维空间的方法,其中关系网络图包括多个节点,多个节点中具有关联关系的节点以一定关联强度互相连接。上述方法可以由任何具有计算、处理能力的装置、设备、平台、设备集群执行。如图2所示,所述方法包括:步骤21,随机确定多个节点中各个节点i在多维空间的初始嵌入向量Ci;步骤22,对于各个节点i,获取与该节点i相连接的邻居节点,以及该节点i与各个邻居节点之间的关联强度;步骤23,确定该节点i的各个邻居节点的当前嵌入向量;步骤24,获取该节点i的位置初始项和位置偏移项,并根据所述位置初始项和位置偏移项,确定节点i的当前嵌入向量Ei,其中所述位置初始项基于所述初始嵌入向量Ci而确定,所述位置偏移项根据预定衰减系数α、所述各个邻居节点的当前嵌入向量以及该节点i与各个邻居节点之间的关联强度而确定;步骤25,判断预定收敛条件是否得到满足;如果不满足预定收敛条件,则再次确定该节点i的各个邻居节点的当前嵌入向量,以及再次确定节点i的当前嵌入向量Ei,直到该预定收敛条件得到满足;步骤26,至少基于满足所述预定收敛条件的各个节点i的当前嵌入向量Ei,确定各个节点i在多维空间的嵌入向量。下面描述以上各个步骤的执行方式。
首先,在步骤21,随机确定关系网络图的多个节点中各个节点i在多维空间的初始嵌入向量Ci。假定关系网络图包含N个节点,要嵌入的多维空间的维数为s,那么针对N个节点中的每个节点i,为其随机生成一个s维向量Ci,作为其初始嵌入向量。
另一方面,在步骤22,对于各个节点i,获取与该节点i相连接的邻居节点,以及该节点i与各个邻居节点之间的关联强度。
可以理解,在关系网络图中,具有关联关系的节点之间会互相连接,互相连接的节点之间,互为邻居节点。另外,可以理解,关系网络图的拓扑结构可以通过多种方式记录。例如,在一个示例中,通过图表记录关系网络图的连接关系。此时,可以从上述图 表中读取各个节点i的邻居节点信息,以及节点i与邻居节点之间的关联强度。
在一个实施例中,通过矩阵来记录关系网络图的连接关系。例如,描述一个关系网络图的矩阵可以有邻接矩阵,度矩阵,拉普拉斯矩阵等。在一个示例中,通过记录关系网络图的网络关系的邻接矩阵来获取节点的邻居信息和关联强度信息。
具体地,假定矩阵A是关系网络图G的邻接矩阵,矩阵A可以表示为:
A=[a mk] N*N
其中,第m行第k列的元素a mk对应于节点m与节点k之间的关联强度。
如果两个节点之间没有连接,不存在关联关系,那么它们之间的关联强度为0。
通过这样的邻接矩阵,可以简单地获取各个节点的邻居信息和关联强度信息。具体地,对于节点i,获取邻接矩阵A中与节点i对应的第i行元素或第i列元素,即a ij或a ji;将第i行元素或第i列元素中非零元素对应的节点j确定为节点i的邻居节点,并将非零元素的值确定为节点i与对应邻居节点之间的关联强度。
在确定出各个节点i的邻居节点j的基础上,在步骤23,确定节点i的各个邻居节点j的当前嵌入向量Ej。
可以理解,由于在步骤21为每个节点都随机产生了初始嵌入向量,在第一次执行该步骤23时,对于未更新过当前嵌入向量的邻居节点j,其当前嵌入向量Ej即其对应的初始嵌入向量Cj。各个节点的当前嵌入向量会在后续进行迭代更新,这将在后续步骤中展开描述。
基于步骤22和步骤23针对节点i获得的相关信息,在步骤24,确定节点i的当前嵌入向量Ei。具体地,节点i的当前嵌入向量Ei可以认为由两部分组成:位置初始项VI和位置偏移项VD:
Ei=VI+VD,
其中位置初始项VI基于初始嵌入向量Ci而确定,位置偏移项VD根据预定衰减系数α、各个邻居节点j的当前嵌入向量Ej以及该节点i与各个邻居节点之间的关联强度a ij而确定。
在一个实施例中,节点i的位置初始项VI即为其初始嵌入向量Ci,即:
VI=Ci。
在另一实施例中,初始位置项可以是初始嵌入向量Ci乘以一定系数。例如,该系数可以与在位置偏移项中引入的衰减系数α有关。因此,在一个实施例中,可以基于初始嵌入向量Ci以及该衰减系数α,确定位置初始项。具体地,在一个例子中,将位置初始项VI确定为:
VI=(1-α)C i
一般地,位置初始项一旦确定,在后续更新迭代过程中固定不变。
另一方面,还要确定节点i的位置偏移项VD。根据说明书的至少一个实施例,根据预定衰减系数α、各个邻居节点j的当前嵌入向量Ej以及该节点i与各个邻居节点之间的关联强度a ij来确定位置偏移项VD。
其中衰减系数α用于调节位置偏移调整的步长或大小,一般被预设为0到1之间的数值。
在一个实施例中,以节点i与各个邻居节点j之间的关联强度aij为权重,对各个邻居节点j的当前嵌入向量Ej求和,确定邻居中心位置;然后基于预定衰减系数α,上述邻居中心位置,确定位置偏移项VD。
在一个例子中,根据上述思想,将位置偏移项VD确定为:
Figure PCTCN2019089022-appb-000001
其中N(i)表示节点i的邻居节点集合。
以上VD的计算方式比较适合于关联强度a ij本身就定义在0到1之间的情况。如果关联强度a ij的范围较大,可以在预先设定衰减系数的时候,将其设定为较小的数值。
在另一实施例中,通过以下方式确定节点i的位置偏移项VD:确定节点i与其所有邻居节点j的关联强度的和值di;确定节点i与各个邻居节点j之间的关联强度aij与所述和值di的比例,作为相对关联强度;以所述相对关联强度为权重,对各个邻居节点j的当前嵌入向量Ej求和,确定邻居中心位置;将邻居中心位置与预定衰减系数α的乘积,作为位置偏移项VD。
在一个例子中,根据上述思想,将位置偏移项VD确定为:
Figure PCTCN2019089022-appb-000002
其中:
Figure PCTCN2019089022-appb-000003
如此,考虑节点i与各个邻居节点j的关联强度,确定节点i的邻居中心位置,然后以衰减系数作为调节,确定位置偏移项VD,如此,该位置偏移项VD可以反映向邻居中心偏移的距离。
根据一个具体例子,结合前述的位置初始项,以及如上所述根据相对关联强度确定的位置偏移项,可以将节点i的当前嵌入向量Ei确定为:
Figure PCTCN2019089022-appb-000004
以上描述了多种确定节点i的当前嵌入向量Ei的方式。
根据任一方式,对于关系网络图中的每个节点i执行以上的步骤23和24,从而为每个节点确定出当前嵌入向量。
接着,在步骤25,判断预定收敛条件是否得到满足。如果不满足预定收敛条件,则返回到步骤23和步骤24,再次确定节点i的各个邻居节点的当前嵌入向量,以及再次确定节点i的当前嵌入向量Ei。
可以理解,以上的步骤23和24是针对关系网络图中每个节点执行,因此每次执行步骤23和24的循环,各个节点的当前嵌入向量都会得到更新。相应地,在第n+1次执行步骤23时,对于同一节点i,其邻居节点j的当前嵌入向量Ej与第n次执行时有所不同,实际上在第n+1次执行时使用的是,第n次执行完步骤24时各个节点的当前嵌入向量。这样,步骤24中的位置偏移项在每次执行上述循环时都会发生改变,进而使得各个节点i的当前嵌入向量不断得到更新。
这样的循环反复执行,直到预定收敛条件得到满足。
在一个实施例中,预定收敛条件根据偏移调整量而设置,所述偏移调整量对应于本次确定的位置与前次确定的位置之间的偏移。
具体地,在一个实施例中,预定收敛条件可以设置为,对于每个节点,本次确定的当前嵌入向量与前次确定的当前嵌入向量的差值小于第一预定值。例如,对于关系网络图中的N个节点,如果每个节点的当前嵌入向量相对于上一次确定的嵌入向量之间的差值,也就是偏移距离,都小于一个距离阈值,那么说明,节点的位置调整已经小到一定程度,节点的位置趋于稳定和收敛,从而达到收敛条件。
在另一实施例中,预定收敛条件可以设置为,各个节点的本次确定的当前嵌入向量与前次确定的当前嵌入向量的差值的总和小于第二预定值。也就是说,考虑N个节点的偏移距离的总和DT:
Figure PCTCN2019089022-appb-000005
其中Di为节点i的偏移距离,即当前嵌入向量相对于上一次确定的嵌入向量之间的差值。
当偏移距离的总和DT小于某个阈值,那么说明,节点的总体位置调整较小,节点的位置趋于稳定和收敛,从而达到收敛条件。
在另一实施例中,还可以根据经验,预设循环的执行次数作为收敛条件。也就是说,当确定各个节点i的当前嵌入向量Ei的次数达到预定次数阈值,即认为满足收敛条件。根据经验,上述执行次数一般可以设置为10-20次之间。
如果收敛条件得到满足,那么退出循环,进入步骤26,至少基于满足预定收敛条件的各个节点i的当前嵌入向量Ei,确定各个节点i在多维空间的嵌入向量Qi。
在一个实施例中,将满足收敛条件的各个节点i的当前嵌入向量Ei,作为其嵌入向量Qi,即Qi=Ei。
在另一实施例中,为了减少最初随机产生的初始嵌入向量的影响,将节点i的嵌入向量确定为,满足预定收敛条件时节点i的当前嵌入向量Ei与其位置初始项之差,即:
Qi=Ei-VI
其中VI与初始嵌入向量Ci相关联,例如等于Ci,或者等于Ci乘以一定系数,比如(1-α)Ci。
如此,确定了各个节点i在多维空间的嵌入向量。
基于这样确定的嵌入向量,就可以将关系网络图中的节点嵌入到多维空间中。嵌入 到多维空间中的节点具有了位置信息,并且由于嵌入过程中考虑了节点之间的连接关系和连接强度,因此其位置信息中也体现了节点之间的关联关系。例如,多维空间中位置相近的节点之间,关联关系更强。如此,非常有利于后续对节点关系信息的进一步处理,例如对节点进行聚类,发现节点形成的团体,计算节点之间的相似度,预测节点潜在的边联系,等等。当将关系网络图嵌入到二维空间或三维空间时,还非常有利于对关系网络的可视化呈现。
图3示出嵌入到二维空间的关系网络图的示例。更具体地,图3是采用图2所示的方法,将图1的关系网络图嵌入到二维空间的示例。相比于图1中出于示意而随意摆放的节点,图3中节点的位置含有更多的信息量,体现了节点之间的关联关系。一些节点之间位置非常靠近,意味着,这些节点之间具有更强的关联关系。并且,从节点位置分布上也可以看出,节点会呈现潜在的节点簇。这样的信息都会有利于对关系网络中节点信息的进一步处理。
根据另一方面,本说明书的实施例还提供一种将关系网络图嵌入到多维空间的装置,其中有待嵌入的关系网络图包括多个节点,多个节点中具有关联关系的节点以一定关联强度互相连接。图4示出根据一个实施例的图嵌入装置的示意性框图。如图4所示,图嵌入装置400包括:初始位置确定单元41,配置为随机确定所述多个节点中各个节点i在多维空间的初始嵌入向量Ci;邻居节点确定单元42,配置为对于各个节点i,获取与该节点i相连接的邻居节点,以及该节点i与各个邻居节点之间的关联强度;邻居位置确定单元43,配置为确定该节点i的各个邻居节点的当前嵌入向量;节点位置确定单元44,配置为获取该节点i的位置初始项和位置偏移项,并根据所述位置初始项和位置偏移项,确定节点i的当前嵌入向量Ei,其中所述位置初始项基于所述初始嵌入向量Ci而确定,所述位置偏移项根据预定衰减系数α、所述各个邻居节点的当前嵌入向量以及该节点i与各个邻居节点之间的关联强度而确定;条件判定单元45,配置为判断预定收敛条件是否得到满足,在不满足该预定收敛条件的情况下,使得所述邻居位置确定单元再次确定该节点i的各个邻居节点的当前嵌入向量,所述节点位置确定单元再次确定节点i的当前嵌入向量Ei,直到该预定收敛条件得到满足;以及嵌入位置确定单元46,配置为至少基于满足所述预定收敛条件的各个节点i的当前嵌入向量Ei,确定各个节点i在所述多维空间的嵌入向量。
根据一种实施方式,邻居节点确定单元42配置为:获取记录所述关系网络图的网络关系的邻接矩阵,所述邻接矩阵中第m行第k列的元素对应于第m节点与第k节点之 间的关联强度;通过所述邻接矩阵,确定节点i的邻居节点,以及节点i与各个邻居节点之间的关联强度。
进一步地,在一个具体例子中,所述邻居节点确定单元42通过以下方式确定邻居节点信息:获取所述邻接矩阵中与节点i对应的第i行元素或第i列元素;将所述第i行元素或第i列元素中非零元素对应的节点确定为节点i的邻居节点;将所述非零元素的值确定为节点i与对应邻居节点之间的关联强度。
在一个实施例中,节点位置确定单元44包括,初始项确定模块441,配置为基于所述初始嵌入向量Ci以及所述预定衰减系数,确定所述位置初始项。
在一个实施例中,节点位置确定单元44包括偏移项确定模块442,用于确定偏移项。
在一个例子中,偏移项确定模块442配置为:以节点i与各个邻居节点之间的关联强度为权重,对各个邻居节点的当前嵌入向量求和,确定邻居中心位置;至少基于所述预定衰减系数α,所述邻居中心位置,确定所述位置偏移项。
在另一例子中,偏移项确定模块442配置为:确定节点i与其所有邻居节点的关联强度的和值;确定节点i与各个邻居节点之间的关联强度与所述和值的比例,作为相对关联强度;以所述相对关联强度为权重,对各个邻居节点的当前嵌入向量求和,确定邻居中心位置;将邻居中心位置与所述预定衰减系数α的乘积,作为所述位置偏移项。
根据一种可能的设计,条件判定单元45所依据的预定收敛条件可以是:对于每个节点,本次确定的当前嵌入向量与前次确定的当前嵌入向量的差值小于第一预定值;或者,各个节点的本次确定的当前嵌入向量与前次确定的当前嵌入向量的差值的总和小于第二预定值。
根据一种可能的设计,预定收敛条件也可以是,确定各个节点i的当前嵌入向量Ei的次数达到预定次数阈值。
在一个实施例中,嵌入位置确定单元46配置为,将节点i的嵌入向量确定为,满足所述预定收敛条件时节点i的当前嵌入向量Ei与其位置初始项之差。
通过以上的方法和装置,可以快速有效地将复杂的关系网络图嵌入到任意维度的多维空间中,从而便于后续的节点信息处理。
根据另一方面的实施例,还提供一种计算机可读存储介质,其上存储有计算机 程序,当所述计算机程序在计算机中执行时,令计算机执行结合图2所描述的方法。
根据再一方面的实施例,还提供一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现结合图2所述的方法。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。

Claims (20)

  1. 一种将关系网络图嵌入到多维空间的方法,所述关系网络图包括多个节点,所述多个节点中具有关联关系的节点以一定关联强度互相连接,所述方法包括:
    随机确定所述多个节点中各个节点i在多维空间的初始嵌入向量Ci;
    对于各个节点i,获取与该节点i相连接的邻居节点,以及该节点i与各个邻居节点之间的关联强度;
    确定该节点i的各个邻居节点的当前嵌入向量;
    获取该节点i的位置初始项和位置偏移项,并根据所述位置初始项和位置偏移项,确定节点i的当前嵌入向量Ei,其中所述位置初始项基于所述初始嵌入向量Ci而确定,所述位置偏移项根据预定衰减系数α、所述各个邻居节点的当前嵌入向量以及该节点i与各个邻居节点之间的关联强度而确定;
    判断预定收敛条件是否得到满足,在不满足该预定收敛条件的情况下,再次确定该节点i的各个邻居节点的当前嵌入向量,以及再次确定节点i的当前嵌入向量Ei,直到该预定收敛条件得到满足;
    至少基于满足所述预定收敛条件的各个节点i的当前嵌入向量Ei,确定各个节点i在所述多维空间的嵌入向量。
  2. 根据权利要求1所述的方法,其中获取与该节点i相连接的邻居节点,以及该节点i与各个邻居节点之间的关联强度包括:
    获取记录所述关系网络图的网络关系的邻接矩阵,所述邻接矩阵中第m行第k列的元素对应于第m节点与第k节点之间的关联强度;
    通过所述邻接矩阵,确定节点i的邻居节点,以及节点i与各个邻居节点之间的关联强度。
  3. 根据权利要求2所述的方法,其中通过所述邻接矩阵,确定节点i的邻居节点,以及节点i与各个邻居节点之间的关联强度包括:
    获取所述邻接矩阵中与节点i对应的第i行元素或第i列元素;
    将所述第i行元素或第i列元素中非零元素对应的节点确定为节点i的邻居节点;将所述非零元素的值确定为节点i与对应邻居节点之间的关联强度。
  4. 根据权利要求1所述的方法,其中所述获取该节点i的位置初始项包括,基于所述初始嵌入向量Ci以及所述预定衰减系数,确定所述位置初始项。
  5. 根据权利要求1所述的方法,其中获取该节点i的位置偏移项包括:
    以节点i与各个邻居节点之间的关联强度为权重,对各个邻居节点的当前嵌入向量 求和,确定邻居中心位置;
    至少基于所述预定衰减系数α,所述邻居中心位置,确定所述位置偏移项。
  6. 根据权利要求1所述的方法,其中获取该节点i的位置偏移项包括:
    确定节点i与其所有邻居节点的关联强度的和值;
    确定节点i与各个邻居节点之间的关联强度与所述和值的比例,作为相对关联强度;
    以所述相对关联强度为权重,对各个邻居节点的当前嵌入向量求和,确定邻居中心位置;
    将邻居中心位置与所述预定衰减系数α的乘积,作为所述位置偏移项。
  7. 根据权利要求1所述的方法,其中所述预定收敛条件包括:
    对于每个节点,本次确定的当前嵌入向量与前次确定的当前嵌入向量的差值小于第一预定值;或者
    各个节点的本次确定的当前嵌入向量与前次确定的当前嵌入向量的差值的总和小于第二预定值。
  8. 根据权利要求1所述的方法,其中所述预定收敛条件包括:确定各个节点i的当前嵌入向量Ei的次数达到预定次数阈值。
  9. 根据权利要求1所述的方法,其中确定各个节点i在所述多维空间的嵌入向量包括,将节点i的嵌入向量确定为,满足所述预定收敛条件时节点i的当前嵌入向量Ei与其位置初始项之差。
  10. 一种将关系网络图嵌入到多维空间的装置,所述关系网络图包括多个节点,所述多个节点中具有关联关系的节点以一定关联强度互相连接,所述装置包括:
    初始位置确定单元,配置为随机确定所述多个节点中各个节点i在多维空间的初始嵌入向量Ci;
    邻居节点确定单元,配置为对于各个节点i,获取与该节点i相连接的邻居节点,以及该节点i与各个邻居节点之间的关联强度;
    邻居位置确定单元,配置为确定该节点i的各个邻居节点的当前嵌入向量;
    节点位置确定单元,配置为获取该节点i的位置初始项和位置偏移项,并根据所述位置初始项和位置偏移项,确定节点i的当前嵌入向量Ei,其中所述位置初始项基于所述初始嵌入向量Ci而确定,所述位置偏移项根据预定衰减系数α、所述各个邻居节点的当前嵌入向量以及该节点i与各个邻居节点之间的关联强度而确定;
    条件判定单元,配置为判断预定收敛条件是否得到满足,在不满足该预定收敛条件 的情况下,使得所述邻居位置确定单元再次确定该节点i的各个邻居节点的当前嵌入向量,所述节点位置确定单元再次确定节点i的当前嵌入向量Ei,直到该预定收敛条件得到满足;
    嵌入位置确定单元,配置为至少基于满足所述预定收敛条件的各个节点i的当前嵌入向量Ei,确定各个节点i在所述多维空间的嵌入向量。
  11. 根据权利要求10所述的装置,其中所述邻居节点确定单元配置为:
    获取记录所述关系网络图的网络关系的邻接矩阵,所述邻接矩阵中第m行第k列的元素对应于第m节点与第k节点之间的关联强度;
    通过所述邻接矩阵,确定节点i的邻居节点,以及节点i与各个邻居节点之间的关联强度。
  12. 根据权利要求11所述的装置,其中所述邻居节点确定单元配置为:
    获取所述邻接矩阵中与节点i对应的第i行元素或第i列元素;
    将所述第i行元素或第i列元素中非零元素对应的节点确定为节点i的邻居节点;将所述非零元素的值确定为节点i与对应邻居节点之间的关联强度。
  13. 根据权利要求10所述的装置,其中所述节点位置确定单元包括,初始项确定模块,配置为基于所述初始嵌入向量Ci以及所述预定衰减系数,确定所述位置初始项。
  14. 根据权利要求10所述的装置,其中所述节点位置确定单元包括偏移项确定模块,配置为:
    以节点i与各个邻居节点之间的关联强度为权重,对各个邻居节点的当前嵌入向量求和,确定邻居中心位置;
    至少基于所述预定衰减系数α,所述邻居中心位置,确定所述位置偏移项。
  15. 根据权利要求10所述的装置,其中所述节点位置确定单元包括偏移项确定模块,配置为:
    确定节点i与其所有邻居节点的关联强度的和值;
    确定节点i与各个邻居节点之间的关联强度与所述和值的比例,作为相对关联强度;
    以所述相对关联强度为权重,对各个邻居节点的当前嵌入向量求和,确定邻居中心位置;
    将邻居中心位置与所述预定衰减系数α的乘积,作为所述位置偏移项。
  16. 根据权利要求10所述的装置,其中所述预定收敛条件包括:
    对于每个节点,本次确定的当前嵌入向量与前次确定的当前嵌入向量的差值小于第一预定值;或者
    各个节点的本次确定的当前嵌入向量与前次确定的当前嵌入向量的差值的总和小于第二预定值。
  17. 根据权利要求10所述的装置,其中所述预定收敛条件包括:确定各个节点i的当前嵌入向量Ei的次数达到预定次数阈值。
  18. 根据权利要求10所述的装置,其中所述嵌入位置确定单元配置为,将节点i的嵌入向量确定为,满足所述预定收敛条件时节点i的当前嵌入向量Ei与其位置初始项之差。
  19. 一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行权利要求1-9中任一项的所述的方法。
  20. 一种计算设备,包括存储器和处理器,其特征在于,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现权利要求1-9中任一项所述的方法。
PCT/CN2019/089022 2018-07-17 2019-05-29 关系网络图嵌入的方法及装置 Ceased WO2020015464A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810784744.5 2018-07-17
CN201810784744.5A CN109063041B (zh) 2018-07-17 2018-07-17 关系网络图嵌入的方法及装置

Publications (1)

Publication Number Publication Date
WO2020015464A1 true WO2020015464A1 (zh) 2020-01-23

Family

ID=64816992

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/089022 Ceased WO2020015464A1 (zh) 2018-07-17 2019-05-29 关系网络图嵌入的方法及装置

Country Status (3)

Country Link
CN (1) CN109063041B (zh)
TW (1) TWI700599B (zh)
WO (1) WO2020015464A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063041B (zh) * 2018-07-17 2020-04-07 阿里巴巴集团控股有限公司 关系网络图嵌入的方法及装置
CN109992700A (zh) * 2019-01-22 2019-07-09 阿里巴巴集团控股有限公司 获取关系网络图中节点的嵌入向量的方法和装置
CN110119475B (zh) * 2019-01-29 2020-01-07 成都信息工程大学 一种poi推荐方法及推荐系统
CN109919316B (zh) * 2019-03-04 2021-03-12 腾讯科技(深圳)有限公司 获取网络表示学习向量的方法、装置和设备及存储介质
CN110032665B (zh) * 2019-03-25 2023-11-17 创新先进技术有限公司 确定关系网络图中图节点向量的方法及装置
CN110515986B (zh) * 2019-08-27 2023-01-06 腾讯科技(深圳)有限公司 一种社交网络图的处理方法、装置及存储介质
CN112149000B (zh) * 2020-09-09 2021-12-17 浙江工业大学 一种基于网络嵌入的在线社交网络用户社区发现方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100121792A1 (en) * 2007-01-05 2010-05-13 Qiong Yang Directed Graph Embedding
CN107145977A (zh) * 2017-04-28 2017-09-08 电子科技大学 一种对在线社交网络用户进行结构化属性推断的方法
CN107392782A (zh) * 2017-06-29 2017-11-24 上海斐讯数据通信技术有限公司 基于word2Vec的社团构建方法、装置及计算机处理设备
CN107633263A (zh) * 2017-08-30 2018-01-26 清华大学 基于边的网络图嵌入方法
CN109063041A (zh) * 2018-07-17 2018-12-21 阿里巴巴集团控股有限公司 关系网络图嵌入的方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008017044A1 (en) * 2006-08-02 2008-02-07 Watt Systems Technologies, Inc. Object oriented system and method of graphically displaying and analyzing complex systems
TW201115366A (en) * 2009-10-27 2011-05-01 Hon Hai Prec Ind Co Ltd System and method for analyzing relationships among persons
CN103838964B (zh) * 2014-02-25 2017-01-18 中国科学院自动化研究所 一种基于人工交通系统的社交关系网络生成方法及装置
TWI575470B (zh) * 2014-06-26 2017-03-21 國立臺灣大學 適用於社群網路之全域關係系統及搜尋關係方法
CN106445988A (zh) * 2016-06-01 2017-02-22 上海坤士合生信息科技有限公司 一种大数据的智能处理方法和系统
CN108062551A (zh) * 2017-06-28 2018-05-22 浙江大学 一种基于邻接矩阵的图特征提取系统、图分类系统和方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100121792A1 (en) * 2007-01-05 2010-05-13 Qiong Yang Directed Graph Embedding
CN107145977A (zh) * 2017-04-28 2017-09-08 电子科技大学 一种对在线社交网络用户进行结构化属性推断的方法
CN107392782A (zh) * 2017-06-29 2017-11-24 上海斐讯数据通信技术有限公司 基于word2Vec的社团构建方法、装置及计算机处理设备
CN107633263A (zh) * 2017-08-30 2018-01-26 清华大学 基于边的网络图嵌入方法
CN109063041A (zh) * 2018-07-17 2018-12-21 阿里巴巴集团控股有限公司 关系网络图嵌入的方法及装置

Also Published As

Publication number Publication date
CN109063041B (zh) 2020-04-07
TW202006571A (zh) 2020-02-01
TWI700599B (zh) 2020-08-01
CN109063041A (zh) 2018-12-21

Similar Documents

Publication Publication Date Title
WO2020015464A1 (zh) 关系网络图嵌入的方法及装置
CN114787824B (zh) 联合混合模型
US9350969B2 (en) Target region filling involving source regions, depth information, or occlusions
CN115545215A (zh) 一种去中心化的联邦聚类学习方法、装置、设备及介质
US10387788B2 (en) Graph based techniques for predicting results
CN112767551A (zh) 三维模型构建方法、装置以及电子设备、存储介质
Yu et al. Geodesics on point clouds
CN111627119A (zh) 纹理贴图方法及装置、设备、存储介质
US20220382741A1 (en) Graph embeddings via node-property-aware fast random projection
US9679363B1 (en) System and method for reducing image noise
Kanaeva et al. Camera Pose and Focal Length Estimation Using Regularized Distance Constraints.
CN109952742B (zh) 图结构处理方法、系统、网络设备及存储介质
CN112184753B (zh) 目标光流法确定方法、装置、计算机设备和存储介质
Eltarjaman et al. Private retrieval of POI details in top-K queries
US20250021871A1 (en) Systems and methods for enhancing an artificial intelligence model via a multi-field embedding approach
CN112163170A (zh) 一种基于虚节点和元学习改进社交网络对齐方法及系统
CN115496793B (zh) 立体匹配方法、装置、计算机设备和存储介质
CN111712811A (zh) Hd地图的可扩展图形slam
HK40002010A (zh) 关系网络图嵌入的方法及装置
HK40002010B (zh) 关系网络图嵌入的方法及装置
CN109992700A (zh) 获取关系网络图中节点的嵌入向量的方法和装置
Lakemond et al. Resection‐Intersection Bundle Adjustment Revisited
CN116894964A (zh) 后期融合物体图像聚类方法、装置和计算机设备
CN103220315B (zh) 在社交网络服务网站中计算用户距离的方法和设备
Wang et al. Spatial automatic subgroup analysis for areal data with repeated measures

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19836979

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19836979

Country of ref document: EP

Kind code of ref document: A1