US 11,816,115 B2
Search query modification database
Vasyl Pihur, Kirkland, CA (US); and Senthil Sundaram, Mountain View, CA (US)
Assigned to Snap Inc., Santa Monica, CA (US)
Filed by Vasyl Pihur, Kirkland, CA (US); and Senthil Sundaram, Mountain View, CA (US)
Filed on Mar. 30, 2021, as Appl. No. 17/217,400.
Prior Publication US 2022/0318244 A1, Oct. 6, 2022
Int. Cl. G06F 16/2458 (2019.01); G06F 16/36 (2019.01); G06F 16/2452 (2019.01)
CPC G06F 16/2462 (2019.01) [G06F 16/2452 (2019.01); G06F 16/374 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A method of assembling a database for query generation, the method comprising:
creating a query history log by receiving a data stream including query events within query sessions, each query session including a character string, each query event including a user identifier and a session identifier and partitioning the query events by user identifier and session identifier, the query history log including target queries and a mapping between each of the target queries and associated subqueries for each of the target queries;
selecting one or more of the associated subqueries for a first target query based on a conditional probability exceeding a threshold for the associated subqueries of the first target query compared to matching associated subqueries of the other target queries;
including the first target query and the selected one or more associated subqueries for the first target query in an in-memory data structure store for query generation;
selecting one or more of the associated subqueries for a second target query based on a conditional probability exceeding a threshold for the associated subqueries of the second target query compared to the matching associated subqueries of other target queries;
identifying misspelling of the second target query by ordering the target queries by decreasing frequency from a most frequent target query to a least frequent target query, building a dictionary by processing the order target queries starting with the most frequent target query as follows:
i. adding a first frequency ordered target query to a dictionary;
ii. adding a second frequency ordered target query to the dictionary if the second frequency ordered target query does not include one or more spell corrections within a pre-specified edit distance with respect to the first frequency ordered target query or has a relative frequency with respect to the first frequency ordered target query that exceeding a threshold; and
iii. repeating step ii with a next most frequent frequency ordered target query until the least frequent target query is reached; and
correcting the misspelling of the second target query.