CN106649359A - Spatial point data processing method and apparatus - Google Patents

Spatial point data processing method and apparatus Download PDF

Info

Publication number
CN106649359A
CN106649359A CN201510729274.9A CN201510729274A CN106649359A CN 106649359 A CN106649359 A CN 106649359A CN 201510729274 A CN201510729274 A CN 201510729274A CN 106649359 A CN106649359 A CN 106649359A
Authority
CN
China
Prior art keywords
grid
data
spatial point
query context
query
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.)
Granted
Application number
CN201510729274.9A
Other languages
Chinese (zh)
Other versions
CN106649359B (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.)
BEIJING HANLINXINTONG INFORMATION TECHNOLOGY CO LTD
Original Assignee
Founder International Co Ltd
Founder International Beijing Co Ltd
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 Founder International Co Ltd, Founder International Beijing Co Ltd filed Critical Founder International Co Ltd
Priority to CN201510729274.9A priority Critical patent/CN106649359B/en
Publication of CN106649359A publication Critical patent/CN106649359A/en
Application granted granted Critical
Publication of CN106649359B publication Critical patent/CN106649359B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a spatial point data processing method and apparatus, which is used for storing spatial point data in a mode of statically dividing grid numbers so as to improve data storage efficiency, and is suitable for massive data storage. The spatial point data processing method provided by the invention comprises the steps of determining a grid range according to a range of coordinates of known spatial points, determining a grid level according to the number of the known spatial points, and generating a grid system according to the grid range and the grid level, wherein the grid system comprises a plurality of grids; for the coordinates of each known spatial point, determining the grid number corresponding to the known spatial point in the grid system according to the coordinates of the known spatial point; and storing data of each known spatial point in the grid of the corresponding grid number in the grid system.

Description

