A geographic file data quality inspection method, system and device based on a Mybatis-Plus framework

By writing graphical SQL statements in the Mybatis-Plus framework and using Geotools to parse geographic file data, the problem of cumbersome geographic file quality inspection was solved, achieving efficient autonomous quality inspection and improved software maintainability.

CN116226156BActive Publication Date: 2025-11-11FUZHOU TELEWARE ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310082669.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-30
Publication Date
2025-11-11
Estimated Expiration
2043-01-30

AI Technical Summary

Technical Problem

The existing geographic file data quality inspection is cumbersome, requiring access to third-party geoprocessing software, which has poor maintainability and low inspection efficiency.

Method used

Based on the Mybatis-Plus framework, graphical SQL statements are written in XML files to generate callable Java objects. Combined with Geotools to parse geographic file data, autonomous quality inspection is achieved, including checking whether it overlaps with the original database data, whether it exceeds administrative regions, and checking the integrity of graphical data and coordinate basis.

Benefits of technology

It improves the efficiency of geographic data quality inspection and the maintainability of the software, reduces reliance on third-party software, and enables flexible quality inspection operations based on business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116226156B_ABST
    Figure CN116226156B_ABST
Patent Text Reader

Abstract

This invention provides a method, system, and device for quality inspection of geographic file data based on the Mybatis-Plus framework. The method includes the following steps: pre-writing project-related graphical SQL statements in an XML file; starting the Mybatis-Plus framework and establishing a connection with the database; scanning and reading configuration files in the Mybatis-Plus framework, while simultaneously loading the XML file to generate Java objects that can be directly called by Java; acquiring the geographic file data to be inspected and extracting the graphical data to be inspected; calling the corresponding Java object according to the quality inspection item, comparing the graphical data to be inspected with the graphical data in the database, and determining whether the graphical data to be inspected meets the quality inspection conditions. If so, the geographic file data is stored in the database; otherwise, a quality inspection failure result is returned to the user. This invention optimizes the graphical data quality inspection process, improving inspection efficiency and software maintainability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of geographic document quality inspection technology, and in particular to a geographic document data quality inspection method, system and device based on the Mybatis-Plus framework. Background Technology

[0002] The existing Chinese invention patent with application number CN202111472793.3, titled "A Method for Data Storage and Reading / Writing of Geographic Files," proposes a novel method for storing geographic file data in a relational database to reduce the steps users need to install databases and plugins when uploading geographic data files, thus lowering the learning curve for users using open-source software. This method is developed based on a B / S architecture, allowing for customized read / write operations on the web interface. It achieves compatibility with existing databases for multi-source heterogeneous spatial data extraction, transformation, storage, and loading, and manages geographic data file information through the cloud. Users only need to operate in a browser to import geographic data files without additional software support, resulting in low development and maintenance costs. However, this patent lacks a quality inspection feature for geographic file data, which is precisely an indispensable part of the data import process.

[0003] Currently, geographic data quality inspection is often conducted manually, while some rely on third-party software. For example, the existing Chinese invention patent (application number CN114443624A) – "A Method for Quality Inspection of Basic Geographic Information Data" – addresses the shortcomings of traditional manual inspection methods. Manual inspection suffers from numerous drawbacks in terms of inspection methods, content, costs, and efficiency, leading to inconsistent results, numerous errors, and low efficiency. However, it doesn't address how the software itself can improve quality inspection and process optimization. Furthermore, it uses third-party software, making it difficult to maintain independent control over the software and increasing usage costs.

[0004] With increasingly stringent requirements for spatial data quality inspection, the demands on software development efficiency are also becoming more stringent. There is an urgent need to provide a solution that simplifies the geographic data quality inspection process at the software level, allowing for the creation of a product that is truly original and independent of third-party applications. This solution would enable the software to perform various self-matches based on business requirements for geographic data inspection, thereby improving development efficiency and software maintainability. Summary of the Invention

[0005] The technical problem this invention aims to solve is to provide a method, system, and device for quality inspection of geographic file data based on the Mybatis-Plus framework. This addresses the issues of cumbersome existing graphic data quality inspection processes, the need to access third-party geoprocessing software, and the poor maintainability of the software.

[0006] In a first aspect, the present invention provides a method for quality inspection of geographic file data based on the Mybatis-Plus framework, comprising the following steps:

