IP Library Granted Patent US 12694060
Granted Patent B2
US 12694060 · App. 18/300,812 · Granted Jul 28, 2026

Storage method for graph data and distributed computing method for graph data

Inventor: Yi Peng (Hangzhou, CN)
Assignee: Alipay (Hangzhou) Information Technology Co., Ltd.
G06F16/9024G06F16/906
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12694060
App. No.
18/300,812
Granted
Jul 28, 2026
Kind
B2
Abstract

The present specification relates to the field of data processing, and in particular, to a storage method for graph data and a distributed computing method for graph data. The graph data includes nodes and edges, the nodes include entity nodes and non-entity nodes, and the storage method for the graph data includes: obtaining a first table and a second table based on the graph data; obtaining first sub-tables and second sub-tables respectively corresponding to a plurality of entity node groups; and distributing the first sub-tables and the second sub-tables corresponding to the entity node groups to a plurality of computing units for distributed storage. In the distributed computing method for the graph data, the graph data is stored in a plurality of computing units in a distributed way according to the storage method for the graph data, and the method can be executed by one of the computing units.

Claims (50)

1 . A method comprises:

obtaining a first table and a second table based on semantic graph data, wherein the semantic graph data includes nodes and edges, the nodes include entity nodes and non-entity nodes, the first table includes records of the entity nodes, a record of each entity node includes information about a non-entity node associated with the entity node, the second table includes information about a plurality of node pairs, and each node pair includes a non-entity node and an entity node associated with the non-entity node;

obtaining first sub-tables and second sub-tables respectively corresponding to a plurality of entity node groups, wherein the plurality of entity node groups are a plurality of groups obtained by grouping the entity nodes, a first sub-table corresponding to an entity node group includes records in the first table of entity nodes of the entity node group, and a second sub-table corresponding to the entity node group includes information in the second table about node pairs that include the entity nodes of the entity node group, wherein the second sub-tables include balanced amounts of node pair information; and

distributing the first sub-tables and the second sub-tables corresponding to the entity node groups to a plurality of computing units for distributed storage, wherein a first sub-table and a second sub-table corresponding to a same entity node group are distributed to a same computing unit, and wherein one first sub-table or second sub-table is sent to one of the plurality of computing units at a time, and all of the first or second sub-tables are distributed to the plurality of computing units one-by-one in time order.

2 . The method according to claim 1 , wherein the obtaining the first sub-tables and the second sub-tables respectively corresponding to the plurality of entity node groups includes:

grouping the entity nodes into the plurality of entity node groups with equal number of entity nodes in each entity node group; and

for each entity node group, extracting records corresponding to entity nodes of the entity node group from the first table to obtain a first sub-table corresponding to the entity node group, and extracting information about node pairs that include the entity nodes of the entity node group from the second table to obtain a second sub-table corresponding to the entity node group.

3 . The method according to claim 1 , wherein the obtaining the first sub-tables and the second sub-tables respectively corresponding to the plurality of entity node groups includes:

dividing the second table to obtain the second sub-tables, wherein information about node pairs that include a same entity node is placed in a same second sub-table; and

for each second sub-table, extracting records corresponding to entity nodes of an entity node group corresponding to the second sub-table from the first table to obtain a corresponding first sub-table.

4 . The method according to claim 1 , wherein the information about the node pairs in the second sub-table is stored in order based on non-entity nodes.

5 . The method according to claim 4 , wherein the information about the node pairs in the second sub-table is stored in partitions based on types of the non-entity nodes, and information about node pairs in each partition is stored in order based on names or identifiers of non-entity nodes.

6 . The method according to claim 1 , wherein the information about the node pair includes names or identifiers of a non-entity node and an entity node of the node pair, and a type of a relationship between the two nodes.

7 . The method according to claim 1 , further comprising:

by a first computing unit of the computing units,

determining a first start entity node of a first type and a record of the first start entity node from a local first sub-table;

determining a first non-entity node to be matched from the record of the first start entity node; and

determining node pairs including the first non-entity node to be matched from a local second sub-table, and further using an entity node of a second type in the node pairs as a first target entity node.

8 . The method according to claim 7 , further comprising:

sending the first start entity node and the first non-entity node to be matched in the record of the first start entity node to another computing unit of the plurality of computing units.

9 . The method according to claim 7 , further comprising:

receiving a second start entity node and a second non-entity node to be matched in a record of the second start entity node that are sent by a second computing unit of the plurality of computing units; and

determining node pairs that include the second non-entity node to be matched from the local second sub-table, and further using an entity node of the second type in the node pairs that include the second non-entity node to be matched as a second target entity node.

10 . The method according to claim 9 , further comprising:

determining a plurality of entity node pairs based on node pairs determined by the computing units, wherein the plurality of entity node pairs include an entity node of the first type and an entity node of the second type that have a same non-entity node to be matched.

11 . The method according to claim 10 , wherein the first type is a shop, the second type is a voucher, and a type of the non-entity node to be matched includes one or more of a city or a business field; and the method further comprises: binding the entity node of the first type in the entity node pairs to the entity node of the second type; or

