Data query method and device, computer equipment and storage medium
By storing map data into the spatial database and performing data slicing processing, the problems of taking into account both large-scale data rendering efficiency and attribute query in the existing technology are solved, efficient data management and query are realized, and user experience and data change support are improved.
Patent Information
- Application Number
- CN202411788089.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-01-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When processing large-scale data, it is difficult to balance the rendering efficiency and property query support. Especially when the WMS service layer cannot achieve good rendering efficiency under the large amount of data, and cannot be friendly. Supports data changes and version management.
By obtaining the map construction data of the target area, slicing it into the spatial database, slicing the data and storing it in the document-oriented database, setting version information, supporting querying and updating according to query requests, realizing efficient management of tile data and Query.
In the case of large-scale data, it improves map display speed and user experience, supports attribute query and data change management, and realizes efficient query and version management of tile data.
Smart Images

Figure CN119248901A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of map data processing, and in particular to a data query method, device, computer equipment, and storage medium. Background Art
[0002] Cesium is a powerful open source JavaScript map engine library for creating 3D globes and 2D maps in browsers. It supports geospatial data and layers in multiple formats, such as 3D Tiles, GeoJSON, WMTS, WMS, etc. There are many methods and strategies for loading vector data, which can load data in multiple formats such as GeoJSON, KML, Shapefile, etc., as well as various types of services such as WFS and WMS.
[0003] Then, different loading methods usually have different disadvantages. Directly loading data is conducive to the realization of functions such as editing, but the amount of data supported is often limited; loading WMS service layers can support higher-level data and attribute queries, but due to the characteristics of WMS, it still cannot achieve good rendering efficiency when the data volume is large; loading WMTS service layers often have the best rendering efficiency, but cannot friendly support attribute queries, data changes and version management. Summary of the invention
[0004] Based on this, it is necessary to provide a data query method, device, computer equipment, and storage medium to address the above technical problems.
[0005] In a first aspect, the present disclosure provides a data query method. The method comprises: Acquire mapping data of a target area, and store the mapping data in the spatial database according to the spatial element fields in the spatial database; Mapping the mapping data in the spatial database to a map editor; Determine frame information based at least on the mapping data, and configure layer data matching the mapping data according to the frame information; Slicing the layer data according to a preset slicing condition to obtain tile data; Storing the tile data in a document-oriented database, and setting version information of the tile data in the document-oriented database; In response to receiving the query request, a query is performed in the document-oriented database according to the query information indicated by the query request to obtain a query result.
[0006] In one embodiment, after setting the version information of the tile data in the document-oriented database, the method further includes: loading the tile data using a global visualization platform; performing a query in the document-oriented database according to the query information indicated by the query request to obtain a query result, including: Performing spatial search in the document-oriented database according to at least one of the layer information and the border information indicated by the query request to obtain a query result; Or; the query request includes a mouse click event; Determine the mouse click event triggered in the earth visualization platform after the tile data is loaded, so as to instruct the earth visualization platform to send the layer information and border information indicated by the mouse click event to the document guidance database; A spatial search is performed in the document-oriented database according to the layer information and the border information, and the query result is displayed in the earth visualization platform.
[0007] In one embodiment, when there are multiple target areas; determining the border information based on at least the mapping data, and configuring the layer data matching the mapping data according to the border information, includes: Determining a plurality of mapping data corresponding to the plurality of target areas; Based at least on the frame information determined for each mapping data and the layer style matching each mapping data, configure the layer data matching each mapping data; The layer data that matches each of the mapping data are superimposed to obtain a layer group.
[0008] In one embodiment, when the layer style includes multiple layer styles; determining the border information at least based on the mapping data, and configuring the layer data matching the mapping data according to the border information, includes: Create initial layers that match each layer style; Based at least on the frame information determined for each mapping data and the layer style matching each mapping data, configure the layer data in the initial layer matching each layer style; Overlay the configured layer data to obtain a layer group.
[0009] In one embodiment, performing spatial search in the document-oriented database according to at least one of the layer information and the border information indicated by the query request to obtain the query result includes: Determine the stacking order of layer data in the layer group; According to the stacking order and based on at least one of the layer information and the border information indicated by the query request, spatial retrieval is performed in sequence in the document-oriented database to obtain query results matching each layer data.
[0010] In one embodiment, the method further comprises: In response to a data update request, updating the mapping update data indicated by the data update request in the spatial database; Mapping the updated data in the spatial database to the map editor; Update the layer data according to the layer style update data indicated by the data update request; The step of slicing the layer data according to a preset slicing condition to obtain tile data includes: The updated layer data is re-sliced according to the preset slicing conditions to obtain tile data.
[0011] In a second aspect, the present disclosure further provides a data query device. The device comprises: A data acquisition module, used to acquire the mapping data of the target area, and store the mapping data into the spatial database according to the spatial element fields in the spatial database; A data mapping module, used for mapping the mapping data in the spatial database to a map editor; A layer data determination module, configured to determine frame information based at least on the mapping data, and configure layer data matching the mapping data according to the frame information; A slicing module, used for slicing the layer data according to a preset slicing condition to obtain tile data; A storage module, used for storing the tile data in a document-oriented database, and setting version information of the tile data in the document-oriented database; The query module is used to, in response to receiving a query request, perform a query in the document-oriented database according to the query information indicated by the query request to obtain a query result.
[0012] In a third aspect, the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps in any of the above method embodiments are implemented.
[0013] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0014] In a fifth aspect, the present disclosure further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0015] In the above embodiments, by acquiring the mapping data of the target area, the mapping data is stored in the spatial database according to the spatial element field, which can ensure that the stored data format meets the requirements and facilitate subsequent queries. The mapping data is mapped to the map editor, and the map editor is used for subsequent processing, which can facilitate publishing and editing, and can define layer data. At least the border information is determined according to the mapping data, and the layer data matching the mapping data is configured according to the border information, and then the configured layer data is sliced to obtain tile data. When requesting a map of a specific area, when the data volume is large, the service can quickly provide these slices to improve the display speed and user experience. Finally, the tile data is stored in the document-oriented database, and the version information of the tile data is set in the document-oriented database. The tile data can be better managed in the document-oriented database, which is convenient for data changes and version management. In response to receiving a query request, the query information indicated by the query request is queried in the document-oriented database to obtain the query result, which can better support attribute query. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 An application environment diagram of a data query method in an embodiment; Figure 2 A schematic diagram of a flow chart of a data query method in an embodiment; Figure 3 Schematic diagram of the process of step S212 in one embodiment; Figure 4 A schematic diagram of a flow chart of step S206 in an embodiment; Figure 5 Another schematic diagram of a flow chart of step S206 in one embodiment; Figure 6 Schematic diagram of the process of step S302 in one embodiment; Figure 7 is a flowchart of an updating step in an embodiment; Figure 8 is a schematic block diagram of the structure of a data query device in one embodiment; Fig. 9 is a schematic diagram of the internal structure of a computer device in one embodiment; Fig.10 Schematic diagram of the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present disclosure more clear, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure.
[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0020] In this article, the term "and / or" is only a description of the association relationship between related objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the related objects before and after are in an "or" relationship.
[0021] The present disclosure provides a data query method that can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 can obtain the mapping data of the target area stored in the server 104, and the terminal 102 stores the mapping data in the spatial database according to the spatial element field in the spatial database. The terminal 102 maps the mapping data in the spatial database to the map editor. The terminal 102 determines the border information based on at least the mapping data, and configures the layer data matching the mapping data. The terminal 102 slices the layer data according to the preset slicing conditions to obtain tile data. The terminal 102 stores the tile data in the document-oriented database, and sets the version information of the tile data in the document-oriented database. In response to receiving the query request, the terminal 102 queries the document-oriented database according to the query information indicated by the query request to obtain the query result. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0022] In one embodiment, Figure 2 As shown, a data query method is provided, which is applied to Figure 1 The terminal 102 in the example is used as an example to illustrate, and the following steps are included: S202, obtaining mapping data of a target area, and storing the mapping data in the spatial database according to the spatial element fields in the spatial database.
[0023] Among them, the target area can be determined according to the actual situation, and in some embodiments of the present disclosure, the target area is not restricted. Mapping data can generally be data that needs to be queried later, such as administrative area data, city data, geographic data, etc. Mapping data can generally be vector data, which is a commonly used data representation method in a geographic information system (GIS) to describe geographic spatial features. Unlike raster data (such as pictures or raster maps), vector data uses mathematical expressions to represent geographic objects, mainly composed of three basic elements: points, lines, and polygons. In some embodiments of the present disclosure, the spatial database can be a PostgreSQL database. The spatial feature field can be a geom field, which is a special type for storing spatial feature data in a PostgreSQL database. Using this type provides a standard data storage format and supports spatial indexing.
[0024] Specifically, you can obtain the mapping data needed for the target map, and then store the mapping data in the PostgreSQL database according to the geom field. Furthermore, you can store it in PostGIS. PostGIS is an extension for PostgreSQL that provides support for geospatial data, making PostgreSQL a powerful geographic information system (GIS) database. PostGIS enables users to store, query, and manipulate spatial data, such as geometric objects such as points, lines, and polygons.
[0025] In some exemplary embodiments, the provincial administrative division data of country A and the administrative division data of some countries and regions in the world can be obtained. The original data is in Shapefile format. The data is cleaned and stored separately, and stored in the PostgreSQL (PostGIS) database. The geom field needs to be explicitly specified as Geometry (MultiPolygon, 4326), and two data tables A_provinces and world_adm1 are obtained. Both are in public mode. The conversion tool can be PostGISPostGIS Bundle 1 for PostgreSQL x64 14 Shapefile and DBF Loader Exporter. Among them, Shapefile is a commonly used geographic information system (GIS) data format for storing vector graphics data.
[0026] S204: Map the mapping data in the spatial database to a map editor.
[0027] Among them, the map editor can be GeoServer. GeoServer is an open source server software designed to allow users to share and edit geospatial data. It supports multiple standard geographic information system (GIS) protocols, including Web MapService (WMS), Web Feature Service (WFS), and Web Coverage Service (WCS), allowing users to easily publish and access maps and geographic data. The core functions of GeoServer include: Data source support: GeoServer can connect to multiple types of spatial data sources, including PostGIS, Shapefiles, GeoTIFF, Oracle Spatial, etc. Data publishing: Users can publish geographic data in different formats (such as GeoJSON, KML, GML, etc.) through GeoServer and provide these data through standard protocols. Smart styles (SLD / QGIS styles): GeoServer supports style layer descriptions (SLD) and uses QGIS styles, allowing users to customize the visual presentation of maps. Map and layer management: Users can easily manage map layers, styles, data sources, and service configurations on the GeoServer interface.
[0028] Specifically, you can add a storage warehouse in GeoServer, select the above-mentioned PostgreSQL database as the data source, and map the PostgreSQL data to GeoServer.
[0029] S206, determining frame information at least based on the mapping data, and configuring layer data matching the mapping data according to the frame information.
[0030] Among them, the border information can be the four-value coordinates of the mapping data, namely the longitude and latitude information, including: maximum longitude, maximum latitude, minimum longitude, and minimum latitude. Layer data can generally refer to a visual representation of a set of spatial data. In some embodiments of the present disclosure, layer data can generally be vector layers, which generally store geometric data of points, lines, and surfaces. Vector layers can come from various data sources, such as Shapefile, PostGIS (Geographic Extension of PostgreSQL), GeoJSON, etc. These layers represent geographic objects, such as roads, rivers, land boundaries, etc.
[0031] Specifically, the mapping data may be used to calculate the border information, and then the layer data may be configured according to the border information and the mapping data.
[0032] S208, slicing the layer data according to a preset slicing condition to obtain tile data.
[0033] Among them, data slicing is to provide WMTS services and improve efficiency. Usually, the tile data obtained after each slicing corresponds to a specific zoom level of the map. When a user requests a map of a specific area, the service can quickly provide these tile data to improve display speed and user experience. The preset slicing conditions may include: the tile size obtained after slicing and the level of the layer data that needs to be sliced. Depending on different application scenarios, the slicing conditions are also different. In some embodiments of the present disclosure, the slicing conditions are not restricted.
[0034] Specifically, the layer data may be sliced according to certain set slicing conditions, and tile data may be obtained after data slicing.
[0035] In some exemplary embodiments, the number of threads can be selected according to the device performance, and among other major configuration items, EPSG:4326 is selected as the grid set (the grid set includes the coordinate system, tile size, layer data level, etc.), and png is selected as the format, so as to slice the layer data.
[0036] S210: Store the tile data in a document-oriented database, and set version information of the tile data in the document-oriented database.
[0037] Among them, the document-oriented database can usually be the MongoDB database, which is an open source document-oriented NoSQL database management system specially designed for high-performance and high-scalability applications. It uses a format similar to JSON (actually BSON, Binary JSON) to store data, allowing dynamic schemas and flexible data structures, making it easier for developers to process complex and unstructured data.
[0038] Specifically, the cut tile data is stored in the MongoDB database and service publishing and version management are performed on it.
[0039] S212: In response to receiving the query request, query the document-oriented database according to the query information indicated by the query request to obtain a query result.
[0040] Specifically, the user may input a query request into the terminal. When the terminal receives the query request, it may perform a query from the MongoDB database according to the query information indicated by the query request, thereby obtaining a query result.
[0041] In the above data query method, by acquiring the mapping data of the target area, the mapping data is stored in the spatial database according to the spatial element field, which can ensure that the stored data format meets the requirements and facilitate subsequent queries. The mapping data is mapped to the map editor, and the map editor is used for subsequent processing, which can facilitate publishing and editing, and can define layer data. At least the border information is determined according to the mapping data, and the layer data matching the mapping data is configured according to the border information, and then the configured layer data is sliced to obtain tile data. When requesting a map of a specific area, when the data volume is large, the service can quickly provide these slices to improve the display speed and user experience. Finally, the tile data is stored in the document-oriented database, and the version information of the tile data is set in the document-oriented database. The tile data can be better managed in the document-oriented database, which is convenient for data change and version management. In response to receiving a query request, the query information indicated by the query request is queried in the document-oriented database to obtain the query result, which can better support attribute query.
[0042] In one embodiment, after setting the version information of the tile data in the document-oriented database, the method further includes: loading the tile data using an earth visualization platform. The earth visualization platform may be Cesium. Cesium is an open source JavaScript library for creating three-dimensional maps and geographic information visualization. It supports a variety of data sources, including vector data, raster data, terrain, images, etc., and can display geospatial data in a three-dimensional perspective.
[0043] Specifically, using Cesium to load the WMTS (Web Map Tile Service) service means integrating the map slices (tile data) provided by WMTS into the Cesium earth visualization platform to display geographic data and map information in a three-dimensional environment. This allows developers to perform high-performance map display and geographic information analysis.
[0044] like Figure 3 As shown, the query information indicated by the query request is queried in the document-oriented database to obtain the query result, including: S302: Perform spatial search in the document-oriented database according to at least one of the layer information and the border information indicated by the query request to obtain a query result.
[0045] Specifically, a query may be performed in the MongoDB database according to the layer information and / or border information indicated by the query request, thereby obtaining matching query results.
[0046] Alternatively, the query request includes a mouse click event; S304, determining the mouse click event triggered in the earth visualization platform after the tile data is loaded, to instruct the earth visualization platform to send the layer information and border information indicated by the mouse click event to the document-oriented database.
[0047] Specifically, the user can use the mouse to click in the earth visualization platform. Then, the mouse click event triggered in the earth visualization platform can be determined, so as to find the position indicated by the mouse click event, and then the layer information and the border information are determined according to the position. These two pieces of information are sent to the MongoDB database.
[0048] S306: Perform spatial search in the document-oriented database according to the layer information and border information, and display the query result in the earth visualization platform.
[0049] Specifically, relevant attribute retrieval can be performed in the document-oriented database through layer information and border information, and the returned retrieval results will be displayed in the earth visualization platform when they are not empty.
[0050] In this embodiment, direct query can be implemented by using query request, and the properties of the clicked object can also be queried when the user interactively clicks on the layer, thereby taking into account both data loading efficiency and point-selection query function.
[0051] In one embodiment, when there are multiple target areas. Figure 4 As shown, the determining of the border information based at least on the mapping data, and configuring the layer data matching the mapping data according to the border information, includes: S402: Determine a plurality of mapping data corresponding to the plurality of target areas.
[0052] S404: configuring layer data matching each mapping data based at least on the frame information determined for each mapping data and the layer style matching each mapping data.
[0053] S406: Overlay the layer data that matches each of the mapping data to obtain a layer group.
[0054] The layer style can be a CSS style, and the use of CSS style can be more convenient and friendly to integrate into the platform. Usually, Geoserver has a style configuration library that provides some default styles. At the same time, the styles you prepare yourself will also be managed uniformly. If you add a new type of element or expect a new color scheme, you can add a new style. In some embodiments of the present disclosure, there is no restriction on the layer style.
[0055] Specifically, when there are multiple target areas, each target area will have corresponding mapping data. When there are multiple mapping data, the border information of each mapping data and the layer style that matches each mapping data sample can be determined, and then the layer data can be configured according to the border information and the layer style, so as to obtain multiple layer data. The multiple layer data can be superimposed according to certain preset orders or rules (for example, they can be superimposed in sequence according to the size of the border information) to obtain a layer group.
[0056] In this embodiment, when there are multiple map data, the map data of different regions can be merged by overlaying multiple layer data, thereby improving the speed of subsequent queries.
[0057] In one embodiment, when the layer style includes multiple layer styles; Figure 5 As shown, the determining of the border information based at least on the mapping data, and configuring the layer data matching the mapping data according to the border information, includes: S502, creating an initial layer matching each layer style.
[0058] S504: Based at least on the frame information determined for each mapping data and the layer style matching each mapping data, configure the layer data in the initial layer matching each layer style.
[0059] S506: Overlay the configured layer data to obtain a layer group.
[0060] Specifically, there can usually be multiple layer styles that match each mapping data. Here, color is used as an example. For example, if there are two layer styles that match mapping data A, namely brown style and green style, then an initial layer can be established for the brown style, and another initial layer can be established for the green style. Then, according to the border information determined for each mapping data and the layer style that matches each mapping data, the layer data is configured in the initial layer that matches each layer style to obtain multiple layer data. Then, the multiple layer data are superimposed to obtain a layer group.
[0061] In some exemplary embodiments, one mapping data is used as an example. When there are multiple mapping data, the scheme is similar. The layer styles matching the mapping data include: S1 layer style, S2 layer style. Therefore, for the border information determined by the S1 layer style and the mapping data, the A1 layer data can be configured. For the border information determined by the S2 layer style and the mapping data, the A2 layer data can be configured. Then, the A1 layer data and the A2 layer data are sequentially superimposed according to certain rules to obtain a layer group.
[0062] In this embodiment, when the layer style includes multiple layer styles, different layer data can be generated for the multiple layer styles respectively, so as to adapt to various situations.
[0063] In one embodiment, Figure 6 As shown, the spatial search is performed in the document-oriented database according to at least one of the layer information and the border information indicated by the query request to obtain the query result, including: S602: Determine the stacking order of the layer data in the layer group.
[0064] S604: Perform spatial retrieval in the document-oriented database in sequence according to the stacking order and based on at least one of the layer information and border information indicated by the query request to obtain query results matching each layer data.
[0065] Specifically, when there is a layer group, each layer data in the layer group can be segmented and then stored in the document-oriented database. At this time, when querying, spatial retrieval can be performed in sequence in the document-oriented database according to the stacking order in the layer group and at least one of the layer information and border information indicated by the query request to obtain query results matching each layer data. The query is for query results in different layer data.
[0066] In this embodiment, by performing queries in sequence according to the stacking order, query results of different layer data can be obtained, making the query results more accurate.
[0067] In one embodiment, Figure 7 As shown, the method also includes: S702: In response to a data update request, update the mapping update data indicated by the data update request in the spatial database.
[0068] S704: Map the updated data in the spatial database to the map editor.
[0069] Specifically, when the mapping data of the target area is updated, the user can send a data update request to the terminal, and the terminal can update the mapping update data in the spatial database according to the data update request, and then remap the updated data to the map editor.
[0070] It should be noted that the update here may include: adding, modifying and deleting the mapping data. When adding, only the added mapping update data may be added to the spatial database.
[0071] S706: Update the layer data according to the layer style update data indicated by the data update request.
[0072] Specifically, the data update request may also include data for updating the layer style, and the layer data is updated according to the layer style update data.
[0073] The step of slicing the layer data according to a preset slicing condition to obtain tile data includes: The updated layer data is re-sliced according to the preset slicing conditions to obtain tile data.
[0074] Specifically, since the layer data is updated, it needs to be sliced again, and the above steps S208-S21 are processed. Therefore, the updated layer data can be sliced again according to the preset slicing conditions to obtain tile data.
[0075] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0076] Based on the same inventive concept, the embodiment of the present disclosure also provides a data query device for implementing the data query method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data query device embodiments provided below can refer to the limitations on the data query method above, and will not be repeated here.
[0077] In one embodiment, Figure 8 As shown, a data query device 800 is provided, comprising: a data acquisition module 802, a data mapping module 804, a layer data determination module 806, a slicing module 808, a storage module 810 and a query module 812, wherein: The data acquisition module 802 is used to acquire the mapping data of the target area and store the mapping data into the spatial database according to the spatial element fields in the spatial database; A data mapping module 804 is used to map the mapping data in the spatial database to a map editor; A layer data determination module 806, configured to determine frame information based at least on the mapping data, and configure layer data matching the mapping data according to the frame information; The slicing module 808 is used to slice the layer data according to a preset slicing condition to obtain tile data; A storage module 810, configured to store the tile data in a document-oriented database and set version information of the tile data in the document-oriented database; The query module 812 is used to, in response to receiving a query request, perform a query in the document-oriented database according to the query information indicated by the query request to obtain a query result.
[0078] In one embodiment of the device, the device further comprises: The data loading module is used to load the tile data using the earth visualization platform.
[0079] The query module 812 includes: The first query module is used to perform spatial retrieval in the document-oriented database according to at least one of the layer information and the border information indicated by the query request to obtain a query result.
[0080] The query request includes a mouse click event; a second query module is used to determine the mouse click event triggered in the earth visualization platform after loading the tile data, so as to instruct the earth visualization platform to send the layer information and border information indicated by the mouse click event to the document-oriented database; perform spatial retrieval in the document-oriented database according to the layer information and border information, and display the query results in the earth visualization platform.
[0081] In one embodiment of the device, when there are multiple target areas; the layer data determination module 806 is further used to determine multiple mapping data corresponding to the multiple target areas; at least based on the border information determined by each mapping data and the layer style matching each mapping data, configure the layer data matching each mapping data; superimpose the layer data matching each mapping data to obtain a layer group.
[0082] In one embodiment of the device, when the layer style includes multiple layer styles; the layer data determination module 806 is further used to create an initial layer matching each layer style; at least based on the border information determined by each mapping data and the layer style matching each mapping data, configure the layer data in the initial layer matching each layer style; and superimpose the configured layer data to obtain a layer group.
[0083] In one embodiment of the device, the first query module is also used to determine the stacking order of layer data in the layer group; according to the stacking order and based on at least one of the layer information and border information indicated by the query request, spatial retrieval is performed in sequence in the document-oriented database to obtain query results that match each layer data.
[0084] In one embodiment of the device, the device also includes: an update module, which is used to respond to a data update request, update the spatial database according to the mapping update data indicated by the data update request; map the updated data in the spatial database to the map editor; and update the layer data according to the layer style update data indicated by the data update request.
[0085] The slicing module 808 is further used to re-slice the updated layer data according to a preset slicing condition to obtain tile data.
[0086] Each module in the above data query device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0087] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig. 9 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store mapping data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data query method is implemented.
[0088] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a data query method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.
[0089] Those skilled in the art will understand that Fig. 9 The structure shown in or 10 is merely a block diagram of a partial structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0090] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0091] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0092] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0093] It should be noted that the mapping data of the target area involved in the present disclosure are all information and data authorized by the user or fully authorized by all parties.
[0094] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided by the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but are not limited to this.
[0095] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0096] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.
Claims
1. A data query method, characterized in that: The method comprises: Acquire mapping data of a target area, and store the mapping data in the spatial database according to the spatial element fields in the spatial database; Mapping the mapping data in the spatial database to a map editor; Determine frame information based at least on the mapping data, and configure layer data matching the mapping data according to the frame information; Slicing the layer data according to a preset slicing condition to obtain tile data; Storing the tile data in a document-oriented database, and setting version information of the tile data in the document-oriented database; In response to receiving a query request, querying the document-oriented database according to the query information indicated by the query request to obtain a query result; wherein After setting the version information of the tile data in the document-oriented database, the method further includes: loading the tile data using an earth visualization platform; performing a query in the document-oriented database according to the query information indicated by the query request to obtain a query result, including: Performing spatial search in the document-oriented database according to at least one of the layer information and the border information indicated by the query request to obtain a query result; Or; the query request includes a mouse click event; Determine the mouse click event triggered in the earth visualization platform after the tile data is loaded, so as to instruct the earth visualization platform to send the layer information and border information indicated by the mouse click event to the document guidance database; A spatial search is performed in the document-oriented database according to the layer information and the border information, and the query result is displayed in the earth visualization platform.
2. The method according to claim 1, characterized in that When there are multiple target areas; The determining of the frame information at least based on the mapping data, and configuring the layer data matching the mapping data according to the frame information, includes: Determining a plurality of mapping data corresponding to the plurality of target areas; Based at least on the frame information determined for each mapping data and the layer style matching each mapping data, configure the layer data matching each mapping data; The layer data that matches each of the mapping data are superimposed to obtain a layer group.
3. The method according to claim 2, characterized in that When the layer style includes multiple layer styles; determining the border information at least based on the mapping data, and configuring the layer data matching the mapping data according to the border information, includes: Create initial layers that match each layer style; Based at least on the frame information determined for each mapping data and the layer style matching each mapping data, configure the layer data in the initial layer matching each layer style; Overlay the configured layer data to obtain a layer group.
4. The method according to claim 2 or 3, characterized in that: The step of performing spatial search in the document-oriented database according to at least one of the layer information and the border information indicated by the query request to obtain a query result includes: Determine the stacking order of layer data in the layer group; According to the stacking order and based on at least one of the layer information and the border information indicated by the query request, spatial retrieval is performed in sequence in the document-oriented database to obtain query results matching each layer data.
5. The method according to claim 2 or 3, characterized in that: The method further comprises: In response to a data update request, updating the mapping update data indicated by the data update request in the spatial database; Mapping the updated data in the spatial database to the map editor; Update the layer data according to the layer style update data indicated by the data update request; The step of slicing the layer data according to a preset slicing condition to obtain tile data includes: The updated layer data is re-sliced according to the preset slicing conditions to obtain tile data.
6. A data query device, characterized in that: The device comprises: A data acquisition module, used to acquire the mapping data of the target area, and store the mapping data into the spatial database according to the spatial element fields in the spatial database; A data mapping module, used for mapping the mapping data in the spatial database to a map editor; A layer data determination module, configured to determine frame information based at least on the mapping data, and configure layer data matching the mapping data according to the frame information; A slicing module, used for slicing the layer data according to a preset slicing condition to obtain tile data; A storage module, used for storing the tile data in a document-oriented database, and setting version information of the tile data in the document-oriented database; A query module is used to query the document-oriented database in response to receiving a query request and according to the query information indicated by the query request to obtain a query result; wherein After setting the version information of the tile data in the document-oriented database, the tile data is also loaded using the earth visualization platform; and querying the document-oriented database according to the query information indicated by the query request to obtain the query result includes: Performing spatial search in the document-oriented database according to at least one of the layer information and the border information indicated by the query request to obtain a query result; Or; the query request includes a mouse click event; Determine the mouse click event triggered in the earth visualization platform after the tile data is loaded, so as to instruct the earth visualization platform to send the layer information and border information indicated by the mouse click event to the document guidance database; A spatial search is performed in the document-oriented database according to the layer information and the border information, and the query result is displayed in the earth visualization platform.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Map data query method and system, terminal and server
CN110889048A
Map editor, map engine, map editing system and method, and storage medium
CN112559667A
Method and system for serving vector tile map by releasing vector map data
CN116074201A
Search results with maps
US20130159825A1
Interactive Map
US20130339891A1
