IP Library Granted Patent US 10,482,110
Granted Patent B2
US 10,482,110 · App. 15/286,445 · Granted Nov 19, 2019

Columnwise range k-nearest neighbors search queries

Inventors: Christoph Weyerhaeuser (Leimen, DE); Tobias Mindnich (Sulzbach, DE); Daniel Baeumges (Viersen, DE); Gerrit Simon Kazmaier (Heidelberg, DE)
Assignee: SAP SE
G06F16/285G06F16/221G06F16/24578G06F16/29
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 10,482,110
App. No.
15/286,445
Granted
Nov 19, 2019
Kind
B2
Abstract

A range k-nearest neighbor search query of a database is processed by first defining an inner rectangle bounded within a circle around a center point specified by the range k-nearest neighbor search query. Thereafter, a distance to the center point is calculated for each point within the inner rectangle. Query results are returned if k or more points are within the inner rectangle. Otherwise, at least one additional query is executed. Related apparatus, systems, techniques and articles are also described.

Claims (67)

1. A method comprising:

determining, by a database, based on a query requesting a specified number of data points from a database, whether a quantity of data points in a first search within a first rectangular region equals or exceeds the specified number, the first rectangular region including four corners terminating at a circle;

selecting, when the quantity equals or exceeds the specified number, a first plurality of data points closest to a center of the circle, the first plurality of data points including a number of data points equal to the specified number; and

selecting, when the quantity is less than the specified number, a second plurality of data points closest to the center, wherein the second plurality of data points are selected in a second search within a second rectangular region that includes and surrounds the circle, the second plurality of data points including a number of data points equal to or less than the specified number.

2. A method as in claim 1 , further comprising:

returning, in response to the query, the first plurality of data points when the quantity of data points within the first rectangular region equals or exceeds the specified number; and

returning, in response to the query, the second plurality of data points when the quantity of data points within the first rectangular region is less than the specified number.

3. A method as in claim 2 , wherein the first plurality of data points or the second plurality of data points are returned in a bit vector that indicates indexes of the first plurality of data points or the second plurality of data points.

4. A method as in claim 1 , wherein the query comprises:

an indication of a location of the center of the circle, and

a radius of the circle.

5. A method as in claim 4 , further comprising:

generating, based on the location of the center and the radius, the first rectangular region; and

generating, based on the location of the center and the radius, the second rectangular region when the quantity of data points within the first rectangular region is less than the specified number.

6. A method as in claim 4 , wherein the indication of the location of the center includes a point defined by an intersection of at least a first coordinate and a second coordinate, and wherein selecting the second plurality of data points comprises:

determining, based on the radius and the location of the center, a first maximum value for the first coordinate and a first minimum value for the first coordinate;

determining, based on the radius and the location of the center, a second maximum value for the second coordinate and a second minimum value for the second coordinate; and

searching within the second rectangular region based on the first maximum value, the first minimum value, the second maximum value, and the second minimum value.

7. A method as in claim 1 , further comprising:

determining a plurality of locations for the data points within the first rectangular region; and

determining distances between the center and the plurality of locations,

wherein selecting the first plurality of data points comprises selecting, based on the distances, the specified number of the data points within the first rectangular region which are closest to the center of the circle.

8. A method as in claim 1 , wherein the second plurality of data points includes all points within the first rectangular region.

9. A non-transitory computer program product storing instructions for processing a range k-nearest neighbor search query of a database which, when executed, result in operations comprising at least:

determining, based on a query requesting a specified number of data points from a database, whether a quantity of data points in a first search within a first rectangular region equals or exceeds the specified number, the first rectangular region including four corners terminating at a circle;

selecting, when the quantity equals or exceeds the specified number, a first plurality of data points closest to a center of the circle, the first plurality of data points including a number of data points equal to the specified number; and

selecting, when the quantity is less than the specified number, a second plurality of data points closest to the center, wherein the second plurality of data points are selected in a second search within a second rectangular region that includes and surrounds the circle, the second plurality of data points including a number of data points equal to or less than the specified number.

10. A non-transitory computer program product as in claim 9 , wherein the operations further comprise:

returning, in response to the query, the first plurality of data points when the quantity of data points within the first rectangular region equals or exceeds the specified number; and

