An OCR-based map file intelligent identification and structured archiving method and system

By using an OCR-based intelligent recognition and structured archiving method for drawings, the problems of information extraction errors and fragmentation in the digital processing of engineering drawings have been solved. This has enabled intelligent processing of the entire process from drawing upload to archiving, improving the automation of drawing management and the efficiency of data utilization.

CN122200673APending Publication Date: 2026-06-12CHINA NORTHWEST ARCHITECTURE DESIGN & RES INST CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA NORTHWEST ARCHITECTURE DESIGN & RES INST CO LTD
Filing Date
2026-05-14
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In existing engineering drawing digitization processes, image noise interference leads to errors or omissions in the extraction of key information, fragmented identification of drawing signature areas, and a disconnect between file storage and text extraction. The lack of automated naming and hierarchical directory construction results in excessive manual intervention, making it difficult to meet the needs of efficient, accurate, and standardized archiving.

Method used

An OCR-based intelligent image recognition and structured archiving method is adopted. Through image preprocessing, confidence filtering, spatial clustering and semantic correction, a structured field table is generated. Combined with conflict detection, a three-level file storage architecture is automatically created and standardized file names are generated, realizing intelligent processing of image files from upload to archiving.

Benefits of technology

It improves the accuracy and efficiency of map and map information extraction, reduces manual intervention, ensures data quality, realizes structured archiving and intelligent association of map and map information, and enhances the automation level of digital management and data utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122200673A_ABST
    Figure CN122200673A_ABST
Patent Text Reader

Abstract

The application relates to an OCR-based drawing intelligent identification and structured archiving method and system, which comprises the following steps: receiving a user-uploaded drawing file set and project configuration parameters, analyzing a hierarchical structure to generate an original file tree and binding a multi-level operation permission label; performing image preprocessing on the drawing to generate preprocessing data; calling an OCR engine to locate a drawing signature area to extract text, and generating an original recognition result set after standardization and cleaning; filtering low-confidence fields based on a preset threshold, aggregating drawing signature data through spatial clustering and semantic correction, and generating a structured field table; performing conflict detection and generating a double-layer PDF based on the conflict result; creating a three-level storage architecture, and generating a standardized drawing file name according to a preset rule; and pushing the double-layer PDF, a storage path, a file name and drawing signature data to an archive system to establish an association relationship among the drawing signature data, the file name and the storage path. The application realizes intelligent transformation of drawings from collection to archiving, and improves management efficiency and data reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of image processing and text recognition technology, and in particular to a method and system for intelligent recognition and structured archiving of images based on OCR. Background Technology

[0002] With the ongoing digital transformation of the construction, machinery, and other engineering industries, the digital management and efficient utilization of massive amounts of engineering drawings has become a key aspect for enterprises to enhance their core competitiveness. In traditional engineering project management, drawings, as the direct carrier of engineering design intent, often grow exponentially with the expansion of project scale, involving multiple professional fields such as architecture, structure, and electromechanical engineering. To achieve long-term preservation and convenient retrieval of drawings, enterprises typically need to scan paper drawings into electronic files and archive them in an archive management system. In this process, Optical Character Recognition (OCR) technology, as a means of converting text in images into computer-editable text, has been gradually introduced into the digital processing workflow of drawings. It aims to replace the traditional manual character-by-character entry method, in order to achieve rapid extraction and electronic archiving of drawing information, thereby meeting the urgent needs of modern engineering projects for efficient information retrieval, data sharing and interaction, and paperless office operations.

[0003] However, in actual engineering drawing digitization scenarios, scanned original images often have physical defects such as tilting, creases, stains, or uneven background color. Directly applying conventional optical character recognition (OCR) technology is easily interfered with by these image noises, leading to errors or omissions in the extraction of key information within the title block. Furthermore, the title block area of ​​engineering drawings is usually arranged in a complex table format. Conventional recognition methods can only output disordered and fragmented text lines, making it difficult to understand the spatial adjacency logic and contextual semantics between fields. This prevents the direct conversion of the data into high-quality structured data that meets archival management requirements, necessitating significant manual comparison, error correction, and data reassembly.

[0004] Furthermore, in the final archiving stage, existing processing systems often separate text extraction from file storage, lacking the ability to automatically name files and build hierarchical directories based on extracted data. Moreover, the generated electronic files are difficult to meet the dual requirements of high-definition display of the original images and full-text retrieval. This results in problems such as non-standard file naming, disconnect between storage paths and business attributes, and difficulty in retrieval and location after the map and document data is archived. The overall map and document processing workflow still relies heavily on manual intervention, making it difficult to meet the actual business needs of efficient, accurate, and standardized archiving of large-scale map and document data. Summary of the Invention

[0005] To address the aforementioned technical issues, this application provides a method and system for intelligent image recognition and structured archiving based on OCR.

[0006] Firstly, this application provides a method for intelligent image recognition and structured archiving based on OCR, employing the following technical solution: Receive the set of drawing files and project configuration parameters uploaded by the user, parse the hierarchical structure of the set of drawing files to generate the original file tree, and bind multi-level operation permission tags to the original file tree; Image preprocessing operations are performed on the drawing files in the original file tree, including binarization, noise reduction and rotation correction, to generate preprocessed image data; The preprocessed image data is processed by calling the OCR recognition engine to locate the label area and extract the text information. The text information is then subjected to standardized cleaning operations to generate an original recognition result set containing text content and confidence level. The original recognition result set is subjected to confidence filtering based on a preset threshold, fields below the threshold are marked, and spatial clustering algorithm and semantic correction rules are applied to aggregate the image tag data to generate a structured field table. Perform conflict detection on the structured field table and generate conflict detection results, wherein the conflict detection includes drawing number duplication verification; A two-layer PDF file is generated based on the conflict detection results, wherein the text layer embeds the text information extracted by the OCR recognition engine, and the image layer retains the original image; Based on the design number, sub-item name, and drawing type fields in the structured field table, create a three-level file storage architecture; Based on the title data in the structured field table, generate standardized drawing file names according to preset naming rules; The path information of the two-layer PDF file, the three-level file storage architecture, the standardized drawing file name, and the title data in the structured field table are pushed to the target file management system to establish the association between the title data, file name, and storage path.

[0007] By adopting the above technical solutions, intelligent processing of map documents from upload to archiving is achieved. Image preprocessing and OCR recognition combined with standardized cleaning improve the accuracy and efficiency of map label information extraction. Confidence filtering, spatial clustering, and semantic correction generate structured field tables, and conflict detection ensures data quality. Based on the structured field tables, a three-level file storage architecture is automatically created and standardized file names are generated. The two-layer PDF, storage path, and map label data are associated and pushed to the archiving system. This not only reduces manual intervention but also achieves structured archiving and intelligent association of map document information. It solves the problems of low efficiency, data error, and non-standard archiving in traditional manual processing, and improves the automation level and data utilization efficiency of digital map document management.

[0008] Optionally, the steps of parsing the hierarchical structure of the drawing file set to generate an original file tree and binding multi-level operation permission tags to the original file tree include: Extract the folder names and file paths from the drawing file set, and obtain the hierarchical relationship by dividing the files according to the path separator; Based on a preset project structure template, the hierarchical relationship is mapped to tree nodes; wherein, the root node corresponds to the project name, and the child nodes correspond to the sub-item name, professional category and drawing file in sequence; Each tree node is assigned a node identifier according to a preset node type; wherein the preset node types include project layer, sub-item layer, professional layer and file layer; Based on the permission group allocation strategy in the project configuration parameters, the preset permission tag groups are associated and mapped with the node types; Match the corresponding permission tag group according to the type of the node identifier, and generate an original file tree with multi-level operation permission tags for each tree node.

[0009] By adopting the above technical solution, the folder names and file paths of the drawing file set are extracted and the hierarchical relationship is segmented, achieving accurate parsing of the hierarchical structure of the drawing file set. This ensures a clear correspondence between project, sub-item names, professional categories, and drawing file levels. Based on a preset project structure template, the hierarchical relationship is mapped to tree nodes, standardizing the node types at each level (project level, sub-item level, professional level, and file level), providing a structural foundation for subsequent permission management. By assigning node identifiers and associating them with permission tag groups, precise binding of multi-level operation permissions is achieved, solving the problems of unclear hierarchical structure and chaotic permission allocation in traditional drawing management, and improving the automation and structuring level of drawing processing.

