CN115374237B - Vector space data storage and query method based on Beidou grid code - Google Patents

Vector space data storage and query method based on Beidou grid code Download PDF

Info

Publication number
CN115374237B
CN115374237B CN202211315216.8A CN202211315216A CN115374237B CN 115374237 B CN115374237 B CN 115374237B CN 202211315216 A CN202211315216 A CN 202211315216A CN 115374237 B CN115374237 B CN 115374237B
Authority
CN
China
Prior art keywords
beidou
code
grid code
alpha
grid
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
CN202211315216.8A
Other languages
Chinese (zh)
Other versions
CN115374237A (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 Egova Technology Co ltd
Original Assignee
Beijing Egova Technology 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 Beijing Egova Technology Co ltd filed Critical Beijing Egova Technology Co ltd
Priority to CN202211315216.8A priority Critical patent/CN115374237B/en
Publication of CN115374237A publication Critical patent/CN115374237A/en
Application granted granted Critical
Publication of CN115374237B publication Critical patent/CN115374237B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/29Geographical information databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (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 vector space data storage and query method based on Beidou grid codes. The method comprises the following steps: the storage method comprises the following steps: storing the file information in a t _ layer table; vector element information is stored in a t _ feature table; converting nodes of the vector elements into Beidou grid codes; the edges of the line and surface elements are subjected to interpolation encryption by using Beidou grid codes and are stored in a t _ code table; the query method comprises the following steps: converting the point surface into a Beidou grid code a, and calculating the upper side distance h and the right side distance w of the a relative to the grid code boundary; screening out a possible element result set according to h and w; calculating the row and column of the minimum circumscribed matrix of the element i relative to the element a; and screening out the grid code of the current element according to the rows and the columns. Based on a database storage mode, the Beidou grid code is used for constructing vector space data, the defects of space indexing are overcome, data details with finer granularity are provided, decryption storage is carried out, and the safety of sensitive data is guaranteed.

Description

Vector space data storage and query method based on Beidou grid code
Technical Field
The invention relates to the technical field of database storage, in particular to a vector space data storage and query method based on Beidou gridding codes.
Background
Vector space data refers to a data model related to geographic positions or containing geographic information, and represents the spatial distribution of geographic entities by using points, lines, planes and combinations in geometry, and describes the spatial characteristics of the geographic entities by using a set of coordinates (spatial characteristics) and attribute information (spatial attributes). Vector space data are stored and managed in a file form in the earliest days, and later, with the development of a Relational Database (RDBMS) and an object relational database (O-RDBMS), vector space data are gradually stored and managed in a database form.
The file storage adopts shape file format developed by ESRI, and uses ArcMap or QGIS desktop software or GeoTools tool to perform read-write operation; the OGC standard is adopted for database storage, and developers can read and write vector space data in an SQL mode by describing a group of SQL geometric types and creating and analyzing geometric functions on the types.
For the way of file storage, there are the following drawbacks:
1. the shape file format is not a single file, but a series of file sets, and resource sharing is not facilitated.
2. Professional software (ArcMap, QGIS) is required for loading, and the use is inconvenient.
3. And the requirement of multi-user concurrent access, insufficient multi-user authority control and the like cannot be met.
In practical application, files are usually imported into a database, and the database is used for storage and query, but the following defects also exist:
1. spatial data indexing has many defects, and cannot fully exert the advantages of database indexing.
2. The stored data is accurate data, and the decryption processing is troublesome.
3. The granularity of data storage is an element, and cannot support operation query with finer granularity (element node), if the node of one element is moved, one element needs to be reconstructed and the original element needs to be updated.
4. Not all databases support spatial data types, limiting the choice of databases.
Disclosure of Invention
The invention provides a vector space data storage and query method based on Beidou grid codes, which comprises the following steps:
the storage method specifically comprises the following steps:
when a shape file is converted into a database for storage:
the file information is stored in a t _ layer table;
vector element information is stored in a t _ feature table;
converting nodes of the vector elements into Beidou grid codes;
the edges of the line and surface elements are subjected to interpolation encryption by using Beidou grid codes and are stored in a t _ code table;
establishing a column index for the t _ code table;
the query method specifically comprises the following steps:
converting the point surface (x, y) into a Beidou grid code a, and calculating the upper side distance h and the right side distance w of the Beidou grid code a relative to the grid code boundary;
screening out a possible element result set according to the upper margin h and the right margin w;
calculating row and column col of the Beidou grid code a relative to the upper left corner of the minimum circumscribed matrix of the element i in the element result set;
screening out the grid codes of the current elements according to the row and the column col;
for the set of trellis codes for the row where row is located: grouping according to rings, wherein each group is sorted according to the ascending order of the grid codes, and meanwhile, the mark ring is clockwise or anticlockwise and is an outer ring or an inner ring; if the Beidou grid code a is on the ring, judging whether the Beidou grid code a is in the plane, if the Beidou grid code a is in the plane, ending, if the Beidou grid code a is not on the plane, continuously processing the next element i +1, if the Beidou grid code a is not on the ring, continuously processing the next element i +1 if the rings of the grid codes before and after the current grid code line are the same and are outer rings or are different;
for the set of trellis codes where col is located: grouping according to rings, wherein each group is sorted according to the ascending order of the grid codes, meanwhile, the marking ring is clockwise or anticlockwise, and the marking ring is an outer ring or an inner ring; and if the Beidou grid code a is on the ring, judging whether the Beidou grid code a is in the plane, if the Beidou grid code a is in the plane, ending, if the Beidou grid code a is not in the plane, continuously processing the next element i +1, and if the Beidou grid code a is not on the ring, continuously processing the next element i +1 if the upper and lower grid codes on the column of the current grid code are on the same ring and are outer rings or on different rings.
The vector space data storage and query method based on the Beidou grid code specifically comprises the following steps of: when the Beidou grid codes are used for representing line segments, the Beidou grid codes corresponding to the two end points cannot represent the spatial positions and the characteristics of the line segments in the Beidou grid code environment, all Beidou grid codes passed by the line segments are calculated, the Beidou grid codes are used for representing the line segments in sequence, and the process is called interpolation encryption; the boundary of the element after interpolation encryption is a closed space formed by Beidou grid codes, and the line element is a continuous space formed by the Beidou grid codes.
The vector space data storage and query method based on the Beidou grid code comprises the following steps of for a line segment with the slope k greater than 0:
setting a grid code starting point a, a grid code end point b, a line segment starting point x, y and a line segment end point x ', y';
setting the slope of the line segment as k1, connecting the slope k2 of the line segment starting point and the upper right corner of the grid code a, and the Hamamaton distance d between the starting point and the end point;
judging whether k1 is smaller than k2, if so, calculating the starting point x + +, the end point x '++, and then calculating the Hamamandon distance dx + +, between x + + and x' ++; otherwise, calculating the Manhattan distance dy + + of the y + + and the y '+, and the starting point y + +, the end point y' + +, of the line segment;
and judging whether the sum of dx + + and dy + + is smaller than the Hamamandon distance d between the starting point and the end point, if so, returning to recalculate, and otherwise, ending.
The vector space data storage and query method based on the Beidou grid code comprises the following steps of judging whether the a is in the plane when the a is in the ring, specifically:
for interpolated encrypted trellis codes:
(1) when the outer ring is clockwise, if k1 is more than or equal to k, the point is out of the plane, and if k1 is less than k, the point is in the plane;
(2) when the outer ring is anticlockwise, if k2 is larger than or equal to k, the point is in the plane, and if k2 is smaller than k, the point is out of the plane.
The vector space data storage and query method based on the Beidou grid code comprises the following steps of judging whether the a is in the plane when the a is in the ring, specifically:
for the mesh code of the origin node:
establishing a temporary rectangular coordinate system by using an original node, calculating an angle range alpha in the inner part of the plane according to a quadrant, a ring direction, an inner ring and an outer ring where slopes of front and back two sides of the original node are positioned, and then judging whether the angle of the horizontal positive direction of the domain to be checked is between the angles alpha;
if the outer ring is clockwise, if pre alpha is greater than next alpha, then the angle range alpha is [0, next alpha ], [ pre alpha, 360], otherwise the angle range alpha is [ pre alpha, next alpha ];
if the outer ring is counterclockwise, if pre alpha is greater than next alpha, the angle range alpha is [ pre alpha, next alpha ], otherwise the angle range alpha is [0, next alpha ], [ pre alpha, 360];
if the inner ring is clockwise, if pre alpha > next alpha, the angular range alpha is [ pre alpha, next alpha ], otherwise the angular range alpha is [0, next alpha ], [ pre alpha, 360];
if the inner loop is counterclockwise, then the angular range α: [ pre α, next α ] if pre α > next α, otherwise the angular range α: [0, next α ], [ pre α,360].
The invention also provides a vector space data storage and query device based on the Beidou grid code, which comprises the following components: the device comprises a storage module and a query module;
the storage module is used for storing file information in the t _ layer table when a shape file is converted into a database for storage; vector element information is stored in a t _ feature table; converting nodes of the vector elements into Beidou grid codes; the edges of the line and surface elements are subjected to interpolation encryption by using Beidou grid codes and are stored in a t _ code table; establishing a column index for the t _ code table;
the query module is used for converting the point plane (x, y) into a Beidou grid code a and calculating the upper side distance h and the right side distance w of the Beidou grid code a relative to a grid code boundary; screening out a possible element result set according to the upper margin h and the right margin w; calculating row and column col of the Beidou grid code a relative to the top left corner of the minimum circumscribed matrix of the element i in the element result set; screening out the grid codes of the current elements according to the row and the column col; for the set of trellis codes for the row where row is located: grouping according to rings, wherein each group is sorted according to the ascending order of the grid codes, and meanwhile, the mark ring is clockwise or anticlockwise and is an outer ring or an inner ring; if the Beidou grid code a is on the ring, judging whether the Beidou grid code a is in the plane, if the Beidou grid code a is in the plane, ending, if the Beidou grid code a is not on the plane, continuously processing the next element i +1, if the Beidou grid code a is not on the ring, continuously processing the next element i +1 if the rings of the grid codes before and after the current grid code line are the same and are outer rings or are different; for the set of trellis codes where col is located: grouping according to rings, wherein each group is sorted according to the ascending order of the grid codes, meanwhile, the marking ring is clockwise or anticlockwise, and the marking ring is an outer ring or an inner ring; and if the Beidou grid code a is on the ring, judging whether the Beidou grid code a is in the plane, if the Beidou grid code a is in the plane, ending, if the Beidou grid code a is not in the plane, continuously processing the next element i +1, and if the Beidou grid code a is not on the ring, continuously processing the next element i +1 if the upper and lower grid codes on the column of the current grid code are on the same ring and are outer rings or on different rings.
The invention also provides a computer-readable storage medium, which is characterized in that the computer-readable storage medium contains one or more program instructions, and the one or more program instructions are used for a processor to execute any one of the above vector space data storage and query methods based on the Beidou grid code.
The invention has the following beneficial effects: based on a database storage mode, vector space data are constructed by using Beidou grid codes, the defects of space index are overcome, data details with finer granularity are provided, decryption processing is carried out in a storage stage, and the safety of sensitive data is guaranteed.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a flowchart of a vector space data storage method based on a Beidou trellis code according to an embodiment of the present invention;
fig. 2 is a flowchart of a vector space data query method based on the beidou trellis code according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Example one
The embodiment of the invention provides a vector space data storage and query method based on Beidou grid codes, which comprises the following steps:
referring to fig. 1, the storage method specifically includes:
when a shape file is converted into a database for storage:
the file information is stored in a t _ layer table;
vector element information is stored in a t _ feature table;
converting nodes of the vector elements into Beidou grid codes;
the edges of the line and surface elements are subjected to interpolation encryption by using Beidou grid codes and stored in a t _ code table;
a column index is built for the t _ code table.
The interpolation encryption specifically comprises the following steps: when the Beidou grid codes are used for representing line segments, the Beidou grid codes corresponding to the two end points cannot represent the spatial positions and the characteristics of the line segments in the Beidou grid code environment, all Beidou grid codes through which the line segments pass are calculated, the Beidou grid codes are used for representing the line segments in sequence, and the process is called interpolation encryption. The boundary of the element after interpolation encryption is a closed space formed by Beidou grid codes, and the line element is a continuous space formed by the Beidou grid codes.
For line segments with a slope k >0, the calculation is as follows:
setting a grid code starting point a, a grid code end point b, a line segment starting point x, y and a line segment end point x ', y';
setting the slope of the line segment as k1, connecting the slope k2 between the starting point of the line segment and the upper right corner of the grid code a, and setting the Hamamaton distance d between the starting point and the end point;
judging whether k1 is smaller than k2, if so, calculating the starting point x + +, the end point x '++, and then calculating the Hamamandon distance dx + +, between x + + and x' ++; otherwise, calculating the Manhattan distance dy + + of the y + + and the y '+, and the starting point y + +, the end point y' + +, of the line segment;
and judging whether the sum of dx + + and dy + + is smaller than the Hamamandon distance d between the starting point and the end point, if so, returning to recalculate, and if not, finishing.
Through the storage, on one hand, information with finer granularity of vector space data is obtained, the operation on element details (element nodes) can be supported, and meanwhile, a proper column index is established for the t _ code table, so that the index efficiency is improved compared with the original space index; on the other hand, the grid code represents an area, and the accurate space position represented by vector space data can be blurred relative to the accurate coordinates of the nodes, so that the aim of data decryption is fulfilled.
Referring to fig. 2, the query method specifically includes:
converting the point surface (x, y) into a Beidou grid code a, and calculating the upper side distance h and the right side distance w of the Beidou grid code a relative to the grid code boundary;
screening out a possible element result set according to the upper margin h and the right margin w;
calculating row and column col of the Beidou grid code a relative to the upper left corner of the minimum circumscribed matrix of the element i in the element result set;
screening out the grid codes of the current elements according to the row and the column col;
for the set of trellis codes for row: grouping according to rings, wherein each group is sorted according to the ascending order of the grid codes, and meanwhile, the mark ring is clockwise or anticlockwise and is an outer ring or an inner ring; if the Beidou grid code a is on the ring, judging whether the Beidou grid code a is in the plane, if the Beidou grid code a is in the plane, ending, if the Beidou grid code a is not on the plane, continuously processing the next element i +1, if the Beidou grid code a is not on the ring, continuously processing the next element i +1 if the rings of the grid codes before and after the current grid code line are the same and are outer rings or are different;
for the set of trellis codes where col is located: grouping according to rings, wherein each group is sorted according to the ascending order of the grid codes, the marking rings are clockwise or anticlockwise, and the marking rings are outer rings or inner rings; and if the Beidou grid code a is on the ring, judging whether the Beidou grid code a is in the plane, if the Beidou grid code a is in the plane, ending, if the Beidou grid code a is not in the plane, continuously processing the next element i +1, and if the Beidou grid code a is not on the ring, continuously processing the next element i +1 if the upper and lower grid codes on the column of the current grid code are on the same ring and are outer rings or on different rings. And if the next element needs to be processed, all the elements in the element result set are processed.
Specifically, when a is on the ring, a may be a mesh code of the source node or an interpolation encrypted mesh code, and it is determined whether the a is in-plane, specifically:
for interpolated encrypted trellis codes:
(1) when the outer ring is clockwise, if k1 is more than or equal to k, the point is out of the plane, and if k1 is less than k, the point is in the plane;
(2) when the outer ring is anticlockwise, if k2 is larger than or equal to k, the point is in the plane, and if k2 is smaller than k, the point is out of the plane.
Mesh code for origin node:
and establishing a temporary rectangular coordinate system by using the original node, calculating the angle range alpha in the inner part of the surface according to the quadrant, the ring direction, the inner ring and the outer ring where the slopes of the front side and the rear side of the original node are positioned, and then judging whether the angle of the horizontal positive direction of the domain to be checked is between the angles alpha.
If the outer ring is clockwise, if pre alpha is greater than next alpha, then the angle range alpha is [0, next alpha ], [ pre alpha, 360], otherwise the angle range alpha is [ pre alpha, next alpha ];
if the outer ring is counterclockwise, if pre alpha is greater than next alpha, the angle range alpha is [ pre alpha, next alpha ], otherwise the angle range alpha is [0, next alpha ], [ pre alpha, 360];
if the inner ring is clockwise, if pre alpha > next alpha, the angular range alpha is [ pre alpha, next alpha ], otherwise the angular range alpha is [0, next alpha ], [ pre alpha, 360];
if the inner loop is counterclockwise, then the angular range α: [ pre α, next α ] if pre α > next α, otherwise the angular range α: [0, next α ], [ pre α,360].
In order to accelerate the efficiency of spatial query, some auxiliary computing data are introduced, and the auxiliary data are helpful for preliminarily eliminating some impossible data during query, so that unnecessary computing consumption is avoided:
(1) Envelope with a detachable cover
The two-dimensional vector space data is the minimum external rectangle of an element for an envelope of the element, the Beidou grid code is used for representing the grid code set through which the minimum external rectangle passes, and the Beidou grid code corresponding to the upper left corner and the lower right corner of the minimum external rectangle is only needed.
(2)margin
The concept of margin (CSS syntax, this shorthand property is used to set the width of all outer margins of all current or specified elements in one declaration, or to set the width of outer margins on each side) in CSS (framing Style Sheets), represents the space around the elements. In big dipper net sign indicating number space, the distance of four limits of the envelope of an element through margin, be top margin (top), right margin (right), bottom margin (bottom), left margin (left) respectively apart from big dipper net sign indicating number of space boundary, the distance shows with big dipper net sign indicating number, can be quick like this in big dipper net sign indicating number space location and a factor of differentiateing, filters irrelevant element data when being favorable to the inquiry.
(3) Number of row and column
Relative to the effect of margin, the column number is the space position of a grid code in an element envelope, the column number is represented by the distance of the current grid code relative to the left side of the element envelope, and the row number is represented by the distance relative to the upper side of the element envelope, so that the calculation time is greatly saved during space query.
By adopting the technical scheme, the following technical effects can be achieved:
1. and the sensitivity of data is reduced when the data are visually displayed, and the accurate spatial features are blurred.
2. The data security is guaranteed, and when the data is stolen, the data is difficult to restore.
3. The application range of the Beidou grid code standard is widened.
4. And a finer-grained vector space data operation mode is provided, and the node operation on the elements can be accurately achieved.
Corresponding to the above embodiments, the embodiments of the present invention provide a vector space data storage and query device based on a beidou trellis code, where the device includes: at least one memory and at least one processor;
the memory is used for storing one or more program instructions;
and the processor is used for operating one or more program instructions and executing a vector space data storage and query method based on the Beidou grid code.
Corresponding to the above embodiments, an embodiment of the present invention provides a computer-readable storage medium, where the computer storage medium contains one or more program instructions, and the one or more program instructions are used for a processor to execute a vector space data storage and query method based on a beidou trellis code.
The embodiment of the invention discloses a computer-readable storage medium, wherein computer program instructions are stored in the computer-readable storage medium, and when the computer program instructions run on a computer, the computer is enabled to execute the vector space data storage and query method based on the Beidou grid code.
In an embodiment of the invention, the processor may be an integrated circuit chip having signal processing capability. The Processor may be a general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may be located in ram, flash, rom, prom, or eprom, registers, etc. as is well known in the art. The processor reads the information in the storage medium and completes the steps of the method in combination with the hardware.
The storage medium may be a memory, for example, which may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory.
The nonvolatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory.
The volatile Memory may be a Random Access Memory (RAM) which serves as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), SLDRAM (SLDRAM), and Direct Rambus RAM (DRRAM).
The storage media described in connection with the embodiments of the invention are intended to comprise, without being limited to, these and any other suitable types of memory.
Those skilled in the art will appreciate that the functionality described in the present invention may be implemented in a combination of hardware and software in one or more of the examples described above. When software is applied, the corresponding functionality may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.

Claims (7)

1. A vector space data storage and query method based on Beidou grid codes is characterized by comprising the following steps:
the storage method specifically comprises the following steps:
when a shape file is converted into a database for storage:
the file information is stored in a t _ layer table;
the vector element information is stored in a t _ feature table;
converting nodes of the vector elements into Beidou grid codes;
the edges of the line and surface elements are subjected to interpolation encryption by using Beidou grid codes and are stored in a t _ code table;
establishing a column index for the t _ code table;
the query method specifically comprises the following steps:
converting the point surface (x, y) into a Beidou grid code a, and calculating the upper side distance h and the right side distance w of the Beidou grid code a relative to the grid code boundary;
screening out an included element result set according to the upper margin h and the right margin w;
calculating row and column col of the Beidou grid code a relative to the upper left corner of the minimum circumscribed matrix of the element i in the element result set;
screening out the grid codes of the current elements according to the row and the column col;
for the set of trellis codes for the row where row is located: grouping according to rings, wherein each group is sorted according to the ascending order of the grid codes, and meanwhile, the mark ring is clockwise or anticlockwise and is an outer ring or an inner ring; if the Beidou grid code a is on the ring, judging whether the Beidou grid code a is in the plane, if the Beidou grid code a is in the plane, ending, if the Beidou grid code a is not on the plane, continuously processing the next element i +1, if the Beidou grid code a is not on the ring, continuously processing the next element i +1 if the rings of the grid codes before and after the current grid code line are the same and are outer rings or are different;
for the set of trellis codes where col is located: grouping according to rings, wherein each group is sorted according to the ascending order of the grid codes, meanwhile, the marking ring is clockwise or anticlockwise, and the marking ring is an outer ring or an inner ring; and if the Beidou grid code a is on the ring, judging whether the Beidou grid code a is in the plane, if the Beidou grid code a is in the plane, ending, if the Beidou grid code a is not in the plane, continuously processing the next element i +1, and if the Beidou grid code a is not on the ring, continuously processing the next element i +1 if the upper and lower grid codes on the column of the current grid code are on the same ring and are outer rings or on different rings.
2. The vector space data storage and query method based on the Beidou grid code as set forth in claim 1, wherein the interpolation encryption specifically comprises: when the Beidou grid codes are used for representing line segments, the Beidou grid codes corresponding to the two end points cannot represent the spatial positions and the characteristics of the line segments in the Beidou grid code environment, all Beidou grid codes passed by the line segments are calculated, the Beidou grid codes are used for representing the line segments in sequence, and the process is called interpolation encryption; the boundary of the element after interpolation encryption is a closed space formed by Beidou grid codes, and the line element is a continuous space formed by the Beidou grid codes.
3. The vector space data storage and query method based on the Beidou grid code as set forth in claim 2, wherein for the line segment with the slope k >0, the calculation process is as follows:
setting a grid code starting point a, a grid code end point b, a line segment starting point x, y and a line segment end point x ', y';
setting the slope of the line segment as k1, connecting the slope k2 of the line segment starting point and the upper right corner of the grid code a, and the Hamamaton distance d between the starting point and the end point;
judging whether k1 is smaller than k2, if so, calculating the starting point x + +, the end point x '++, and then calculating the Hamamandon distance dx + +, between x + + and x' ++; otherwise, calculating the Manhattan distance dy + + of the y + + and the y '+, and the starting point y + +, the end point y' + +, of the line segment;
and judging whether the sum of dx + + and dy + + is smaller than the Hamamandon distance d between the starting point and the end point, if so, returning to recalculate, and if not, finishing.
4. The vector space data storage and query method based on the Beidou grid code as set forth in claim 3, wherein when a is on a ring, whether a is in a plane is judged, specifically:
for interpolated encrypted trellis codes:
(1) when the outer ring is clockwise, if k1 is more than or equal to k, the point is out of the plane, and if k1 is less than k, the point is in the plane;
(2) when the outer ring is anticlockwise, if k2 is larger than or equal to k, the point is in the plane, and if k2 is smaller than k, the point is out of the plane.
5. The vector space data storage and query method based on the Beidou grid code as set forth in claim 3, wherein when a is on a ring, whether a is in a plane is judged, specifically:
for the mesh code of the origin node:
establishing a temporary rectangular coordinate system by using an original node, calculating an angle range alpha in the inner part of the plane according to a quadrant, a ring direction, an inner ring and an outer ring where slopes of front and back two sides of the original node are positioned, and then judging whether the angle of the horizontal positive direction of the domain to be checked is between the angles alpha;
if the outer ring is clockwise, if pre alpha is larger than next alpha, the angle range alpha is [0, next alpha ], [ pre alpha, 360], otherwise the angle range alpha is [ pre alpha, next alpha ];
if the outer ring is counterclockwise, if pre alpha is greater than next alpha, the angle range alpha is [ pre alpha, next alpha ], otherwise the angle range alpha is [0, next alpha ], [ pre alpha, 360];
if the inner ring is clockwise, if pre alpha > next alpha, the angular range alpha is [ pre alpha, next alpha ], otherwise the angular range alpha is [0, next alpha ], [ pre alpha, 360];
if the inner loop is counterclockwise, then the angular range α: [ pre α, next α ] if pre α > next α, otherwise the angular range α: [0, next α ], [ pre α,360].
6. The utility model provides a vector space data storage and inquiry unit based on big dipper grid code which characterized in that includes: the device comprises a storage module and a query module;
the storage module is used for storing file information in the t _ layer table when a shape file is converted into a database for storage; vector element information is stored in a t _ feature table; converting nodes of the vector elements into Beidou grid codes; the edges of the line and surface elements are subjected to interpolation encryption by using Beidou grid codes and are stored in a t _ code table; establishing a column index for the t _ code table;
the query module is used for converting the point plane (x, y) into a Beidou grid code a and calculating the upper side distance h and the right side distance w of the Beidou grid code a relative to a grid code boundary; screening out a possible element result set according to the upper margin h and the right margin w; calculating row and column col of the Beidou grid code a relative to the upper left corner of the minimum circumscribed matrix of the element i in the element result set; screening out the grid codes of the current elements according to the row and the column col; for the set of trellis codes for the row where row is located: grouping according to rings, wherein each group is sorted according to the ascending order of the grid codes, and meanwhile, the mark ring is clockwise or anticlockwise and is an outer ring or an inner ring; if the Beidou grid code a is on the ring, judging whether the Beidou grid code a is in the plane, if the Beidou grid code a is in the plane, ending, if the Beidou grid code a is not on the plane, continuously processing the next element i +1, if the Beidou grid code a is not on the ring, continuously processing the next element i +1 if the rings of the grid codes before and after the current grid code line are the same and are outer rings or are different; for the set of trellis codes where col is located: grouping according to rings, wherein each group is sorted according to the ascending order of the grid codes, meanwhile, the marking ring is clockwise or anticlockwise, and the marking ring is an outer ring or an inner ring; and if the Beidou grid code a is on the ring, judging whether the Beidou grid code a is in the plane, if the Beidou grid code a is in the plane, ending, if the Beidou grid code a is not in the plane, continuously processing the next element i +1, and if the Beidou grid code a is not on the ring, continuously processing the next element i +1 if the upper and lower grid codes on the column of the current grid code are on the same ring and are outer rings or on different rings.
7. A computer-readable storage medium containing one or more program instructions for executing, by a processor, the method for storing and querying vector space data based on beidou trellis code according to any one of claims 1-5.
CN202211315216.8A 2022-10-26 2022-10-26 Vector space data storage and query method based on Beidou grid code Active CN115374237B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211315216.8A CN115374237B (en) 2022-10-26 2022-10-26 Vector space data storage and query method based on Beidou grid code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211315216.8A CN115374237B (en) 2022-10-26 2022-10-26 Vector space data storage and query method based on Beidou grid code

Publications (2)

Publication Number Publication Date
CN115374237A CN115374237A (en) 2022-11-22
CN115374237B true CN115374237B (en) 2023-01-03

Family

ID=84073690

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211315216.8A Active CN115374237B (en) 2022-10-26 2022-10-26 Vector space data storage and query method based on Beidou grid code

Country Status (1)

Country Link
CN (1) CN115374237B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116502567B (en) * 2023-06-28 2023-09-12 中国空气动力研究与发展中心计算空气动力研究所 Interpolation solving method, device, equipment and medium of unstructured grid flow field

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015851A (en) * 2020-11-02 2020-12-01 中科星图股份有限公司 Space-time data storage and retrieval method based on Beidou grid code
CN114048203A (en) * 2021-09-28 2022-02-15 中科星图股份有限公司 Beidou grid space indexing and retrieval method and device based on database B-tree index
CN114048204A (en) * 2021-09-28 2022-02-15 中科星图股份有限公司 Beidou grid space indexing method and device based on database inverted index
CN114048271A (en) * 2021-09-28 2022-02-15 中科星图股份有限公司 Storage method and device of Beidou grid data model in database
CN115048593A (en) * 2022-06-23 2022-09-13 北京超图软件股份有限公司 Spatial data retrieval method, device, storage medium and equipment
CN115129795A (en) * 2021-03-24 2022-09-30 北京大学 Data space-time storage method based on geospatial grid
WO2022213838A1 (en) * 2021-04-09 2022-10-13 广州爱浦路网络技术有限公司 Satellite terminal access management method, core network, computer apparatus, and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015851A (en) * 2020-11-02 2020-12-01 中科星图股份有限公司 Space-time data storage and retrieval method based on Beidou grid code
CN115129795A (en) * 2021-03-24 2022-09-30 北京大学 Data space-time storage method based on geospatial grid
WO2022213838A1 (en) * 2021-04-09 2022-10-13 广州爱浦路网络技术有限公司 Satellite terminal access management method, core network, computer apparatus, and storage medium
CN114048203A (en) * 2021-09-28 2022-02-15 中科星图股份有限公司 Beidou grid space indexing and retrieval method and device based on database B-tree index
CN114048204A (en) * 2021-09-28 2022-02-15 中科星图股份有限公司 Beidou grid space indexing method and device based on database inverted index
CN114048271A (en) * 2021-09-28 2022-02-15 中科星图股份有限公司 Storage method and device of Beidou grid data model in database
CN115048593A (en) * 2022-06-23 2022-09-13 北京超图软件股份有限公司 Spatial data retrieval method, device, storage medium and equipment

Also Published As

Publication number Publication date
CN115374237A (en) 2022-11-22

Similar Documents

Publication Publication Date Title
US11061985B2 (en) System and method for linking data records for parcels
CN115374237B (en) Vector space data storage and query method based on Beidou grid code
CN114020756B (en) Remote sensing image real-time map service publishing method and device
JP7539884B2 (en) DATABASE INDEX AND DATABASE QUERY PROCESSING METHOD, APPARATUS, AND DEVICE - Patent application
US20220207669A1 (en) Image correction method and computing device utilizing method
CN112100167A (en) Quality inspection method and device for ecological protection red line data
WO2021120489A1 (en) Adaptive fault tolerance processing method and system for spatial information data
CN103198148B (en) Published cartographic data integrated management and many media dissemination method
CN107704685B (en) Mesh division method and device
CN102254093B (en) Connected domain statistical correlation algorithm based on Thiessen polygon
CN116385575A (en) Image reconstruction method, device, computer equipment and storage medium
US20180157769A1 (en) Multi-reference interface inheritance for concurrent cad interoperability applications
US11423612B2 (en) Correcting segmented surfaces to align with a rendering of volumetric data
CN117806709B (en) Performance optimization method, device, equipment and storage medium of system-level chip
CN117315182B (en) Method for determining radar detection range under influence of terrain
TWI755222B (en) Image correction method and related devices
CN118246178B (en) Discrete method, device, equipment and storage medium of impeller model
CN115220657A (en) Method and device for acquiring hierarchical data relationship and computer equipment thereof
CN116527908A (en) Motion field estimation method, motion field estimation device, computer device and storage medium
CN118672979A (en) Data processing method, apparatus, device, storage medium, and program product
CN114822728A (en) Structure model construction method and system and electronic equipment
CN116244338A (en) Geometric object screening method, device, equipment and storage medium
CN107316329A (en) Method and device for reconstructing digital core
CN118469485A (en) Method, recording medium and system for determining permission of river-related project based on spatial analysis
CN116702855A (en) Optimization method and device for neural network computational graph and related equipment

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