[0007] Step S1: Write graphical SQL statements related to the quality inspection project in the XML file of the Mybatis-Plus framework beforehand;

[0008] Step S2: Start the Mybatis-Plus framework and complete the connection with the database;

[0009] Step S3: Scan and read the configuration files in the Mybatis-Plus framework, load the XML files related to the quality inspection project, and generate Java objects that can be directly called by Java.

[0010] Step S4: Obtain the geographic file data to be inspected, and use Geotools to parse the geographic file data online to extract the graphic data to be inspected.

[0011] Step S5: Call the corresponding Java object according to the quality inspection item, obtain the graphic data in the database, and compare the graphic data to be inspected with the graphic data in the database to determine whether the graphic data to be inspected meets the quality inspection conditions. If so, the geographic file data is entered into the database; otherwise, the quality inspection failure result is returned to the user.

[0012] Steps S1 and S4 are executed in any order.

[0013] Furthermore, step S5 also includes returning the quality inspection failure result to the user, and after the user modifies the geographic file data, returning to step S4 to re-execute the quality inspection operation.

[0014] Furthermore, determining whether the graphic data to be inspected meets the quality inspection conditions is designed according to business needs, including checking whether it overlaps with the original data in the database, whether it exceeds the administrative region, whether the graphic data is complete, and coordinate basis checks.

[0015] Furthermore, the geographic file data in step S4 includes SHP files and DWG files.

[0016] Furthermore, the XML files of the Mybatis-Plus framework include Java service-layer callable XML methods.

[0017] Furthermore, the graphical SQL statements are PostGIS-based SQL statements, which include statements for adding, deleting, modifying, and querying database tables, as well as GIS judgment statements for quality inspection.

[0018] Furthermore, the graphical SQL statement is used to query graphical data related to quality inspection items in the database, and the quality inspection GIS judgment operation in step S5 is implemented through Java code.

[0019] Secondly, the present invention provides a geographic document data quality inspection system based on the Mybatis-Plus framework, including a pre-written module, a database connection module, an object generation module, a data extraction module, and a quality inspection module;

[0020] The pre-written module is used to pre-write graphical SQL statements related to quality inspection projects in the XML file of the Mybatis-Plus framework;

[0021] The database connection module is used to start the Mybatis-Plus framework and complete the connection with the database;

[0022] The object generation module is used to scan and read configuration files in the Mybatis-Plus framework, load XML files related to the quality inspection project, and generate Java objects that can be directly called by Java.

[0023] The data extraction module is used to acquire geographic file data to be inspected, and to extract the graphic data to be inspected by parsing the geographic file data online using Geotools.

[0024] The quality inspection module is used to call the corresponding Java object according to the quality inspection item, obtain the graphic data in the database, compare the graphic data to be inspected with the graphic data in the database, and determine whether the graphic data to be inspected meets the quality inspection conditions. If it does, the geographic file data is entered into the database; otherwise, the quality inspection failure result is returned to the user.

[0025] Furthermore, the quality inspection module also includes a function for returning a quality inspection failure result to the user, allowing the user to modify the geographic file data, and then returning the data extraction module to re-execute the quality inspection operation.

[0026] Furthermore, determining whether the graphic data to be inspected meets the quality inspection conditions is designed according to business needs, including checking whether it overlaps with the original data in the database, whether it exceeds the administrative region, whether the graphic data is complete, and coordinate basis checks.

[0027] Furthermore, the geographic file data in the data extraction module includes SHP files and DWG files.

[0028] Furthermore, the XML files of the Mybatis-Plus framework include Java service-layer callable XML methods.

[0029] Furthermore, the graphical SQL statements are PostGIS-based SQL statements, which include statements for adding, deleting, modifying, and querying database tables, as well as GIS judgment statements for quality inspection.

[0030] Furthermore, the graphical SQL statement is used to query graphical data related to quality inspection items in the database, and the quality inspection GIS judgment operation in the quality inspection module is implemented at the Java code level.

[0031] Thirdly, the present invention provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first aspect.

[0032] The present invention provides one or more technical solutions, which have at least the following technical effects or advantages: By parsing and mapping SQL statements through the Mybatis-Plus framework, corresponding Java objects are generated according to different business needs. When users need quality inspection, they can directly call different objects to perform different geographic data inspection operations according to different business needs. It is not limited by business categories, has high flexibility, and can improve development efficiency with as little code as possible. It is more efficient than the previous Java code loop traversal for graphic data quality inspection, and at the same time improves the readability and maintainability of the software. Attached Figure Description

