An industrial drawing recognition method and system based on a vector and visual hybrid mechanism

CN122990743APending Publication Date: 2026-10-27SHANGHAI DERUN CARBONIFEROUS IND INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611254415.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-18
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0003]然而,现有纯视觉工业图纸AI识别方案存在显著的技术缺陷

Benefits of technology

[0015]与现有技术相比,本发明的有益效果是:本发明提供一种基于矢量与视觉混合机制的工业图纸识别方法及系统,解决现有纯视觉方案缺乏空间逻辑约束,识别精度低、不可靠,且依赖行业定制化预训练,通用适配能力弱的问题,具体有益效果如下:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990743A_ABST
    Figure CN122990743A_ABST
Patent Text Reader

Abstract

The application provides an industrial drawing recognition method and system based on a vector and visual hybrid mechanism, and the industrial drawing recognition method based on the vector and visual hybrid mechanism comprises the following steps: inputting a vector file of a drawing, traversing a rule library to trigger keyword matching text primitives, and obtaining label coordinates; generating a precondition package containing a constraint search area, a target feature and a topological verification condition according to the coordinates and a matching rule; rendering a raster image, calling a visual large model to detect only in the constraint area; performing topological verification on candidate results based on vector data, eliminating unqualified items, and outputting a recognition result. Beneficial effects: the open search is converted into a constraint-guided directional recognition, high-precision recognition is realized under zero samples, the defect of pure vision lacking spatial logic is compensated through topological verification, false detection is filtered, the result has a traceable logical evidence chain, and the requirement of auditability is met, and vector text labeling is used as an anchor point to avoid pure visual OCR errors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial drawing recognition technology, and specifically to an industrial drawing recognition method and system based on a hybrid vector and visual mechanism. Background Technology

[0002] With the advancement of industrial digitalization and intelligent safety supervision, the automatic recognition and parsing of massive industrial drawings (such as coal mine engineering plans, chemical P&ID diagrams, and building fire protection facility layout diagrams) has become an essential industry requirement. Current mainstream AI recognition technologies for industrial drawings are based on multimodal vision-language models or object detection models. The technical approach involves: constructing an industry drawing sample library, manually annotating graphic elements and categories, pre-training and fine-tuning a general vision model, and finally deploying it to detect and classify graphic elements. Representative technologies include object detection schemes based on the YOLO series and DETR, as well as recognition schemes based on multimodal vision-language models, which have already been applied in some highly standardized drawing scenarios.

[0003] However, existing pure vision-based AI recognition solutions for industrial drawings have significant technical shortcomings. First, they lack the inherent spatial logic constraints of industrial drawings, leading to low recognition accuracy, high false positive rates, and unreliable results. Multimodal visual models are essentially pattern recognition based on statistical features, lacking a logical understanding of the spatial relationships between graphic elements in the drawing—for example, there is a definite spatial relationship between the text label "water accumulation area" and its corresponding boundary polygon. Pure vision models may recognize the text or graphic individually, but cannot establish the logical connection between them. Second, they rely on industry-customized pre-training and fine-tuning. The diversity of industries and the heterogeneity of cartography make it difficult to establish a universal sample library—the graphic features of coal mine engineering plans and chemical P&ID diagrams differ greatly, and there is a lack of unified drawing standards across industries. Establishing a large-scale annotation sample library for each industry is economically infeasible, resulting in weak universal adaptability and high costs for cross-industry migration. Summary of the Invention

[0004] To address the problems in the prior art, this invention provides an industrial drawing recognition method and system based on a hybrid vector and visual mechanism.

[0005] This invention provides a method for industrial drawing recognition based on a hybrid vector and visual mechanism, comprising the following steps: Step S1: Input the industrial drawing vector file to be identified, read the full amount of drawing data through a compatible vector programming interface, traverse the trigger keyword set in the predefined spatial association constraint rule library, perform keyword matching on the text-type graphic elements in the vector file, and obtain the spatial position coordinates of all matched trigger annotation objects; Step S2: Based on the spatial location coordinates of the hit trigger annotation object and its matching spatial association constraint rules, generate a structured visual recognition precondition package. The precondition package includes at least the constraint search area range, the expected visual features of the target primitive, and the spatial topology verification conditions. Step S3: Render the industrial drawing vector file into a high-resolution raster image, call the large visual model to perform target detection only within each constraint search area, based on the expected visual features, and obtain candidate recognition results; Step S4: Based on the vector data of the industrial drawing vector file, perform spatial topology verification on the candidate recognition results, eliminate candidate results that do not meet the spatial topology verification conditions, and output the final primitive recognition result.

[0006] The present invention is further improved in that, in step S2, the constraint search area is generated by: taking the spatial position of the triggered annotation object as a reference, expanding the constraint search area outward according to the buffer radius preset by the corresponding rule; and merging the overlapping constraint search areas and then performing unified recognition.

[0007] In a further improvement to this invention, in step S3, if the large visual model does not detect a target primitive that matches the expected visual features within the constraint search area, it reverts to the vector programming environment, queries all primitives with matching geometric types within that area, and performs catch-all identification through geometric matching.

[0008] The present invention is further improved by including a step of constructing a spatial association constraint rule base before step S1, specifically as follows: Collect typical industrial drawing samples from the target industry, and have domain experts perform spatial pairing annotation and statistical analysis on the annotations and elements. Summarize the spatial relationships that meet the deterministic requirements of occurrence probability, and store them in the rule base in a hierarchical structure. The rule base supports the inheritance, reuse and cross-industry adaptation of rules.