A kind of processing method and processing device of space point data
Technical field
The present invention relates to technical field of data processing, more particularly to a kind of processing method and dress of space point data Put.
Background technology
As mankind's activity can be produced and the data volume that captures expands year by year, when the mankind enter big data Generation.This coordinate point data to be characterized comprising longitude and latitude field, such as gps data is static geographical Position element coordinate points data etc., data class and amount have also obtained unprecedented growth.With building for the whole nation The coordinate points data instance in thing, place etc. is built, several hundred million may be just reached.In the face of the data of such magnanimity, Traditional relevant database, even if setting up the joint index of latitude and longitude coordinates, its spatial dimension inquiry response Time can also reach tens of seconds sometimes;And emerging many NoSQL storehouses, although solve generic mass The problem of attribute data access performance, but for this spatial data, due to wherein to big multipair SQL Do not support, if concordance list cannot correctly be set up, when spatial dimension is inquired about, can also face data scanning Scope is excessive, single function, cannot paging the problems such as.
Vector data elder generation sequence quadtree coding in prior art based on Key/Value type NoSQL databases Include with indexing means:It is related to a kind of vector data elder generation sequence based on Key/Value type NoSQL databases Quadtree coding and indexing means, this method makes Data Physical storage order and spatial dimension continuity one Cause, data major key order are consistent with physical store order, so as to I/O operation can be reduced in space querying, Improve search efficiency.This method comprises the steps:Completely quaternary tree space divides and first sequence quaternary tree knot Point coding;Vector data prefix code and index construct;First sequence quaternary tree index.
But, prior art is using the side that the scheme that quaternary tree stores point data is all a kind of " from top to bottom " Formula, i.e., with the write of point data, dynamic grid division, different grids are located at different ranks.This The shortcoming that sample does is:
The situation of total data is disposably taken out for range query, it is difficult to be converted to multiple random write few The continuous reading of amount number of times, when query context is larger, what performance can be suitable is low;
During write space point data, due to the presence that grid dynamic is divided, existing data can be at any time changed, Performance can be caused relatively low, in the case of distributed, in addition it is also necessary to which overhead ensures its consistency;
The mode of random grid is taken during page turning, it is difficult to ensure the stability of page turning.For only needing to take every time Go out the situation of low volume data, if directly carrying out paging to the data taken out according to original method, may produce Following two adverse consequences of life:First, assume, in the case where data volume is excessive, once all to take out data, Again in the mode of objective end paging, internal memory may be caused to overflow;If before the 2, being taken out using the restriction of database The mode of n datas, it is caused as a result, when inquiry model because data are stored according to grid numbering When enclosing larger, the Data Entry taken out per one page is to concentrate on the point in the range of a very little, and this is for ground Figure is unacceptable for spreading a little.
In sum, according to the quantity of spatial point, dynamic grid division in prior art, therefore data are caused Storage efficiency is relatively low, is not suitable for mass data storage.
The content of the invention
A kind of processing method and processing device of space point data is embodiments provided, to draw by static The data of the mode memory space point of subnetting lattice numbering, so as to improve data storage efficiency, it is adaptable to magnanimity number According to storage.
A kind of processing method of space point data provided in an embodiment of the present invention, including:
Scope according to residing for the coordinate of known spatial point, determines grid scope, and according to known spatial point Quantity, determines grid rank, and according to the grid scope and grid rank grid system, the grid system are generated System includes multiple grids;
For the coordinate of each known spatial point, according to the coordinate of the known spatial point, it is determined that in the grid The corresponding grid numbering of the known spatial point in system;
By the net of data Cun Chudao of each known spatial point corresponding grid numbering in the grid system In lattice.
With it, the scope according to residing for the coordinate of known spatial point, grid scope is determined, and according to The quantity of known spatial point, determines grid rank, and according to the grid scope and grid rank grid system is generated System, the grid system includes multiple grids;For the coordinate of each known spatial point, according to the known sky Between the coordinate put, it is determined that the known spatial point corresponding grid numbering in the grid system;By it is each In knowing the data Cun Chudao grid that corresponding grid is numbered in the grid system of spatial point, therefore realize The data of memory space point by way of static division grid is numbered, so as to improve data storage effect Rate, it is adaptable to mass data storage.
It is preferred that the method also includes:
According to query context, it is determined that needing the grid inquired about in the grid system;
The data of the spatial point to storing in the grid for needing and inquiring about are inquired about, and determine Query Result.
It is preferred that according to query context, it is determined that the grid inquired about is needed in the grid system, concrete bag Include:According to query context, it is determined that the grid intersected with the query context in the grid system and the inquiry The grid that scope is completely covered;
The data of the spatial point to storing in the grid for needing and inquiring about are inquired about, and determine Query Result, Specifically include:The spatial point of the grid memory storage that the query context in the grid system is completely covered Data are used as Query Result;And, in the grid intersected with the query context in the grid system The data of the spatial point of storage, filter the data of the spatial point for being not belonging to the query context, by remaining sky Between put data as Query Result.
It is preferred that it is described according to query context, it is determined that intersect with the query context in the grid system Before the grid that grid and the query context are completely covered, the method also includes:According to the size of query context, The rank of the grid system is simplified so that the number networks in the grid system are reduced;
It is described according to query context, it is determined that the grid intersected with the query context in the grid system and should The grid that query context is completely covered, specifically includes:According to query context, it is determined that grid system after simplification The grid that the grid and the query context intersected with the query context in system is completely covered;
The spatial point of the grid memory storage that the query context in the grid system is completely covered Data are used as Query Result;And, in the grid intersected with the query context in the grid system The data of the spatial point of storage, filter the data of the spatial point for being not belonging to the query context, by remaining sky Between put data as Query Result, specifically include:The query context in grid system after simplification is complete The data of the spatial point of the grid memory storage of all standing are used as Query Result;And, for net after simplification The data of the spatial point of the grid memory storage intersected with the query context in case system, filter and are not belonging to described looking into The data of the spatial point of scope are ask, using the data of remaining spatial point as Query Result.
According to the size of query context, dynamic lifts the grade of (simplification) grid numbering to the present invention, so as to reach Realize to inquiry is simplified, improve the purpose of search efficiency.
It is preferred that it is described according to query context, it is determined that intersect with the query context in the grid system After the grid that grid and the query context are completely covered, the method also includes:According to the determination in institute The grid that the grid that intersects with the query context in grid system and the query context are completely covered is stated, to described The grid of grid system is merged, and determines the numbering of the grid after merging;
The spatial point of the grid memory storage that the query context in the grid system is completely covered Data are used as Query Result;And, in the grid intersected with the query context in the grid system The data of the spatial point of storage, filter the data of the spatial point for being not belonging to the query context, by remaining sky Between put data as Query Result, specifically include:The query context in grid system after merging is complete The data of the spatial point of the grid memory storage of all standing are used as Query Result;And, for net after merging The data of the spatial point of the grid memory storage intersected with the query context in case system, filter and are not belonging to described looking into The data of the spatial point of scope are ask, using the data of remaining spatial point as Query Result.
The present invention is merged by the grid to grid system, and so as to reach inquiry realization is simplified, The purpose of search efficiency is improved, can further reduce reading expense during data.
It is preferred that the process that the data of the spatial point to storing in the grid for needing and inquiring about are inquired about In, page of data is inquired about every time, the spatial point stored in the grid of multiple non-consecutive numberings is included per page data Data.
The present invention passes through the page turning strategy, it is possible to achieve homogenization map spreads a little so that the result of inquiry is in net Distribution on lattice is more uniform.
A kind of processing meanss of space point data provided in an embodiment of the present invention, including:
First module, for the scope residing for the coordinate according to known spatial point, determines grid scope, and root According to the quantity of known spatial point, grid rank is determined, grid is generated according to the grid scope and grid rank System, the grid system includes multiple grids;
Second unit, for for the coordinate of each known spatial point, according to the coordinate of the known spatial point, It is determined that the corresponding grid of the known spatial point is numbered in the grid system;
Unit the 3rd, for data Cun Chudao of each known spatial point are corresponding in the grid system In the grid of grid numbering.
It is preferred that the device also includes Unit the 4th, it is used for:
According to query context, it is determined that needing the grid inquired about in the grid system;
The data of the spatial point to storing in the grid for needing and inquiring about are inquired about, and determine Query Result.
It is preferred that Unit the 4th specifically for:
According to query context, it is determined that the grid intersected with the query context in the grid system and the inquiry The grid that scope is completely covered;
The data of the spatial point of the grid memory storage that the query context in the grid system is completely covered As Query Result;And, for the grid memory storage intersected with the query context in the grid system Spatial point data, the data of the spatial point for being not belonging to the query context are filtered, by remaining spatial point Data as Query Result.
It is preferred that Unit the 4th specifically for:
According to the size of query context, the rank of the grid system is simplified so that the grid system The number networks in system are reduced;
According to query context, it is determined that the grid intersected with the query context in grid system after simplification and should The grid that query context is completely covered;
The spatial point of the grid memory storage that the query context in grid system after simplification is completely covered Data are used as Query Result;And, for the net intersected with the query context in grid system after simplification The data of the spatial point of lattice memory storage, filter the data of the spatial point for being not belonging to the query context, by residue Spatial point data as Query Result.
It is preferred that Unit the 4th specifically for:
According to query context, it is determined that the grid intersected with the query context in the grid system and the inquiry The grid that scope is completely covered;
According to the grid intersected with the query context in the grid system and the inquiry model of the determination The grid being completely covered is enclosed, the grid of the grid system is merged, and determine the grid after merging Numbering;
The spatial point of the grid memory storage that the query context in grid system after merging is completely covered Data are used as Query Result;And, for the net intersected with the query context in grid system after merging The data of the spatial point of lattice memory storage, filter the data of the spatial point for being not belonging to the query context, by residue Spatial point data as Query Result.
It is preferred that the data of spatial point of the Unit the 4th to storing in the grid for needing and inquiring about are entered During row inquiry, page of data is inquired about every time, during the grid of multiple non-consecutive numberings is included per page data The data of the spatial point of storage.
Description of the drawings
Fig. 1 is 2 grades of grid schematic diagrames provided in an embodiment of the present invention;
Fig. 2 be 2 grades of grids provided in an embodiment of the present invention grid numbering move towards sequential schematic;
Fig. 3 is the query context schematic diagram of 2 grades of grids provided in an embodiment of the present invention;
Fig. 4 be 2 grades provided in an embodiment of the present invention it is lattice simplified be 1 grade of grid schematic diagram;
Fig. 5 is the grid schematic diagram corresponding to query context provided in an embodiment of the present invention;
Fig. 6 is that the grid after the grid to corresponding to query context provided in an embodiment of the present invention is merged shows It is intended to;
Fig. 7 is the grid schematic diagram of the first page inquiry before page turning optimization provided in an embodiment of the present invention;
Fig. 8 is the grid schematic diagram of the first page inquiry after page turning optimization provided in an embodiment of the present invention;
Fig. 9 is a kind of process flow schematic diagram of space point data provided in an embodiment of the present invention;
Figure 10 is a kind of structural representation of the processing meanss of space point data provided in an embodiment of the present invention.
Specific embodiment
A kind of processing method and processing device of space point data is embodiments provided, to draw by static The data of the mode memory space point of subnetting lattice numbering, so as to improve data storage efficiency, it is adaptable to magnanimity number According to storage.
Technical scheme provided in an embodiment of the present invention space point data is indexed using quadtree mesh and Inquiry paging, specifically, using quaternary tree, index space point data, and by series of optimum measure, Search efficiency is lifted, strengthens query function.The method is primarily adapted for use in supports random write with continuous reading NoSQL storehouses.Within the scope of data total amount can bear, it can also be used to SQL storehouses.
In general, whole scheme provided in an embodiment of the present invention can be divided into storage and inquire about two parts. Storing process can be divided into be set up grid, calculates grid, the several steps of write data that spatial point is located.Look into Asking can start optimization from basic inquiry mode, and optimization can be comprising pre- simplified grid, two kinds of grid of merging Mode, the objective of optimization is that multiple random write is converted into the continuous reading of a small amount of number of times.In addition, being directed to The situation of page turning, the page turning strategy of technical scheme provided in an embodiment of the present invention is needed to make per page of sky Between point data in query context try one's best holding be uniformly distributed.
Storage with regard to space point data is described below:
First, grid delimited according to the coordinate in-scope of known spatial point (spatial points of data to be stored) Scope, the grid scope of delimitation should include all of available point, that is, cover the seat of all of known spatial point Mark.According to the quantity of known spatial point, grid rank is determined, it is known that the quantity of spatial point is more, determines net Lattice rank is higher;Grid system is generated according to the grid scope and grid rank, the grid system includes Multiple grids.Grid rank is assumed to be n, then the grid of n levels is referred in the range of whole grid system, Respectively on longitude and latitude direction, the scope of whole grid system is averagely divided into into 2^n parts, that is, Say, whole grid system has 4^n grid., according to quadtree coding, grid is how many level for each grid, Just how many position encoded.As shown in figure 1, for one 2 grades of grid, there is 16 grids.
Fig. 2 show 2 grades of grids grid numbering move towards order, i.e., number consecutively be 00,01,02, 03、10、11、12、13、20、21、22、23、30、31、32、33。
The grid system example for building herein, only comprising the description to its bounds and rank, does not store every The coding of individual grid.
Afterwards, during being stored in the data of spatial point, according to the coordinate of known spatial point, determine corresponding Grid is numbered, i.e., for the coordinate of each known spatial point, according to the coordinate of the known spatial point, it is determined that The corresponding grid numbering of the known spatial point, specifically includes in the grid system:
Go out the coding of each of grid numbering according to stress and strain model step-by-step calculation.It is first for each spatial point The longitude for first calculating the coordinate of the spatial point is absolute with the difference of the most western longitude coordinate of whole grid system Value, is denoted as offsetX, and calculates the latitude value and whole grid system most north latitude of the coordinate of the spatial point The absolute value of the difference of degree coordinate, is denoted as offsetY.Afterwards, first coding from grid numbering is (from a left side To first of right beginning) start to calculate:When calculating first, it is considered to which grid only has the situation of one-level, calculate Go out longitude span dividesXLength and latitude span dividesYLength of each one-level grid, afterwards Using offsetX divided by dividesXLength, the result for drawing is denoted as xSpan after rounding downwards, and makes With offsetY divided by dividesYLength, the result for drawing is denoted as ySpan after rounding downwards.Work as xSpan When being respectively strange odd, even strange, odd even, idol with ySpan, first coding of grid numbering is denoted as respectively 3、2、1、0.I.e.:When xSpan and ySpan are odd number, first of grid numbering is encoded to 3; When xSpan and ySpan are respectively even number, odd number, first of grid numbering is encoded to 2;Work as xSpan When being respectively odd number, even number with ySpan, first of grid numbering is encoded to 1;As xSpan and ySpan When being all even number, first of grid numbering is encoded to 0.The second coding of grid numbering and afterwards The rest may be inferred for coding etc., and the grid numbering digit for finally giving should be identical with grid rank.
For example:By taking one two grades of grid as an example, it is assumed that the four of the grid most 116 ° E, 38 ° of N, 120 ° of E, 40 ° of N, need to calculate 117.2 ° of E of spatial point, the grid numbering in the grid at 39.3 ° of N places.So, it is first The offsetX of the spatial point is first calculated, offsetY is respectively 1.2 °, 0.7 °.Afterwards, first net is calculated Trellis coding, in first order grid, longitude and latitude span dividesXLength of single grid and DividesYLength is respectively (120 ° of E-116 ° of E)/(2^1)=2 °, and (40 ° of E-38 ° of E)/(2^1)=1 ° uses afterwards OffsetX divided by dividesXLength, using offsetY divided by dividesYLength, divide by the result for drawing Do not round downwards, xSpan and ySpan is 0, even number, so the first bit number is 0.Is calculated afterwards Two grid codings, in the grid of the second level, longitude and latitude span dividesXLength of single grid and DividesYLength is respectively (120 ° of E-116 ° of E)/(2^2)=1 °, and (40 ° of E-38 ° of E)/(2^2)=0.5 ° makes afterwards With offsetX divided by dividesXLength, using offsetY divided by dividesYLength, the knot for drawing Fruit rounds separately down, and xSpan and ySpan is 1, odd number, so the second bit number is 3.So really The data of the fixed spatial point need to be stored in the grid that numbering is 03, i.e. the corresponding grid of the spatial point is Numbering is 03 grid.For there is the other grid of more stages, the rest may be inferred.
Finally, by the net of data Cun Chudao of each known spatial point corresponding grid numbering in grid system In lattice.
Wherein, it is stored in data procedures, for the storehouse that a key can correspond to multiple values, grid numbering is made For key, the data field value of spatial point is deposited in storehouse as value.For the storehouse that a key only corresponds to a value, Using grid numbering+space point data major key as key, point data all field values in space are deposited into as value In storehouse.
Inquiry with regard to space point data is described below:
Every time inquiry, first according to query context, calculating intersect with the query context and the query context inside Grid numbering (cannot determine relation can be by intersecting grid computing), obtain two set.So After reuse grid numbering inquiry database.Using the grid inside query context, (i.e. the query context is complete The grid of covering) data of spatial point that go out of numbering collection query can be directly added into final result, using phase Hand over the data for numbering the spatial point that set is found of grid, in addition it is also necessary to judge whether the spatial point is located at inquiry model In enclosing, the data positioned at the spatial point of query context can add final result.For example, with reference to Fig. 3, figure Middle rectangle frame be query context, then grid numbering be { 02,03,12,13,20,31,22,23,32,33 } grid be phase Grid set is handed over, it is inner mesh set that grid numbering is the grid of { 21,30 }.It is merely illustrative in Fig. 3, lead to Often in application, the quantity of inner mesh is much larger than intersecting grid.
With regard to query optimization plan:
According to above-mentioned inquiry mode, the hidden danger that possible efficient upper and internal memory overflows.Occur mainly in two ranks Section, one is the process gathered according to the numbering of the calculated intersecting grid of query context and inner mesh, If query context is excessive, can cause to calculate relatively slow, or even because grid excessively causes the risk of internal memory spilling; Another is the process according to grid numbering collection query data, if the number of times of random write is too many, drop It is inefficient.Therefore, the embodiment of the present invention also proposed the following two kinds simplified way:
Pre- simplified strategy:
According to query context, it is determined that the grid intersected with the query context in grid system and the inquiry model Before enclosing the grid being completely covered, the method also includes:According to the size of query context, by grid system Rank is simplified so that the number networks in grid system are reduced;
Then according to query context, it is determined that the grid intersected with the query context in grid system after simplification The grid being completely covered with the query context;
The spatial point of the grid memory storage that the query context in grid system after simplification is completely covered Data are used as Query Result;And, for the net intersected with the query context in grid system after simplification The data of the spatial point of lattice memory storage, filter the data of the spatial point for being not belonging to the query context, by residue Spatial point data as Query Result.
For example, with reference to Fig. 4, before grid numbering is calculated, can be according to the size of query context, will be whole The simplification of individual grid system appropriate level, by 2 grades 1 grade is reduced to, and 4 grids are remained after simplifying, and is compiled respectively Number be 0,1,2,3.
The embodiment of the present invention lifts the grade that (simplifications) grid is numbered according to the size of query context, dynamic, Simplify inquiry realization so as to reach, improve the purpose of search efficiency.
Merge grid. policies:
According to query context, it is determined that the grid intersected with the query context in grid system and the query context After the grid being completely covered, the method also includes:According to determine in grid system with the query context The grid that intersecting grid and the query context is completely covered, merges to the grid of grid system, and really The numbering of the grid after fixed merging;
The space of the grid memory storage that then query context in grid system after merging is completely covered The data of point are used as Query Result;And, for intersecting with the query context in grid system after merging Grid memory storage spatial point data, filter the data of the spatial point for being not belonging to the query context, will The data of remaining spatial point are used as Query Result.
That is, in addition to using pre- simplified strategy above-mentioned, for the query context that calculating is completed Corresponding grid numbering set, can also use the mode for merging grid further to simplify, both simplification Mode all can also can be used using one in a method.For example, due to using quaternary tree, So in the presence of four brotghers of node (such as numbering is 30,31,32,33 four grids) whole, Four nodes can be replaced with its father node, for example, if according to query context, it is determined that in grid system The grid that the grid and the query context intersected with the query context is completely covered, as shown in figure 5, then merging Rear grid and its numbering as shown in fig. 6, will number be 30,31,32,33 four mesh updates For a grid, the grid numbering is 3.
Mesh update strategy, further reduces expense when reading.
It is described below with regard to page turning:
In the embodiment of the present invention, the mistake that the data of the spatial point of storage in the grid for needing inquiry are inquired about Cheng Zhong, inquires about every time page of data, and the space stored in the grid of multiple non-consecutive numberings is included per page data The data of point.
Specifically, can pre- simplified query context, after obtaining the numbering set of corresponding grid, can be using will The rear n bit numbers being simplified are added in grid numbering as the mode of page number as suffix.For example, it is false Determine query context comprising numbering be respectively 00,01,02,03,10,11,12,13,20,21,22, 23rd, 30,31,32,33 totally 16 grids, simplify in advance 1 grade of grid numbering, then query context bag 0,1,2,3 grid, if to use page turning, the grid that its first page is included are respectively containing numbering Numbering is { 00,10,20,30 }, and the rest may be inferred.
As for the unfixed problem of every page data bar number, cache layer can be done in client and solved.
For example, with reference to Fig. 7, before page turning optimization, the grid scope that the first page data of inquiry is substantially located is The grid of numbering 00,01,02,03, referring to Fig. 8, after page turning optimization, the first page data of inquiry is located Grid scope be numbering 00,10,20,30 grid, it can be seen that, page turning optimization after, homogenization Map spreads a little.
In sum, referring to Fig. 9, a kind of processing method of space point data provided in an embodiment of the present invention, Including:
S101, the scope according to residing for the coordinate of known spatial point, determine grid scope, and according to known sky Between the quantity put, determine grid rank, grid system is generated according to the grid scope and grid rank, should Grid system includes multiple grids;
S102, for the coordinate of each known spatial point, according to the coordinate of the known spatial point, it is determined that in institute State the corresponding grid numbering of the known spatial point in grid system;
S103, by data Cun Chudao of each known spatial point in the grid system corresponding grid numbering Grid in.
It is preferred that the method also includes:
According to query context, it is determined that needing the grid inquired about in the grid system;
The data of the spatial point to storing in the grid for needing and inquiring about are inquired about, and determine Query Result.
It is preferred that according to query context, it is determined that the grid inquired about is needed in the grid system, concrete bag Include:According to query context, it is determined that the grid intersected with the query context in the grid system and the inquiry The grid that scope is completely covered;
The data of the spatial point to storing in the grid for needing and inquiring about are inquired about, and determine Query Result, Specifically include:The spatial point of the grid memory storage that the query context in the grid system is completely covered Data are used as Query Result;And, in the grid intersected with the query context in the grid system The data of the spatial point of storage, filter the data of the spatial point for being not belonging to the query context, by remaining sky Between put data as Query Result.
It is preferred that it is described according to query context, it is determined that intersect with the query context in the grid system Before the grid that grid and the query context are completely covered, the method also includes:According to the size of query context, The rank of the grid system is simplified so that the number networks in the grid system are reduced;
It is described according to query context, it is determined that the grid intersected with the query context in the grid system and should The grid that query context is completely covered, specifically includes:According to query context, it is determined that grid system after simplification The grid that the grid and the query context intersected with the query context in system is completely covered;
The spatial point of the grid memory storage that the query context in the grid system is completely covered Data are used as Query Result;And, in the grid intersected with the query context in the grid system The data of the spatial point of storage, filter the data of the spatial point for being not belonging to the query context, by remaining sky Between put data as Query Result, specifically include:The query context in grid system after simplification is complete The data of the spatial point of the grid memory storage of all standing are used as Query Result;And, for net after simplification The data of the spatial point of the grid memory storage intersected with the query context in case system, filter and are not belonging to described looking into The data of the spatial point of scope are ask, using the data of remaining spatial point as Query Result.
It is preferred that it is described according to query context, it is determined that intersect with the query context in the grid system After the grid that grid and the query context are completely covered, the method also includes:According to the determination in institute The grid that the grid that intersects with the query context in grid system and the query context are completely covered is stated, to described The grid of grid system is merged, and determines the numbering of the grid after merging;
The spatial point of the grid memory storage that the query context in the grid system is completely covered Data are used as Query Result;And, in the grid intersected with the query context in the grid system The data of the spatial point of storage, filter the data of the spatial point for being not belonging to the query context, by remaining sky Between put data as Query Result, specifically include:The query context in grid system after merging is complete The data of the spatial point of the grid memory storage of all standing are used as Query Result;And, for net after merging The data of the spatial point of the grid memory storage intersected with the query context in case system, filter and are not belonging to described looking into The data of the spatial point of scope are ask, using the data of remaining spatial point as Query Result.
It is preferred that the process that the data of the spatial point to storing in the grid for needing and inquiring about are inquired about In, page of data is inquired about every time, the spatial point stored in the grid of multiple non-consecutive numberings is included per page data Data.
Referring to Figure 10, a kind of processing meanss of space point data provided in an embodiment of the present invention, including:
First module 11, for the scope residing for the coordinate according to known spatial point, determines grid scope, and According to the quantity of known spatial point, grid rank is determined, net is generated according to the grid scope and grid rank Case system, the grid system includes multiple grids;
Second unit 12, for for the coordinate of each known spatial point, according to the coordinate of the known spatial point, It is determined that the corresponding grid of the known spatial point is numbered in the grid system;
3rd unit 13, for data Cun Chudao of each known spatial point are corresponding in the grid system Grid numbering grid in.
It is preferred that the device also includes Unit the 4th, it is used for:
According to query context, it is determined that needing the grid inquired about in the grid system;
The data of the spatial point to storing in the grid for needing and inquiring about are inquired about, and determine Query Result.
It is preferred that Unit the 4th specifically for:
According to query context, it is determined that the grid intersected with the query context in the grid system and the inquiry The grid that scope is completely covered;
The data of the spatial point of the grid memory storage that the query context in the grid system is completely covered As Query Result;And, for the grid memory storage intersected with the query context in the grid system Spatial point data, the data of the spatial point for being not belonging to the query context are filtered, by remaining spatial point Data as Query Result.
It is preferred that Unit the 4th specifically for:
According to the size of query context, the rank of the grid system is simplified so that the grid system The number networks in system are reduced;
According to query context, it is determined that the grid intersected with the query context in grid system after simplification and should The grid that query context is completely covered;
The spatial point of the grid memory storage that the query context in grid system after simplification is completely covered Data are used as Query Result;And, for the net intersected with the query context in grid system after simplification The data of the spatial point of lattice memory storage, filter the data of the spatial point for being not belonging to the query context, by residue Spatial point data as Query Result.
It is preferred that Unit the 4th specifically for:
According to query context, it is determined that the grid intersected with the query context in the grid system and the inquiry The grid that scope is completely covered;
According to the grid intersected with the query context in the grid system and the inquiry model of the determination The grid being completely covered is enclosed, the grid of the grid system is merged, and determine the grid after merging Numbering;
The spatial point of the grid memory storage that the query context in grid system after merging is completely covered Data are used as Query Result;And, for the net intersected with the query context in grid system after merging The data of the spatial point of lattice memory storage, filter the data of the spatial point for being not belonging to the query context, by residue Spatial point data as Query Result.
It is preferred that the data of spatial point of the Unit the 4th to storing in the grid for needing and inquiring about are entered During row inquiry, page of data is inquired about every time, during the grid of multiple non-consecutive numberings is included per page data The data of the spatial point of storage.
Above each described unit, can realize its function by entity apparatus such as processors.
It is static according to grid numbering memory space point data in technical scheme provided in an embodiment of the present invention The mode of grid division numbering memory space point data, is different from conventional according to grid midpoint quantity, dynamic Divide the mode of quadtree mesh.Pre- simplified strategy of the grid in query script.According to the big of query context Little, dynamic lifts the grade of (simplification) grid numbering, realizes so as to reach to simplify to inquire about, and improves inquiry effect The purpose of rate.In page turning strategy, homogenization map spreads a little.Using pre- simplified strategy, by the rear n being simplified Bit number is added in grid numbering as the mode of page number as suffix, obtains the data of specified page number Mode.With regard to the pre- simplification of range query grid, this kind of mode can simplify the calculating and interior of grid numbering set Occupancy is deposited, the number of times of read data phase random write can be also reduced.It is assumed that the number of levels for simplifying is n, then read Fetch data the stage, by original 4^n random write, be converted to 1 continuous reading (1 continuous expense read Slightly larger than random write twice).Mesh update strategy, further reduces expense when reading.Page turning strategy phase To original quaternary tree scheme, simplify the difficulty of scheme realization, both reached reduction single data transfer, The purpose for breaing up data has been reached again.Ensure that simultaneously page turning stability (each paging, page quantity, Per page of result is identical).
The scheme that the present invention is provided is applicable to high speed storing, range query mass data and random acquisition The scene of a small amount of point in query context;And dynamic divides the scheme of quaternary tree in prior art, it is adaptable to Machine obtains a small amount of point in query context, and needs the accurate scene for obtaining point perimeter data.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or meter Calculation machine program product.Therefore, the present invention can be using complete hardware embodiment, complete software embodiment or knot Close the form of the embodiment in terms of software and hardware.And, the present invention can be adopted and wherein wrapped at one or more Computer-usable storage medium containing computer usable program code (including but not limited to magnetic disc store and Optical memory etc.) on implement computer program form.
The present invention is produced with reference to method according to embodiments of the present invention, equipment (system) and computer program The flow chart and/or block diagram of product is describing.It should be understood that can by computer program instructions flowchart and / or block diagram in each flow process and/or square frame and flow chart and/or the flow process in block diagram and/ Or the combination of square frame.These computer program instructions can be provided to all-purpose computer, special-purpose computer, embedded The processor of formula processor or other programmable data processing devices is producing a machine so that by calculating The instruction of the computing device of machine or other programmable data processing devices is produced for realizing in flow chart one The device of the function of specifying in individual flow process or one square frame of multiple flow processs and/or block diagram or multiple square frames.
These computer program instructions may be alternatively stored in can guide computer or other programmable datas process to set In the standby computer-readable memory for working in a specific way so that in being stored in the computer-readable memory Instruction produce and include the manufacture of command device, command device realization is in one flow process or multiple of flow chart The function of specifying in one square frame of flow process and/or block diagram or multiple square frames.
These computer program instructions also can be loaded in computer or other programmable data processing devices, made Obtain and series of operation steps is performed on computer or other programmable devices to produce computer implemented place Reason, so as to the instruction performed on computer or other programmable devices is provided for realizing in flow chart one The step of function of specifying in flow process or one square frame of multiple flow processs and/or block diagram or multiple square frames.
Obviously, those skilled in the art can carry out various changes and modification without deviating from this to the present invention Bright spirit and scope.So, if the present invention these modification and modification belong to the claims in the present invention and Within the scope of its equivalent technologies, then the present invention is also intended to comprising these changes and modification.