[0033] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0034] Figure 1 This is a flowchart illustrating the execution of a geographic file data quality inspection method based on the Mybatis-Plus framework in Embodiment 1 of the present invention.

[0035] Figure 2 This is a schematic diagram of the structure of a geographic file data quality inspection system based on the Mybatis-Plus framework in Embodiment 2 of the present invention;

[0036] Figure 3 This is a schematic diagram of the electronic device in Embodiment 3 of the present invention. Detailed Implementation

[0037] This application provides a method, system, and device for quality inspection of geographic file data based on the Mybatis-Plus framework, which solves the problems of cumbersome quality inspection of existing graphic data and poor software maintainability.

[0038] The overall approach of the technical solution in this application is as follows: Based on MyBatis-Plus, a Mapper interface written in the database is parsed, and the big data quality inspection SQL statement is merged with an existing XML file, enabling the Java Server layer to call this XML method. When a quality inspection operation is required, only the Java object needs to be called, and the graphical data is passed in. The system then automatically reads the XML file and the graphical data in the database, performs the quality inspection, and returns the results. This invention makes geographic data quality inspection more efficient and code-driven, while significantly enhancing software readability and maintainability. Because big data quality inspection uses native database SQL statements, it is more efficient than the previous method of using Java code to iterate through graphical data.

[0039] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.

[0040] Example 1

[0041] This embodiment provides a method for quality inspection of geographic file data based on the Mybatis-Plus framework, such as... Figure 1 As shown, the method comprises the following steps:

[0042] Step S1: Write graphical SQL statements related to the quality inspection project in the XML file of the Mybatis-Plus framework beforehand;

[0043] Step S2: Start the Mybatis-Plus framework and complete the connection with the database. Specifically, when creating a new Java system and initializing the Spring Boot project, you can add the Mybatis-Plus dependency and add database configuration information in the application.yml file of Spring Boot to complete the database connection.

[0044] Step S3: Scan and read the configuration files in the Mybatis-Plus framework, load the XML files related to the quality inspection project, and generate Java objects that can be directly called by Java.

[0045] Step S4: Obtain the geographic file data to be inspected, and use Geotools to parse the geographic file data online to extract the graphic data to be inspected.

[0046] Step S5: Call the corresponding Java object according to the quality inspection item, obtain the graphic data in the database, and compare the graphic data to be inspected with the graphic data in the database to determine whether the graphic data to be inspected meets the quality inspection conditions. If so, the geographic file data is entered into the database; otherwise, the quality inspection failure result is returned to the user.

[0047] Steps S1 and S4 are executed in any order.

[0048] Preferably, step S5 further includes returning the quality inspection failure result to the user, and after the user modifies the geographic file data, returning to step S4 to re-execute the quality inspection operation.

[0049] Preferably, the determination of whether the graphic data to be inspected meets the quality inspection conditions is designed according to business needs, including checking whether it overlaps with the original data in the database, whether it exceeds the administrative region, whether the graphic data is complete, and coordinate basis checks. Different quality inspection items require different quality inspection conditions, which can be one or more of the above. Among them, coordinate basis checks include loop self-intersection, polygon self-intersection, and whether the loop is closed. Only when all the conditions required for the quality inspection item are passed is the quality inspection condition considered met.

[0050] Preferably, the geographic file data in step S4 includes SHP files and DWG files.

[0051] Preferably, the XML file of the Mybatis-Plus framework includes XML methods that can be called by the Java service layer.

[0052] Preferably, the graphical SQL statement is a PostGIS-based SQL statement. The SQL statement includes CRUD (Create, Read, Update, Delete) statements for database tables and quality inspection GIS (Geographic Information System) judgment statements. Depending on actual needs, the SQL statement may include only one or more of the CRUD statements for database tables. Alternatively, the quality inspection judgment statements can be written into the graphical SQL statement to form a quality inspection GIS judgment statement, thereby implementing the quality inspection judgment process in step S5. In another preferred embodiment, the graphical SQL statement is used to query graphical data related to the quality inspection project in the database. The quality inspection GIS judgment operation in the quality inspection module is implemented at the Java code level. That is, the graphical SQL statement in this invention can be used only to obtain the corresponding graphical data in the database, or it can include quality inspection judgment operations.

