Nearest Neighbor Search Service Real-Time Vector Updates

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current nearest neighbor search technologies do not support incremental updates of vectors while allowing real-time queries, leading to inconvenient locking mechanisms that block searches during updates.

Innovation Solution

The implementation of a nearest neighbor search service that uses a node table with read and write locks to manage vector updates and queries incrementally, allowing for simultaneous addition, deletion, and updating of vectors without deadlocks, utilizing Dijkstra's algorithm for graph creation and HNSW for high-recall approximate solutions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the entire graph is locked during vector updates, then data consistency is maintained, but query operations are blocked and system efficiency deteriorates

Engineering Contradiction:
Improvedata consistencyVSAvoidquery efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the graph into multiple partitions or shards, allowing different portions of the graph to be updated independently. This enables concurrent read and write operations on different segments, maintaining data consistency within each segment while allowing queries to proceed on other segments, thus resolving the contradiction between consistency and efficiency.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism (such as a version control system or transaction log) that mediates between update operations and query operations. This intermediary allows the system to maintain consistency without requiring full graph locking, as queries can read from stable versions while updates are applied to new versions.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If incremental updates are allowed without locking, then system efficiency improves, but data consistency during concurrent operations deteriorates

Engineering Contradiction:
Improveupdate efficiencyVSAvoiddata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements dynamic locking mechanisms where locks are acquired and released based on the specific operations being performed and the current state of the graph. Rather than static full-graph locking, the system dynamically determines which portions need locking and for how long, allowing incremental updates to proceed efficiently while maintaining consistency where required.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent incorporates feedback mechanisms that monitor the state of the graph and adjust locking strategies accordingly. The system receives feedback about ongoing operations and uses this information to make decisions about when to acquire or release locks, ensuring consistency is maintained during incremental updates without unnecessary blocking.

Inventive Principle:
Principle #23Feedback

3Reliability

If the graph is locked for writes, then write operations are safe, but read operations experience increased latency

Engineering Contradiction:
Improvewrite safetyVSAvoidquery latency
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent merges read and write operations into a unified transactional framework where both operation types can proceed concurrently under appropriate conditions. By combining the handling of reads and writes into a single coherent system with shared locking protocols, the patent eliminates the need for separate locking mechanisms that would increase read latency while maintaining write safety.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS11093497B1Nearest neighbor search as a service
Publication Date: 2021.08.17 AMAZON TECH INC
  • US11093497B1 patent drawing
  • US11093497B1 patent drawing
  • US11093497B1 patent drawing

AI summary

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.