[0010] Optionally, the steps of calling the OCR recognition engine to process the preprocessed image data, locating the label area and extracting text information, performing standardized cleaning operations on the text information, and generating an original recognition result set containing text content and confidence levels include: Obtain the recognition mode from the project configuration parameters, call the preset target detection model to process the preprocessed image data, and automatically locate and generate the initial map tag area coordinates; Based on the initial image region coordinates, the OCR recognition engine is invoked to perform global OCR recognition on the preprocessed image data, extracting and generating initial text information and the corresponding initial confidence level. If the recognition mode is the normal mode, the user-inputted intervention command is received, the coordinates of the initial image area are corrected and updated to obtain the target image area, and the initial text information is re-extracted and updated based on the target image area; if the recognition mode is the unattended mode, the user intervention step is skipped and the initial text information is directly retained. Perform the standardized cleaning operation on the updated or directly retained initial text information to generate cleaned text information; The cleaned text information is combined with the corresponding initial confidence level to generate an original recognition result set containing text content and confidence level.

[0011] By adopting the above technical solutions, dual-mode adaptive processing and full-process quality control were achieved in the image tag recognition process. The target detection model automatically locates the image tag area, balancing positioning efficiency and accuracy. User intervention in the conventional mode and fully automated processing in the unattended mode flexibly adapt to the differentiated needs of fine-grained proofreading and batch archiving. Standardized cleaning operations eliminate text format noise, improving data standardization. The final generated raw recognition result set contains both text content and confidence level information, providing a high-quality data foundation for subsequent confidence filtering, spatial clustering, semantic correction, and structured field generation.

[0012] Optionally, the steps of performing confidence filtering on the original recognition result set based on a preset threshold, marking fields below the threshold, and applying spatial clustering algorithms and semantic correction rules to aggregate the tag data to generate a structured field table include: Retrieve the preset threshold from the project configuration parameters; The confidence level of each field in the original recognition result set is compared with the preset threshold. Fields with confidence levels lower than the preset threshold are marked, while unmarked fields with confidence levels reaching the preset threshold are retained. Obtain the coordinates of the generated initial tag area, and associate the initial tag area coordinates with the labeled field and the unlabeled field to generate a clustering field carrying coordinate information; A spatial clustering algorithm is applied to the field to be clustered, and the clusters are grouped according to spatial adjacency based on the associated coordinate information to generate the clustered and grouped map data; Based on preset semantic correction rules, the clustered and grouped image tag data is processed, redundant fields are merged, and misidentified text is corrected to preset standard text to generate corrected image tag data. The corrected image tag data is used to generate a structured field table according to preset field mapping rules.

[0013] By adopting the above technical solution, adapting to different project quality requirements based on dynamic thresholds, restoring the physical layout of the image labels using spatial clustering, and eliminating text recognition errors through semantic correction, a standardized field table is finally generated. This process effectively solves the problems of fragmented processing, semantic breaks, and chaotic formatting in traditional OCR recognition, transforming unstructured image label information in the original image into structured data with an accuracy rate exceeding 95%. This provides a reliable data foundation for image digitization, reduces manual proofreading costs, and improves the automation level and data availability of archive management.

[0014] Optionally, the step of generating a two-layer PDF file based on the collision detection results includes: Obtain the conflict detection results; Determine whether the conflict detection result is passed; if it is not passed, trigger the exception handling process based on the conflict detection result, and perform subsequent generation operations after obtaining the updated conflict detection result as passed. If successful, the text information extracted by the OCR recognition engine is obtained, the text information is configured into a searchable text format, and a text layer is generated. The preprocessed image data is acquired and configured into a visualization display format to generate an image layer; The text layer and the image layer are superimposed and merged to generate the two-layer PDF file.

[0015] By adopting the above technical solutions, the logical correctness of archived data is ensured through automated access control based on conflict detection results. Through the separation and precise overlay of text and image layers, the legal validity and visual details of the original drawings are preserved, while also endowing them with efficient digital retrieval capabilities. The resulting two-layer PDF file serves as a standardized data carrier, providing a solid foundation for the subsequent linkage and rapid retrieval of drawings and data in the archive system. This improves the efficiency and compliance of drawing and document management and provides reliable technical support for the digital transformation of engineering design and archive management.

[0016] Optionally, the step of generating standardized drawing file names according to preset naming rules based on the title data in the structured field table includes: Obtain the preset naming rules from the project configuration parameters; Fields are extracted from the image label data in the structured field table to obtain the image number field and the name field; According to the preset naming rules, the drawing number field and the name field are combined to generate the standardized drawing file name.

[0017] By adopting the above technical solutions, the generation of drawing file names is automated and standardized, effectively solving the problems of chaotic format, error-proneness, and low efficiency in traditional manual naming. By dynamically obtaining preset naming rules from project configuration parameters and intelligently combining them with the drawing number and name fields in the structured field table, strict consistency and business relevance between file names and drawing label data are ensured. This standardized naming mechanism not only improves the convenience of drawing retrieval and retrieval but also lays a reliable foundation for the subsequent creation of a three-level storage architecture and data push, realizing standardized management of drawing resources from identification to archiving, reducing manual intervention costs and improving data quality.

[0018] Optionally, after the step of generating standardized drawing file names according to preset naming rules based on the title data in the structured field table, the method further includes: If the image label data in the structured field table is detected to have been modified, the updated image number field and the updated name field are obtained after modification. According to the preset naming rules, the updated drawing number field and the updated name field are recombined to generate the updated standardized drawing file name; Based on the updated standardized drawing file names, update the associated path hierarchy in the pre-created three-level file storage architecture.

[0019] By adopting the above technical solutions, the technical problem of filenames and storage paths becoming disconnected after map and document data modifications is effectively solved. By real-time monitoring of changes to the structured field table and automatically triggering the update process, strict consistency between map and document data, filenames, and storage paths is ensured. By reusing preset naming rules to recombine fields, the standardization and uniformity of filenames are maintained. By recursively updating the associated path hierarchy of the three-level file storage architecture, real-time synchronization between the physical storage structure and logical data is achieved.

[0020] Secondly, this application provides an OCR-based intelligent image recognition and structured archiving system, which adopts the following technical solution: The file receiving and permission binding module is used to receive the drawing file set and project configuration parameters uploaded by the user, parse the hierarchical structure of the drawing file set to generate the original file tree, and bind multi-level operation permission tags to the original file tree; The image preprocessing module is used to perform image preprocessing operations on the drawing files in the original file tree, including binarization, noise reduction and rotation correction, to generate preprocessed image data; The OCR recognition and text cleaning module is used to call the OCR recognition engine to process the preprocessed image data, locate the image label area and extract text information, perform standardized cleaning operations on the text information, and generate an original recognition result set containing text content and confidence level. The data filtering and structured aggregation module is used to perform confidence filtering on the original identification result set based on a preset threshold, mark fields below the threshold, and apply spatial clustering algorithm and semantic correction rules to aggregate the tag data and generate a structured field table. The conflict detection module is used to perform conflict detection on the structured field table and generate conflict detection results. The conflict detection includes drawing number duplication verification. A dual-layer PDF generation module is used to generate a dual-layer PDF file based on the conflict detection results, wherein the text layer embeds the text information extracted by the OCR recognition engine, and the image layer retains the original image; The three-level storage architecture creation module is used to create a three-level file storage architecture based on the design number, sub-item name and drawing type field in the structured field table; The standardized file name generation module is used to generate standardized drawing file names according to preset naming rules based on the drawing label data in the structured field table; The data push and association module is used to push the path information of the two-layer PDF file, the three-level file storage architecture, the standardized drawing file name, and the drawing title data in the structured field table to the target file management system, and establish the association relationship between the drawing title data, file name, and storage path.

[0021] Thirdly, this application provides a computer device, which adopts the following technical solution: A computer device includes a memory, a processor, and a computer program stored in the memory, the processor executing the computer program to perform the steps of the method as described in the first aspect.

[0022] Fourthly, this application provides a computer-readable storage medium, which adopts the following technical solution: A computer-readable storage medium storing a computer program that can be loaded by a processor and executed as in any of the methods in the first aspect. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the first process of an OCR-based intelligent image recognition and structured archiving method according to one embodiment of this application.

[0024] Figure 2 This is a schematic diagram of the second process of an OCR-based intelligent image recognition and structured archiving method according to one embodiment of this application.

[0025] Figure 3 This is a schematic diagram of the third process of an OCR-based image intelligent recognition and structured archiving method according to one embodiment of this application.

[0026] Figure 4 This is a schematic diagram of the fourth process of an OCR-based image intelligent recognition and structured archiving method according to one embodiment of this application.

[0027] Figure 5 This is a schematic diagram of the fifth process of an OCR-based image intelligent recognition and structured archiving method according to one embodiment of this application.

[0028] Figure 6 This is a schematic diagram of the sixth process of an OCR-based image intelligent recognition and structured archiving method according to one embodiment of this application.

[0029] Figure 7 This is a schematic diagram of the seventh process of an OCR-based intelligent image recognition and structured archiving method according to one embodiment of this application. Detailed Implementation

[0030] To make the purpose, technical solution, and advantages of this application clearer, the following description is provided in conjunction with the appendix. Figures 1-7 The present application will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the application.

[0031] This application discloses an OCR-based intelligent image recognition and structured archiving method.

