IP Library Granted Patent US 10,585,944
Granted Patent B2
US 10,585,944 · App. 15/642,612 · Granted Mar 10, 2020

Directed graph compression

Inventors: Guohua Li (Shanghai, CN); Qi Liang (Shanghai, CN); Qi Ye (Shanghai, CN); Tian Tian (Beijing, CN); Weixiong Rao (Shanghai, CN)
Assignee: International Business Machines Corporation
G06F16/9024G06F7/36G06F17/30958
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 10,585,944
App. No.
15/642,612
Granted
Mar 10, 2020
Kind
B2
Abstract

In one embodiment of the present disclosure, an original graph including nodes is obtained. The nodes of the original graph are reordered to generate a reordered graph. Non-zero elements in an adjacency matrix for the reordered graph are clustered as compared with an adjacency matrix for the original graph. The adjacency matrix for the reordered graph is encoded with integers. The integers correspond to non-empty blocks in the adjacency matrix for the reordered graph.

Claims (48)

1. A system, comprising:

one or more processors;

a memory coupled to at least one of the processors; a set of computer program instructions stored in the memory and executed by at least one of the processors in order to perform actions of:

reordering a plurality of nodes of a graph to generate a reordered graph, wherein a plurality of non-zero elements in a reordered adjacency matrix are clustered, reducing a number of non-empty blocks, as compared with an adjacency matrix; and

encoding the reordered adjacency matrix with a plurality of integers, wherein the encoding comprises:

creating (j) a directory to maintain adjacency matrix identifications, (ii) a first set of integers, and (iii) a second set of integers, wherein:

a first non-empty block includes at least two rows;

the directory includes an associated row identification that identifies row location of the first non-empty block in the adjacency matrix,

the first set of numbers comprises: (i) a first integer that is a left-most column identification of the first non- empty block and (ii) a second integer that is a representation of a first binary number present in the first row of the first non-empty block; and

the second set of numbers comprises: (i) a third integer that is a right-most column identification of the first non-empty block and (ii) a fourth integer that is a representation of a second binary number present in the second row of the first non-empty block.

2. The system according to claim 1 , wherein the graph is a directed graph, and each element of a plurality of elements in the adjacency matrix indicates whether or not a directed edge exists from a first node to a second node of the plurality of nodes.

3. The system according to claim 1 , wherein the encoding comprises:

dividing the reordered adjacency matrix into a plurality of blocks, wherein each block includes at least one element of a plurality of elements in the reordered adjacency matrix; and

representing each non-empty block of the plurality of blocks as at least one integer of the plurality of integers, wherein elements in each non-empty block are treated as a binary form of the at least one integer.

4. The system according to claim 1 , wherein the reordering comprises:

obtaining node degrees for each node of the plurality of nodes in the graph;

determining a set of candidate nodes from the plurality of nodes in the graph based on the node degrees; and

determining an order of the set of candidate nodes and corresponding neighbor nodes based on common neighbor information.

5. The system according to claim 4 , wherein the node degrees include an in-degree and an out-degree, wherein the in-degree indicates a degree to which a node is pointed to by the plurality of nodes and the out-degree indicates a degree to which the node points to the plurality of nodes.

6. The system according to claim 5 , wherein the determining the set of candidate nodes comprises:

sorting the plurality of nodes in the graph according to the node degrees, wherein the node with a highest node degree, which includes both in-degree and out-degree, is selected first, based on comparing a highest in-degree and a highest out-degree; and

determining k number of nodes as the set of candidate nodes, wherein k is an integer less than or equal to a total number of nodes in the graph.

7. The system according to claim 1 , wherein the determining the set of candidate nodes comprises:

sorting the plurality of nodes in the graph according to the node degrees, wherein the node with a highest in-degree is selected first; and determining k number of nodes as the set of candidate nodes, wherein k is an integer less than or equal to a total number of nodes in the graph.

8. A computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions readable by a device to cause the device to perform a method comprising:

reordering a plurality of nodes of a graph to generate a reordered graph, wherein a plurality of non-zero elements in a reordered adjacency matrix are clustered, reducing a number of non-empty blocks, as compared with an adjacency matrix; and

encoding the reordered adjacency matrix with a plurality of integers, wherein the encoding comprises:

creating (i) a directory to maintain adjacency matrix identifications, (ii) a first set of integers, and (iii) a second set of integers, wherein:

a first non-empty block includes at least two rows;

the directory includes an associated row identification that identifies row location of the first non-empty block in the adjacency matrix,

the first set of numbers comprises: (i) a first integer that is a left-most column identification of the first non-empty block and (ii) a second integer that is a representation of a first binary number present in the first row of the first non-empty block; and

the second set of numbers comprises: (i) a third integer that is a right-most column identification of the first non-empty block and (ii) a fourth integer that is a representation of a second binary number present in the second row of the first non-empty block.

9. The computer program product according to claim 8 , wherein the graph is a directed graph, and each element of a plurality of elements in the adjacency matrix indicates whether or not a directed edge exists from a first node to a second node of the plurality of nodes.

10. The computer program product according to claim 8 , wherein the encoding comprises:

dividing the reordered adjacency matrix into a plurality of blocks, wherein each block includes at least one element of a plurality of elements in the reordered adjacency matrix; and

representing each non-empty block of the plurality of blocks as at least one integer of the plurality of integers, wherein elements in each non-empty block are treated as a binary form of the at least one integer.

11. The computer program product according to claim 8 , wherein the reordering comprises:

obtaining node degrees for each node of the plurality of nodes in the graph;

determining a set of candidate nodes from the plurality of nodes in the graph based on the node degrees; and

determining an order of the set of candidate nodes and corresponding neighbor nodes based on common neighbor information.

12. The computer program product according to claim 11 , wherein the node degrees include an in-degree and an out-degree, wherein the in-degree indicates a degree to which a node is pointed to by the plurality of nodes and the out-degree indicates a degree to which the node points to the plurality of nodes.

13. The computer program product according to claim 11 , wherein the determining the set of candidate nodes comprises:

sorting the plurality of nodes in the graph according to the node degrees, wherein the node with a highest node degree, which includes both in-degree and out-degree, is selected first, based on comparing a highest in-degree and a highest out-degree; and

determining k number of nodes as the set of candidate nodes, wherein k is an integer less than or equal to a total number of nodes in the graph.

14. The computer program product according to claim 11 , wherein the common neighbor information is a number of neighbor nodes shared in common between two nodes of the set of candidate nodes, and wherein the order of the set of candidate nodes is a descending order according to the number of neighbor nodes shared in common for each candidate node.

15. The system according to claim 8 , wherein the determining the set of candidate nodes comprises:

sorting the plurality of nodes in the graph according to the node degrees, wherein the node with a highest out-degree is selected first; and

determining k number of nodes as the set of candidate nodes, wherein k is an integer less than or equal to a total number of nodes in the graph.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 3, 2024
From: BEIJING PIANRUOJINGHONG TECHNOLOGY CO., LTD.
To: BEIJING ZITIAO NETWORK TECHNOLOGY CO., LTD.
Reel/Frame 066565/0952 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 4, 2023
From: AWEMANE LTD.
To: BEIJING PIANRUOJINGHONG TECHNOLOGY CO., LTD.
Reel/Frame 064501/0498 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 2, 2021
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: AWEMANE LTD.
Reel/Frame 057991/0960 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 6, 2017
From: LI, GUOHUA; LIANG, QI; YE, QI; TIAN, TIAN; RAO, WEIXIONG
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 042922/0092 →
Continuity (1)
Related Publication 20190012404A1 · Jan 10, 2019