Claims (12)

1. a kind of processing method of space point data, it is characterised in that the method includes:
Scope according to residing for the coordinate of known spatial point, determines grid scope, and according to known spatial point Quantity, determines grid rank, and according to the grid scope and grid rank grid system, the grid system are generated System includes multiple grids;
For the coordinate of each known spatial point, according to the coordinate of the known spatial point, it is determined that in the grid The corresponding grid numbering of the known spatial point in system;
By the net of data Cun Chudao of each known spatial point corresponding grid numbering in the grid system In lattice.
2. method according to claim 1, it is characterised in that the method also includes:
According to query context, it is determined that needing the grid inquired about in the grid system;
The data of the spatial point to storing in the grid for needing and inquiring about are inquired about, and determine Query Result.
3. method according to claim 2, it is characterised in that according to query context, it is determined that in institute The grid for needing to inquire about in grid system is stated, is specifically included:According to query context, it is determined that in the grid system The grid that the grid and the query context intersected with the query context in system is completely covered;
The data of the spatial point to storing in the grid for needing and inquiring about are inquired about, and determine Query Result, Specifically include:The spatial point of the grid memory storage that the query context in the grid system is completely covered Data are used as Query Result;And, in the grid intersected with the query context in the grid system The data of the spatial point of storage, filter the data of the spatial point for being not belonging to the query context, by remaining sky Between put data as Query Result.
4. method according to claim 3, it is characterised in that described according to query context, it is determined that The grid that the grid and the query context intersected with the query context in the grid system is completely covered it Before, the method also includes:According to the size of query context, the rank of the grid system is simplified, So that the number networks in the grid system are reduced;
It is described according to query context, it is determined that the grid intersected with the query context in the grid system and should The grid that query context is completely covered, specifically includes:According to query context, it is determined that grid system after simplification The grid that the grid and the query context intersected with the query context in system is completely covered;
The spatial point of the grid memory storage that the query context in the grid system is completely covered Data are used as Query Result;And, in the grid intersected with the query context in the grid system The data of the spatial point of storage, filter the data of the spatial point for being not belonging to the query context, by remaining sky Between put data as Query Result, specifically include:The query context in grid system after simplification is complete The data of the spatial point of the grid memory storage of all standing are used as Query Result;And, for net after simplification The data of the spatial point of the grid memory storage intersected with the query context in case system, filter and are not belonging to described looking into The data of the spatial point of scope are ask, using the data of remaining spatial point as Query Result.
5. method according to claim 3, it is characterised in that described according to query context, it is determined that The grid that the grid and the query context intersected with the query context in the grid system is completely covered it Afterwards, the method also includes:According to the net intersected with the query context in the grid system of the determination The grid that lattice and the query context are completely covered, merges to the grid of the grid system, and determines conjunction And after grid numbering;
The spatial point of the grid memory storage that the query context in the grid system is completely covered Data are used as Query Result;And, in the grid intersected with the query context in the grid system The data of the spatial point of storage, filter the data of the spatial point for being not belonging to the query context, by remaining sky Between put data as Query Result, specifically include:The query context in grid system after merging is complete The data of the spatial point of the grid memory storage of all standing are used as Query Result;And, for net after merging The data of the spatial point of the grid memory storage intersected with the query context in case system, filter and are not belonging to described looking into The data of the spatial point of scope are ask, using the data of remaining spatial point as Query Result.
6. method according to claim 2, it is characterised in that in the grid for needing inquiry During the data of the spatial point of storage are inquired about, page of data is inquired about every time, include per page data many The data of the spatial point stored in the grid of individual non-consecutive numbering.
7. a kind of processing meanss of space point data, it is characterised in that the device includes:
First module, for the scope residing for the coordinate according to known spatial point, determines grid scope, and root According to the quantity of known spatial point, grid rank is determined, grid is generated according to the grid scope and grid rank System, the grid system includes multiple grids;
Second unit, for for the coordinate of each known spatial point, according to the coordinate of the known spatial point, It is determined that the corresponding grid of the known spatial point is numbered in the grid system;
Unit the 3rd, for data Cun Chudao of each known spatial point are corresponding in the grid system In the grid of grid numbering.
8. device according to claim 7, it is characterised in that the device also includes Unit the 4th, For:
According to query context, it is determined that needing the grid inquired about in the grid system;
The data of the spatial point to storing in the grid for needing and inquiring about are inquired about, and determine Query Result.
9. device according to claim 8, it is characterised in that Unit the 4th specifically for:
According to query context, it is determined that the grid intersected with the query context in the grid system and the inquiry The grid that scope is completely covered;
The data of the spatial point of the grid memory storage that the query context in the grid system is completely covered As Query Result;And, for the grid memory storage intersected with the query context in the grid system Spatial point data, the data of the spatial point for being not belonging to the query context are filtered, by remaining spatial point Data as Query Result.
10. device according to claim 9, it is characterised in that Unit the 4th specifically for:
According to the size of query context, the rank of the grid system is simplified so that the grid system The number networks in system are reduced;
According to query context, it is determined that the grid intersected with the query context in grid system after simplification and should The grid that query context is completely covered;
The spatial point of the grid memory storage that the query context in grid system after simplification is completely covered Data are used as Query Result;And, for the net intersected with the query context in grid system after simplification The data of the spatial point of lattice memory storage, filter the data of the spatial point for being not belonging to the query context, by residue Spatial point data as Query Result.
11. devices according to claim 9, it is characterised in that Unit the 4th specifically for:
According to query context, it is determined that the grid intersected with the query context in the grid system and the inquiry The grid that scope is completely covered;
According to the grid intersected with the query context in the grid system and the inquiry model of the determination The grid being completely covered is enclosed, the grid of the grid system is merged, and determine the grid after merging Numbering;
The spatial point of the grid memory storage that the query context in grid system after merging is completely covered Data are used as Query Result;And, for the net intersected with the query context in grid system after merging The data of the spatial point of lattice memory storage, filter the data of the spatial point for being not belonging to the query context, by residue Spatial point data as Query Result.
12. devices according to claim 8, it is characterised in that Unit the 4th is to the needs During the data of the spatial point stored in the grid of inquiry are inquired about, page of data is inquired about every time, often Data of the page data including the spatial point stored in the grid of multiple non-consecutive numberings.
CN201510729274.9A 2015-10-30 2015-10-30 Method and device for processing spatial point data Active CN106649359B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510729274.9A CN106649359B (en) 2015-10-30 2015-10-30 Method and device for processing spatial point data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510729274.9A CN106649359B (en) 2015-10-30 2015-10-30 Method and device for processing spatial point data