[0053] Based on the same inventive concept, this application also provides a system corresponding to the method in Embodiment 1, as detailed in Embodiment 2.

[0054] Example 2

[0055] This embodiment provides a geographic file data quality inspection system based on the Mybatis-Plus framework, such as... Figure 2 As shown, it includes a pre-written module, a database connection module, an object generation module, a data extraction module, and a quality inspection module;

[0056] The pre-written module is used to pre-write graphical SQL statements related to quality inspection projects in the XML file of the Mybatis-Plus framework;

[0057] The database connection module is used to start the Mybatis-Plus framework and complete the connection with the database. Specifically, when creating a new Java system and initializing a Spring Boot project, the database connection can be completed by adding the Mybatis-Plus dependency and adding database configuration information to the application.yml file of Spring Boot.

[0058] The object generation module is used to scan and read configuration files in the Mybatis-Plus framework, load XML files related to the quality inspection project, and generate Java objects that can be directly called by Java.

[0059] The data extraction module is used to acquire the geographic file data to be inspected, and to extract the graphic data to be inspected by parsing the geographic file data online using Geotools.

[0060] The quality inspection module is used to call the corresponding Java object according to the quality inspection item, obtain the graphic data in the database, compare the graphic data to be inspected with the graphic data in the database, and determine whether the graphic data to be inspected meets the quality inspection conditions. If it does, the geographic file data is entered into the database; otherwise, the quality inspection failure result is returned to the user.

[0061] Preferably, the quality inspection module further includes a function for returning a quality inspection failure result to the user, allowing the user to modify the geographic file data, and then returning the data extraction module to re-execute the quality inspection operation.

[0062] Preferably, the determination of whether the graphic data to be inspected meets the quality inspection conditions is designed according to business needs, including checking whether it overlaps with the original data in the database, whether it exceeds the administrative region, whether the graphic data is complete, and coordinate basis checks. Different quality inspection items require different quality inspection conditions, which can be one or more of the above. Among them, coordinate basis checks include loop self-intersection, polygon self-intersection, and whether the loop is closed. Only when all the conditions required for the quality inspection item are passed is the quality inspection condition considered met.

[0063] Preferably, the geographic file data in the data extraction module includes SHP files and DWG files.

[0064] Preferably, the XML file of the Mybatis-Plus framework includes XML methods that can be called by the Java service layer.

[0065] Preferably, the graphical SQL statement is a PostGIS-based SQL statement. The SQL statement includes CRUD (Create, Read, Update, Delete) statements for database tables and quality inspection GIS (Geographic Information System) judgment statements. Depending on actual needs, the SQL statement may include only one or more of the CRUD statements for database tables. Alternatively, the quality inspection judgment statements can be written into the graphical SQL statement to form the quality inspection GIS judgment statement, thereby implementing the quality inspection judgment process in the quality inspection module. In another preferred embodiment, the graphical SQL statement is used to query graphical data related to the quality inspection project in the database, and the quality inspection GIS judgment operation in the quality inspection module is implemented at the Java code level. That is, the graphical SQL statement in this invention can be used only to obtain the corresponding graphical data in the database, or it can include quality inspection judgment operations.

[0066] Since the system described in Embodiment 2 of this invention is a system used to implement the method of Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this system based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All systems used in the method of Embodiment 1 of this invention fall within the scope of protection of this invention.

[0067] Based on the same inventive concept, this application provides an electronic device embodiment corresponding to Embodiment 1, as detailed in Embodiment 3.

[0068] Example 3

[0069] This embodiment provides an electronic device, such as... Figure 3 As shown, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it can implement any of the embodiments in Example 1.

[0070] Since the electronic device described in this embodiment is the device used to implement the method in Embodiment 1 of this application, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in Embodiment 1 of this application. Therefore, how the electronic device implements the method in the embodiment of this application will not be described in detail here. Any device used by those skilled in the art to implement the method in the embodiment of this application falls within the scope of protection of this application.

