Digital line graph recognition and correction method and system
By constructing a multi-level configurable scenario rule base and a repair strategy knowledge base, combined with a correction evaluation model, efficient and accurate repair of digital line drawings is achieved, solving the problems of low repair efficiency and insufficient accuracy in existing technologies, and improving data quality and application reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 湖北省测绘工程院
- Filing Date
- 2026-01-16
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies lack a complete and efficient system for the repair and evaluation of digital line maps, resulting in low efficiency and insufficient accuracy in error repair, which affects the accuracy and reliability of geographic information applications.
A multi-level configurable scenario rule base is constructed. Through a repair strategy knowledge base and a correction evaluation model, efficient and accurate repair of digital line graphs and dynamic optimization of strategies are achieved, including data preprocessing, spatial registration, error identification, repair operations, and effect evaluation.
It improves the accuracy, efficiency, and reliability of digital line map data processing, provides high-quality data support for geographic information applications, enhances the recall and accuracy of error identification, and ensures data quality.
Smart Images

Figure CN121999346A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of geographic information data processing technology, and in particular to a method and system for recognizing and correcting digital line maps. Background Technology
[0002] Digital line maps (DLGs), as a core spatial data carrier in the field of geographic information, are widely used in key areas such as land surveying, urban planning, transportation construction, natural resource management, emergency disaster relief, and smart government. Their data quality directly determines the reliability of spatial information analysis, decision support, and downstream application systems. For example, in urban rail transit planning, the accuracy of road coordinates and the integrity of pipeline attributes in DLGs directly affect the accuracy of engineering design. In natural resource rights confirmation, the topological consistency of land use boundaries in DLGs is a core basis for property rights delineation. Therefore, the quality inspection and correction of DLG data are critical control points in the spatial data production process. However, the complexity of DLG data production processes, the variety of element types, and the intricate spatial relationships make DLG data quality control extremely difficult.
[0003] In the current field of digital line map processing, there is a general lack of a complete and efficient repair and evaluation system, resulting in low efficiency and insufficient accuracy in error repair of digital line maps. There is neither a systematically integrated knowledge base of repair strategies to provide targeted repair solutions, nor an effective correction evaluation model to comprehensively and objectively evaluate the repair effect. It is difficult to dynamically optimize the repair strategy based on the evaluation results, resulting in inconsistent quality of the final output digital line map data, which cannot provide reliable data support for geographic information applications and seriously affects the accuracy and reliability of related applications. Summary of the Invention
[0004] In view of this, the present invention proposes a method and system for identifying and correcting digital line maps. By constructing a knowledge base for repair strategies and a correction evaluation model, it achieves efficient and accurate repair of errors in digital line maps, dynamic optimization of strategies, and improvement of the final data quality, providing high-quality data support for geographic information applications.
[0005] The technical solution of the present invention is implemented as follows: Firstly, a method for recognizing and correcting digital line drawings, comprising the following steps: S1, build a multi-level configurable scenario rule library; S2, acquire the line drawing data of the digital object to be inspected and external reference data, perform data preprocessing and spatial registration, and identify and output structured error information based on the scene rule base and comparison with external reference data; S3, construct a repair strategy knowledge base, which stores predefined repair functions and corresponding applicable conditions and strategy generation models, and the strategy generation model is used to generate new repair strategies; S4. Based on the structured error information, match or generate a repair strategy from the repair strategy knowledge base, and perform the repair operation to obtain the corrected digital line graph data. S5 constructs a correction evaluation model, performs re-examination and verification and effect evaluation on the corrected digital line plot data, optimizes the repair strategy knowledge base based on the evaluation results, and outputs the final digital line plot data.
[0006] Based on the above technical solutions, preferably, the construction of a multi-level configurable scene rule base in step S1 includes the following sub-steps: S11, an atomic rule module is defined by combining natural language templates and parameterization. The structural elements of the rule module include: inspection object, inspection dimension, spatial relationship, reference object and threshold condition. S12, according to different scene types and their constraints, the rule module is instantiated into atomic rules. The quality inspection scene types include terrain inspection, geometric constraint inspection, edge inspection, attribute logic inspection, water system traffic inspection and topological relationship inspection. S13 combines multiple logically related atomic rules into a quality inspection model, and the quality inspection model is associated with the scene type. S14, Associate and configure the quality inspection model with data project standards and / or geographical area characteristics to form a quality inspection solution for specific applications; S15, according to the quality inspection plan, is stored in the database to build a multi-level configurable scenario rule library.
[0007] Based on the above technical solutions, preferably, step S2, which involves acquiring the digital line drawing data to be inspected and external reference data, performing data preprocessing and spatial registration, and identifying and outputting structured error information based on the scene rule base and external reference data comparison, includes the following sub-steps: S21, acquire the line drawing data of the digit to be inspected and external reference data; S22, Perform format standardization and coordinate system unification processing on the digital line drawing data to be inspected to obtain standardized digital line drawing data; S23. Based on the feature point matching algorithm, stable feature points of standardized digital line drawing data and external reference data are extracted. The least squares method is used to calculate the spatial transformation parameters and perform the registration operation to align the two to the same spatial reference, thus obtaining the registered digital line drawing data. S24. Based on the quality inspection plan, load the corresponding quality inspection model and atomic rules from the scene rule library. For each geographic feature in the registered digital line map data, perform topological relationship checks, geometric constraint checks, and attribute logic checks, extract the features that violate the rules and their error context information, and generate a primary error layer. S25, perform multi-dimensional difference detection on the registered digital line drawing data and external reference data. The difference detection includes: calculating the deviation of the elements in position and shape through a geometric difference detection algorithm; identifying the missing, redundant or partially missing elements through spatial association; checking the visual consistency of the element classification attributes by comparing the semantic information extracted from the external reference data; marking the detected difference areas as suspicious error areas and associating them with their corresponding error types. S26 spatially associates and merges the primary error layer with the suspected error area, filters false detections by combining geographic semantic context, encodes the error information, and generates an error information set including fields such as unique ID, associated feature ID, error type, severity level, spatial geometry, detailed description and repair suggestions.
[0008] Based on the above technical solutions, preferably, the step S3 of constructing a repair strategy knowledge base, wherein the repair strategy knowledge base stores predefined repair functions and corresponding applicable conditions and strategy generation models, and the strategy generation model is used to generate new repair strategies, includes the following sub-steps: S31. Based on the error type in the digital line drawing, define and encapsulate atomic repair functions for performing basic repair operations. The repair functions include at least vertex snapping, line segment merging, face gap filling, geometric smoothing, attribute assignment, and topology reconstruction. Label each repair function with its functional description, input parameter format, and expected output. S32, for each atomic repair function or a composite repair strategy combining multiple atomic repair functions, define the corresponding applicable conditions. The applicable conditions include at least the repairable error type, the geometric feature threshold that triggers repair, the feature attribute constraint, and the processing priority; establish a mapping relationship between the repair function or composite repair strategy and its applicable conditions to construct a basic repair strategy knowledge base; S33, a policy generation model is built based on machine learning networks to generate new repair policies; S34. The basic repair strategy knowledge base, the model parameters of the strategy generation model, and the historical case library are stored in a structured manner to obtain the final repair strategy knowledge base.
[0009] Based on the above technical solutions, preferably, the step S33, which involves establishing a policy generation model based on a machine learning network to generate a new repair policy, includes the following sub-steps: S331, Extract error features and corresponding successful repair strategy sequences from historical amendment examples, and construct a training sample set. The error features include error type, geometric context, and feature attributes. S332, a policy generation model is built based on a machine learning network. The training sample set is input into the policy generation model for training to learn the correlation between error features and effective repair strategies; S333: For error types not defined in the basic repair strategy knowledge base, the corresponding error features are input into the trained strategy generation model to generate several repair strategy sequences, and a confidence score is assigned to each strategy.
[0010] Based on the above technical solutions, preferably, step S4, which involves matching or generating a repair strategy from the repair strategy knowledge base based on the structured error information and performing the repair operation to obtain the corrected digital line drawing data, includes the following sub-steps: S41. Based on the error type and context features of the structured error information, select several candidate repair strategies from the repair strategy knowledge base and sort them according to the confidence score of each strategy. If there is a directly matching strategy, select the strategy with the highest confidence score; if there is no directly matching strategy, input the corresponding error features into the strategy generation model to generate a new repair strategy. S42, based on the selected repair strategy, perform topological error, geometric deformation, and attribute repair operations on the corresponding erroneous features, wherein, The topology error repair operation performs neighborhood search-based capture and merging on dangling points, splits and reconstructs on self-intersecting line segments, and closes on face gaps based on boundary inference. The geometric deformation repair operation performs correction based on spatial transformation parameters for the overall positional deviation of the feature, and performs smoothing based on spline interpolation for local geometric distortion; The repair operation for missing or incorrect attributes performs attribute derivation and assignment based on the attributes of neighboring features or semantic information from reference data; S43, write the repaired results back to the digital line graph data to generate corrected digital line graph data.
[0011] Based on the above technical solutions, preferably, step S5, which involves constructing a correction evaluation model, performing re-verification and effect evaluation on the corrected digital line plot data, optimizing the repair strategy knowledge base based on the evaluation results, and outputting the final digital line plot data, includes the following sub-steps: S51, Establish a strategy effectiveness evaluation model and set evaluation indicators, including repair success rate, geometric accuracy improvement, attribute correction accuracy and execution efficiency. S52, during the repair process, a repair operation log is recorded. The log includes error information before repair, repair strategy, repair operation parameters, feature status after repair, and execution timestamp. S53, After the repair operation is completed, the corresponding atomic rule check is re-executed for the repaired elements, and the values of each evaluation index are calculated. S54, the evaluation index values are weighted and calculated based on preset weight coefficients to obtain the comprehensive evaluation result of the repair operation; S55, a first evaluation threshold and a second evaluation threshold are preset, wherein the first evaluation threshold is greater than the second evaluation threshold; If the comprehensive evaluation result is greater than the first evaluation threshold, it is judged as an excellent repair strategy. The confidence score of the current repair strategy is increased by a preset growth rate, and its applicable conditions are expanded by the threshold expansion factor. If the comprehensive evaluation result is greater than or equal to the second evaluation threshold and less than or equal to the first evaluation threshold, it is determined to be a general repair strategy. The confidence score of the current repair strategy is reduced by a preset reduction ratio, and its applicable conditions are narrowed by a threshold reduction factor. If the comprehensive evaluation result is less than or equal to the second evaluation threshold, it is determined to be a failed strategy, removed from the recommendation list, and a manual repair process is initiated for the corresponding error. S56. The error characteristics, repair strategies and corresponding comprehensive evaluation results after each repair operation are stored as new training samples in the historical case library for optimization training of the strategy generation model. S57 integrates all verified and optimized repair results and outputs the final digital line plot data.
[0012] Secondly, the present invention also provides a digital line drawing recognition and correction system, implemented using a digital line drawing recognition and correction method, comprising: The rule base building module is used to build a multi-level configurable scenario rule base; The error identification module is used to acquire the line drawing data of the digital figure to be inspected and external reference data, perform data preprocessing and spatial registration, and identify and output structured error information based on the scene rule base and comparison with external reference data. The knowledge base construction module is used to build a repair strategy knowledge base. The repair strategy knowledge base stores predefined repair functions and corresponding applicable conditions and strategy generation models. The strategy generation model is used to generate new repair strategies. The matching and execution module is used to match or generate repair strategies from the repair strategy knowledge base based on structured error information, and to perform repair operations to obtain corrected digital line plot data. The evaluation output module is used to build a correction evaluation model, perform re-examination and verification and effect evaluation on the correction digital line plot data, optimize the repair strategy knowledge base based on the evaluation results, and output the final digital line plot data.
[0013] Thirdly, the present invention also provides an electronic device, including at least one processor, at least one memory, a communication interface, and a bus; wherein the processor, memory, and communication interface communicate with each other through the bus; the memory stores a program for a digital line drawing recognition and correction method that can be executed by the processor, the program for the digital line drawing recognition and correction method being configured to implement a digital line drawing recognition and correction method.
[0014] Fourthly, the present invention also provides a computer-readable storage medium storing a program for a digital line drawing recognition and correction method, wherein the program, when executed, implements the digital line drawing recognition and correction method.
[0015] The digital line drawing recognition and correction method and system of the present invention have the following advantages over the prior art: (1) Accurate error identification and location are achieved by constructing a multi-level configurable scenario rule base, and diverse and adaptable repair solutions are provided by the repair strategy knowledge base. The repair effect is comprehensively evaluated and the knowledge base is dynamically optimized based on the correction evaluation model. Finally, high-quality digital line map data is output, which effectively improves the accuracy, efficiency and reliability of digital line map data processing and provides solid data support for geographic information related applications. (2) By standardizing and spatially registering the data through preprocessing, calling the quality inspection model and atomic rules to perform multi-type checks, and combining multi-source data comparison and geographic context filtering of false alarms, the rigor of the predefined rules is utilized, and the ability to discover complex hidden errors is enhanced, effectively improving the recall and accuracy of error identification. (3) By integrating predefined functions and strategy generation models into the constructed repair strategy knowledge base, it can quickly handle common errors and generate new strategies to deal with unknown errors. It can comprehensively and accurately repair digital line map errors, effectively improve data quality, and ensure the efficiency and accuracy of geographic information analysis applications. (4) By calculating the repair success rate, geometric accuracy improvement, attribute correction accuracy and execution efficiency and other multi-dimensional comprehensive evaluation indicators, the repair strategy knowledge base is dynamically optimized based on the evaluation results to improve the utilization rate of excellent strategies and eliminate ineffective strategies, ensuring the high efficiency and accuracy of the knowledge base. Furthermore, the model is optimized by using repair operation information to comprehensively and accurately conduct re-examination verification and effect evaluation of the corrected digital line drawing data to ensure data quality. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating the steps of the digital line drawing recognition and correction method of the present invention. Figure 2 This is an architecture diagram of the scene rule quality inspection mechanism of the digital line drawing recognition and correction method of the present invention; Figure 3 This is a schematic diagram illustrating the quality inspection scheme configuration for the digital line drawing recognition and correction method of the present invention. Figure 4 This is a schematic diagram of the scene rules JSON text for the digital line drawing recognition and correction method of the present invention. Figure 5 This is a flowchart of the digital line drawing recognition and correction method of the present invention; Figure 6 This is a schematic diagram of the software interface for the digital line drawing recognition and correction method of the present invention. Detailed Implementation
[0018] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0019] like Figure 1-6 As shown, in a first aspect, a digital line drawing recognition and correction method of the present invention includes the following steps: S1, build a multi-level configurable scenario rule library.
[0020] Step S1 includes the following sub-steps: S11, an atomic rule module is defined by combining natural language templates and parameterization. The structural elements of the rule module include: inspection object, inspection dimension, spatial relationship, reference object and threshold condition. It should be noted that the rule module describes the basic structure and semantics of the rule module. The template contains key structural elements such as inspection object, inspection dimension, spatial relationship, reference object, and threshold condition. Each structural element can be parameterized, allowing users to adjust the specific parameters of the rule according to actual needs. For example, the inspection object can be geographic features such as points, lines, and polygons; the inspection dimension can include location, shape, and size; spatial relationship can describe the adjacent, contained, and intersecting relationships between features; the reference object can be other geographic features or external reference data; and the threshold condition is used to set the specific numerical range for rule triggering.
[0021] Example of a rule module: Check if the minimum distance between a road line feature and an adjacent building surface is greater than 10 meters; Check object: road line feature; Check dimension: location; Spatial relationship: adjacent; Reference object: building surface; Threshold condition: minimum distance > 10 meters.
[0022] S12, according to different scene types and their constraints, the rule module is instantiated into atomic rules. The quality inspection scene types include terrain inspection, geometric constraint inspection, edge inspection, attribute logic inspection, water system traffic inspection and topological relationship inspection. It should be noted that, based on different scenario types and their constraints, the rule module is instantiated into specific atomic rules to adapt to the needs of different quality inspection scenarios. The quality inspection scenarios are divided into types such as terrain inspection, geometric constraint inspection, edge inspection, attribute logic inspection, water system traffic inspection, and topological relationship inspection. Each scenario type has its specific constraints and quality inspection focus. Based on the constraints of the scenario type, the parameter values of the rule module are adjusted to form specific atomic rules.
[0023] Examples of atomic rules are as follows: Topographical inspection: Check whether the elevation values of elevation point elements are within a reasonable range (-100-5000m).
[0024] Geometric constraint check: Checks whether the length of the line segment element is greater than the minimum length threshold (10m).
[0025] Edge joint inspection: Check whether the edge joint error between adjacent map sheets is less than the maximum permissible error (0.5m).
[0026] S13 combines multiple logically related atomic rules into a quality inspection model, and the quality inspection model is associated with the scene type.
[0027] It should be noted that, in order to improve the efficiency and systematic nature of complex quality inspection tasks, multiple atomic rules that are highly related in business logic are combined to form a fully functional quality inspection model. Each quality inspection model corresponds to a specific scenario type, and the combination and execution order are determined by analyzing the logical relationships between atomic rules.
[0028] Model Example 1: Water System and Landform Relationship Check Model; This model is composed of multiple atomic rules, with the core being the "Elevation Consistency Rule at the Intersection of Rivers and Contour Lines". Its business context is: the river is located at the bottom of a valley, therefore the elevation value of the contour lines at the intersection must be higher than the river surface elevation, and the contour lines should exhibit a reasonable V-shaped curve pointing upstream. The complex logic of this model can be described as: checking all contour lines intersecting with the river line to ensure that at the intersection point, the elevation attribute value of the contour line is greater than the river's water surface elevation attribute value, and that the elevation continuity of the contour line sequence is not disrupted.
[0029] Model Example 2: Traffic Network Connectivity Inspection Model; This model integrates inspection rules for road endpoints, level attributes, and connection relationships, with the core being road hierarchical connectivity rules; Its business background is that the connection of roads of different levels must follow specific specifications; This model checks the endpoint connection status of road elements and automatically determines whether the connection is legal based on its level or type attributes, and marks illegal connections.
[0030] S14, Associate and configure the quality inspection model with data project standards and / or geographical area characteristics to form a quality inspection solution for specific applications; It should be noted that, in order to implement quality inspection capabilities in specific production projects, the constructed quality inspection model will be associated with specific data project standards (such as 1:10000 topographic map symbols) and / or geographical regional characteristics (such as southern water network areas and northern plain areas). By selecting the required models and adjusting the model parameters, a quality inspection solution that is fully adapted to the specific project requirements and can be executed immediately will be formed.
[0031] S15, according to the quality inspection plan, is stored in the database to build a multi-level configurable scenario rule library.
[0032] This embodiment achieves full management of quality inspection rules from abstract definition to specific application by constructing a multi-level configurable scenario rule library; its use of natural language templates and parameterization significantly reduces the threshold for rule customization; through scenario-based instances and logical combinations, it effectively addresses complex and professional quality inspection needs; and finally, by associating with project standards and geographical features, it ensures the practicality and relevance of quality inspection work, and improves the efficiency, accuracy, and consistency of quality inspection work.
[0033] S2 acquires the digital line drawing data to be inspected and external reference data, performs data preprocessing and spatial registration, and identifies and outputs structured error information based on the scene rule base and comparison with external reference data.
[0034] Step S2 includes the following sub-steps: S21, acquire the line drawing data of the digit to be inspected and external reference data; It should be noted that the digital line map data to be inspected and the external reference data are mainly sourced from the results data provided by the surveying and mapping department or vector data generated by interpreting remote sensing images. The external reference data is used to assist in quality inspection and correction, including historical versions of DLG data, authoritative geographic information databases, high-precision remote sensing images, laser point clouds, and precise attribute data obtained from field surveys, which provide rich reference benchmarks for quality inspection.
[0035] S22, Perform format standardization and coordinate system unification processing on the digital line drawing data to be inspected to obtain standardized digital line drawing data; It should be noted that the digital line map data to be inspected may exist in multiple formats. Different formats differ in data structure, storage methods, and other aspects, which can affect subsequent data processing and analysis. Therefore, professional GIS tools are needed to convert the data of different formats into the system's internal standard format to ensure that geometric and attribute information is preserved. At the same time, since the data to be inspected may use different coordinate systems, the data may not be accurately aligned in spatial location. Therefore, all data must be converted to a unified target coordinate system, and the accuracy of coordinate conversion is ensured by setting conversion parameters. After these processes, standardized digital line map data is obtained.
[0036] S23. Based on the feature point matching algorithm, stable feature points of standardized digital line drawing data and external reference data are extracted. The least squares method is used to calculate the spatial transformation parameters and perform the registration operation to align the two to the same spatial reference, thus obtaining the registered digital line drawing data. It should be noted that the SIFT algorithm is used to extract stable key points and their feature descriptors from the standardized DLG data and reference data. The RANSAC algorithm is used to filter the initial matching point pairs, effectively removing outliers and retaining correct matching pairs. Based on the correct matching point pairs, the least squares method is used to calculate the optimal spatial transformation parameters, and the corresponding geometric transformation is performed on the DLG data to be examined. Finally, the registered digital line drawing data that is accurately aligned with the reference data is obtained.
[0037] S24. Based on the quality inspection plan, load the corresponding quality inspection model and atomic rules from the scene rule library. For each geographic feature in the registered digital line map data, perform topological relationship checks, geometric constraint checks, and attribute logic checks, extract the features that violate the rules and their error context information, and generate a primary error layer. It should be noted that, based on the project-customized quality inspection plan, the corresponding quality inspection models and atomic rules are dynamically loaded from the scenario rule library to perform a comprehensive inspection on the registered data. Topology check: This mainly checks whether the spatial relationships between geographic features meet the rule requirements; for example, checking whether the connection relationships between road features are correct and whether there are dead ends; checking whether there are overlaps or gaps between building surface features; using the topology check tool in the geographic information software, the data is checked according to the preset topology rules; for example, setting road connectivity topology rules, the software will automatically check the endpoint connection of road features and mark road segments that do not meet the connectivity requirements. Geometric constraint check: Checks whether the geometry and size of geographic features meet the specified constraints; for example, checks whether the length of line segment features is within the allowable range, and whether the area of polygon features meets the requirements; for each geographic feature, calculates its geometric attribute value according to its type and preset geometric constraints, and compares it with the constraints; for example, for line segment features, calculates its length, and if the length is less than the minimum length threshold or greater than the maximum length threshold, it is marked as violating the geometric constraint rules; Attribute logic check: This mainly checks whether the attribute information of geographic elements conforms to logical rules; for example, it checks whether the grade attribute and road width attribute of a road element match, and whether the use attribute of a building element is reasonable, etc.; according to the preset attribute logic rules, it makes logical judgments on the attribute values of geographic elements; for example, the rule is defined as the width of a highway should be greater than or equal to 20 meters. If a road has a grade attribute of highway but a width attribute of less than 20 meters, it is marked as violating the attribute logic rule.
[0038] After completing the above checks, a primary error layer is generated. First, the geographic features that violate the rules and their error context information are extracted. The error context information may include the coordinates of the features and information about surrounding related features. Then, geographic information software is used to generate a primary error layer from the extracted error information. Geographic features that violate different rules are marked in the layer with different symbols or colors, making it convenient for users to intuitively view and analyze the error situation and generate a visualized primary error layer.
[0039] S25, perform multi-dimensional difference detection on the registered digital line drawing data and external reference data. The difference detection includes: calculating the deviation of the elements in position and shape through a geometric difference detection algorithm; identifying the missing, redundant or partially missing elements through spatial association; checking the visual consistency of the element classification attributes by comparing the semantic information extracted from the external reference data; marking the detected difference areas as suspicious error areas and associating them with their corresponding error types. It should be noted that the geometric difference detection uses Hausdorff and a threshold reduction factor to narrow its applicable range. The distance algorithm calculates the maximum and minimum distance between two geometric figures. If the distance exceeds the set threshold, the feature is considered to have a deviation in position or shape, which is used to measure the similarity between them. The buffer analysis algorithm is used to check the spatial relationship and positional deviation between features by generating a buffer for the features.
[0040] Feature integrity detection utilizes R-tree indexing to perform rapid spatial association queries on features in two datasets. Features present in the external reference data but absent in the target data are identified as missing features; features present in the target data but absent in the external reference data are identified as redundant features. For partially covered features, the overlap area ratio is calculated to determine if it is partially missing; if the overlap area ratio exceeds a preset coverage threshold, it is identified as feature overlap. Semantic consistency detection compares the semantic labels extracted from the reference data with the classification attributes of the DLG features, marking all detected discrepancies as suspicious error areas and associating them with the initially determined error type, such as geometric deviation error, missing feature error, redundant feature error, and inconsistent classification attribute error, facilitating subsequent error analysis and processing.
[0041] S26 spatially associates and merges the primary error layer with the suspected error area, filters false detections by combining geographic semantic context, encodes the error information, and generates an error information set including fields such as unique ID, associated feature ID, error type, severity level, spatial geometry, detailed description and repair suggestions.
[0042] It should be noted that the process begins with spatial association and merging. Using the spatial association function of the geographic information software, erroneous features in the primary error layer are spatially associated with suspected error areas. Based on the coordinates and spatial extent of the features, it is determined whether the features in the primary error layer are located within suspected error areas; if so, they are merged. Next, false positive filtering is performed. Combining geographic semantic context information, the merged error information is further analyzed to filter out false positives. The error information is then encoded to generate an error information set including a unique ID, associated feature ID, error type, severity level, spatial geometry, detailed description, and remediation suggestions, facilitating user viewing, analysis, and processing.
[0043] This step involves acquiring the digital line drawing data to be inspected and external reference data. After data preprocessing, the data is standardized and spatially registered to ensure they are under the same spatial reference. Based on the quality inspection plan, the corresponding quality inspection model and atomic rules are called from the scenario rule base to perform various types of inspections on the data to be inspected. At the same time, multi-dimensional difference detection is performed with the external reference data. Finally, the inspection results are integrated to generate a structured set of error information. This method not only makes full use of the rigor of predefined rules, but also enhances the ability to discover complex and hidden errors through multi-source data comparison, and intelligently filters false alarms by combining geographical context, thereby improving the recall and accuracy of error identification.
[0044] S3, construct a repair strategy knowledge base, which stores predefined repair functions and corresponding applicable conditions and strategy generation models, and the strategy generation models are used to generate new repair strategies.
[0045] Step S3 includes the following sub-steps: S31. Based on the error type in the digital line drawing, define and encapsulate atomic repair functions for performing basic repair operations. The repair functions include at least vertex snapping, line segment merging, face gap filling, geometric smoothing, attribute assignment, and topology reconstruction. Label each repair function with its functional description, input parameter format, and expected output. It should be noted that a comprehensive and detailed review and analysis of various errors that may occur in digital line drawings is conducted, including graphic deviation errors caused by inaccurate vertex positions, connection errors caused by broken or redundant line segments, topological errors caused by gaps between surface features, visual errors caused by insufficient smoothness of geometric shapes, and attribute errors caused by missing or incorrect feature attribute information.
[0046] Vertex snapping: To address the problem of inaccurate vertex positions, a vertex snapping function is designed to correct the error by snapping vertices that deviate from the correct position to the target position; The deviated vertex v err =( x e , y e ) Target location captured v target =( x t , y t or target line segment L superior, Point-to-point capture function: v corrected =v target ; In the formula, v correctedTo correct the vertex coordinates, v target The target location coordinates; Point-to-line segment snapping function: Let line segment L be defined by endpoints a and b, calculate the perpendicular foot coordinate p. c The expression is: ; p c =a+t(ba); In the formula, t is the projection parameter. If t∈[0,1], then v corrected =p c Otherwise, the closer endpoint will be captured.
[0047] For broken or redundant line segments that are close together, the line segment merging function calculates the minimum Euclidean distance between the endpoints of any two line segments. d min < θ d Distance threshold and the angle α between the directions of the two line segments < θ α If the angle threshold is set, these line segments will be merged into a single continuous line segment, eliminating line segment connection errors. When gaps exist between facet features, Delaunay triangulation is used to generate a triangular mesh to cover the gap area. Then, the outer boundary is extracted to form a new polygon, thus completing the facet gap filling. For elements with insufficiently smooth geometry, a Gaussian filtering smoothing algorithm is used to adjust the geometric coordinates of the elements, making the graphics smoother and more natural, and improving the visual effect. For elements with missing or incorrect attribute information, obtain the attribute corresponding to the element with the highest similarity and assign its attribute value to the missing or incorrect element. When errors occur in the topological relationships of a digital line drawing, buffer analysis and overlay analysis are used to reconstruct the topological connections between elements to ensure that the topological structure of the drawing is correct. For example, the relationships of inclusion, adjacency, and intersection between points, lines, and polygons are reconstructed.
[0048] Write a detailed functional description for each repair function, explaining its main purpose, the type of problem it solves, and the basic principles behind its implementation. Specify the input parameter format for each repair function, including the data type, name, and value range of the parameters. Also, detail the expected output of the function, including the data type of the output, the meaning of the output content, and the required output format. For example, the input parameters for the vertex snapping function could be an array of vertex coordinates, target position coordinates, etc., and the expected output would be a corrected array of vertex coordinates.
[0049] S32, for each atomic repair function or a composite repair strategy combining multiple atomic repair functions, define the corresponding applicable conditions. The applicable conditions include at least the repairable error type, the geometric feature threshold that triggers repair, the feature attribute constraint, and the processing priority; establish a mapping relationship between the repair function or composite repair strategy and its applicable conditions to construct a basic repair strategy knowledge base; Repairable error types: For each atomic repair function or composite repair strategy, determine the types of errors in the digital line drawing that it can repair; for example, the vertex snapping function is mainly applicable to graphic deviation errors caused by inaccurate vertex positions; the line segment merging function is applicable to connection errors caused by broken or redundant line segments, etc.
[0050] Geometric feature thresholds that trigger repair: Determine the geometric conditions that trigger the corresponding repair function or strategy; for example, for the line segment merging function, set a distance threshold between line segments, and trigger the line segment merging operation when the distance between two line segments is less than the threshold; for the surface gap filling function, set a gap area threshold, and perform gap filling when the gap area is greater than the threshold.
[0051] Feature attribute constraints: Consider the impact of feature attributes on repair operations and define relevant attribute constraints; for example, when performing attribute assignment operations, certain attributes of the assigned feature must meet specific conditions (such as the height attribute must be greater than 0 when the feature type is a building) in order to perform correct attribute assignment.
[0052] Processing priority: Based on factors such as the severity of the error and its impact on subsequent analysis, a processing priority is set for each repair function or strategy; topology reconstruction is prioritized over geometric smoothing.
[0053] S33, a policy generation model is built based on machine learning networks to generate new repair policies; Step S33, which describes establishing a policy generation model based on a machine learning network to generate a new repair policy, includes the following sub-steps: S331, Extract error features and corresponding successful repair strategy sequences from historical amendment examples, and construct a training sample set. The error features include error type, geometric context, and feature attributes. It should be noted that errors in historical amendment examples are categorized in detail, such as vertex position deviations, line segment breaks, topological errors in polygon features, uneven geometry, and missing or incorrect attribute information. Specific error detection algorithms or manual annotation are used to accurately identify the error type in each case, and this is considered an important component of the error features. The geometric environment information at the time of the error is considered, including the shape, size, and positional relationships of the features. This geometric context information helps the model to more comprehensively understand the nature and cause of the error. Attribute information related to the erroneous features is extracted, such as the feature type, name, classification, and attribute values. Attribute information influences the selection of repair strategies. For each historical amendment example, a series of repair operation steps from error detection to final repair completion are recorded to form a complete repair strategy sequence. These strategy sequences should describe in detail the type, operation parameters, and operation sequence of each repair operation. The extracted error features are associated and integrated with the corresponding successful repair strategy sequences to form a training sample set. Each sample contains a set of error features and a corresponding repair strategy sequence, providing data support for subsequent model training.
[0054] S332, a policy generation model is built based on a machine learning network. The training sample set is input into the policy generation model for training to learn the correlation between error features and effective repair strategies; It should be noted that a recurrent neural network (RNN) is used to construct the policy generation model. The model includes an input layer, hidden layers, and an output layer. The input layer receives erroneous feature data, the hidden layers extract and transform features from the input data through neurons and activation functions, and the output layer generates the repair policy sequence. A pre-constructed training sample set is input into the policy generation model for training. During training, the cross-entropy loss function is used to measure the difference between the repair policy sequence generated by the model and the actual successful repair policy sequence. The model parameters are continuously adjusted using the backpropagation algorithm and the Adam optimization algorithm to gradually reduce the loss function value, enabling the model to learn the correlation between erroneous features and effective repair strategies. During training, a validation set is used to evaluate the model's performance. By calculating the model's accuracy, recall, and F1 score on the validation set, it is determined whether the model is overfitting or underfitting. Based on the evaluation results, the model's structure and parameters are fine-tuned to improve its generalization ability and performance.
[0055] S333, for error types not defined in the basic repair strategy knowledge base, the corresponding error features are input into the trained strategy generation model to generate several repair strategy sequences, and a confidence score is assigned to each strategy, expressed as: ; In the formula, confidence(y) is the confidence score.T To repair the index of the strategy sequence, p ( y t | y < t , x Given an input and a sequence of generated actions, generate the t-th action. y t The probability of.
[0056] S34. The basic repair strategy knowledge base, the model parameters of the strategy generation model, and the historical case library are stored in a structured manner to obtain the final repair strategy knowledge base.
[0057] It should be noted that by constructing a final repair strategy knowledge base that includes predefined atomic repair functions and their applicable conditions, a strategy generation model based on machine learning networks, and integrating a basic repair strategy knowledge base, model parameters, and a historical case library, we can comprehensively and accurately address various known and unknown errors in digital line maps. The predefined repair functions can quickly handle common errors, the strategy generation model learns from historical cases to generate new strategies to deal with unknown errors, and the structured storage facilitates knowledge management and updates, thereby effectively improving the quality of digital line map data and ensuring the efficiency and accuracy of subsequent geographic information analysis and applications.
[0058] S4. Based on the structured error information, match or generate a repair strategy from the repair strategy knowledge base, and perform the repair operation to obtain the corrected digital line graph data.
[0059] Step S4 includes the following sub-steps: S41. Based on the error type and context features of the structured error information, select several candidate repair strategies from the repair strategy knowledge base and sort them according to the confidence score of each strategy. If there is a directly matching strategy, select the strategy with the highest confidence score; if there is no directly matching strategy, input the corresponding error features into the strategy generation model to generate a new repair strategy. S42, based on the selected repair strategy, perform topological error, geometric deformation, and attribute repair operations on the corresponding erroneous features, wherein, The topology error repair operation performs neighborhood search-based capture and merging on dangling points, splits and reconstructs on self-intersecting line segments, and closes on face gaps based on boundary inference. It should be noted that for dangling points in the digital line drawing, a neighborhood search-based capture and merging method is used. By searching the neighboring features around the dangling point, the dangling point is captured in a suitable position and merged with other relevant features, thereby eliminating the topological errors caused by the dangling point. When line segments self-intersect, they are split and reconstructed. The self-intersecting line segments are split into multiple reasonable line segments, and then the connection relationships between these line segments are reconstructed according to topological rules to ensure that there are no unreasonable intersections between line segments. For gaps between surface features, a boundary inference-based closure method is used for repair. The boundary information of the gaps is analyzed to infer a reasonable filling method, close the gaps, and improve the topological structure of the surface features.
[0060] The geometric deformation repair operation performs correction based on spatial transformation parameters for the overall positional deviation of the feature, and performs smoothing based on spline interpolation for local geometric distortion; It should be noted that if there is an overall positional deviation of the feature, a correction method based on spatial transformation parameters is used. This involves calculating the spatial transformation relationship between the feature's correct position and its current position, determining the corresponding transformation parameters, such as translation, rotation, and scaling, and then using these parameters to correct the feature and restore it to its correct position. For local geometric distortion of the feature, a smoothing method based on spline interpolation is used. Spline interpolation can smooth out locally distorted parts while preserving the overall shape characteristics of the feature, making the feature's geometry smoother and more natural, improving visual effects and data accuracy.
[0061] The repair operation for missing or incorrect attributes performs attribute derivation and assignment based on the attributes of neighboring features or semantic information from reference data; It should be noted that when an element has missing or incorrect attributes, attribute derivation and assignment operations are performed based on the attributes of neighboring elements or semantic information from reference data. For example, if the height attribute of a building is missing, the possible height value of the building can be deduced by analyzing the height attributes of similar surrounding buildings and combining semantic information such as the building's type and purpose, and then the correct attribute value can be assigned to it, thus correcting the attribute error.
[0062] S43, write the repaired results back to the digital line graph data to generate corrected digital line graph data.
[0063] In this embodiment, the most suitable repair strategy can be accurately matched or generated from the repair strategy knowledge base based on structured error information, effectively dealing with various complex and diverse errors in digital line drawings. For different types of errors, targeted and efficient repair methods are adopted to ensure the accuracy and effectiveness of the repair operation and improve the quality of the final generated corrected digital line drawing data.
[0064] S5 constructs a correction evaluation model, performs re-examination and verification and effect evaluation on the corrected digital line plot data, optimizes the repair strategy knowledge base based on the evaluation results, and outputs the final digital line plot data.
[0065] The construction of the modified evaluation model described in step S5 includes the following sub-steps: S51, Establish a strategy effectiveness evaluation model and set evaluation indicators, including repair success rate, geometric accuracy improvement, attribute correction accuracy and execution efficiency. It should be noted that the repair success rate measures the percentage of errors that are correctly resolved during the repair operation, the geometric accuracy improvement rate measures the degree of improvement in the geometric shape of the feature after repair relative to the reference data, the attribute correction accuracy rate measures the correctness of attribute value repair, and the execution efficiency measures the time and computational resource consumption of the repair operation.
[0066] S52, during the repair process, a repair operation log is recorded. The log includes error information before repair, repair strategy, repair operation parameters, feature status after repair, and execution timestamp. S53, After the repair operation is completed, the corresponding atomic rule check is re-executed for the repaired elements, and the values of each evaluation index are calculated. The expression for the repair success rate is: R s =N c / N t ×100%; In the formula, N c N represents the number of errors that have been confirmed to have been eliminated after re-inspection. t The total number of errors that this repair operation attempted to fix.
[0067] The expression for the geometric accuracy improvement is: I g =(1-( RMSE a / RMSE b ))×100%; In the formula, RMSE a To correct the root mean square error of the positional deviation between the post-feature and the high-precision reference data, RMSE b To correct the root mean square error of the positional deviation between the previous feature and the high-precision reference data; The expression for attribute correction accuracy is: A a =N a / N r ×100%; In the formula, N a N represents the number of features whose attribute values were correctly corrected. r The total number of elements for which attribute repair was attempted; The expression for execution efficiency is: E=N t / T; In the formula, T represents the total time required to complete all repair operations.
[0068] S54, based on preset weighting coefficients, performs a weighted comprehensive calculation on the evaluation index values to obtain the comprehensive evaluation result of the repair operation; the expression is: S= w 1× R s + w 2× I g + w 3×A a + w 4×E n In the formula, w 1. w 2. w 3 and w 4 represents the weight of each evaluation indicator, E n This is the normalized execution efficiency value.
[0069] S55, a first evaluation threshold and a second evaluation threshold are preset, wherein the first evaluation threshold is greater than the second evaluation threshold; If the comprehensive evaluation result is greater than the first evaluation threshold, it is judged as an excellent repair strategy. The confidence score of the current repair strategy is increased by a preset growth rate, and its applicable conditions are expanded by the threshold expansion factor. If the comprehensive evaluation result is greater than or equal to the second evaluation threshold and less than or equal to the first evaluation threshold, it is determined to be a general repair strategy. The confidence score of the current repair strategy is reduced by a preset reduction ratio, and its applicable conditions are narrowed by a threshold reduction factor. If the comprehensive evaluation result is less than or equal to the second evaluation threshold, it is determined to be a failed strategy, removed from the recommendation list, and a manual repair process is initiated for the corresponding error. S56. The error characteristics, repair strategies and corresponding comprehensive evaluation results after each repair operation are stored as new training samples in the historical case library for optimization training of the strategy generation model. S57 integrates all verified and optimized repair results and outputs the final digital line plot data.
[0070] In this embodiment, a comprehensive evaluation index is calculated based on multiple dimensions, including repair success rate, geometric accuracy improvement, attribute correction accuracy, and execution efficiency. The repair strategy knowledge base is dynamically optimized based on the evaluation results to increase the frequency and applicability of excellent strategies and eliminate ineffective strategies, ensuring the efficiency and accuracy of the knowledge base. At the same time, the information of each repair operation is stored in the historical case library for model optimization. The final output digital line drawing data can comprehensively and accurately re-examine and evaluate the effect of the corrected digital line drawing data.
[0071] Secondly, the present invention also provides a digital line drawing recognition and correction system, implemented using a digital line drawing recognition and correction method, comprising: The rule base building module is used to build a multi-level configurable scenario rule base; The error identification module is used to acquire the line drawing data of the digital figure to be inspected and external reference data, perform data preprocessing and spatial registration, and identify and output structured error information based on the scene rule base and comparison with external reference data. The knowledge base construction module is used to build a repair strategy knowledge base. The repair strategy knowledge base stores predefined repair functions and corresponding applicable conditions and strategy generation models. The strategy generation model is used to generate new repair strategies. The matching and execution module is used to match or generate repair strategies from the repair strategy knowledge base based on structured error information, and to perform repair operations to obtain corrected digital line plot data. The evaluation output module is used to build a correction evaluation model, perform re-examination and verification and effect evaluation on the correction digital line plot data, optimize the repair strategy knowledge base based on the evaluation results, and output the final digital line plot data.
[0072] It should be noted that this system corresponds to the aforementioned digital line drawing recognition and correction method. All implementation methods in the above method embodiments are applicable to the embodiments of this system and can achieve the same technical effect.
[0073] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0074] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system and modules described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0075] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0076] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0077] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0078] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0079] Furthermore, it should be noted that in the system and method of the present invention, it is obvious that the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered equivalent solutions of the present invention. Moreover, the steps performing the above series of processes can naturally be executed in the order described, but are not necessarily required to be executed in chronological order; some steps can be executed in parallel or independently of each other. Those skilled in the art will understand that all or any step or component of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or network of computing devices, in hardware, firmware, software, or a combination thereof. This is something that those skilled in the art can achieve by using their basic programming skills after reading the description of the present invention.
[0080] Therefore, the object of the present invention can also be achieved by running a program or a set of programs on any computing system. The computing system can be a well-known general-purpose system. Therefore, the object of the present invention can also be achieved simply by providing a program product containing program code implementing the described method or apparatus. In other words, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any known storage medium or any storage medium developed in the future. It should also be noted that in the apparatus and method of the present invention, it is obvious that the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered equivalent to the present invention. Furthermore, the steps performing the above series of processes can naturally be performed in the order described, but are not necessarily required to be performed in chronological order. Some steps can be performed in parallel or independently of each other.
[0081] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for recognizing and correcting digital line drawings, characterized in that, Includes the following steps: S1, build a multi-level configurable scenario rule library; S2, acquire the line drawing data of the digital object to be inspected and external reference data, perform data preprocessing and spatial registration, and identify and output structured error information based on the scene rule base and comparison with external reference data; S3, construct a repair strategy knowledge base, which stores predefined repair functions and corresponding applicable conditions and strategy generation models, and the strategy generation model is used to generate new repair strategies; S4. Based on the structured error information, match or generate a repair strategy from the repair strategy knowledge base, and perform the repair operation to obtain the corrected digital line graph data. S5 constructs a correction evaluation model, performs re-examination and verification and effect evaluation on the corrected digital line plot data, optimizes the repair strategy knowledge base based on the evaluation results, and outputs the final digital line plot data.
2. The digital line drawing recognition and correction method as described in claim 1, characterized in that, The construction of a multi-level configurable scene rule base in step S1 includes the following sub-steps: S11, an atomic rule module is defined by combining natural language templates and parameterization. The structural elements of the rule module include: inspection object, inspection dimension, spatial relationship, reference object and threshold condition. S12, according to different scene types and their constraints, the rule module is instantiated into atomic rules. The quality inspection scene types include terrain inspection, geometric constraint inspection, edge inspection, attribute logic inspection, water system traffic inspection and topological relationship inspection. S13 combines multiple logically related atomic rules into a quality inspection model, and the quality inspection model is associated with the scene type. S14, Associate and configure the quality inspection model with data project standards and / or geographical area characteristics to form a quality inspection solution for specific applications; S15, according to the quality inspection plan, is stored in the database to build a multi-level configurable scenario rule library.
3. The digital line drawing recognition and correction method as described in claim 2, characterized in that, Step S2, which involves acquiring the digital line drawing data to be inspected and external reference data, performing data preprocessing and spatial registration, and identifying and outputting structured error information based on the scene rule base and external reference data, includes the following sub-steps: S21, acquire the line drawing data of the digit to be inspected and external reference data; S22, Perform format standardization and coordinate system unification processing on the digital line drawing data to be inspected to obtain standardized digital line drawing data; S23. Based on the feature point matching algorithm, stable feature points of standardized digital line drawing data and external reference data are extracted. The least squares method is used to calculate the spatial transformation parameters and perform the registration operation to align the two to the same spatial reference, thus obtaining the registered digital line drawing data. S24. Based on the quality inspection plan, load the corresponding quality inspection model and atomic rules from the scene rule library. For each geographic feature in the registered digital line map data, perform topological relationship checks, geometric constraint checks, and attribute logic checks, extract the features that violate the rules and their error context information, and generate a primary error layer. S25, perform multi-dimensional difference detection on the registered digital line drawing data and external reference data. The difference detection includes: calculating the deviation of the elements in position and shape through a geometric difference detection algorithm; identifying the missing, redundant or partially missing elements through spatial association; checking the visual consistency of the element classification attributes by comparing the semantic information extracted from the external reference data; marking the detected difference areas as suspicious error areas and associating them with their corresponding error types. S26 spatially associates and merges the primary error layer with the suspected error area, filters false detections by combining geographic semantic context, encodes the error information, and generates an error information set including fields such as unique ID, associated feature ID, error type, severity level, spatial geometry, detailed description and repair suggestions.
4. The digital line drawing recognition and correction method as described in claim 3, characterized in that, Step S3, which involves constructing a repair strategy knowledge base, stores predefined repair functions, corresponding applicable conditions, and a strategy generation model. The strategy generation model is used to generate new repair strategies and includes the following sub-steps: S31. Based on the error type in the digital line drawing, define and encapsulate atomic repair functions for performing basic repair operations. The repair functions include at least vertex snapping, line segment merging, face gap filling, geometric smoothing, attribute assignment, and topology reconstruction. Label each repair function with its functional description, input parameter format, and expected output. S32, for each atomic repair function or a composite repair strategy combining multiple atomic repair functions, define the corresponding applicable conditions. The applicable conditions include at least the repairable error type, the geometric feature threshold that triggers repair, the feature attribute constraint, and the processing priority; establish a mapping relationship between the repair function or composite repair strategy and its applicable conditions to construct a basic repair strategy knowledge base; S33, a policy generation model is built based on machine learning networks to generate new repair policies; S34. The basic repair strategy knowledge base, the model parameters of the strategy generation model, and the historical case library are stored in a structured manner to obtain the final repair strategy knowledge base.
5. The digital line drawing recognition and correction method as described in claim 4, characterized in that, Step S33, which describes establishing a policy generation model based on a machine learning network to generate a new repair policy, includes the following sub-steps: S331, Extract error features and corresponding successful repair strategy sequences from historical amendment examples, and construct a training sample set. The error features include error type, geometric context, and feature attributes. S332, a policy generation model is built based on a machine learning network. The training sample set is input into the policy generation model for training to learn the correlation between error features and effective repair strategies; S333: For error types not defined in the basic repair strategy knowledge base, the corresponding error features are input into the trained strategy generation model to generate several repair strategy sequences, and a confidence score is assigned to each strategy.
6. The digital line drawing recognition and correction method as described in claim 5, characterized in that, Step S4, which involves matching or generating repair strategies from the repair strategy knowledge base based on structured error information and performing repair operations to obtain corrected digital line plot data, includes the following sub-steps: S41. Based on the error type and context features of the structured error information, select several candidate repair strategies from the repair strategy knowledge base and sort them according to the confidence score of each strategy. If there is a directly matching strategy, select the strategy with the highest confidence score; if there is no directly matching strategy, input the corresponding error features into the strategy generation model to generate a new repair strategy. S42, based on the selected repair strategy, perform topological error, geometric deformation, and attribute repair operations on the corresponding erroneous features, wherein, The topology error repair operation performs neighborhood search-based capture and merging on dangling points, splits and reconstructs on self-intersecting line segments, and closes on face gaps based on boundary inference. The geometric deformation repair operation performs correction based on spatial transformation parameters for the overall positional deviation of the feature, and performs smoothing based on spline interpolation for local geometric distortion; The repair operation for missing or incorrect attributes performs attribute derivation and assignment based on the attributes of neighboring features or semantic information from reference data; S43, write the repaired results back to the digital line graph data to generate corrected digital line graph data.
7. The digital line drawing recognition and correction method as described in claim 6, characterized in that, Step S5, which involves constructing a correction evaluation model, performing re-verification and effect evaluation on the corrected digital line plot data, optimizing the repair strategy knowledge base based on the evaluation results, and outputting the final digital line plot data, includes the following sub-steps: S51, Establish a strategy effectiveness evaluation model and set evaluation indicators, including repair success rate, geometric accuracy improvement, attribute correction accuracy and execution efficiency. S52, during the repair process, a repair operation log is recorded. The log includes error information before repair, repair strategy, repair operation parameters, feature status after repair, and execution timestamp. S53, After the repair operation is completed, the corresponding atomic rule check is re-executed for the repaired elements, and the values of each evaluation index are calculated. S54, the evaluation index values are weighted and calculated based on preset weight coefficients to obtain the comprehensive evaluation result of the repair operation; S55, a first evaluation threshold and a second evaluation threshold are preset, wherein the first evaluation threshold is greater than the second evaluation threshold; If the comprehensive evaluation result is greater than the first evaluation threshold, it is judged as an excellent repair strategy. The confidence score of the current repair strategy is increased by a preset growth rate, and its applicable conditions are expanded by the threshold expansion factor. If the comprehensive evaluation result is greater than or equal to the second evaluation threshold and less than or equal to the first evaluation threshold, it is determined to be a general repair strategy. The confidence score of the current repair strategy is reduced by a preset reduction ratio, and its applicable conditions are narrowed by a threshold reduction factor. If the comprehensive evaluation result is less than or equal to the second evaluation threshold, it is determined to be a failed strategy, removed from the recommendation list, and a manual repair process is initiated for the corresponding error. S56. The error characteristics, repair strategies and corresponding comprehensive evaluation results after each repair operation are stored as new training samples in the historical case library for optimization training of the strategy generation model. S57 integrates all verified and optimized repair results and outputs the final digital line plot data.
8. A digital line drawing recognition and correction system, implemented using the digital line drawing recognition and correction method as described in any one of claims 1-7, characterized in that, include: The rule base building module is used to build a multi-level configurable scenario rule base; The error identification module is used to acquire the line drawing data of the digital figure to be inspected and external reference data, perform data preprocessing and spatial registration, and identify and output structured error information based on the scene rule base and comparison with external reference data. The knowledge base construction module is used to build a repair strategy knowledge base. The repair strategy knowledge base stores predefined repair functions and corresponding applicable conditions and strategy generation models. The strategy generation model is used to generate new repair strategies. The matching and execution module is used to match or generate repair strategies from the repair strategy knowledge base based on structured error information, and to perform repair operations to obtain corrected digital line plot data. The evaluation output module is used to build a correction evaluation model, perform re-examination and verification and effect evaluation on the corrected digital line plot data, optimize the repair strategy knowledge base based on the evaluation results, and output the final digital line plot data.
9. An electronic device, characterized in that, It includes at least one processor, at least one memory, a communication interface, and a bus; wherein the processor, memory, and communication interface communicate with each other through the bus; the memory stores a digital line drawing recognition and correction method program that can be executed by the processor, the digital line drawing recognition and correction method program being configured to implement the digital line drawing recognition and correction method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a digital line drawing recognition and correction method program, which, when executed, implements the digital line drawing recognition and correction method as described in any one of claims 1-7.