A data display method, apparatus, terminal device, and storage medium
By using WebGIS technology to process administrative division codes and perform cluster queries on rock, mineral, and fossil specimen data, the problem of poor intuitiveness of origin location information in traditional display methods has been solved, achieving efficient visualization and sharing of specimen resources and improving data loading speed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-12
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional rock, mineral, and fossil specimen resource sharing websites display information through text and images, but the location information is not intuitive or visually appealing, making it difficult for users to intuitively obtain data on specimen resources of interest.
Using WebGIS technology, the system obtains the origin information of rock, mineral and fossil specimen data, preprocesses it to generate administrative division codes, performs cluster queries, and displays it on a map in the form of vector feature annotations. The WebGIS system is developed using a front-end and back-end device separation mode, with the back-end performing cluster queries and the front-end using OpenLayers to load and display the data.
It improved the data loading and rendering speed of front-end device pages, realized the visualization and sharing of rock, mineral and fossil specimen data, and enhanced the intuitiveness and visibility of the data.
Smart Images

Figure CN115827803B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a data display method, apparatus, terminal device, and storage medium. Background Technology
[0002] Rock, mineral, and fossil specimen resources refer to the mineral, rock, ore, and fossil specimens, along with related data and research materials, collected, organized, studied, tested, and preserved by geologists during regional geological surveys and earth science research. Data sharing of rock, mineral, and fossil specimen resources is of great significance for scientific research, professional teaching, and science popularization in the field of earth sciences.
[0003] Traditional specimen resource sharing websites typically display specimen data through text and images, with the specimen's provenance usually described in text. Textual descriptions lack intuitiveness and visual appeal, the relationships between specimen data are not readily apparent, users cannot directly understand the geographical information surrounding the specimen's collection site, and it is difficult to intuitively obtain specimen resource data of interest through visualization. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a data display method, apparatus, terminal device, and storage medium that overcomes or at least partially solves the above problems.
[0005] In a first aspect, embodiments of the present invention provide a data display method, the method comprising:
[0006] Obtain rock, mineral and fossil specimen data, wherein the rock, mineral and fossil specimen data includes at least the origin information of the specimen data;
[0007] The rock, mineral and fossil specimen data are preprocessed to obtain the administrative division code field corresponding to the rock, mineral and fossil specimen data;
[0008] Based on the administrative division code field, clustering query is performed on the rock, mineral and fossil specimen data to obtain query results, wherein the query results include at least the latitude and longitude of the administrative division center and the number of specimens;
[0009] The query results are displayed on a map in the form of vector feature annotations using an aggregated layer.
[0010] Optionally, the preprocessing of the rock, mineral, and fossil specimen data to obtain the administrative division code field corresponding to the rock, mineral, and fossil specimen data includes:
[0011] The origin information corresponding to the acquired rock and mineral fossil specimen data is combined according to the conditions of province name, city name, district name or county name to obtain the combination result;
[0012] The combined results are then matched with preset standardized place names;
[0013] If the combination result matches the preset standardized place name, the place information corresponding to the successfully matched combination result will be used to generate an administrative division code corresponding to the place information.
[0014] Optionally, displaying the query results on a map in the form of vector feature annotations through an aggregated layer includes:
[0015] Use the online map of Tianditu as the base map of the WebGIS system;
[0016] Two layers are created on the base map. The two layers include at least an aggregation layer and a boundary layer. The aggregation layer is used to display aggregated labels of specimen data according to administrative divisions, and the boundary layer is used to dynamically display the geographical boundaries of the administrative divisions corresponding to the map labels currently selected by the user.
[0017] Optionally, displaying the query results on a map in the form of vector feature annotations through an aggregated layer further includes:
[0018] The front-end device sends a request to the back-end interface;
[0019] The front-end device obtains JSON format data aggregated by the back-end according to different regions;
[0020] The front-end device parses the JSON format data, creates vector features, and stores the vector features in a cache array;
[0021] The front-end device adds all vector features from the cache array to the layer, and styles are dynamically generated by the style functions defined by the layer. OpenLayers automatically applies these styles to display map aggregate labels, with the label locations being the center latitude and longitude of the corresponding regions.
[0022] Optionally, the method further includes:
[0023] In response to a user's command to view clustering labels, the system displays a list of data associated with the clustering labels in paginated format at a preset location on the display page. Each piece of resource data in the data list is associated with a details page on the website corresponding to that resource data.
[0024] Optionally, the method further includes:
[0025] Based on the map zoom level, aggregated labels for different levels of areas are displayed hierarchically on the map;
[0026] Specifically, it includes:
[0027] The initial page displays provincial aggregate annotations, with annotation text showing the number of specimens from each province;
[0028] When the map zoom level is greater than the first preset level, switch from provincial aggregated labeling to city aggregated labeling to display the number of specimens in each city;
[0029] When the map zoom level is greater than the second preset level, the system switches from city-level aggregated labeling to district-level aggregated labeling and displays the number of specimens in each district or county, wherein the second preset level is greater than the first preset level.
[0030] Optionally, the method further includes:
[0031] In response to user input of movement commands, the color of the marker icon that the mouse is hovering over changes;
[0032] The boundary layer above the aggregation layer will load the administrative division boundary vector features corresponding to the aggregation annotation, so that the administrative division boundary displays the geographic area associated with the current aggregation annotation point.
[0033] Secondly, embodiments of the present invention provide a data display device, the device comprising:
[0034] An acquisition module is used to acquire rock, mineral and fossil specimen data, wherein the rock, mineral and fossil specimen data includes at least the origin information of the specimen data;
[0035] The processing module is used to preprocess the rock, mineral and fossil specimen data to obtain the administrative division code field corresponding to the rock, mineral and fossil specimen data;
[0036] The clustering module is used to perform clustering queries on the rock, mineral and fossil specimen data based on the administrative division code field to obtain query results, wherein the query results include at least the latitude and longitude of the administrative division center and the number of specimens;
[0037] The display module is used to display the query results on a map in the form of vector feature annotations through an aggregated layer.
[0038] Optionally, the processing module is used for:
[0039] The origin information corresponding to the acquired rock and mineral fossil specimen data is combined according to the conditions of province name, city name, district name or county name to obtain the combination result;
[0040] The combined results are then matched with preset standardized place names;
[0041] If the combination result matches the preset standardized place name, the place information corresponding to the successfully matched combination result will be used to generate an administrative division code corresponding to the place information.
[0042] Optionally, the display module is used for:
[0043] Use the online map of Tianditu as the base map of the WebGIS system;
[0044] Two layers are created on the base map. The two layers include at least an aggregation layer and a boundary layer. The aggregation layer is used to display aggregated labels of specimen data according to administrative divisions, and the boundary layer is used to dynamically display the geographical boundaries of the administrative divisions corresponding to the map labels currently selected by the user.
[0045] Optionally, the display module is used for:
[0046] Send a request to the backend interface;
[0047] Retrieve JSON data aggregated by different regions from the backend;
[0048] Parse the JSON format data, create vector features, and store the vector features in a cache array;
[0049] All vector features in the cache array are added to the layer, and styles are dynamically generated by the style functions defined by the layer. OpenLayers automatically applies the styles to display map aggregate labels, with the label locations being the center latitude and longitude of the corresponding different regions.
[0050] Optionally, the display module is further configured to:
[0051] In response to a user's command to view clustering labels, the system displays a list of data associated with the clustering labels in paginated format at a preset location on the display page. Each piece of resource data in the data list is associated with a details page on the website corresponding to that resource data.
[0052] Optionally, the display module is further configured to:
[0053] Based on the map zoom level, aggregated labels for different levels of areas are displayed hierarchically on the map;
[0054] Specifically used for:
[0055] The initial page displays provincial aggregate annotations, with annotation text showing the number of specimens from each province;
[0056] When the map zoom level is greater than the first preset level, switch from provincial aggregated labeling to city aggregated labeling to display the number of specimens in each city;
[0057] When the map zoom level is greater than the second preset level, the system switches from city-level aggregated labeling to district-level aggregated labeling and displays the number of specimens in each district or county, wherein the second preset level is greater than the first preset level.
[0058] Optionally, the display module is further configured to:
[0059] In response to user input of movement commands, the color of the marker icon that the mouse is hovering over changes;
[0060] The boundary layer above the aggregation layer will load the administrative division boundary vector features corresponding to the aggregation annotation, so that the administrative division boundary displays the geographic area associated with the current aggregation annotation point.
[0061] Thirdly, embodiments of the present invention provide a terminal device, including: at least one processor and a memory;
[0062] The memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the data display method provided in the first aspect.
[0063] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed, implements the data display method provided in the first aspect.
[0064] The embodiments of the present invention have the following advantages:
[0065] The data display method, apparatus, terminal device, and storage medium provided in this embodiment of the invention acquire rock, mineral, and fossil specimen data, wherein the rock, mineral, and fossil specimen data includes at least the origin information of the specimen data; preprocess the rock, mineral, and fossil specimen data to obtain the administrative division code field corresponding to the rock, mineral, and fossil specimen data; perform clustering query on the rock, mineral, and fossil specimen data according to the administrative division code field to obtain query results, wherein the query results include at least the latitude and longitude of the administrative division center and the number of specimens; display the query results on a map in the form of vector feature annotation through an aggregated layer. This embodiment of the invention adopts a front-end and back-end device separation mode to develop a WebGIS system. The back-end device performs clustering query on massive specimen data according to administrative divisions (province, city, district, or county) to provide a data query interface for the front-end device; the front-end device loads and displays the aggregated data in the form of vector feature annotation using OpenLayers. Since the amount of data after clustering query is relatively small, it can significantly improve the data loading and rendering speed of the front-end device page. Attached Figure Description
[0066] Figure 1 This is a flowchart illustrating the steps of an embodiment of the data display method of the present invention;
[0067] Figure 2 This is a structural framework diagram of a data display system according to the present invention;
[0068] Figure 3 This is a structural block diagram of an embodiment of a data display device according to the present invention;
[0069] Figure 4 This is a schematic diagram of the structure of a terminal device according to the present invention. Detailed Implementation
[0070] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0071] Traditional specimen resource sharing websites typically display specimen data through text and images, with the specimen's provenance usually described in text. Textual descriptions lack intuitiveness and visual appeal, and the relationships between specimen data are not readily apparent, making it difficult for users to intuitively access specimen resource data of interest in a visual manner.
[0072] WebGIS is a product of the combination of Web technology and GIS technology. It combines the platform advantages of the Internet with the spatial visualization capabilities of GIS to provide a convenient and effective way to share geographic information-based data resources. Rock, mineral, and fossil specimen data contain location information, so the geographic information contained within can be analyzed and mined. By combining WebGIS technology, a web map visualization and sharing service for specimen data can be realized, promoting the sharing of specimen resource information with a new display method and fully realizing the value of the data.
[0073] WebGIS systems based on OpenLayers often employ front-end cluster aggregation technology for visualizing massive spatial data. This technology aggregates spatial data on the front end to reduce the number of page markers and improve page rendering speed. While front-end aggregation improves page rendering speed, browsers still face speed and performance issues when reading, loading, and processing massive spatial data. To address this, this invention provides a data display method for displaying massive amounts of rock, mineral, and fossil specimen data. The execution entity in this embodiment is a data display device, installed on a terminal device.
[0074] Reference Figure 1 The diagram illustrates a flowchart of an embodiment of a data display method according to the present invention. The method may specifically include the following steps:
[0075] S101. Obtain rock, mineral and fossil specimen data, wherein the rock, mineral and fossil specimen data shall at least include the origin information of the specimen data;
[0076] Specifically, the terminal equipment acquires a large amount of rock, mineral and fossil specimen data, which includes at least the specimen's origin information, as well as the specimen's name, category, characteristics, and purpose.
[0077] S102. Preprocess the rock, mineral and fossil specimen data to obtain the administrative division code field corresponding to the rock, mineral and fossil specimen data;
[0078] Specifically, the descriptive information of the origin of rock and mineral fossil specimens mainly includes the location information such as the province, city, district or county of the collection site and related locations. The administrative division of province, city, district or county is the greatest common denominator of its geographical location. Therefore, in combination with the relevant coding standards of national administrative divisions, the origin attributes of the specimens are matched, corrected and coded in a three-level structure of province, city, district or county.
[0079] (1) The administrative division codes are mainly based on the national standard GB / T2260. The latest administrative division codes published on the websites of the National Bureau of Statistics and the Ministry of Civil Affairs are supplemented on the basis of GB / T2260, converted into standardized SQL data, and imported into the database as the system's administrative division code dictionary table.
[0080] (2) Call the Amap API interface to collect data such as the geographical boundaries and central latitude and longitude of provincial, municipal, and district administrative divisions available on Amap, and save it to the database as the system's administrative division geographical dictionary table. The system's administrative division geographical dictionary table and the code dictionary table are linked through a primary key.
[0081] (3) Write SQL statements in the database to combine the province, city, district, or county names included in the descriptive origin information of the rock, mineral, and fossil specimen data table in the resource database, and then match them with the standardized place names in the dictionary table. Generate corresponding administrative division codes for successfully matched origin information. For unmatched origin information, supplement with manual intervention; some data are manually checked, and the origin information is corrected before the corresponding administrative division codes are added. If the origin information is incorrect or difficult to correct, the administrative division code field is left empty.
[0082] Terminal devices include front-end devices and back-end devices, where front-end devices are used for display and back-end devices are used for clustering processing.
[0083] S103. Based on the administrative division code field, perform clustering query on the rock, mineral and fossil specimen data to obtain the query results. The query results shall include at least the latitude and longitude of the administrative division center and the number of specimens.
[0084] Specifically, the data access layer of the backend device performs clustering queries on massive sample data according to administrative divisions (provinces, cities, or districts) based on the administrative division code field, and organizes the query results into JSON format, which includes: latitude and longitude of the administrative division center, number of samples, and other statistical attributes.
[0085] S104. Display the query results on a map in the form of vector feature annotations through an aggregated layer.
[0086] Specifically, the front-end device uses the Tianditu online map as the base map for the WebGIS system, creating two layers on the base map: an aggregation layer and a boundary layer. The aggregation layer is used to display the aggregated labels of the specimens according to administrative divisions; the boundary layer is used to dynamically display the geographical boundaries of the administrative divisions corresponding to the map labels currently selected by the user.
[0087] The data display method provided in this embodiment of the invention involves acquiring rock, mineral, and fossil specimen data, which includes at least the origin information of the specimens; preprocessing the rock, mineral, and fossil specimen data to obtain the administrative division code field corresponding to the rock, mineral, and fossil specimen data; performing clustering queries on the rock, mineral, and fossil specimen data based on the administrative division code field to obtain query results, which include at least the latitude and longitude of the administrative division center and the number of specimens; and displaying the query results on a map in the form of vector feature annotations through an aggregated layer. This embodiment of the invention adopts a front-end and back-end device separation mode to develop a WebGIS system. The back-end device performs clustering queries on massive specimen data according to administrative divisions (provinces, cities, districts, or counties) to provide a data query interface for the front-end device. The front-end device loads and displays the aggregated data in the form of vector feature annotations using OpenLayers. Since the amount of data after clustering queries is relatively small, it can significantly improve the data loading and rendering speed of the front-end device page.
[0088] Another embodiment of the present invention further supplements the data display method provided in the above embodiments.
[0089] Optionally, the rock, mineral, and fossil specimen data are preprocessed to obtain the administrative division code field corresponding to the rock, mineral, and fossil specimen data, including:
[0090] The origin information corresponding to the acquired rock, mineral and fossil specimen data is combined according to the conditions of province name, city name, district name or county name to obtain the combined result;
[0091] The combined results are matched with preset standardized place names;
[0092] If the combination result matches the preset standardized place name, the place information corresponding to the successfully matched combination result will be used to generate the administrative division code corresponding to the place information.
[0093] Optionally, the query results can be displayed on a map as vector feature labels using an aggregated layer, including:
[0094] Use the online map of Tianditu as the base map of the WebGIS system;
[0095] Create two layers on the base map. The two layers should include at least an aggregation layer and a boundary layer. The aggregation layer is used to display aggregated labels of the specimen data by administrative division, and the boundary layer is used to dynamically display the geographical boundaries of the administrative divisions corresponding to the map labels currently selected by the user.
[0096] Optionally, displaying the query results on a map using vector feature labels via an aggregated layer also includes:
[0097] The front-end device sends a request to the back-end interface;
[0098] The front-end device obtains JSON format data aggregated by the back-end according to different regions;
[0099] The front-end device parses the JSON format data, creates vector features, and stores the vector features in a cache array;
[0100] The front-end device adds all vector features from the cache array to the layer, and styles are dynamically generated by the style functions defined by the layer. OpenLayers automatically applies these styles to display map aggregate labels, with the label locations being the center latitude and longitude of the corresponding regions.
[0101] Using the Tianditu online map as the base map for the WebGIS system, two layers are created on the base map: an aggregation layer and a boundary layer. The aggregation layer is used to display the aggregated labels of specimens according to administrative divisions; the boundary layer is used to dynamically display the geographical boundaries of the administrative divisions corresponding to the map labels currently selected by the user.
[0102] A StyleFunction is created for both the aggregation layer and the boundary layer to set the display style of the vector features in the layer. The front-end and back-end interaction process is as follows: the front-end sends a request to the back-end interface to obtain JSON format data aggregated by province, city, district, or county; the front-end parses the JSON result data, creates vector features, and stores them in a cache array; then, all vector features in the cache array are added to the layer, and the StyleFunction defined for the layer dynamically generates the style. OpenLayers automatically applies the style to all vector features in the layer, displaying map aggregation labels, with the label positions being the center latitude and longitude of the corresponding province, city, and district.
[0103] Optionally, the method further includes:
[0104] In response to the user's command to view clustering labels, the data list associated with the clustering labels is displayed in paginated format at a preset location on the display page. Each piece of resource data in the data list is associated with the corresponding details page on the website.
[0105] Specifically, when a user clicks on a cluster label, a list of data associated with that cluster label is displayed on the left side of the page. Each resource data item in the list is linked to the details page of that data item on the website. When the origin information is clicked, the cluster layer is first cleared, then the vector features corresponding to that specimen data are added to the cluster layer, and the label icon is displayed on the map with the geographical location of the district or county-level center of the administrative division where the specimen's origin is located.
[0106] Optionally, the method further includes:
[0107] Based on the map zoom level, aggregated labels for different levels of areas are displayed hierarchically on the map;
[0108] Specifically, it includes:
[0109] The initial page displays provincial aggregate annotations, with annotation text showing the number of specimens from each province;
[0110] When the map zoom level is greater than the first preset level, switch from provincial aggregated labeling to city aggregated labeling to display the number of specimens in each city;
[0111] When the map zoom level is greater than the second preset level, the system switches from city-level aggregated labeling to district-level aggregated labeling and displays the number of specimens in each district. The second preset level is greater than the first preset level.
[0112] Specifically, the system automatically displays aggregated labels at three levels—province, city, and district or county—on the map based on the map zoom level. The initial page displays provincial aggregated labels, with the label text showing the number of specimens in each province. As the map zooms in to a certain level, it switches to city-level aggregated labels, displaying the number of specimens in each city. If the map is zoomed in further, district-level aggregated labels will load and display the number of specimens in each district or county.
[0113] Optionally, the method further includes:
[0114] In response to user input of movement commands, the color of the marker icon that the mouse is hovering over changes;
[0115] The boundary layer above the aggregation layer will load the administrative division boundary vector features corresponding to the aggregation annotation, so that the administrative division boundary displays the geographic area associated with the current aggregation annotation point.
[0116] Specifically, when the user moves the mouse over the marker icon, the icon changes from green to red, and the boundary layer above the aggregation layer dynamically loads the administrative division boundary vector features corresponding to the aggregation marker. This dynamic display of administrative division boundaries allows users to intuitively understand the geographical area associated with the current aggregation marker. Simultaneously, a popup information box appears, displaying details of the cluster marker and summary statistics on the type and quantity of specimen resources within the area. After the mouse leaves the area, the icon returns to its original state, the popup information box closes automatically, and all vector features on the boundary layer are cleared. Figure 2 This is a structural framework diagram of a data display system according to the present invention. It adopts an open-source WebGIS solution based on OpenLayers and is developed and implemented based on the currently popular front-end and back-end separation model. This data display system is a WebGIS system for rock, mineral and fossil specimen resources, including a front-end application layer, a back-end logic layer and a data layer. The front-end application layer is user-facing and used for map display and operation of rock, mineral and fossil specimen data. The back-end logic layer encapsulates the system's business processing logic and is mainly responsible for clustering and querying rock, mineral and fossil specimen data. The data layer is used for local database table MySQL storage and Tianditu online map service resources.
[0117] Optionally, the backend logic layer uses the Spring Boot + Mybatis framework to develop the data interface, and is divided into a three-layer architecture, including:
[0118] (1) The data access layer (Dao) uses the Mybatis framework to encapsulate methods for manipulating data. This layer consists of two parts: an XML configuration file for encapsulating SQL statements and an interface class for calling SQL methods.
[0119] (2) The business logic layer encapsulates basic business logic operations and injects the Mapper method interface class of the data access layer through Spring IOC. The business logic layer obtains the database operation results from the data access layer by calling the methods in the Mapper interface class and performs different business logic processing according to requirements.
[0120] (3) The business control layer provides an API interface for external access. After receiving an HTTP access request, it calls the business logic layer to complete the business logic processing and returns the result data to the interface caller.
[0121] Based on the preceding data preprocessing, the origin information of the specimen data is standardized by place name to generate an administrative division code field. The backend data access layer performs clustering queries on the massive specimen data according to administrative divisions (provinces, cities, or districts) based on the administrative division code field. The query results include: latitude and longitude of the administrative division center, number of specimens, and other statistical attributes. Finally, the query results are converted into JSON format by the business logic layer and returned to the frontend via an API.
[0122] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0123] The data display method provided in this embodiment of the invention involves acquiring rock, mineral, and fossil specimen data, which includes at least the origin information of the specimens; preprocessing the rock, mineral, and fossil specimen data to obtain the administrative division code field corresponding to the rock, mineral, and fossil specimen data; performing clustering queries on the rock, mineral, and fossil specimen data based on the administrative division code field to obtain query results, which include at least the latitude and longitude of the administrative division center and the number of specimens; and displaying the query results on a map in the form of vector feature annotations through an aggregated layer. This embodiment of the invention adopts a front-end and back-end device separation mode to develop a WebGIS system. The back-end device performs clustering queries on massive specimen data according to administrative divisions (provinces, cities, districts, or counties) to provide a data query interface for the front-end device. The front-end device loads and displays the aggregated data in the form of vector feature annotations using OpenLayers. Since the amount of data after clustering queries is relatively small, it can significantly improve the data loading and rendering speed of the front-end device page.
[0124] Another embodiment of the present invention provides a data display device for performing the data display method provided in the above embodiments.
[0125] Reference Figure 3 The diagram illustrates a structural block diagram of an embodiment of a data display device according to the present invention. The device may specifically include the following modules: an acquisition module 501, a processing module 502, a clustering module 503, and a display module 504, wherein:
[0126] The acquisition module 501 is used to acquire rock, mineral and fossil specimen data, wherein the rock, mineral and fossil specimen data includes at least the origin information of the specimen data;
[0127] Processing module 502 is used to preprocess the rock, mineral and fossil specimen data to obtain the administrative division code field corresponding to the rock, mineral and fossil specimen data;
[0128] Clustering module 503 is used to perform clustering queries on rock, mineral and fossil specimen data based on the administrative division code field to obtain query results. The query results include at least the latitude and longitude of the administrative division center and the number of specimens.
[0129] Display module 504 is used to display the query results on a map in the form of vector feature annotations through an aggregated layer.
[0130] The data display device provided in this embodiment of the invention acquires rock, mineral, and fossil specimen data, wherein the rock, mineral, and fossil specimen data includes at least the origin information of the specimen data; preprocesses the rock, mineral, and fossil specimen data to obtain the administrative division code field corresponding to the rock, mineral, and fossil specimen data; performs clustering query on the rock, mineral, and fossil specimen data according to the administrative division code field to obtain query results, wherein the query results include at least the latitude and longitude of the administrative division center and the number of specimens; and displays the query results on a map in the form of vector feature annotation through an aggregated layer. This embodiment of the invention adopts a front-end and back-end device separation mode to develop a WebGIS system. The back-end device performs clustering query on massive specimen data according to administrative divisions (province, city, district, or county) to provide a data query interface for the front-end device; the front-end device loads and displays the aggregated data in the form of vector feature annotation using OpenLayers. Since the amount of data after clustering query is relatively small, it can significantly improve the data loading and rendering speed of the front-end device page.
[0131] Another embodiment of the present invention further provides a description of the data display device provided in the above embodiments.
[0132] Optionally, the processing module is used for:
[0133] The origin information corresponding to the acquired rock, mineral and fossil specimen data is combined according to the conditions of province name, city name, district name or county name to obtain the combined result;
[0134] The combined results are matched with preset standardized place names;
[0135] If the combination result matches the preset standardized place name, the place information corresponding to the successfully matched combination result will be used to generate the administrative division code corresponding to the place information.
[0136] Optionally, the display module is used for:
[0137] Use the online map of Tianditu as the base map of the WebGIS system;
[0138] Create two layers on the base map. The two layers should include at least an aggregation layer and a boundary layer. The aggregation layer is used to display aggregated labels of the specimen data by administrative division, and the boundary layer is used to dynamically display the geographical boundaries of the administrative divisions corresponding to the map labels currently selected by the user.
[0139] Optionally, the display module is used for:
[0140] Send a request to the backend interface;
[0141] Retrieve JSON data aggregated by different regions from the backend;
[0142] Parse the JSON data, create vector features, and store the vector features in a cache array;
[0143] All vector features in the cache array are added to the layer, and styles are dynamically generated by the style functions defined by the layer. OpenLayers automatically applies the styles to display map aggregate labels, with the label locations being the center latitude and longitude of the corresponding different regions.
[0144] Optionally, the display module is also used for:
[0145] In response to the user's command to view clustering labels, the data list associated with the clustering labels is displayed in paginated format at a preset location on the display page. Each piece of resource data in the data list is associated with the corresponding details page on the website.
[0146] Optionally, the display module is also used for:
[0147] Based on the map zoom level, aggregated labels for different levels of areas are displayed hierarchically on the map;
[0148] Specifically used for:
[0149] The initial page displays provincial aggregate annotations, with annotation text showing the number of specimens from each province;
[0150] When the map zoom level is greater than the first preset level, switch from provincial aggregated labeling to city aggregated labeling to display the number of specimens in each city;
[0151] When the map zoom level is greater than the second preset level, the system switches from city-level aggregated labeling to district-level aggregated labeling and displays the number of specimens in each district or county. The second preset level is greater than the first preset level.
[0152] Optionally, the display module is also used for:
[0153] In response to user input of movement commands, the color of the marker icon that the mouse is hovering over changes;
[0154] The boundary layer above the aggregation layer will load the administrative division boundary vector features corresponding to the aggregation annotation, so that the administrative division boundary displays the geographic area associated with the current aggregation annotation point.
[0155] It should be noted that each of the implementable methods in this embodiment can be implemented individually or in any combination without conflict. This application does not limit this.
[0156] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0157] The data display device provided in this embodiment of the invention acquires rock, mineral, and fossil specimen data, wherein the rock, mineral, and fossil specimen data includes at least the origin information of the specimen data; preprocesses the rock, mineral, and fossil specimen data to obtain the administrative division code field corresponding to the rock, mineral, and fossil specimen data; performs clustering query on the rock, mineral, and fossil specimen data according to the administrative division code field to obtain query results, wherein the query results include at least the latitude and longitude of the administrative division center and the number of specimens; and displays the query results on a map in the form of vector feature annotation through an aggregated layer. This embodiment of the invention adopts a front-end and back-end device separation mode to develop a WebGIS system. The back-end device performs clustering query on massive specimen data according to administrative divisions (province, city, district, or county) to provide a data query interface for the front-end device; the front-end device loads and displays the aggregated data in the form of vector feature annotation using OpenLayers. Since the amount of data after clustering query is relatively small, it can significantly improve the data loading and rendering speed of the front-end device page.
[0158] In another embodiment of the present invention, a terminal device is provided for executing the data display method provided in the above embodiments.
[0159] Figure 4 This is a schematic diagram of the structure of a terminal device according to the present invention, such as... Figure 4 As shown, the terminal device includes: at least one processor 601 and a memory 602;
[0160] The memory stores a computer program; at least one processor executes the computer program stored in the memory to implement the data display method provided in the above embodiments.
[0161] The terminal device provided in this embodiment acquires rock, mineral, and fossil specimen data, which includes at least the origin information of the specimens; preprocesses the rock, mineral, and fossil specimen data to obtain the administrative division code field corresponding to the rock, mineral, and fossil specimen data; performs clustering queries on the rock, mineral, and fossil specimen data based on the administrative division code field to obtain query results, which include at least the latitude and longitude of the administrative division center and the number of specimens; and displays the query results on a map in the form of vector feature annotations through an aggregated layer. This embodiment of the invention adopts a front-end and back-end device separation mode to develop the WebGIS system. The back-end device performs clustering queries on massive specimen data according to administrative divisions (provinces, cities, districts, or counties) to provide a data query interface for the front-end device; the front-end device loads and displays the aggregated data in the form of vector feature annotations using OpenLayers. Since the amount of data after clustering queries is relatively small, it can significantly improve the data loading and rendering speed of the front-end device page.
[0162] Another embodiment of this application provides a computer-readable storage medium storing a computer program that, when executed, implements the data display method provided in any of the above embodiments.
[0163] According to the computer-readable storage medium of this embodiment, rock, mineral, and fossil specimen data is acquired, wherein the rock, mineral, and fossil specimen data includes at least the origin information of the specimen data; the rock, mineral, and fossil specimen data is preprocessed to obtain the administrative division code field corresponding to the rock, mineral, and fossil specimen data; based on the administrative division code field, the rock, mineral, and fossil specimen data is clustered and queried to obtain query results, wherein the query results include at least the latitude and longitude of the administrative division center and the number of specimens; the query results are displayed on a map in the form of vector feature annotations through an aggregated layer. This embodiment of the invention adopts a front-end and back-end device separation mode to develop a WebGIS system. The back-end device performs clustering queries on massive specimen data according to administrative divisions (provinces, cities, districts, or counties) to provide a data query interface for the front-end device; the front-end device loads and displays the aggregated data in the form of vector feature annotations using OpenLayers. Since the amount of data after clustering queries is relatively small, it can significantly improve the data loading and rendering speed of the front-end device page.
[0164] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0165] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0166] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or electronic device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or electronic device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or electronic device that includes said element.
Claims
1. A data display method characterized by, The method comprises: acquiring rock and mineral fossil specimen data, wherein the rock and mineral fossil specimen data at least comprises provenance information of specimen data; preprocessing the rock and mineral fossil specimen data to obtain an administrative division code field corresponding to the rock and mineral fossil specimen data; performing cluster query on the rock and mineral fossil specimen data according to the administrative division code field to obtain a query result, wherein the query result at least comprises administrative division center longitude and latitude and specimen quantity; displaying the query result on a map in the form of vector element annotation through an aggregation layer; the preprocessing of the rock and mineral fossil specimen data to obtain the administrative division code field corresponding to the rock and mineral fossil specimen data comprises: combining the acquired provenance information of the rock and mineral fossil specimen data according to province name, city name, district name or county name to obtain a combination result; matching the combination result with a preset standardized place name; if the combination result matches the preset standardized place name, generating the provenance information corresponding to the matching combination result to obtain an administrative division code corresponding to the provenance information; the displaying of the query result on the map in the form of vector element annotation through the aggregation layer comprises: using an online map of Tianditu as a WebGIS system base map; creating two layers on the base map, wherein the two layers at least comprise an aggregation layer and a boundary layer, the aggregation layer is used to display aggregated annotations of specimen data according to administrative division, and the boundary layer is used to dynamically display the geographical boundary of the administrative division corresponding to the current map annotation selected by a user; the displaying of the query result on the map in the form of vector element annotation through the aggregation layer further comprises: sending a request from a front-end device to a back-end interface; acquiring JSON format data aggregated by the back-end according to different regions by the front-end device; analyzing the JSON format data by the front-end device, creating vector elements, and storing the vector elements into a cache array; adding all the vector elements in the cache array to a layer, dynamically generating a style by a style function defined by the layer, and automatically applying the style to display map aggregated annotations by OpenLayers, wherein the annotation point position is the center longitude and latitude corresponding to different regions.
2. The method of claim 1, wherein, The method further comprises: in response to a viewing instruction of aggregated annotations input by a user, displaying a data list associated with the aggregated annotations in a preset position on a display page, wherein each resource data in the data list is associated with a detail page corresponding to the resource data in a website.
3. The method of claim 1, wherein, The method further comprises: displaying aggregated annotations of different levels of regions on a map in a hierarchical manner according to a zoom level of the map; specifically comprising: displaying provincial aggregated annotations on an initial page, and displaying the specimen quantity of each province in the annotation text; when the zoom level of the map is greater than a first preset level, switching from the provincial aggregated annotations to municipal aggregated annotations, and displaying the specimen quantity of each city; when the zoom level of the map is greater than a second preset level, switching from the municipal aggregated annotations to district aggregated annotations, and displaying the specimen quantity of each district or county, wherein the second preset level is greater than the first preset level.
4. The method of claim 1, wherein, The method further comprises: in response to a user inputted moving instruction, performing color switching on a mark point icon to which the mouse is moved; in a boundary layer above the aggregation layer, loading an administrative boundary vector element corresponding to the aggregated mark to make the administrative boundary display associated with a geographic area of the current aggregated mark point.
5. A data display device, characterized by comprising: The device comprises: An acquisition module is configured to acquire rock and mineral fossil specimen data, wherein the rock and mineral fossil specimen data at least includes provenance information of specimen data; A processing module is configured to preprocess the rock and mineral fossil specimen data to obtain an administrative code field corresponding to the rock and mineral fossil specimen data; A clustering module is configured to perform a clustering query on the rock and mineral fossil specimen data according to the administrative code field to obtain a query result, wherein the query result at least includes an administrative center longitude and latitude and a specimen quantity; A display module is configured to display the query result in a vector element mark form on a map through an aggregation layer. The processing module is configured to: combine the acquired provenance information of the rock and mineral fossil specimen data according to province names, city names, district names or county names to obtain a combination result; match the combination result with a preset standardized place name; if the combination result matches the preset standardized place name, generate an administrative code corresponding to the provenance information of the matching successful combination result; The display module is configured to: use an online map of the Map World as a WebGIS system base map; create two layers on the base map, wherein the two layers at least include an aggregation layer and a boundary layer, the aggregation layer is configured to display aggregated marks of specimen data according to administrative divisions, and the boundary layer is configured to dynamically display administrative geographic boundaries corresponding to a map mark currently selected by a user; The display module is configured to: send a request to a backend interface; acquire JSON format data aggregated by the backend according to different areas; parse the JSON format data, create a vector element, and store the vector element in a cache array; add all vector elements in the cache array to a layer, dynamically generate a style by a style function defined by the layer, and automatically apply the style to display map aggregated marks by OpenLayers, wherein a mark point position is a center longitude and latitude corresponding to different areas.
6. A terminal device, comprising: comprise: at least one processor and a memory; the memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the data display method in any one of claims 1-4.
7. A computer readable storage medium characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed to implement the data display method in any one of claims 1-4.
Citation Information
Patent Citations
Method for monitoring traditional Chinese medicine resources based on geographic national conditions
CN105975465A
Ore deposit digital information analysis and display system and method
CN110297873A