Geological Spatial Data Management Method, System, Device and Storage Medium
Through a geological space data management method, responding to operation instructions and determining operation content, the problem of inefficient geological space data management is solved and data availability and interoperability are improved.
Patent Information
- Application Number
- CN202410778575.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-17
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2044-06-17
AI Technical Summary
In the prior art, geological space data management is inefficient and data cannot be exchanged effectively, which hinders the digital transformation of geological data to support geological work.
A geological space data management method is provided, which manages geological space data by responding to operation instructions, determining operation types and operating parameters, determining target operation objects, and determining operation content based on operation types and operating parameters.
This method facilitates the management of geological spatial data, improves the discoverability, accessibility, interoperability and reusability of data, and solves the integrated management problem of massive multi-source heterogeneous geological spatial data.
Smart Images

Figure CN118484457B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of geological information technology, and relates to a method, device, and storage medium for managing geological spatial data. Background Art
[0002] After more than 100 years of geological survey work, nearly 100 important digital core geological databases of more than 10 types, covering regional geology, mineral geology, energy geology, marine geology, hydrogeology, engineering geology, environmental geology, geophysics, geochemistry, remote sensing geology, natural resources, etc., have been accumulated and constructed, and the data volume reaches the PB level. Since 2017, with the acceleration of the global informatization process, geological data information, as an important basic and strategic information resource for national economic and social development, is being more and more widely applied to all aspects of national economy, social development, national security, and public life.
[0003] Geological spatial data is one of the most important types of geological data, which refers to various professional geological data related to the earth's spatial position generated through various methods such as detection, observation, and monitoring in geological survey work, involving various types of original data, result data, and derivative data of various scales and formats. Due to the problems of being not scientific and perfect enough in the pre - existing geological spatial data standard system, there are problems such as repetition, contradiction, and lack in the standards for geological data collection, storage, exchange, and processing, and the data base management software cannot be interconnected and interoperable, resulting in the need to rely on a variety of different geological spatial database management systems to manage the accumulated massive geological spatial data, with low data management efficiency and ineffective data exchange, which greatly hinders the digital transformation of geological work supported by geological data. Making full use of new - generation information technologies such as the Internet, big data, and databases to research and build unified management, integration, and integration methods and technologies for geological spatial data, and improving the availability, accessibility, integration, service, and sharing capabilities of geological spatial data is one of the important tasks in geological informatization work in the new era, which can effectively help break "data islands", "information islands", "system islands", and "knowledge islands", and play a promoting role in the digital transformation of geological work by geological informatization.
[0004] In traditional technical methods, the management of geological spatial data is often based on a variety of commercial relational database management systems, and uses the special data formats of commercial software such as MapGIS and ArcGIS. Combined with different programming languages and the development toolkits provided by various commercial GIS software, program development is carried out, and finally a large number of management methods and management systems for geological spatial data suitable for specific different specialties, scales, and formats are formed. Since each dedicated management system uses different data logical models, physical storage models, data management function interfaces, and user access interfaces, it leads to the inability of massive geological spatial data to be effectively interconnected and interoperable, and the discoverability, accessibility, interoperability, and reusability of the data are not strong.
[0005] Among them, the software mainly used in the geological map spatial database management system is Mapgis6.7 and Geomap, and the data formats are mainly Mapgis6.7 and Arcgis GDB. The geological map database mainly contains data of the Chinese land area, including more than 8,000 sheets of 1:50,000 geological map spatial data, more than 1,000 sheets of 1:200,000 geological map spatial data, more than 300 sheets of 1:250,000 geological map spatial data, and 1:500,000, 1:1,000,000, 1:2,500,000, 1:5,000,000 geological map spatial data, etc. The data of single map sheets such as sedimentary strata, metamorphic strata, volcanic rocks, intrusive rocks, dike rocks, faults, and fossil sampling points included in the geological map spatial database of each scale are mainly saved in the layer formats of wp, wt, wl, etc. of the Mapgis6.7 version, and different scale databases are managed in different ways of windows folders.
[0006] The software mainly used in the gravity survey database management system is RGIS, and the data format is stored using Access. The gravity survey database covers the 1:200,000, 1:500,000, and 1:1,000,000 regional gravity survey data of the Chinese land area. The data volume involves millions of high-precision gravity measurement point data information and work area information, and the data is widely used in geological structure research, mineral resource potential evaluation, oil and gas exploration, geoid measurement, and military geology fields. When building this database, it mainly follows the "DD2010-02 Regional Gravity Database Standard", and the database is established in the form of a relational database. The database tables include the measurement point data table and the work area information table, and the work area information table and the measurement point data table are in a one-to-many relationship. Database management mainly uses the self-developed RGIS software and combines Arcinfo to manage the data.
[0007] The aeromagnetic database management system mainly uses secondary development tools based on Oracle and Arcgis software technologies. The data of the aeromagnetic database basically cover the entire land area of the country, involving more than 400 survey areas, with measurement scales ranging from 1:10,000 to 1:1,000,000, and the data volume is at the GB level. The data is widely used in mineral resource exploration and mineral resource potential evaluation. The database is built based on the Oracle database management system, Mapgis software, and Arcgis software. Among them, the spatial data in Mapgis format is saved in the form of windows system files, and the metadata and spatial range information are saved in Oracle using Arcgis's SDE.
[0008] The geochemical database management system mainly uses SQL Server and Arcgis to store and manage data. The data of the geochemical database is mainly obtained through the national geochemical survey work, including land quality geochemical data, multi-target geochemical data, and geochemical scanning data. The data covers nearly 70% of the land area of the country, and the number of data points and records is in the millions. It is widely used in the fields of national mineral resource potential evaluation, environmental and land governance evaluation, and basic geological research. The database tables include stream sediment data tables, land quality geochemical survey data tables, etc., and are stored and managed using the relational database Microsoft SQL Server and Arcgis.
[0009] In addition, the management system of the national water resources survey and monitoring database mainly uses Oracle and MySQL to store and manage data. The data of the national geological work progress database is stored and managed in the form of Access and Mapgis6.7 files. The data management system of the geological disaster survey and monitoring database uses SQL Server and Mysql to store and manage data. The management system of the national mineral occurrence database is stored and managed in the form of Access and Mapgis6.7 files.
[0010] Since different geological spatial database management systems use various GIS software, database management systems, file management systems, etc. to build and manage data, there are huge differences in the data management models of massive geological spatial data, and there are also significant differences in the operation methods of different software systems. This leads to the problem of inconvenient data management, and further leads to the inability to effectively manage and integrate data uniformly. Summary of the Invention
[0011] In order to help solve the problem of inconvenient management of geological spatial data, this application provides a method, system, device, and storage medium for managing geological spatial data.
[0012] In a first aspect, the present application provides a method for managing geological spatial data, adopting the following technical solutions:
[0013] A method for managing geological spatial data, the method comprising:
[0014] In response to an operation instruction, determining the operation type and operation parameters corresponding to the operation instruction;
[0015] Determining a target operation object corresponding to the operation type, wherein geological spatial data is stored in the target operation object;
[0016] Determining the operation content for the target operation object based on the operation type and the operation parameters;
[0017] Managing the operation object based on the operation content.
[0018] By adopting the above technical solutions, the operation object can be determined based on the operation type, and the operation content for the target operation object can be determined based on the operation type and the operation parameters, without directly inputting the operation content represented by a specific operation language. Therefore, it is convenient to manage geological spatial data.
[0019] Optionally, the operation type includes adding a data item, the operation parameter includes the type of the data item to be added, the target operation object includes data item type information and data item information, the data item type identification field in the data item information is associated with the data item type identification field in the data item type information, and the operation content includes:
[0020] Determining the identification of the data item type to be added corresponding to the type of the data item to be added based on the data item type information;
[0021] Inserting a new record with the data item type field being the identification of the data item type to be added into the data item information.
[0022] By adopting the above technical solutions, the identification of the data item type to be added can be determined based on the data item type information, and a data item with the data item type identification field being the identification of the data item type to be added can be added to the data item information. Therefore, the types of data items that can be created can be maintained through the data item type information, which is convenient for managing geological spatial data.
[0023] Optionally, the data item type includes a feature class, adding a data item includes adding a feature class, the type of the data item to be added includes a feature class, the target operation object further includes feature class information, the feature class identification field in the feature class information is associated with the data item identification field in the data item information, and after inserting the new record with the data item type field being the identification of the data item type to be added into the data item information, the method further includes:
[0024] Determine the content of the data item identification field in the newly added record as the target feature class identification;
[0025] Insert a record with the feature class identification field being the target feature class identification into the feature class information.
[0026] By adopting the above technical solution, during the process of adding a feature class, feature class records can be inserted into both the data item information and the feature class information simultaneously, and the data item identification field in the data item information is associated with the feature class identification field in the feature class information. Therefore, it is convenient to maintain the feature classes in the data item information, thus facilitating the management of geological spatial data.
[0027] Optionally, the data item type includes a relationship type, the addition of a data item includes adding a relationship type, the operation parameters include a first feature class and a second feature class, the operation object further includes the feature class association information, the source feature class identification field and the target feature class identification field in the feature class association information are respectively associated with the data item identification field in the data item information, and the operation content includes:
[0028] Based on the data item information, determine the first feature class identification corresponding to the first feature class and the second feature class identification corresponding to the second feature class;
[0029] Insert a record with the source feature class identification field being the first feature class identification and the target feature class identification field being the second feature class identification into the feature class association information.
[0030] By adopting the above technical solution, the first feature class identification and the second feature class identification can be determined based on the data item information, and a relationship type with the source feature class identification field being the first feature class identification and the target feature class identification field being the second feature class identification can be added to the feature class association information. Therefore, the association relationship between the feature classes in the data item information can be maintained based on the relationship type in the feature class association information, facilitating the management of geological spatial data.
[0031] Optionally, the relationship class identification field in the feature class association information is associated with the data item identification field in the data item information; after inserting a new record with the data item type field being the identification of the data item type to be added into the data item information, it further includes:
[0032] Determine the content of the data item identification field in the new record as the target relationship class identification;
[0033] The step of inserting a record with the source feature class identification field being the first feature class identification and the target feature class identification field being the second feature class identification into the feature class association information includes:
[0034] Insert a record in the element class association information with the relationship class identifier field being the target relationship class identifier, the source element class identifier field being the first element class identifier, and the target element class identifier field being the second element class identifier.
[0035] By adopting the above technical solution, during the process of adding a relationship class, relationship class records can be inserted into both the data item information and the element class association information, and the data item identifier field in the data item information is associated with the relationship class identifier field in the element class association information. Therefore, it is convenient to maintain the relationship class in the data item information, and thus convenient to manage the geological spatial data.
[0036] Optionally, the operation parameter further includes a target data item. The inserting a new record with the data item type field being the to-be-added data item type identifier in the data item information includes:
[0037] Determine the target storage path corresponding to the target data item based on the data item information;
[0038] Determine the to-be-stored path corresponding to the to-be-added data item based on the target storage path;
[0039] Insert a new record in the data item information with the data item type field being the to-be-added data item type identifier and the storage path field being the to-be-stored path.
[0040] By adopting the above technical solution, since the operation parameter includes a target data item and the to-be-stored location corresponding to the to-be-added data item is determined based on the target storage location corresponding to the target data item, it is convenient to manage the storage location of the added data item.
[0041] Optionally, the target operation object is at least one of the operation objects, and the operation objects include: data item type information, data item information, element class association information, element class information, spatial reference information, and element class field information;
[0042] The data item type field in the data item information is associated with the data item type identifier field in the data item type information. The source element class identifier field and the target element class identifier field in the element class association information are respectively associated with the data item identifier field in the data item information. The element class identifier field in the element class information is associated with the data item identifier field in the data item type information. The spatial reference information identifier field in the element class information is associated with the spatial reference information identifier field in the spatial reference information. The element class identifier field in the element class information is associated with the element class identifier field in the element class field information.
[0043] By adopting the above technical solutions, different operation objects are set to store geological information, and the geological spatial information can be maintained by maintaining the operation objects. Since the operation objects are associated through fields, it is convenient to operate on the geological spatial data.
[0044] In a second aspect, the present application provides a management system for geological spatial data, adopting the following technical solutions:
[0045] A management system for geological spatial data, the system includes an information interaction module, a middleware module, and a database module;
[0046] The information interaction module is used to obtain an operation instruction and send the operation instruction to the middleware module;
[0047] The middleware module is used to, in response to the operation instruction, determine the operation type and operation parameters corresponding to the operation instruction; determine the target operation object corresponding to the operation type, and the geological spatial data is stored in the target operation object; determine the operation content for the target operation object based on the operation type and the operation parameters; perform an operation on the database module based on the operation content;
[0048] The database module is used to manage the operation object in response to the operation of the middleware.
[0049] In a third aspect, the present application provides an electronic device, adopting the following technical solutions:
[0050] An electronic device, the electronic device includes:
[0051] At least one processor;
[0052] A memory;
[0053] At least one application program, where at least one application program is stored in the memory and is configured to be executed by at least one processor, and the at least one application program is configured to: execute any one of the geological spatial data management methods provided in the first aspect.
[0054] In a fourth aspect, the present application provides an electronic device, adopting the following technical solutions:
[0055] A computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer is made to execute any one of the geological spatial data management methods provided in the first aspect.
[0056] In summary, the present application includes at least one of the following beneficial technical effects:
[0057] 1. Since the operation object can be determined based on the operation type, and the operation content for the target operation object can be determined based on the operation type and operation parameters without directly inputting the operation content, it is convenient to manage geological spatial data.
[0058] 2. Since the operation parameters include the target data item, and the storage location to be stored for the data item to be added is determined based on the target storage location corresponding to the target data item, it is convenient to manage the storage location of the added data item. Description of the Drawings
[0059] Figure 1 is a schematic flowchart of the geological spatial data management method provided by the embodiments of the present application;
[0060] Figure 2 is a schematic diagram of the operation type module provided by the geological spatial data management method provided by the embodiments of the present application;
[0061] Figure 3 is a schematic diagram of the hierarchical relationship between element data items provided by the embodiments of the present application;
[0062] Figure 4 is a schematic diagram of another hierarchical relationship between element data items provided by the embodiments of the present application;
[0063] Figure 5 is a schematic structural diagram of the geological spatial data management system provided by the embodiments of the present application;
[0064] Figure 6 is a schematic structural diagram of an electronic device provided by the embodiments of the present application. Detailed Embodiments
[0065] In order to make the objectives, technical solutions and advantages of the present application clearer, the following further describes the present application in detail with reference to the appended Figure 1-6 drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0066] In order to facilitate the management of geological spatial data, improve the discoverability, accessibility, interoperability and reusability of geological spatial data, and give full play to the driving role of the data model, the present application provides a management method, system, device and storage medium for geological spatial data, unifying the logical management model architecture of geological spatial data, thereby solving the problem of integrated management of massive multi-source heterogeneous geological spatial data of multiple specialties, multiple scales and multiple formats.
[0067] An embodiment of this application provides a geological spatial data management method, which is executed by an electronic device. The electronic device can be a terminal or a server. The terminal can be a computer, a mobile phone, a tablet computer, etc. The embodiment of this application does not limit the type of the electronic device. Refer to Figure 1 , the geological spatial data management method at least includes the following steps:
[0068] Step 101: In response to an operation instruction, determine the operation type and operation parameters corresponding to the operation instruction.
[0069] Among them, the operation type refers to the way of operating on the spatial data stored in the database. Specifically, the operation types include operations such as adding data, deleting data, modifying data, and querying data.
[0070] In one example, refer to Figure 2 , the operation types can be divided into eight modules according to functions: database operation, database connection, data query, data operation, data import, data export, query model, and data item operation.
[0071] Among them, database operation includes operations such as creating, renaming, and deleting a geological spatial database; database connection operation is used for users to connect to the database to manage the geological spatial data in the database; data query includes that when the connection to the database is successful, users can query all geological spatial data tables in the database, query a certain geological spatial data table, and query one or more records in a certain geological spatial data table; data operation includes operations such as adding, updating, and deleting geological spatial data entities in the database; data import includes importing geological data in a specified data format into the database; data export includes exporting geological spatial data from the database; the query model module is used to query the feature model. Specifically, the query module can provide three data acquisition methods: obtaining all, obtaining the model according to the name, and obtaining the feature according to the name, so as to facilitate users to obtain the required content according to actual needs; the data item operation module is used to operate on the data items in the feature model, including adding data items and deleting data items, etc., so as to edit the structure of the feature model.
[0072] The operation parameters refer to the information required during the operation. The operation parameters corresponding to different operation types may be the same or different. For example, when adding a data item, the operation parameters include the type of the data item to be added and the information of the data item to be added. The information of the data item to be added corresponding to different types of data items to be added may be the same or different.
[0073] In one example, the electronic device may provide a user operation interface for receiving operation instructions issued by the user. In one embodiment, the operation type and operation parameters are directly input by the user, and the data form can be code or the actual operation type and operation parameters. In other embodiments, the operation type and operation parameters can also be obtained by parsing the operation instructions input by the user. In this way, the requirements for the user can be reduced and it is convenient for the user to use.
[0074] In other examples, an Application Programming Interface (API) is provided. At this time, the operation instructions can be obtained through the application programming interface.
[0075] Step 102: Determine the target operation object corresponding to the operation type.
[0076] Among them, the geological spatial data is stored in the target operation object. In this embodiment, the management of geological spatial data is realized by operating on the operation object. In one example, the operation object includes a data table in the database.
[0077] Optionally, the operation object includes, but is not limited to, the following types of information:
[0078] First, data item type information, which is used to maintain the data item types that can be created.
[0079] In one example, the data item type information is maintained through a data item type table.
[0080] Optionally, the data item type information includes fields such as a data item type identifier and a data item type name.
[0081] Among them, the data item type identifier is used to uniquely identify the data item type. In one example, the data item type identifier is a Universally Unique Identifier (UUID).
[0082] In one example, the data items are stored hierarchically according to the data item type. At this time, the data item type information also includes the identifier of the upper-level data item type. Among them, the identifier of the upper-level data item type is used to indicate the data item type of the upper level of the data item type.
[0083] Optionally, the content of the field of the identifier of the upper-level data item type of the highest-level data item type can be the data item type identifier corresponding to the highest-level data item type, or can also be empty, or can also be other specified identifiers. This embodiment does not limit this.
[0084] Optionally, the data item type can be set based on actual storage requirements. In one example, the data item types include: database, feature dataset, feature class, relationship class, table, etc. The types of data item types are not limited in this embodiment.
[0085] Among them, a feature class refers to a set of geometric features with the same geometric form, such as: a set of points, a set of lines, or a set of surfaces, etc.
[0086] In one example, the data item types include database, dataset, feature class / table, relationship class. At this time, referring to Figure 3 and Figure 4 , the hierarchical relationship of the data item types is that the database has the highest level. The upper-level data item types of the feature class, relationship class, table, and dataset are the database or dataset. The feature class contains spatial geometric information, and the table does not contain spatial geometric information.
[0087] In another example, the upper-level data item type of the database is the database. At this time, referring to Figure 3 and Figure 4 , the database can achieve nested storage of the database by creating a sub-database in the database. In actual implementation, the data item type can also include a sub-database. At this time, the upper-level data item type of the sub-database is the database.
[0088] Second, data item information, which is used to maintain the information of the data item.
[0089] In one example, the data item information is maintained through a data item table.
[0090] Optionally, the data item information includes fields such as: data item identifier, data item type identifier, data item name, physical name, storage path, spatial reference identifier, data type, metadata description, and / or sorting.
[0091] Among them, the data item identifier is used to uniquely identify the data item. In one example, the data item identifier is a Universally Unique Identifier (UUID); the data item type identifier is used to indicate the type of the data item; the storage path is used to indicate the storage location of the data item in the database; the spatial reference information identifier is used to indicate the spatial reference related information of the data item; the data type information is used to indicate whether it is a spatial data type.
[0092] In one example, the data item type identifier field in the data item information is associated with the data item type identifier field of the data item type information. In this way, it can be convenient to control the types of data items that can be created.
[0093] Third, feature class association information, which is used to maintain the association relationship between feature classes.
[0094] In one example, the feature class association information is maintained through a feature class association table.
[0095] Optionally, the feature class association information includes fields such as relationship class identifier, relationship class name, data item type identifier, source feature class identifier, target feature class identifier, and / or attribute.
[0096] Among them, the relationship class identifier is used to uniquely identify the relationship class. In one example, the relationship class identifier is a Universally Unique Identifier (UUID); the data item type identifier is used to identify the data item corresponding to the relationship class; the source feature class identifier and the target feature class identifier are used to indicate the associated feature classes, and the attribute is used to indicate the association fields and association relationships between the source data item and the target data item.
[0097] In one example, the source feature class identifier field and the target feature class identifier field in the feature class association information are respectively associated with the data item identifier field in the data item information. In this way, it is convenient to maintain the feature class information in each associated feature class in the feature class association information.
[0098] In one example, the relationship class identifier field in the feature class association information is associated with the data item identifier field in the data item information. In this way, it is convenient to manage the relationship classes in the data item information.
[0099] Fourth, the feature class information is used to maintain the information of the feature class.
[0100] In one example, the feature class information is maintained through a feature class table.
[0101] Optionally, the feature class information includes fields such as database identifier, feature class identifier, feature dataset identifier, geometric field name, spatial type, spatial reference identifier, feature data volume, and / or spatial range.
[0102] Among them, the database identifier is used to indicate the database where the feature class is located; the feature class identifier is used to identify the feature class. In one example, the feature class identifier is a Universally Unique Identifier (UUID); the feature dataset identifier is used to indicate the schema to which the feature class belongs; the geometric field name is used to indicate the field in the feature class that stores spatial information; the spatial type is used to indicate the type of geometric features in the feature class, such as: point, line, surface, etc.; the spatial reference information identifier is used to indicate the spatial reference related information of the feature class; the feature data volume is used to indicate the number of geometric features in the feature class; the spatial range is used to indicate the spatial range of the geometric features in the feature class, such as: minimum longitude, minimum latitude, maximum longitude, maximum latitude, minimum altitude, and / or maximum altitude, etc.
[0103] In one example, the feature class identification field in the feature class information is associated with the data item identification field in the data item type information. In this way, it is convenient to manage the feature classes in the data item information.
[0104] The fifth type is the spatial reference information, which is used to maintain information related to the spatial reference.
[0105] In one example, the spatial reference information is maintained through a spatial reference information table.
[0106] Optionally, the spatial reference information includes: spatial reference information identification, organization name, spatial reference identifier, spatial reference description, and / or spatial reference parameters, etc.
[0107] Among them, the spatial reference information identification organization name is used to indicate the organization that defines the coordinate reference, such as: EPSG; in one example, the spatial reference identifier is 4326.
[0108] In one example, the spatial reference information identification field in the spatial reference information is associated with the spatial reference information identification field in the feature class information. In this way, it is convenient to maintain the spatial reference information of the feature class.
[0109] In one example, the spatial reference information identification field in the spatial reference information is associated with the spatial reference information identification field in the data item information. In this way, it is convenient to maintain the spatial reference information of the data item.
[0110] The sixth type is the feature class field information, which is used to maintain the format of the feature class information.
[0111] In one example, the feature class field information is maintained through a feature class field information table.
[0112] Optionally, the feature class field information includes: database identification, feature class identification, feature dataset, field name, field type, field length, field precision, and / or feature characteristics, etc.
[0113] Among them, the database identification is used to indicate the database where the feature class is located; the feature class identification is used to identify the feature class. In one example, the feature class identification is a unique identifier (UUID); the feature dataset identification is used to indicate the schema to which the feature class belongs; the field name is used for the name of the field in the feature class information; the field type is used to indicate the type of the field in the feature class information, such as: integer, string, etc.; the field length is used to indicate the length of the field type corresponding to the field in the feature class information; the field precision is used to indicate the precision of the field type corresponding to the field in the feature class information; the feature characteristics include thematic sbj_, temporal tim_, spatial spl_, geometric geo_, topological top_, cartographic characteristics car_, data precision characteristics acc_, data management characteristics mgr_, etc.
[0114] In one example, the feature class identifier in the feature class field information is associated with the feature class identifier in the feature class information, so that it is convenient to maintain the feature class field information corresponding to the feature class.
[0115] In actual implementation, the operation object can also be other information stored in the database, and the type of the operation object is not limited in this embodiment.
[0116] In this embodiment, the target operation object is at least one of the operation objects.
[0117] Optionally, the operation object corresponding to the operation type is preset and stored in the electronic device. When it is determined to use a certain operation type for operation, the operation object corresponding to the operation type is determined as the target operation object.
[0118] Step 103, determine the operation content for the target operation object based on the operation type and the operation parameters.
[0119] Optionally, the methods for determining the operation content for the target operation object based on the operation type and the operation parameters include but are not limited to the following several types:
[0120] The first one, referring to Figure 2 , the operation type includes adding a data item, the operation parameter includes the type of the data item to be added, the target operation object includes the data item type information and the data item information, and the data item type identifier field in the data item information is associated with the data item type identifier field in the data item type information. At this time, the operation content includes: determining the data item type identifier corresponding to the data item type to be added based on the data item type information; inserting a new record with the data item type field being the data item type identifier to be added in the data item information.
[0121] Optionally, determining the data item type identifier corresponding to the data item type to be added based on the type item information includes: searching for the target record corresponding to the data item type to be added in the data item type information; determining the content of the data item type identifier field in the target record as the data item type identifier to be added.
[0122] In one example, query the target record corresponding to the data item type to be added in the data item type information based on the name of the data item type to be added. In other examples, other information of the data type to be queried, such as: type code and other information, can also be used to determine the target record corresponding to the data item type to be added in the data item type information, and the query method for the target data is not limited in this embodiment.
[0123] For example: if the data item type to be added is a feature class, and the content of the data item type identifier field in the record corresponding to the feature class in the data item class information is 002, then 002 is determined as the data item type identifier to be added.
[0124] Since the data item type identifier to be added is determined based on the data item type information, and a data item with a data item type identifier field of the data item type identifier to be added is added to the data item information, it is possible to maintain the types of data items that can be created through the data item type information, facilitating the management of geological spatial data.
[0125] Optionally, the operation parameter further includes a target data item. Inserting a new record with a data item type field of the data item type identifier to be added into the data item information includes: determining the target storage path corresponding to the target data item based on the data item information; determining the storage path to be added corresponding to the data item to be added based on the target storage path; inserting a new record with a data item type field of the data item type identifier to be added and a storage path field of the storage path to be added into the data item information.
[0126] Since the operation parameter includes a target data item, and the storage location to be added corresponding to the data item to be added is determined based on the target storage location corresponding to the target data item, it is possible to facilitate the management of the storage location of the added data item.
[0127] Optionally, determining the storage path to be added corresponding to the data item to be added based on the target storage path includes: determining the next-level storage path of the target storage path as the storage path of the data item to be added.
[0128] In one example, before determining the target storage path corresponding to the target data item based on the data item information, it further includes: determining the data item type identifier corresponding to the target data item based on the data item information; determining the upper-level data item type corresponding to the data item type to be added based on the data type information; determining whether the data item type corresponding to the target data item matches the upper-level data item type corresponding to the data item type to be added; in the case of a match, performing the step of determining the target storage path corresponding to the target data item based on the data item information; in the case of a mismatch, not performing the step of determining the target storage path corresponding to the target data item based on the data item information and outputting an error prompt message.
[0129] Since in the case where the target data item type does not match the upper-level data item type, the subsequent steps of adding the data item are not performed and an error prompt message is output, it is possible to avoid the problem that the storage location of the added data item does not match the hierarchical information of the data item type set in the data item type information. In this way, it is possible to facilitate the hierarchical management of geological spatial data.
[0130] Optionally, the operation parameter further includes the data item information to be added. At this time, inserting a new record with a data item type field of the data item type identifier to be added into the data item information further includes: determining the information in the added record based on the data item information to be added.
[0131] In one example, the data item information to be added includes the name of the data item to be added. At this time, determining the information in the new record based on the data item information to be added further includes: determining the name of the data item to be added as the content of the data item name field in the new record.
[0132] Optionally, the data item type includes a feature class, and adding a data item includes adding a feature class. At this time, the data item type to be added includes a feature class, and the target operation object further includes feature class information. The feature class identifier field in the feature class information is associated with the data item identifier field in the data item information. Correspondingly, in the operation content, after inserting a record with the data item type field being the identifier of the data item type to be added in the data item information, it further includes: determining the content of the data item identifier field in the new record as the target feature class identifier; inserting a record with the feature class identifier field being the target feature class identifier in the feature class information.
[0133] Since feature class records are inserted into both the data item information and the feature class information simultaneously during the process of adding a feature class, and the data item identifier field in the data item information is associated with the feature class identifier field in the feature class information, it is convenient to maintain the feature classes in the data item information, thereby facilitating the management of geological spatial data.
[0134] Optionally, when adding a data item includes adding a feature class, the operation parameters may further include information such as the identifier of the upper-level data item, the feature class name, the feature class alias, the feature class type, the attribute set, the spatial reference, and / or the geometric field name.
[0135] Optionally, the data item type includes a relationship class, adding a data item includes adding a relationship class, the operation parameters include a first feature class and a second feature class, the operation object further includes feature class association information, and the source feature class identifier field and the target feature class identifier field in the feature class association information are respectively associated with the data item identifier field in the data item information. The operation content includes: determining the first feature class identifier corresponding to the first feature class and the second feature class identifier corresponding to the second feature class based on the data item information; inserting a record with the source feature class identifier field being the first feature class identifier and the target feature class identifier field being the second feature class identifier in the feature class association information.
[0136] Optionally, determining the first feature class identifier corresponding to the first feature class and the second feature class identifier corresponding to the second feature class based on the data item information includes: searching for the first target record corresponding to the first feature class and the second target record corresponding to the second feature class in the data item information; determining the content of the data item identifier field in the first target record as the first target feature class identifier, and determining the content of the data item identifier field in the second target record as the second target feature class identifier.
[0137] Since the first feature class identifier and the second feature class identifier are determined based on the data item information, and a relationship class with the source feature class identifier field as the first feature class identifier and the target feature class identifier field as the second feature class identifier is added to the feature class association information, the association relationship between the feature classes in the data item information can be maintained based on the relationship class in the feature class association information, facilitating the management of geological spatial data.
[0138] Further, the relationship class identifier field in the feature class association information is associated with the data item identifier field in the data item information; at this time, after inserting a new record with the data item type field as the identifier of the data item type to be added in the data item information, it further includes: determining the content of the data item identifier field in the new record as the target relationship class identifier. Correspondingly, inserting a record with the source feature class identifier field as the first feature class identifier and the target feature class identifier field as the second feature class identifier in the feature class association information includes: inserting a record with the relationship class identifier field as the target relationship class identifier, the source feature class identifier field as the first feature class identifier, and the target feature class identifier field as the second feature class identifier in the feature class association information.
[0139] Since relationship class records are inserted into both the data item information and the feature class association information during the process of adding the relationship class, and the data item identifier field in the data item information is associated with the relationship class identifier field in the feature class association information, it is convenient to maintain the relationship class in the data item information, thus facilitating the management of geological spatial data.
[0140] Optionally, when adding a data item includes adding a relationship class, the operation parameters may further include information such as the upper-level data item identifier, forward connection word, backward connection word, relationship type, source keyword, and / or target keyword.
[0141] Optionally, the data item type includes a database, adding a data item includes adding a database, the data item type to be added includes a database type, the operation parameter further includes the address of the database to be added, and inserting a record with the data item type field as the identifier of the data item type to be added in the data item information includes: inserting a record with the data item type field as the database type identifier and the database address as the address of the database to be added in the data item information.
[0142] Wherein, the database address refers to the connection address of the database, and a connection with the database can be established through the database address.
[0143] Optionally, the data item types include databases, adding a data item includes adding a sub-database, the data item type to be added includes database types, the operation parameters further include the target database, and inserting a new record with the data item type field in the data item information being the identifier of the data item type to be added includes: determining the target storage path and the target database address corresponding to the target database based on the data item information; determining the storage path to be stored corresponding to the sub-database based on the target storage path; inserting a new record in the data item information with the data item type field being the database type, the storage path field being the storage path to be stored, and the database address being the target database address.
[0144] Among them, the sub-database is a virtual database established in the target database, and only by establishing a connection with the target database can the target database and all sub-databases of the target database be accessed.
[0145] Optionally, creating a new sub-database in the target database includes: creating a new sub-database in the target database managed by the geological spatial database management system.
[0146] Optionally, the target database can also be a sub-database. In this case, the databases can be stored in a multi-level nested manner.
[0147] Since the sub-database is constructed in the target database, it is beneficial to store geological spatial data of the same nature in the same physical database, thereby improving the speed of data query.
[0148] In addition, since the sub-database can be accessed by establishing a connection with the target database, the number of database connections can be reduced, and the efficiency of database switching can be accelerated.
[0149] Optionally, when adding a data item includes a database, the operation parameters can further include information such as the identifier of the upper-level data item, the database name, the user name, and the password port.
[0150] In actual implementation, the geological spatial data management method provided in this embodiment can also add other types of data items. For example, adding data items such as feature datasets, or geometric features can also be added. The specific implementation method refers to the above method of adding data items, and this embodiment will not elaborate on this.
[0151] Second, referring to Figure 2 , the operation type includes deleting a data item, the operation parameters include the data item to be deleted, and the target operation objects include data item information, feature class information, and / or relationship class information.
[0152] Optionally, deleting a data item includes operations such as deleting a database, deleting a sub-database, deleting a specified feature dataset, deleting a specified feature class, deleting a specified relationship class, and deleting a specified feature. This embodiment does not make any limitations in this regard.
[0153] Optionally, when deleting a data item, it is only necessary to search for the record corresponding to the data item to be deleted in the corresponding operation object and delete the record. The specific process of deleting the data item will not be elaborated in this embodiment.
[0154] Thirdly, referring to Figure 2 , the operation type includes data query, and the operation parameters include the data item to be queried and the query condition.
[0155] Optionally, data query includes operations such as querying the database directory, querying all features of a specified feature class, querying a specified feature, querying features by spatial range, querying features by attribute conditions, and querying the number of features in a feature class. This embodiment does not limit this.
[0156] Optionally, when performing a data query, it is only necessary to query the information of the data item to be queried in the operation object using the corresponding query condition. The specific process of the data query will not be elaborated in this embodiment.
[0157] Fourthly, the operation type includes data update, and the operation parameters include the data item to be updated and the information to be updated.
[0158] In one example, data update includes updating geometric features.
[0159] Optionally, when performing a data update, it is only necessary to query the record corresponding to the data item to be updated in the corresponding operation object, and update the content of the record corresponding to the data item to be updated based on the information to be updated. The specific process of the data update will not be elaborated in this embodiment.
[0160] In actual implementation, the operation type can also include other types, which are not limited in this embodiment.
[0161] Step 104, manage the operation object based on the operation content.
[0162] In one example, the operation object is stored in the geological spatial database management system. Managing the operation object based on the operation content includes: operating on the operation object stored in the geological spatial database management system based on the operation content.
[0163] Optionally, before operating on the operation object stored in the geological spatial database management system based on the operation content, it further includes: determining connection information in response to a connection request, and establishing a connection with the geological spatial database management system based on the connection information.
[0164] Among them, the connection information includes: information such as database address, username, password, database identifier, etc.
[0165] Optionally, the geological spatial database management system can be stored locally in the electronic device, or it can also be stored in other devices, such as: stored in the server. In the case where the database is stored in other devices, the electronic device is communicatively connected to other devices. At this time, a connection with the geological spatial database management system can be established through the communication connection between the electronic device and other devices.
[0166] Optionally, establishing a connection with the geological spatial database management system based on the connection information includes: sending the connection information to the geological spatial database management system based on the data interface with the geological spatial database management system; receiving the connection result returned by the geological spatial database management system. In an example, when the connection result indicates a successful connection, the connection information is saved.
[0167] In an example, the geological spatial database management system is implemented by a PostgreSQL database, and the database interface is implemented based on Npgsql. At this time, a connection with the PostgreSQL database can be established based on Npgsql.
[0168] Npgsql is a.NET data provider for PostgreSQL (i.e., the data middle layer for accessing PostgreSQL under.NET languages), which allows a.NET client application (such as Console, WinForms, ASP.NET, WebServices, etc.) to directly access PostgreSQL.
[0169] Optionally, the operation content is represented in the operation language of the geological spatial database management system, and the operation object is managed based on the operation content, including: sending the operation content to the geological spatial database management system.
[0170] In actual implementation, geological spatial data may be stored in different types of geological spatial database management systems, and the operation language formats of different types of geological spatial database management systems may not be the same. Therefore, it is necessary to determine the operation language format of the geological spatial database management system based on the type of the geological spatial database management system storing the operation object, and generate the operation content using this operation language format.
[0171] Optionally, the geological spatial data management method provided in this embodiment further includes: determining the operation result corresponding to the response information in response to the response information returned by the database; outputting the operation result.
[0172] Optionally, the response information corresponding to different operation contents is the same or different. In one example, the response information is an operation success flag or an operation failure flag. At this time, the operation result includes operation success or operation failure. In another example, the response information includes data information or is empty. At this time, the response information is the operation result.
[0173] The implementation principle of a geological space data management method provided by an embodiment of the present application is as follows: in response to an operation instruction, determine the operation type and operation parameters corresponding to the operation instruction, determine the target operation object corresponding to the operation type, where the geological space data is stored in the target operation object, determine the operation content for the target operation object based on the operation type and operation parameters, and manage the operation object based on the operation content; it can solve the problem of inconvenient management of geological space data caused by the fact that the geological information system can only perform operations using a specific operation language. Since the operation object can be determined based on the operation type, and the operation content for the target operation object can be determined based on the operation type and operation parameters without directly inputting the operation content, it is convenient to manage the geological space data.
[0174] An embodiment of the present application also discloses a geological space data management system. Refer to Figure 5 , the geological space data management system includes: an information interaction module 310, a middleware module 320, and a database module 330;
[0175] The information interaction module 310 is used to obtain an operation instruction and send the operation instruction to the middleware module;
[0176] The middleware module 320 is used to, in response to the operation instruction, determine the operation type and operation parameters corresponding to the operation instruction; determine the target operation object corresponding to the operation type, where the geological space data is stored in the target operation object; determine the operation content for the target operation object based on the operation type and operation parameters; and perform an operation on the database module based on the operation content;
[0177] The database module 330 is used to manage the operation object in response to the operation of the middleware.
[0178] For related details, refer to the above method embodiment.
[0179] It should be noted that when the geological spatial data management system provided in the above embodiments manages geological spatial data, only the division of the above functional modules is used for illustration. In actual applications, the above functions can be assigned to different functional modules according to needs, that is, the internal structure of the geological spatial data management system is divided into different functional modules to complete all or part of the functions described above. In addition, the geological spatial data management system provided in the above embodiments and the embodiments of the geological spatial data management method belong to the same concept. For the specific implementation process, please refer to the method embodiments and will not be elaborated here.
[0180] An embodiment of the present application also provides an electronic device, as Figure 6 shown, Figure 6 The electronic device 400 shown includes: a processor 401 and a memory 403. Among them, the processor 401 and the memory 403 are connected, such as connected through a bus 402. Optionally, the electronic device 400 may further include a transceiver 404. It should be noted that in actual applications, the transceiver 404 is not limited to one, and the structure of the electronic device 400 does not constitute a limitation on the embodiments of the present application.
[0181] The processor 401 may be a CPU (Central Processing Unit, central processing unit), a general-purpose processor, a DSP (Digital Signal Processor, data signal processor), an ASIC (Application Specific Integrated Circuit, application-specific integrated circuit), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute various exemplary logic blocks, modules, and circuits described in connection with the disclosure of the present application. The processor 401 may also be a combination that implements a computing function, such as a combination including one or more microprocessors, a combination of a DSP and a microprocessor, etc.
[0182] The bus 402 may include a path for transmitting information between the above components. The bus 402 may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus or an EISA (Extended Industry Standard Architecture, extended industry standard structure) bus, etc. The bus 402 may be divided into an address bus, a data bus, etc. For the sake of representation, Figure 6 only a thick line is used to represent it in, but it does not mean that there is only one bus or one type of bus.
[0183] The memory 403 can be a ROM (Read Only Memory), or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory), or other types of dynamic storage devices that can store information and instructions. It can also be an EEPROM (Electrically Erasable Programmable Read Only Memory), a magnetic disk storage medium, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0184] The memory 403 is used to store the application program code for executing the solution of this application, and is controlled by the processor 401 for execution. The processor 401 is used to execute the application program code stored in the memory 403 to implement the content shown in the foregoing method embodiments.
[0185] Among them, the electronic device includes but is not limited to: mobile terminals such as mobile phones, laptop computers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), etc., and fixed terminals such as digital TVs, desktop computers, etc. It can also be a server, etc. Figure 6 The shown electronic device is only an example and should not impose any limitations on the functions and usage scope of the embodiments of this application.
[0186] The embodiments of this application also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed on a computer, the computer is made to execute the geospatial data management method provided in the foregoing embodiments.
[0187] It should be understood that although the steps in the flowchart of the accompanying drawings are shown in sequence according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limitation and can be executed in other orders.
[0188] The above are all the preferred embodiments of this application. The protection scope of this application is not limited thereby. Any feature disclosed in this specification (including the abstract and the drawings), unless specifically described, can be replaced by other equivalent or similar-purpose alternative features. That is, unless specifically described, each feature is only an example in a series of equivalent or similar features.
Claims
1. A geological spatial data management method, characterized in that: The method comprises: In response to the operation instruction, determining the operation type and operation parameters corresponding to the operation instruction; Determine a target operation object corresponding to the operation type, wherein the target operation object stores geological spatial data, and the target operation object corresponding to the operation type is preset; Determine the operation content of the target operation object based on the operation type and the operation parameter; Managing the operation object based on the operation content; The target operation object is at least one of the operation objects; the operation objects include a data item type table for maintaining creatable data item types, a data item table for maintaining information of data items, an association relationship table for maintaining association information of feature classes between feature classes, a feature class table for maintaining information of feature classes, and a feature class field information table in a format in which a user maintains feature class information; The data item type identification field in the data item table is associated with the data item type identification field in the data item type table, the feature class identification field in the feature class table is associated with the data item identification field in the data item table, the feature class identification field in the feature class field information table is associated with the feature class identification field in the feature class table, and the source feature class identification field and the target feature class identification field in the association relationship table in the feature class association information are respectively associated with the data item identification field in the data item table; The data item types include database, sub-database, feature dataset, feature class, table, and relationship class. The hierarchical relationship between the data item types is that the database has the highest level, the upper-level data item type of the data sub-database is the data sub-database or database, the upper-level data item type of the feature class, relationship class, table and dataset is the database, data sub-database or dataset, the feature class contains spatial geometry information, and the table does not contain spatial geometry information.
2. The method according to claim 1, characterized in that The operation type includes adding a data item, the operation parameter includes the type of the data item to be added, the target operation object includes the data item type table and the data item table, and the operation content includes: Determine, based on the data item type table, a data item type identifier to be added corresponding to the data item type to be added; Insert a new record in the data item table whose data item type field is the identifier of the data item type to be added.
3. The method according to claim 2, characterized in that The data item type includes a feature class, adding a data item includes adding a feature class, the type of the data item to be added includes a feature class, the target operation object also includes the feature class table, and after inserting the data item type field into the data item information as a new record identified by the type of the data item to be added, the method further includes: Determine the content of the data item identification field in the newly added record as the target feature class identification; Insert a record whose feature class identification field is the target feature class identifier into the feature class table.
4. The method according to claim 2, characterized in that: The data item type includes a relationship class, the adding of the data item includes adding a relationship class, the operation parameter includes a first element class and a second element class, the operation object also includes the association relationship table, and the operation content includes: Determine, based on the data item table, a first feature class identifier corresponding to the first feature class and a second feature class identifier corresponding to the second feature class; Insert a record in the association relationship table in which the source feature class identification field is the first feature class identification and the target feature class identification field is the second feature class identification.
5. The method according to claim 4, characterized in that After the data item information is inserted with the data item type field being a new record of the data item type identifier to be added, the method further includes: Determine the content of the data item identification field in the newly added record as the target relationship class identifier; The inserting of the record in the association relationship table, in which the source feature class identification field is the first feature class identification and the target feature class identification field is the second feature class identification, comprises: Insert a record in the association relationship table in which the relationship class identification field is the target relationship class identification, the source feature class identification field is the first feature class identification, and the target feature class identification field is the second feature class identification.
6. The method according to claim 2, characterized in that The operation parameter also includes a target data item, and the inserting of a new record in the data item table whose data item type field is the identifier of the type of the data item to be added includes: Determine a target storage path corresponding to the target data item based on the data item information; Determine a storage path corresponding to the data item to be added based on the target storage path; The data item type field inserted into the data item information is the type identifier of the data item to be added, and the storage path field is a newly added record of the path to be stored.
7. A geological spatial data management system, characterized in that: The system includes an information interaction module, a middleware module, and a database module; The information interaction module is used to obtain an operation instruction and send the operation instruction to the middleware module; The middleware module is used to respond to the operation instruction, determine the operation type and operation parameters corresponding to the operation instruction; determine the target operation object corresponding to the operation type, wherein the target operation object stores geological spatial data; determine the operation content of the target operation object based on the operation type and the operation parameters; and operate the database module based on the operation content; The target operation object is at least one of the operation objects, and the operation object includes a data item type table for maintaining creatable data item types, a data item table for maintaining information of data items, an association relationship table for maintaining feature class association information of association relationships between feature classes, a feature class table for maintaining feature class information, and a feature class field information table in a format in which a user maintains feature class information; the data item type identification field in the data item table is associated with the data item type identification field in the data item type table, the feature class identification field in the feature class table is associated with the data item identification field in the data item table, the feature class identification field in the feature class field information table is associated with the feature class identification field in the feature class table, and the source feature class identification field and the target feature class identification field of the association relationship table in the feature class association information are respectively associated with the data item identification field in the data item table; The data item types include database, sub-database, data set, feature class, table, and the hierarchical relationship of each data item type is that the database is the highest level, the upper level data item type of the data sub-database is the data sub-database or database, the upper level data item type of the feature class, relationship class, table and data set is the database, data sub-database or data set, the feature class contains spatial geometry information, and the table does not contain spatial geometry information; The database module is used to manage the operation object in response to the operation of the middleware.
8. An electronic device, characterized in that: The electronic device includes: at least one processor; Memory; At least one application, wherein the at least one application is stored in a memory and configured to be executed by at least one processor, and the at least one application is configured to: execute the geological spatial data management method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed in a computer, the computer is caused to execute the geological spatial data management method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Database operation method and device
CN106776638A