CN111090712A - Data processing method, device and equipment and computer storage medium - Google Patents

Data processing method, device and equipment and computer storage medium Download PDF

Info

Publication number
CN111090712A
CN111090712A CN201911300825.4A CN201911300825A CN111090712A CN 111090712 A CN111090712 A CN 111090712A CN 201911300825 A CN201911300825 A CN 201911300825A CN 111090712 A CN111090712 A CN 111090712A
Authority
CN
China
Prior art keywords
data
vector
range
tile
node
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.)
Pending
Application number
CN201911300825.4A
Other languages
Chinese (zh)
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.)
Guoqi Beijing Intelligent Network Association Automotive Research Institute Co ltd
Original Assignee
Guoqi Beijing Intelligent Network Association Automotive Research Institute 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 Guoqi Beijing Intelligent Network Association Automotive Research Institute Co ltd filed Critical Guoqi Beijing Intelligent Network Association Automotive Research Institute Co ltd
Priority to CN201911300825.4A priority Critical patent/CN111090712A/en
Publication of CN111090712A publication Critical patent/CN111090712A/en
Pending legal-status Critical Current

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
    • 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
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24554Unary operations; Data partitioning operations
    • G06F16/24556Aggregation; Duplicate elimination
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/005Tree description, e.g. octree, quadtree
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Remote Sensing (AREA)
  • Computational Linguistics (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a data processing method, a data processing device, data processing equipment and a computer storage medium. The method comprises the following steps: acquiring a plurality of data points, wherein the data points are used for representing data information on a map; aggregating the plurality of data points to determine first aggregated data; and performing tile cutting on the first aggregation data based on a pre-configured tile cutting algorithm to obtain vector tiles. The tile cutting is carried out on the aggregated data obtained by aggregating the map data points, so that the data transmission quantity between the server and the terminal can be reduced, the data transmission efficiency is improved, and the massive data can be aggregated better.

Description

Data processing method, device and equipment and computer storage medium
Technical Field
The present invention relates to the field of information processing, and in particular, to a data processing method, apparatus, device, and computer storage medium.
Background
With the development of information technology, people enter the digital information age, various electronic data are generated more and more, a large amount of paper data are electronized, and various processing and recording systems generate mass data.
In the application of combining a plurality of mass data points with a map, the types and the number of the mass data points are large. Tens of millions of data points are required to be displayed on a map, the calculation amount of aggregation calculation is large, the operation speed is low, and due to the fact that the data points are numerous, the data points can be mutually overlapped on a display interface, and the display effect of a terminal is poor.
Therefore, how to better aggregate mass data is a problem that needs to be solved at present.
Disclosure of Invention
Embodiments of the present invention provide a data processing method, an apparatus, a device, and a computer storage medium, which can solve a problem how to better aggregate mass data.
In a first aspect, the present application provides a data processing method, including: acquiring a plurality of data points, wherein the data points are used for representing data information on a map; aggregating the plurality of data points to determine first aggregated data; and performing tile cutting on the first aggregation data based on a pre-configured tile cutting algorithm to obtain vector tiles.
In one possible implementation, after obtaining the vector tiles, the method further comprises: receiving rendering request information sent by a terminal, wherein the rendering request information comprises position information of a target map area; determining a target vector tile corresponding to the target map area in response to the rendering request information; and sending the target vector tile to the terminal so that the terminal renders the target map area based on the target vector tile.
In one possible implementation, tile-cutting the first aggregated data based on a preconfigured tile-cutting algorithm to determine vector tiles, includes: performing data organization on the first aggregation data according to an organization model of the vector tiles to determine vector data; determining an actual slice range and a slice level based on a preconfigured tile cutting algorithm; and performing tile cutting on the vector data based on the actual slice range and the slice level to determine a vector tile. And performing data organization and tile cutting on the first aggregation data and the vector tiles to obtain the vector tiles. The size of the transmitted data volume can be reduced, and the data transmission efficiency is improved.
In one possible implementation, determining the actual slice range based on a preconfigured tile cutting algorithm includes: determining a limited slice range of the vector data based on a preconfigured tile cutting algorithm; performing Douglas rarefaction on the limited slice range, and determining a preset slice range of the vector data; an actual slice range of the vector data is determined from the defined slice range and the default slice range. Here, the range can be rendered accurately, and the data processing speed can be increased.
In one possible implementation, tile cutting the vector data to determine vector tiles based on the actual slice range and slice level includes: determining a line number range and a column number range of the vector tiles according to the actual slicing range and the slicing level; and performing tile cutting on the vector data to determine vector tiles based on the line number range and the column number range.
In a second aspect, the present application provides a rendering method, including: sending rendering request information to a server, wherein the rendering request information comprises position information of a target map area; receiving a target vector tile which is sent by a server and corresponds to a target map area; converting the target vector tile into node data of a quadtree structure; aggregating the node data by utilizing a quadtree algorithm to determine second aggregated data; rendering the target map area based on the second aggregated data.
In one possible implementation, converting the target vector tiles into node data of a quadtree structure includes: analyzing the target vector tile to determine analysis data; and storing the analysis data into the nodes of the quadtree structure, and determining the node data of the quadtree structure. The structure of the quadtree has higher space data insertion and query efficiency, is very beneficial to the subsequent second polymerization treatment, and can further improve the polymerization speed and accuracy.
In one possible implementation, aggregating the node data using a quadtree algorithm to determine second aggregated data includes: dividing a target map area according to a preset display area, and determining at least one divided area; and aggregating the node data of the quadtree structure based on the divided regions, and determining second aggregated data. The data analyzed from the vector tiles are subjected to second aggregation processing by the terminal through the quadtree algorithm, so that the problem of data point capping can be effectively solved, and the display effect of the terminal equipment is improved.
In one possible implementation, aggregating the node data based on the partition region, and determining second aggregated data includes: acquiring a first range corresponding to the divided region and a second range corresponding to node data of the quadtree structure; if the first range is within the second range, determining node data within the overlapping range of the first range and the second range; and aggregating the node data in the overlapping range to determine second aggregated data.
In one possible implementation, rendering the target map region based on the second aggregated data includes: converting the second aggregated data into geometric data and attribute data; the target map area is rendered according to the geometric data and the attribute data.
In a third aspect, an embodiment of the present invention provides a data processing apparatus, including: the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a plurality of data points which are used for representing data information on a map; the aggregation module is used for aggregating the multiple data points based on an aggregation algorithm to determine first aggregated data; and the processing module is used for performing tile cutting on the first aggregation data based on a pre-configured tile cutting algorithm to determine vector tiles.
In a fourth aspect, an embodiment of the present invention provides a rendering apparatus, where the apparatus includes: the sending module is used for sending rendering request information to the server, and the rendering request information comprises position information of the target map area; the receiving module is used for receiving a target vector tile which is sent by the server and corresponds to the target map area; the processing module is used for converting the target vector tiles into node data of a quadtree structure; the aggregation module is used for aggregating the node data by utilizing a quadtree algorithm and determining second aggregated data; a rendering module to render the target map region based on the second aggregated data.
In a fifth aspect, an embodiment of the present invention provides a computing device, where the device includes: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the processing methods as provided by embodiments of the present invention.
In a sixth aspect, an embodiment of the present invention provides a computer storage medium, where computer program instructions are stored on the computer storage medium, and when the computer program instructions are executed by a processor, the computer program instructions implement the processing method provided by the embodiment of the present invention.
According to the data processing method, the data processing device, the data processing equipment and the computer storage medium, tile cutting is performed on aggregated data obtained by aggregating map data points by the server, so that the data transmission quantity between the server and the terminal can be reduced, and the aggregation efficiency is improved. And the vector tiles obtained according to the map data point aggregation are sent to the terminal so that the terminal can aggregate again and render the map area by using the data after the re-aggregation, the aggregation effect is improved, the data point gland on the display interface of the terminal is reduced, and the display effect is further improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a data processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a data processing method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a rendering method according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for implementing data processing according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an aggregation algorithm provided by an embodiment of the present invention;
FIG. 6 is a schematic view of a tissue model according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a tile cutting algorithm according to an embodiment of the present invention;
FIG. 8 is a flowchart of a method for implementing rendering according to an embodiment of the present invention;
FIG. 9 is a diagram illustrating a comparison of a vector tile format according to an embodiment of the present invention;
FIG. 10 is a diagram of a quadtree algorithm according to an embodiment of the present invention;
FIG. 11 is a block diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 12 is a schematic structural diagram of a rendering apparatus according to an embodiment of the present invention;
fig. 13 is a schematic diagram of an exemplary hardware architecture provided by an embodiment of the present invention.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below, and in order to make objects, technical solutions and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present invention by illustrating examples of the present invention.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
With the development of information technology, people enter the digital information age, various electronic data are generated more and more, a large amount of paper data of schools, enterprises, government offices and the like are electronized, and various processing and recording systems generate mass data.
In a scene of combining massive data points with a map, the massive data points are many in types and number, the number can reach tens of millions to hundreds of millions, and tens of millions of data are required to be displayed on the map. Therefore, how to aggregate mass data better, and further realize high-speed data transmission, and how to utilize aggregated data for better rendering and display. Is a problem which needs to be solved urgently at present.
The existing grid-based point set algorithm has a great problem in the accuracy of the aggregated geography, and some close points are separated into different aggregated points due to the boundary of the grid; the existing distance-based point aggregation algorithm needs to calculate the distance between points, the calculation is very complex under the condition of a large number of resource points, a browser is blocked or crashed due to the fact that a large amount of memory is occupied, and the geographical position deviation of the points after aggregation is shown to be large.
Obviously, some existing polymerization processing methods have the problem that the accuracy of the polymerization calculation result is not high.
The existing point aggregation algorithm based on combination of squares and distances needs to draw squares on each resource to calculate whether the squares are intersected, and the realization speed is very slow due to large calculation amount; the operation speed of the point aggregation algorithm based on the distance and the minimum quantity limit is relatively low, because the point aggregation algorithm based on the distance is already slow, and the point aggregation decomposition is carried out according to the minimum quantity threshold value at the later stage, so that the speed becomes slower.
That is to say, when a large number of data points are encountered, the existing aggregation processing method cannot solve the problem of slow running speed, and easily causes overload of the server and the client, which affects user experience.
The embodiment of the invention provides a data processing method, a device, equipment and a storage medium in a relevant scene of data point aggregation, aiming at solving the problems of large aggregation calculation amount, low data transmission speed and poor terminal display effect caused by low accuracy of an aggregation result in the related technology due to excessive data points.
As shown in fig. 1, in an application scenario in which a server aggregates massive map data information, the server acquires data information on a map, integrates the data information on the map into a plurality of data points, performs initial processing on the data points first based on an aggregation algorithm, that is, aggregates the plurality of data points, and determines first aggregated data. And performing tile cutting on the first aggregation data based on a pre-configured tile cutting algorithm to obtain vector tiles. According to the method provided by the embodiment of the invention, the tile cutting is carried out on the aggregated data obtained by aggregating the map data points by the server, so that the data transmission quantity between the server and the terminal can be reduced, and the aggregation efficiency is improved.
Here, the method provided by the embodiment of the present invention may be applied to any scenario in which massive data is aggregated, in addition to the scenarios described above.
Based on the application scenario, the data processing method provided by the embodiment of the invention is described below.
Fig. 2 is a schematic flow chart of a data processing method according to an embodiment of the present invention.
As shown in fig. 2, the data processing method may include S201-S203, and the method is applied to a server, and specifically as follows:
s201, acquiring a plurality of data points, wherein the data points are used for representing data information on a map.
S202, aggregating the plurality of data points to determine first aggregated data.
S203, performing tile cutting on the first aggregation data based on a pre-configured tile cutting algorithm to obtain vector tiles.
According to the data processing method, first aggregation data are determined by performing primary aggregation processing on data points, and then data organization and tile cutting are performed on the first aggregation data to obtain vector tiles. The size of the transmitted data volume can be reduced, and the data transmission efficiency is improved.
The following describes the contents of S201 to S203, respectively:
first, a specific implementation of S201 is described.
The server obtains a large number of data points. The data source for acquiring the mass data points may be third-party data requested by a network, or may be locally stored data. The data points here may be in the form of coordinate points.
Next, a specific implementation of S202 is described.
And aggregating the plurality of data points, namely calculating the current aggregation parameters according to the map cutting configuration file, and aggregating the data points by adopting an aggregation algorithm. The cutting configuration file comprises parameters of an aggregation algorithm, wherein the parameters comprise the size of an outsourcing square and the shortest distance of an aggregation point, and the size of the outsourcing square and the shortest distance of the aggregation point are transformed along with the transformation of the cutting scale hierarchy.
When the data points can exist in the form of coordinate points, aggregation processing is carried out on the coordinate points based on an aggregation algorithm, point location aggregation algorithm calculation based on squares and distances is adopted, the principle is that no known aggregation point exists during initialization, iteration is carried out on each coordinate point, and an outsourcing square of one coordinate point is calculated.
And if the outsourcing square of the coordinate point does not intersect with the existing outsourcing square of the aggregation coordinate point, newly building the aggregation coordinate point. If the coordinate points are intersected, aggregating the coordinate points into the aggregation coordinate points, if the coordinate points are intersected with the outsourcing squares of a plurality of known aggregation coordinate points, calculating the distance from the coordinate points to the aggregation coordinate points, aggregating the distance into the aggregation coordinate points with the shortest distance, and repeating the steps until all the coordinate points are traversed. Each zoom level re-traverses all the original coordinate points.
Therefore, the server side firstly carries out primary processing on the data points by adopting a square grid and distance combination-based aggregation algorithm on the mass data points, first aggregation data are determined, and the aggregation effect is further improved.
Then, a specific implementation of S203 is introduced.
In one embodiment, tile cutting the first aggregated data based on a preconfigured tile cutting algorithm to determine vector tiles comprises: performing data organization on the first aggregation data according to an organization model of the vector tiles to determine vector data; determining an actual slice range and a slice level based on a preconfigured tile cutting algorithm; and performing tile cutting on the vector data based on the actual slice range and the slice level to determine a vector tile.
The data stored in the vector tiles are relative coordinates, so that the data volume can be reduced, and the transmission efficiency and the rendering efficiency are improved.
First, the server side performs data organization on the first aggregation data point determined in S202 to determine vector data. The data organization is an organization model for organizing the first aggregated data into elements in tiles, and a single vector tile can be logically divided into layers to organize element information. The collection information and the attribute information of the elements included in each layer are logically stored separately. The geometric elements are classified into points, lines, planes and unknown element classes. The unknown element type is an element type, and the element type can be analyzed or ignored during data analysis. The metadata information is divided into layer attributes and element attributes. Each block of vector tiles at least comprises one image layer, and each image layer at least comprises one element.
In one embodiment, a hierarchical slice index is constructed for a vector tile according to layer organization element information, and a pattern attribute of vector data is stored in an attribute information code of the vector tile for a subsequent terminal to analyze information related to the pattern of the vector data from the vector tile for rendering, so that the requirement for a rendered personalized pattern is met.
Then, an actual slice range and a slice level are determined based on a pre-configured tile cutting algorithm, wherein the tile cutting algorithm needs to be configured before the vector tiles are cut, and the tile cutting algorithm comprises the width, the height, the actual slice range, the slice level and the like of the vector tiles.
And finally, cutting the organized vector data according to the related information of the tile cutting algorithm to generate vector tiles, and storing the generated vector tiles in an SQLite database. To this end, tile cutting of vector data determines vector tiles based on the actual slice range and slice level.
In one embodiment, the vector tile storage adopts an SQLite database, the SQLite database supports various mainstream operating systems such as Windows and Linux, the occupied memory is very small, and the SQLite database can be combined with various program languages, so that the processing speed is very high. The method adopts Mapbox published tile management and storage specifications, stores the generated tile data in an SQLite database to form an MBTiles file, namely a vector tile, and realizes the intensification of storage space.
In one embodiment, determining the actual slice range based on a preconfigured tile cutting algorithm comprises: determining a limited slice range of the vector data based on a preconfigured tile cutting algorithm; performing Douglas rarefaction on the limited slice range, and determining a preset slice range of the vector data; an actual slice range of the vector data is determined from the defined slice range and the default slice range.
In one embodiment, the slice limiting range Bound in the vector data is loaded first, and douglas is performed on Bound to obtain the preset slice range BBox. And carrying out eclipse analysis on the slice limited range Bound and the preset slice range BBox to obtain the actual slice range Realbound. Here, the range can be rendered accurately, and the data processing speed can be increased.
In one embodiment, tile cutting the vector data based on the actual slice range and slice level to determine vector tiles comprises: determining a line number range and a column number range of the vector tiles according to the actual slicing range and the slicing level; and performing tile cutting on the vector data based on the line number range and the column number range to determine a vector tile.
And finishing the calculation of the following formula by utilizing a pyramid algorithm through the coordinates of the feature points on the actual slicing range RealBound and the current slicing level TileLv1 to obtain the tile line number range corresponding to the actual slicing range. And performing tile cutting on the vector data to determine vector tiles based on the line number range and the column number range corresponding to the actual slice range.
The row number TileRows for the vector tile and the column number TileCols for the vector tile are calculated as follows:
TileRows=Floor((MX-orgX)/TileRange) (1)
TileCols=Floor((orgX-MY)/TileRange) (2)
wherein, tillerage is a geographical display range corresponding to a tile at a next level of the current hierarchy, and the unit of tillerage is degree. The method for obtaining the geographic display range tillerage corresponding to the vector tile is shown as the following formula: tilelange 360 °/(tilellv 1 × tilellv 1) (3)
Wherein, TileLv1 is the gold pyramid level where the current tile is located. In addition, Floor is a round-down operation, (orgx, orgY) denotes the origin of coordinates of the pyramid algorithm (-180 °, 90 °).
Therefore, according to the geographic coordinates MX and MY of the vector tiles, the vector tiles correspond to the geographic display range TileRange, and the row and column numbers TileRows and TileCols of each vector tile are obtained. And further obtaining the ranges of the tile row and column numbers (mintileRow, mintileCol) to (maxtileRow, maxtileCol) corresponding to the actual slice range.
At this point, the actual slice range uniquely determined by the slice level, the row number and the column number in the two-dimensional matrix corresponding to (maxTileRow-mintileRow +1) × (maxtileCol-mintileCol +1) is subjected to map cutting processing, and the vector tile is determined.
In one embodiment, after obtaining the vector tile, the method further comprises: receiving rendering request information sent by a terminal, wherein the rendering request information comprises position information of a target map area; determining a target vector tile corresponding to the target map area in response to the rendering request information; and sending the target vector tile to the terminal so that the terminal renders the target map area based on the target vector tile.
In one embodiment, the generated vector tiles are made into a tile service on the server and issued, and the rendering request information of the terminal device is responded, wherein the map rendering request information comprises the current position of the terminal device, the scale level displayed by the current map and the radius value used for map rendering by taking the current position of the terminal device as the circle center. Determining a target vector tile corresponding to a target map area; and sending the target vector tile to the terminal.
Therefore, when the mass data points are combined with the map, the first aggregation data are determined by performing primary aggregation processing on the data points, and then the vector tiles are obtained by performing data organization and tile cutting on the first aggregation data and the vector tiles. The data transmission method and the data transmission device can reduce the size of the data volume transmitted when the terminal requests the server for the vector data and improve the data transmission efficiency. And a hierarchical slice index is constructed for the vector tile, and the style attribute of the vector data is stored in the attribute information code of the vector tile for the terminal to analyze the information related to the style of the vector data from the vector tile for rendering, thereby meeting the requirement of the rendered personalized style.
Fig. 3 is a schematic flow chart of a rendering method according to an embodiment of the present invention.
As shown in fig. 3, the rendering method may include S301-S305, which is specifically as follows:
s301, sending rendering request information to a server, wherein the rendering request information comprises position information of the target map area.
S302, receiving a target vector tile corresponding to the target map area and sent by the server.
S303, converting the target vector tile into node data of a quadtree structure.
S304, the node data is aggregated by using a quadtree algorithm, and second aggregated data is determined.
S305, rendering the target map area based on the second aggregation data.
According to the rendering method, the vector tiles are used for storing the data, so that the size of the transmitted data volume can be reduced when the terminal requests the server for the target data, and the data transmission efficiency is improved. And the terminal carries out the second aggregation processing on the data analyzed from the vector tiles by utilizing the quadtree algorithm, so that the problem of data point capping can be effectively solved, and the display effect of the terminal equipment is further improved.
The contents of S301 to S305 are described below, respectively:
first, a specific implementation of S301 will be described.
The rendering request information sent to the server comprises the current position of the terminal equipment, the scale level displayed by the current map and the radius value used for map rendering by taking the current position of the terminal equipment as the center of a circle. The current position of the terminal device can be acquired through a network or a GPS of the system.
Next, a specific implementation of S302 is introduced.
And the server makes the generated vector tiles into tile service and releases the tile service, can directly and clearly determine the target vector tiles corresponding to the target map area based on the tile service, and sends the target vector tiles to the terminal.
Then, a specific implementation of S303 is described.
In one embodiment, converting the target vector tiles into node data of a quadtree structure includes: analyzing the target vector tile to determine analysis data; and storing the analysis data into the nodes of the quadtree structure, and determining the node data of the quadtree structure.
The analysis of the target vector tile is to analyze various attribute fields in the target vector tile in binary format (PBF), wherein the various attribute fields not only store information of coordinate points, but also store related attribute information of patterns and the like. Therefore, the processes of drawing, rendering, slicing, updating and the like for different styles are not needed to be repeated subsequently, and the rendering efficiency is improved. Wherein PBF is a binary protocol format. When a large amount of repeated fields and element information of attribute values are stored, the PBF format can well avoid the generation of repeated information.
And storing the analysis data into the nodes of the quadtree structure, generating a quadtree index, and determining the node data of the quadtree structure.
The quadtree indexing recursively divides the geographic space until a self-set termination condition is reached, and finally forms a hierarchical quadtree. Each leaf node stores a primitive identification list associated with the area and the geographical range of the area, and the non-leaf nodes only store the geographical range of the area. The basic idea of quadtree indexing is to recursively divide the geospatial space into different levels of tree structures. It equally divides the space of the known range into four equal subspaces, and recurses in this way until the tree hierarchy reaches a certain depth or meets a certain requirement, and then stops the division.
Fig. 9 shows a flowchart of generating a quadtree index from data parsed by a terminal. Firstly, traversing points analyzed by a terminal to generate a node data set, namely, analysis data. And then obtaining the maximum rectangular range of the node data set according to the analysis data.
And secondly, establishing a quadtree and generating a quadtree root node, wherein the range of the rectangular frame of the quadtree root node is the maximum rectangular frame range of the data set. And traversing the generated quadtree node data set, and inserting node data into the root node of the generated quadtree.
And then, judging whether the node data exist in the maximum rectangular frame range of the root node, traversing the next node data if the node data do not exist, judging whether the node number of the root node of the quadtree is smaller than the maximum capacity value of the root node if the node data exist, and storing the analytic data in the node data of the root node if the node number of the root node of the quadtree is smaller than the maximum capacity value of the root node.
If the number of the nodes of the root node of the quadtree is not less than the maximum capacity value of the root node, judging whether the root node is a leaf node, if so, splitting the root node into four sub-nodes, and dividing the rectangular range of the root node into four equal parts which are respectively rectangular ranges of the four sub-nodes.
Traversing each child node of the root node, taking the child node as the root node to continue to insert the analysis data, and repeating the operation until all the analysis data are stored in the quadtree. Thus, the node data of the quad tree structure is determined.
The quad-tree algorithm is simple in structure, has high space data insertion and query efficiency, is beneficial to the subsequent second aggregation processing, and can further improve the aggregation speed and accuracy.
Next, a specific implementation of S304 will be described.
In one embodiment, aggregating the node data using a quadtree algorithm, determining second aggregated data, comprises: dividing a target map area according to a preset display area, and determining at least one divided area; and aggregating the node data of the quadtree structure based on the divided regions, and determining second aggregated data.
For example, according to the current scale, the area size a of the terminal screen division, i.e. the preset display area, is determined. And acquiring the latitude and longitude range of an area B displayed on a map on a terminal screen, namely a target map area. And dividing the latitude and longitude range of the area B into a plurality of small areas according to the size of the area A to form an area set C.
Traversing the region set C, aggregating each small region below the region set C, determining second aggregated data of the small region, and taking the second aggregated data of the small region as node data subjected to aggregation processing in the small region. The small region aggregation is finished, and the traversing region set C returns to the upper part, and the next region is aggregated.
In one embodiment, aggregating the node data based on the divided regions, determining second aggregated data, comprises: acquiring a first range corresponding to the divided region and a second range corresponding to node data of the quadtree structure; if the first range is within the second range, determining node data within the overlapping range of the first range and the second range; and aggregating the node data in the overlapping range to determine second aggregated data.
And calculating the maximum and minimum longitude values and the maximum and minimum latitude values of the small areas below the area set C, and constructing a data structure of a rectangular frame of the quad-tree node as a rectangular frame range D, namely a first range corresponding to the divided area. And then acquiring the maximum rectangular frame range E of the root node of the quadtree, namely a second range corresponding to the node data of the quadtree structure.
In one embodiment, if the rectangular frame range D is within the rectangular frame range E, determining node data within a coincidence range of the rectangular frame range D and the rectangular frame range E; and aggregating the node data in the overlapping range to determine second aggregated data.
For example, the rectangular box range D may be compared with the maximum rectangular box range E of the quadtree root node in the following manner. Firstly, whether a first condition is met is judged:
xMax (range of rectangular frame D) <xmin (range of rectangular frame E)
yMax (range of rectangular frame D) < ═ yMin (range of rectangular frame E)
xMin (range of rectangular frame D) <xmax (range of rectangular frame E)
yMin (range of rectangular frame D) < ═ yMax (range of rectangular frame E)
If the first condition is satisfied, the rectangular range D is outside the rectangular range E, and no polymerization operation is required. And if the first condition is not met, performing the next operation.
Then, traversing the node data (corresponding to the fields points in fig. 8) stored in the root node of the quadtree, comparing the longitude and latitude (i.e. latitude and longtude) of the node data with the rectangular range D, and judging whether the second condition is satisfied:
yMin<=latitude<=yMax
xMax<=longitude<=xMax
if the longitude and the latitude are within the rectangular range D, the longitude and the latitude corresponding to the node data stored in the root node of the quadtree are shown, the node data are recorded, and the next operation is carried out.
And judging whether the first child node in the root node of the quadtree is empty, if so, indicating that the first child node in the root node of the quadtree is empty, indicating that the first child node is a leaf node, directly returning, and if not, indicating that four child nodes exist in the root node of the quadtree, and continuing to search under the four child nodes.
And sequentially carrying out searching operation on four sub-nodes under the root node of the quadtree, wherein the searching operation of the sub-nodes is the same as the searching operation of the root node of the quadtree in steps, and only the maximum rectangular range of the root node of the quadtree is changed into the maximum rectangular range of the sub-nodes. Namely, the rectangular frame range D is compared with the maximum rectangular frame range E of the root node of the quadtree, and the rectangular frame range D is compared with the maximum rectangular frame range E of the subnode of the quadtree.
The second aggregation processing of the data by utilizing the quadtree algorithm at the terminal can effectively solve the problem of capping of massive data points, and the display effect of the terminal equipment is greatly improved.
Finally, a specific implementation of S305 is described.
In one embodiment, rendering the target map region based on the second aggregated data includes: converting the second aggregated data into geometric data and attribute data; the target map area is rendered according to the geometric data and the attribute data.
In one embodiment, the second aggregated data is converted into geometry data and attribute data usable by a rendering engine. I.e. coordinate point information and style related property information comprised by the second aggregated data is converted into geometry data and property data usable by the rendering engine.
The target map area is rendered according to the geometric data and the attribute data. First, a rendering object is created, and geometric object information is added to a vertex array of the rendering object. The geometrical figure information is added into the vertex array of the rendering object, and the vertex coordinates, normal vectors, texture coordinates and color information generated after calculation by the image engine are stored in a series of vertex arrays for rendering by the image engine.
The target map region is then rendered according to the geometric data and attribute data and the image engine. The image engine is packaged based on an Open Graphics Library (OpenGL), and can support drawing of various vector data such as points, lines, and planes.
And rendering based on the second aggregate data to obtain a rendered target map area.
The rendering method provided by the embodiment of the invention can perform second aggregation processing on the data analyzed from the vector tiles by using the quadtree algorithm at the terminal, can effectively solve the problem of data point capping, converts the data subjected to the second aggregation processing into the geometric data attribute data available for the rendering engine for rendering by the image engine, can further improve the rendering efficiency, and improves the display effect of the terminal equipment.
Fig. 4 is a flowchart of a method for implementing data processing according to an embodiment of the present invention, and as shown in fig. 4, the method for implementing data processing may include steps 401 to 404, which are specifically shown as follows:
step 401: the server side obtains massive data points, calculates current aggregation parameters according to the cutting configuration file, and aggregates the coordinate points by adopting an aggregation algorithm.
Step 402: and the server side organizes the data of the aggregated coordinate points, cuts the organized data according to the related information of the map cutting configuration file, generates vector tiles and stores the vector tiles in the SQLite database.
Step 403: and making the generated vector tiles into a service on a server and publishing the service.
According to the method for realizing data processing, primary aggregation processing is carried out on the coordinate points of the massive map, and then data organization and tile cutting are carried out on aggregated data to obtain the vector tiles. The data transmission method and the data transmission device can reduce the size of the data volume transmitted to the terminal by the server and improve the data transmission efficiency.
The contents of steps 401 to 403 are described below:
first, a specific implementation of step 401 is described.
The data source for acquiring the mass points may be third-party data requested by a network, or may be data stored locally. The cutting configuration file contains parameters of an aggregation algorithm, wherein the parameters comprise the size of the outsourcing square and the shortest distance of the aggregation point, and the size of the outsourcing square and the shortest distance of the aggregation point are transformed along with the transformation of the cutting scale hierarchy.
And the aggregation algorithm carries out aggregation processing on the coordinate points, namely, the aggregation processing is carried out on the data points. The point location aggregation algorithm calculation based on the grids and the distances is adopted, the principle is that any aggregation point does not exist initially, each point is iterated, an outer-wrapped square of one point is calculated, and if the outer-wrapped square of the point does not intersect with the outer-wrapped square of the existing aggregation point, the aggregation point is newly built. If so, the point is aggregated into the aggregation point. A specific aggregation flowchart is shown in fig. 5, and a specific method for implementing aggregation on data points in the embodiment of the present invention may include steps 501 to 507, which are specifically shown as follows:
in step 501, a plurality of data points are obtained, where the data points are used to represent data information on a map, and the data points may be in the form of coordinate points, which may also be referred to as map coordinate points.
Step 502, calculating the outsourcing square of each map coordinate point obtained in step 501.
Step 503, traversing each map coordinate point, and judging whether the map coordinate point is intersected with the aggregation outsourcing square.
And step 504, if the outsourcing square of the map coordinate point does not intersect with the existing outsourcing square of the aggregation point, a map coordinate aggregation point is newly established.
And 505, if the outsourcing square of the map coordinate point is intersected with the outsourcing square of the existing map coordinate aggregation point, judging whether the map coordinate point is intersected with the outsourcing squares of the map coordinate aggregation points.
Step 506, if the map coordinate point intersects with the outsourcing squares of the plurality of known map coordinate aggregation points, calculating the distance from the map coordinate point to the plurality of known map coordinate aggregation points, and aggregating the map coordinate point to the known map coordinate aggregation point closest to the map coordinate aggregation point.
In step 507, if the map coordinate point does not intersect with the outsourcing square of the plurality of known map coordinate aggregation points, that is, the map coordinate point intersects with the outsourcing square of only one known map coordinate aggregation point, the map coordinate point is aggregated into the known map coordinate aggregation point.
And circulating the steps until all the map coordinate points are traversed. And traversing all original elements again in each aggregation to finish the aggregation of all map coordinate points.
A specific implementation of step 402 is described next.
The vector tile data organization is an organization model for organizing the data read from the data source into elements in the tiles, and the specific organization model is shown in fig. 6.
A single vector tile may be logically divided into organizational element information that includes layers. The collection information and the attribute information of the elements included in each layer are logically stored separately.
The geometric elements of the image layer are divided into points, lines, surfaces and unknown elements. Wherein the unknown element may include at least one element type. In addition, the element type may be analyzed or may be omitted in the data analysis. Wherein, the metadata information of the layer is divided into layer attributes.
Based on the above construction logic of the vector tiles, each block of the vector tiles at least comprises one layer, and each layer at least comprises one element.
And cutting the organized vector data by the vector tile cutting according to a tile cutting map algorithm to generate the vector tiles, wherein a vector tile cutting configuration file needs to be configured before the vector tiles are cut, and the vector tile cutting configuration file comprises a tiled vector map range, the width and the height of the vector tiles, the scale level of the vector tile map and the like.
A specific graph-cutting generation algorithm flow included in the vector tile-cutting configuration file is shown in fig. 7, and a specific method for obtaining a vector tile in the embodiment of the present invention may include steps 701 to 708, which are specifically shown as follows:
step 701, knowing the full map range, the number of rows and columns at the first level of the map and the map level of the current map to be cut.
Step 702, calculating the number of rows and columns of the tiles to be cut of the map corresponding to the current level. The algorithm and process for calculating the number of rows and columns of the tiles to be cut in the map corresponding to the current level can be referred to the description in S203.
In step 703, an initial value of the number of rows and columns of the vector tile when the cut is not started is given, i.e., the number of rows i is 0 and the number of columns j is 0.
And 704, executing the next step and continuing to cut the tiles under the condition that the number of the rows of the tiles obtained by current cutting is less than the number of the rows of the tiles to be cut on the map. And under the condition that the number of the rows of the tiles obtained by current cutting is larger than the number of the rows of the tiles to be cut on the map, ending the tile cutting.
Step 705, when the number of the rows of tiles obtained by current cutting is smaller than the number of the rows of tiles to be cut, the next step 706 is executed.
Step 706, the calculated ith row and j column represents the geographical coordinate range of the vector tile, a request is sent to the tile service, and the specific format is saved according to the returned result. Namely, the geographical coordinate range of the vector tile represented by the ith row and the j column is stored in a file, and the tile service is generated for being requested and called by a subsequent terminal.
In step 707, the number of rows of tiles currently cut is accumulated, i.e., j ═ j + 1.
At step 708, the number of rows of tiles currently cut is accumulated, i ═ i + 1.
And then, cutting the map according to the map breadth range uniquely determined by the current slice level, the line number and the column number, traversing all vector tiles in the tile line and column number range corresponding to the actual slice range, and respectively calculating to obtain the geographic coordinate range of the vector tiles represented by the ith line and j column. A specific algorithm for obtaining the geographic coordinate range can be referred to the description in S203.
The vector tile storage adopts an SQLite database, the generated tile data is stored in the SQLite database to form an MBTiles file, namely a tile data set, and the intensification of the storage space is realized.
Finally, a specific implementation of step 403 is introduced.
And making the generated vector tiles into a tile service on the server, issuing the tile service, responding to the request of the terminal equipment, and sending the vector tile data to the terminal.
The method for realizing data processing provided by the embodiment of the invention carries out preliminary aggregation processing on massive data points, carries out vector tile cutting on the aggregated points to obtain vector tiles, and makes the cut vector tiles into tile service to be issued on a server for a terminal to call. The size of the data volume transmitted to the terminal can be reduced, and the data transmission speed is improved.
Fig. 8 is a flowchart of a method for implementing rendering according to an embodiment of the present invention, and as shown in fig. 8, the method for implementing data processing may include steps 801 to 805, which are specifically shown as follows:
step 801: and the terminal sends the rendering request information to the server to obtain the target information, and analyzes the obtained target information.
Step 802: and the terminal stores the analyzed information in a quadtree structure, divides a screen display area, traverses the divided screen area, compares whether the divided screen area has intersection with the quadtree element range, and performs aggregation processing if the divided screen area has intersection with the quadtree element range.
Step 803: the node data aggregated in step 802 is converted into geometry data and attribute data usable by the rendering engine.
Step 804: and creating a rendering object, and adding the geometric object information into the vertex array of the rendering object.
Step 805: and rendering by an image engine.
In the method for realizing rendering provided by the embodiment of the application, the vector tiles are used for storing data, so that the size of the transmitted data volume can be reduced when the terminal requests the server for the target data, and the data transmission efficiency is improved. And the data analyzed from the vector tiles are subjected to second aggregation processing by the terminal through the quadtree algorithm, so that the problem of data point capping can be effectively solved, and the display effect of the terminal equipment is improved.
The contents of steps 801 to 805 are described below:
first, a specific implementation of step 801 is described.
The map rendering request information comprises the current position of the terminal equipment and the scale level displayed by the current map, and the current position of the terminal equipment is a radius value used for map rendering with the center of a circle. The current position of the terminal equipment can be acquired through a network or a GPS carried by the system.
The target information analysis is to analyze various attribute fields included in the vector tile in the PBF format, wherein the various attribute fields not only store information of coordinate points, but also store pattern-related attributes and the like. The PBF is a protocol binary format, and a specific PBF and Geojson format pair is shown in fig. 9.
The vector tile element attribute in PBF format is encoded as a pair of integers in the tag field. The left side is the two element attribute information formats expressed by the original Geojson format, and the right side is the PBF format. The attribute field "hello" of element 1, the attribute value is "world", and is represented by a pair of integers "0, 0" in the PBF format, the first integer represents the index number (starting with 0) of the key in the layer keys list to which the key belongs; the second integer represents the index number (starting with 0) of the value in the values list of the layer to which it belongs. By comparison, it can be found that the PBF format can well avoid the generation of duplicate information, which is the element information storing a large number of duplicate fields and attribute values.
Next, a specific implementation of step 802 is described.
Firstly, the terminal needs to store the analyzed information in a quadtree structure by using a quadtree algorithm, and fig. 10 is a schematic diagram of the quadtree algorithm provided by the embodiment of the present invention. The specific method for storing the analyzed information in the quadtree structure provided in the embodiment of the present invention may include steps 1001-1010, which are specifically shown as follows:
step 1001, traversing the data points analyzed by the terminal, generating a node data set, and obtaining a maximum rectangular range of the node data set.
Step 1002, a quadtree is established to sequentially insert node data obtained by terminal parsing. The method comprises the steps of establishing a quadtree, firstly generating a quadtree root node, and at the moment, setting the range of a rectangular frame of the quadtree root node as the maximum rectangular frame range of a data set.
And 1003, traversing the quadtree node data set generated after the terminal analyzes.
And 1004, inserting node data obtained by terminal analysis under the root node of the quad tree established in the step 1002.
The specific process of inserting the node data may include:
step 1005, judging whether the node data to be inserted exists in the maximum rectangular frame range corresponding to the quadtree root node, if not, traversing the next node data.
Step 1006, if the node data to be inserted exists in the maximum rectangular frame range corresponding to the root node of the quadtree established in step 1002, determine whether the number of nodes in the quadtree node is less than the maximum capacity value of the node.
Step 1007, if the number of nodes of the quadtree node is less than the maximum capacity value of the node, storing the node data to be inserted, which is obtained by the terminal analysis, in the quadtree node.
In step 1008, if the number of nodes in the quadtree node is not less than the maximum capacity value of the node, it is determined whether the node is a leaf node.
Step 1009, if the node is a leaf node, splitting the root node into four sub-nodes, dividing the rectangular range of the root node into four equal parts, which are the rectangular ranges of the four sub-nodes, and inserting the data of the node to be inserted, which is obtained by the terminal analysis, into the split four quadtree sub-nodes.
Step 1010, if the node is not a leaf node, directly inserting the node data obtained by the terminal analysis into the quad-tree node.
And traversing each child node of the root node, and continuing to insert node data by taking the child node as the root node until all the node data are stored in the quadtree. And generating the quadtree index from the data analyzed by the terminal. And then carrying out second aggregation on the terminal by using the analytic data of the quadtree structure and the divided screen area to generate second aggregated data for rendering by the terminal.
And dividing the screen display area, traversing the divided screen area, and comparing whether the area has intersection with the range of the elements of the quadtree. The specific comparison method can be seen in S304.
And recording the node data of the quad tree in a rectangular range corresponding to the screen area, wherein the longitude and latitude range corresponding to the node data is in the rectangular range corresponding to the screen area. And judging whether the number of the points of the recorded node data is greater than 1, and if so, averaging the longitude and the latitude of the recorded node data to generate new node data serving as the node data subjected to aggregation processing in the small area.
If the number of the recorded node data is equal to 1, no processing is performed, and the recorded node data is taken as the node data subjected to the aggregation processing in the small area. If the number of the recorded node data is 0, the data is directly returned without any processing.
Then the specific implementation of step 803 is introduced.
Converting the recorded data into the geometric data and attribute data usable by the rendering engine is to convert the parsed coordinate point information and style related attribute information into the geometric data and attribute data usable by the rendering engine.
Next, a specific implementation of step 804 is described.
And creating a rendering object, and adding the geometric figure information into a vertex array of the rendering object, namely generating vertex coordinates, normal vectors, texture coordinates and color information after calculation by an image engine and storing the vertex coordinates, the normal vectors, the texture coordinates and the color information into a series of vertex arrays for rendering by the image engine.
Finally, a specific implementation of step 805 is introduced.
Rendering the information obtained in step 804 by using an image engine, where the image engine is packaged based on OpenGL (Open Graphics Library, i.e. Open graphical program interface), and can support drawing of various vector data of points, lines, and planes.
According to the method for realizing rendering provided by the embodiment of the invention, the terminal equipment requests data from the server and analyzes the data, the analyzed data is subjected to second aggregation processing by utilizing the quadtree algorithm, the processed data is converted into the geometric data attribute data available for the rendering engine to be rendered by the image engine, the problem of data point capping can be effectively solved, and the display effect of the terminal equipment is greatly improved.
Fig. 11 is a block diagram showing a data processing apparatus according to an embodiment of the present invention.
As shown in fig. 11, the apparatus 1100 may include:
an obtaining module 1110 is configured to obtain a plurality of data points, where the data points are used to represent data information on a map.
An aggregation module 1120 configured to aggregate the plurality of data points based on an aggregation algorithm to determine first aggregated data.
A processing module 1130 for tile cutting the first aggregated data based on a preconfigured tile cutting algorithm to determine vector tiles.
And performing data organization and tile cutting on the first aggregation data and the vector tiles to obtain the vector tiles. The size of the transmitted data volume can be reduced, and the data transmission efficiency is improved.
As an example, processing module 1130 is further configured to receive, after obtaining the vector tile, rendering request information sent by the terminal, where the rendering request information includes location information of the target map area; determining a target vector tile corresponding to the target map area in response to the rendering request information; and sending the target vector tile to the terminal so that the terminal renders the target map area based on the target vector tile.
As an example, processing module 1130 is specifically configured to perform data organization on the first aggregated data according to an organization model of a vector tile, and determine vector data; determining an actual slice range and a slice level based on a preconfigured tile cutting algorithm; and performing tile cutting on the vector data based on the actual slice range and the slice level to determine a vector tile.
As an example, processing module 1130 is specifically configured to determine a defined slice range for the vector data based on a preconfigured tile cutting algorithm; performing Douglas rarefaction on the limited slice range, and determining a preset slice range of the vector data; an actual slice range of the vector data is determined from the defined slice range and the default slice range.
As an example, processing module 1130 is specifically configured to determine a row number range and a column number range for a vector tile based on an actual slice range and slice level; and performing tile cutting on the vector data to determine vector tiles based on the line number range and the column number range. Here, the range can be accurately rendered, and the data processing speed can be accelerated
The tile cutting is carried out on the aggregated data obtained by aggregating the map data points, so that the aggregation effect can be improved.
Fig. 12 is a block diagram illustrating a rendering apparatus according to an embodiment of the present invention.
As shown in fig. 11, the apparatus 1200 may include:
a sending module 1210, configured to send rendering request information to a server, where the rendering request information includes location information of a target map area.
The receiving module 1220 is configured to receive a target vector tile corresponding to a target map area, where the target vector tile is sent by a server.
And the processing module 1230 is configured to convert the target vector tile into node data of a quadtree structure.
As an example, the processing module 1230 is specifically configured to parse the target vector tile to determine parsing data; and storing the analysis data into the nodes of the quadtree structure, and determining the node data of the quadtree structure.
The quadtree has a simpler structure, has higher spatial data insertion and query efficiency, is very beneficial to the subsequent second aggregation treatment, and can further improve the aggregation speed and accuracy.
And an aggregation module 1240, configured to aggregate the node data by using a quadtree algorithm, and determine second aggregated data.
As an example, the aggregation module 1240 is specifically configured to divide the target map area according to a preset display area, and determine at least one divided area; and aggregating the node data of the quadtree structure based on the divided regions, and determining second aggregated data.
As an example, the aggregation module 1240 is specifically configured to obtain a first range corresponding to the partitioned area and a second range corresponding to the node data of the quadtree structure; if the first range is within the second range, determining node data within the overlapping range of the first range and the second range; and aggregating the node data in the overlapping range to determine second aggregated data.
The data analyzed from the vector tiles are subjected to second aggregation processing by the terminal through the quadtree algorithm, so that the problem of data point capping can be effectively solved, and the display effect of the terminal equipment is improved.
A rendering module 1250 for rendering the target map area based on the second aggregated data.
As an example, rendering module 1250 is specifically configured to render the target map area based on the second aggregated data, including: converting the second aggregated data into geometric data and attribute data; the target map area is rendered according to the geometric data and the attribute data.
And converting the data subjected to the second aggregation into geometric data attribute data available for a rendering engine for rendering by an image engine, so that the rendering efficiency can be further improved, and the display effect of the terminal equipment can be improved.
Fig. 13 is a schematic diagram of an exemplary hardware structure provided by an embodiment of the present invention.
The hardware architecture may include a processor 1301 as well as a memory 130102 storing computer program instructions.
In particular, the processor 130101 may include a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or may be configured as one or more Integrated circuits implementing embodiments of the present invention.
Memory 1302 may include mass storage for data or instructions. By way of example, and not limitation, memory 1302 may include a Hard Disk Drive (HDD), a floppy Disk Drive, flash memory, an optical Disk, a magneto-optical Disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. Memory 1302 may include removable or non-removable (or fixed) media, where appropriate. Memory 1302 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 1302 is non-volatile solid-state memory. In a particular embodiment, memory 1302 includes Read Only Memory (ROM). Where appropriate, the ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), electrically rewritable ROM (EAROM), or flash memory or a combination of two or more of these.
The processor 1301 realizes any one of the data processing methods in the above-described embodiments by reading and executing computer program instructions stored in the memory 1302.
In one example, the device may also include a communication interface 1303 and a bus 1310. As shown in fig. 13, the processor 1301, the memory 1302, and the communication interface 1303 are connected to each other via a bus 1310 to complete communication therebetween.
The communication interface 1303 is mainly used to implement communication between modules, apparatuses, units and/or devices in the embodiment of the present invention.
Bus 1310 includes hardware, software, or both to couple the components of the data processing device to each other. By way of example, and not limitation, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hypertransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus or a combination of two or more of these. Bus 1310 may include one or more buses, where appropriate. Although specific buses have been described and shown in the embodiments of the invention, any suitable buses or interconnects are contemplated by the invention.
The processing device may execute the data processing method in the embodiment of the present invention, thereby implementing the data processing method and the rendering method described in conjunction with fig. 1 to 10.
In addition, in combination with the data processing method in the foregoing embodiments, the embodiments of the present invention may be implemented by providing a computer storage medium. The computer storage medium having computer program instructions stored thereon; which when executed by a processor implement any of the data processing methods in the embodiments described above.
It is to be understood that the embodiments of the invention are not limited to the particular configurations and processes described above and shown in the drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the embodiments of the present invention are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications and additions or change the order between the steps after comprehending the spirit of the embodiments of the present invention.
The functional blocks shown in the above-described structural block diagrams may be implemented as software, and the elements of the embodiments of the present invention are programs or code segments used to perform desired tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this patent describe some methods or systems based on a series of steps or devices. However, the embodiments of the present invention are not limited to the order of the above steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
As described above, only the specific embodiments of the present invention are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present invention, and these modifications or substitutions should be covered within the scope of the present invention.