[0009] The present invention is further improved in step S3, when the constraint search areas corresponding to multiple spatial association constraint rules overlap, joint reasoning is performed by combining the feature constraints of multiple rules, and the identification results of the conflict are arbitrated and resolved according to the credibility weight of the rules.

[0010] The present invention is further improved by including a feedback optimization closed-loop step after step S4: cross-validating the final recognition result with the actual primitive geometric data in the vector file and calculating the recognition accuracy index; for failure cases with accuracy lower than the preset threshold, recording their trigger annotation information, local image and misjudgment reason label, and including them in the rule optimization queue for adjusting rule parameters to continuously improve recognition accuracy.

[0011] The present invention also discloses an industrial drawing recognition system based on a vector and vision hybrid mechanism, including a rule base module, a vector query execution module, a constraint packaging module, an image rendering and recognition calling module, and a topology verification module; The rule base module is used to store predefined spatial association constraint rules. Each rule contains a set of triggering keywords, spatial constraint relationships, and target primitive feature information. The vector query execution module is used to perform keyword matching on the input industrial drawing vector file to be identified, and obtain the spatial coordinates of the matched trigger annotation objects; The constraint packaging module is used to generate a structured visual recognition precondition package based on the spatial location of the triggering annotation object and the matching spatial association constraint rules. The image rendering and recognition module is used to render industrial drawing vector files into high-resolution raster images, and call the large visual model to perform directional target detection within the constrained search area, and output candidate recognition results; The topology verification module is used to perform spatial topology verification on candidate recognition results based on vector data from industrial drawing vector files, eliminate invalid candidate results, and output the final recognition result.

[0012] The invention is further improved by including a rule construction module, which is used to collect typical industrial drawing samples of the target industry, support domain experts to complete annotation-element space pairing annotation and statistical analysis, summarize deterministic spatial relationships and store them in the rule base module in a hierarchical structure.

[0013] The invention is further improved by including a vector fallback recognition module, which is used to fall back to the vector programming environment to query primitives of matching geometric types when the target primitive is not detected in the large visual model, and complete the fallback recognition through geometric matching.

[0014] The present invention is further improved by including a joint reasoning module, which is used to perform joint reasoning by integrating the feature constraints of multiple rules when the constraint search regions corresponding to multiple rules overlap, and to resolve the identification conflict based on the rule credibility weight.

[0015] Compared with existing technologies, the beneficial effects of this invention are as follows: This invention provides an industrial drawing recognition method and system based on a hybrid vector and vision mechanism, solving the problems of existing pure vision solutions lacking spatial logic constraints, having low recognition accuracy and unreliability, and relying on industry-customized pre-training with weak general adaptability. Specific beneficial effects are as follows: 1. Completely eliminates the reliance on pre-training and fine-tuning, achieving high-precision recognition with "zero samples". The spatial constraint rules extracted by vector programming directly guide the visual model for directional recognition, transforming the visual model from "open search" to "directional detection under conditional constraints". High-precision recognition results can be obtained without any industry-labeled samples and model training, and the recognition accuracy is significantly better than pure visual full-image scanning solutions.

[0016] 2. Significantly improved recognition efficiency, meeting real-time image review requirements. The search space of the visual model is significantly compressed from full-image scanning to constrained region-oriented search, resulting in a significant reduction in computational load. The recognition of a single drawing can be completed in a short time, meeting the real-time requirements for immediate review of drawings in security supervision scenarios.

[0017] 3. High versatility, with extremely low relocation costs across industries and mines. The core framework is decoupled from specific industries and mines, and its underlying layer is compatible with multiple mainstream vector programming interfaces and large-scale visual model architectures. It can be directly adapted to the CAD drawing tool stacks and technical environments of different industries without the need for customized development for the drawing environment. When migrating across industries, only domain experts need to summarize the specific rules for the new industry, and the remaining modules can be reused directly without the need for redevelopment or model training. The deployment cycle is short and the cost is low.

[0018] 4. The recognition results have inherent logical interpretability. Each recognition result is associated with the triggering rule ID, trigger annotation text, and constraints, forming a complete recognition logic chain for traceability, which meets the stringent requirements of auditable and traceable AI judgments in security supervision scenarios.

[0019] 5. Form a rule-driven feedback optimization closed loop Each failed identification case is recorded and analyzed, driving continuous fine-tuning of rule parameters to achieve "optimization upon use" rather than static and fixed identification capabilities, and the system accuracy continues to improve with business operations. Attached Figure Description

[0020] To more clearly illustrate the solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram illustrating the principle of an industrial drawing recognition method based on a hybrid vector and visual mechanism according to the present invention. Figure 2 This is a flowchart of an industrial drawing recognition system based on a hybrid vector and visual mechanism according to the present invention. Detailed Implementation

[0022] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having” and any variations thereof in the specification, claims and foregoing description of the drawings are intended to cover non-exclusive inclusion.

[0023] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0025] like Figure 1 As shown, the present invention provides an industrial drawing recognition system based on a hybrid vector and vision mechanism, including a rule base module, a vector query execution module, a constraint packaging module, an image rendering and recognition calling module, a topology verification module, a rule construction module, a vector fallback recognition module, a joint inference module, and a feedback optimization module.