Publications (2)

Publication Number Publication Date
CN106649359A true CN106649359A (en) 2017-05-10
CN106649359B CN106649359B (en) 2021-05-18

Family

ID=58810376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510729274.9A Active CN106649359B (en) 2015-10-30 2015-10-30 Method and device for processing spatial point data

Country Status (1)

Country Link
CN (1) CN106649359B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581471A (en) * 2020-05-09 2020-08-25 北京京东振世信息技术有限公司 Regional vehicle checking method, device, server and medium
CN112632117A (en) * 2020-12-30 2021-04-09 广州华多网络科技有限公司 Method and device for processing serial number data, electronic equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510274A (en) * 2008-10-27 2009-08-19 南京大学 System for extracting urban grid management space information
CN102662974A (en) * 2012-03-12 2012-09-12 浙江大学 A network graph index method based on adjacent node trees
CN103106276A (en) * 2013-02-17 2013-05-15 南京师范大学 Vector data grid index method based on small angle coding
CN103426201A (en) * 2013-08-30 2013-12-04 天津市测绘院 Mass model data browsing method based on three-dimensional digital city system
CN103559209A (en) * 2013-10-10 2014-02-05 河南大学 Method for querying nearest neighbor of efficient space combined by Voronoi Diagram and virtual grids
CN104199986A (en) * 2014-09-29 2014-12-10 国家电网公司 Vector data space indexing method base on hbase and geohash
RU2013126622A (en) * 2013-06-11 2014-12-20 Федеральное государственное бюджетное образовательное учреждение высшего профессионального образования "Ульяновский государственный университет" METHOD FOR FORMING A SINGLE INFORMATION SPACE AT THE ACCOUNT OF COMBINING DATA AND APPLICATIONS
CN104618896A (en) * 2015-01-07 2015-05-13 上海交通大学 Method and system for protecting location service privacy based on grid density

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510274A (en) * 2008-10-27 2009-08-19 南京大学 System for extracting urban grid management space information
CN102662974A (en) * 2012-03-12 2012-09-12 浙江大学 A network graph index method based on adjacent node trees
CN103106276A (en) * 2013-02-17 2013-05-15 南京师范大学 Vector data grid index method based on small angle coding
RU2013126622A (en) * 2013-06-11 2014-12-20 Федеральное государственное бюджетное образовательное учреждение высшего профессионального образования "Ульяновский государственный университет" METHOD FOR FORMING A SINGLE INFORMATION SPACE AT THE ACCOUNT OF COMBINING DATA AND APPLICATIONS
CN103426201A (en) * 2013-08-30 2013-12-04 天津市测绘院 Mass model data browsing method based on three-dimensional digital city system
CN103559209A (en) * 2013-10-10 2014-02-05 河南大学 Method for querying nearest neighbor of efficient space combined by Voronoi Diagram and virtual grids
CN104199986A (en) * 2014-09-29 2014-12-10 国家电网公司 Vector data space indexing method base on hbase and geohash
CN104618896A (en) * 2015-01-07 2015-05-13 上海交通大学 Method and system for protecting location service privacy based on grid density

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
毛佳妮 等: "半导体制冷器制冷性能的综合影响因素探讨及其优化设计分析", 《流体机械》 *
王妍 等: "基于大规模智能电网网格结构的查询方法", 《计算机应用》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581471A (en) * 2020-05-09 2020-08-25 北京京东振世信息技术有限公司 Regional vehicle checking method, device, server and medium
CN111581471B (en) * 2020-05-09 2023-11-10 北京京东振世信息技术有限公司 Regional vehicle checking method, device, server and medium
CN112632117A (en) * 2020-12-30 2021-04-09 广州华多网络科技有限公司 Method and device for processing serial number data, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN106649359B (en) 2021-05-18