Claims (14)

1. A data processing method is applied to a server, and is characterized by comprising the following steps:
acquiring a plurality of data points, wherein the data points are used for representing data information on a map;
aggregating the plurality of data points to determine first aggregated data;
and performing tile cutting on the first aggregation data based on a pre-configured tile cutting algorithm to obtain vector tiles.
2. The method of claim 1, wherein after said deriving the vector tile, the method further comprises:
receiving rendering request information sent by a terminal, wherein the rendering request information comprises position information of a target map area;
determining a target vector tile corresponding to the target map area in response to the rendering request information;
sending the target vector tile to the terminal to cause the terminal to render the target map area based on the target vector tile.
3. The method of claim 1, wherein tile cutting the first aggregated data based on a preconfigured tile cutting algorithm to determine vector tiles, comprises:
performing data organization on the first aggregation data according to an organization model of the vector tiles to determine vector data;
determining an actual slice range and a slice level based on the preconfigured tile cutting algorithm;
tile cutting the vector data to determine vector tiles based on the actual slice range and slice level.
4. The method of claim 3, wherein said determining an actual slice range based on said preconfigured tile cutting algorithm comprises:
determining a defined slice range of the vector data based on the preconfigured tile cutting algorithm;
performing Douglas rarefaction on the limited slice range, and determining a preset slice range of the vector data;
determining an actual slice range of the vector data from the defined slice range and the default slice range.
5. The method of claim 3, wherein tile cutting the vector data based on the actual slice range and slice level to determine vector tiles comprises:
determining a row number range and a column number range of the vector tiles according to the actual slice range and the slice level;
and performing tile cutting on the vector data based on the row number range and the column number range to determine a vector tile.
6. A rendering method is applied to a terminal, and is characterized by comprising the following steps:
sending rendering request information to a server, wherein the rendering request information comprises position information of a target map area;
receiving a target vector tile which is sent by the server and corresponds to the target map area;
converting the target vector tile into node data of a quadtree structure;
aggregating the node data by utilizing a quadtree algorithm to determine second aggregated data;
rendering the target map region based on the second aggregated data.
7. The method of claim 6, wherein transforming the target vector tile into node data of a quadtree structure comprises:
analyzing the target vector tile to determine analysis data;
and storing the analysis data into nodes of a quadtree structure, and determining the node data of the quadtree structure.
8. The method of claim 6, wherein the aggregating the node data using a quadtree algorithm to determine second aggregated data comprises:
dividing the target map area according to a preset display area, and determining at least one divided area;
aggregating node data of the quadtree structure based on the partition region, and determining the second aggregated data.
9. The method according to claim 8, wherein said aggregating the node data based on the partition region, and determining the second aggregated data, comprises:
acquiring a first range corresponding to the divided region and a second range corresponding to the node data of the quad-tree structure;
if the first range is within the second range, determining node data within a coincidence range of the first range and the second range;
and aggregating the node data in the overlapping range to determine the second aggregated data.
10. The method of claim 6, wherein rendering the target map region based on the second aggregated data comprises:
converting the second aggregated data into geometric data and attribute data;
rendering the target map region according to the geometric data and attribute data.
11. A data processing device applied to a server is characterized by comprising:
an acquisition module for acquiring a plurality of data points, the data points being for representing data information on a map;
an aggregation module, configured to aggregate the plurality of data points based on an aggregation algorithm, and determine first aggregated data;
and the processing module is used for performing tile cutting on the first aggregation data based on a pre-configured tile cutting algorithm to determine vector tiles.
12. A rendering apparatus applied to a terminal, comprising:
a sending module, configured to send rendering request information to a server, where the rendering request information includes location information of a target map area;
a receiving module, configured to receive a target vector tile corresponding to the target map area and sent by the server;
the processing module is used for converting the target vector tiles into node data of a quadtree structure;
the aggregation module is used for aggregating the node data by utilizing a quadtree algorithm and determining second aggregated data;
a rendering module to render the target map region based on the second aggregated data.
13. A computing device, the device comprising: a processor and a memory storing computer program instructions;
the processor, when executing the computer program instructions, implements the method of any of claims 1-10.
14. A computer storage medium having computer program instructions stored thereon which, when executed by a processor, implement the method of any one of claims 1-10.
CN201911300825.4A 2019-12-17 2019-12-17 Data processing method, device and equipment and computer storage medium Pending CN111090712A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911300825.4A CN111090712A (en) 2019-12-17 2019-12-17 Data processing method, device and equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911300825.4A CN111090712A (en) 2019-12-17 2019-12-17 Data processing method, device and equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN111090712A true CN111090712A (en) 2020-05-01