[0026] Rule base module: It is used to store predefined spatial association constraint rules, providing a rule basis for the whole process recognition; each rule contains a set of triggering keywords, spatial constraint relationships and target primitive feature information, which can be uniformly called and read by various modules of the system.

[0027] The rule base module serves as the rule data source for the entire recognition framework. It transforms the implicit spatial relationships in industrial drawings into standardized, callable data, thereby connecting spatial logic with visual recognition. It is the fundamental support for vector-guided visual recognition patterns.

[0028] The rule base module is organized hierarchically in four layers: "industry level - sub-industry level - drawing type level - element type level", supporting rule inheritance, reuse and cross-industry adaptation; each rule is stored in a six-tuple structured format, which includes: trigger keyword set, spatial relationship type, search area parameters, target visual feature description, topology verification conditions, and mutual exclusion conditions.

[0029] The four-layer architecture enables hierarchical management and inheritance reuse of rules. When migrating across industries, only the rule layer corresponding to the industry needs to be added. Core general rules do not need to be rebuilt, which greatly reduces the cost and cycle of cross-industry adaptation. The six-tuple format enables rules to have a unified computer-parsable standard, which facilitates unified reading and execution by various modules and improves the efficiency and standardization of rule processing.

[0030] Vector query execution module: This tool is used to perform multi-dimensional vector queries on the input industrial drawing vector files to be recognized. It traverses the trigger keyword set in the rule base and supports batch retrieval of elements in the vector file according to four conditions: keywords, layers, element type, and spatial range. For text anchor point recognition scenarios, it can match and retrieve all text-type elements such as TEXT, MTEXT, ATTRIB, and DIMENSION to obtain the spatial coordinates of all matched trigger annotation objects.

[0031] This module is compatible with multiple mainstream vector programming interfaces, including but not limited to AutoCADObjectARX / .NETAPI, Teigha / ODA SDK, and ezdxf open-source library, and can adapt to industrial vector drawings in various formats such as DWG / DXF and different CAD environments.

[0032] The vector query execution module leverages the clear and precise positioning of text primitives in a vector environment to quickly extract the spatial coordinates of labeled anchor points, providing a precise spatial reference for subsequent orientation recognition. It does not rely on visual OCR to recognize text, avoiding text recognition errors, and its positioning accuracy and query efficiency are far superior to pure visual solutions.

[0033] Constraint Packaging Module: It is used to generate a structured visual recognition precondition package based on the spatial location of the triggered annotation object and the matching spatial association constraint rules; the precondition package contains at least three types of core information: the range of the constraint search area, the expected visual features of the target primitive, and the spatial topology verification conditions.

[0034] The constraint packaging module serves as an intermediate conversion between the vector environment and the visual model, transforming vector coordinates and spatial rules into directional recognition instructions that the visual model can parse. This achieves a standardized mapping from "vector space constraints" to "visual recognition conditions," making it the core intermediate layer component of the hybrid mechanism.

[0035] Image rendering and recognition calling module: This tool is used to render industrial drawing vector files into high-resolution raster images of no less than 300 DPI, and calls up a large visual model to control it to perform target detection only within the constrained search area and based on expected visual features, and output candidate recognition results.

[0036] The image rendering and recognition module changes the working mode of visual recognition from "full-image open scanning" to "constrained region directional detection", which greatly compresses the computation range of the visual model and reduces interference from irrelevant primitives. This not only improves the recognition speed but also reduces the probability of false detection from a mechanism perspective, achieving high-precision recognition with zero samples.

[0037] The visual large model architecture includes, but is not limited to, the YOLO series object detection model, the DETR detection model, the CLIP multimodal model, and the general multimodal visual language large model.

[0038] Topology verification module: This method uses raw vector data from industrial drawing vector files to perform spatial topology verification on candidate recognition results. It compares the candidate results with the topology constraints of the corresponding rules, eliminates invalid candidate results that do not meet the conditions, and outputs the final primitive recognition result.

[0039] The topology verification module leverages the precision of vector geometric data to perform logical verification on visual recognition results, compensating for the core deficiency of pure visual recognition in lacking spatial logic and effectively filtering out false positives. Simultaneously, it provides spatial logical evidence for the recognition results, making the recognition process traceable and auditable, thus meeting compliance requirements in regulatory scenarios. Rule building module: This tool is used to collect typical industrial drawing samples from target industries, providing annotation-element pairing annotation tools to support domain experts in completing spatial pairing annotations and statistical analysis, summarizing spatial relationships that meet deterministic requirements, and storing them in the rule base module in a hierarchical structure.

[0040] The rule building module provides standardized rule production tools and processes, supporting the rapid accumulation and storage of industry rules; it enables the system to have scalable rule production capabilities and is a core supporting module for achieving rapid cross-industry adaptation.

[0041] Vector-based bottom-line recognition module: This mechanism is used to trigger a fallback mechanism when the large visual model fails to detect target primitives with expected visual features within the constrained search area. It then reverts to the vector programming environment, queries all primitives within the area that match the target geometry type, and completes the fallback identification through geometric feature matching.

[0042] The vector-based fallback recognition module constructs a dual-protection system of "visual recognition as the primary method and vector matching as a fallback," which solves the problem of visual omissions in non-standard legends and non-standard drawing elements, effectively improves the recognition recall rate, ensures the integrity of the recognition results, and enhances the system's adaptability to heterogeneous drawings.

