IP Library › Granted Patent US 11,093,497
Granted Patent B1
US 11,093,497 · App. 15/934,240 · Granted Aug 17, 2021

Nearest neighbor search as a service

Inventors: Pracheer Gupta (Stanford, CA); Poorna Chand Srinivas Perumalla (Seattle, WA); Stefano Stefani (Issaquah, WA)
Assignee: Amazon Technologies, Inc.
G06F16/24542G06F16/2237G06F16/2282G06F16/2343G06F16/2379G06F16/9024
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 11,093,497
App. No.
15/934,240
Granted
Aug 17, 2021
Kind
B1
Abstract

Techniques are described for a nearest neighbor search service that enables users to perform nearest neighbor searches. The nearest neighbor search service includes an interface that enables users to create collections of searchable vectors, add and update vectors to a collection, delete vectors from a collection, and perform searches for nearest neighbors to a given vector. The nearest neighbor search service enables users to add, update, and delete vectors of a collection in real-time while also enabling users to perform searches at the same time.

Claims (62)

1. A computer-implemented method comprising:

receiving, at a service in a provider network, a request to update a node associated with a vector in a graph, the service hosted on one or more electronic devices including at least one processor;

determining that an entry for the vector in a node table stored in a data store of the provider network does not have an indication of being locked, each entry in the node table including an indication of a read or write lock usage, a vector identifier, and a pointer to the node in the graph;

obtaining a lock for the entry for the vector in the node table;

updating the node in the graph;

during updating the node in the graph, allowing queries associated with one or more vectors in the graph; and

releasing the lock for the entry for the vector in the node table.

2. The computer-implemented method of claim 1 , wherein updating the node in the graph comprises changing at least one value associated with the node and recalculating edges for nodes impacted by the updating of the node.

3. The computer-implemented method of claim 2 , wherein the request to update a node associated with a vector in a graph includes an identifier of the vector and a collection including the vector.

4. A computer-implemented method comprising:

receiving, at a service in a provider network, a request to perform an action on a node associated with a vector in a graph, the service hosted on one or more electronic devices including at least one processor;

utilizing a node data structure stored in a data store of the provider network to determine that the action is allowed, the node data structure including a plurality of entries and each entry corresponds to a node in the graph and includes an indication of a read or write lock usage, a vector identifier, and a pointer to the node in the graph;

performing the action; and

during performing the action, allowing queries associated with one or more vectors in the graph.

5. The computer-implemented method of claim 4 , wherein the action is updating a node in the graph and performing the action comprises:

obtaining a lock for the entry for the vector in the node data structure;

updating the node associated with the vector in the graph;

recalculating edge values for nodes impacted by the updating of the node; and

releasing a lock for the entry for the vector in the node data structure.

6. The computer-implemented method of claim 4 , wherein the request to perform an action on a node associated with a vector in a graph includes an identifier of the vector and a collection including the vector.

7. The computer-implemented method of claim 4 , wherein the action is adding a node in the graph and performing the action comprises:

determining there is not an entry for the vector in the node data structure;

adding the node associated with the vector to the graph;

recalculating edge values for nodes impacted by the adding of the node; and

adding an entry for the vector into the node data structure.

8. The computer-implemented method of claim 7 , wherein the request to add a node associated with a vector in a graph includes an identifier of the vector and a collection including the vector.

9. The computer-implemented method of claim 4 , wherein the action is to get a node in the graph and performing the action comprises:

obtaining a read lock associated with the node in the node data structure;

reading the node from the graph; and

releasing the read lock associated with the node in the node data structure.

10. The computer-implemented method of claim 9 , wherein the request to get a node associated with a vector in a graph includes an identifier of the vector.

11. The computer-implemented method of claim 4 , wherein the action is deleting a node in the graph and performing the action comprises:

determining there are no locks associated with an entry for the node in the node data structure;

deleting the node from the graph;

recalculating edge values for nodes impacted by the deleting of the node; and

updating the entry for the node in the node data structure to have a null pointer for the node.

12. The computer-implemented method of claim 11 , wherein the request to delete a node associated with a vector in a graph includes an identifier of the vector.

13. The computer-implemented method of claim 4 , wherein the node data structure is a table.

14. The computer-implemented method of claim 4 , wherein the action includes performing Dijkstra's algorithm to update edges of the graph impacted by the action.

15. An apparatus, comprising:

a processor; and

a non-transitory machine-readable storage medium storing instructions which, when executed by the processor, causes the apparatus to:

receive a request to perform an action on a node associated with a vector in a graph;

utilize a node data structure to determine that the action is allowed, the node data structure including a plurality of entries and each entry corresponds to a node in the graph and includes an indication of a read or write lock usage, a vector identifier, and a pointer to the node in the graph;

perform the action; and

during performance of the action, allow queries associated with one or more vectors in the graph.

16. The apparatus of claim 15 , wherein the action is to update a node in the graph, and wherein the apparatus, to perform the action, is caused to:

obtain a lock for the entry for the vector in the node data structure;

update the node associated with the vector in the graph;

recalculate edge values for nodes impacted by the updating of the node; and

release a lock for the entry for the vector in the node data structure.

17. The apparatus of claim 16 , wherein the request to update a node associated with a vector in a graph includes an identifier of the vector and a collection including the vector.

18. The apparatus of claim 15 , wherein the action is to add a node in the graph, and wherein the apparatus, to perform the action, is caused to:

determine there is not an entry for the vector in the node data structure;

add the node associated with the vector to the graph;

recalculate edge values for nodes impacted by the adding of the node; and

add an entry for the vector into the node data structure.

19. The apparatus of claim 18 , wherein the request to add a node associated with a vector in a graph includes an identifier of the vector and a collection including the vector.

20. The apparatus of claim 15 , wherein the action is to get a node in the graph, and wherein the apparatus, to perform the action, is caused to:

obtain a read lock associated with the node in the node data structure;

read the node from the graph; and

release the read lock associated with the node in the node data structure.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 6, 2018
From: GUPTA, PRACHEER; PERUMALLA, POORNA CHAND SRINIVAS; STEFANI, STEFANO
To: AMAZON TECHNOLOGIES, INC.
Reel/Frame 045466/0121 →
Cited By (4)
US 12,189,598 US 12,360,996 US 12,579,131 US 12,743,868