Family

ID=70395680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911300825.4A Pending CN111090712A (en) 2019-12-17 2019-12-17 Data processing method, device and equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN111090712A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111368239A (en) * 2020-05-27 2020-07-03 航天宏图信息技术股份有限公司 Method and system for processing raster data
CN111753041A (en) * 2020-06-30 2020-10-09 重庆紫光华山智安科技有限公司 Data aggregation rendering method, device and system, electronic equipment and storage medium
CN111915690A (en) * 2020-08-03 2020-11-10 北京吉威空间信息股份有限公司 Thermodynamic diagram data reduction method based on vector tiles
CN113010793A (en) * 2021-04-09 2021-06-22 阿波罗智联(北京)科技有限公司 Method, device, equipment, storage medium and program product for map data processing
CN113032513A (en) * 2021-05-21 2021-06-25 北京数字政通科技股份有限公司 Slicing method and rendering method for spatial geographic data
CN113032508A (en) * 2021-03-24 2021-06-25 南方电网数字电网研究院有限公司 Electronic map data storage method and device, computer equipment and storage medium
CN115952252A (en) * 2023-03-10 2023-04-11 中国测绘科学研究院 Data processing method, device, electronic equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104820684A (en) * 2015-04-21 2015-08-05 武大吉奥信息技术有限公司 Fast on-line analysis processing method based on spatial position
CN106155683A (en) * 2016-06-29 2016-11-23 北京京东尚科信息技术有限公司 Electronic chart point position polymerization and service terminal device
CN109902135A (en) * 2019-02-19 2019-06-18 武大吉奥信息技术有限公司 A kind of vector tile preprocess method and device
US10489954B1 (en) * 2018-05-23 2019-11-26 Mapbox, Inc. Efficient duplicate label handling

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104820684A (en) * 2015-04-21 2015-08-05 武大吉奥信息技术有限公司 Fast on-line analysis processing method based on spatial position
CN106155683A (en) * 2016-06-29 2016-11-23 北京京东尚科信息技术有限公司 Electronic chart point position polymerization and service terminal device
US10489954B1 (en) * 2018-05-23 2019-11-26 Mapbox, Inc. Efficient duplicate label handling
CN109902135A (en) * 2019-02-19 2019-06-18 武大吉奥信息技术有限公司 A kind of vector tile preprocess method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111368239A (en) * 2020-05-27 2020-07-03 航天宏图信息技术股份有限公司 Method and system for processing raster data
CN111753041A (en) * 2020-06-30 2020-10-09 重庆紫光华山智安科技有限公司 Data aggregation rendering method, device and system, electronic equipment and storage medium
CN111753041B (en) * 2020-06-30 2022-12-02 重庆紫光华山智安科技有限公司 Data aggregation rendering method, device and system, electronic equipment and storage medium
CN111915690A (en) * 2020-08-03 2020-11-10 北京吉威空间信息股份有限公司 Thermodynamic diagram data reduction method based on vector tiles
CN113032508A (en) * 2021-03-24 2021-06-25 南方电网数字电网研究院有限公司 Electronic map data storage method and device, computer equipment and storage medium
CN113010793A (en) * 2021-04-09 2021-06-22 阿波罗智联(北京)科技有限公司 Method, device, equipment, storage medium and program product for map data processing
CN113032513A (en) * 2021-05-21 2021-06-25 北京数字政通科技股份有限公司 Slicing method and rendering method for spatial geographic data
CN113032513B (en) * 2021-05-21 2021-08-24 北京数字政通科技股份有限公司 Slicing method and rendering method for spatial geographic data
CN115952252A (en) * 2023-03-10 2023-04-11 中国测绘科学研究院 Data processing method, device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
CN111090712A (en) Data processing method, device and equipment and computer storage medium
CN109165215B (en) Method and device for constructing space-time index in cloud environment and electronic equipment
JP7166383B2 (en) Method and apparatus for creating high-precision maps
EP2849117B1 (en) Methods, apparatuses and computer program products for automatic, non-parametric, non-iterative three dimensional geographic modeling
CN111161428B (en) Three-dimensional map vector tile data generation method, storage medium and terminal
CN110321443B (en) Three-dimensional live-action model database construction method and device and data service system
CN111260784B (en) Urban three-dimensional space grid compression coding method and device and terminal equipment
CN110647596B (en) Map data processing method and device
CN106649882B (en) Spatial data management middleware applied to telecommunication field and implementation method thereof
CN113570275A (en) Water resource real-time monitoring system based on BIM and digital elevation model
US20230042968A1 (en) High-definition map creation method and device, and electronic device
US20240061842A1 (en) Spatial join query method and apparatus, electronic device, and storage medium
US9910878B2 (en) Methods for processing within-distance queries
US11429581B2 (en) Spatial-temporal query for cognitive IoT contexts
CN114820975B (en) Three-dimensional scene simulation reconstruction system and method based on all-element parameter symbolization
CN114627239B (en) Bounding box generation method, device, equipment and storage medium
Azri et al. Review of spatial indexing techniques for large urban data management
CN117009411A (en) Method, device and computer readable storage medium for meshing space storage and indexing based on point cloud data
CN116912817A (en) Three-dimensional scene model splitting method and device, electronic equipment and storage medium
CN111080080A (en) Method and system for estimating risk of geological disaster of villages and small towns
CN112337093B (en) Virtual object clustering method and device, storage medium and electronic device
CN114610825A (en) Method and device for confirming associated grid set, electronic equipment and storage medium
CN112632338A (en) Point cloud data retrieval method, device, equipment and storage medium
CN113010627A (en) City information model service method
CN114116925A (en) Spatio-temporal data query method and related device

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