[0043] Joint reasoning module: This is used to perform joint inference by combining the feature constraints of multiple rules when the constraint search regions corresponding to multiple rules overlap; if the classification results output by different rules conflict, arbitration is performed based on the credibility weight of each rule to resolve the conflict and output the optimal result.

[0044] The joint reasoning module solves the problem of recognition conflict in scenarios with overlapping multiple rules, avoids the same primitive being classified repeatedly or misclassified, improves the recognition stability and accuracy of complex map regions, and enables the system to support complex recognition scenarios with multiple rules in parallel.

[0045] Feedback optimization module: It is used to cross-validate the final recognition results with vector primitive geometric data, calculate recognition accuracy indicators such as IoU (Intersection over Union) and boundary deviation; automatically record failure cases with accuracy below a preset threshold, associate trigger annotation information, local images and misjudgment reason labels, generate rule optimization suggestions, and drive continuous iterative optimization of rule parameters.

[0046] The feedback optimization module constructs a continuous iterative closed loop of "identification-verification-feedback-optimization", which can continuously improve recognition accuracy without retraining the model, simply by tuning the rule parameters; the automatic accumulation of failure cases can reduce the workload of manual optimization and achieve dynamic capability improvement of "optimization as you use".

[0047] The aforementioned rule base module, vector query execution module, constraint packaging module, image rendering and recognition invocation module, and topology verification module together constitute the core architecture of the vector-visual rule engine of this invention. The vector programming interface provides the vector query execution module, vector fallback recognition module, and topology verification module with unified underlying vector data reading and writing, spatial coordinate calculation, and geometric topology analysis capabilities, serving as the fundamental supporting component for realizing vector spatial logic-guided visual recognition.

[0048] This system can adapt to the technical environments and tool stacks of different industries, without being bound to specific underlying components, and has strong versatility and scalability; it can be flexibly selected according to project needs, reducing deployment and adaptation costs.

[0049] The functions and collaborative relationships of each part are as follows: (1) Data supply collaboration: The rule base module provides GIS spatial rules for the entire module of vector query, constraint packaging, topology verification and joint reasoning; the vector query module provides all original spatial coordinate data and is the data source for all visual constraints.

[0050] (2) Hierarchical flow and collaboration: The vector layer module (vector query, vector fallback) is responsible for extracting the geometric information of the bottom layer of the drawing; the intermediate layer (constraint packaging, joint reasoning) completes the conversion between rules and image recognition instructions; the visual layer (image rendering recognition) performs primitive detection; the verification layer (topology verification) filters out erroneous results; the optimization layer (feedback optimization, rule construction) iteratively updates the rule base in reverse, forming a positive recognition and reverse optimization closed loop.

[0051] (3) Auxiliary support and collaboration: The rule building module serves as a front-end supporting module, completing the industry rule entry offline; the multi-compatible interface module ensures that the entire system can be connected to different enterprise software and hardware environments, without being bound to a single component.

[0052] The collaborative workflow of each module is as follows: (1) Offline preparation process: Domain experts use the rule building module to import industry drawings, mark the matching relationship of graphic elements, generate standardized GIS spatial rules, and store them in the rule base module in layers; (2) Online recognition startup: Upload DWG / DXF vector drawings to the system, the vector query module loads the drawings, traverses the keyword rule base, and extracts the vector coordinates of all labeled text; (3) Constraint encapsulation: The constraint encapsulation module receives the labeled coordinates and the corresponding six-tuple rules, generates a local search region, converts the pixel coordinates, and packages the visual precondition package; (4) Directional visual detection: The image rendering and recognition module generates a high-definition raster image, and the visual model is called to output candidate primitives according to the region defined by the condition package; the conflict arbitration of multiple overlapping regions is completed by the joint inference module; (5) Handling of missed detections: If the visual model does not have a matching target, the vector fallback module searches the vector geometry within the region to supplement the candidate recognition results; (6) Spatial logic verification: The topology verification module retrieves the original vector data, removes false detection targets that do not conform to spatial relationships based on GIS topology rules, and outputs the formal recognition results; (7) Closed-loop optimization feedback: The feedback optimization module compares the identification results with the vector truth value, collects failure cases, pushes them to the rule construction module, and updates the rule base after the experts adjust the rule parameters to complete the iteration.

[0053] like Figure 2 As shown, the present invention also provides an industrial drawing recognition method based on a vector and vision hybrid mechanism. This method is used in the aforementioned system. The industrial drawing recognition method based on a vector and vision hybrid mechanism of the present invention includes the following steps: Step S1: Vector Anchor Point Query Input the industrial drawing vector file to be identified, read the full amount of drawing data through a compatible vector programming interface, traverse the trigger keyword set in the predefined spatial association constraint rule library, perform keyword matching on the text-type primitives in the vector file, and obtain the spatial position coordinates of all matched trigger annotation objects.

[0054] Functions and benefits: Using easily identifiable and locatable text labels as anchor points, it quickly locks the approximate spatial range of target primitives, providing a precise benchmark for subsequent directional recognition; by directly reading coordinates using vector programming, it avoids the errors of pure visual text recognition, resulting in high positioning efficiency and accuracy, fundamentally avoiding the inefficiency and false detection problems of blind full-image search.

[0055] Before step S1, there is also a step of constructing the spatial association constraint rule base, specifically: Collect typical industrial drawing samples from the target industry, and have domain experts perform spatial pairing annotation and statistical analysis on the annotations and elements. Summarize the spatial relationships that meet the deterministic requirements of occurrence probability, and store them in the rule base in a hierarchical structure. The rule base supports the inheritance, reuse and cross-industry adaptation of rules.

