CN102289466B - K-nearest neighbor searching method based on regional coverage - Google Patents

K-nearest neighbor searching method based on regional coverage Download PDF

Info

Publication number
CN102289466B
CN102289466B CN2011102063919A CN201110206391A CN102289466B CN 102289466 B CN102289466 B CN 102289466B CN 2011102063919 A CN2011102063919 A CN 2011102063919A CN 201110206391 A CN201110206391 A CN 201110206391A CN 102289466 B CN102289466 B CN 102289466B
Authority
CN
China
Prior art keywords
grid cell
point
grid
chained list
voronoi
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2011102063919A
Other languages
Chinese (zh)
Other versions
CN102289466A (en
Inventor
王波涛
乔百友
屈敬伟
王小松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northeastern University China
Original Assignee
Northeastern University China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northeastern University China filed Critical Northeastern University China
Priority to CN2011102063919A priority Critical patent/CN102289466B/en
Publication of CN102289466A publication Critical patent/CN102289466A/en
Application granted granted Critical
Publication of CN102289466B publication Critical patent/CN102289466B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a k-nearest neighbor searching method based on regional coverage, belonging to the technical field of mobile data indexes. The k-nearest neighbor searching method comprises the steps of: gridding a space, storing data points in corresponding grids, storing grids which are taken as the leaf nodes of a quadtree, meanwhile, storing the grids, which are taken as mobile objects, into a Voronoi image; and during searching, firstly finding out a grid in which an object is located according to coordinates of the object, further finding out the position of the grid in the Voronoi image, structuring the object in the grid according to an ascending order of distances to form a result linked list, meanwhile, putting adjacent grids into an access linked list based on the ascending order of the distances according to the Voronoi image, comparing the distances, and finally finding out K nearest neighbors of the object. In the k-nearest neighbor searching method, an index structure with the Voronoi image and a virtual grid quadtree is comprehensively utilized, and a Hash table is utilized for rapid searching and positioning, so that the searching efficiency is increased.

Description

A kind of k nearest Neighbor that covers based on zone
Technical field
The invention belongs to Mobile data index technology field, particularly a kind of k nearest Neighbor that covers based on zone.
Background technology
Progress along with science and technology, particularly wireless communication technology, GPS (Global Positioning System, GPS) development of technology and database technology, the mobile object database technology becomes the study hotspot of database field gradually, and wherein the k nearest neighbor querying method of mobile object data is key areas in research.So-called k nearest neighbor (KNN, K Nearest Neighbor) inquiry refers to find in space apart from K before set point nearest object, wherein K can for one also can be for a plurality of.But most of research work in past is all for the k nearest neighbor inquiry that is under static environment, and under this environment, the property value of impact point remains unchanged or seldom needs and upgrades, and the research of this respect is comparative maturity; For in dynamic environment, query object and to be queried target be all k nearest neighbor inquiry problem in mobile situation, the research of this respect all also is in the immature stage both at home and abroad at present.
The k nearest neighbor inquiry application of mobile object is very extensive, concrete application is mainly reflected in following four aspects, at first be the application in communication navigation and traffic scheduling, such as people can and send request by the own nearest taxi information of whois lookup distance in when trip, the time of waiting for bus with minimizing.Secondly the application on aspect the digitizing military commanding,, and, by the nearest comrade-in-arms of whois lookup distance oneself, fight by the position of wireless localization apparatus to server real-time report oneself jointly such as a soldier.In the managerial application of crowd, while for example a travel party, travelling, the guide sends a continuous range query visitor around it is continued monitoring, thereby avoids scattering of visitor again.The finally application on aspect mobile e-business, for example a market can be by the situation of mobile object in a kilometer range around the server real-time monitoring market, send the various information on services in this market, preferential action message to them, to attract some potential customers.
In recent years, in the spatial database research field, k nearest neighbor (KNN) search algorithm is a research emphasis and focus.Arest neighbors search algorithm based on Euclidean distance is to equal the nineteen ninety-five proposition by Roussopoulos the earliest.The R tree ergodic algorithm that the author uses branch to define, propose two distance metrics (being mindist and minmaxdist) and three heuristic rules and filtered the node that does not comprise nearest-neighbors, thereby reduce node access number, reduce magnetic disc i/o, and then effectively improve query performance.
Subsequently, the people such as Kom have developed the arest neighbors search algorithm of a multi-step, and this algorithm obtains final Query Result by the Multiple-Scan data set.The people such as Berchtold have inquired into the arest neighbors search algorithm based on Voronoi cells.Seidl and Kriegel have proposed a kind of multi-step k arest neighbors inquiry processing method of the best, and with a large amount of algorithm performances that they propose that experimental results show that, greatly are better than the previous arest neighbors search algorithm that oneself has.Cheung etc. further improve this algorithm, in the situation that guarantee beta pruning efficiency, have removed two kinds and can not strengthen the beta pruning effect and have again the prune rule of high computation complexity, have reduced the CPU calculation cost.Hjaltson etc. have proposed a kind of search algorithm of arest neighbors based on BF and have minimized the I/O cost, used the method for PMR-tree quaternary tree index structure in conjunction with Priority Queues, the method does not need to travel through all objects while making inquiry, by utilizing Pruning strategy to improve search efficiency, and according to the characteristic of Priority Queues, k nearest neighbor efficiency is higher for searching.
Kolahdouzan etc. have proposed a kind of VN3 method that solves KNN inquiry in the spatial network database.This method estimates to calculate network Voronoi polygon (NVPs) and some network distances of impact point.Yet in the situation that the NNs number that needs are searched increases and the impact point number increases, in VN3, the precomputation of NVPs needs huge calculating cost.Therefore, be in highdensity situation at impact point, the efficiency of VN3 will greatly be degenerated.
Bx-Tree is a kind of B for transfer point that Christian S.Jensen etc. proposed in 2004 +-tree index structure.This index structure uses B +-tree is as basic index structure, and B +-tree is the one dimension index, and the index structure that zone covers require be minimum be two position index structures.Therefore at first Bx-Tree carries out the grid division to space, then uses the Hilbert curve to encode to grid, and two-dimensional grid just can use B like this +-Tree carries out index to it.During Bx-Tree index mobile object, not the position of index object, but use a linear function to replace the movement of object, guarantee minimum renewal once within a period of time.B +-Tree safeguards three stalk trees simultaneously, to guarantee the accuracy of result.
The people such as Su Chen and Beng Chin Ooi have improved Bx-Tree tree index structure in 2008, proposed ST 2The B structure.ST 2The B tree is a kind of from adjustable mobile object B +The tree index structure, at first in time, ST 2The B tree is with bottom B +Tree is divided into two stalk tree BT 0And BT 1, each mobile object carries out index according to the corresponding subtree of selection of time of upgrading, and wherein two stalk trees are along with the time-interleaved mobile object management that carries out; Secondly spatially,, according to the distribution of mobile object in zone, choose one with reference to point set according to the difference of density, and according to reference point Voronoi piece, piecemeal is carried out in zone, then choose different grid granularity division at different piecemeals mobile object is carried out index, for based on ST 2The arest neighbors querying method of B tree, what take is continuous expanded scope inquiry radius, until the mobile object number in query region meets the condition of arest neighbors inquiry, the shortcoming of method is to adopt constantly to call the range query algorithm, time cost is larger.
Summary of the invention
, for overcoming the deficiency of said method, the present invention proposes a kind of k nearest Neighbor that covers based on zone.It has fully utilized Voronoi figure and two kinds of index structures of four minutes tree VGQ of virtual grid, utilize simultaneously Hash table to have the characteristics of fast finding location, the data message that some are important leaves in Hash table, with Search and Orientation easily and fast, thereby has improved the efficiency of inquiry.
VGQ (Virtual Grid Quadtree) is four minutes trees of virtual grid, it is the advantage in conjunction with four minutes trees of grid file, compression and the higher three kinds of index technologies of Hash structure of search efficiency, a kind of Mobile Objects Index structure that covers based on zone of formation.At first use grid that subdivision is carried out in space, form a lot of little zones, mobile object just is distributed in these zonules.Processing to these grids is the index structure that adopts four minutes trees of compression, compress four minutes tree (Compressed Quadtree) be improvement on the basis of basic four minutes of tradition tree, its main thought is when setting up index, four minutes are set the spatial index node deletion of redundancy in index and fall, to improve the utilization factor of internal memory.Then with Hash table, further improve search efficiency.Voronoi figure, according to each position of element in object set, is divided into many unit areas to area of space, i.e. the Voronoi zone.A Voronoi zone is one to one with its formation object, and non-overlapping copies between different Voronoi zones, and this has just formed a division in space.The advantage of Voronoi figure is can be the distribution of a space according to object in space, and object is coupled to the shape structure of throwing the net, and makes the traversal between object and object become very convenient.
The Vor-VGQ structure is the index structure of Voronoi figure and VGQ combination.At first space is carried out grid and divide, data point is kept in corresponding grid, then the leafy node of grid as four minutes trees is stored, and simultaneously grid is kept in Voronoi figure as a mobile object.At first find the grid at its place according to the coordinate of object when inquiring about, further find the position of this grid in Voronoi figure, object in this grid is organized into chained list as a result according to the ascending order of distance, according to Voronoi figure, adjacent grid is put into the access chained list by the ascending order of distance simultaneously, then carry out the comparison of distance, finally find K arest neighbors of this object.
The k nearest Neighbor that covers based on zone comprises the following steps:
Step 1: typing personnel positions information, method is: each object is the current coordinate of report oneself upwards, determines search space;
Step 2: search space is divided into grid;
At first whole search space is divided into M * N Virtual space grid cell, wherein, M represents sidewards space to be divided into M part, and N represents endways space to be divided into N part, as shown in Figure 1;
For a grid id at p (x, y) place, computing formula is as follows:
px=(int)x/hX
py=(int)y/hY
id=px+py×divX+1
In formula, x and y represent horizontal ordinate and the ordinate of a p, and hX and hY represent respectively horizontal width and the vertical height of grid cell, and divX represents grid file division number in the horizontal direction;
Step 3: mobile object is carried out index;
Be each space lattice cell abstract that a point in space carries out index, to be the management of grid cell to the management transitions of dynamic mobile object, namely only index is carried out in the zone that has mobile object, index is not carried out in the zone that does not have mobile object, set up the index concrete grammar and be:
, for each the space lattice unit after dividing,, if there is mobile object in the grid inner region, this space lattice unit is inserted in four minutes trees of compression; If its inside does not have mobile object, this grid necessary being not, wherein compress the structure of four minutes trees as shown in Fig. 2 (b); Meanwhile, set up Voronoi figure with the central point of each grid, as Fig. 3 (a) with (b), the Incremental Construction method is mainly adopted in the foundation of Voronoi figure, thereby met index structure needs of the present invention, uses the demand of the variation of four minutes trees of Voronoi figure dynamic memory; The foundation of index as shown in Figure 4;
Index is set up process and is related to following three kinds of operations:
(1) update; When mobile object newly occurs, mobile object abstract be a point,, by the mesh mapping formula, draw its place grid id, then by hash, show to obtain the actual grid address, find grid,
If this grid Already in index, inserts some chained list back corresponding to this grid to new point, in grid, the number of point adds 1;
If do not find this grid in the hash table, namely still there is no mobile object in this grid, apply for that an allocation of space is to mesh object, mesh object registration in the hash table, the head pointer that while is made a some chained list to this point is linked this grid, in grid, the number of point adds 1, this grid inserts corresponding position as the leaf node of four minutes trees, the central point of leaf node is as the representative of leaf node, call increment function in Voronoi figure object, the representative point of leaf is inserted in graph structure;
(2) deletion action; When an object disappears from search space, this object of deletion from Vor-VGQ,
If represent that the point of mobile object is the unique point in grid, after deleting this point, there is no object in grid, the Delete Mesh object, delete the leaf node object, deletes simultaneously point corresponding in Voronoi figure;
If represented that the point of mobile object is not the unique point in grid, need to delete corresponding object in the millet cake chained list after grid, then the number of putting in grid is deducted 1 and get final product;
(3) move operation:
When moving in the grid of the some P of mobile object representative at own place, only need to find this mobile object in the some chained list in this grid, simultaneously the positional information of this mobile object is revised and got final product;
When the P point moves between grid, minute following four kinds of situations:
The first situation: when a P shifted out this grid, in this grid, still a little, and the new grid that moves to of P point was original just exists, delete this point on the some chained list in old dot grid, counting in old grid subtracts 1, inserts this point in the some chained list in new grid, and counting in new grid adds 1;
The second situation: the old grid of transfer point only has a point, when point shifts out this grid, grid lost efficacy, originally do not exist with stylish grid, need to set up new grid during immigration: at first process old grid, to put in old net point chained list and delete, then delete old grid, delete four minutes leaf nodes, then delete corresponding node in Voronoi figure, for new grid, need space of first to file to new grid, then insertion point chained list, put number and be set to 1, then in four minutes trees, insert this leafy node, add finally corresponding node in Voronoi figure;
The third situation: the old grid of transfer point P only has a point, when point shifts out this grid, grid lost efficacy, and new grid exists originally: will put and delete in old net point chained list, then delete old grid, delete four minutes leaf nodes, then delete corresponding node in Voronoi figure, insert this point in some chained list in new grid, counting in new grid adds 1;
The 4th kind of situation: the more than point of the old grid of transfer point, originally do not exist with stylish grid, need to set up new grid during immigration: this point of deletion on the some chained list in old dot grid, counting in old grid subtracts 1, need space of first to file to new grid for new grid, then the insertion point chained list, put number and be set to 1, then insert this leafy node in four minutes trees, add finally corresponding node in Voronoi figure.
Step 4: set the index structure that combines with Voronoi figure in four minutes according to the virtual grid that covers based on zone, carry out the k nearest neighbor inquiry, specifically carry out as follows:
Mobile object is initiated the k NN Query, and object is considered as a P,
Step 4.1:, by the grid id of formula calculation level P, obtained the address of this leafy node by the hash table, can obtain corresponding address in Voronoi figure;
Step 4.2: the data in leafy node, according to a size of P distance, putting into chained list resultList as a result, are recorded resultList chained list length;
Step 4.3: the leaf node of current accessed adjacent node in Voronoi figure is inserted in access chained list visitList according to the order near far away to the query point distance;
Step 4.4: if resultList length, less than K,, according to the sequential access next node in the access chained list, is put into the resultList chained list with the point in leafy node; Repeating step 4.3;
Step 4.5: if resultList length equals K; Recording this moment is pDis from query point distance farthest in the resultList chained list;
Step 4.6: if the distance of the next node Distance query point of the order in the access chained list is accessed next node less than or equal to pDis;
Step 4.7: the point in grid corresponding to scanning access node, it is compared together with the resultList mid point, replace, keep the nearest K of Distance query point wherein individual in resultList;
Step 4.8: the leaf node of current accessed adjacent node in Voronoi figure is inserted in the access chained list according to the order near far away to the query point distance; Repeating step 4.5;
Step 4.9: finish.
In this algorithm, K refers to the neighbour's number that will inquire about, id refers to the numbering of grid, and hash refers to Hash table, and what resultList deposited is the intermediate result that satisfies condition, what visitList deposited is the adjacent node that will access, and pDis refers in the resultList chained list from query point distance farthest.
Beneficial effect: set and the Voronoi graph structure in four minutes in conjunction with grid file, compression, complete the k NN Query that covers based on zone.Obtain the processing speed of similar grid by grid file in conjunction with four minutes tree index structures of compression, can save the primary memory space, significantly sacrificing search index performance neither, improved again the utilization factor of internal memory.And Voronoi figure neighbor relationships is more clear, inquires about more convenient.Simultaneously the method is compared search efficiency and is significantly improved and provides farthest fast result accurately for each inquirer with existing method.
Description of drawings
Fig. 1 the present invention is based on the k nearest Neighbor space lattice division schematic diagram that zone covers;
Common four minutes tree schematic diagram of k nearest Neighbor that Fig. 2 (a) covers for the present invention is based on zone;
Four minutes tree schematic diagram of k nearest Neighbor compression that Fig. 2 (b) covers for the present invention is based on zone;
The k nearest Neighbor network area covering schematic diagram that Fig. 3 (a) covers for the present invention is based on zone;
Fig. 3 (b) is for the present invention is based on the Voronoi graphic structure schematic diagram of the regional k nearest Neighbor that the covers virtual grid corresponding with Fig. 3 (a);
Fig. 4 is that the k nearest Neighbor index structure that the present invention is based on the zone covering is set up the process schematic diagram;
Fig. 5 the present invention is based on 20 soldier planimetric position schematic diagram of k nearest Neighbor that zone covers;
Fig. 6 the present invention is based on the k nearest Neighbor space lattice division schematic diagram that zone covers;
Fig. 7 the present invention is based on Voronoi figure corresponding to k nearest Neighbor that zone covers;
Fig. 8 the present invention is based on the k nearest Neighbor process flow diagram that zone covers.
Embodiment
Below in conjunction with drawings and Examples, the present invention is described in further detail.
The hardware environment that the present embodiment adopts is: one of IBM server, CPU Xeon EM64T Quad core E5405 (2.0GHz 12MB L21333MHz 80w, internal memory 16G Bytes DDR RAM,
Software environment: operating system: CentOS 5.2; Developing instrument: GNU Toolkits (GCC, G++, GDB), Make, Vim, SVN etc.; Development language: standard C ++ language;
For be the situation that has a large amount of soldiers to enter a war on battlefield, the present embodiment is only take 20 soldiers as example, the k nearest Neighbor based on zone covers comprises the following steps:
Step 1: each soldier is the current coordinate of report oneself upwards, and determine the space, battlefield: require the soldier with the orientation and communication device, upload position and the inquiry request of oneself, as shown in Figure 5, the position coordinates that the soldier reports is as shown in table 1 in soldier's distribution:
Table 1 soldier position coordinates
Figure BDA0000077479770000061
Figure BDA0000077479770000071
Step 2: be the battlefield spatial division grid, as shown in Figure 6.
The battlefield spatial division is become 16 grids of 4 * 4, utilize formula id=px+py * divX+1 to calculate the id of each grid, as shown in Figure 6, hX=4000, hY=1000, thereby the grid id that calculates from left to right, is 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 from the bottom up successively;
Step 3: the soldier is carried out index:
Deposit each soldier's data in index, as shown in Figure 6, in the present embodiment, a root node is arranged, the child node of four ground floors, the 3rd layer is leafy node, in actual grid 1,3,4,10 and 16, these five grids do not have a little, do not carry out index, therefore only have 11 actual grid, be 11 leaves, the information of 20 soldiers just is stored in the leafy node the inside, and these 11 leaves are set up Voronoi figure, as shown in Figure 7, thus whole index structure is set up;
Step 4:Vor-VGQ Knn (Point P) algorithm carries out the KNN NN Query, and method is:
Take the arest neighbors of searching No. 5 soldiers as example, at first obtain grid id according to its coordinate, the present embodiment id is 7, obtained the address of grid by four minutes trees of the compression of previous foundation and Voronoi index of the picture structure, and then obtain its corresponding address in Voronoi figure, the distance of i.e. No. 4 and No. 8 to No. 5 of the data of this leaf node is inserted in the resultList chained list by ascending order.This moment, chained list length was 2, greater than 1, then record No. 5 points to No. 4, joint of the chain tail must apart from and deposit in pDis.Calculate No. 5 soldiers to the distance of peripheral leaf node and with pDis relatively, less than checking its inner point, greater than directly skipping, until on every side not to the distance of No. 5 point less than pDis; The process flow diagram of Vor-VGQKnn (Point P) algorithm as shown in Figure 8.
Step 5: obtaining net result, is obviously the arest neighbors that No. 8 soldiers are No. 5 soldiers.

Claims (1)

1. a k nearest Neighbor that covers based on zone, is characterized in that: comprise the steps:
Step 1: typing personnel positions information, method is: each soldier is the current coordinate of report oneself upwards, determines the space, battlefield;
Step 2: be the battlefield spatial division grid cell;
At first whole battlefield spatial division is divided into M * N virtual grid cell, wherein M represents sidewards the space, battlefield to be divided into M part, and N represents endways the space, battlefield to be divided into N part, and for a grid cell id at p (x, y) place, computing formula is as follows:
px=(int)(x/hX)
py=(int)(y/hY)
id=px+py×divX+1
In formula, id is the numbering of grid cell, x and y represent horizontal ordinate and the ordinate of a p, hX and hY represent respectively horizontal width and the vertical height of grid cell, divX represents grid cell file division number in the horizontal direction, the operation result type conversion of the expression formula that (int) expression will modify is integer type, namely the numerical result of the expression formula of modifying is rounded numerical value;
Step 3: the soldier is carried out index;
Be each battlefield space lattice cell abstract that a point in the space, battlefield carries out index, it will be the grid cell management to the soldier's of dynamic mobile management transitions, namely only index is carried out in the zone that has mobile soldier, index is not carried out in the zone that does not have the soldier, the concrete grammar of setting up index is: to each the space lattice unit, battlefield after dividing, if there is the soldier in the grid cell inner region, this grid cell is inserted into the compression four minutes the tree in; If this grid cell inside does not have the soldier, this grid cell necessary being not; Meanwhile, the method that adopts Incremental Construction is set up Voronoi figure with the central point of the grid cell that has the soldier;
Relate to following three kinds of operations in described process of the soldier being carried out index:
(1) update; When the soldier newly occurs, this soldier abstract as mobile object be a point,, by the mesh mapping formula, draw its place grid cell id, then by hash, show to obtain the actual grid element address, find grid cell,
If this grid cell Already in index, inserts some chained list back corresponding to this grid cell to new point, in grid cell, the number of point adds 1;
If do not find this grid cell in the hash table, namely still there is no mobile object in this grid cell, apply for that an allocation of space is to the grid cell object, the registration in the hash table of grid cell object, the head pointer that while is made a some chained list to this point is linked this grid cell, in grid cell, the number of point adds 1, this grid cell inserts corresponding position as the leafy node of four minutes trees, the central point of leafy node is as the representative of leafy node, call increment function in Voronoi figure object, the representative point of leafy node is inserted in graph structure;
(2) deletion action; When an object disappears from battlefield, this object of deletion from index,
If represent that the point of mobile object is the unique point in grid cell, after deleting this point, there is no object in grid cell, the Delete Mesh unit object, delete the leafy node object, deletes simultaneously point corresponding in Voronoi figure;
If represent that the point of mobile object is not the unique point in grid cell, need to delete corresponding object in some chained list corresponding to grid cell, then the number of putting in grid cell is deducted 1 and get final product;
(3) move operation:
When moving in the grid cell of the transfer point P of mobile object representative at own place, only need to find this mobile object in the some chained list in this grid cell, simultaneously the positional information of this mobile object is revised and got final product;
When transfer point P moves between grid, minute following four kinds of situations:
The first situation: when transfer point P shifts out this grid cell, in this grid cell still a little, and the new grid cell that transfer point P moves to is original just to be existed, delete this transfer point P on the some chained list in old grid cell, counting in old grid cell subtracts 1, insert this transfer point P in some chained list in new grid cell, counting in new grid cell adds 1;
the second situation: the old grid cell of transfer point only has a transfer point P, when transfer point P shifts out this grid cell, grid cell lost efficacy, originally do not exist with stylish grid cell, need to set up new grid cell during immigration: at first process old grid cell, transfer point P is deleted in old grid cell point chained list, then delete old grid cell, delete four minutes leaf nodes, delete again corresponding node in Voronoi figure, need space of first to file to new grid cell for new grid cell, then insertion point chained list, put number and be set to 1, then insert this leafy node in four minutes trees, add finally corresponding node in Voronoi figure,
The third situation: the old grid cell of transfer point P only has a point, when point shifts out this old grid cell, grid cell lost efficacy, and new grid cell exists originally: transfer point P is deleted in old grid cell point chained list, then delete old grid cell, delete four minutes leaf nodes, then delete corresponding node in Voronoi figure, insert this transfer point P in some chained list in new grid cell, counting in new grid cell adds 1;
The 4th kind of situation: the more than point of the old grid cell of transfer point P, originally do not exist with stylish grid cell, need to set up new grid cell during immigration: this transfer point of deletion P on the some chained list in old grid cell, counting in old grid cell subtracts 1, need space of first to file to new grid cell for new grid cell, then the insertion point chained list, put number and be set to 1, then insert this leafy node in four minutes trees, add finally corresponding node in Voronoi figure;
Step 4: set according to the virtual grid that covers based on zone the index structure that combines with Voronoi figure in four minutes, the soldier is carried out the k nearest neighbor inquiry, specifically carry out as follows:
The soldier initiates the k NN Query, and the soldier is considered as transfer point P,
Step 4.1: calculate the grid id of transfer point P by formula, obtained the address of this transfer point P place grid cell by the hash table, can obtain corresponding address in Voronoi figure;
Step 4.2: the data in leafy node are put into chained list resultList as a result according to the size to transfer point P distance, record resultList chained list length;
Step 4.3: the leafy node of current accessed adjacent node in Voronoi figure is inserted in access chained list visitList according to the order near far away to the query point distance;
Step 4.4: if resultList length, less than K,, according to the sequential access next node in the access chained list, is put into the resultList chained list with the point in leafy node; Repeating step 4.3;
Step 4.5: if resultList length equals K; Recording this moment is pDis from query point distance farthest in the resultList chained list;
Step 4.6: if the distance of the next node Distance query point of the order in the access chained list is accessed next node less than or equal to pDis;
Step 4.7: the mobile object in grid cell corresponding to scanning access node, it is compared together with mobile object in resultList, replace, keep the nearest K of Distance query point wherein individual in resultList;
Step 4.8: the leafy node of current accessed adjacent node in Voronoi figure is inserted in the access chained list according to the order near far away to the query point distance; Repeating step 4.5;
Step 4.9: finish;
Step 5: obtain k NN Query result, obtain the soldier's that will search k arest neighbors.
CN2011102063919A 2011-07-21 2011-07-21 K-nearest neighbor searching method based on regional coverage Active CN102289466B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011102063919A CN102289466B (en) 2011-07-21 2011-07-21 K-nearest neighbor searching method based on regional coverage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011102063919A CN102289466B (en) 2011-07-21 2011-07-21 K-nearest neighbor searching method based on regional coverage

Publications (2)

Publication Number Publication Date
CN102289466A CN102289466A (en) 2011-12-21
CN102289466B true CN102289466B (en) 2013-11-13

Family

ID=45335893

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011102063919A Active CN102289466B (en) 2011-07-21 2011-07-21 K-nearest neighbor searching method based on regional coverage

Country Status (1)

Country Link
CN (1) CN102289466B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102665164B (en) * 2012-03-14 2014-11-05 杭州电子科技大学 Nearest neighbor detection method for moving object
CN103235831B (en) * 2013-05-15 2016-08-10 西南大学 Mobile object location index structure based on road network and indexing means
CN103559209B (en) * 2013-10-10 2016-08-17 河南大学 A kind of efficient spatial K-NN search method that Voronoi Diagram is combined with virtual grid
CN104699692B (en) * 2013-12-04 2018-06-15 华为技术有限公司 A kind of method and apparatus for handling data
CN103995871B (en) * 2014-05-22 2017-04-12 东北大学 Approximate massive address data nearest neighbor query method
CN104392280B (en) * 2014-08-14 2018-05-22 成都边界元科技有限公司 Find the 2- quadtree approach for closely moving target
CN106528773B (en) * 2016-11-07 2020-06-26 山东联友通信科技发展有限公司 Map computing system and method based on Spark platform supporting spatial data management
CN106649821B (en) * 2016-12-29 2020-04-03 郑州星途信息科技有限公司 Spatial target index construction, collision early warning, region and nearest neighbor query method
CN107126702B (en) * 2017-04-20 2020-08-25 杭州游聚信息技术有限公司 Generation method of 3D game random map
CN107169372B (en) * 2017-05-10 2020-04-14 东南大学 Privacy protection query method based on Voronoi polygon and Hilbert curve coding
CN107357871B (en) * 2017-07-04 2020-08-11 东北大学 Storm-oriented continuous range query load balancing method based on feedback
WO2019014808A1 (en) * 2017-07-17 2019-01-24 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for spatial index
CN109173253A (en) * 2018-11-21 2019-01-11 北京像素软件科技股份有限公司 Game role position decision method and device
US20220188365A1 (en) * 2019-04-12 2022-06-16 Grabtaxi Holdings Pte. Ltd. Distributed in-memory spatial data store for k-nearest neighbour search
CN110287392B (en) * 2019-06-20 2022-12-23 沈阳航空航天大学 Safe space network query method based on safe partition tree
CN111538725B (en) * 2020-03-19 2023-02-07 中国测绘科学研究院 Nearest rapid search method and system for ten million-level point-like elements
CN111723096B (en) * 2020-06-23 2022-08-05 重庆市计量质量检测研究院 Spatial data indexing method integrating GeoHash and Quadtree
CN114820869A (en) * 2022-05-11 2022-07-29 中南大学 Incomplete scatter diagram overlap removing method
CN116862530B (en) * 2023-06-25 2024-04-05 江苏华泽微福科技发展有限公司 Intelligent after-sale service method and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073689A (en) * 2010-12-27 2011-05-25 东北大学 Dynamic nearest neighbour inquiry method on basis of regional coverage

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073689A (en) * 2010-12-27 2011-05-25 东北大学 Dynamic nearest neighbour inquiry method on basis of regional coverage

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
分组移动对象的区域偏离监视算法;李佳佳等;《Journal of Frontiers of Computer Science and Technology》;20100930;全文 *
利用覆盖区域设计与实现移动对象索引;王波涛等;《Journal of Frontiers of Computer Science and Technology》;20100131;全文 *
李佳佳等.分组移动对象的区域偏离监视算法.《Journal of Frontiers of Computer Science and Technology》.2010,
王波涛等.利用覆盖区域设计与实现移动对象索引.《Journal of Frontiers of Computer Science and Technology》.2010,

Also Published As

Publication number Publication date
CN102289466A (en) 2011-12-21

Similar Documents

Publication Publication Date Title
CN102289466B (en) K-nearest neighbor searching method based on regional coverage
CN102073689B (en) Dynamic nearest neighbour inquiry method on basis of regional coverage
CN106528773B (en) Map computing system and method based on Spark platform supporting spatial data management
CN103473248B (en) A kind of continuous moving K-nearest neighbor query method under road network environment
CN102567497B (en) Inquiring method of best matching with fuzzy trajectory problems
CN105956165B (en) A kind of big file storage organization method of the tile type of three-dimensional modeling data
CN106528815B (en) A kind of road network mobile object probability Aggregation Query method and system
CN102646070A (en) Space-time trajectory data storage method based on area
CN106933833A (en) A kind of positional information method for quickly querying based on Spatial Data Index Technology
CN110070121A (en) A kind of quick approximate k nearest neighbor method based on tree strategy with balance K mean cluster
CN109492060A (en) A kind of map tile storage method based on MBTiles
CN108628951A (en) Spatial data massive texture storage based on document model and abbreviation compression method
Du et al. Spatio-temporal data index model of moving objects on fixed networks using hbase
CN108009265B (en) Spatial data indexing method in cloud computing environment
CN113589753B (en) Three-dimensional model surface path planning method, system and equipment
CN101916301B (en) Three-dimensional spatial data adaptive pre-scheduling method based on spatial relationship
CN116860905B (en) Space unit coding generation method of city information model
CN104346444A (en) Optimum site selection method based on road network reverse spatial keyword query
CN104951464A (en) Data storage method and system
CN106991149A (en) A kind of magnanimity spatial object storage method for merging coding and multi-edition data
CN114048204A (en) Beidou grid space indexing method and device based on database inverted index
CN102012908B (en) Method for inquiring visible moving neighbours objects in environment with barriers
KR20170016168A (en) Tile-based map data updating system and method thereof
CN112866992B (en) Position privacy protection method and system
CN105138607A (en) Hybrid granularity distributional memory grid index-based KNN query method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant