# US 2022/0283883 A1 · Distributed processing in a messaging platform

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0283883 A1
- Document ID: US20220283883A1
- Status: Published application
- Kind: A1
- Application number: 17/583,121
- Filed: 2022-01-24
- Published: 2022-09-08
- Earliest claimed: 2013-09-26
- Assignees: Twitter, Inc.
- Applicants: Twitter, Inc.
- Inventors: Ajeet Grewal; Siva Gurumurthy; Venumadhav Satuluri; Pankaj Gupta; Brian A. Larson; Volodymyr Zhabuik; Aneesh Sharma; Ashish Goel
- Web page: https://patentgrep.com/patent/US20220283883A1

## CPC

- G06F 9/546: {Message passing systems or structures, e.g. queues}
- G06F 9/46: Multiprogramming arrangements
- G06F 16/245: Query processing
- G06F 16/9024: {Graphs; Linked lists (G06F16/9027 takes precedence)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method for distributed processing involves receiving a graph (G) of targets and of influencers, with each influencer related to at least one target, receiving an action graph of actions performed by one or more of the influencers, and key partitioning G across shards. The method further involves transposing the first graph (G) to obtain a first transposed graph (GT), value partitioning GT across the shards, storing the action graph on multiple shards, issuing, to a shard, a request specifying an influencer, to perform an intersection, receiving a response to the request of a set of influencers each of which is related to a target, and determining whether to send a recommendation to the target based on the response.

## Claims

### Claim 1

(canceled)

### Claim 2

A method comprising:
receiving a graph G representing relationships between user accounts of a messaging platform, the user accounts being represented by nodes of G and having edges between nodes where each edge represents a relationship between a pair of user accounts;
key partitioning G to generate key partitioned graphs and distributing the key partitioned graphs across a plurality of physical shards, wherein distributing the key partitioned graphs results in at least storing a first key partitioned graph on a first shard of the plurality of physical shards and storing a second key partitioned graph on a second shard of the plurality of physical shards;
value partitioning G to generate value partitioned graphs and distributing the value partitioned graphs across the plurality of physical shards, wherein distributing the value partitioned graphs results in at least storing a first value partitioned graph on the first shard and storing a second value partitioned graph on the second shard;
receiving a request to determine one or more user accounts that have a relationship two degrees from a first user account;
issuing, to each shard, a first request to look up second user accounts in the respective value partitioned graphs that have a first degree connection with the first user account;
issuing, to each shard, a second request to look up third user accounts in the respective key partitioned graphs having a first degree connection with a second user account of the one or more second user accounts;
generating a union of the third user accounts received from each shard; and
determining whether to send a recommendation to the first user account based on the one or more third user accounts.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
receiving an action graph representing actions performed by users, wherein the action graph includes a set of subgraphs of the form C←[b1, . . . , bn], with C corresponding to a particular action and [b1, . . . , bn] corresponding to a set of user accounts for users that have performed the particular action.

### Claim 4 (depends on 3)

The method of claim 3, wherein determining whether to send a recommendation to the first user account comprises:
intersecting the one or more third user accounts with a particular action of the action graph to determine which third user accounts have performed the particular action; and
sending a recommendation to the first user account based on the particular action.

### Claim 5 (depends on 4)

The method of claim 4, wherein determining whether to send the recommendation to the first user account includes determining whether the particular action was performed by a specified number of third user accounts.

### Claim 6 (depends on 2)

The method of claim 2, wherein determining whether to send the recommendation to the first user account includes determining to send a recommendation to form a graph relationship with one or more third user accounts.

### Claim 7 (depends on 2)

The method of claim 2, wherein the request to determine user accounts that have a relationship two degrees from the first user account comprises a request for a top K user accounts, the method further comprising generating a local union at each shard of the results of the first request and the second request; and returning top K results of the local union.

### Claim 8 (depends on 2)

The method of claim 2, wherein the request to determine user accounts that have a relationship two degrees from a first user account comprises a request for a random user account, the method further comprising: selecting at each shard, from the results of the second request, a random third user account; and randomly selecting a third user account from the union of the third user accounts received from each shard.

### Claim 9

A system comprising:
one or more computers and one or more storage devices on which are stored instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising:
receiving a graph G representing relationships between user accounts of a messaging platform, the user accounts being represented by nodes of G and having edges between nodes where each edge represents a relationship between a pair of user accounts;
key partitioning G to generate key partitioned graphs and distributing the key partitioned graphs across a plurality of physical shards, wherein distributing the key partitioned graphs results in at least storing a first key partitioned graph on a first shard of the plurality of physical shards and storing a second key partitioned graph on a second shard of the plurality of physical shards;
value partitioning G to generate value partitioned graphs and distributing the value partitioned graphs across the plurality of physical shards, wherein distributing the value partitioned graphs results in at least storing a first value partitioned graph on the first shard and storing a second value partitioned graph on the second shard;
receiving a request to determine one or more user accounts that have a relationship two degrees from a first user account;
issuing, to each shard, a first request to look up second user accounts in the respective value partitioned graphs that have a first degree connection with the first user account;
issuing, to each shard, a second request to look up third user accounts in the respective key partitioned graphs having a first degree connection with a second user account of the one or more second user accounts;
generating a union of the third user accounts received from each shard; and
determining whether to send a recommendation to the first user account based on the one or more third user accounts.

### Claim 10 (depends on 9)

The system of claim 9, the operations further comprising:
receiving an action graph representing actions performed by users, wherein the action graph includes a set of subgraphs of the form C←[b1, . . . , bn], with C corresponding to a particular action and [b1, . . . , bn] corresponding to a set of user accounts for users that have performed the particular action.

### Claim 11 (depends on 10)

The system of claim 10, wherein determining whether to send a recommendation to the first user account comprises:
intersecting the one or more third user accounts with a particular action of the action graph to determine which third user accounts have performed the particular action; and
sending a recommendation to the first user account based on the particular action.

### Claim 12 (depends on 11)

The system of claim 11, wherein determining whether to send the recommendation to the first user account includes determining whether the particular action was performed by a specified number of third user accounts.

### Claim 13 (depends on 9)

The system of claim 9, wherein determining whether to send the recommendation to the first user account includes determining to send a recommendation to form a graph relationship with one or more third user accounts.

### Claim 14 (depends on 9)

The system of claim 9, wherein the request to determine user accounts that have a relationship two degrees from the first user account comprises a request for a top K user accounts, the operations further comprising generating a local union at each shard of the results of the first request and the second request; and returning top K results of the local union.

### Claim 15 (depends on 9)

The system of claim 9, wherein the request to determine user accounts that have a relationship two degrees from a first user account comprises a request for a random user account, the operations further comprising: selecting at each shard, from the results of the second request, a random third user account; and randomly selecting a third user account from the union of the third user accounts received from each shard.

### Claim 16

One or more non-transitory computer readable media comprising computer readable program code, which when executed by a computer processor causes the computer processor to perform operations comprising:
receiving a graph G representing relationships between user accounts of a messaging platform, the user accounts being represented by nodes of G and having edges between nodes where each edge represents a relationship between a pair of user accounts;
key partitioning G to generate key partitioned graphs and distributing the key partitioned graphs across a plurality of physical shards, wherein distributing the key partitioned graphs results in at least storing a first key partitioned graph on a first shard of the plurality of physical shards and storing a second key partitioned graph on a second shard of the plurality of physical shards;
value partitioning G to generate value partitioned graphs and distributing the value partitioned graphs across the plurality of physical shards, wherein distributing the value partitioned graphs results in at least storing a first value partitioned graph on the first shard and storing a second value partitioned graph on the second shard;
receiving a request to determine one or more user accounts that have a relationship two degrees from a first user account;
issuing, to each shard, a first request to look up second user accounts in the respective value partitioned graphs that have a first degree connection with the first user account;
issuing, to each shard, a second request to look up third user accounts in the respective key partitioned graphs having a first degree connection with a second user account of the one or more second user accounts;
generating a union of the third user accounts received from each shard; and
determining whether to send a recommendation to the first user account based on the one or more third user accounts.

### Claim 17 (depends on 16)

The non-transitory computer readable media of claim 16, the operations further comprising:
receiving an action graph representing actions performed by users, wherein the action graph includes a set of subgraphs of the form C←[b1, . . . , bn], with C corresponding to a particular action and [b1, . . . , bn] corresponding to a set of user accounts for users that have performed the particular action.

### Claim 18 (depends on 17)

The non-transitory computer readable media of claim 17, wherein determining whether to send a recommendation to the first user account comprises:
intersecting the one or more third user accounts with a particular action of the action graph to determine which third user accounts have performed the particular action; and
sending a recommendation to the first user account based on the particular action.

### Claim 19 (depends on 18)

The non-transitory computer readable media of claim 18, wherein determining whether to send the recommendation to the first user account includes determining whether the particular action was performed by a specified number of third user accounts.

### Claim 20 (depends on 16)

The non-transitory computer readable media of claim 16, wherein determining whether to send the recommendation to the first user account includes determining to send a recommendation to form a graph relationship with one or more third user accounts.

### Claim 21 (depends on 16)

The non-transitory computer readable media of claim 16, wherein the request to determine user accounts that have a relationship two degrees from the first user account comprises a request for a top K user accounts, the operations further comprising generating a local union at each shard of the results of the first request and the second request; and returning top K results of the local union.

### Claim 22 (depends on 16)

The non-transitory computer readable media of claim 16, wherein the request to determine user accounts that have a relationship two degrees from a first user account comprises a request for a random user account, the operations further comprising: selecting at each shard, from the results of the second request, a random third user account; and randomly selecting a third user account from the union of the third user accounts received from each shard.