[0056] This step involves statistically extracting deterministic rules based on real industry drawings to ensure the universality and reliability of the rules; only strongly deterministic rules are retained to avoid the risk of false detections introduced by weak associations from the source; at the same time, a standardized rule building process is provided for cross-industry migration, enabling the system to quickly adapt to new industries.

[0057] Spatial association constraint rules are divided into three categories: Labeling-Primary Spatial Companion Rules: Define the spatial proximity or inclusion relationship between label text and the target primitive it describes; Primitive-Primitive Space Topological Rules: Define the necessary topological relationships between different types of primitives, such as inclusion, adjacency, intersection, and separation. Text content-graphic feature correspondence rules: Define the deterministic semantic correspondence between labeled keywords and the visual features of the graphic elements they describe.

[0058] Functions and benefits: The three types of rules comprehensively cover the underlying spatial expression logic of industrial drawings and are adapted to the recognition scenarios of different types of graphic elements; they transform implicit industry drafting rules into explicit computable rules, enabling spatial constraints to be parsed and invoked by the system, which is the core logical foundation of vector-guided visual recognition.

[0059] The rule base is organized hierarchically in four levels: "industry level - sub-industry level - drawing type level - element type level". Each rule adopts a six-tuple structured format, which includes the trigger keyword set, spatial relationship type, search area parameters, target visual feature description, topology verification conditions, and mutual exclusion conditions.

[0060] Functions and benefits: The four-layer architecture supports rule inheritance and reuse, significantly reducing cross-industry adaptation costs; the six-tuple format enables standardized and structured rule definition, ensuring consistent rule parsing across all stages of the process, and improving system stability and maintainability.

[0061] Step S2: Constraint Generation Based on the spatial coordinates of the triggered annotation object and its matching spatial association constraint rules, a structured visual recognition precondition package is generated. The precondition package includes at least the range of the constraint search area, the expected visual features of the target primitive, and the spatial topology verification conditions.

[0062] Functions and benefits: It transforms abstract spatial association rules into specific instructions that can be executed by the visual model, completing the conversion from vector logic to visual recognition conditions; by limiting the search range and target features, it provides a clear guiding direction for visual recognition, which is the core link in realizing "directional recognition".

[0063] In step S2, the constraint search area is generated by expanding the constraint search area outward according to the preset buffer radius of the corresponding rule, based on the spatial position of the triggered annotation object; and then performing unified recognition after merging overlapping constraint search areas.

[0064] Generating the search area using the buffer method is simple and efficient, and allows for precise control of the search range. Merging overlapping areas can prevent the same primitive from being repeatedly identified, reducing redundant calculations and avoiding result conflicts caused by repeated identification of multiple rules, thus further improving recognition efficiency and result consistency.

[0065] Step S3: Oriented Visual Recognition The industrial drawing vector file is rendered into a high-resolution raster image. The large visual model is called to perform target detection based on the expected visual features within each constraint search area to obtain candidate recognition results.

[0066] Functions and benefits: It completely changes the calling mode of visual models, changing from "indiscriminate scanning of the whole image" to "constrained region orientation detection", reducing the amount of computation by 1-2 orders of magnitude and significantly improving the recognition speed; at the same time, limiting the target features can greatly reduce the interference of irrelevant primitives, reduce the false detection rate, and enable general visual models to achieve industrial-grade recognition accuracy with zero samples.

[0067] In step S3, if the large visual model does not detect target primitives that meet the expected visual features within the constraint search area, it reverts to the vector programming environment, queries all primitives with matching geometric types within the area, and performs catch-all identification through geometric matching.

[0068] The system features dual recognition safeguards to address visual omissions in the detection of non-standard and poorly drawn graphic elements, effectively improving the recognition recall rate. It is particularly suitable for industry scenarios with inconsistent drafting standards, enhancing the system's adaptability to heterogeneous drawings.

[0069] In step S3, when the constraint search regions corresponding to multiple spatial association constraint rules overlap, joint reasoning is performed by combining the feature constraints of multiple rules, and the identification results of the conflict are arbitrated and resolved according to the credibility weight of the rules.

[0070] It resolves recognition conflicts in scenarios with overlapping rules, avoids the same primitive being repeatedly classified or misjudged, improves the stability and accuracy of recognition in complex image regions, and supports complex recognition scenarios with multiple rules running in parallel.

[0071] In the fallback identification process, a vector fallback identification mechanism is set up. If the large visual model does not detect a target primitive that matches the expected visual features within the constrained search area, it will fall back to the vector programming environment, query all primitives with matching geometric types within the area, and perform fallback identification through geometric matching.

[0072] Functions and benefits: It builds a dual recognition guarantee, solves the problem of visual omission of non-standard and non-standard drawing elements, and effectively improves the recognition recall rate; it is especially suitable for industry scenarios with inconsistent drafting standards, and enhances the system's ability to adapt to heterogeneous drawings.

[0073] Step S4: Topology verification output Based on the vector data of industrial drawing vector files, spatial topology verification is performed on the candidate recognition results, and candidate results that do not meet the spatial topology verification conditions are eliminated, and the final primitive recognition result is output.