wherein the first type is a merchant, the second type is a user, and a type of the non-entity node to be matched includes one or more of a city or a commodity attribute; and the method further comprises: recommending the entity node of the first type in the entity node pairs to the entity node of the second type.

12 . A computing system comprising one or more processors and one or more memory device having executable instructions stored thereon, the executable instruction, when executed by the one or more processors, enabling the one or more processors to implement acts including:

obtaining a first table and a second table based on semantic graph data, wherein the semantic graph data includes nodes and edges, the nodes include entity nodes and non-entity nodes, the first table includes records of the entity nodes, a record of each entity node includes information about a non-entity node associated with the entity node, the second table includes information about a plurality of node pairs, and each node pair includes a non-entity node and an entity node associated with the non-entity node;

obtaining first sub-tables and second sub-tables respectively corresponding to a plurality of entity node groups, wherein the plurality of entity node groups are a plurality of groups obtained by grouping the entity nodes, a first sub-table corresponding to an entity node group includes records in the first table of entity nodes of the entity node group, and a second sub-table corresponding to the entity node group includes information in the second table about node pairs that include the entity nodes of the entity node group, wherein the second sub-tables include balanced amounts of node pair information; and

distributing the first sub-tables and the second sub-tables corresponding to the entity node groups to a plurality of computing units for distributed storage, wherein a first sub-table and a second sub-table corresponding to a same entity node group are distributed to a same computing unit, and wherein one first sub-table or second sub-table is sent to one of the plurality of computing units at a time, and all of the first or second sub-tables are distributed to the plurality of computing units one-by-one in time order.

13 . The computing system according to claim 12 , wherein the obtaining the first sub-tables and the second sub-tables respectively corresponding to the plurality of entity node groups includes:

grouping the entity nodes into the plurality of entity node groups with equal number of entity nodes in each entity node group; and

for each entity node group, extracting records corresponding to entity nodes of the entity node group from the first table to obtain a first sub-table corresponding to the entity node group, and extracting information about node pairs that include the entity nodes of the entity node group from the second table to obtain a second sub-table corresponding to the entity node group.

14 . The computing system according to claim 12 , wherein the obtaining the first sub-tables and the second sub-tables respectively corresponding to the plurality of entity node groups includes:

dividing the second table to obtain the second sub-tables, wherein information about node pairs that include a same entity node is placed in a same second sub-table; and

for each second sub-table, extracting records corresponding to entity nodes of an entity node group corresponding to the second sub-table from the first table to obtain a corresponding first sub-table.

15 . The computing system according to claim 12 , wherein the information about the node pairs in the second sub-table is stored in order based on non-entity nodes.

16 . The computing system according to claim 15 , wherein the information about the node pairs in the second sub-table is stored in partitions based on types of the non-entity nodes, and information about node pairs in each partition is stored in order based on names or identifiers of non-entity nodes.

17 . A non-transitory storage medium having executable instructions stored thereon, which when executed by one or more processors enable the one or more processor to implement acts comprising:

obtaining a first table and a second table based on semantic graph data, wherein the semantic graph data includes nodes and edges, the nodes include entity nodes and non-entity nodes, the first table includes records of the entity nodes, a record of each entity node includes information about a non-entity node associated with the entity node, the second table includes information about a plurality of node pairs, and each node pair includes a non-entity node and an entity node associated with the non-entity node;

obtaining first sub-tables and second sub-tables respectively corresponding to a plurality of entity node groups, wherein the plurality of entity node groups are a plurality of groups obtained by grouping the entity nodes, a first sub-table corresponding to an entity node group includes records in the first table of entity nodes of the entity node group, and a second sub-table corresponding to the entity node group includes information in the second table about node pairs that include the entity nodes of the entity node group, wherein the second sub-tables include balanced amounts of node pair information; and

distributing the first sub-tables and the second sub-tables corresponding to the entity node groups to a plurality of computing units for distributed storage, wherein a first sub-table and a second sub-table corresponding to a same entity node group are distributed to a same computing unit, and wherein one first sub-table or second sub-table is sent to one of the plurality of computing units at a time, and all of the first or second sub-tables are distributed to the plurality of computing units one-by-one in time order.

18 . The storage medium according to claim 17 , wherein the obtaining the first sub-tables and the second sub-tables respectively corresponding to the plurality of entity node groups includes:

grouping the entity nodes into the plurality of entity node groups with equal number of entity nodes in each entity node group; and

for each entity node group, extracting records corresponding to entity nodes of the entity node group from the first table to obtain a first sub-table corresponding to the entity node group, and extracting information about node pairs that include the entity nodes of the entity node group from the second table to obtain a second sub-table corresponding to the entity node group.

19 . The storage medium according to claim 17 , wherein the obtaining the first sub-tables and the second sub-tables respectively corresponding to the plurality of entity node groups includes:

dividing the second table to obtain the second sub-tables, wherein information about node pairs that include a same entity node is placed in a same second sub-table; and

for each second sub-table, extracting records corresponding to entity nodes of an entity node group corresponding to the second sub-table from the first table to obtain a corresponding first sub-table.

20 . The storage medium according to claim 17 , wherein the information about the node pairs in the second sub-table is stored in order based on non-entity nodes.