A method, apparatus, equipment and medium for industrial drawing recognition and error correction
By preprocessing industrial drawings, aligning coordinates, and constructing binding relationship diagrams, the problems of identification deviation and coordinate alignment error in existing technologies are solved, achieving highly reliable closed-loop error correction and ensuring the accuracy and reliability of the identification results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING DIGITAL CHINA CLOUD COMPUTING CO LTD
- Filing Date
- 2026-04-21
- Publication Date
- 2026-05-26
AI Technical Summary
Existing industrial drawing recognition methods are prone to recognition bias and coordinate alignment errors, making it difficult to achieve highly reliable closed-loop error correction, and lacking systematic verification of the recognition results against the actual geometric objects on the drawing tool side.
By acquiring and preprocessing industrial drawings, a structured candidate set is generated. Anchor point features are used for coordinate alignment calculation, quality verification and iterative optimization are performed, a binding relationship graph is constructed, and consistency constraint detection is executed to achieve closed-loop error correction.
It improves the accuracy and reliability of the recognition results, ensures precise alignment between the drawing recognition results and the actual coordinates on the tool side, reduces the risk of positioning and measurement errors caused by alignment deviations, and enhances the system's adaptability and delivery quality.
Smart Images

Figure CN122090482A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of drawing recognition technology, and in particular to a method, apparatus, equipment and medium for industrial drawing recognition and error correction. Background Technology
[0002] With the rapid development of industrial digitalization and intelligent manufacturing, industrial drawings, as an important technical carrier for product design, process planning, and production, require digital analysis and structured extraction as key links in establishing a data link between design and manufacturing. Traditional manual reading and data entry methods are inefficient and error-prone, failing to meet the requirements of modern industrial production for data accuracy, real-time performance, and traceability. Therefore, how to automate the analysis of industrial drawings using computer vision and image recognition technologies has become an important research direction in the fields of industrial software and intelligent manufacturing.
[0003] Currently, mainstream industrial drawing recognition methods typically employ optical character recognition and target detection technologies. However, existing industrial drawing recognition methods are prone to problems such as recognition deviation and coordinate alignment errors. Furthermore, once quality disputes arise, they are often difficult to detect and correct in a timely manner.
[0004] Therefore, there is an urgent need for a highly reliable closed-loop error correction method that can achieve drawing recognition results. Summary of the Invention
[0005] This application provides a method, apparatus, equipment, and medium for industrial drawing recognition and error correction, which can achieve highly reliable closed-loop error correction of drawing recognition results.
[0006] To achieve the above objectives, this application adopts the following technical solution: Firstly, this application provides a method for industrial drawing recognition and error correction, including: Acquire industrial drawings and preprocess them to obtain preprocessed drawing data; Based on the drawing data, identification and extraction are performed to generate a structured candidate set; Based on the anchor point features in the drawing data, the alignment of the identified coordinates with the coordinates of the drawing tool object is calculated to obtain the alignment parameters, alignment error, and alignment confidence. Based on alignment confidence and alignment error, the alignment parameters are quality checked and iteratively optimized until the preset alignment quality requirements are met or the preset exit conditions are triggered, thus obtaining the qualified alignment parameters. Based on the alignment parameters, the structured candidate set is mapped to coordinates to obtain the localization target; The control drawing tools perform positioning and measurement on the target, generating deterministic evidence objects; A binding relationship graph is constructed based on the structured candidate set and the deterministic evidence objects, and consistency constraint detection is performed on the binding relationship graph to obtain the constraint detection results; When the constraint detection result is unsuccessful, execute the minimum cost action sequence to update the structured candidate set and the deterministic evidence object, and complete the closed-loop error correction; The corrected structured candidate set and the deterministic evidence object are encapsulated to obtain the corrected structured result, evidence chain and replayable data.
[0007] In some possible implementations, the alignment parameters are subjected to quality verification and iterative optimization until a preset alignment quality requirement is met or a preset exit condition is triggered, resulting in compliant alignment parameters, including: When the alignment confidence is not lower than a preset threshold and the alignment error does not exceed a preset threshold, the current alignment parameter is determined as the compliant alignment parameter; When the alignment confidence is lower than the preset threshold or the alignment error exceeds the preset threshold, the anchor point features are re-extracted and the alignment calculation is re-executed until the preset alignment quality requirements are met or the preset exit condition is triggered, and the qualified alignment parameters are obtained.
[0008] In some possible implementations, based on the anchor point features in the drawing data, the alignment coordinates of the identified coordinates and the coordinates of the drawing tool object are calculated to obtain alignment parameters, alignment error, and alignment confidence, including: Extract the anchor point coordinates in the recognition coordinate system from the drawing data, and obtain the corresponding target coordinates in the coordinate system of the drawing tool object through the drawing tool interface; Construct a set of anchor point pairs based on the anchor point coordinates and the target coordinates; Based on the set of anchor points, the transformation model from the identification coordinate system to the coordinate system of the drawing tool object is solved to obtain the alignment parameters; The reprojection error of the anchor point to the internal points in the set is calculated based on the alignment parameters to obtain the alignment error; The alignment confidence is calculated based on the ratio of anchor points to interior points in the set and the alignment error.
[0009] In some possible implementations, the control drawing tools perform positioning and measurement on the target, generating deterministic evidence objects, including: Adjust the viewport status based on the positioning target control drawing tools, and perform object selection and geometric measurement operations on the positioning target; Obtain the object identifier, tool-side measurement results, and viewport status record corresponding to the positioning target; The object identifier, tool-side measurement results, viewport state records, and alignment parameters are encapsulated to obtain a deterministic evidence object.
[0010] In some possible implementations, a binding graph is constructed based on the structured candidate set and the deterministic evidence objects, and consistency constraint checks are performed on the binding graph to obtain constraint check results, including: Using fields, corresponding geometric features, and leads in the structured candidate set as nodes, and the binding relationships between fields and geometric features as edges, the deterministic evidence objects are attached to the corresponding nodes or edges to construct a binding relationship graph. Perform geometric consistency, dimension chain closure, BOM consistency, cross-page consistency, or cross-view consistency on the binding relationship diagram. Figure 1 At least one constraint in the consistency test is performed to obtain the constraint test result.
[0011] In some possible implementations, a minimum-cost sequence of actions is executed to update the structured candidate set and the deterministic evidence object, thus completing closed-loop error correction, including: Locate conflict subgraphs in the binding relationship graph; The least-cost sequence of actions, namely retesting, rebinding, re-extraction, or realignment, is executed in order of increasing cost. The structured candidate set, deterministic evidence objects, and binding relationship graph are updated based on the execution results to complete closed-loop error correction.
[0012] In some possible implementations, the corrected structured candidate set and the deterministic evidence object are encapsulated to obtain the corrected structured result, the evidence chain, and replayable data, including: The corrected structured candidate set is encapsulated into a structured result; Integrate the definitive evidence object, alignment parameters, and viewport status records into a chain of evidence; Based on the chain of evidence and the error correction process, a reproducible playback record is generated, and the replayable data is determined.
[0013] Secondly, this application provides an industrial drawing recognition and error correction device, comprising: The drawing recognition module is used to acquire industrial drawings and preprocess them to obtain preprocessed drawing data. Based on the drawing data, it performs recognition and extraction to generate a structured candidate set. According to the anchor point features in the drawing data, it calculates the alignment between the recognized coordinates and the coordinates of the drawing tool object to obtain alignment parameters, alignment error, and alignment confidence. Based on the alignment confidence and alignment error, it performs quality verification and iterative optimization of the alignment parameters until the preset alignment quality requirements are met or the preset exit conditions are triggered to obtain the qualified alignment parameters. The coordinate mapping module is used to perform coordinate mapping on the structured candidate set according to the alignment parameters to obtain the positioning target; control the drawing tools to perform positioning and measurement on the positioning target to generate deterministic evidence objects; construct a binding relationship graph based on the structured candidate set and the deterministic evidence objects, and perform consistency constraint detection on the binding relationship graph to obtain the constraint detection results; The error correction module is used to execute a minimum cost action sequence to update the structured candidate set and the deterministic evidence object when the constraint detection result is unsuccessful, thus completing the closed-loop error correction. The corrected structured candidate set and the deterministic evidence object are then encapsulated to obtain the corrected structured result, evidence chain, and replayable data.
[0014] Thirdly, this application provides a computing device, including a memory and a processor; The memory stores one or more computer programs, the one or more computer programs including instructions; when the instructions are executed by the processor, the computing device performs the method as described in any one of the first aspects.
[0015] Fourthly, this application provides a computer-readable storage medium for storing a computer program for performing the method as described in any one of the first aspects.
[0016] Fifthly, this application provides a computer program product comprising one or more computer instructions, wherein when the computer instructions are executed by a computer, the computer performs the method as described in any one of the first aspects.
[0017] As can be seen from the above technical solution, this application has at least the following beneficial effects: In this application, preprocessing operations such as format verification, integrity checks, multi-scale rendering, noise reduction and enhancement, and object mapping relationship establishment are performed on industrial drawings to effectively improve the data quality of the original drawings and eliminate interference caused by noise and format differences. This step ensures that the system can run stably on drawings of different types and sources, improving the robustness and versatility of the overall processing.
[0018] Through layout analysis and target detection, important information such as title blocks, detail areas, text, lines, and symbols are accurately located and extracted from drawings, forming a structured candidate set that includes field types, field values, identification anchors, and confidence levels. This step transforms unstructured drawing images or vector data into a standardized data format that can be efficiently processed by computers, significantly improving the accuracy and operability of information extraction.
[0019] By utilizing repeatable anchor point features in the drawings (such as title block corners, table intersections, vector text borders, etc.), a mapping relationship is constructed between the recognition coordinate system and the coordinate system of the drawing tool object. A robust estimation algorithm is then used to solve the transformation model, and the alignment error and confidence index are output simultaneously. This step achieves precise alignment between the recognition result and the actual coordinates of the tool, effectively solving the technical problem of inconsistency between image recognition coordinates and actual engineering coordinates.
[0020] By gating alignment confidence and alignment error, the system automatically identifies scenarios where alignment quality fails to meet standards and triggers a self-calibration process (including rendering enhancement, anchor point enhancement, tool enhancement, or lightweight manual calibration) until preset quality requirements are met or exit conditions are triggered. This step introduces a closed-loop quality control mechanism to ensure the reliability and stability of alignment parameters, reduce the risk of subsequent positioning and measurement errors caused by alignment deviations, and improve the system's adaptability and delivery quality in complex drawing scenarios.
[0021] By utilizing the qualified alignment parameters that have passed quality verification, the identification coordinates (such as anchor point areas and field positions) in the structured candidate set are uniformly mapped to the coordinate system of the drawing tool object, forming a precise positioning target that can be directly identified and manipulated by the drawing tool. This step achieves a seamless conversion from identification results to executable tool instructions, ensuring the accuracy and repeatability of tool-side operations.
[0022] Based on the positioning target, the control drawing tools adjust the viewport state, perform operations such as object selection, geometric measurement, local vector export, and screenshot evidence collection, and encapsulate the object identifier, measurement results, viewport state record, and alignment parameters into a deterministic evidence object. This step, through a "tool-in-the-loop" approach, substantially binds the identification results to the actual geometric objects within the drawing tools, generating traceable, reproducible, and auditable credible evidence.
[0023] Using fields, geometric features, and leaders in the structured candidate set as nodes, and the relationships between fields and geometric objects as edges, deterministic evidence objects are attached to the corresponding nodes or edges to construct a complete binding relationship graph. Geometric consistency, dimensional chain closure, bill of materials consistency, and cross-page or cross-view consistency are then performed on this graph. Figure 1 Multi-dimensional constraint detection, including consistency, is performed. This step enables systematic modeling and global verification of the relationship between drawing recognition results and real data on the tool side, efficiently identifying inconsistencies or conflicts.
[0024] When constraint detection fails, the conflict subgraph is located, and a sequence of minimum-cost actions (such as retesting, rebinding, re-extraction, re-alignment, or manual calibration) is planned from low to high according to the cost function. Repair operations are executed sequentially, and the structured candidate set, deterministic evidence objects, and binding relationship graph are updated simultaneously until the constraint passes or the termination condition is triggered. This step achieves automatic alignment and repair of the identification results and engineering evidence at minimal cost, forming a complete closed-loop error correction mechanism. This effectively reduces the cost of manual intervention and improves overall processing efficiency and result reliability.
[0025] The corrected, qualified structured candidate set is encapsulated into a standardized structured result. Deterministic evidence objects, alignment parameters, and viewport status records are integrated into a complete chain of evidence. Reproducible playback records (such as playback scripts or command sequences) are generated based on the error correction process. This step ultimately outputs auditable, traceable, and reproducible deliverables, providing highly reliable structured data to downstream systems. It also provides comprehensive technical support for quality review, problem localization, and process backtracking, enhancing the system's transparency and reliability. Ultimately, this achieves highly reliable closed-loop error correction for drawing recognition results.
[0026] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description
[0027] Figure 1 An application environment diagram for an industrial drawing recognition and error correction method provided in this application embodiment; Figure 2 A flowchart illustrating an industrial drawing recognition and error correction method provided in an embodiment of this application; Figure 3 A structural diagram of an industrial drawing recognition and error correction device provided in an embodiment of this application; Figure 4 This is a schematic diagram of a computing device provided in an embodiment of this application. Detailed Implementation
[0028] The terms "first," "second," and "third," etc., used in this application specification and accompanying drawings are used to distinguish different objects, not to limit a specific order.
[0029] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0030] To ensure clarity and conciseness in the description of the following embodiments, a brief introduction to the related technologies is given first: Industrial drawings are technical drawings used in industrial production and engineering design to convey product design, manufacturing processes, and assembly information. They typically include various graphic elements such as title blocks, parts lists, dimensions, geometric figures, leader lines, and technical specifications. Drawing recognition refers to the process of automatically extracting this information from drawing images or vector files using technologies such as computer vision, optical character recognition, and object detection, and converting it into structured data. The structured candidate set is a standardized data set generated after recognition and extraction, containing information such as field types, field values, recognition anchor points, and confidence levels. Coordinate alignment establishes a mapping relationship between the recognition coordinate system and the coordinate system of the drawing tool object through anchor point features, achieving positional matching between the recognition result and the actual geometric object on the drawing. Deterministic evidence refers to reliable data that can be used for traceability and verification, such as object identifiers, measurement results, and viewport status records, directly obtained through the drawing tool interface. Constraint detection is the process of verifying the consistency between the recognition result and the tool evidence. Closed-loop error correction is a processing mechanism that automatically corrects inconsistencies to ensure consistency between the recognition result and engineering evidence.
[0031] Currently, most industrial drawing recognition methods adopt an open-loop processing mode of recognition-output, that is, after extracting information through a visual model, directly outputting structured results, lacking systematic verification of the correlation between the recognition results and the actual geometric objects on the drawing tool side. On the one hand, due to factors such as drawing image resolution, scanning distortion, and differences in rendering parameters, there are often alignment deviations between the recognized coordinates and the actual coordinates of the tool, and existing methods are unable to effectively identify and correct such deviations. On the other hand, there is a lack of clear binding relationship between the fields extracted during the recognition process and the geometric entities in the drawing. When field values are inconsistent with the actual measurement results, it is impossible to automatically locate the source of the conflict, let alone complete the evidence-level verification and repair on the tool side. In addition, the existing processing flow lacks a reproducible playback mechanism. Once a quality dispute occurs, it is difficult to trace key operation steps, which brings difficulties to auditing and quality control. Therefore, how to introduce a tool-in-the-loop closed-loop verification and automatic error correction mechanism in the drawing recognition process to achieve highly reliable output of recognition results has become a technical problem that urgently needs to be solved in this field.
[0032] In view of this, embodiments of this application provide a method for industrial drawing recognition and error correction. To make the technical solution of this application clearer and easier to understand, the application scenarios of the technical solution of this application are described below with reference to the accompanying drawings. Figure 1 As shown, this figure is an application environment diagram provided by an embodiment of this application.
[0033] In this application environment, the server acquires industrial drawings and performs preprocessing, identification and extraction, coordinate alignment, quality verification, positioning and mapping, evidence generation, constraint detection, and closed-loop error correction. The final output includes structured results, evidence chains, and replayable data. The terminal serves as an interactive and display device, receiving the server's output results for technicians to view, review, or manually verify, thus achieving automated and traceable industrial drawing recognition and error correction.
[0034] To make the technical solution of this application clearer and easier to understand, the following describes an industrial drawing recognition and error correction method provided by an embodiment of this application, using a server as the execution subject, in conjunction with the above application scenarios. Figure 2 As shown, this figure is a flowchart illustrating an industrial drawing recognition and error correction method provided in an embodiment of this application. The industrial drawing recognition and error correction method includes: S201. Obtain industrial drawings and preprocess them to obtain preprocessed drawing data.
[0035] Industrial drawings are technical drawings used for industrial production and engineering design, including information on the assembly structure and process of mechanical parts, as well as information related to piping and instrumentation processes.
[0036] Preprocessing is a standardized process performed before drawing recognition and coordinate alignment, used to improve the stability and accuracy of subsequent data processing.
[0037] Preprocessed drawing data is a drawing data object that can be stably recognized and calculated by the system after standardization cleaning and format conversion.
[0038] For example, the process first receives and reads the original file of the industrial drawing, performing format verification and integrity checks to ensure the drawing can be parsed correctly. Then, metadata parsing is performed on the drawing to extract page numbers, view information, layer status, and rendering parameters. Multi-scale rendering is then performed on the drawing according to preset rules, adjusting the resolution and display boundaries to generate a rendered image suitable for recognition and alignment requirements. Noise reduction and enhancement are then applied to the drawing content, weakening irrelevant interference information and strengthening key graphic features such as text, lines, and symbols. A unified reference relationship is established for geometric objects within the drawing, forming an object mapping relationship that can be quickly located by drawing tools. After this series of processes, preprocessed drawing data with a clear structure, stable features, and direct usability for subsequent recognition, extraction, and coordinate alignment is obtained.
[0039] For example, the system first acquires the original industrial drawing file to be processed. Preprocessing operations such as page and view metadata parsing and multi-scale rendering are then performed on the acquired industrial drawing. Simultaneously, object indexes or object reference mappings are established for various geometric objects and primitives within the drawing. These mappings include stable positioning identifiers such as selection paths, geometric feature indexes, and local export references to support subsequent object selection operations and deterministic evidence collection on the drawing tool side. Through format validation, integrity checks, noise reduction and enhancement, and coordinate normalization, the system transforms the original industrial drawing into a data format with a clear structure, stable features, and compatibility with both the recognizable model and drawing tools, ultimately yielding preprocessed drawing data.
[0040] S202. Based on the drawing data, identify and extract to generate a structured candidate set.
[0041] Among them, identification and extraction is an integrated processing behavior that performs content detection and information extraction on drawing data.
[0042] A structured candidate set is an ordered data set formed by organizing the identified and extracted fields to be verified in a uniform format, and may include...
[0043] For example, taking preprocessed drawing data as the processing object, the layout of the drawing is first analyzed to divide the distribution range of different functional elements such as title bar, detail area, text, lines, symbols, and tables. Based on the preset drawing parsing rules, target detection is carried out in each area to locate key information such as text content, geometric entities, leader lines, annotations, and relevant items in the bill of materials. Field extraction is performed on the detected information to obtain the field type, field value, identification anchor point, area association, geometric clues, and corresponding confidence levels. The extracted information is organized and integrated according to a unified data structure to form a data set containing multiple items to be verified. The generated data set is filtered for validity and format to remove abnormal items and ensure that the information in each field is complete and usable. The final output is a structured candidate set that can be directly used for subsequent coordinate mapping and evidence verification.
[0044] For example, using preprocessed drawing data as the processing object, layout analysis is performed on the drawings to divide the distribution range of different functional elements such as title blocks, detail areas, text, lines, symbols, and tables. Then, based on preset rules, field extraction is performed on each area to generate a structured candidate set. Each candidate object is assigned corresponding field type, field value, identification anchor point or area, associated geometric / leader clues, and candidate confidence level. All candidates are then neatly merged according to a unified data structure to complete validity filtering, ultimately forming a structured candidate set that can be directly used for subsequent coordinate mapping, evidence verification, and error correction.
[0045] S203. Based on the anchor point features in the drawing data, perform alignment calculations between the identified coordinates and the coordinates of the drawing tool object to obtain alignment parameters, alignment error, and alignment confidence.
[0046] One possible approach involves extracting anchor point coordinates in the identification coordinate system from drawing data and obtaining the corresponding target coordinates in the drawing tool object coordinate system through the drawing tool interface; constructing an anchor point pair set based on the anchor point coordinates and target coordinates; solving the transformation model from the identification coordinate system to the drawing tool object coordinate system based on the anchor point pair set to obtain alignment parameters; calculating the reprojection error of interior points in the anchor point pair set based on the alignment parameters to obtain the alignment error; and calculating the alignment confidence level based on the interior point ratio and alignment error of the anchor point pair set.
[0047] Among them, the coordinates of the drawing tool objects are the real coordinates that can be used for object manipulation and measurement within drawing tools such as CAD (Computer-Aided Design) or PDF (Portable Document Format).
[0048] Recognition coordinates are the image pixel coordinates used when the model performs drawing recognition. Drawing tool object coordinates are the actual coordinates used for object manipulation and geometric measurement within drawing tools such as CAD (Computer-Aided Design) and PDF (Portable Document Format).
[0049] Alignment calculation is a numerical solution process that establishes the mapping relationship between the identification coordinates and the coordinates of the drawing tool object based on the anchor point features.
[0050] Alignment parameters are the correlation coefficients of the transformation model used to achieve coordinate transformation between two types of coordinate systems.
[0051] Alignment error is a statistical result of the deviation caused by the reprojection of anchor points after coordinate mapping is completed.
[0052] Alignment confidence is an indicator used to quantify the reliability of coordinate alignment results.
[0053] Anchor point coordinates are the position coordinates of the anchor point feature in the recognition coordinate system.
[0054] The target coordinates are the actual position coordinates of the anchor point feature in the coordinate system of the drawing tool object.
[0055] An anchor point pair set is a data set composed of mutually matched anchor point coordinates and target coordinates, used for alignment solutions.
[0056] A transformation model is a mathematical model that describes the rules for transforming a recognition coordinate system to the coordinate system of a drawing tool object.
[0057] Reprojection error is the distance deviation between the anchor point coordinates and the target coordinates after the anchor point coordinates are mapped by the alignment parameters.
[0058] Interior points are valid anchor point pairs whose reprojection error does not exceed a preset threshold.
[0059] The interior point ratio is the ratio of the number of interior points in the anchor point pair set to the total number of anchor point pairs.
[0060] For example, the anchor point coordinates corresponding to each anchor point feature in the recognition coordinate system are located and extracted from the preprocessed drawing data. The target coordinates of each anchor point feature in the drawing tool object coordinate system are obtained through the drawing tool's automated interface. The matching anchor point coordinates are combined with the target coordinates to construct an anchor point pair set. Based on the drawing deformation type, transformation models such as similarity transformation, affine transformation, or homography transformation are selected. The RANSAC robust estimation algorithm is used to randomly select the minimum number of anchor point pairs from the anchor point pair set to estimate candidate transformation parameters. The reprojection error is calculated for all anchor point pairs, and interior points are filtered. After multiple iterations, the candidate transformation with the most interior points and the best residual is selected. The final alignment parameters are obtained through least-squares fitting. Back-projection calculations are performed on all anchor point pairs using the alignment parameters. The mean or maximum value of the interior point reprojection error is statistically analyzed to determine the alignment error. Combining the interior point ratio of the anchor point pair set with the alignment error value, the alignment confidence is calculated according to preset rules.
[0061] For example, the pixel coordinate system in the recognition coordinate system is The coordinate system of the tool object is pixel coordinate system Coordinate system of tool object The mapping relationship can be represented as a segmented mapping link, such as:
[0062] in, It is a pixel coordinate system, which is the coordinate reference used by the drawing recognition model when extracting features such as anchor points and fields at the image level. The unit is pixels. The tool viewport coordinate system, also known as the window / viewport coordinate system, is the screen coordinate reference used by drawing tools (such as CAD software) when presenting drawings in the display interface. It is used to describe the display position after the view is zoomed, translated, or rotated. It is the tool object coordinate system, also known as the CAD world coordinate system or object space coordinate system. It is the real physical coordinate reference used inside the drawing tool to store, operate, and measure the geometric objects of the drawing. It is the original design coordinate of the drawing. It is a transformation matrix from the recognition coordinate system to the tool viewport coordinate system, used to map image pixel coordinates to tool viewport display coordinates, and characterizes the coordinate transformation relationship brought about by operations such as image rendering, view scaling and translation; It is a transformation matrix from the tool viewport coordinate system to the tool object coordinate system. It is used to map the tool viewport display coordinates to the real-world coordinates inside the tool and represents the transformation relationship from the viewport display state to the original design coordinates of the drawing. It is the total transformation matrix from the recognition coordinate system to the tool object coordinate system. It is a composite result of two-level piecewise transformations and can directly convert the image pixel coordinates into the real coordinates of the tool object for subsequent positioning, selection and measurement of drawing objects. It is a transformation compound operator used to indicate the sequential concatenation of two transformation matrices, i.e., the operation is performed first. Transform, then execute The transformation ultimately yields the total transformation. .
[0063] In other implementations, the total transformation can also be estimated directly. No need for step-by-step solution (i.e., first perform the transformation to the viewport). Then perform the viewport to object transformation. This plan does not impose any restrictions.
[0064] Furthermore, to solve the alignment transformation, we construct a set of anchor point pairs, which can be represented as:
[0065] in, It is the coordinate of the k-th anchor point in the recognition coordinate system; It is the target coordinate of the k-th anchor point in the tool viewport coordinate system or the object coordinate system, which can be... or , The i-th anchor point in the tool object coordinate system The coordinates below, that is, the CAD world coordinates / object space coordinates obtained through the drawing tool interface; The i-th anchor point in the tool viewport coordinate system The coordinates below, that is, the viewport coordinates displayed in the drawing tool window; i It is the sequence number of the anchor pair, used to identify the first anchor pair in the set. i The anchor point coordinates are one-to-one; x is a repeatable two-dimensional point or structural feature, including title bar corner points, table intersections, vector text border corner points, long line intersections, symbol box corner points, etc.
[0066] Furthermore, an appropriate transformation model can be selected based on the type of deformation of the drawing (such as transformation from pixel coordinates to tool viewport coordinates, or transformation from pixel coordinates to tool object coordinates). Transformation models include, but are not limited to, similarity transformation, affine transformation, or homography transformation. The selection of the transformation model can be automatically determined based on rendering parameters (state parameters recorded during the generation and display of the drawing image, such as rendering resolution, scaling ratio, etc.) or viewport metadata (metadata recorded in the drawing tool regarding the view state, such as viewport scaling ratio, rotation angle, etc.), or it can be specified through manual configuration, and is not limited to these methods.
[0067] If the RANSAC algorithm is used to iteratively estimate the optimal transform, in each iteration, the minimum number of anchor point pairs are randomly selected from the set of anchor point pairs to estimate a candidate transform T. Then, the residuals are calculated for all anchor point pairs; that is, after mapping the image coordinates to the target coordinate system through the candidate transform T, the Euclidean distance between the mapped coordinates and the corresponding target coordinates is calculated as the residual for that anchor point pair. If the residual does not exceed a threshold τ, the anchor point pair is determined to be an inlier. This iteration is repeated until the preset maximum number of iterations K is reached or the termination condition is met. The candidate transform with the most inliers is selected as the optimal transform T*. When multiple candidate transforms have the same number of inliers, the candidate transform with the smaller residual statistic is preferred. A refined fitting (least squares or weighted least squares) is performed on the inlier set corresponding to the optimal transform T* to obtain the final transform T_final.
[0068] An alignment failure judgment mechanism can also be set. If the number of interior points of the optimal transformation T* is less than the preset minimum number of interior points M, or if a stable set of interior points and transformation parameters cannot be obtained within K iterations, the alignment result will be marked as unreliable, triggering subsequent enhancement or entering the manual fallback process.
[0069] The alignment error, obtained from the statistics of interior point reprojection errors, can be expressed as:
[0070] Where e is the alignment error; For sets I Take the median of all elements in the matrix; I It is the set of interior anchor pairs obtained through RANSAC filtering; It is the true coordinate vector of the target coordinate system (tool object coordinate system / viewport coordinate system) corresponding to the i-th interior point; The optimal transformation model (similarity transformation / affine transformation / homography transformation) is used to map image coordinates to the target coordinate system; It is the image coordinate vector in the pixel coordinate system corresponding to the i-th interior point; It is the L2 norm (Euclidean distance).
[0071] Taking into account both the proportion of inliers and the error level, the alignment confidence score can be calculated as follows:
[0072] in, The alignment confidence level is used to comprehensively evaluate the reliability of the coordinate alignment results. I represents the number of elements in the set of interior anchor pairs (i.e., the total number of valid interior points); N represents the total number of anchor pairs in the initial input. The ratio of interior points reflects the matching quality of anchor point pairs and the adaptability of the transformation model. This is an error penalty term used to quantify the impact of alignment error on confidence level; These are configurable parameters.
[0073] S204. Based on the alignment confidence and alignment error, perform quality verification and iterative optimization on the alignment parameters until the preset alignment quality requirements are met or the preset exit conditions are triggered, and obtain the qualified alignment parameters.
[0074] One possible approach is to determine the current alignment parameter as the qualified alignment parameter when the alignment confidence is not lower than a preset threshold and the alignment error does not exceed a preset threshold; when the alignment confidence is lower than a preset threshold or the alignment error exceeds a preset threshold, the anchor point features are re-extracted and the alignment calculation is re-executed until the preset alignment quality requirements are met or the preset exit condition is triggered, thus obtaining the qualified alignment parameter.
[0075] Among them, quality verification is a process of judging and filtering the alignment effect based on a preset threshold.
[0076] The alignment parameters are coordinate transformation parameters that have passed quality verification and meet the requirements for stable use.
[0077] The preset threshold is a critical value pre-configured by the system to determine whether the alignment confidence level is qualified.
[0078] The preset threshold is a critical value that the system pre-sets to limit the maximum allowable value of alignment error.
[0079] The exit condition is a termination rule pre-configured by the system to terminate the self-calibration process.
[0080] Alignment quality requirements are comprehensive standards pre-set by the system to determine whether the alignment results are acceptable.
[0081] For example, the alignment confidence and alignment error can be read first, and the system's preset thresholds (such as confidence thresholds) and preset limits (such as error limits) can be retrieved as judgment benchmarks. Further, the alignment confidence is compared with the preset thresholds, and the alignment error is compared with the preset limits. Based on the comparison results, it is determined whether the current alignment result meets the usage conditions. When the alignment confidence is not lower than the preset threshold and the alignment error does not exceed the preset limit, the current alignment parameters are directly determined as compliant alignment parameters. When the alignment confidence is lower than the preset threshold or the alignment error exceeds the preset limit, the self-calibration process is automatically started. The anchor point features are re-extracted from the drawing data, and the alignment calculation from the identification coordinate system to the drawing tool object coordinate system is performed again. The new alignment parameters, alignment error, and alignment confidence are updated. The quality verification and self-calibration operations are performed in a loop until the alignment result meets the preset alignment quality requirements or the preset exit condition is triggered, at which point the process is terminated. Finally, compliant alignment parameters that can be used for subsequent coordinate mapping are output.
[0082] For example, based on alignment error and alignment confidence, the alignment quality is gating and configurable thresholds are set (such as low confidence threshold, pass threshold, upper limit of error, target error); when the alignment confidence is greater than or equal to the pass threshold and the alignment error is less than or equal to the target error, it is determined that the preset alignment quality requirements are met and the qualified alignment parameters are obtained. When the alignment confidence is less than the low confidence threshold, or the alignment error is greater than the upper limit of the error, the self-calibration process is automatically triggered, that is, the anchor point features are re-extracted and the alignment calculation is re-executed.
[0083] The self-calibration process selectively executes enhancement actions according to a preset strategy, then re-solves the alignment and updates the alignment parameters and quality indicators until the alignment meets the standards or the termination condition is triggered. The enhancement actions include, but are not limited to, rendering-side enhancements (such as increasing DPI, multi-scale re-rendering, and adjusting clipping boundaries), anchor-side enhancements (such as switching vector / raster anchor source, increasing anchor density, and strengthening consistency screening), tool-side enhancements (such as repositioning the viewport, switching views, adjusting layer visibility or snapping mode), and lightweight manual calibration (such as manually providing a small number of high-confidence anchor pairs for constraint solving).
[0084] When a stable alignment cannot be achieved even after reaching the maximum number of iterations or the resource budget limit, the output review task enters the manual fallback process. The review task includes at least the current alignment parameters and quality indicators, records of the self-calibration strategies that have been tried, and information on the suggested manual calibration areas or points to improve the efficiency and traceability of subsequent processing.
[0085] S205. Based on the alignment parameters, perform coordinate mapping on the structured candidate set to obtain the positioning target.
[0086] Coordinate mapping is a computational process that transforms one type of coordinate system into another based on alignment parameters.
[0087] After the target is located and mapped to coordinates, the target location information can be directly selected and measured in the drawing tools.
[0088] For example, first, the alignment parameters and the structured candidate set are read, with the alignment parameters used as the basis for coordinate transformation. Then, each candidate in the structured candidate set is traversed, extracting the anchor point region or position information in the corresponding recognition coordinate system. The extracted recognition coordinates are then transformed using the alignment parameters, mapping the position information from the recognition coordinate system to the drawing tool object coordinate system. The mapped coordinate information is then standardized and validated to ensure the transformed position can be correctly recognized and manipulated by the drawing tool. Finally, all valid position information that has undergone coordinate transformation is integrated and encapsulated to form a positioning target that can be directly used for subsequent tool positioning and measurement operations.
[0089] S206. The control drawing tool performs positioning and measurement on the positioning target to generate deterministic evidence objects.
[0090] One possible approach is to adjust the viewport state based on the positioning target control drawing tool, and perform object selection and geometric measurement operations on the positioning target; obtain the object identifier, tool-side measurement results, and viewport state record corresponding to the positioning target; and encapsulate the object identifier, tool-side measurement results, viewport state record, and alignment parameters to obtain a deterministic evidence object.
[0091] Among them, the drawing tool is an interactive software and automated interface system that can perform display, selection, measurement, and export operations on industrial drawings.
[0092] Positioning is the operation of precisely pointing to a target object in the drawing tools based on coordinate information.
[0093] Measurement is the process of reading numerical values and performing geometric calculations on a target object using drawing tools.
[0094] The definitive evidence object is a credible data carrier generated by the drawing tool and can be used for review, tracing, and playback.
[0095] Viewport status is the overall configuration information for view zooming, panning, rotation, layer visibility, and snapping mode in drawing tools.
[0096] Object selection is the action of selecting the target geometric entity and obtaining operation permissions in the drawing tools.
[0097] Geometric measurement is the process by which drawing tools perform numerical calculations such as length, angle, and radius on a target object based on built-in algorithms.
[0098] An object identifier is an index that can uniquely and stably identify a target object in drawing tools.
[0099] The measurement results from the tool side are the actual geometric values and unit information directly output by the drawing tool.
[0100] The viewport state record is a set of parameters used to reproduce the view environment.
[0101] The alignment parameter is a transformation coefficient that enables the mapping and conversion between the recognition coordinates and the tool object coordinates.
[0102] Encapsulation is the process of integrating multiple types of evidence information into standardized data objects according to a unified structure.
[0103] For example, based on the alignment parameters, the identification anchor points or regions (such as bounding boxes, directed bounding boxes, and regions of interest) of candidate objects in the structured candidate set can be mapped to the viewport coordinate system and object coordinate system of the drawing tool. This allows control of the tool's viewport state (including zooming, panning, rotation, view switching, layer visibility, and snapping mode) to obtain a reproducible viewport state record. For each positioning target, the system executes one or more tool actions within the drawing tool, including but not limited to object selection, geometric measurement, local vector export, and screenshot verification.
[0104] Among these, object selection is used to obtain a stable object identifier, which may include one or more combinations of object identifier, selection path, geometric fingerprint, or local export reference, to ensure that subsequent operations can point to the same geometric entity; geometric measurement is used to obtain deterministic measurement results on the tool side, including numerical values, units, measurement types, and object reference information; local vector export is used to form local vector evidence that can be verified offline, such as DXF (Drawing Exchange Format), SVG (Scalable Vector Graphics), or PDF (Portable Document Format) fragment references and their hash values; screenshot or rendering evidence is used to form irrefutable visual evidence, such as screenshot hash or rendering hash.
[0105] The system encapsulates the above information into deterministic evidence objects and associates them with corresponding candidate objects, pages, views, or region references. Each deterministic evidence object includes at least drawing reference information (such as pages, views, or regions), viewport status records, alignment parameters and version information, object identifiers, and at least one of the following: measurement results, local exported references, or screenshot fingerprints. This ensures that the evidence is replayable, auditable, and can be directly used for subsequent binding relationship diagram construction and constraint detection. The final output is a deterministic evidence object that is one-to-one or many-to-many associated with the structured candidate set, serving as input for subsequent binding relationship diagram construction and constraint detection.
[0106] S207. Construct a binding relationship graph based on the structured candidate set and the deterministic evidence objects, and perform consistency constraint detection on the binding relationship graph to obtain the constraint detection results.
[0107] One possible approach involves using fields, corresponding geometric features, and leaders from a structured candidate set as nodes, and the binding relationships between fields and geometric features as edges. Deterministic evidence objects are then attached to the corresponding nodes or edges to construct a binding relationship graph. Geometric consistency, dimensional chain closure, Bill of Materials (BOM) consistency, cross-page consistency, or cross-view consistency are then applied to the binding relationship graph. Figure 1 At least one constraint in the consistency test is performed to obtain the constraint test result.
[0108] Among them, the binding relationship graph is a data organization form that expresses the relationship between fields and geometric objects in the form of a graph structure.
[0109] Consistency constraint detection is a detection behavior that performs rationality verification and conflict determination on the binding relationship graph.
[0110] The constraint detection result is a judgment conclusion that characterizes whether the binding relationship matches the actual information in the drawing.
[0111] Fields are text or numerical information extracted from drawings that have clear engineering meaning.
[0112] Geometric features are graphic elements in drawings that possess geometric attributes, such as lines, symbols, and outlines.
[0113] Leader lines are indicator lines in drawings used to link text with corresponding geometric objects.
[0114] Nodes are the basic units that form a binding relationship graph to carry information.
[0115] An edge is a connecting unit in a binding graph used to express the relationship between nodes.
[0116] A binding relationship is an attribution indication connection between a field and its corresponding geometric object.
[0117] Mounting is the operation of associating a deterministic evidence object with a corresponding node or edge in the binding relationship graph.
[0118] Geometric consistency is a set of constraints that ensure that field values match the geometric data measured by the tool.
[0119] Dimension chain closure is a constraint rule that the chain of numerical values formed by dimension annotations must satisfy the requirement of closed calculation.
[0120] Bill of Materials (BOM) consistency is a constraint rule that ensures that the information in the BOM is consistent with the information marked on the drawings.
[0121] Cross-page consistency is a constraint rule that ensures that information about the same object remains consistent across different pages of drawings.
[0122] Cross-view Figure 1 Consistency is a constraint rule that ensures that information about the same object remains consistent across different view drawings.
[0123] The constraint detection result is a judgment conclusion that characterizes whether the binding relationship matches the actual information in the drawing.
[0124] For example, a structured candidate set and deterministic evidence objects are read. The geometric features corresponding to the fields in the structured candidate set, as well as the leading lines, are used as nodes in a binding relationship graph. The binding relationships between fields and geometric features are set as edges in the graph. Then, each deterministic evidence object is associated with and attached to a matching node or edge, completing the association and integration of nodes, edges, and evidence to construct a complete binding relationship graph. Furthermore, multi-dimensional constraint checks are performed on the binding relationship graph according to preset rules, sequentially performing geometric consistency checks, dimensional chain closure checks, BOM consistency checks, cross-page consistency checks, or cross-view checks. Figure 1 At least one of the consistency checks involves traversing all nodes and edges of the binding relationship graph during the check process, comparing the field information with the actual measurement data in the evidence object, determining whether there is a conflict or contradiction between the two, summarizing the judgment conclusion based on the execution of all check items, and finally generating a constraint detection result to characterize whether the binding relationship is legal and valid.
[0125] One possible approach involves using fields, corresponding geometric features, and leaders from a structured candidate set as nodes, and the binding relationships between fields and geometric features as edges. Deterministic evidence objects are then attached to the corresponding nodes or edges to construct a binding relationship graph. Node types include at least one of field nodes, geometric feature nodes, leader nodes, bill of materials (BOM) nodes, or note nodes; edge types include at least one of binding relationship edges, derived relationship edges, leader relationship edges, or adjacent relationship edges. Geometric consistency, dimensional chain closure, BOM consistency, cross-page consistency, or cross-view consistency are applied to the binding relationship graph. Figure 1 At least one constraint in the consistency test is performed to obtain the constraint test result.
[0126] S208. When the constraint detection result is "fail", execute the minimum cost action sequence to update the structured candidate set and the deterministic evidence object, and complete the closed-loop error correction.
[0127] One possible approach is to locate the conflict subgraph in the binding relationship graph; execute the minimum cost sequence of retesting, rebinding, re-extraction, or realignment in order of increasing cost; and update the structured candidate set, deterministic evidence objects, and binding relationship graph based on the execution results to complete closed-loop error correction.
[0128] Among them, the least cost action sequence is a combination of automated repair operations sorted from low to high execution cost.
[0129] Closed-loop error correction is a complete process that uses automated repair to ensure that the identification results are consistent with the evidence provided by the tools.
[0130] A conflict subgraph is a local substructure in a binding relationship graph where there are constraint conflicts or data inconsistencies.
[0131] Re-measurement is the operation of re-invoking the drawing tools to perform measurements on the target object to obtain the latest evidence.
[0132] Rebinding is the operation of re-establishing the correspondence between fields and geometric objects.
[0133] Re-extraction involves re-performing the identification and field extraction operations on the drawing area.
[0134] Realignment is an operation that re-executes coordinate mapping and alignment calculations to correct positioning deviations.
[0135] An update is a process that replaces existing data with newly generated data while maintaining consistent relationships.
[0136] The structured candidate set is a collection of field information data to be verified, extracted from drawing recognition and organized in a uniform format.
[0137] The definitive evidence object is a credible data carrier generated by the drawing tool and can be used for review, tracing, and playback.
[0138] A binding diagram is a data organization form that uses a graph structure to express the relationships between fields and geometric objects.
[0139] For example, after determining that the constraint detection result is unsuccessful, the system traverses nodes and edges in the binding relationship graph and locates local areas with data conflicts, extracting and determining the conflict subgraph. Repair operations such as retesting, rebinding, re-extraction, and realignment are sorted according to their execution cost from low to high based on a preset cost function, forming a sequence of actions with the lowest cost. The system executes each repair action in the sequence sequentially. First, it retests the conflicting objects; if the constraints are still not met, it rebinds them; if this still fails, it continues with re-extraction or realignment. After each action is completed, the system regenerates the identification data and tool evidence based on the latest operation results, synchronously updates the structured candidate set, deterministic evidence objects, and binding relationship graph, and performs constraint verification again. The system continues to execute the above actions until the constraint detection passes, ultimately achieving closed-loop error correction that aligns the identification results with the engineering evidence.
[0140] In its implementation, the system locates conflict subgraphs in the binding relationship graph, plans the action sequence with the minimum cost from a preset action set based on the action cost function, and executes it until constraint detection is passed or a termination condition is triggered. The action set includes at least one of retesting, rebinding, re-extraction, re-alignment, or manual calibration; the action cost is calculated by weighting time cost, computing power cost, and interaction cost. The system updates the structured candidate set, deterministic evidence objects, and binding relationship graph based on the execution results, completing closed-loop error correction.
[0141] S209. Encapsulate the corrected structured candidate set and the deterministic evidence object to obtain the corrected structured result, evidence chain, and replayable data.
[0142] One possible approach is to encapsulate the corrected structured candidate set into a structured result; integrate deterministic evidence objects, alignment parameters, and viewport state records into an evidence chain; and generate reproducible playback records based on the evidence chain and the correction process to determine replayable data.
[0143] Among them, the structured candidate set after error correction is a set of fields and numerical information that have passed the closed-loop error correction verification.
[0144] The definitive evidence object is a credible data carrier generated by the drawing tool and can be used for review, tracing, and playback.
[0145] Encapsulation is the process of integrating multiple types of data into a standardized output object according to a unified specification.
[0146] The structured results are final data from drawing parsing that can be directly used by downstream systems.
[0147] A chain of evidence is a complete tracing basis composed of multiple types of credible evidence arranged logically.
[0148] Playbackable data is recorded information that allows the entire critical operation process to be reproduced in a compatible environment.
[0149] The alignment parameter is a transformation coefficient that enables the mapping and conversion between the recognition coordinates and the tool object coordinates.
[0150] The viewport state record is a set of parameters used to reproduce the view environment.
[0151] The error correction process is the entire operational trajectory from conflict detection to the completion of repair.
[0152] Playback records are sequences of instructions and states that can reproduce key steps such as positioning, measurement, verification, and error correction.
[0153] For example, the structured candidate set that has passed closed-loop error correction and constraint detection is first organized and packaged according to a preset format to form a structured result that can be directly delivered for use. Deterministic evidence objects, alignment parameters, and viewport status records are integrated and associated according to traceability logic to form an evidence chain containing complete operational and verification basis. Based on the content of the evidence chain and the operation trajectory of the entire error correction process, key step instructions and status information are extracted to generate playback records that can be reproduced in compatible drawing tools for positioning, measurement, verification, and error correction operations. Finally, replayable data is determined and output. After completing the above packaging and integration operations, the structured result evidence chain and replayable data are output simultaneously, realizing the traceability, verifiability, and reproducibility of industrial drawing recognition results.
[0154] In its implementation, the system encapsulates the corrected structured candidate set into a structured result; integrates deterministic evidence objects, alignment parameters, and viewport state records into an evidence chain; and generates reproducible playback records based on the evidence chain and the error correction process, thus determining replayable data. This replayable data includes playback scripts or command sequences and verification reports, used to reproduce key operations such as positioning, measurement, verification, and error correction in a compatible environment. The system ultimately outputs the structured result, the evidence chain, and the replayable data as auditable deliverables.
[0155] Based on the above, the industrial drawing recognition and correction method effectively improves the data quality of the original drawings and eliminates interference from noise and format differences by performing preprocessing operations such as format verification, integrity checks, multi-scale rendering, noise reduction and enhancement, and object mapping relationship establishment. This step ensures that the system can run stably on drawings of different types and sources, improving the overall robustness and versatility of the processing.
[0156] Through layout analysis and target detection, important information such as title blocks, detail areas, text, lines, and symbols are accurately located and extracted from drawings, forming a structured candidate set that includes field types, field values, identification anchors, and confidence levels. This step transforms unstructured drawing images or vector data into a standardized data format that can be efficiently processed by computers, significantly improving the accuracy and operability of information extraction.
[0157] By utilizing repeatable anchor point features in the drawings (such as title block corners, table intersections, vector text borders, etc.), a mapping relationship is constructed between the recognition coordinate system and the coordinate system of the drawing tool object. A robust estimation algorithm is then used to solve the transformation model, and the alignment error and confidence index are output simultaneously. This step achieves precise alignment between the recognition result and the actual coordinates of the tool, effectively solving the technical problem of inconsistency between image recognition coordinates and actual engineering coordinates.
[0158] By gating alignment confidence and alignment error, the system automatically identifies scenarios where alignment quality fails to meet standards and triggers a self-calibration process (including rendering enhancement, anchor point enhancement, tool enhancement, or lightweight manual calibration) until preset quality requirements are met or exit conditions are triggered. This step introduces a closed-loop quality control mechanism to ensure the reliability and stability of alignment parameters, reduce the risk of subsequent positioning and measurement errors caused by alignment deviations, and improve the system's adaptability and delivery quality in complex drawing scenarios.
[0159] By utilizing the qualified alignment parameters that have passed quality verification, the identification coordinates (such as anchor point areas and field positions) in the structured candidate set are uniformly mapped to the coordinate system of the drawing tool object, forming a precise positioning target that can be directly identified and manipulated by the drawing tool. This step achieves a seamless conversion from identification results to executable tool instructions, ensuring the accuracy and repeatability of tool-side operations.
[0160] Based on the positioning target, the control drawing tools adjust the viewport state, perform operations such as object selection, geometric measurement, local vector export, and screenshot evidence collection, and encapsulate the object identifier, measurement results, viewport state record, and alignment parameters into a deterministic evidence object. This step, through a "tool-in-the-loop" approach, substantially binds the identification results to the actual geometric objects within the drawing tools, generating traceable, reproducible, and auditable credible evidence.
[0161] Using fields, geometric features, and leaders in the structured candidate set as nodes, and the relationships between fields and geometric objects as edges, deterministic evidence objects are attached to the corresponding nodes or edges to construct a complete binding relationship graph. Geometric consistency, dimensional chain closure, bill of materials consistency, and cross-page or cross-view consistency are then performed on this graph. Figure 1 Multi-dimensional constraint detection, including consistency, is performed. This step enables systematic modeling and global verification of the relationship between drawing recognition results and real data on the tool side, efficiently identifying inconsistencies or conflicts.
[0162] When constraint detection fails, the conflict subgraph is located, and a sequence of minimum-cost actions (such as retesting, rebinding, re-extraction, re-alignment, or manual calibration) is planned from low to high according to the cost function. Repair operations are executed sequentially, and the structured candidate set, deterministic evidence objects, and binding relationship graph are updated simultaneously until the constraint passes or the termination condition is triggered. This step achieves automatic alignment and repair of the identification results and engineering evidence at minimal cost, forming a complete closed-loop error correction mechanism. This effectively reduces the cost of manual intervention and improves overall processing efficiency and result reliability.
[0163] The corrected, qualified structured candidate set is encapsulated into a standardized structured result. Deterministic evidence objects, alignment parameters, and viewport status records are integrated into a complete chain of evidence. Reproducible playback records (such as playback scripts or command sequences) are generated based on the error correction process. This step ultimately outputs auditable, traceable, and reproducible deliverables, providing highly reliable structured data to downstream systems. It also provides comprehensive technical support for quality review, problem localization, and process backtracking, enhancing the system's transparency and reliability. Ultimately, this achieves highly reliable closed-loop error correction for drawing recognition results.
[0164] The above text combined Figures 1 to 2The industrial drawing recognition and error correction method provided in the embodiments of this application has been described in detail. The apparatus and equipment provided in the embodiments of this application will be described below with reference to the accompanying drawings.
[0165] This application also provides an industrial drawing recognition and error correction device, such as... Figure 3 As shown in the figure, this is a schematic diagram of an industrial drawing recognition and error correction device provided in an embodiment of this application. The device includes: The drawing recognition module 301 is used to acquire industrial drawings and preprocess them to obtain preprocessed drawing data; based on the drawing data, it performs recognition and extraction to generate a structured candidate set; according to the anchor point features in the drawing data, it performs alignment calculations between the recognized coordinates and the coordinates of the drawing tool object to obtain alignment parameters, alignment error, and alignment confidence; based on the alignment confidence and alignment error, it performs quality verification and iterative optimization of the alignment parameters until the preset alignment quality requirements are met or the preset exit conditions are triggered to obtain the qualified alignment parameters; The coordinate mapping module 302 is used to perform coordinate mapping on the structured candidate set according to the alignment parameters to obtain the positioning target; control the drawing tool to perform positioning and measurement on the positioning target to generate a deterministic evidence object; construct a binding relationship diagram based on the structured candidate set and the deterministic evidence object, and perform consistency constraint detection on the binding relationship diagram to obtain the constraint detection result; The error correction module 303 is used to execute a minimum cost action sequence to update the structured candidate set and the deterministic evidence object when the constraint detection result is unsuccessful, thereby completing the closed-loop error correction; the error-corrected structured candidate set and the deterministic evidence object are encapsulated to obtain the error-corrected structured result, evidence chain and replayable data.
[0166] In some possible implementations, the drawing recognition module 301 is specifically used for: When the alignment confidence is not lower than the preset threshold and the alignment error does not exceed the preset threshold, the current alignment parameter is determined as the qualified alignment parameter; when the alignment confidence is lower than the preset threshold or the alignment error exceeds the preset threshold, the anchor point features are re-extracted and the alignment calculation is re-executed until the preset alignment quality requirements are met or the preset exit condition is triggered, and the qualified alignment parameter is obtained.
[0167] In some possible implementations, the drawing recognition module 301 is specifically used for: The anchor point coordinates in the recognition coordinate system are extracted from the drawing data, and the corresponding target coordinates in the drawing tool object coordinate system are obtained through the drawing tool interface. An anchor point pair set is constructed based on the anchor point coordinates and the target coordinates. The transformation model from the recognition coordinate system to the drawing tool object coordinate system is solved based on the anchor point pair set to obtain the alignment parameters. The reprojection error of the interior points in the anchor point pair set is calculated based on the alignment parameters to obtain the alignment error. The alignment confidence is calculated based on the interior point ratio and alignment error of the anchor point pair set.
[0168] In some possible implementations, the coordinate mapping module 302 is specifically used for: Based on the positioning target, the control drawing tool adjusts the viewport state and performs object selection and geometric measurement operations on the positioning target; obtains the object identifier, tool-side measurement results, and viewport state record corresponding to the positioning target; encapsulates the object identifier, tool-side measurement results, viewport state record, and alignment parameters to obtain the deterministic evidence object.
[0169] In some possible implementations, the coordinate mapping module 302 is specifically used for: Using fields, corresponding geometric features, and leaders from the structured candidate set as nodes, and the binding relationships between fields and geometric features as edges, deterministic evidence objects are attached to the corresponding nodes or edges to construct a binding relationship graph. Geometric consistency, dimensional chain closure, Bill of Materials (BOM) consistency, cross-page consistency, or cross-view consistency are then applied to the binding relationship graph. Figure 1 At least one constraint in the consistency test is performed to obtain the constraint test result.
[0170] In some possible implementations, the error correction module 303 is specifically used for: Locate the conflict subgraph in the binding relationship graph; execute the minimum cost sequence of retesting, rebinding, re-extraction, or realignment in order of cost from low to high; update the structured candidate set, deterministic evidence objects, and binding relationship graph based on the execution results to complete closed-loop error correction.
[0171] In some possible implementations, the error correction module 303 is specifically used for: The corrected structured candidate set is encapsulated into a structured result; the deterministic evidence objects, alignment parameters, and viewport state records are integrated into an evidence chain; and reproducible playback records are generated based on the evidence chain and the error correction process to determine the replayable data.
[0172] The industrial drawing recognition and error correction device according to the embodiments of this application can correspondingly execute the method described in the embodiments of this application, and the other operations and / or functions of each module / unit of the industrial drawing recognition and error correction device are respectively for implementing Figure 2 For the sake of brevity, the corresponding processes of each method in the illustrated embodiments will not be described in detail here.
[0173] This application also provides a computing device. For example... Figure 4 As shown in the figure, this is a schematic diagram of a computing device provided in an embodiment of this application. The computing device 400 includes a bus 401, a processor 402, a communication interface 403, and a memory 404. The processor 402, the memory 404, and the communication interface 403 communicate with each other via the bus 401.
[0174] Bus 401 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0175] Processor 402 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).
[0176] Communication interface 403 is used for communication with external devices.
[0177] Memory 404 may include volatile memory, such as random access memory (RAM). Memory 404 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0178] The memory 404 stores executable code, and the processor 402 executes the executable code to perform the aforementioned industrial drawing recognition and error correction method.
[0179] Specifically, in achieving Figure 3 In the case of the illustrated embodiment, and Figure 3 When the modules or units of the industrial drawing recognition and error correction device described in the embodiment are implemented by software, the following steps are performed: Figure 3 The software or program code required for the functions of each module / unit can be partially or entirely stored in memory 404. Processor 402 executes the program code corresponding to each unit stored in memory 404 to perform the aforementioned industrial drawing recognition and error correction method.
[0180] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the aforementioned industrial drawing recognition and error correction method.
[0181] This application also provides a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application are generated.
[0182] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center via wired (e.g., coaxial cable, fiber optic) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0183] When the computer program product is executed by a computer, the computer performs any of the aforementioned industrial drawing recognition and error correction methods. The computer program product can be a software installation package; when any of the aforementioned industrial drawing recognition and error correction methods needs to be used, the computer program product can be downloaded and executed on the computer.
[0184] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.
[0185] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the scope of protection of this application.
Claims
1. A method for industrial drawing recognition and error correction, characterized in that, The method includes: Acquire industrial drawings and preprocess them to obtain preprocessed drawing data; Based on the drawing data, an identification and extraction process is performed to generate a structured candidate set; Based on the anchor point features in the drawing data, the alignment of the identified coordinates with the coordinates of the drawing tool object is calculated to obtain the alignment parameters, alignment error, and alignment confidence. Based on the alignment confidence and alignment error, the alignment parameters are subjected to quality verification and iterative optimization until the preset alignment quality requirements are met or the preset exit conditions are triggered, so as to obtain the qualified alignment parameters. Based on the alignment parameters, the structured candidate set is mapped to coordinates to obtain the positioning target; The control drawing tools perform positioning and measurement on the positioning target to generate deterministic evidence objects; A binding relationship graph is constructed based on the structured candidate set and the deterministic evidence objects, and consistency constraint detection is performed on the binding relationship graph to obtain the constraint detection results; When the constraint detection result is failure, execute the minimum cost action sequence to update the structured candidate set and the deterministic evidence object to complete the closed-loop error correction; The corrected structured candidate set and the deterministic evidence object are encapsulated to obtain the corrected structured result, evidence chain and replayable data.
2. The method according to claim 1, characterized in that, The process of performing quality verification and iterative optimization on the alignment parameters based on the alignment confidence and alignment error until the preset alignment quality requirements are met or the preset exit condition is triggered, to obtain qualified alignment parameters, includes: When the alignment confidence is not lower than a preset threshold and the alignment error does not exceed a preset threshold, the current alignment parameter is determined as the compliant alignment parameter. When the alignment confidence is lower than a preset threshold or the alignment error exceeds a preset threshold, the anchor point features are re-extracted and the alignment calculation is re-executed until the preset alignment quality requirements are met or the preset exit condition is triggered, and the qualified alignment parameters are obtained.
3. The method according to claim 1, characterized in that, The step of aligning the identified coordinates with the coordinates of the drawing tool object based on the anchor point features in the drawing data to obtain alignment parameters, alignment error, and alignment confidence includes: Extract the anchor point coordinates in the identification coordinate system from the drawing data, and obtain the corresponding target coordinates in the drawing tool object coordinate system through the drawing tool interface; Based on the anchor point coordinates and the target coordinates, construct a set of anchor point pairs; Based on the set of anchor points, the transformation model from the identification coordinate system to the drawing tool object coordinate system is solved to obtain the alignment parameters; The alignment error is obtained by calculating the reprojection error of the anchor point to the internal points in the set based on the alignment parameters. The alignment confidence is calculated based on the proportion of interior points in the anchor point set and the alignment error.
4. The method according to claim 1, characterized in that, The control drawing tool performs positioning and measurement on the positioning target, generating deterministic evidence objects, including: Based on the positioning target, the control drawing tool adjusts the viewport state and performs object selection and geometric measurement operations on the positioning target; Obtain the object identifier, tool-side measurement results, and viewport status record corresponding to the positioning target; The object identifier, tool-side measurement results, viewport state records, and alignment parameters are encapsulated to obtain the deterministic evidence object.
5. The method according to claim 1, characterized in that, The step of constructing a binding relationship graph based on the structured candidate set and the deterministic evidence objects, and performing consistency constraint detection on the binding relationship graph to obtain the constraint detection result includes: Using the fields, corresponding geometric features, and leads in the structured candidate set as nodes, and the binding relationships between fields and geometric features as edges, the deterministic evidence objects are attached to the corresponding nodes or edges to construct the binding relationship graph. Perform at least one constraint check on the binding relationship diagram, namely geometric consistency, dimension chain closure, bill of materials (BOM) consistency, cross-page consistency, or cross-view consistency, and obtain the constraint check results.
6. The method according to claim 1, characterized in that, The execution of the minimum-cost action sequence to update the structured candidate set and the deterministic evidence object, thereby completing closed-loop error correction, includes: Locate the conflict subgraph in the binding relationship graph; The least-cost sequence of actions, namely retesting, rebinding, re-extraction, or realignment, is executed in order of increasing cost. The structured candidate set, deterministic evidence objects, and binding relationship graph are updated based on the execution results to complete closed-loop error correction.
7. The method according to claim 4, characterized in that, The process of encapsulating the corrected structured candidate set with the deterministic evidence object to obtain the corrected structured result, evidence chain, and replayable data includes: The corrected structured candidate set is encapsulated into a structured result; The aforementioned deterministic evidence objects, alignment parameters, and viewport state records are integrated into a chain of evidence; Based on the aforementioned chain of evidence and error correction process, a reproducible playback record is generated, and replayable data is determined.
8. An industrial drawing recognition and error correction device, characterized in that, The device includes: The drawing recognition module is used to acquire industrial drawings and preprocess them to obtain preprocessed drawing data; based on the drawing data, it performs recognition and extraction to generate a structured candidate set; according to the anchor point features in the drawing data, it performs alignment calculations between the recognized coordinates and the coordinates of the drawing tool object to obtain alignment parameters, alignment error, and alignment confidence; based on the alignment confidence and alignment error, it performs quality verification and iterative optimization on the alignment parameters until the preset alignment quality requirements are met or the preset exit conditions are triggered to obtain the qualified alignment parameters; The coordinate mapping module is used to perform coordinate mapping on the structured candidate set according to the alignment parameters to obtain the positioning target; control the drawing tools to perform positioning and measurement on the positioning target to generate deterministic evidence objects; construct a binding relationship graph based on the structured candidate set and the deterministic evidence objects, and perform consistency constraint detection on the binding relationship graph to obtain the constraint detection results; The error correction module is used to execute a minimum cost action sequence to update the structured candidate set and the deterministic evidence object when the constraint detection result is unsuccessful, thus completing the closed-loop error correction. The corrected structured candidate set and the deterministic evidence object are then encapsulated to obtain the corrected structured result, evidence chain, and replayable data.
9. A computing device, characterized in that, Including memory and processor; The memory stores one or more computer programs, the one or more computer programs including instructions; when the instructions are executed by the processor, the computing device performs the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for performing the method as described in any one of claims 1 to 7.