[0074] Functions and benefits: It uses precise vector spatial logic to verify visual recognition results, thereby compensating for the lack of spatial logic in pure visual recognition, effectively filtering out false detection results and improving recognition accuracy; at the same time, it ensures that each recognition result has spatial logic evidence, forming a complete recognition link, and meeting the requirements of traceability and auditability in regulatory scenarios.

[0075] After step S4, a feedback optimization closed-loop step is also included: cross-validating the final recognition result with the actual primitive geometric data in the vector file and calculating the recognition accuracy index; for failure cases with accuracy lower than the preset threshold, recording their trigger annotation information, local image and misjudgment reason label, and including them in the rule optimization queue to adjust the rule parameters to continuously improve the recognition accuracy.

[0076] A continuous iteration mechanism of "optimization upon use" is formed, which can continuously improve accuracy by simply tuning rule parameters without retraining the model; failure cases are automatically collected, reducing the workload of manual optimization, and enabling the system's recognition capabilities to dynamically evolve with the growth of business volume.

[0077] The overall process of this method is divided into three main stages: offline rule construction, online real-time recognition, and continuous optimization. (1) Offline rule construction stage Collect industry drawings → Domain experts annotate text and corresponding graphic elements → Statistical analysis of spatial topological relationships → Filter deterministic GIS rules → Store in the rule base according to four-level hierarchy and six-tuple format; (2) Online real-time identification stage Input industrial vector paper → S1 Vector query to extract text anchor point coordinates → S2 Buffer to generate constraint search area and package visual precondition package → S3 Local orientation visual recognition, joint reasoning of overlapping areas, and fallback of missed vectors → S4 Vector GIS topology verification, elimination of false detections, and output of complete primitive recognition results. (3) Continuous optimization stage The recognition results are cross-validated with the vector ground truth → the failed recognition samples are recorded → experts adjust the rule search radius, features, and topological thresholds → the rule base is updated, and the optimized rules are automatically used in the next round of recognition.

[0078] The vector-visual rule engine is the core intermediate scheduling layer of the entire method, and the construction steps are as follows: (1) Build a rule definition language module, design a six-tuple standardized rule parsing syntax, and support JSON / YAML import and export rules; (2) Develop a vector query execution scheduling submodule to connect with various CAD vector SDKs and realize batch queries by keywords, layers, and spatial range; (3) Develop a constraint packaging submodule to realize vector coordinate to image pixel conversion, buffer area merging, and automatic packaging of recognition conditions; (4) Develop a unified calling interface for large visual models, compatible with multiple detection and multimodal models, to realize the distribution of directional recognition tasks and the collection of candidate results; (5) The engine integrates joint inference, vector fallback, and topology verification scheduling logic, connecting vector data with the visual model; (6) Engine docking feedback optimization process, receiving rule adjustment parameters, and updating internal rule parsing logic in real time; (7) The engine encapsulates a standardized calling interface that can be embedded into various industrial drawing review systems.

[0079] Regarding the GIS rule recognition and construction process, the core innovation of this method relies on the spatial rules of industrial drawings GIS, and the complete recognition and construction process is as follows: (1) Sample collection: Collect ≥50 drawings from different drafting standards and different drafters in the target industry, covering the mainstream legends; (2) Pairing and labeling of graph elements: Domain experts manually label each text annotation and its corresponding target graph element, and record their spatial location, distance, and topological relationship (containment / adjacency / intersection). (3) Statistical screening deterministic rules: batch statistical pairing cases, only retain spatial relationships with a probability of occurrence close to 100%, and eliminate weak association relationships that occur by chance; (4) Rule classification and shaping: The selected relationships are divided into three categories of GIS rules: fill trigger keywords, search buffer, target line type / fill, topology verification conditions, and mutual exclusion restrictions; (5) Layered storage: Store rules in the rule library according to the four levels of "industry level → sub-industry level → drawing type level → element type level". General rules of the upper level are automatically inherited to the lower level. (6) Rule verification test: Select drawings that have not participated in the sample for trial operation. If the recognition accuracy meets the standard, it will be officially put into online recognition. If the accuracy is insufficient, return to adjust the buffer and feature parameters and reshape the rules.

[0080] Specific Implementation Example: Example 1 uses the automatic identification of waterlogged areas and goaf areas on a coal mine mining engineering plan as an example to further illustrate the role and beneficial effects of each technical feature. This example uses a DWG vector file of a mining engineering plan of a local state-owned coal mine (approved production capacity of 900,000 tons / year, with moderately complex hydrogeological conditions) as the identification object. The goal is to identify the boundaries and spatial locations of all waterlogged areas and goaf areas in the map, and to fully execute the above method flow. The specific process is as follows: (1) Construction of prerequisite rules Sixty mining engineering plan samples from different coal mines were collected, and experts in the field of geological surveying completed the annotation and element pairing annotation. The deterministic spatial association rules of water accumulation areas and goaf areas were summarized and entered into the database according to the four-level hierarchy of "coal mining industry - underground coal mine - mining engineering plan - water hazard elements".

[0081] Taking the water accumulation area rule as an example, it is defined using a six-tuple format: the trigger keyword set is {water accumulation area, old goaf water accumulation, mining goaf water accumulation}, the spatial relationship type is "containment", the search area parameter is "15mm buffer zone on the outer edge of the anchor point", the target visual feature is "polygonal outline composed of closed polylines", the topology verification condition is "anchor point falls inside the polygon", and the mutual exclusion condition is "exclude mining goaf outline features".