[0032] Reference Figure 1 A method for intelligent image recognition and structured archiving based on OCR, specifically including: Step S101: Receive the set of drawing files and project configuration parameters uploaded by the user, parse the hierarchical structure of the drawing file set to generate the original file tree, and bind multi-level operation permission tags to the original file tree; Among them, the set of drawings uploaded by users must meet specific format requirements (such as PDF format, A4~A0 drawing size, scanning resolution ≥300DPI, tilt <5 degrees, and the input folder should be named as "design number-sub-item name-drawing type") to ensure that the data quality meets the prerequisites for OCR recognition.

[0033] In this application embodiment, the project configuration parameters include identification mode (normal / unattended), title template identifier (adapting to different types of title frames at different times), and permission group allocation strategy (such as the operation scope of administrators, project initiators / reviewers / checkers / archivers). These parameters determine the execution logic of subsequent processes and the user interaction method.

[0034] Subsequently, the disordered drawings are organized into a tree-like directory according to business logic (such as "Project > Sub-item > Specialty > Specific PDF" or "Project > Sub-item > Specific PDF"), which intuitively presents the ownership relationship of the drawings and facilitates batch operations and traceability. Binding multi-level operation permission tags is based on permission group policies, which assign access and operation permissions to different nodes (such as folders, single drawings) (such as upload permission is limited to project initiators, and review permission is limited to reviewers), avoiding data chaos caused by unauthorized operations. This design echoes the permission management requirements of the account system and ensures that the process is compliant and controllable.

[0035] Step S102: Perform image preprocessing operations on the drawing files in the original file tree, including binarization, noise reduction and rotation correction, to generate preprocessed image data; Image preprocessing is a key preliminary step in improving the accuracy of OCR recognition. Its logical principle is to optimize image quality, eliminate interference factors, and make the text outline and layout clearer and more distinguishable.

[0036] Specifically, binarization processing refers to converting a color / grayscale image into a black and white binary image (text is black and background is white), separating the text and background through threshold segmentation to reduce the interference of background noise on recognition; noise elimination uses filtering techniques (such as median filtering) to remove noise, creases or stains generated during the scanning process to avoid misrecognition; rotation correction uses algorithms such as Hough transform to detect the image tilt angle, and if the tilt exceeds 5 degrees, it is automatically rotated to a horizontal state to ensure uniform text baseline.

[0037] Understandably, the synergistic effect of these operations is to provide clean image input for subsequent OCR recognition. For example, a drawing that is tilted at 10 degrees and has creases can be restored to a straight and interference-free standard image after preprocessing, enabling the OCR engine to accurately locate the label area.

[0038] Step S103: Call the OCR recognition engine to process the preprocessed image data, locate the label area and extract the text information, perform standardized cleaning operations on the text information, and generate an original recognition result set containing text content and confidence level. In this embodiment, the label area (usually a table or text box in a fixed position) in the drawing is automatically located using an object detection model (such as DBNet or YOLO series) to avoid invalid recognition of non-label areas; then, the text information within the label is extracted, and the confidence level of each text is recorded (the degree of confidence of the OCR engine in the recognition result, such as 95% indicating high confidence); finally, standardized cleaning is performed, including filtering illegal characters (spaces, decimal points, Chinese punctuation), converting traditional Chinese characters to simplified Chinese characters, and unifying English letters to uppercase (such as “Design” → “DESIGN”), to ensure that the data format is standardized.

[0039] Finally, the generated original recognition result set contains text content, confidence level, and spatial coordinates (the position of the text in the image), providing a basis for subsequent aggregation and verification. For example, when "Design number: 12-265" is recognized, it is corrected to "Design number: 12-265" after cleaning and the confidence level is marked.

[0040] Step S104, perform confidence filtering on the original recognition result set based on a preset threshold, mark the fields below the threshold, and apply a spatial clustering algorithm and semantic correction rules to aggregate the drawing label data to generate a structured field table. Among them, confidence filtering can screen low-confidence fields (such as the "Drawing type" field with a confidence level < 80%) based on a preset threshold (such as 80%), and highlight them (such as "highlight display from the last-level field to the file name and folder level") to prompt manual review.

[0041] In the embodiment of the present application, a spatial clustering algorithm can be adopted. Using the principle of computational geometry, the same type of fields (such as "Design number" and "Project name" are grouped into the same drawing label group) are aggregated according to the spatial coordinates of the text (such as the aggregation of adjacent texts within the same drawing label area), to solve the problem of text fragmentation in OCR recognition; the semantic correction rules correct errors through context association (such as merging redundant characters "set design" → "design", correcting the logical contradiction between "Sub-item name" and "Project name"). Finally, a structured field table is generated, which contains standardized fields such as design number, project name, sub-item name, drawing type, drawing number, etc. For example, the separately recognized "12-265" and "Building 1#" are aggregated into a complete record.

[0042] Step S105, perform conflict detection on the structured field table and generate a conflict detection result. The conflict detection includes verification of the repeatability of the drawing number. Among them, conflict detection is a verification link to ensure data uniqueness and integrity, and the logic focuses on identifying logical contradictions in the structured field table.

[0043] Specifically, by comparing the "Drawing number" fields of all drawings, if duplicates are found (such as both drawings are marked as "Drawing number: 10"), a conflict report is generated and the transfer to the next stage is blocked to avoid data overwrite in the archive system; in addition, it can be extended to data integrity verification (such as the missing "Design number" field) or logical conflicts (such as the "Drawing type" is "Structural drawing" but there is no "Structure type" field). This step intercepts incorrect data through automated rules, reducing the burden of manual review. For example, the drawing number verification of 100,000 drawings in a certain project can be completed within minutes, with far higher efficiency than manual checking one by one.

[0044] Step S106, generate a two-layer PDF file based on the conflict detection result, where the text layer embeds the text information extracted by the OCR recognition engine, and the image layer retains the original image. The dual-layer PDF generation is a key design feature that balances retrieval convenience with the integrity of the original information. If the conflict detection passes (or there is no conflict), the original drawing image is used as the basis. A high-resolution scan is retained in the "image layer" (to ensure traceability of details), while the structured text extracted by OCR (such as design number, drawing number, etc.) is embedded in the "text layer," and full-text search is supported (such as searching for "12-265" to directly locate the corresponding drawing).

[0045] Understandably, this format satisfies the originality requirement of document management (image layer) while improving retrieval efficiency (text layer search). For example, when a designer needs to find drawings related to "elevation -2.000 floor wall", they can quickly locate the drawing through text layer keywords without having to flip through each image.

[0046] Step S107: Create a three-level file storage architecture based on the design number, sub-item name, and drawing type field in the structured field table; Among them, the three-level storage architecture is the logical implementation of data organization. Its principle is to automatically build hierarchical folders according to business dimensions to achieve physical storage that links graphs and data.

[0047] Specifically, the system uses "Design Number + Project Name" as the first level (e.g., "12-265-Project X3"), sub-item names as the second level (e.g., "Building 1"), and drawing type as the third level (e.g., "Structural Construction"), automatically creating corresponding folders in the archive system. The storage structure is driven by the drawing label field, strongly linking the drawing's location to its business attributes. For example, when adding a drawing for "Building 2", the system automatically creates a "Building 2" subfolder under "12-265-Project X3" without manual intervention. Furthermore, it supports automatic merging when adding / completing data multiple times (e.g., when adding "Architectural Construction" drawings for "Building 1", they are directly placed into the corresponding level).

[0048] Step S108: Generate standardized drawing file names according to preset naming rules based on the drawing label data in the structured field table; Standardized naming embodies the principle of data uniqueness. It generates standardized filenames based on core attributes (such as image number and name) in a structured table, ensuring consistent data integrity. Figure 1 name.

