CN115269500B - Ecological environment data storage method, ecological environment data retrieval method and electronic equipment - Google Patents

Ecological environment data storage method, ecological environment data retrieval method and electronic equipment Download PDF

Info

Publication number
CN115269500B
CN115269500B CN202210916054.7A CN202210916054A CN115269500B CN 115269500 B CN115269500 B CN 115269500B CN 202210916054 A CN202210916054 A CN 202210916054A CN 115269500 B CN115269500 B CN 115269500B
Authority
CN
China
Prior art keywords
data
document
vector
administrative
index table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210916054.7A
Other languages
Chinese (zh)
Other versions
CN115269500A (en
Inventor
施蕾蕾
王拓
高吉喜
申文明
吴跃
曹飞
徐丹
孙中平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Satellite Application Center for Ecology and Environment of MEE
Original Assignee
Satellite Application Center for Ecology and Environment of MEE
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Satellite Application Center for Ecology and Environment of MEE filed Critical Satellite Application Center for Ecology and Environment of MEE
Priority to CN202210916054.7A priority Critical patent/CN115269500B/en
Publication of CN115269500A publication Critical patent/CN115269500A/en
Application granted granted Critical
Publication of CN115269500B publication Critical patent/CN115269500B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/113Details of archiving
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing

Landscapes

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

Abstract

The application provides a storage method, a retrieval method and electronic equipment of ecological environment data, and relates to the technical field of data management, wherein the storage method comprises the following steps: the administrative area code, the administrative area name and the file storage path of each document data are used as a data item and stored in a document index table; and storing the Geohash code, administrative area code, longitude and latitude and the file storage path of the vector point data set of each point data as a data item in a vector index table. The searching method comprises the following steps: and acquiring a selected query mode, wherein the query mode is administrative region attribute query, click query or polygon query, and under the selected query mode, respectively acquiring a document data retrieval result and a vector data set retrieval result by using a document index table and a vector index table based on query items. The integrated storage mode and the retrieval mode of the document data and the vector point data set are provided, so that the retrieval speed of the ecological environment data is improved.

Description

Ecological environment data storage method, ecological environment data retrieval method and electronic equipment
Technical Field
The present application relates to the field of data management technologies, and in particular, to a storage method, a retrieval method, and an electronic device for ecological environment data.
Background
The ecological environment multi-source heterogeneous monitoring and supervision data are main support data of ecological protection supervision business, and comprise multi-source multi-type data such as atmosphere, water, ocean, soil, noise, light, malodor, solid waste, chemicals, motor vehicles and the like, and are mainly monitoring and evaluation data of ecological protection and development and ecological activities in ecological space, monitoring data and reports of special items such as supervision of ecological system structures and service functions, marine monitoring in typical areas, ecological protection red line boundaries, ecological protection standing accounts, ecological protection management and the like. These data are mainly composed of spatiotemporal sequence monitoring data of fixed monitoring sites and mobile monitoring equipment, together with administrative and regional boundaries, and administrative normative files issued by the various levels of institutions of the assessment report and ecological environment department. Summarizing two types of data: vector data (mainly points) and document data.
For document data, a mature information system is combined with a database to store the information of the names, the dates and the keywords of the documents, so that the documents can be searched according to the names and the keywords, and part of the system can also realize the search of the contents in the text.
For vector point data, it is common practice to build a grid index. The more famous grid indices are regular grid indices. The most widely used irregular grids are administrative area grids, and the administrative area grids are used for establishing indexes so as to quickly search data or policy conditions in areas which are responsible for all levels of institutions, quickly comb data and improve the speed of emergency response and auxiliary decision making.
At present, the traditional data storage and retrieval method is used for the data of the ecological environment, a unified ecological environment monitoring and supervision data processing framework is not established, and vector point data and document data in the data set are only used as two types of data to be processed: the document data cannot be realized through common space point or surface query, and the vector data can be obtained through space and attribute query, but the required fields must store related fields when the query is based on administrative region keywords. Multiple steps are required to implement the querying and the aggregating of the business data. The processing method does not consider administrative normative files in the ecological environment data and obvious regional characteristics in report names, and does not consider the stationarity of the monitoring site data and the mobility characteristics of mobile monitoring equipment.
Disclosure of Invention
In view of the above, the present application provides a storage method, a retrieval method and an electronic device for ecological environment data, so as to solve the above technical problems.
In a first aspect, an embodiment of the present application provides a method for storing ecological environment data, including:
acquiring administrative area codes, administrative area names and file storage paths of each document data;
the administrative area code, the administrative area name and the file storage path of each document data are used as a data item and stored in a document index table;
acquiring each point data in the vector point data set, wherein the point data comprises longitude and latitude of a point and an ecological attribute value; acquiring a Geohash code, a administrative area code and a file storage path of a vector point data set of each point data;
and storing the Geohash code, administrative area code, longitude and latitude and the file storage path of the vector point data set of each point data as a data item in a vector index table.
Further, acquiring administrative area codes, administrative area names and file storage paths of each document data; comprising the following steps:
extracting the administrative area name of the minimum administrative level in the file name of the document data as the administrative area name of the document data;
acquiring a peer administrative region code or a superior administrative region code of an administrative region name through urban and rural statistical codes, and taking the peer administrative region code or the superior administrative region code as an administrative region code of document data;
a file storage path of document data is acquired.
Further, acquiring a Geohash code, a administrative area code and a file storage path of a vector point data set of each point data; comprising the following steps:
based on the longitude and latitude of each point data, obtaining a Geohash code by utilizing a Geohash grid index;
acquiring a minimum administrative area code of the point data by using longitude and latitude of the point data and acquiring an administrative area code of the minimum administrative area by using urban and rural statistical codes as the administrative area code of the point data;
and acquiring a file storage path of a vector point data set where the point data is located.
In a second aspect, an embodiment of the present application provides a method for searching ecological environment data, which is applied to a document index table and a vector index table in the embodiment of the present application, and includes:
acquiring a currently selected query mode;
judging whether the currently selected query mode is administrative region attribute query, if so, acquiring an administrative region name to be queried, and respectively acquiring a document data retrieval result and a vector data set retrieval result by using a document index table and a vector index table based on the administrative region name to be queried;
otherwise, judging whether the current selected query mode is a click query, if so, acquiring the selected Geohash grid level and the screen coordinates of the clicked point, and respectively acquiring a document data retrieval result and a vector data set retrieval result by using a document index table and a vector index table based on the selected Geohash grid level and the screen coordinates of the clicked point;
otherwise, the currently selected query mode is polygon query, the polygon drawn on the screen is obtained, the minimum outsourcing rectangle of the drawn polygon is obtained, and the document data retrieval result and the vector data set retrieval result are respectively obtained by using the document index table and the vector index table based on the minimum outsourcing rectangle.
Further, the document index table and the vector index table are utilized to respectively obtain a document data retrieval result and a vector data set retrieval result based on the administrative area names to be queried; comprising the following steps:
acquiring administrative region codes of administrative region names to be inquired through urban and rural statistical codes;
searching in a document index table by using administrative region codes, obtaining a plurality of data items containing the administrative region codes, and obtaining a plurality of document data by using file storage paths in the data items as document data searching results;
and searching in the vector index table by using the administrative region codes, obtaining a plurality of data items containing the administrative region codes, and obtaining a plurality of vector point data sets by using file storage paths in the data items as vector data set searching results.
Further, the Geohash mesh grade is determined by a mesh resolution; based on the selected Geohash grid level and the screen coordinates of the clicked point, respectively obtaining a document data retrieval result and a vector data set retrieval result by using a document index table and a vector index table; comprising the following steps:
calculating longitude and latitude of the clicked point according to the selected Geohash grid level and screen coordinates of the clicked point, thereby obtaining the village and town where the clicked point is located;
obtaining administrative region codes by using villages and towns where the clicked points are located;
searching in a document index table by using administrative region codes, obtaining a plurality of data items containing the administrative region codes, and obtaining a plurality of document data by using file storage paths in the data items as document data searching results;
obtaining a Geohash grid where the clicked point is based on the longitude and latitude of the clicked point and the selected Geohash grid level;
obtaining 9 Geohash codes of 8 Geohash grids with the same level around the Geohash grid where the clicked point is located;
and searching in a vector index table by using the 9 Geohash codes to obtain a plurality of data items containing the 9 Geohash codes, and obtaining a plurality of vector point data sets by using file storage paths in each data item as a vector data set searching result.
Further, based on the minimum outsourcing rectangle, respectively obtaining a document data retrieval result and a vector data set retrieval result by using a document index table and a vector index table; comprising the following steps:
step S1: acquiring screen coordinates of a minimum package rectangle;
step S2: calculating the longitude and latitude range of the minimum outsourcing rectangle according to the screen coordinates of the minimum outsourcing rectangle, so as to obtain a minimum administrative area A in which the drawn polygon is located;
step S3: acquiring a administrative area code of a minimum administrative area A;
step S4: searching in a document index table by using administrative region codes to obtain a plurality of data items containing the administrative region codes to form a first document searching result set R1;
step S5: judging whether the minimum administrative area A is a village and town, if so, obtaining a plurality of document data by using file storage paths in each data item in the first document retrieval result set R1, and taking the document data as a document data retrieval result, and entering step S8; otherwise, entering step S6;
step S6: acquiring a administrative region set B which intersects the geographic region in which the polygon is located and is one administrative level lower than the minimum administrative region A; acquiring administrative region codes of each administrative region in the administrative region set B, searching in the first document search result set R1 by utilizing the administrative region codes to obtain a second document search result set R2, and acquiring a plurality of document data serving as document data search results by utilizing file storage paths in data items in the second document search result set R2; step S7 is entered;
step S7: obtaining a document data retrieval result by using the first document retrieval result set R1;
step S8: acquiring a plurality of Geohash grids intersected with the drawn polygon, wherein all Geohash grids can cover the drawn polygon, and the area sum of the grids is minimum and the number of the grids is minimum;
step S9: obtaining Geohash codes of all Geohash grids;
step S10: searching in a vector lookup table by utilizing each Geohash code to obtain a data item containing any Geohash code, thereby obtaining a first point data searching result set RG1;
step S11: judging whether the point data is in the drawn polygon or not by utilizing the longitude and latitude of each point data in the first point data search result set RG1, if not, deleting the data item of the point data from the first point data search result set RG1 to obtain a second point data search result set RG2;
step S12: and obtaining a plurality of vector point data sets by using file storage paths in each data item of the second point data retrieval result set RG2 as a vector data set retrieval result.
Further, the method further comprises: and combining the document data retrieval result and the vector point data set retrieval result to obtain a final retrieval result.
In a third aspect, an embodiment of the present application provides a storage device for ecological environment data, including:
a document data attribute acquisition unit for acquiring administrative area codes, administrative area names and file storage paths of each document data;
a document index table generating unit for storing the administrative area code, the administrative area name and the file storage path of each document data as one data item in the document index table;
the point data attribute acquisition unit is used for acquiring each point data in the vector point data set, wherein the point data comprises longitude and latitude of a point and an ecological attribute value; acquiring a Geohash code, a administrative area code and a file storage path of a vector point data set of each point data;
and the vector index table generation unit is used for storing the Geohash code, administrative region code, longitude and latitude and the file storage path of the vector point data set of each point data as one data item in the vector index table.
In a fourth aspect, an embodiment of the present application provides a search device for ecological environment data, including:
the judging unit is used for acquiring the currently selected query mode; when the query mode is administrative area attribute query, entering an administrative area attribute query unit; when the query mode is point query, a point query unit is entered; when the query mode is a polygonal query unit, entering the polygonal query unit;
the administrative area attribute query unit is used for acquiring an administrative area name to be queried, and respectively obtaining a document data retrieval result and a vector data set retrieval result by utilizing the document index table and the vector index table based on the administrative area name to be queried;
the point query unit is used for acquiring the screen coordinates of the selected Geohash grid level and the clicked point, and respectively acquiring a document data retrieval result and a vector data set retrieval result by utilizing the document index table and the vector index table based on the selected Geohash grid level and the screen coordinates of the clicked point;
and the polygon query unit is used for acquiring the polygon drawn on the screen, acquiring the minimum outsourcing rectangle of the drawn polygon, and respectively obtaining a document data retrieval result and a vector data set retrieval result by using the document index table and the vector index table based on the minimum outsourcing rectangle.
In a fifth aspect, embodiments of the present application provide an electronic device, including: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the storage method of the ecological environment data or the retrieval method of the ecological environment data of the embodiment of the application when executing the computer program.
In a sixth aspect, embodiments of the present application provide a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement a storage method of ecological environment data or a retrieval method of ecological environment data according to embodiments of the present application.
The integrated storage mode and the retrieval mode of the document data and the vector point data set are provided, so that the retrieval speed of the ecological environment data is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for storing ecological environment data according to an embodiment of the present application;
fig. 2 is a schematic diagram of a search method of ecological environment data according to an embodiment of the present application;
FIG. 3 is a functional block diagram of a storage device for ecological environment data according to an embodiment of the present application;
fig. 4 is a functional block diagram of an ecological environment data retrieving device according to an embodiment of the present application;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, as provided in the accompanying drawings, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
First, the design concept of the embodiment of the present application will be briefly described.
At present, for ecological environment data, a traditional data storage and retrieval method is mostly adopted, a set of unified ecological environment monitoring and supervision data processing framework is not established, and vector point data and document data in the data set are only used as two types of data to be processed: the document data cannot be realized through common space point or surface query, and the vector data can be obtained through space and attribute query, but the required fields must store related fields when the query is based on administrative region keywords. Multiple steps are required to implement the querying and the aggregating of the business data. The processing method does not consider administrative normative files in the ecological environment data and obvious regional characteristics in report names, and does not consider the stationarity of the monitoring site data and the mobility characteristics of mobile monitoring equipment.
In order to solve the problems, the method automatically extracts administrative division information in a document data name by establishing a unified data processing frame, establishes a corresponding relation with space administrative division grids, extracts vector point data one by one, calculates a Geohash code and membership relation with the administrative division, and associates a multi-level administrative division grid with the multi-level administrative division code. This framework builds a relationship between all data and one or both grids, and both the spatial query and administrative region attribute query are converted into coded matching questions. In the actual business, the data in a certain area or range can be searched once, the results of all data sets are displayed completely, and the manual intervention on data processing is reduced. Geohash codes are introduced to solve the problem of rapid query of data collected by the navigation equipment in the small area set. The problem of integrated quick retrieval of ecological environment red line data is solved by means of a mixed index mode of administrative area grids and Geohash grids.
The technical advantages of the present application are:
1. integrated retrieval in close association with business systems
And by considering the characteristics of administrative standardability files in the red line data of the ecological environment, obvious regional characteristics in report names, the stationarity of the data of the monitoring station, the small region concentration of the data collected by the navigation equipment and the like, a hybrid index based on administrative areas and Geohash grids is established, and an integrated storage and retrieval framework based on coding is realized.
2. Multi-level fine management
The data or policy conditions in the areas which are responsible for all levels of institutions can be quickly searched by establishing indexes through administrative area grids, data can be quickly combed, and the speed of emergency response and auxiliary decision making is improved. Geohash is used as a regular grid, can be finely divided compared with administrative division, can reflect space characteristics of smaller units, can finish finer data query and analysis work, and reveals a deeper relationship between attribute information and space natural phenomena. The two are combined, so that the requirement of multistage fine management of the ecological environment business system can be met.
3. High performance
Geohash is a way of spatial indexing, and is particularly suitable for storing and managing point data. Geohash coded queries within 10 DEG x 10 DEG are less time consuming than latitude and longitude and R-tree queries. In addition, the Geohash is beneficial to high-efficiency access of mass data: the Geo Hash algorithm can be utilized to store the data in blocks; when the area is searched, the grid covered by the area can be calculated first, and then the grid code is utilized for searching, so that parallel access operation is provided.
The core invention point of the application is as follows: index framework integrating graphics and attributes.
The map generic integrated query of the common GIS data is realized through the associated ID, the graph is clicked, the corresponding attribute information is searched, the attribute is clicked, and the graph is highlighted on the map according to the ID. The disadvantage of this graph is that it requires the human establishment of an ID association, and the graph and attributes are two independent sets of indices.
According to the method, an integrated index framework carries out character string coding on all data according to the characteristics of ecological environment data in actual business production, each data corresponds to 1 (administrative division coding) or 2 (Geohash coding and administrative division coding) types of codes, space vector point data and document data such as administrative standardability files are unified under a coding management system, and thus, indexes of graphics and attributes are integrated, and Geohash coding and administrative division coding which are more closely applied to business are selected according to the characteristics of the ecological data. The vector point data can automatically add the two codes according to the coordinates, and the document data intelligently adds the administrative region codes according to administrative region fields in the names of the vector point data. The administrative area code and the Geohash code are also closely related in space. The common attribute (administrative area name) query, the space point and the surface query are concentrated in the coded matching query, so that the data query mode is unified, the computer retrieval speed can be improved based on the mature coded query technology, and a novel method suitable for the data storage and retrieval of the ecological environment system is provided.
After the application scenario and the design idea of the embodiment of the present application are introduced, the technical solution provided by the embodiment of the present application is described below.
As shown in fig. 1, an embodiment of the present application provides a method for storing ecological environment data, including:
step 101: acquiring administrative area codes, administrative area names and file storage paths of each document data;
in this embodiment, the steps specifically include:
extracting the administrative area name of the minimum administrative level in the file name of the document data as the administrative area name of the document data;
acquiring a peer administrative region code or a superior administrative region code of an administrative region name through urban and rural statistical codes, and taking the peer administrative region code or the superior administrative region code as an administrative region code of document data;
a file storage path of document data is acquired.
Step 102: the administrative area code, the administrative area name and the file storage path of each document data are used as a data item and stored in a document index table;
for the document data, automatically extracting the administrative area name in the document data (for example, the administrative area name of the document of the "product of the first-class ecosystem of the Arshan city of Mongolian autonomous region in 2015" is Arshan city), inquiring the corresponding peer (if any) or the upper-class administrative area code of the document in the urban and rural statistical code issued by the national statistical office, and storing the code, the administrative area name and the storage path of the document in a database table for inquiry.
Step 103: acquiring each point data in the vector point data set, wherein the point data comprises longitude and latitude of a point and an ecological attribute value; acquiring a Geohash code, a administrative area code and a file storage path of a vector point data set of each point data;
in this embodiment, the ecological attribute values include atmospheric air quality, water quality, and ecological environment quality.
The method comprises the steps of obtaining a Geohash code, a administrative area code and a file storage path of a vector point data set of each point data; comprising the following steps:
based on the longitude and latitude of each point data, obtaining a Geohash code by utilizing a Geohash grid index;
acquiring a minimum administrative area code of the point data by using longitude and latitude of the point data and acquiring an administrative area code of the minimum administrative area by using urban and rural statistical codes as the administrative area code of the point data;
and acquiring a file storage path of a vector point data set where the point data is located.
Step 104: and storing the Geohash code, administrative area code, longitude and latitude and the file storage path of the vector point data set of each point data as a data item in a vector index table.
As shown in fig. 2, an embodiment of the present application provides a method for retrieving ecological environment data, including:
step 201: acquiring a currently selected query mode;
step 202: judging whether the currently selected query mode is administrative region attribute query, if so, acquiring an administrative region name to be queried, and respectively acquiring a document data retrieval result and a vector data set retrieval result by using a document index table and a vector index table based on the administrative region name to be queried; otherwise, go to step 203;
the method comprises the steps that a document index table and a vector index table are utilized to respectively obtain a document data retrieval result and a vector data set retrieval result based on the administrative area names to be queried; comprising the following steps:
acquiring administrative region codes of administrative region names to be inquired through urban and rural statistical codes;
searching in a document index table by using administrative region codes, obtaining a plurality of data items containing the administrative region codes, and obtaining a plurality of document data by using file storage paths in the data items as document data searching results;
and searching in the vector index table by using the administrative region codes, obtaining a plurality of data items containing the administrative region codes, and obtaining a plurality of vector point data sets by using file storage paths in the data items as vector data set searching results.
Step 203: judging whether the currently selected query mode is a click query, if so, acquiring the selected Geohash grid level and the screen coordinates of the clicked point, and respectively acquiring a document data retrieval result and a vector data set retrieval result by using a document index table and a vector index table based on the selected Geohash grid level and the screen coordinates of the clicked point; otherwise, go to step 204;
based on the selected Geohash grid level and the screen coordinates of the clicked point, respectively obtaining a document data retrieval result and a vector data set retrieval result by using a document index table and a vector index table; comprising the following steps:
calculating longitude and latitude of the clicked point according to the selected Geohash grid level and screen coordinates of the clicked point, thereby obtaining the village and town where the clicked point is located;
obtaining administrative region codes by using villages and towns where the clicked points are located;
searching in a document index table by using administrative region codes, obtaining a plurality of data items containing the administrative region codes, and obtaining a plurality of document data by using file storage paths in the data items as document data searching results;
obtaining a Geohash grid where the clicked point is based on the longitude and latitude of the clicked point and the selected Geohash grid level;
obtaining 9 Geohash codes of 8 Geohash grids with the same level around the Geohash grid where the clicked point is located;
and searching in a vector index table by using the 9 Geohash codes to obtain a plurality of data items containing the 9 Geohash codes, and obtaining a plurality of vector point data sets by using file storage paths in each data item as a vector data set searching result.
Step 204: the currently selected query mode is polygonal query, polygons drawn on a screen are obtained, the minimum outsourcing rectangle of the drawn polygons is obtained, and a document data retrieval result and a vector data set retrieval result are respectively obtained by using a document index table and a vector index table based on the minimum outsourcing rectangle.
Based on the minimum outsourcing rectangle, respectively obtaining a document data retrieval result and a vector data set retrieval result by using a document index table and a vector index table; comprising the following steps:
step S1: acquiring screen coordinates of a minimum package rectangle;
step S2: calculating the longitude and latitude range of the minimum outsourcing rectangle according to the screen coordinates of the minimum outsourcing rectangle, so as to obtain a minimum administrative area A in which the drawn polygon is located;
step S3: acquiring a administrative area code of a minimum administrative area A;
step S4: searching in a document index table by using administrative region codes to obtain a plurality of data items containing the administrative region codes to form a first document searching result set R1;
step S5: judging whether the minimum administrative area A is a village and town, if so, obtaining a plurality of document data by using file storage paths in each data item in the first document retrieval result set R1, and taking the document data as a document data retrieval result, and entering step S8; otherwise, entering step S6;
step S6: acquiring administrative district set(s) B which intersect the geographic area in which the polygon is located and are one administrative level (province to city, city to county, county to county) lower than the minimum administrative district A; acquiring administrative region codes of each administrative region in the administrative region set B, searching in the first document search result set R1 by utilizing the administrative region codes to obtain a second document search result set R2, and acquiring a plurality of document data serving as document data search results by utilizing file storage paths in data items in the second document search result set R2; step S7 is entered;
step S7: obtaining a document data retrieval result by using the first document retrieval result set R1;
step S8: acquiring a plurality of Geohash grids intersected with the drawn polygon, wherein all Geohash grids can cover the drawn polygon, and the area sum of the grids is minimum and the number of the grids is minimum;
step S9: obtaining Geohash codes of all Geohash grids;
step S10: searching in a vector lookup table by utilizing each Geohash code to obtain a data item containing any Geohash code, thereby obtaining a first point data searching result set RG1;
step S11: judging whether the point data is in the drawn polygon or not by utilizing the longitude and latitude of each point data in the first point data search result set RG1, if not, deleting the data item of the point data from the first point data search result set RG1 to obtain a second point data search result set RG2;
step S12: and obtaining a plurality of vector point data sets by using file storage paths in each data item of the second point data retrieval result set RG2 as a vector data set retrieval result.
Based on the foregoing embodiments, the embodiment of the present application provides a storage device for ecological environment data, and referring to fig. 3, the storage device 300 for ecological environment data provided in the embodiment of the present application at least includes:
a document data attribute acquiring unit 301 for acquiring a administrative area code, an administrative area name, and a file storage path of each document data;
a document index table generating unit 302 for storing the administrative area code, the administrative area name, and the file storage path of each document data as one data item in the document index table;
a point data attribute obtaining unit 303, configured to obtain each point data in the vector point data set, where the point data includes longitude and latitude of a point and an ecological attribute value; acquiring a Geohash code, a administrative area code and a file storage path of a vector point data set of each point data;
the vector index table generating unit 304 is configured to store, as one data item, a Geohash code, a administrative area code, a latitude and longitude, and a file storage path of a vector point data set for each point data in the vector index table.
It should be noted that, the principle of solving the technical problem of the ecological environment data storage device 300 provided in the embodiment of the present application is similar to that of the ecological environment data storage method provided in the embodiment of the present application, so that the implementation of the ecological environment data storage device 300 provided in the embodiment of the present application can refer to the implementation of the ecological environment data storage device method provided in the embodiment of the present application, and the repetition is omitted.
Based on the foregoing embodiments, the embodiments of the present application provide a search device for ecological environment data, as shown in fig. 4, where the search device 400 for ecological environment data provided in the embodiments of the present application at least includes:
a judging unit 401, configured to obtain a currently selected query mode; when the query mode is administrative area attribute query, entering an administrative area attribute query unit; when the query mode is point query, a point query unit is entered; when the query mode is a polygonal query unit, entering the polygonal query unit;
the administrative area attribute query unit 402 is configured to obtain an administrative area name to be queried, and obtain a document data retrieval result and a vector data set retrieval result by using the document index table and the vector index table based on the administrative area name to be queried;
a point query unit 403, configured to obtain screen coordinates of the selected Geohash grid level and the clicked point, and obtain a document data retrieval result and a vector dataset retrieval result respectively by using the document index table and the vector index table based on the selected Geohash grid level and the screen coordinates of the clicked point;
the polygon query unit 404 is configured to obtain a polygon drawn on a screen, obtain a minimum outsourcing rectangle of the drawn polygon, and obtain a document data search result and a vector dataset search result by using a document index table and a vector index table based on the minimum outsourcing rectangle, respectively.
It should be noted that, the principle of solving the technical problem of the apparatus 400 for retrieving the ecological environment data provided in the embodiment of the present application is similar to that of the method for retrieving the ecological environment data provided in the embodiment of the present application, so that the implementation of the apparatus 400 for retrieving the ecological environment data provided in the embodiment of the present application can refer to the implementation of the method for retrieving the ecological environment data provided in the embodiment of the present application, and the repetition is omitted.
As shown in fig. 5, an electronic device 500 provided in an embodiment of the present application at least includes: the storage method or the retrieval method provided in the embodiment of the present application is implemented by the processor 501, the memory 502, and a computer program stored on the memory 502 and executable on the processor 501 when the processor 501 executes the computer program.
The electronic device 500 provided by embodiments of the present application may also include a bus 503 that connects the different components, including the processor 501 and the memory 502. Where bus 503 represents one or more of several types of bus structures, including a memory bus, a peripheral bus, a local bus, and so forth.
The Memory 502 may include readable media in the form of volatile Memory, such as random access Memory (Random Access Memory, RAM) 5021 and/or cache Memory 5022, and may further include Read Only Memory (ROM) 5023.
The memory 502 may also include a program tool 5024 having a set (at least one) of program modules 5025, the program modules 5025 including, but not limited to: an operating subsystem, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
The electronic device 500 may also communicate with one or more external devices 504 (e.g., keyboard, remote control, etc.), with one or more devices that enable a user to interact with the electronic device 500 (e.g., cell phone, computer, etc.), and/or with any device that enables the electronic device 500 to communicate with one or more other electronic devices 500 (e.g., router, modem, etc.). Such communication may be through an Input/Output (I/O) interface 505. Also, electronic device 500 may communicate with one or more networks such as a local area network (Local Area Network, LAN), a wide area network (Wide Area Network, WAN), and/or a public network such as the internet via network adapter 506. As shown in fig. 5, network adapter 506 communicates with other modules of electronic device 500 over bus 503. It should be appreciated that although not shown in fig. 5, other hardware and/or software modules may be used in connection with electronic device 500, including, but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, disk array (Redundant Arrays of Independent Disks, RAID) subsystems, tape drives, data backup storage subsystems, and the like.
It should be noted that the electronic device 500 shown in fig. 5 is only an example, and should not impose any limitation on the functions and application scope of the embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium, and the computer readable storage medium stores computer instructions which are executed by a processor to realize the storage method of the ecological environment data or the retrieval method of the ecological environment data.
Furthermore, although the operations of the methods of the present application are depicted in the drawings in a particular order, this is not required to or suggested that these operations must be performed in this particular order or that all of the illustrated operations must be performed in order to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims (9)

1. A method for storing ecological environment data, comprising:
acquiring administrative area codes, administrative area names and file storage paths of each document data;
the administrative area code, the administrative area name and the file storage path of each document data are used as a data item and stored in a document index table;
acquiring each point data in the vector point data set, wherein the point data comprises longitude and latitude of a point and an ecological attribute value; acquiring a Geohash code, a administrative area code and a file storage path of a vector point data set of each point data;
storing a Geohash code, a administrative area code, longitude and latitude and a file storage path of a vector point data set of each point data as a data item in a vector index table;
acquiring a currently selected query mode, and acquiring a document data retrieval result and a vector data set retrieval result based on the currently selected query mode, the document index table and the vector index table;
wherein obtaining a document data retrieval result and a vector data set retrieval result based on the currently selected query pattern, the document index table and the vector index table comprises:
judging whether the currently selected query mode is administrative region attribute query, if so, acquiring an administrative region name to be queried, and respectively acquiring a document data retrieval result and a vector data set retrieval result by using a document index table and a vector index table based on the administrative region name to be queried;
otherwise, judging whether the current selected query mode is a click query, if so, acquiring the selected Geohash grid level and the screen coordinates of the clicked point, and respectively acquiring a document data retrieval result and a vector data set retrieval result by using a document index table and a vector index table based on the selected Geohash grid level and the screen coordinates of the clicked point;
otherwise, the currently selected query mode is polygon query, the polygon drawn on the screen is obtained, the minimum outsourcing rectangle of the drawn polygon is obtained, and the document data retrieval result and the vector data set retrieval result are respectively obtained by using the document index table and the vector index table based on the minimum outsourcing rectangle.
2. The storage method of the ecological environment data according to claim 1, wherein a administrative area code, an administrative area name, and a file storage path of each document data are acquired; comprising the following steps:
extracting the administrative area name of the minimum administrative level in the file name of the document data as the administrative area name of the document data;
acquiring a peer administrative region code or a superior administrative region code of an administrative region name through urban and rural statistical codes, and taking the peer administrative region code or the superior administrative region code as an administrative region code of document data;
a file storage path of document data is acquired.
3. The method for storing ecological environment data according to claim 1, wherein a file storage path of Geohash code, administrative area code, and vector point data set of each point data is acquired; comprising the following steps:
based on the longitude and latitude of each point data, obtaining a Geohash code by utilizing a Geohash grid index;
acquiring a minimum administrative area code of the point data by using longitude and latitude of the point data and acquiring an administrative area code of the minimum administrative area by using urban and rural statistical codes as the administrative area code of the point data;
and acquiring a file storage path of a vector point data set where the point data is located.
4. The method for storing ecological environment data according to claim 1, wherein the document data retrieval result and the vector data set retrieval result are obtained by using a document index table and a vector index table respectively based on the administrative area names to be queried; comprising the following steps:
acquiring administrative region codes of administrative region names to be inquired through urban and rural statistical codes;
searching in a document index table by using administrative region codes, obtaining a plurality of data items containing the administrative region codes, and obtaining a plurality of document data by using file storage paths in the data items as document data searching results;
and searching in the vector index table by using the administrative region codes, obtaining a plurality of data items containing the administrative region codes, and obtaining a plurality of vector point data sets by using file storage paths in the data items as vector data set searching results.
5. The method of claim 1, wherein the Geohash mesh grade is determined by mesh resolution; based on the selected Geohash grid level and the screen coordinates of the clicked point, respectively obtaining a document data retrieval result and a vector data set retrieval result by using a document index table and a vector index table; comprising the following steps:
calculating longitude and latitude of the clicked point according to the selected Geohash grid level and screen coordinates of the clicked point, thereby obtaining the village and town where the clicked point is located;
obtaining administrative region codes by using villages and towns where the clicked points are located;
searching in a document index table by using administrative region codes, obtaining a plurality of data items containing the administrative region codes, and obtaining a plurality of document data by using file storage paths in the data items as document data searching results;
obtaining a Geohash grid where the clicked point is based on the longitude and latitude of the clicked point and the selected Geohash grid level;
obtaining 9 Geohash codes of 8 Geohash grids with the same level around the Geohash grid where the clicked point is located;
and searching in a vector index table by using the 9 Geohash codes to obtain a plurality of data items containing the 9 Geohash codes, and obtaining a plurality of vector point data sets by using file storage paths in each data item as a vector data set searching result.
6. The method for storing ecological environment data according to claim 1, wherein the document data retrieval result and the vector data set retrieval result are obtained by using a document index table and a vector index table, respectively, based on a minimum outsourcing rectangle; comprising the following steps:
step S1: acquiring screen coordinates of a minimum package rectangle;
step S2: calculating the longitude and latitude range of the minimum outsourcing rectangle according to the screen coordinates of the minimum outsourcing rectangle, so as to obtain a minimum administrative area A in which the drawn polygon is located;
step S3: acquiring a administrative area code of a minimum administrative area A;
step S4: searching in a document index table by using administrative region codes to obtain a plurality of data items containing the administrative region codes to form a first document searching result set R1;
step S5: judging whether the minimum administrative area A is a village and town, if so, obtaining a plurality of document data by using file storage paths in each data item in the first document retrieval result set R1, and taking the document data as a document data retrieval result, and entering step S8; otherwise, entering step S6;
step S6: acquiring a administrative region set B which intersects the geographic region in which the polygon is located and is one administrative level lower than the minimum administrative region A; acquiring administrative region codes of each administrative region in the administrative region set B, searching in the first document search result set R1 by utilizing the administrative region codes to obtain a second document search result set R2, and acquiring a plurality of document data serving as document data search results by utilizing file storage paths in data items in the second document search result set R2; step S7 is entered;
step S7: obtaining a document data retrieval result by using the first document retrieval result set R1;
step S8: acquiring a plurality of Geohash grids intersected with the drawn polygon, wherein all Geohash grids can cover the drawn polygon, and the area sum of the grids is minimum and the number of the grids is minimum;
step S9: obtaining Geohash codes of all Geohash grids;
step S10: searching in a vector lookup table by utilizing each Geohash code to obtain a data item containing any Geohash code, thereby obtaining a first point data searching result set RG1;
step S11: judging whether the point data is in the drawn polygon or not by utilizing the longitude and latitude of each point data in the first point data search result set RG1, if not, deleting the data item of the point data from the first point data search result set RG1 to obtain a second point data search result set RG2;
step S12: and obtaining a plurality of vector point data sets by using file storage paths in each data item of the second point data retrieval result set RG2 as a vector data set retrieval result.
7. The method of storing ecological environment data according to claim 1, wherein the method further comprises: and combining the document data retrieval result and the vector point data set retrieval result to obtain a final retrieval result.
8. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of storing ecological environment data according to any one of claims 1-7 when the computer program is executed.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements a method of storing ecological environment data according to any one of claims 1-7.
CN202210916054.7A 2022-08-01 2022-08-01 Ecological environment data storage method, ecological environment data retrieval method and electronic equipment Active CN115269500B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210916054.7A CN115269500B (en) 2022-08-01 2022-08-01 Ecological environment data storage method, ecological environment data retrieval method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210916054.7A CN115269500B (en) 2022-08-01 2022-08-01 Ecological environment data storage method, ecological environment data retrieval method and electronic equipment

Publications (2)

Publication Number Publication Date
CN115269500A CN115269500A (en) 2022-11-01
CN115269500B true CN115269500B (en) 2023-05-30

Family

ID=83746350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210916054.7A Active CN115269500B (en) 2022-08-01 2022-08-01 Ecological environment data storage method, ecological environment data retrieval method and electronic equipment

Country Status (1)

Country Link
CN (1) CN115269500B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005114484A1 (en) * 2004-05-19 2005-12-01 Metacarta, Inc. Systems and methods of geographical text indexing
US7801897B2 (en) * 2004-12-30 2010-09-21 Google Inc. Indexing documents according to geographical relevance
CN104951526B (en) * 2015-06-12 2018-01-26 福建省基础地理信息中心 A kind of threedimensional model management system
CN109947904B (en) * 2019-03-22 2021-07-30 东北大学 Preference space Skyline query processing method based on Spark environment
CN113222540A (en) * 2021-04-30 2021-08-06 生态环境部南京环境科学研究所 Management system of ecological protection red line
CN113626551A (en) * 2021-08-14 2021-11-09 中国人民武装警察部队黄金第一总队 GIS-based query and display method for applied geological elements

Also Published As

Publication number Publication date
CN115269500A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
CN103390039B (en) Urban disaster thematic map real-time generating method based on network information
CN101350012B (en) Method and system for matching address
CN101799835B (en) Ontology-driven geographic information retrieval system and method
CN109635068A (en) Mass remote sensing data high-efficiency tissue and method for quickly retrieving under cloud computing environment
CN101350013A (en) Method and system for searching geographical information
CN111125294B (en) Spatial relationship knowledge graph data model representation method and system
CN111506621A (en) Data statistical method and device
JP2002032773A (en) Device and method for processing map data
CN103092918A (en) Method for construction and query of knowledge base of emergency aid decision-making system based on location information
CN112948595A (en) Method, system and equipment for building urban group operation state knowledge graph
CN116049521A (en) Space-time data retrieval method based on space grid coding
CN116860905A (en) Space unit coding generation method of city information model
CN116775661A (en) Big space data storage and management method based on Beidou grid technology
CN109885638B (en) Three-dimensional space indexing method and system
CN112800083B (en) Government decision-oriented government affair big data analysis method and equipment
CN112905728A (en) Efficient fusion and retrieval system and method for multi-source place name data
CN115269500B (en) Ecological environment data storage method, ecological environment data retrieval method and electronic equipment
CN110928922A (en) Public policy analysis model deployment method and system based on big data mining
CN116627947A (en) Design method and device for agricultural cultural heritage landscape space database
CN114238531A (en) Method and device for drawing mechanism resources
Chang et al. Landmark‐based summarized messages for flood warning
CN117931978B (en) Basin human settlement data analysis method and system and computer equipment
CN112766146B (en) Multi-source data-based dynamic reservoir monitoring system and method
Shao et al. Research of data resource management platform in smart city
Tran et al. Exploiting WebGis technology to build an environmental database to support the environmental management of Ho Chi Minh city

Legal Events

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