[0082] (2) Vector anchor point query The process involves loading the DWG file to be recognized using the Teigha SDK (vector programming interface), parsing all 8347 text objects in the drawing, traversing the rule base to trigger the keyword set, hitting 47 waterlogged area labels and 112 mined-out area labels, and recording the CAD anchor point coordinates of all the hit labels. This step takes approximately 2.3 seconds.

[0083] (3) Constraint generation Constraint search areas for 47 waterlogged areas and 112 goaf areas were generated according to the rule parameters. The scale of this drawing is 1:2000, and the corresponding actual buffer distances are 30m and 40m, respectively. After merging overlapping areas, 36 waterlogged area search areas and 98 goaf area search areas were obtained. The drawing was rendered as a 600DPI raster image, the coordinates were converted to pixel coordinates, and a precondition package was generated. This step took approximately 4.1 seconds.

[0084] (4) Oriented visual recognition The YOLOv8 model, which has not been trained on coal mine drawings, is invoked to perform orientation detection only within the constrained area; multi-rule joint inference is performed on adjacent overlapping areas, and misclassification is avoided through weight arbitration.

[0085] Four non-standard (non-closed contour) water accumulation areas were not detected by the visual model, triggering the vector fallback mechanism. The mechanism backtracked to query the multi-segment line primitives within the area and matched the geometric features, successfully completing the fallback identification.

[0086] (5) Topology verification output Topological verification was performed on the candidate results based on the original vector data to check whether the "anchor points fall inside the polygon". Two candidate results that did not meet the conditions were removed. Finally, 38 water accumulation areas and 87 mining subsidence areas were identified. The accuracy rate of water accumulation areas was 91.9% and the accuracy rate of mining subsidence areas was 89.7%. The total time of the whole process was about 12.2 seconds.

[0087] (6) Feedback optimization The recognition results are cross-validated with the vector real image data, the IoU and boundary deviation index are calculated, the relevant information of the two recognition failure cases are recorded and included in the optimization queue, and the rule buffer parameters are adjusted by experts to continuously optimize the recognition accuracy.

[0088] Example 2 uses the building fire protection facility layout diagram for fire equipment identification as an example. This example uses the building fire protection facility layout diagram as the identification object, and the goal is to identify fire hydrants, fire extinguishers, safety exit signs, and other fire equipment in the diagram. The execution process is as follows: (1) Rule Construction Summarize the topological rules of element-element space in the field of building fire protection: fire protection equipment must be located at the end of the water supply network pipeline, which belongs to the adjacency type topology; the preceding element is the water supply network pipeline, and the subsequent target element is various fire protection equipment.

[0089] (2) Vector anchor point query The endpoint coordinates of the water supply network pipelines in the entire map are extracted by vector programming and used as preliminary anchor points for identifying fire-fighting equipment.

[0090] (3) Constraint generation Based on the pipeline endpoints, a constraint search region is generated according to rules, and a precondition package containing device visual features and topology verification conditions is packaged.

[0091] (4) Orientation identification and topology verification The system uses a visual model to orient and identify fire-fighting equipment within a constrained area. After topological verification (the equipment is located near the end of the pipeline network), the results are output. Tests on fire protection drawings of five different types of buildings showed that the average accuracy rate for fire hydrant identification was 94.8%, the average accuracy rate for fire extinguisher identification was 93.2%, and the average accuracy rate for safety exit signs was 91.5%. The recognition time for a single drawing was approximately 3-6 seconds.

[0092] As can be seen from the above, this invention provides an industrial drawing recognition method and system based on a hybrid vector and vision mechanism, solving the problems of existing pure vision solutions lacking spatial logic constraints, having low recognition accuracy and unreliability, and relying on industry-customized pre-training with weak general adaptability. Specific beneficial effects are as follows: 1. Completely eliminates the reliance on pre-training and fine-tuning, achieving high-precision recognition with "zero samples". The spatial constraint rules extracted by vector programming directly guide the visual model for directional recognition, transforming the visual model from "open search" to "directional detection under conditional constraints". High-precision recognition results can be obtained without any industry-labeled samples and model training, and the recognition accuracy is significantly better than pure visual full-image scanning solutions.

[0093] 2. Significantly improved recognition efficiency, meeting real-time image review requirements. The search space of the visual model is significantly compressed from full-image scanning to constrained region-oriented search, resulting in a significant reduction in computational load. The recognition of a single drawing can be completed in a short time, meeting the real-time requirements for immediate review of drawings in security supervision scenarios.

[0094] 3. High versatility, with extremely low relocation costs across industries and mines. The core framework is decoupled from specific industries and mines, and its underlying layer is compatible with multiple mainstream vector programming interfaces and large-scale visual model architectures. It can be directly adapted to the CAD drawing tool stacks and technical environments of different industries without the need for customized development for the drawing environment. When migrating across industries, only domain experts need to summarize the specific rules for the new industry, and the remaining modules can be reused directly without the need for redevelopment or model training. The deployment cycle is short and the cost is low.

[0095] 4. The recognition results have inherent logical interpretability. Each recognition result is associated with the triggering rule ID, trigger annotation text, and constraint conditions, forming a complete recognition logic chain for traceability, which meets the strict requirements of auditable and traceable AI judgment in security supervision scenarios.

[0096] 5. Form a rule-driven feedback optimization closed loop. Each failed identification case is recorded and analyzed, driving continuous fine-tuning of rule parameters to achieve "optimization upon use" rather than static and fixed identification capabilities, and the system accuracy continues to improve with business operations.