[0049] In this embodiment, the default naming rule is typically “Design Number-Sub-item Name-Drawing Type-Drawing Number” (e.g., “12-265-Project X3-Building 1#-Structural Construction-10.pdf”), where “Drawing Label Data” refers to the aggregated structured fields (e.g., drawing number “10”, drawing type “Structural Construction”). Furthermore, if a user modifies a field (e.g., changes the sub-item name from “Building 1#” to “Building 1# (Revised Version)”), the filename and associated folder hierarchy are automatically updated synchronously (i.e., attributes and filenames are linked), preventing filenames from becoming disconnected from content. For example, if a drawing's drawing number is changed due to design changes, the filename automatically updates from “10.pdf” to “11.pdf” and is moved to the corresponding drawing number folder.

[0050] Step S109: Push the path information of the two-layer PDF file and the three-level file storage architecture, the standardized drawing file name, and the drawing title data in the structured field table to the target file management system to establish the association between the drawing title data, file name, and storage path.

[0051] The logic of this step is to connect the processed data (file entity, storage location, identification information) with the archive system to establish the association between "image label data - file name - storage path".

[0052] Specifically, the pushed content includes: a two-layer PDF file (containing image and text layers), a three-level storage architecture path (e.g., " / archive system / 12-265-project X3 / Building 1# / structural / "), and a standardized filename (e.g., "12-265-project X3-Building 1#-structural-10.pdf"). The archive system uses this information to build a related index. For example, by using "drawing number=10" in the "drawing label data," users can simultaneously retrieve the filename, storage path, and drawing content, achieving efficient "searching attributes equals searching files." This linked drawing and data functionality changes the traditional manual retrieval mode.

[0053] The above implementation achieves intelligent processing of the entire process from uploading to archiving of map documents. By combining image preprocessing and OCR recognition with standardized cleaning, the accuracy and efficiency of map label information extraction are improved. Confidence filtering, spatial clustering, and semantic correction are used to generate structured field tables, and conflict detection ensures data quality. Based on the structured field tables, a three-level file storage architecture is automatically created and standardized filenames are generated. The two-layer PDF, storage path, and map label data are associated and pushed to the archive system. This not only reduces manual intervention but also achieves structured archiving and intelligent association of map document information. It solves the problems of low efficiency, data error, and non-standard archiving in traditional manual processing, and improves the automation level and data utilization efficiency of digital map document management.

[0054] Reference Figure 2As one implementation of step S101, the steps of parsing the hierarchical structure of the drawing file set to generate an original file tree and binding multi-level operation permission tags to the original file tree include: Step S201: Extract the folder names and file paths from the drawing file set, and obtain the hierarchical relationship by dividing the files according to the path separator; The drawing file set usually contains multiple layers of folders (such as "Project A / Sub-item B / Specialty C / Drawing 1.pdf"). To extract the folder name and file path, it is necessary to traverse all files and obtain the complete path string (such as "D: / Drawing Library / Project X3 / Building 1 / Structural Design / 12-265-10.pdf").

[0055] Specifically, dividing the hierarchical relationship according to the path separator requires relying on the common separator of the operating system ("\" for Windows and " / " for Linux) to split the path into independent units. For example, after the above path is divided, five levels of units are obtained: "Drawing Library", "Project X3", "Building 1", "Structural Engineering", and "12-265-10.pdf".

[0056] Understandably, the purpose of splitting is to remove irrelevant prefixes (such as the local drive letter "D: / ") and retain the core levels (projects, sub-items, specialties, files) that are relevant to the business, so as to provide atomic hierarchical elements for subsequent mapping to a tree structure.

[0057] Step S202: Based on the preset project structure template, the hierarchical relationship is mapped to tree nodes; where the root node corresponds to the project name, and the child nodes correspond to the sub-item name, professional category and drawing file respectively. The core logic of this step is to transform the segmented unordered units into structured tree nodes through template constraints.

[0058] In this embodiment, the preset project structure template is a user-defined standard hierarchical framework (e.g., "by project > sub-item > specialty > specific PDF structure display"). It specifies that the root node must be the project name (e.g., "Project X3"), the first-level child nodes are sub-item names (e.g., "Building #1"), the second-level child nodes are specialty categories (e.g., "Structural Engineering" and "Architectural Engineering"), and the third-level child nodes are drawing files (e.g., "12-265-10.pdf"). During mapping, the segmented hierarchical units are matched according to the template order: for example, the segmented "Project X3" corresponds to the root node (project layer), "Building #1" is a child node (sub-item layer), "Structural Engineering" is a grandchild node (specialty layer), and "12-265-10.pdf" is a leaf node (file layer).

[0059] In addition, if a certain level is missing (such as having only "Project-Sub-item-File" but no specialty level), the template will complete it according to the default rules (such as directly mounting the file to the sub-item level) to ensure the integrity of the tree structure.

[0060] Step S203: Assign a node identifier to each tree node according to the preset node type; wherein, the preset node types include project layer, sub-item layer, professional layer and document layer; Specifically, the allocation of node identifiers is the key to making node types machine-readable. The logic is to distinguish nodes at different levels through unique encoding, providing a basis for subsequent permission binding and operation location.

[0061] In this application embodiment, the node types (project layer, sub-item layer, professional layer, and document layer) correspond to different management granularities in the business: the project layer is the highest management unit (such as the entire "Project X3" project), the sub-item layer is the project branch (such as "Building 1"), the professional layer is the technical category (such as the "structural engineering" specialty), and the document layer is the smallest unit (a single drawing).

[0062] Next, when assigning identifiers, the "type prefix + unique sequence number" rule is typically used. For example, a project-level node is identified as "P-001" (P stands for Project), a sub-item as "S-001-01" (S stands for Subitem, followed by the project sequence number and sub-item sequence number), a specialty as "M-001-01-01" (M stands for Major, followed by the project, sub-item, and specialty sequence numbers), and a file as "F-001-01-01-001" (F stands for File). This coding system enables the system to quickly identify the location of nodes in the business architecture, avoiding confusion.

[0063] Step S204: Based on the permission group allocation strategy in the project configuration parameters, associate and map the preset permission tag groups with the node types. This step is the core design of dynamically binding permissions to business roles, achieving fine-grained allocation of permissions through policy-driven approaches, replacing the traditional fixed permission model.

[0064] In this embodiment of the application, the "permission group allocation strategy" in the project configuration parameters defines the permission groups that can be associated with different node types. For example, the "administrator permission group" is associated with project-level nodes (which need to coordinate permissions for the entire project), the "project initiator permission group" is associated with sub-item-level nodes (which are responsible for uploading and editing files within sub-items), and the "project reviewer permission group" is associated with professional-level nodes (which review the compliance of drawings within a professional field).

[0065] Permission tag groups are predefined sets of operation permissions, including file upload permissions (allowing the uploading of drawings), field editing permissions (modifying drawing label data), conflict detection permissions (performing drawing number verification), and archiving operation permissions (triggering data linking). The essence of association mapping is to establish a three-dimensional correspondence between "node type - permission group - permission tag". For example, a project-level node (P-001) is bound to the "administrator permission group," which includes "archiving operation permissions" and "conflict detection permissions," ensuring that only administrators can perform archiving or full-project conflict checks on project-level nodes.

[0066] Step S205: Match the corresponding permission tag group according to the type of the node identifier, and generate an original file tree with multi-level operation permission tags for each tree node.

[0067] This step integrates permissions and tree structure output. The logic is to combine the type characteristics of node identifiers with the mapping relationship of permission tag groups, and to assign a specific permission tag to each node, forming an integrated original file tree of "node-permission".

[0068] For example, the node identifier "P-001" (project level) matches the "administrator permission group" according to the association mapping relationship in step four, and the "archiving operation permission" and "conflict detection permission" contained in this group are attached to this node; the node identifier "F-001-01-01-001" (file level) matches the "project initiator permission group" and is attached with "file upload permission" and "field editing permission". In the final generated original file tree, each node (such as project, sub-item, specialty, file) carries a clear permission label, such as the "Project X3" node labeled "[Permission: Administrator - Archive / Detection]", and the "Building 1" node labeled "[Permission: Initiator - Upload / Edit]".

[0069] Understandably, this tree structure with permission labels is like labeling each department in an organizational chart with "approvable items," enabling subsequent processes to automatically control the scope of operations based on node permissions and preventing unauthorized access.

[0070] In the above implementation, the folder names and file paths of the drawing file set are extracted and the hierarchical relationship is segmented, achieving accurate parsing of the hierarchical structure of the drawing file set and ensuring a clear correspondence between project, sub-item names, professional categories, and drawing files. Based on a preset project structure template, the hierarchical relationship is mapped to tree nodes, standardizing the node types at each level (project level, sub-item level, professional level, file level), providing a structural foundation for subsequent permission management. By assigning node identifiers and associating them with permission tag groups, accurate binding of multi-level operation permissions is achieved, solving the problems of unclear hierarchical structure and chaotic permission allocation in traditional drawing management, and improving the automation and structuring level of drawing processing.

[0071] In practical applications, the binding of multi-level permission tags in this technical solution ensures that users with different roles (such as uploaders, catalogers, reviewers, and archivers) can only operate on nodes at their corresponding levels, avoiding unauthorized operations, improving the security and standardization of document management, reducing the cost of manual intervention, and increasing the efficiency of document processing.

[0072] Reference Figure 3 As one implementation of step S103, the steps of calling the OCR recognition engine to process the preprocessed image data, locating the label area and extracting text information, performing standardized cleaning operations on the text information, and generating an original recognition result set containing text content and confidence levels include: Step S301: Obtain the recognition mode in the project configuration parameters, call the preset target detection model to process the preprocessed image data, and automatically locate and generate the initial map tag area coordinates; Specifically, the recognition mode in the project configuration parameters is a user-preset process control instruction, which is divided into "normal mode" and "unattended mode": the normal mode is suitable for fine recognition scenarios that require human intervention (such as complex labels and blurry drawings), while the unattended mode is for batch automated processing (such as digitization of historical drawings).

[0073] In this embodiment of the application, the preset target detection model (such as the YOLO model) is a visual recognition algorithm based on deep learning training. By learning the visual features of a large number of image samples (such as table borders in fixed positions, specific text layouts, and proportional sizes), it can automatically locate the image region in the preprocessed image data and output its boundary coordinates (such as the pixel positions of the upper left and lower right corners).

[0074] For example, for an A0-size architectural drawing, the object detection model can quickly locate a rectangular area containing information such as the design number and project name, based on prior knowledge that the title block is usually located in the lower right corner of the drawing, and generate initial title block area coordinates (e.g., x_min=1200, y_min=800, x_max=1800, y_max=1000). This step, by automatically locating the title block using an algorithm, replaces traditional manual selection, significantly improving the efficiency and consistency of title block area extraction and providing a precise input range for subsequent OCR recognition.

[0075] Step S302: Based on the initial image region coordinates, call the OCR recognition engine to perform global OCR recognition on the preprocessed image data, extract and generate initial text information and corresponding initial confidence scores; In the embodiments of this application, the OCR recognition engine (such as the PaddleOCR development kit) is a software module based on optical character recognition technology, which can convert the text shapes in an image into computer-editable text data.

[0076] During global OCR recognition, the engine scans all pixels within the initial signature area: first, it segments the image into individual character regions using connected component analysis or projection methods; then, it uses a deep learning model (such as CRNN+Attention) to extract features and classify each character, ultimately outputting the initial text information (e.g., "Design No.: 12-265" and "Figure No.: 10"). Simultaneously, the engine generates an initial confidence score of 0-100% for each recognized text field based on factors such as character segmentation clarity, glyph integrity, and background interference. This score measures the reliability of the recognition result (e.g., "Design No.: 12-265" has a confidence score of 98%, indicating extremely high reliability).

[0077] For example, for a clear, standardized image label, the OCR engine can accurately identify all fields and assign a high confidence score; however, for an image label with stains or interference, it may output a lower confidence score. This step transforms the visual image into structured text data, laying the foundation for subsequent cleaning, correction, and structuring processing.

[0078] Step S303: If the recognition mode is normal mode, the user input intervention command is received, the initial map sign area coordinates are corrected and updated to obtain the target map sign area, and the initial text information is re-extracted and updated based on the target map sign area; if the recognition mode is unattended mode, the user intervention step is skipped and the initial text information is directly retained. Specifically, in normal mode, the system allows users to correct the initial coordinates of the title block area through interface interactions (such as dragging a rectangle and adjusting vertices). Users can modify the coordinates in the attribute table on the right or quickly switch and precisely zoom in on the recognition area using the title block view function buttons, generating more accurate target title block area coordinates. Subsequently, the system uses the updated coordinates to re-invoke the OCR recognition engine to recognize the area, updating the initial text information (such as correcting the initially incorrectly recognized "design number" to "design number"). This mechanism fully utilizes the user's professional knowledge of the drawings, compensating for the algorithm's limitations in specific scenarios.

[0079] In unattended mode, the system operates fully automatically, skipping all user interaction and directly retaining the initial text information. In other words, unattended mode automatically executes the process from recognition to recording, meeting the extreme efficiency requirements of batch processing. For example, when processing 100,000 historical drawings, unattended mode can run 24 / 7, while the regular mode is suitable for high-precision proofreading of a small number of critical drawings. This design achieves adaptive scenarios that prioritize both accuracy and efficiency.

[0080] Step S304: Perform a standard cleaning operation on the updated or directly retained initial text information to generate the cleaned text information. Among them, the standard cleaning operation is a series of rule-based text processing processes, specifically including: filtering illegal characters (such as spaces, decimal points, Chinese punctuation marks, for example, removing the full stop in "Design number: 12-265."), converting traditional Chinese characters to simplified Chinese characters (such as converting "設計號" to "设计号"), and uniformly converting English letters to uppercase format (such as converting "Design" to "DESIGN"). These operations are achieved through string matching and replacement algorithms, without changing the semantic content of the text, only optimizing its presentation form.

[0081] For example, the initial text information "Design number: 12-265 (Structural drawing)" becomes "Design number: 12-265 Structural drawing" after cleaning, removing spaces and parentheses and unifying the format. The cleaned text information eliminates data irregularities caused by OCR recognition fluctuations or differences in the original drawing format, providing clean and consistent input data for subsequent spatial clustering, semantic correction, and structured field generation.

[0082] Step S305: Combine the cleaned text information with the corresponding initial confidence level to generate an original recognition result set containing the text content and confidence level.

[0083] Among them, the combination operation corresponds the cleaned text information (such as "Design number: 12-265") with the initial confidence level generated during OCR recognition (such as 98%) one by one, and organizes it into a structured data set by fields (such as design number, project name, drawing number, etc.). Each field entry contains two core attributes, "text content" and "confidence level", for example: {"field name": "Design number", "text content": "12-265", "confidence level": 98%}.

[0084] Finally, the generated original recognition result set is a bridge connecting OCR recognition and subsequent structured processing. It not only contains the specific information recognized, but also provides a quantitative basis for subsequent quality filtering (such as excluding fields with low confidence levels) through the confidence level. For example, the system can quickly screen out all fields with a confidence level below 80% based on this result set for highlighting and prompting manual review. This step ensures the controllability and traceability of the recognition result quality, laying a foundation for the reliability of the entire intelligent recognition and structured archiving method for drawing files.

[0085] The above implementation achieves dual-mode adaptive processing and full-process quality control in the image tag recognition process. The target detection model automatically locates the image tag area, balancing efficiency and accuracy. User intervention in the conventional mode and fully automated processing in the unattended mode flexibly adapt to the differentiated needs of fine-grained proofreading and batch archiving. Standardized cleaning operations eliminate text format noise, improving data standardization. The final generated raw recognition result set contains both text content and confidence information, providing a high-quality data foundation for subsequent confidence filtering, spatial clustering, semantic correction, and structured field generation.

[0086] In practical applications, this technical solution effectively solves the problems of cumbersome manual operation, unstable recognition accuracy, and chaotic data format in traditional drawing and document digitization, improves the efficiency and reliability of drawing and document processing, and provides strong technical support for the digital transformation of engineering design and archives management.

[0087] Reference Figure 4 As one implementation of step S104, the steps of performing confidence filtering on the original recognition result set based on a preset threshold, marking fields below the threshold, and applying spatial clustering algorithms and semantic correction rules to aggregate the tag data to generate a structured field table include: Step S401: Obtain the preset threshold from the project configuration parameters; Among them, the project configuration parameters are a set of rules defined by the user before the process starts. They include the key field of "preset threshold", which is used to quantify the confidence level of the OCR recognition results (such as 80% or 90%).

[0088] In this embodiment, the acquisition of the preset threshold is not a simple numerical reading, but rather a transformation of the user's data quality requirements into technical parameters that the system can execute: for example, historical drawing digitization projects may accept a lower threshold (e.g., 75%) to balance processing efficiency due to limited drawing clarity; while key drawings for newly established key projects require a higher threshold (e.g., 95%) to ensure absolute data accuracy. This dynamic configuration mechanism avoids the rigidity of traditional fixed thresholds, enabling subsequent confidence filtering to accurately match the actual needs of the project, laying a quality foundation for structured aggregation.

[0089] Step S402: Compare the confidence level of each field in the original recognition result set with a preset threshold, mark the fields with confidence levels lower than the preset threshold, and retain the unmarked fields with confidence levels reaching the preset threshold. The original recognition result set contains all fields output by the OCR recognition engine and their corresponding confidence scores (e.g., "Design No.: 12-265, Confidence 98%", "Drawing No.: 10, Confidence 72%"). The system iterates through the confidence values ​​of each field in the result set and compares them with a preset threshold (e.g., 80%). If a field's confidence score is lower than the threshold (e.g., 72% < 80%), it is marked as a "low-confidence field" and highlighted. If the confidence score reaches or exceeds the threshold (e.g., 98% ≥ 80%), it is retained as an "unmarked field". This filtering mechanism temporarily isolates unreliable low-confidence fields, allowing only verified high-confidence fields to enter the subsequent clustering stage, ensuring the accuracy of structured data from the source, and providing clear guidance for manual review.

[0090] Step S403: Obtain the coordinates of the generated initial map tag area, and associate and map the initial map tag area coordinates with the labeled field and the unlabeled field to generate a clustering field carrying coordinate information; The initial tag region coordinates are the bounding box coordinates generated by the target detection model when locating the tag in the previous step (e.g., x_min=1200, y_min=800, x_max=1800, y_max=1000), which accurately describes the spatial position of the tag in the image.

[0091] In this embodiment, the system associates each field (regardless of whether it is labeled or not) with the initial coordinates of its corresponding map label area. For example, the field "Design No.: 12-265" is associated with coordinates (1200, 800) - (1800, 1000), and the field "Drawing No.: 10" is similarly associated with the same coordinate range. This association generates "fields to be clustered" that not only contain text content and confidence levels but also carry spatial location information (such as the x / y coordinates of the field's center point). This allows the system to determine whether fields belong to the same map label group based on their physical location relationships, solving the spatial logic problem that pure text clustering cannot handle.

[0092] Step S404: Apply a spatial clustering algorithm to the fields to be clustered, and cluster them according to spatial adjacency based on the associated coordinate information to generate the clustered map data; Specifically, spatial clustering algorithms (such as density-based DBSCAN or distance-based K-Means variants) take the coordinate information of the fields to be clustered as input, calculate the Euclidean distance between the fields (if the distance between the center points of two fields is less than a preset radius, they are determined to be adjacent), and cluster the fields belonging to the same map label area into a group.

[0093] For example, within a certain title block area, there are three fields: "Design Number: 12 - 265", "Project Name: Project X3", and "Drawing Number: 10". Their positions in the image are adjacent (the distances are all less than 50 pixels). The algorithm will aggregate these three fields into a clustering group and generate "title block data after clustering and grouping". This kind of aggregation based on spatial adjacency perfectly fits the layout characteristics of the title block of engineering drawings (related fields are concentrated in a fixed area), effectively solves the problem of fragmented OCR recognition results, and provides a complete context unit for subsequent semantic correction.

[0094] Step S405: Process the title block data after clustering and grouping based on preset semantic correction rules, merge redundant fields, and correct the misrecognized text into preset standard text to generate corrected title block data. Among them, the preset semantic correction rules are systematically defined text processing strategies, mainly including three types of operations: First, merge redundant fields (such as merging the recognized "设", "计", "号" into "设计号" to eliminate character segmentation errors); second, convert traditional Chinese characters to simplified Chinese characters (such as converting "設計號" to "设计号"); third, replace error patterns (such as correcting "1#搂" to "1#楼" based on a preset error pattern library to match common OCR errors).

[0095] Specifically, the processing process is independently executed within each clustering group: For example, a certain group contains "Sub - item Name: 1#搂" and "Drawing Type: 结搂". The system will uniformly correct "搂" to "楼" through error pattern matching and generate the corrected results of "Sub - item Name: 1#楼" and "Drawing Type: 结施". This in - group correction mechanism avoids cross - title - block semantic interference, ensures that the correction operation accurately targets the logically related fields within the same title block, and greatly improves the reliability of semantic correction.

[0096] Step S406: Generate a structured field table from the corrected title block data according to the preset field mapping rules.

[0097] Among them, the preset field mapping rules are the corresponding relationships between user - defined fields and target table columns. For example, it is stipulated that the "Design Number" field is mapped to the "Design Number" column of the table, the "Project Name" is mapped to the "Project Name" column, and the "Drawing Number" is mapped to the "Drawing Number" column.

[0098] For example, the system fills the corrected drawing label data (such as "Design No.: 12-265", "Project Name: Project X3", "Drawing No.: 10") into the corresponding positions in the table according to this rule, generating a complete structured record. For instance, the corrected data for a certain cluster group will be mapped to a row in the structured field table: "Design No.: 12-265 | Project Name: Project X3 | Sub-item Name: Building 1# | Drawing Type: Structural | Drawing No.: 10". This mapping mechanism transforms fragmented drawing label information into tabular data that can be efficiently processed by a computer, providing standardized input for subsequent conflict detection, storage architecture creation, and filename generation.

[0099] In the above implementation, dynamic thresholds are used to adapt to different project quality requirements. Spatial clustering is used to restore the physical layout of the image tags, and semantic correction is used to eliminate text recognition errors, ultimately generating a standardized field table. This process effectively solves the problems of fragmented processing, semantic breaks, and chaotic formatting in traditional OCR recognition. It transforms the unstructured image tag information in the original image into structured data with an accuracy rate of over 95%, providing a reliable data foundation for image digitization, reducing manual proofreading costs, and improving the automation level and data availability of archive management.

[0100] Reference Figure 5 As one implementation of step S106, the step of generating a two-layer PDF file based on the collision detection results includes: Step S501: Obtain the collision detection results; Among them, the conflict detection result is the output of the logical verification of the structured field table in the previous step (including the verification of drawing number duplication), and its status directly determines the direction of the subsequent process.

[0101] Step S502: Determine whether the collision detection result is successful; if it is unsuccessful, proceed to step S503; if it is successful, proceed to step S504. Step S503: Trigger the exception handling process based on the conflict detection result, and perform subsequent generation operations after obtaining the updated conflict detection result as passed; For example, if the conflict detection result is "fail" (e.g., two drawings are detected with the same drawing number "10"), the system will immediately trigger an exception handling process: suspend the current generation operation, generate an exception flag based on the conflict detection result (e.g., a specific duplicate drawing number), and revert the task to the previous stage (e.g., the structured field table correction stage), waiting for the user or system to correct the error and resubmit for detection. Only when the conflict detection result is updated to "pass" will the system unsuspend and continue executing the subsequent two-layer PDF generation operation. This mechanism ensures that only compliant data can enter the final archiving stage, avoiding the invalid processing and storage waste of erroneous data from the source.

[0102] Step S504: Obtain the text information extracted by the OCR recognition engine, configure the text information as a searchable text format, and generate a text layer; The text information extracted by the OCR recognition engine (such as “Design No.: 12-265”, “Drawing No.: 10”, etc.) is a digital mapping of the image content, but its original format (such as plain string) cannot be directly embedded into PDF to achieve the search function.

[0103] Therefore, the system needs to configure this text information into a searchable text format: First, based on the coordinates of the text in the original image, each text field is precisely mapped to the corresponding pixel position on the PDF page; second, the text is embedded as a "hidden layer" using a PDF generation library (such as iText or PDFBox), with its transparency set to completely transparent, so as not to obscure the underlying image while allowing search engines to crawl the text content. For example, the text "12-265" is embedded in the PDF at a position that completely overlaps with the original label "Design Number" field. When a user searches for "12-265", the system can instantly locate and highlight this layer. This step gives static images the ability to "talk," changing the limitation of traditional scanned documents that are "viewable but not searchable."

[0104] Step S505: Obtain the preprocessed image data and configure it as a visualization display format to generate an image layer; The preprocessed image data serves as the visual carrier of the drawing content, and its clarity and completeness directly affect the quality of the archive. The system configures it for a visual display format: it uses a lossless compression algorithm (such as LZW compression) to encapsulate the image data into an image object supported by PDF, sets the resolution to 300 DPI (compliant with DA / T 77-2019 specifications), and ensures that the image color mode (such as grayscale or black and white) is completely consistent with the original scanned document.

[0105] For example, a pre-processed scan of a historical sulfonate drawing will retain the original features of the paper, such as yellowing and faded lines, as well as additional information like handwritten annotations and seals. This step is like digitizing and preserving the paper drawing, providing a visual experience indistinguishable from the original for subsequent viewing, thus meeting the strict requirements of archival management for originality and evidentiary value.

[0106] Step S506: Overlay and merge the text layer and the image layer to generate a two-layer PDF file.

[0107] The system utilizes the layer management function of the PDF generation library to precisely overlay the text layer (transparent and searchable) on top of the image layer (opaque and visual): the text layer serves as the top layer, with its coordinates strictly aligned with the corresponding content in the image layer; the image layer serves as the bottom layer, providing the visual background.

[0108] Specifically, during the merging process, the system optimizes the interaction logic between the two layers. For example, when a user selects content in the text layer, the corresponding area in the image layer is simultaneously highlighted; when a user zooms in on the image, the font size in the text layer dynamically adjusts proportionally to maintain clarity. Ultimately, the generated two-layer PDF file possesses both characteristics: the image layer satisfies the originality of "what you see is what you get," while the text layer satisfies the convenience of "what you search for is what you get." For instance, when a designer needs to find drawings for "elevation -2.000 floor wall," they only need to enter keywords in the PDF search box, and the system will locate the corresponding position through the text layer, while the image layer displays the complete drawing details, eliminating the need to flip through each page.

[0109] In the above implementation, automated access control based on conflict detection results ensures the logical correctness of archived data; through the separation and precise overlay of text and image layers, the legal validity and visual details of the original drawings are preserved, while also endowing them with efficient digital retrieval capabilities; the final generated two-layer PDF file serves as a standardized data carrier, providing a solid foundation for the subsequent linkage and rapid retrieval of drawings and data in the archive system, improving the efficiency and compliance of drawing and document management, and providing reliable technical support for the digital transformation of engineering design and archive management.

[0110] Reference Figure 6 As one implementation of step S108, the step of generating standardized drawing file names according to preset naming rules based on the drawing label data in the structured field table includes: Step S601: Obtain the preset naming rules from the project configuration parameters; The preset naming rules clearly define the format of standardized drawing file names (such as "drawing number name.pdf", "name-drawing number.pdf", "design number-sub-item name-drawing type-drawing number.pdf", etc.), which essentially transforms users' personalized needs for file naming (such as distinguishing between projects, sub-items, and drawing types) into executable instructions for the system.

[0111] Specifically, the retrieval operation reads the rule definitions in the configuration parameters (such as string concatenation order, delimiter type, and file extension) to provide templates for subsequent field combinations, much like preparing differentiated naming templates for different scenarios. For example, historical drawing projects may use the "design number-drawing number" rule, while new projects use the "sub-item name drawing type_drawing number" rule, ensuring that the generated file name strictly matches the project characteristics.

[0112] Step S602: Extract fields from the title data in the structured field table to obtain the title number field and the title name field; The structured field table is a standardized table generated in the preceding steps, including but not limited to multiple fields such as drawing number, drawing name, design number, project name, sub-project name, drawing type, date, project leader, professional leader, designer, drafter, version number, and drawing size; the title data specifically refers to the text information in the title area after OCR recognition and aggregation (such as "drawing number: 10" and "name: first floor structure supporting").

[0113] In this step, the extraction operation first identifies the field type, selecting only data marked as "Drawing Number Field" and "Name Field" (e.g., the value "10" for the "Drawing Number" column and the value "First Floor Structure Matching" for the "Name" column in the table), ignoring irrelevant fields (such as "Date" and "Designer"). This selective extraction ensures that subsequent combination generation is based solely on core identification information, improving processing efficiency.

[0114] Step S603: According to the preset naming rules, combine the drawing number field and the name field to generate a standardized drawing file name.

[0115] The preset naming rules (such as "the drawing number field is used as a prefix and the name field is used as a suffix") define how the fields are combined. For example, when the rule is "drawing number name.pdf", the extracted drawing number "10" and the name "first-layer structure matching" will be concatenated into "10 first-layer structure matching.pdf"; if the rule is "name-drawing number", then "first-layer structure matching-10.pdf" will be generated.

[0116] It should be noted that the format requirements in the rules must be strictly followed during the combination process (such as using "_" or "-" as separators, and whether to include file extensions) to ensure that the generated file name is unique and resolvable throughout the entire project. For example, a drawing with drawing number "10" and name "Elevation-2.000 Floor Wall" can be generated as "10-Elevation-2.000 Floor Wall.pdf" according to the "Drawing Number-Name.pdf" rule. This not only includes the core identifier but also ensures naming consistency through the rules, providing a clear index for subsequent archiving and retrieval.

[0117] The above implementation achieves automated and standardized generation of drawing file names, effectively solving the problems of chaotic formatting, error-proneness, and low efficiency in traditional manual naming. By dynamically obtaining preset naming rules from project configuration parameters and intelligently combining them with the drawing number and name fields in the structured field table, strict consistency and business relevance between file names and drawing label data are ensured. This standardized naming mechanism not only improves the convenience of drawing retrieval and retrieval but also establishes a reliable foundation for the subsequent creation of a three-level storage architecture and data push, realizing standardized management of drawing resources from identification to archiving, reducing manual intervention costs and improving data quality.

[0118] Reference Figure 7As a further implementation of the intelligent drawing recognition and structured archiving method, after the step of generating standardized drawing file names according to preset naming rules based on the drawing label data in the structured field table, the method further includes: Step S701: If it is detected that the image label data in the structured field table has been modified, then obtain the updated image number field and the updated name field after modification. The structured field table is a dynamic data carrier that stores the core attributes of the image tag. The system captures changes in field values ​​in real time through database triggers or event listening mechanisms (such as the "attribute and file name linkage" function).

[0119] For example, when a user modifies the drawing number or name field in the front-end interface (e.g., changing "Drawing Number: 10" to "11"), or modifies the name field (e.g., changing "First Floor Structural Supporting Structure" to "First Floor Structural Wall"), the system will immediately recognize the change and extract the updated field value. This monitoring mechanism ensures that any subtle data adjustments are captured in real time, providing an accurate input source for subsequent synchronous updates of filenames and storage paths, and avoiding data inconsistencies caused by delays or omissions.

[0120] Step S702: According to the preset naming rules, the updated drawing number field and the updated name field are recombined to generate the updated standardized drawing file name; Among them, the preset naming rules (such as "design number-sub-item name-drawing type-drawing number") are standardized templates defined when the project starts. The core of these rules is to combine fields such as drawing number and name with separators in a fixed order.

[0121] In this embodiment, the system substitutes the obtained updated drawing number field (e.g., "11") and updated name field (e.g., "first-floor structural wall") into the rule template: if the rule is "drawing number-name.pdf", then "11-first-floor structural wall.pdf" is generated; if the rule is "name-drawing number.pdf", then "first-floor structural wall 11.pdf" is generated. This recombination process completely reuses the naming logic of the previous steps, only replacing the changed fields, which not only ensures the consistency of the file name (e.g., all drawings use the same rule), but also realizes the real-time update of the modified file name, avoiding the tediousness and error-proneness of traditional manual renaming.

[0122] Step S703: Based on the updated standardized drawing file name, update the associated path hierarchy in the pre-created three-level file storage architecture.

[0123] The three-level file storage architecture (e.g., "Design Number + Project Name → Sub-item Name → Drawing Type") is a pre-created hierarchical folder system with a strong association between the path and the file name (e.g., the original path " / 12-265-Project X3 / Building 1# / Structural Design / 10-First Floor Structural Supporting Documents.pdf"). When the file name is updated to "11-First Floor Structural Wall.pdf", the system will automatically locate the three-level path where the original file is located and perform two update operations: first, modify the file name itself (from the old name to the new name), and second, recursively adjust the hierarchy of associated folders (if the drawing number changes, the parent folder needs to be renamed, such as renaming the "10" folder to "11").

[0124] For example, if the original path is " / Project A / Sub-item B / Specialty C / 10-Drawings.pdf", and the drawing number is changed to "11", the system will rename the file to "11-Drawings.pdf" and replace the file in the corresponding 'Specialty C' folder in the three-level architecture, ensuring that the path corresponds to the latest data. This update mechanism can automatically maintain the three-in-one relationship of "data-filename-storage location", eliminating the disconnect problem in traditional management where "the filename is changed but the folder is not".

[0125] The above implementation effectively solves the technical problem of filenames and storage paths becoming disconnected after map data is modified. By monitoring changes in the structured field table in real time and automatically triggering the update process, strict consistency between map label data, filenames, and storage paths is ensured; by recombining fields using preset naming rules, the standardization and uniformity of filenames are maintained; and by recursively updating the associated path hierarchy of the three-level file storage architecture, real-time synchronization between physical storage structure and logical data is achieved.

[0126] In practical applications, this mechanism reduces manual maintenance costs, avoids management chaos caused by data modification, improves the reliability and user experience of the drawing and document system, and provides efficient and accurate technical support for dynamic data management in the fields of engineering design and document management.

[0127] This application also discloses an OCR-based intelligent image recognition and structured archiving system.

[0128] An OCR-based intelligent image recognition and structured archiving system, specifically including: The file receiving and permission binding module is used to receive the drawing file set and project configuration parameters uploaded by the user, parse the hierarchical structure of the drawing file set to generate the original file tree, and bind multi-level operation permission tags to the original file tree; The image preprocessing module is used to perform image preprocessing operations on the drawing files in the original file tree, including binarization, noise reduction and rotation correction, to generate preprocessed image data; The OCR recognition and text cleaning module is used to call the OCR recognition engine to process the preprocessed image data, locate the label area and extract the text information, perform standardized cleaning operations on the text information, and generate a raw recognition result set containing text content and confidence level. The data filtering and structured aggregation module is used to perform confidence filtering on the original recognition result set based on a preset threshold, mark fields below the threshold, and apply spatial clustering algorithms and semantic correction rules to aggregate the tag data and generate a structured field table. The conflict detection module is used to perform conflict detection on the structured field table and generate conflict detection results. Conflict detection includes drawing number duplication verification. The dual-layer PDF generation module is used to generate dual-layer PDF files based on collision detection results. The text layer embeds text information extracted by the OCR recognition engine, while the image layer retains the original image. The three-level storage architecture creation module is used to create a three-level file storage architecture based on the design number, sub-item name, and drawing type field in the structured field table; The standardized file name generation module is used to generate standardized drawing file names according to preset naming rules based on the drawing label data in the structured field table; The data push and association module is used to push the path information of the two-layer PDF file and the three-level file storage architecture, the standardized drawing file name, and the drawing label data in the structured field table to the target file management system, and establish the association relationship between the drawing label data, file name, and storage path.

[0129] An OCR-based intelligent image recognition and structured archiving system according to an embodiment of this application can implement any of the above methods, and the specific working process of each module in the system can refer to the corresponding process in the above method embodiments.

[0130] In the several embodiments provided in this application, it should be understood that the provided methods and systems can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for example, the division of a certain module is merely a logical functional division, and in actual implementation there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.

[0131] This application also discloses a computer device.

[0132] Computer equipment, including memory, processor, and computer program stored on memory and executable on processor, wherein the processor executes computer program to implement an OCR-based intelligent image recognition and structured archiving method as described above.

[0133] This application also discloses a computer-readable storage medium.

[0134] A computer-readable storage medium storing a computer program that can be loaded by a processor and executed as described above in any of the OCR-based methods for intelligent image recognition and structured archiving.

[0135] The computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device; the program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0136] The above are all preferred embodiments of this application and are not intended to limit the scope of protection of this application. Any feature disclosed in this specification (including the abstract and drawings) may be replaced by other equivalent or similar features unless specifically stated otherwise. That is, unless specifically stated otherwise, each feature is only one example of a series of equivalent or similar features.

Claims

1. A method for intelligent image recognition and structured archiving based on OCR, characterized in that, The method includes: Receive the set of drawing files and project configuration parameters uploaded by the user, parse the hierarchical structure of the set of drawing files to generate the original file tree, and bind multi-level operation permission tags to the original file tree; Image preprocessing operations are performed on the drawing files in the original file tree, including binarization, noise reduction and rotation correction, to generate preprocessed image data; The preprocessed image data is processed by calling the OCR recognition engine to locate the label area and extract the text information. The text information is then subjected to standardized cleaning operations to generate an original recognition result set containing text content and confidence level. The original recognition result set is subjected to confidence filtering based on a preset threshold, fields below the threshold are marked, and spatial clustering algorithm and semantic correction rules are applied to aggregate the image tag data to generate a structured field table. Perform conflict detection on the structured field table and generate conflict detection results, wherein the conflict detection includes drawing number duplication verification; A two-layer PDF file is generated based on the conflict detection results, wherein the text layer embeds the text information extracted by the OCR recognition engine, and the image layer retains the original image; Based on the design number, sub-item name, and drawing type fields in the structured field table, create a three-level file storage architecture; Based on the title data in the structured field table, generate standardized drawing file names according to preset naming rules; The path information of the two-layer PDF file, the three-level file storage architecture, the standardized drawing file name, and the title data in the structured field table are pushed to the target file management system to establish the association between the title data, file name, and storage path.

2. The method for intelligent recognition and structured archiving of image documents based on OCR according to claim 1, characterized in that, The steps of parsing the hierarchical structure of the drawing file set to generate an original file tree, and binding multi-level operation permission tags to the original file tree, include: Extract the folder names and file paths from the drawing file set, and obtain the hierarchical relationship by dividing the files according to the path separator; Based on a preset project structure template, the hierarchical relationship is mapped to tree nodes; wherein, the root node corresponds to the project name, and the child nodes correspond to the sub-item name, professional category and drawing file in sequence; Each tree node is assigned a node identifier according to a preset node type; wherein the preset node types include project layer, sub-item layer, professional layer and file layer; Based on the permission group allocation strategy in the project configuration parameters, the preset permission tag groups are associated and mapped with the node types; Match the corresponding permission tag group according to the type of the node identifier, and generate an original file tree with multi-level operation permission tags for each tree node.

3. The method for intelligent image recognition and structured archiving based on OCR according to claim 1, characterized in that, The steps of calling the OCR recognition engine to process the preprocessed image data, locate the label area and extract text information, perform standardized cleaning operations on the text information, and generate an original recognition result set containing text content and confidence level include: Obtain the recognition mode from the project configuration parameters, call the preset target detection model to process the preprocessed image data, and automatically locate and generate the initial map tag area coordinates; Based on the initial image region coordinates, the OCR recognition engine is invoked to perform global OCR recognition on the preprocessed image data, extracting and generating initial text information and the corresponding initial confidence level. If the recognition mode is the normal mode, the user-inputted intervention command is received, the coordinates of the initial image area are corrected and updated to obtain the target image area, and the initial text information is re-extracted and updated based on the target image area; if the recognition mode is the unattended mode, the user intervention step is skipped and the initial text information is directly retained. Perform the standardized cleaning operation on the updated or directly retained initial text information to generate cleaned text information; The cleaned text information is combined with the corresponding initial confidence level to generate an original recognition result set containing text content and confidence level.

4. The method for intelligent recognition and structured archiving of image documents based on OCR according to claim 3, characterized in that, The steps of performing confidence filtering on the original recognition result set based on a preset threshold, marking fields below the threshold, and aggregating the tag data using spatial clustering algorithms and semantic correction rules to generate a structured field table include: Retrieve the preset threshold from the project configuration parameters; The confidence level of each field in the original recognition result set is compared with the preset threshold. Fields with confidence levels lower than the preset threshold are marked, while unmarked fields with confidence levels reaching the preset threshold are retained. Obtain the coordinates of the generated initial tag area, and associate the initial tag area coordinates with the labeled field and the unlabeled field to generate a clustering field carrying coordinate information; A spatial clustering algorithm is applied to the field to be clustered, and the clusters are grouped according to spatial adjacency based on the associated coordinate information to generate the clustered and grouped map data; Based on preset semantic correction rules, the clustered and grouped image tag data is processed, redundant fields are merged, and misidentified text is corrected to preset standard text to generate corrected image tag data. The corrected image tag data is used to generate a structured field table according to preset field mapping rules.

5. The method for intelligent recognition and structured archiving of images based on OCR according to claim 1, characterized in that, The steps for generating a two-layer PDF file based on the collision detection results include: Obtain the conflict detection results; Determine whether the conflict detection result is passed; if it is not passed, trigger the exception handling process based on the conflict detection result, and perform subsequent generation operations after obtaining the updated conflict detection result as passed. If successful, the text information extracted by the OCR recognition engine is obtained, the text information is configured into a searchable text format, and a text layer is generated. The preprocessed image data is acquired and configured into a visualization display format to generate an image layer; The text layer and the image layer are superimposed and merged to generate the two-layer PDF file.

6. The method for intelligent recognition and structured archiving of image documents based on OCR according to claim 1, characterized in that, The steps for generating standardized drawing file names according to preset naming rules based on the title data in the structured field table include: Obtain the preset naming rules from the project configuration parameters; Fields are extracted from the image label data in the structured field table to obtain the image number field and the name field; According to the preset naming rules, the drawing number field and the name field are combined to generate the standardized drawing file name.

7. A method for intelligent recognition and structured archiving of image documents based on OCR according to any one of claims 1 to 6, characterized in that, After the step of generating standardized drawing file names according to preset naming rules based on the title data in the structured field table, the method further includes: If the image label data in the structured field table is detected to have been modified, the updated image number field and the updated name field are obtained after modification. According to the preset naming rules, the updated drawing number field and the updated name field are recombined to generate the updated standardized drawing file name; Based on the updated standardized drawing file names, update the associated path hierarchy in the pre-created three-level file storage architecture.

8. A system for intelligent image recognition and structured archiving based on OCR, characterized in that, The system includes: The file receiving and permission binding module is used to receive the drawing file set and project configuration parameters uploaded by the user, parse the hierarchical structure of the drawing file set to generate the original file tree, and bind multi-level operation permission tags to the original file tree; The image preprocessing module is used to perform image preprocessing operations on the drawing files in the original file tree, including binarization, noise reduction and rotation correction, to generate preprocessed image data; The OCR recognition and text cleaning module is used to call the OCR recognition engine to process the preprocessed image data, locate the image label area and extract text information, perform standardized cleaning operations on the text information, and generate an original recognition result set containing text content and confidence level. The data filtering and structured aggregation module is used to perform confidence filtering on the original identification result set based on a preset threshold, mark fields below the threshold, and apply spatial clustering algorithm and semantic correction rules to aggregate the tag data and generate a structured field table. The conflict detection module is used to perform conflict detection on the structured field table and generate conflict detection results. The conflict detection includes drawing number duplication verification. A dual-layer PDF generation module is used to generate a dual-layer PDF file based on the conflict detection results, wherein the text layer embeds the text information extracted by the OCR recognition engine, and the image layer retains the original image; The three-level storage architecture creation module is used to create a three-level file storage architecture based on the design number, sub-item name and drawing type field in the structured field table; The standardized file name generation module is used to generate standardized drawing file names according to preset naming rules based on the drawing label data in the structured field table; The data push and association module is used to push the path information of the two-layer PDF file, the three-level file storage architecture, the standardized drawing file name, and the drawing title data in the structured field table to the target file management system, and establish the association relationship between the drawing title data, file name, and storage path.

9. A computer device, characterized in that: The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer program is stored that can be loaded by a processor and executed as described in any one of claims 1 to 7.