Similar Documents

Publication Publication Date Title
CN104199986B (en) Vector data space index method based on hbase and geohash
CN103617232B (en) A kind of paging query method for HBase table
CN104881582B (en) The Forecasting Methodology and device of air quality
CN107153711A (en) Geographic information data processing method and processing device
CN109492060A (en) A kind of map tile storage method based on MBTiles
CN106599218A (en) Tree structure processing method and device
CN110147377A (en) General polling algorithm based on secondary index under extensive spatial data environment
CN105630968A (en) Distributed expandable quadtree indexing mechanism oriented to Cassandra and query method based on mechanism
CN108241712A (en) A kind of map data processing method and device
CN108804602A (en) A kind of distributed spatial data storage computational methods based on SPARK
CN102306180A (en) Modeling method based on mass laser radar grid point cloud data
CN111078634B (en) Distributed space-time data indexing method based on R tree
CN110175175A (en) Secondary index and range query algorithm between a kind of distributed space based on SPARK
CN105046734A (en) Method and system for dynamically generating and updating grid tile pyramid
CN110765331A (en) Retrieval method and system of spatio-temporal data
CN103092992B (en) Vector data elder generation based on Key/Value type NoSQL data base sequence quadtree coding and indexing means
CN106204719B (en) Magnanimity model real-time scheduling method in three-dimensional scenic based on two-dimensional neighbourhood retrieval
CN107423373A (en) A kind of City-level three-dimensional building model indexing means
CN111414445B (en) Address inverse analysis method applying geographic information
CN108009265A (en) A kind of space data index method under cloud computing environment
CN106649359A (en) Spatial point data processing method and apparatus
CN103324762A (en) Hadoop-based index creation method and indexing method thereof
CN103473420B (en) The automatic positioning method of statistical graph in a kind of statistical maps
CN105447064B (en) Electronic map data making and using method and device
CN104268146A (en) Static B+-tree index method suitable for analytic applications

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240102

Address after: 12A-1-018, Building D, 12th Floor, No.28 Information Road, Haidian District, Beijing, 100080

Patentee after: BEIJING HANLINXINTONG INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 100080, Beijing City, Haidian District, No. 52 West Fourth Ring Road, SMIC building 19

Patentee before: Founder International Co.,Ltd. (Beijing)

Patentee before: FOUNDER INTERNATIONAL Co.,Ltd.

TR01 Transfer of patent right