[0097] The specific embodiments described above are preferred embodiments of the present invention and are not intended to limit the specific scope of the present invention. The scope of the present invention includes, but is not limited to, these specific embodiments. All equivalent changes made in accordance with the present invention are within the protection scope of the present invention.

Claims

1. A method for industrial drawing recognition based on a hybrid vector and visual mechanism, characterized in that, Includes the following steps: Step S1: Input the industrial drawing vector file to be identified, read the full amount of drawing data through a compatible vector programming interface, traverse the trigger keyword set in the predefined spatial association constraint rule library, perform keyword matching on the text-type graphic elements in the vector file, and obtain the spatial position coordinates of all matched trigger annotation objects; Step S2: Based on the spatial location coordinates of the hit trigger annotation object and its matching spatial association constraint rules, generate a structured visual recognition precondition package. The precondition package includes at least the constraint search area range, the expected visual features of the target primitive, and the spatial topology verification conditions. Step S3: Render the industrial drawing vector file into a high-resolution raster image, call the large visual model to perform target detection only within each constraint search area, based on the expected visual features, and obtain candidate recognition results; Step S4: Based on the vector data of the industrial drawing vector file, perform spatial topology verification on the candidate recognition results, eliminate candidate results that do not meet the spatial topology verification conditions, and output the final primitive recognition result.

2. The industrial drawing recognition method based on a vector and vision hybrid mechanism according to claim 1, characterized in that: In step S2, the constraint search region is generated by expanding the constraint search region outward according to the preset buffer radius of the corresponding rule, based on the spatial position of the triggered annotation object; and then performing unified recognition after merging overlapping constraint search regions.

3. The industrial drawing recognition method based on a vector and vision hybrid mechanism according to claim 1, characterized in that: In step S3, if the large visual model does not detect a target primitive that matches the expected visual features within the constrained search area, it reverts to the vector programming environment, queries all primitives with matching geometric types within the area, and performs catch-all identification through geometric matching.

4. The industrial drawing recognition method based on a vector and vision hybrid mechanism according to claim 1, characterized in that: Prior to step S1, there is also a step of constructing a spatial association constraint rule base, specifically: Typical industrial drawing samples from the target industry are collected. Domain experts perform spatial pairing annotation and statistical analysis on the annotations and elements, summarize the spatial relationships that meet the deterministic requirements, and store them in a rule base in a hierarchical structure. The rule base supports the inheritance, reuse, and cross-industry adaptation of rules.

5. The industrial drawing recognition method based on a vector and vision hybrid mechanism according to claim 1, characterized in that: In step S3, when the constraint search regions corresponding to multiple spatial association constraint rules overlap, joint reasoning is performed by combining the feature constraints of multiple rules, and the identification results of the conflict are arbitrated and resolved according to the credibility weight of the rules.

6. The industrial drawing recognition method based on a vector and vision hybrid mechanism according to claim 1, characterized in that: Following step S4, a feedback optimization closed-loop step is also included: cross-validating the final recognition result with the actual primitive geometric data in the vector file and calculating the recognition accuracy index; for failure cases with accuracy lower than the preset threshold, recording their trigger annotation information, local images and misjudgment reason labels, and incorporating them into the rule optimization queue for adjusting rule parameters to continuously improve recognition accuracy.

7. An industrial drawing recognition system based on a vector and vision hybrid mechanism, used to implement the industrial drawing recognition method based on a vector and vision hybrid mechanism as described in any one of claims 1-6, characterized in that: It includes a rule base module, a vector query execution module, a constraint packaging module, an image rendering and recognition calling module, and a topology verification module; The rule base module is used to store predefined spatial association constraint rules. Each rule contains a set of triggering keywords, spatial constraint relationships, and target primitive feature information. The vector query execution module is used to perform keyword matching on the input industrial drawing vector file to be identified, and obtain the spatial coordinates of the matched trigger annotation objects; The constraint packaging module is used to generate a structured visual recognition precondition package based on the spatial location of the triggering annotation object and the matching spatial association constraint rules. The image rendering and recognition module is used to render industrial drawing vector files into high-resolution raster images, and call the large visual model to perform directional target detection within the constrained search area, and output candidate recognition results; The topology verification module is used to perform spatial topology verification on candidate recognition results based on vector data from industrial drawing vector files, eliminate invalid candidate results, and output the final recognition result.

8. The industrial drawing recognition system based on a vector and vision hybrid mechanism according to claim 7, characterized in that: It also includes a rule building module, which is used to collect typical industrial drawing samples of the target industry, support domain experts to complete annotation-element space pairing annotation and statistical analysis, summarize deterministic spatial relationships and store them in the rule base module in a hierarchical structure.

9. The industrial drawing recognition system based on a vector and vision hybrid mechanism according to claim 7, characterized in that: It also includes a vector fallback recognition module, which is used to fall back to the vector programming environment to query primitives with matching geometric types when the target primitive is not detected in the large visual model, and complete the fallback recognition through geometric matching.

10. The industrial drawing recognition system based on a vector and vision hybrid mechanism according to claim 7, characterized in that: It also includes a joint reasoning module, which is used to perform joint reasoning by integrating the feature constraints of multiple rules when the constraint search regions corresponding to multiple rules overlap, and to resolve the identification conflict based on the rule credibility weight.