# US 2017/0286555 A1 · Search Query Interactions

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

- Number: US 2017/0286555 A1
- Document ID: US20170286555A1
- Status: Published application
- Kind: A1
- Application number: 15/627,065
- Filed: 2017-06-19
- Published: 2017-10-05
- Earliest claimed: 2013-05-03
- Assignees: Facebook, Inc.
- Applicants: Facebook, Inc.
- Inventors: Rajat Raina; Kihyuk Hong; Sriram Sankar; Kittipat Virochsiri
- Web page: https://patentgrep.com/patent/US20170286555A1

## CPC

- G06F 16/9536: Search customisation based on social or collaborative filtering
- G06F 16/245: Query processing
- G06F 16/24565: {Triggers; Constraints}
- G06F 16/24578: {using ranking}
- G06F 16/9535: Search customisation based on user profiles and personalisation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In one embodiment, a method includes receiving a query comprising one or more n-grams, generating a plurality of query commands based on a parsing of the query input, wherein each query command comprises an inner query constraint and an outer query constraint, scoring the query commands based at least in part on a number of objects matching the inner query constraint of the respective query command, selecting a first query command based at least in part on the respective scores of the query commands, and executing the first query command to identify a plurality of objects based on: (1) a first set of objects matching the first inner query constraint and at least in part matching the first outer query constraint, and (2) a second set of objects matching the first outer query constraint.

## Claims

### Claim 1

A method comprising:
receiving, from a client system of a first user, a query comprising one or more n-grams;
generating a plurality of query commands based on a parsing of the query input, wherein each query command comprises an inner query constraint and an outer query constraint;
scoring the plurality of query commands based at least in part on a number of objects matching the inner query constraint of the respective query command;
selecting, from the plurality of query commands, a first query command based at least in part on the respective scores of the query commands, wherein the first query command comprises a first inner query constraint and a first outer query constraint; and
executing the first query command to identify a plurality of objects, the plurality of objects being identified based on:
a first set of objects matching the first inner query constraint and at least in part matching the first outer query constraint; and
a second set of objects matching the first outer query constraint.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
parsing the one or more n-grams of the query identify a plurality of query constraints, wherein the inner query constraint and the outer query constraint of each generated query command corresponds to one of the identified query constraints.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
generating one or more search results based on the first and second sets of objects, wherein each search result corresponds to an object of the plurality of objects; and
sending, to the client system, one or more of the search results for display to the first user.

### Claim 4 (depends on 1)

The method of claim 1, wherein the inner query constraint is for a first object-type and the outer query constraint is for a second object-type, and wherein the first object-type and the second object-type are each selected from a group consisting of: a user, a photo, a post, a webpage, an application, a location, and a user group.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
scoring the first set of objects; and
scoring the second set of objects based at least in part on the scores of the first set of objects.

### Claim 6 (depends on 1)

The method of claim 1, wherein executing the first query command to identify the plurality of objects comprises:
identifying a first number of objects matching at least the first inner query constraint; and
identifying a second number of objects matching both the first inner query constraint and the first outer query constraint.

### Claim 7 (depends on 1)

The method of claim 1, wherein executing the first query command to identify the plurality of objects comprises:
identifying a first number of objects matching either the first inner query constraint or the first outer query constraint; and
identifying a second number of objects matching both the first inner query constraint and the first outer query constraint.

### Claim 8 (depends on 1)

The method of claim 1, further comprising determining one or more search intents of the query based at least on whether one or more of the n-grams in the query match terms corresponding to a search intent indexed in a pattern-detection model.

### Claim 9 (depends on 8)

The method of claim 8, further comprising scoring the plurality of query commands based on one or more of the search intents.

### Claim 10 (depends on 9)

The method of claim 9, wherein the one or more search intents comprise an intent to exclude converse search results.

### Claim 11 (depends on 9)

The method of claim 9, wherein the one or more search intents comprise an intent to exclude inner search results, and wherein scoring the plurality of query commands comprises downgrading the score of each query command that generates search results corresponding to objects matching the inner query constraint of the respective query command.

### Claim 12 (depends on 9)

The method of claim 9, wherein the one or more search intents comprise an intent to exclude duplicate search results, and wherein scoring the plurality of query comprises downgrading the score of each query command that generates search results corresponding to objects that match both the inner query constraint and the outer query constraint of the respective query command.

### Claim 13 (depends on 8)

The method of claim 8, wherein, for each query command, one or more of the inner query constraint or the outer query constraint is generated based on one or more of the search intents.

### Claim 14 (depends on 1)

The method of claim 1, wherein the plurality of objects comprises to one or more objects of the second set of objects matching the first outer query constraint, each object of the plurality of objects corresponding to a second object that is related by a constraint of the first query command to at least one object of the first set of objects matching the first inner query constraint.

### Claim 15 (depends on 1)

The method of claim 1, wherein the first inner query constraint is nested in the first outer query constraint.

### Claim 16 (depends on 1)

The method of claim 1, wherein the query is a structured query comprising references to one or more selected objects accessible by the computing device.

### Claim 17 (depends on 1)

The method of claim 1, wherein the query is a text string.

### Claim 18 (depends on 1)

The method of claim 1, further comprising:
accessing a social graph comprising a plurality of nodes and a plurality of edges connecting the nodes, each of the edges between two of the nodes representing a single degree of separation between them, the nodes comprising:
a first node corresponding to the first user; and
a plurality of second nodes corresponding to the plurality of objects, respectively.

### Claim 19

One or more computer-readable non-transitory storage media embodying software that is operable when executed to:
receive, from a client system of a first user, a query comprising one or more n-grams;
generate a plurality of query commands based on a parsing of the query input, wherein each query command comprises an inner query constraint and an outer query constraint;
score the plurality of query commands based at least in part on a number of objects matching the inner query constraint of the respective query command;
select, from the plurality of query commands, a first query command based at least in part on the respective scores of the query commands, wherein the first query command comprises a first inner query constraint and a first outer query constraint; and
execute the first query command to identify a plurality of objects, the plurality of objects being identified based on:
a first set of objects matching the first inner query constraint and at least in part matching the first outer query constraint; and
a second set of objects matching the first outer query constraint.

### Claim 20

A system comprising: one or more processors; and a memory coupled to the processors comprising instructions executable by the processors, the processors operable when executing the instructions to:
receive, from a client system of a first user, a query comprising one or more n-grams;
generate a plurality of query commands based on a parsing of the query input, wherein each query command comprises an inner query constraint and an outer query constraint;
score the plurality of query commands based at least in part on a number of objects matching the inner query constraint of the respective query command;
select, from the plurality of query commands, a first query command based at least in part on the respective scores of the query commands, wherein the first query command comprises a first inner query constraint and a first outer query constraint; and
execute the first query command to identify a plurality of objects, the plurality of objects being identified based on:
a first set of objects matching the first inner query constraint and at least in part matching the first outer query constraint; and
a second set of objects matching the first outer query constraint.