[0071] This invention writes PostGIS SQL statements based on business requirements and parses them using the Mybatis-Plus framework. These statements are then combined with existing XML files to create new callable objects. When quality inspection is needed, users only need to call the corresponding object to retrieve database content for inspection and then insert data that meets the inspection requirements into the database. Because big data quality inspection uses native database SQL statements, development efficiency is improved with minimal code, making it more efficient than previous methods of using Java code for graphical data quality inspection. The software is also highly readable. This invention solves the cumbersome technical problems of existing graphical data quality inspection and eliminates the need to access third-party geoprocessing software (ArcGIS, FME, SperMap, MapGIS), improving maintainability and increasing the diversity of spatial data self-inspection technology. Furthermore, it allows for the invocation of different objects to perform different geographic data inspection operations based on different business needs, without being limited by business categories, offering high flexibility.

[0072] While specific embodiments of the present invention have been described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and not intended to limit the scope of the present invention. Equivalent modifications and variations made by those skilled in the art in accordance with the spirit of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for quality inspection of geographic file data based on the Mybatis-Plus framework, characterized in that: Includes the following steps: Step S1: Write graphical SQL statements related to the quality inspection project in the XML file of the Mybatis-Plus framework beforehand; Step S2: Start the Mybatis-Plus framework and complete the connection with the database; Step S3: Scan and read the configuration files in the Mybatis-Plus framework, load the XML files related to the quality inspection project, and generate Java objects that can be directly called by Java. Step S4: Obtain the geographic file data to be inspected, and use Geotools to parse the geographic file data online to extract the graphic data to be inspected. Step S5: Call the corresponding Java object according to the quality inspection item, obtain the graphic data in the database, and compare the graphic data to be inspected with the graphic data in the database to determine whether the graphic data to be inspected meets the quality inspection conditions. If so, the geographic file data is entered into the database; otherwise, the quality inspection failure result is returned to the user. Steps S1 and S4 are executed in any order.

2. The method according to claim 1, characterized in that: Step S5 further includes returning the quality inspection failure result to the user, and after the user modifies the geographic file data, returning to step S4 to re-execute the quality inspection operation.

3. The method according to claim 1, characterized in that: The determination of whether the graphic data to be inspected meets the quality inspection conditions is designed according to business needs, including checking whether it overlaps with the original data in the database, whether it exceeds the administrative region, whether the graphic data is complete, and coordinate basis checks.

4. The method according to claim 1, characterized in that: The geographic file data in step S4 includes SHP files and DWG files.

5. The method according to claim 1, characterized in that: The graphical SQL statements are PostGIS-based SQL statements, which include statements for adding, deleting, modifying, and querying database tables, as well as GIS quality inspection judgment statements.

6. The method according to claim 1, characterized in that: The graphical SQL statement is used to query graphical data related to quality inspection items in the database, and the quality inspection GIS judgment operation in step S5 is implemented through Java code.

7. A geographic document data quality inspection system based on the Mybatis-Plus framework, characterized in that: It includes a pre-written module, a database connection module, an object generation module, a data extraction module, and a quality inspection module; The pre-written module is used to pre-write graphical SQL statements related to quality inspection projects in the XML file of the Mybatis-Plus framework; The database connection module is used to start the Mybatis-Plus framework and complete the connection with the database; The object generation module is used to scan and read configuration files in the Mybatis-Plus framework, load XML files related to the quality inspection project, and generate Java objects that can be directly called by Java. The data extraction module is used to acquire geographic file data to be inspected, and to extract the graphic data to be inspected by parsing the geographic file data online using Geotools. The quality inspection module is used to call the corresponding Java object according to the quality inspection item, obtain the graphic data in the database, compare the graphic data to be inspected with the graphic data in the database, and determine whether the graphic data to be inspected meets the quality inspection conditions. If it does, the geographic file data is entered into the database; otherwise, the quality inspection failure result is returned to the user.

8. The system according to claim 7, characterized in that: The quality inspection module also includes a function that, after returning a quality inspection failure result to the user, allows the user to modify the geographic file data and then return it to the data extraction module to re-execute the quality inspection operation.

9. The system according to claim 7, characterized in that: The determination of whether the graphic data to be inspected meets the quality inspection conditions is designed according to business needs, including checking whether it overlaps with the original data in the database, whether it exceeds the administrative region, whether the graphic data is complete, and coordinate basis checks.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Geographic file data storage and read-write method

    CN113868202A

  • Basic geographic information data quality inspection method

    CN114443624A