returning, in response to the query, the second plurality of data points when the quantity of data points within the first rectangular region is less than the specified number.

11. A non-transitory computer program product as in claim 9 , wherein the query comprises:

an indication of a location of the center of the circle, and

a radius of the circle.

12. A non-transitory computer program product as in claim 11 , wherein the operations further comprise:

generating, based on the location of the center and the radius, the first rectangular region; and

generating, based on the location of the center and the radius, the second rectangular region when the quantity of data points within the first rectangular region is less than the specified number.

13. A non-transitory computer program product as in claim 11 , wherein the indication of the location of the center includes a point defined by an intersection of at least a first coordinate and a second coordinate, and wherein selecting the second plurality of data points comprises:

determining, based on the radius and the location of the center, a first maximum value for the first coordinate and a first minimum value for the first coordinate;

determining, based on the radius and the location of the center, a second maximum value for the second coordinate and a second minimum value for the second coordinate; and

searching within the second rectangular region based on the first maximum value, the first minimum value, the second maximum value, and the second minimum value.

14. A non-transitory computer program product as in claim 9 , wherein the operations further comprise:

determining a plurality of locations for the data points within the first rectangular region; and

determining distances between the center and the plurality of locations,

wherein selecting the first plurality of data points comprises selecting, based on the distances, the specified number of the data points within the first rectangular region which are closest to the center of the circle.

15. A system comprising:

at least one data processor;

memory storing instructions, which when executed, result in operations comprising at least:

determining, based on a query requesting a specified number of data points from a database, whether a quantity of data points in a first search within a first rectangular region equals or exceeds the specified number, the first rectangular region including four corners terminating at a circle;

selecting, when the quantity equals or exceeds the specified number, a first plurality of data points closest to a center of the circle, the first plurality of data points including a number of data points equal to the specified number; and

selecting, when the quantity is less than the specified number, a second plurality of data points closest to the center, wherein the second plurality of data points are selected in a second search within a second rectangular region that includes and surrounds the circle, the second plurality of data points including a number of data points equal to or less than the specified number.

16. A system as in claim 15 , wherein the operations further comprise:

returning, in response to the query, the first plurality of data points when the quantity of data points within the first rectangular region equals or exceeds the specified number; and

returning, in response to the query, the second plurality of data points when the quantity of data points within the first rectangular region is less than the specified number.

17. A system as in claim 15 , wherein the query comprises:

an indication of a location of the center of the circle, and

a radius of the circle.

18. A system as in claim 17 , wherein the operations further comprise:

generating, based on the location of the center and the radius, the first rectangular region; and

generating, based on the location of the center and the radius, the second rectangular region when the quantity of data points within the first rectangular region is less than the specified number.

19. A system as in claim 17 , wherein the indication of the location of the center includes a point defined by an intersection of at least a first coordinate and a second coordinate, and wherein selecting the second plurality of data points comprises:

determining, based on the radius and the location of the center, a first maximum value for the first coordinate and a first minimum value for the first coordinate;

determining, based on the radius and the location of the center, a second maximum value for the second coordinate and a second minimum value for the second coordinate; and

searching within the second rectangular region based on the first maximum value, the first minimum value, the second maximum value, and the second minimum value.

20. A system as in claim 15 , wherein the operations further comprise:

determining a plurality of locations for the data points within the first rectangular region; and

determining distances between the center and the plurality of locations,

wherein selecting the first plurality of data points comprises selecting, based on the distances, the specified number of the data points within the first rectangular region which are closest to the center of the circle.

Assignments (3)
CHANGE OF NAME Recorded Oct 14, 2019
From: SAP AG
To: SAP SE
Reel/Frame 050718/0644 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 13, 2019
From: WEYERHAEUSER, CHRISTOPH; MINDNICH, TOBIAS; BAEUMGES, DANIEL; KAZMAIER, GERRIT SIMON
To: SAP AG
Reel/Frame 050366/0396 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 13, 2019
From: SAP AG
To: SAP SE
Reel/Frame 051797/0558 →
Continuity (2)
Continuation 13532640 · Jun 25, 2012
Related Publication 20170024457A1 · Jan 26, 2017