Underground pipeline data quality inspection method based on parameterized rule base
By abstracting the requirements for underground pipeline data quality inspection into structured rule templates and mapping parameters through a parameterized rule base, the problem of high coupling between inspection logic and code in existing technologies is solved, enabling flexible, configurable and scalable data quality inspection, and improving inspection efficiency and accuracy.
Patent Information
- Application Number
- CN202511697766.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-02-13
AI Technical Summary
Existing technologies for underground pipeline data quality inspection methods suffer from high coupling between rules and code, poor adaptability, insufficient scalability, and high technical barriers, making it difficult to cope with differences in data structure and changes in business needs across different cities and projects.
By adopting a parameterized rule base approach, the requirements for underground pipeline data quality inspection are abstracted into structured rule templates, and executable instructions are generated through a parameter mapping mechanism. This decouples the inspection logic from the program execution and supports flexible configuration and expansion of various inspection items.
It improves the flexibility and efficiency of inspections, reduces maintenance costs and technical barriers, achieves adaptability and universality to different data sources and structures, supports comprehensive quality inspections, and enhances the accuracy of inspections and the system's sustainable evolution capabilities.
Smart Images

Figure CN121526070A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of geographic information technology and urban underground pipeline data quality management technology, and in particular to a method for checking the quality of underground pipeline data based on a parameterized rule base. Background Technology
[0002] Urban underground pipelines are crucial infrastructure, and the quality of their data directly impacts the level of urban planning, construction, management, and safe operation. Data quality inspection of urban underground infrastructure is a core stage in the fields of geographic information systems, urban planning, and basic management. With the deepening of smart city construction, digital urban management and information-based underground pipeline management systems are gradually becoming widespread. Their technical goal is to detect and correct various spatial, attribute, topological, and logical errors in pipeline databases through standardized, automated, and normalized methods, ensuring that pipeline data is "true, accurate, complete, and up-to-date," thereby meeting the needs of engineering applications and smart city management.
[0003] However, traditional inspection methods are typically rule-driven, static, and decentralized, making it difficult to handle massive amounts of data and complex, overlapping errors. This places higher demands on the integrity, accuracy, and logical consistency of underground pipeline data. Currently, the main technical bottlenecks in quality inspection of underground pipeline data are as follows: (1) High coupling between rules and code: Inspection rules are usually hard-coded directly into the program. When business rules change or new inspection items need to be added, the source code must be modified and the system recompiled and deployed, resulting in extremely high maintenance costs; (2) Poor adaptability: The database table structure of pipelines varies across different cities, projects, and pipe types (such as water supply, drainage, and gas). Checking programs written for specific data structures are difficult to apply directly to other projects, resulting in a large amount of repetitive development work; (3) Insufficient scalability: Adding new inspection items or adapting to new pipeline data types requires a lot of coding work from technical personnel, which makes it difficult to respond quickly to changes in business needs and limits the scalability of the system; (4) High technical threshold: Business personnel cannot directly participate in the definition and adjustment of rules, and rely entirely on software developers, which reduces the efficiency and flexibility of the quality inspection process.
[0004] Therefore, there is an urgent need in this field for a new method for inspecting the quality of underground pipeline data that can decouple the inspection logic from the program execution and has high flexibility, configurability, and scalability. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a method for checking the quality of underground pipeline data based on a parameterized rule base. This method achieves complete separation of business rules and program code, and significantly improves the flexibility, maintainability and efficiency of underground pipeline data quality checking.
[0006] This invention is achieved through the following technical solution: A method for quality inspection of underground pipeline data based on a parameterized rule base includes the following steps: S1. The quality inspection requirements for underground pipeline data are abstracted into a structured rule template, and the variables that need to be dynamically bound are marked by parameter placeholders; S2. Through a parameter mapping mechanism, the parameter placeholders in the rule template are dynamically bound to the actual elements in the target database to generate executable instructions for a specific data environment; S3. Based on the inspection rules selected by the user, automatically organize multiple independent inspection tasks into a serialized workflow, execute steps S1 and S2 in sequence, and collect and integrate the inspection results to generate a quality inspection report.
[0007] According to the above technical solution, preferably, in step S1, the rule template is defined using a declarative language, including the inspection item name, inspection category, inspection target description, and parameterized core logic expression.
[0008] According to the above technical solution, preferably, in step S1, the parameter placeholders include table name and field name, which are used to represent the target data table name and target field name of the target database, respectively.
[0009] According to the above technical solution, preferably, in step S1, the inspection categories in the rule template include one or more of attribute integrity checks, topological relationship checks, and business logic and geometric characteristic checks.
[0010] According to the above technical solution, preferably, in step S1, the attribute integrity check includes one or more of the following: point / line record duplicate check, non-empty field check, and fixed input item validity check.
[0011] According to the above technical solution, preferably, in step S1, the topology relationship check includes one or more of the following: connection relationship check, straight-through point check, and multi-way branch point check.
[0012] According to the above technical solution, preferably, in step S1, the business logic and geometric characteristic check includes one or more of the following: diameter change check, empty line check, drainage flow direction and starting and ending point pipe bottom elevation check, coordinate check, and pipeline overlength check.
[0013] According to the above technical solution, preferably, step S2 includes: Provide a specific set of parameter mapping values for the rule template selected by the user, and associate them with the actual elements in the target database; The system reads the encapsulated rule template, parses its content, and identifies all declared parameter placeholders; Based on the parameter mapping value, the configuration value is injected into the parameter placeholder corresponding to the rule template; After all parameter replacements are completed, the system generates executable instructions for the specific data environment.
[0014] According to the above technical solution, preferably, in step S3, the execution of the serialization workflow includes loading rule templates on demand, instantiating them into executable instructions, connecting to the database to perform checks, and uniformly collecting and integrating the results.
[0015] The beneficial effects of this invention are: This invention abstracts the underground pipeline quality inspection requirements into a "parameterized rule template + parameter mapping" approach, which completely decouples the inspection rules from the program execution logic. The inspection logic is stored in a declarative rule template manner. A template can be directly reused in different cities, different data sources, and different database structures through different parameter mappings, which greatly improves the system's adaptability and versatility and significantly reduces the rule maintenance cost. This invention supports comprehensive quality checks from attributes and topology to business logic through a rich rule template library. Adding new check items only requires adding new rule templates and configurations without modifying the underlying engine, which greatly reduces maintenance costs and technical barriers. It has excellent scalability and improves the system's sustainable evolution capabilities, thereby achieving flexible, configurable, scalable, and universal underground pipeline data quality checks, thus significantly improving the efficiency and accuracy of quality checks. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the underground pipeline data quality inspection method provided by the present invention.
[0017] Figure 2 This is a timing diagram illustrating the instantiation of the inspection logic based on parameter mapping in this invention.
[0018] Figure 3 This is a schematic diagram of the system generating a data quality inspection report in Embodiment 2 of the present invention. Detailed Implementation
[0019] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and preferred embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0020] Example 1: The present invention includes the following steps: S1. The quality inspection requirements for underground pipeline data are abstracted into a structured rule template, and the variables that need to be dynamically bound are marked by parameter placeholders.
[0021] This step systematically transforms the complex quality requirements in underground pipeline data quality inspection into a series of reusable and configurable declarative rule units, thereby achieving a complete separation between the definition of inspection logic and the execution procedure. The data queries, logical judgments, and business rules corresponding to each specific quality inspection requirement are abstracted and encapsulated into a structured rule template.
[0022] Rule templates are defined using a declarative language. Their core is to describe "what to check" rather than "how to execute". A complete rule template includes, but is not limited to, the following key elements: check item name (such as "duplicate check of point and line records"), check category (such as "attribute uniqueness"), check target description, and parameterized core logic expression.
[0023] Table 1. Examples of Core Rule Templates Encapsulated for Underground Pipeline Data Quality Inspection
[0024] These templates only describe the inspection targets and conditions, without binding them to specific execution environments (such as database table structures), thereby achieving "define once, reuse many times" for inspection logic and fundamentally avoiding the coupling between rules and program code.
[0025] Furthermore, in the core logic expression of parameterization, specific placeholders (such as {parameter name}) are used to identify variables that need to be dynamically bound. For example, {table name} represents the target data table name, and {field name} represents the target field name. These placeholders will be replaced by specific parameter values during subsequent instantiation.
[0026] S2. Through a parameter mapping mechanism, the parameter placeholders in the rule template are dynamically bound to the actual elements in the target database to generate executable instructions for a specific data environment.
[0027] Specifically, the steps include the following: S21. Provide a specific set of parameter mapping values for the rule template selected by the user and associate them with the actual elements in the target database.
[0028] For example, the "Field NOT NULL Check" template can be configured as follows:
[0029] S22. Identify the specific target that needs to be replaced, the system reads the encapsulated rule template, parses its content, and identifies all declared parameter placeholders.
[0030] S23. Based on the parameter mapping value, inject the configuration value into the parameter placeholder corresponding to the rule template.
[0031] The replacement process follows a one-to-one exact matching principle. For example, replacing SQL fragments in the template: Template before replacement: SELECT * FROM {table_name} WHERE {field_name} IS NULL Replacement command: SELECT * FROM JS_POINT WHERE geophysical point number IS NULL S24. After all parameter replacements are completed, the system generates a complete and syntactically correct executable instruction (such as a standard SQL query statement). Preliminary syntax validation can be performed before execution to ensure that the instruction is executable for the target database.
[0032] Through the above step-by-step instantiation method, the same set of abstract inspection logic (rule template) can be flexibly and accurately adapted to underground pipeline data sources with different structures (such as databases of different types of pipes such as water supply, drainage, and gas) without any modification, solving the problem of universality caused by differences in data structure.
[0033] S3. Based on the inspection rules selected by the user, automatically organize multiple independent inspection tasks into a serialized workflow, execute steps S1 and S2 in sequence, and collect and integrate the inspection results to generate a quality inspection report.
[0034] This step provides a technical means to organize and automate the inspection process on demand. By replacing manual operations with automated processes, it ensures the standardization of the inspection process and the consistency of results, thereby improving the efficiency of complex quality inspection scenarios.
[0035] Example 2: Taking the quality inspection of water supply pipeline data as an example, a comprehensive quality inspection is performed on the water supply pipeline data of a certain area, including basic attributes and core topological relationships. Specifically, the following steps are included: (1) Loaded data: Data source: Microsoft Access database (MDB format) of water supply pipelines in the target area.
[0036] Core data tables: JS_POINT (Water Supply Pipe Point Table): Stores the spatial coordinates and attribute information of pipe points. Key fields include ID (unique identifier), geophysical point number, map point number, X coordinate, Y coordinate, etc.
[0037] JS_LINE (Water Supply Pipeline Table): Stores pipeline connection relationships and attribute information. Key fields include ID, starting point number, connection direction, pipeline code, etc.
[0038] (2) Inspection process: The user starts a quality inspection task and selects to execute two rules: "Field NOT NULL check" and "Hanging point check".
[0039] The system automatically organizes and executes the following serialized workflows as needed: Loading and instantiating the "Field NOT NULL Check" rule: The system loads the `field_null_check` template and maps the parameter `{table}` to `JS_POINT` and `{field}` to the geophysical point number, dynamically generating the SQL command: `SELECT ID, Map Point Number FROM JS_POINT WHERE Geophysical Point Number IS NULL OR Geophysical Point Number = ''`. The system then connects to the MDB database to execute the check.
[0040] Loading and instantiating the "hanging point check" rule: Next, the system loads the hanging_point_check template, maps the parameter {line_table} to JS_LINE, {point_table} to JS_POINT, {start_field} to the starting point number, and {end_field} to the connection direction, dynamically generates complex topology check SQL and executes it.
[0041] Unified collection and integration of results: The system will summarize the results of the above two checks.
[0042] (3) Output results: like Figure 3 As shown, the system generates a water supply pipeline data quality inspection report, which includes: the quality inspection report name, inspection time, total number of errors in the inspection items, and a detailed list of errors.
[0043] In summary, this invention provides a method for underground pipeline data quality inspection based on a parameterized rule base. It abstracts underground pipeline quality inspection requirements into a "parameterized rule template + parameter mapping" approach, completely decoupling inspection rules from program execution logic. The inspection logic is stored in a declarative rule template format. A single template can be directly reused across different cities, data sources, and database structures through different parameter mappings, greatly improving the system's adaptability and versatility, and significantly reducing rule maintenance costs. Simultaneously, this invention supports comprehensive quality inspection from attributes and topology to business logic through a rich rule template library. Adding new inspection items only requires adding new rule templates and configurations, without modifying the underlying engine, significantly reducing maintenance costs and technical barriers. It also boasts excellent scalability, improving the system's sustainable evolution capabilities, thereby achieving flexible, configurable, scalable, and universal underground pipeline data quality inspection, thus significantly improving the efficiency and accuracy of quality inspection.
[0044] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for quality inspection of underground pipeline data based on a parameterized rule base, characterized in that, Includes the following steps: S1. The quality inspection requirements for underground pipeline data are abstracted into a structured rule template, and the variables that need to be dynamically bound are marked by parameter placeholders; S2. Through a parameter mapping mechanism, the parameter placeholders in the rule template are dynamically bound to the actual elements in the target database to generate executable instructions for a specific data environment; S3. Based on the inspection rules selected by the user, automatically organize multiple independent inspection tasks into a serialized workflow, execute steps S1 and S2 in sequence, and collect and integrate the inspection results to generate a quality inspection report.
2. The method for quality inspection of underground pipeline data based on a parameterized rule base according to claim 1, characterized in that, In step S1, the rule template is defined using a declarative language, including the check item name, check category, check target description, and parameterized core logic expression.
3. The method for quality inspection of underground pipeline data based on a parameterized rule base according to claim 1, characterized in that, In step S1, the parameter placeholders include table name and field name, which are used to represent the target data table name and target field name of the target database, respectively.
4. The method for quality inspection of underground pipeline data based on a parameterized rule base according to claim 2, characterized in that, In step S1, the inspection categories in the rule template include one or more of the following: attribute integrity inspection, topological relationship inspection, and business logic and geometric characteristic inspection.
5. The method for quality inspection of underground pipeline data based on a parameterized rule base according to claim 4, characterized in that, In step S1, the attribute integrity check includes one or more of the following: point / line record duplicate check, non-empty field check, and fixed input item validity check.
6. The method for quality inspection of underground pipeline data based on a parameterized rule base according to claim 4, characterized in that, In step S1, the topology relationship check includes one or more of the following: connection relationship check, straight-through point check, and multi-way branch point check.
7. The method for quality inspection of underground pipeline data based on a parameterized rule base according to any one of claims 4-6, characterized in that, In step S1, the business logic and geometric characteristic checks include one or more of the following: diameter change check, empty line check, drainage flow direction and starting and ending point pipe bottom elevation check, coordinate check, and pipeline overlength check.
8. The method for quality inspection of underground pipeline data based on a parameterized rule base according to claim 1, characterized in that, Step S2 includes: Provide a specific set of parameter mapping values for the rule template selected by the user, and associate them with the actual elements in the target database; The system reads the encapsulated rule template, parses its content, and identifies all declared parameter placeholders; Based on the parameter mapping value, the configuration value is injected into the parameter placeholder corresponding to the rule template; After all parameter replacements are completed, the system generates executable instructions for the specific data environment.
9. The method for quality inspection of underground pipeline data based on a parameterized rule base according to claim 1, characterized in that, In step S3, the execution of the serialization workflow includes loading rule templates on demand, instantiating them into executable instructions, connecting to the database to perform checks, and uniformly collecting and integrating the results.