Architectural drawing signature character recognition and control method and device, equipment and medium
By employing a method of full-image text perception detection and adaptive orientation correction, the problems of positioning difficulties and recognition errors in architectural drawing label recognition have been solved, enabling high-precision digital management and automated operation of drawings.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TECHNOLOGY (CHENGDU) CO LTD
- Filing Date
- 2026-03-31
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies for recognizing architectural drawing labels suffer from problems such as difficulty in positioning, confusion of character shapes due to text rotation, difficulty in recognizing extremely thin fonts, difficulty in recognizing low-contrast text, and text sticking to table lines. Furthermore, it is difficult to achieve accurate extraction and automated operation from label text to structured metadata.
By obtaining the coordinates of text boxes through full-image text perception detection, generating a title ROI image, performing adaptive orientation correction and scale space transformation enhancement, and combining structured semantic parsing to extract drawing metadata, the system controls downstream physical equipment to perform automated operations.
It achieves high-precision positioning, adaptive orientation correction, fine stroke enhancement, and structured information extraction for the title area in complex architectural drawings, improving the intelligence level of digital archiving and management of drawings and ensuring full automation of the entire process from drawing recognition to physical archiving.
Smart Images

Figure CN121963248A_ABST
Abstract
Description
Methods, devices, equipment, and media for text recognition and control in architectural drawing labels. Technical Field
[0001] The embodiments disclosed herein relate to the field of computer technology, specifically to methods, apparatus, devices, and media for recognizing and controlling text on architectural drawings and their labels. Background Technology
[0002] In the entire lifecycle management of building projects, the digital archiving and management of drawings relies on the accurate extraction of information from the drawing title block (also known as the drawing label). The title block, typically located at the edge of the drawing, contains key metadata such as the project name, drawing number, design firm, and drawing date, serving as the unique identifier of the drawing. Currently, text recognition of architectural drawing title blocks primarily employs Optical Character Recognition (OCR) technology. This involves obtaining the title block content through full-drawing OCR recognition or a fixed-position cropping scheme, which is then used for drawing archiving and management.
[0003] However, existing technologies face the following technical challenges in achieving high-precision label recognition: First, architectural drawings are typically large (A0 or A1 size), with the label area occupying only 1%-5% of the total area, and its position is not fixed. Although national standards recommend the label be located in the lower right corner, in actual projects, due to differences in design institute habits, non-standard drawing layouts, or incorrect export settings, the label may appear in any corner of the drawing, even close to the legend or explanatory text areas, making positioning difficult. Second, large blank areas (often exceeding 70%) exist in the drawings, making it impossible for traditional orientation detection algorithms based on the entire drawing to extract effective texture features and accurately determine the rotation angle of the drawing. When the label text is arranged at 90° or 270°, standard OCR engines are prone to character form confusion (such as misidentifying the number "1" as a hyphen "-"), and such errors cannot be corrected by simple semantic correction. Third, the title block area is usually a dense table layout with extremely small font sizes (typically 5-8 points). Furthermore, different design institutes use vastly different CAD font styles. After the drawings are exported as images or downsampled, extremely fine strokes (only 1-2 pixels wide) are easily blurred by anti-aliasing algorithms, making it difficult for OCR to clearly identify stroke boundaries. Simultaneously, some design institutes use light gray to draw secondary information, or improper CAD layer color settings result in extremely low contrast between text and background, making it difficult for conventional binarization algorithms to effectively separate the text foreground. Fourth, the title block text is close to the table borders. While traditional image enhancement methods (such as morphological dilation) can thicken strokes, they easily cause the text to stick to the table lines, leading to OCR segmentation errors. Fifth, even if the text content in the title block is recognized by OCR, accurately extracting key fields such as project name, drawing number, and date from a large number of scattered text blocks and organizing them into structured drawing metadata remains a problem that current technology struggles to solve effectively. Furthermore, after successfully extracting structured drawing metadata, how to automatically control downstream physical devices (such as printers, stamping machines, and archiving devices) to perform automated operations such as drawing printing, stamping, and archiving based on this metadata, so as to achieve full-process automation from drawing recognition to physical archiving, also constitutes a key technical obstacle.
[0004] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0006] Some embodiments of this disclosure provide methods, apparatus, electronic devices, and computer-readable media for recognizing and controlling text on architectural drawing labels to solve one or more of the technical problems mentioned in the background section above.
[0007] In a first aspect, some embodiments of this disclosure provide a method for recognizing and controlling text on architectural drawing labels, comprising: acquiring an original architectural drawing image; performing full-image text perception detection on the original architectural drawing image to obtain coordinate information of the full-image detection text box; generating a label ROI image based on the coordinate information of the full-image detection text box; performing adaptive orientation correction on the label ROI image to obtain an orientation-corrected label ROI image; performing scale-space transformation enhancement on the orientation-corrected label ROI image to obtain an enhanced label ROI image; performing structured semantic parsing and extraction on the enhanced label ROI image to obtain structured drawing metadata; and controlling downstream physical devices to perform related automated operations based on the structured drawing metadata.
[0008] Secondly, some embodiments of this disclosure provide a building drawing title text recognition and control device, comprising: an acquisition unit configured to acquire an original building drawing image; a detection unit configured to perform full-image text perception detection on the original building drawing image to obtain coordinate information of the full-image detection text box; a generation unit configured to generate a title ROI image based on the coordinate information of the full-image detection text box; a correction unit configured to perform adaptive direction correction on the title ROI image to obtain a direction-corrected title ROI image; an enhancement unit configured to perform scale space transformation enhancement on the direction-corrected title ROI image to obtain an enhanced title ROI image; an extraction unit configured to perform structured semantic parsing extraction on the enhanced title ROI image to obtain structured drawing metadata; and a control unit configured to control downstream physical devices to perform associated automated operations based on the structured drawing metadata.
[0009] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0010] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
[0011] Fifthly, some embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
[0012] The above-described embodiments of this disclosure have the following beneficial effects: The architectural drawing label text recognition and control method of some embodiments of this disclosure can achieve high-precision positioning, adaptive direction correction, fine stroke enhancement and repair, and structured information extraction for the label area in complex architectural drawings, significantly improving the intelligence level of digital archiving and management of drawings. Specifically, traditional methods (such as full-image OCR recognition or fixed-position-based cropping schemes) may encounter problems such as label position shifting, large-area blank interference, text rotation, extremely thin fonts, and low contrast, resulting in positioning failures, direction misjudgments, low OCR recognition rates, and the inability to effectively use the results for subsequent processing. If only conventional image enhancement or simple rule matching is relied upon, text may become stuck with table lines, and field extraction errors may occur, ultimately leading to inaccurate drawing archiving information and low management efficiency. Therefore, the architectural drawing label text recognition and control method of some embodiments of this disclosure first acquires the original architectural drawing image. This provides basic input data for subsequent processing, ensuring compatibility and processability for architectural drawing images from various sources (such as scans, screenshots, and photographs). Then, full-image text perception detection is performed on the original architectural drawing image to obtain the coordinate information of the full-image detection text boxes. This obtains a sparse representation of the full-image text distribution with extremely low computational overhead, providing reliable clues for subsequent accurate positioning of the title tag area, avoiding blind searching or complex feature extraction across the entire image, and improving processing efficiency from the source. Next, based on the coordinate information of the full-image detection text boxes, a title tag ROI image is generated. Then, using a spatial clustering algorithm of text boxes, based on a comprehensive score of text density, quantity, and positional features, the densest text clusters located at the edge of the drawing are automatically selected as the title tag area. This effectively solves the problem of positioning difficulties caused by the wandering position of the title tag in existing technologies, achieving "visual attention focus" on the title tag area, eliminating interference from large graphic areas and blank areas in the middle of the drawing, and significantly reducing the computational complexity of subsequent processing. Finally, adaptive orientation correction is performed on the title tag ROI image to obtain the orientation-corrected title tag ROI image. Therefore, by performing orientation classification and rotation correction only on the cropped, clean ROI of the tag, the problem of missing texture features and low confidence caused by large blank areas when performing orientation detection on the entire image is avoided. This fundamentally solves the problem of OCR character morphology confusion caused by the rotation of tag text. At the same time, the rotation operation is limited to small-sized ROIs, significantly reducing computational overhead and avoiding image distortion that may be introduced by rotating the entire image. Next, scale-space transformation enhancement is performed on the orientation-corrected tag ROI image to obtain the enhanced tag ROI image.Therefore, a closed-loop processing technique of "upsampling-enhancement-downsampling" is adopted to sharpen and morphologically dilate extremely fine strokes in a magnified space. This effectively thickens weak strokes, improves the readability of low-contrast text, and precisely controls the dilation amplitude, preventing text from sticking to adjacent table lines. This solves the technical problems of difficult recognition of extremely fine fonts and OCR segmentation errors caused by table line sticking, and the enhanced image does not increase the file size. Then, structured semantic parsing is performed on the enhanced title tag ROI image to extract structured drawing metadata. Using a dual-path fusion strategy of keyword tag matching and location region matching, key fields such as project name, drawing number, and date are accurately extracted from scattered text blocks. Format validation and disambiguation rules ensure the accuracy of these fields, solving the problem of converting OCR recognition results into structured information and providing a high-quality data foundation for subsequent automated operations. Finally, based on the structured drawing metadata, downstream physical devices are controlled to perform related automated operations. This achieves full-process automation from drawing recognition to physical archiving. Furthermore, this method incorporates optimization mechanisms tailored to the characteristics of architectural drawings in core processes such as full-image text perception detection, ROI generation, adaptive orientation correction, scale space transformation enhancement, structured semantic parsing and extraction, and physical device control. This allows it to effectively adapt to architectural drawings of different sizes, layouts, and font styles, and possesses inherent enhancement and repair capabilities for complex situations such as extremely fine strokes, low contrast, and overlapping table lines, thereby enhancing its robustness and generalization in real-world engineering scenarios. Simultaneously, through end-to-end process design, each step is interconnected and progressively advanced, ensuring consistency and reliability across the entire processing chain from original image input to final physical control. Thus, by combining visual attention focusing, scale space transformation enhancement, and structured semantic parsing, it achieves a significant overall improvement in the accuracy, reliability, and downstream control effectiveness of complex architectural drawing ROI recognition, providing crucial technical support for the digital management of architectural engineering drawings. Attached Figure Description
[0013] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0014] Figure 1 is a flowchart of some embodiments of the architectural drawing label text recognition and control method according to the present disclosure; Figure 2 is a structural schematic diagram of some embodiments of the architectural drawing label text recognition and control device according to the present disclosure; Figure 3 is a structural schematic diagram of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation
[0015] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0016] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0017] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0018] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0019] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0020] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] Figure 1 illustrates a flowchart 100 of some embodiments of the architectural drawing label text recognition and control method according to the present disclosure. The architectural drawing label text recognition and control method includes the following steps: Step 101, acquiring the original architectural drawing image.
[0022] In some embodiments, the executing entity of the architectural drawing label text recognition and control method (e.g., a computing device with data processing capabilities such as a server, industrial control computer, or personal computer) can acquire original architectural drawing images. These original architectural drawing images refer to digital image files containing the content of architectural drawings. Their sources can include scanned copies of engineering drawings, screenshots of electronic design drawings, or photographs taken at the construction site, and they are typically stored in common image formats (such as JPEG, PNG, and TIFF). In practice, the executing entity can read original architectural drawing images from local storage (such as hard drives or solid-state drives), network storage (such as file servers or cloud storage), or image acquisition devices (such as scanners or digital cameras) through an image acquisition interface. For example, the executing entity can load a JPEG image obtained from scanning an A1-size architectural floor plan from the file system as input for subsequent processing.
[0023] Step 102: Perform full-image text perception detection on the original architectural drawing image to obtain the coordinate information of the full-image detection text box.
[0024] In some embodiments, the aforementioned execution entity may perform full-image text perception detection on the aforementioned original architectural drawing image to obtain the coordinate information of the full-image detection text box.
[0025] In some optional implementations of certain embodiments, the aforementioned execution entity can perform full-image text perception detection on the original architectural drawing image through the following steps to obtain the coordinate information of the full-image detection text box: Step 1, extract the aspect ratio of the original architectural drawing image to obtain the image aspect ratio. The image aspect ratio refers to the ratio between the width and height of the original architectural drawing image, and is typically used to determine whether an image is a long and narrow drawing (such as a road cross-section or a strip topographic map). In practice, the aforementioned execution entity can read the pixel dimensions of the original architectural drawing image and calculate the image aspect ratio by dividing the width pixel value by the height pixel value. For example, if the width of the original architectural drawing image is 7000 pixels and the height is 5000 pixels, the image aspect ratio is 1.4; if the width is 10000 pixels and the height is 2000 pixels, the image aspect ratio is 5.0.
[0026] Step two: In response to the image aspect ratio exceeding a preset aspect ratio threshold, the original architectural drawing image is overlapped and segmented along its long side to obtain individual segmented image blocks. The aspect ratio threshold is a pre-set critical ratio used to determine whether an image needs segmentation; it is typically set to 2.0 to identify long and narrow drawings. Overlapping segmentation refers to dividing the original architectural drawing image into multiple sub-image blocks with overlapping areas along its long side to prevent subsequent text detection models from deforming or missing detections due to excessively large image aspect ratios. Each segmented image block refers to a sub-image region obtained after overlapping segmentation. In practice, the aforementioned execution entity can compare the image aspect ratio with a preset aspect ratio threshold. If the image aspect ratio exceeds the threshold (e.g., greater than 2.0), the original architectural drawing image is divided into multiple segmented image blocks along the long side of the image, according to a preset segmentation size (e.g., a fixed size of 2000×2000 pixels) and overlap rate (e.g., 50% overlap). If the image aspect ratio does not exceed the threshold, no segmentation is required, and the original architectural drawing image is directly used as the object for subsequent processing. For example, for a narrow road cross-section with a width of 10000 pixels, a height of 2000 pixels, and an aspect ratio of 5.0, the execution entity can divide it along the width direction into multiple segmented image blocks of size 2000×2000 pixels with 50% overlap.
[0027] Step 3: Perform text region detection on the original architectural drawing image or each of the segmented image blocks to obtain the coordinate information of each detected text box. Text region detection refers to the process of identifying and locating text regions in an image using a text detection model, typically implemented using a deep learning model (such as PP-OCR Det). The detected text box is the bounding rectangle of each text region output by the text detection model, used to identify the region's position in the image. The coordinate information of the detected text box refers to the geometric position parameters of each detected text box in the image coordinate system, typically including the x-coordinate of the top-left corner, the y-coordinate of the top-left corner, width, and height. In practice, the execution entity can input the original architectural drawing image (if unsegmented) or each segmented image block (if segmented) into a pre-trained text detection model, which will then output the coordinate information of the detected text boxes corresponding to all text regions within each segmented image block. For example, for an A1-sized architectural drawing image, the execution entity calls the PP-OCR Det model to detect text regions, obtaining the coordinate information of hundreds of detection text boxes. The coordinate information of each detection text box is represented in the form of [x, y, w, h], where x and y are the coordinates of the top left corner, w is the width, and h is the height.
[0028] Step four involves merging the coordinate information of each probe text box to obtain the coordinate information of the full-image probe text boxes. The merging process involves remapping the coordinate information of the probe text boxes corresponding to each segmented image block to the coordinate system of the original architectural drawing image, followed by deduplication and integration. The coordinate information of the full-image probe text boxes refers to the set of coordinates of all probe text boxes in the coordinate system of the original architectural drawing image after merging. In practice, if the original architectural drawing image is not segmented, the probe text box coordinate information obtained in step three is the coordinate information of the full-image probe text boxes. If the original architectural drawing image is segmented into multiple segmented image blocks, the execution entity can convert the coordinate information of each probe text box into coordinates in the original image coordinate system based on the starting position of each segmented image block in the original image, and perform deduplication on duplicate probe text boxes in overlapping areas to finally obtain the coordinate information of the full-image probe text boxes covering the entire image. For example, after the execution entity transforms the coordinate information of the probe text boxes of each segmented image block to the original image coordinate system, it removes the overlapping duplicate text boxes with high overlap through a non-maximum suppression algorithm to obtain a complete set of full-image probe text box coordinate information, which is used for subsequent image tag region localization.
[0029] Step 103: Generate a tag ROI image based on the coordinate information of the text box detected in the whole image.
[0030] In some embodiments, the aforementioned execution entity may generate a tag ROI image based on the coordinate information of the aforementioned full-image detection text box.
[0031] In some optional implementations of certain embodiments, the execution entity can generate a tag ROI image based on the coordinate information of the full-image probing text boxes using the following steps: Step 1, generate the spatial distance between the center points of each probing text box based on the coordinate information of the full-image probing text boxes. The spatial distance refers to the straight-line distance between the center points of two probing text boxes, used to measure the spatial proximity of the text boxes on the image plane. In practice, the execution entity can calculate the center point coordinates of each probing text box based on its coordinate information (e.g., the x-coordinate of the top-left corner, the y-coordinate of the top-left corner, width, and height), and then calculate the Euclidean distance between any two center points. For example, for two probing text boxes A and B, if their center point coordinates are (300, 400) and (350, 420) respectively, the spatial distance between them is approximately 58.3 pixels.
[0032] Step two: Based on a preset adaptive distance threshold, perform disjoint-set clustering on each probe text box to obtain a text cluster set. The adaptive distance threshold is a clustering distance threshold dynamically calculated based on the dimensions of the original architectural drawing image, used to determine which text boxes should belong to the same text cluster. This threshold is typically obtained by multiplying the pixel length of the image's longer side by a preset proportional coefficient (e.g., 10%). Disjoint-set clustering is a clustering algorithm that uses a disjoint-set data structure to merge text boxes whose distance is less than a threshold into the same set. A text cluster is a set of multiple probe text boxes that are spatially close, representing a continuous text region. The text cluster set refers to the total number of text clusters. In practice, the above execution entity can set an initial empty disjoint-set, then traverse all probe text boxes. For each pair of text boxes, if their spatial distance is less than the adaptive distance threshold, their sets are merged. After the traversal, each connected component forms a text cluster, and all text clusters constitute the text cluster set. For example, for an A1-sized drawing (with a long side of about 7000 pixels), if the adaptive distance threshold is set to 700 pixels, text boxes with a spatial distance of less than 700 pixels will be clustered together, which may result in multiple text clusters such as the title text cluster, the legend text cluster, and the explanatory text cluster.
[0033] Step 3: For each text cluster in the above text cluster set, generate a comprehensive score for each text cluster. The comprehensive score is a quantitative score used to assess the probability of a text cluster becoming a tag area, typically calculated based on a weighted average of the cluster's density, quantity, and positional features. The density feature is the ratio of the total area of all text boxes within the cluster to the area of the cluster's bounding rectangle, reflecting the compactness of the text. The quantity feature is the number of text boxes contained within the cluster, reflecting the richness of the text. The positional feature is the normalized distance from the cluster's center point to the four corners of the original architectural drawing image, reflecting its proximity to the edge of the drawing. Specifically, it is calculated by taking the minimum Euclidean distance from the cluster's center point to each of the four corners of the image, dividing it by the image's diagonal length, and obtaining a normalized value between 0 and 1; a smaller value indicates closer proximity to the corners. In practice, the execution entity can first calculate the density, quantity, and positional features of each text cluster, and then perform a weighted sum according to preset weights (e.g., density 40%, quantity 40%, position 20%) to obtain the comprehensive score for each text cluster. For example, for a dense cluster of text located in the upper right corner of a drawing, if its density feature is 0.8, its quantity feature is 30 text boxes, and its position feature score is 0.2 (indicating proximity to the corner), then its comprehensive score is 0.8 × 0.4 + 30 normalized value × 0.4 + 0.2 × 0.2.
[0034] Step four: Based on the comprehensive score corresponding to each generated text cluster, extract the target text cluster and generate the bounding rectangle of the target text cluster. The target text cluster refers to the text cluster with the highest comprehensive score, i.e., the text cluster most likely to be the tag area. The bounding rectangle is the smallest axis-aligned rectangle that can contain all probe text boxes within the target text cluster, usually determined by the minimum and maximum x and y coordinates of all text boxes. In practice, the execution entity can compare the comprehensive scores of all text clusters and select the text cluster with the highest score as the target text cluster. Then, based on the coordinate information of all probe text boxes within the target text cluster, calculate its minimum bounding rectangle: that is, take the minimum x-coordinate of the top left corner of all text boxes as the left boundary of the rectangle, take the minimum y-coordinate of the top left corner of all text boxes as the top boundary of the rectangle, take the maximum x-coordinate of the bottom right corner of all text boxes as the right boundary of the rectangle, and take the maximum y-coordinate of the bottom right corner of all text boxes as the bottom boundary of the rectangle. For example, if the coordinate range of the text box within the target text cluster covers the area from (150, 180) to (820, 650), then the circumscribed rectangle is the rectangular area from (150, 180) to (820, 650).
[0035] Step 5: Based on the aforementioned bounding rectangle, crop the tag ROI image from the original architectural drawing image. Cropping refers to extracting the image content of the area defined by the bounding rectangle from the original architectural drawing image. In practice, the executing entity can cut out the corresponding image sub-region from the original architectural drawing image according to the coordinate range of the bounding rectangle, and can extend it outward by a certain number of pixels (e.g., 64 pixels) as boundary fill to ensure that the tag area is completely contained, ultimately obtaining the tag ROI image (ROI, Region of Interest). For example, for the upper left corner (150, 180) and lower right corner (820, 650) of the bounding rectangle, the executing entity crops this area from the original image, and may extend it to a region from (86, 116) to (884, 714), obtaining a tag ROI image of approximately 800×600 pixels, used for subsequent orientation correction and enhancement processing.
[0036] Step 104: Perform adaptive orientation correction on the ROI image of the tag to obtain the orientation-corrected ROI image of the tag.
[0037] In some embodiments, the execution entity may perform adaptive orientation correction on the aforementioned ROI image to obtain an orientation-corrected ROI image.
[0038] In some optional implementations of certain embodiments, the aforementioned execution entity can adaptively correct the orientation of the aforementioned tag ROI image through the following steps to obtain the orientation-corrected tag ROI image: Step 1, perform orientation inference on the aforementioned tag ROI image to obtain the text orientation category and the corresponding orientation confidence. Here, orientation inference refers to the process of identifying and judging the overall arrangement orientation of text in an image using an orientation classification model. This model is typically implemented using a lightweight convolutional neural network (such as PP-LCNet). The text orientation category refers to the rotation angle of the text in the image relative to the normal reading direction (positive direction), usually divided into four types: 0° (positive), 90° (clockwise rotation of 90 degrees), 180° (rotation of 180 degrees), and 270° (counterclockwise rotation of 90 degrees or clockwise rotation of 270 degrees). The orientation confidence refers to the degree of confidence of the orientation classification model in determining the text orientation category, usually represented by a value between 0 and 1, with a higher value indicating greater confidence in the determination result. In practice, the aforementioned execution entity can input the cropped ROI image of the tag into a pre-trained orientation classification model. After inference, the model outputs a four-dimensional probability vector, corresponding to the confidence scores of the four orientation categories. The category with the highest confidence score is selected as the text orientation category, and this confidence score is used as the orientation confidence score. For example, for a tag ROI image, if the orientation classification model outputs a confidence score of 0.98 for 0°, 0.01 for 90°, 0.005 for 180°, and 0.005 for 270°, then the text orientation category is 0° (positive), and the orientation confidence score is 0.98.
[0039] Step two: In response to the text direction category being non-positive and the direction confidence exceeding a preset direction confidence threshold, an inverse rotation matrix is generated. "Non-positive" refers to a text direction category of 90°, 180°, or 270°, meaning the text is not in a normal reading direction. The preset direction confidence threshold is a pre-set threshold used to determine whether the direction detection result is sufficiently reliable, typically set to 0.9. Only when the direction confidence exceeds this threshold is the detection result considered reliable and rotation correction is performed. The inverse rotation matrix is a 2×3 affine transformation matrix calculated based on the detected non-positive category to rotate the image back to the positive direction, containing rotation angle and translation parameters. In practice, if the text direction category is 90°, 180°, or 270° and the corresponding direction confidence exceeds the preset direction confidence threshold (e.g., 0.9), the execution entity will generate the corresponding inverse rotation matrix based on the specific angle value. For example, if the text direction category is 90° (90 degrees clockwise), then the reverse rotation matrix corresponds to a 90-degree counterclockwise rotation; if the text direction category is 180°, then the reverse rotation matrix corresponds to a 180-degree rotation; if the text direction category is 270°, then the reverse rotation matrix corresponds to a 90-degree clockwise rotation (i.e., a 270-degree counterclockwise rotation).
[0040] Step 3: Based on the aforementioned inverse rotation matrix, rotate the aforementioned tag ROI image to obtain the orientation-corrected tag ROI image. The rotation process refers to performing an affine transformation on the image using the inverse rotation matrix to restore the text to its upright orientation. Interpolation algorithms (such as bilinear interpolation) are typically used to fill the rotated pixels. The orientation-corrected tag ROI image refers to the tag region sub-image with the text orientation upright after rotation. In practice, the execution entity can apply the inverse rotation matrix to the tag ROI image to perform an affine transformation, generating the orientation-corrected tag ROI image. For example, for a tag ROI image rotated 90°, applying a 90° counterclockwise inverse rotation matrix yields a tag ROI image with the text orientation correctly corrected.
[0041] Step four: In response to the text direction category being non-positive and the direction confidence not exceeding a preset direction confidence threshold, the aforementioned tag ROI image is determined as the direction-corrected tag ROI image. Here, "not exceeding the preset direction confidence threshold" means that a direction confidence lower than or equal to the set threshold (e.g., 0.9) indicates that the direction detection result is unreliable, and rotation is not performed in this case to avoid incorrect correction. In practice, if the text direction category is non-positive but the direction confidence is lower than or equal to 0.9, the execution entity will consider the detection result unreliable, abandon the rotation operation, and directly output the input tag ROI image as the direction-corrected tag ROI image. For example, if the direction detection result is 90° but the direction confidence is only 0.6, no rotation is performed, and the original image is retained as the direction-corrected tag ROI image.
[0042] Step 5: Responding to the above text direction category being positive, the above-mentioned tag ROI image is determined as the direction-corrected tag ROI image. Here, "positive" means the text direction category is 0°, i.e., the text in the image is already in a normal reading direction and does not require correction. In practice, if the text direction category is positive, the execution entity directly outputs the input tag ROI image as the direction-corrected tag ROI image, avoiding unnecessary image resampling and distortion. For example, if step 1 detects a text direction category of 0° and a direction confidence score of 0.98, then the tag ROI image is directly determined as the direction-corrected tag ROI image.
[0043] Step 105: Perform scale-space transformation enhancement on the orientation-corrected ROI image to obtain the enhanced ROI image.
[0044] In some embodiments, the execution entity may perform scale-space transformation enhancement on the orientation-corrected ROI image to obtain an enhanced ROI image.
[0045] In some optional implementations of certain embodiments, the aforementioned execution entity can perform scale-space transformation enhancement on the orientation-corrected ROI image using the following steps to obtain an enhanced ROI image: Step 1, perform grayscale processing on the orientation-corrected ROI image to obtain a grayscale image. Grayscale processing refers to the process of converting a color image into a grayscale image containing only brightness information, typically achieved by weighted averaging of the pixel values of the three RGB channels. A grayscale image is a single-channel image obtained after grayscale processing, where each pixel is represented by only one grayscale value (typically 0-255). In practice, the aforementioned execution entity can convert the orientation-corrected ROI image from the RGB color space to the grayscale space, for example, using the standard grayscale conversion formula: grayscale value = 0.299 × R channel pixel value + 0.587 × G channel pixel value + 0.114 × B channel pixel value, to obtain a grayscale image for subsequent histogram analysis and enhancement processing.
[0046] Step two involves performing histogram analysis on the grayscale image to obtain pixel intensity distribution information. Histogram analysis refers to the process of statistically analyzing the frequency of each grayscale level in the image and generating a grayscale histogram. Pixel intensity distribution information refers to the distribution of pixel grayscale values reflected in the grayscale histogram, including statistical characteristics such as the range of grayscale values, concentrated areas, and peak positions. This information is used to determine the overall brightness, contrast, and whether there are excessively dark or bright areas in the image. In practice, the execution entity can iterate through all pixels of the grayscale image, count the number of pixels at each grayscale level (0-255), generate a grayscale histogram, and extract pixel intensity distribution information from it. For example, if the histogram shows that most pixels are concentrated in the low grayscale region of 0-50, it indicates that the image is generally dark; if the pixel distribution evenly covers the entire range of 0-255, it indicates that the image has good contrast.
[0047] Step 3: Based on the pixel intensity distribution information mentioned above, adaptive brightness equalization processing is performed on the grayscale label image to obtain the preprocessed label image. Adaptive brightness equalization refers to the operation of dynamically adjusting the image brightness and contrast to improve visual quality according to the pixel intensity distribution. This is typically achieved using the Limit Contrast Adaptive Histogram Equalization (CLAHE) algorithm. This algorithm effectively improves the readability of low-contrast areas while avoiding noise amplification by performing histogram equalization on local image regions and limiting the contrast amplification. The preprocessed label image refers to the grayscale image with optimized contrast obtained after adaptive brightness equalization processing. In practice, if the pixel intensity distribution information indicates that the image is too dark or has too low contrast (e.g., the histogram is concentrated in low grayscale areas), the aforementioned execution entity can apply the CLAHE algorithm to process the grayscale label image, stretching the grayscale range of the image to make the difference between the text and the background more obvious, resulting in the preprocessed label image. For example, for a low-contrast label image with light gray text and a white background, after CLAHE processing, the text color becomes darker, and the contrast with the background is significantly improved.
[0048] Step four involves upsampling the preprocessed image to obtain an enlarged image. Upsampling refers to increasing the image resolution through interpolation algorithms, typically using bicubic interpolation. The enlarged image is a high-pixel-density image obtained after upsampling, with a size that is an integer multiple (e.g., 3 times) of the original image. In practice, the execution entity can apply bicubic interpolation to the preprocessed image, enlarging its resolution to multiple times (e.g., 3 times) of the original size. This expands extremely fine strokes, originally only 1-2 pixels wide, into grayscale bands 3-6 pixels wide, providing sufficient pixel-level operation space for subsequent sharpening and morphological operations. For example, a preprocessed image of 800×600 pixels, after 3x upsampling, yields an enlarged image of 2400×1800 pixels, where the originally hair-thin strokes become clearly visible.
[0049] Step five involves performing high-frequency edge enhancement processing on the enlarged signature image to obtain a sharpened signature image. High-frequency edge enhancement refers to improving image clarity by enhancing high-frequency components (such as edges and details), typically achieved using the Unsharp Mask algorithm. This algorithm enhances edge contrast by subtracting a Gaussian blurred version of the original image and then overlaying it, thus clarifying the originally blurred text strokes. The sharpened signature image is the one obtained after high-frequency edge enhancement processing, resulting in sharper and clearer text edges. In practice, the aforementioned entity can apply the Unsharp Mask sharpening algorithm to the enlarged signature image to enhance the edge contours of the text strokes, making the blurred stroke boundaries clearer, thus obtaining a sharpened signature image. For example, in the enlarged signature image, the originally blurred words "General Design Instructions" become more defined after sharpening, with each stroke's edge strengthened.
[0050] Step six involves performing morphological dilation on the sharpened tag image to obtain a thickened high-resolution image. Morphological dilation is a morphological operation that uses a structuring element to expand the foreground region of an image, typically used to thicken thin strokes or connect broken parts. The structuring element is a small binary matrix (such as a 3×3 square) that defines the range of influence of the dilation operation. The thickened high-resolution image refers to the high-resolution image obtained after morphological dilation, with the text strokes moderately thickened. In practice, the execution entity can first binarize the sharpened tag image, for example, using the Otsu adaptive thresholding algorithm to obtain a text mask. This algorithm automatically determines the optimal binarization threshold by maximizing the inter-class variance, separating the text from the background; then, a 3×3 structuring element is used to dilate the text mask. Because the operation is performed on an image magnified 3 times, a 3×3 dilation kernel is equivalent to only a 1×1 effect on the original image. This allows for the moderate thickening of extremely fine strokes (connecting previously broken or blurred strokes) while precisely controlling the dilation magnitude, preventing text from merging with adjacent table lines or underlines. For example, a thin stroke only 3 pixels wide in a sharpened label image becomes 5 pixels wide after 3×3 dilation, making the stroke fuller while maintaining a safe distance from adjacent table lines.
[0051] Step seven involves downsampling the thickened high-resolution image to obtain the enhanced tagline ROI image. Downsampling refers to reducing the image resolution using an interpolation algorithm to restore the high-resolution image to its original size. This is typically achieved using the INTER_AREA algorithm, which resamples pixel regions to better preserve image detail. The enhanced tagline ROI image is the tagline image obtained after downsampling, with the same resolution as the orientation-corrected tagline ROI image but with clearer strokes and higher contrast. In practice, the execution entity can apply the INTER_AREA algorithm to the thickened high-resolution image, downsampling it to restore it to the original resolution of the orientation-corrected tagline ROI image. The downsampling process is essentially a weighted average of the repaired strokes, "solidifying" the enhancement effects (such as stroke connectivity and edge sharpness) into the original resolution pixels, ultimately resulting in the enhanced tagline ROI image. This image significantly improves the readability of extremely fine strokes and low-contrast text without increasing file size. For example, downsampling a 2400×1800 pixel high-resolution image back to 800×600 pixels yields an enhanced ROI image with clear text, full strokes, and high contrast, which can be directly used for subsequent OCR recognition.
[0052] Step 106: Perform structured semantic parsing and extraction on the enhanced ROI image of the drawing label to obtain structured drawing metadata.
[0053] In some embodiments, the aforementioned execution entity may perform structured semantic parsing and extraction on the enhanced ROI image of the drawing title block to obtain structured drawing metadata.
[0054] In some optional implementations of certain embodiments, the aforementioned execution entity can perform structured semantic parsing and extraction on the enhanced ROI image of the title block to obtain structured drawing metadata through the following steps: Step 1, perform text recognition on the enhanced ROI image of the title block to obtain a sequence of recognized text boxes, as well as the text content, coordinates, and confidence score of each recognized text box. Here, text recognition refers to the process of detecting and recognizing text in an image using an Optical Character Recognition (OCR) engine, which is typically implemented using a deep learning model. A recognized text box is the bounding rectangle of each text region output by the OCR engine, used to identify the position of that region in the image. A sequence of recognized text boxes is a list formed by arranging all recognized text boxes in a certain order (e.g., from top to bottom, from left to right). Text content refers to the specific character sequence recognized within each recognized text box. The coordinates of the recognized text box refer to the geometric position parameters of each recognized text box in the image coordinate system, typically including the horizontal coordinate of the top-left corner, the vertical coordinate of the top-left corner, width, and height. Recognition confidence refers to the degree of credibility of the recognized text content output by the OCR engine, usually represented by a value between 0 and 1, with higher values indicating more reliable recognition results. In practice, the aforementioned execution entity can input the enhanced tag ROI image into the OCR engine, which outputs all detected text boxes along with their corresponding text content, coordinate information, and confidence scores. The engine then sorts the text boxes according to the standard reading order of the tag (usually from top to bottom and from left to right) to obtain the recognized text box sequence. For example, for an enhanced tag ROI image, the OCR engine recognizes 30 text boxes, where the first text box contains the text "Project Name," with coordinates (10, 20, 100, 30), and a recognition confidence score of 0.99.
[0055] Step two involves obtaining a predefined set of target fields. Each target field in this set contains corresponding keyword tags and location area information. The target field set refers to a predefined collection of key fields to be extracted from the title block, typically including project name, drawing number, drawing date, design unit, and scale. A target field is a specific field within the set, such as the "Project Name" field or the "Drawing Number" field. Keyword tags are trigger words or identifiers associated with each target field, used to locate the field in the text. For example, the "Drawing Number" field might be associated with keywords like "Drawing Number:" or "Drawing Number:". Location area information refers to the relative position of each target field within the title block, usually predefined based on a standard title block layout template (such as a nine-grid layout). For example, "Drawing Number" is typically located in the lower right corner of the title block, while "Project Name" is usually located in the upper area. In practice, the executing entity can read a predefined title block field template from local storage or a configuration file. This template contains the target field set, a list of keyword tags for each target field, and location area division rules.
[0056] Step 3: Based on the keyword tags corresponding to each target field, perform keyword tag matching on the above-mentioned recognition text box sequence to obtain the first candidate text box group corresponding to each target field. Keyword tag matching refers to comparing the text content in the recognition text box sequence with the keyword tags corresponding to each target field to find text boxes containing these keywords. The first candidate text box group refers to the set of text boxes that may contain the field tag or field value found through keyword tag matching for each target field. In practice, the above-mentioned execution entity can traverse each text box in the recognition text box sequence and perform string matching of its text content with the keyword tags of each target field. If the text content of a certain text box contains the keyword tag of a certain target field, then that text box and its neighboring text boxes (e.g., text boxes located to the right, below, or immediately adjacent to the text box in spatial location, determined by a coordinate difference less than a preset proximity threshold, such as 50 pixels) are included in the first candidate text box group for that target field, because the label layout usually adopts a "label-value" horizontal or vertical arrangement.
[0057] Step four: Based on the location region information corresponding to each target field, perform location region matching on the above-mentioned recognition text box sequence to obtain the second candidate text box group corresponding to each target field. Location region matching refers to the process of filtering the recognition text box sequence according to the relative location region where each target field may appear in the tag, and using text boxes located within that region as candidates. The second candidate text box group refers to the set of text boxes located within the expected location region of each target field, found through location region matching. In practice, the above-mentioned execution entity can divide the enhanced tag ROI image into multiple predefined regions (e.g., a nine-square grid), and based on the location region information of each target field, filter all text boxes whose coordinates are located within that region from the recognition text box sequence as the second candidate text box group for that target field.
[0058] Step 5 involves fusing the first and second candidate text box groups for each target field to obtain a candidate text box set for each target field. This fusing process integrates the keyword tag matching results and the location region matching results to determine the final candidate text boxes for each target field. The candidate text box set refers to the set of text boxes that may contain the value of each target field after the fusing process. In practice, the above-mentioned execution entity can prioritize using the first candidate text box group as the primary basis; if the first candidate text box group is empty, the second candidate text box group is used as an alternative; if both exist, the first candidate text box group is used, or the union of the two groups after deduplication is taken as the candidate text box set.
[0059] Step six involves concatenating or extracting from the candidate text box set corresponding to each target field to obtain the candidate field value set for each target field. Concatenation or extraction refers to the operation of obtaining field values from the candidate text box set: for fields composed of multiple text boxes, the text content in the text boxes needs to be concatenated in order; for fields with a single text box, its text content is directly extracted as the field value. The candidate field value set refers to one or more possible field values extracted from the candidate text box set for each target field. In practice, the above execution entity can concatenate the text content into a complete field value according to the arrangement order of the text boxes in the candidate text box set; if the candidate text box set is empty, then the candidate field value set for that field is empty.
[0060] Step 7: For each candidate field value in each candidate field value set, generate a field confidence score for each candidate field value based on the recognition confidence score of at least one corresponding recognition text box. The field confidence score is a quantitative indicator of the overall credibility of the candidate field value, typically calculated based on the recognition confidence scores of all recognition text boxes constituting that field value, for example, by taking the average. In practice, the execution entity can obtain the recognition confidence scores of all recognition text boxes constituting that field value for each candidate field value, and then calculate the arithmetic mean of these confidence scores as the field confidence score of that candidate field value.
[0061] Step eight involves performing format validation on the candidate field value set corresponding to each target field, resulting in the set of validated field values for each target field and the field confidence score for each validated field value. Format validation refers to the process of verifying the legality of candidate field values using predefined format rules; for example, the drawing number field must conform to a specific encoding format, and the date field must conform to common date formats. The set of validated field values refers to the set of candidate field values that meet the format requirements after format validation for each target field, along with the field confidence score for each validated field value. In practice, the execution entity can call the corresponding regular expression or validation rule for each target field to match and validate each candidate field value in the candidate field value set, retaining only the validated field values and their corresponding field confidence scores.
[0062] Step nine: In response to the fact that the set of validated field values corresponding to any target field includes at least two validated field values, the set of validated field values is filtered based on the confidence levels of each field corresponding to each validated field value in the set to obtain the final field value corresponding to the target field. Filtering refers to the process of selecting the best candidate field value based on its confidence level when multiple validated candidate field values exist for the same target field. Typically, the validated field value with the highest confidence level is selected as the final field value. The final field value refers to the most reliable field value determined after filtering for each target field. In practice, if the set of validated field values for a target field contains two or more validated field values, the execution entity can compare the confidence levels of these field values and select the field value with the highest confidence level as the final field value for that target field.
[0063] Step 10: In response to the fact that the set of validated field values corresponding to any target field contains only one validated field value, determine the included validated field value as the final field value corresponding to the aforementioned target field. Here, "determine" means that when the set of validated field values contains only one field value, directly use that field value as the final field value. In practice, if the set of validated field values for a certain target field contains only one validated field value, the aforementioned execution entity directly determines that field value as the final field value for that target field.
[0064] Step 11 involves organizing the final field values for each target field to obtain structured drawing metadata. Organization refers to the process of arranging and encapsulating the final field values of each target field according to a predefined format. Structured drawing metadata is a collection of key drawing information represented in a structured data format, typically including field names, field values, text box coordinates, confidence levels, matching methods, and other additional information. In practice, the executing entity can encapsulate the final field value of each target field and its associated information according to a standard format to generate structured drawing metadata for downstream automated operations.
[0065] In addressing the challenges of drawing signature recognition in the aforementioned background technology using the method for recognizing and controlling architectural drawing signatures, the following technical problem often arises in the application scenarios: In the actual processing environment of high-frequency, multi-specification drawings, such as engineering drawing management, batch archiving in archives, and drawing distribution to construction units, the following technical problem often occurs: After the drawing signature information is recognized, subsequent operations such as drawing printing, stamping, and archiving still rely heavily on manual intervention. For example, manual selection of paper based on the drawing size, manual input of the number of copies to be printed, individual affixing of electronic signatures, manual handling to the stamping machine for stamping, and finally manual locating of the cabinet and filling in the archiving record. This series of operations is not only inefficient and time-consuming, but also prone to human errors such as mismatched paper sizes, misaligned electronic signatures, inaccurate physical stamping, and incorrect placement of drawings in the wrong cabinet. This results in inconsistent archiving quality and a lack of complete process records, making subsequent auditing difficult. In response to the following requirements for this application scenario: the ability to automate collaboration under high-frequency use and the long-term stable and reliable archive management, we decided to adopt the following solution: Step 107, based on structured drawing metadata, control downstream physical devices to perform related automated operations.
[0066] In some embodiments, the aforementioned execution entity may control downstream physical devices to perform associated automated operations based on the aforementioned structured drawing metadata.
[0067] In some optional implementation manners of some embodiments, the above execution entity can control the downstream physical devices to perform associated automated operations based on the above structured drawing metadata through the following steps: First step, parse the above structured drawing metadata to obtain the drawing number, project name, drawing format, and drawing issue date information. Among them, the drawing number is a coded string used to uniquely identify a building drawing, usually including a professional code and a serial number (such as "J-01", "JS 02"). The project name is the name of the construction project to which the drawing belongs. The drawing format is the standard size specification of the drawing, such as A0, A1, A2, etc., corresponding to different physical sizes. The drawing issue date is the date when the drawing is completed and output. In practice, the above execution entity can parse the structured drawing metadata generated in step 106 and extract the values of the four key fields of the drawing number, project name, drawing format, and drawing issue date. For example, the parsed drawing number is "J-01", the project name is "XX Residential Community Phase I Project", the drawing format is "A1", and the drawing issue date is "2024-05-12".
[0068] Second step, based on the above drawing number, query and retrieve the original electronic drawing file corresponding to the above original building drawing image from the drawing repository. Among them, the drawing repository is a database or file system used to store original electronic drawing files, usually indexed and managed according to the drawing number. The original electronic drawing file is an electronic format file corresponding to the original building drawing image and available for printing, such as DWG, PDF, etc. In practice, the above execution entity can query in the drawing repository according to the parsed drawing number, find the original electronic drawing file that matches the drawing number, and retrieve it from the repository and load it into memory or a temporary storage area for subsequent printing use. For example, query the corresponding "J-01.pdf" file in the drawing repository according to the drawing number "J-01" and retrieve it.
[0069] The third step involves generating a print job instruction based on the aforementioned drawing size information. This instruction includes the storage path of the original electronic drawing file, the paper size determined by the drawing size information, the number of copies to be printed based on the project name, and the coordinates for affixing the electronic signature. The print job instruction is a set of parameter instructions used to control the printer to perform the printing operation, containing all the configuration information required for printing. The storage path refers to the location of the original electronic drawing file in the current system, used by the printer to locate and retrieve the file. The paper size refers to the paper size determined by the drawing size information, for example, A0 size corresponds to 841mm × 1189mm paper. The number of copies to be printed refers to the number of drawing copies to be printed based on the project name or project requirements. The electronic signature is a digital image embedded in the drawing, typically containing information such as the drawing number and drawing date. The coordinates for affixing the electronic signature refer to the coordinates of the electronic signature's position on the drawing, usually located in a designated position within the signature area (e.g., the lower right corner). In practice, the aforementioned executing entity can determine the corresponding paper size (e.g., 594mm × 841mm) based on the drawing size information (e.g., A1), query the required number of copies (e.g., 5 copies) from the project configuration based on the project name (e.g., "Phase I of XX Residential Community"), and determine the coordinates for affixing the electronic signature (e.g., the offset relative to the lower right corner of the drawing) based on the position of the drawing title. Then, the storage path of the original electronic drawing file, paper size, number of copies, and affix coordinates are integrated into a print task instruction. For example, the generated print task instruction includes the storage path " / storage / J-01.pdf", paper size "A1", number of copies "5", and affix coordinates "(x:800, y:560)".
[0070] The fourth step involves controlling the architectural drawing printer to print the original electronic drawing files based on the aforementioned print task instructions. Each copy of the drawing is then stamped with an electronic signature containing the drawing number and the production date at the designated coordinates, resulting in multiple drawing copies. Here, the architectural drawing printer refers to a large-format printing device specifically designed for printing engineering drawings, typically supporting various paper sizes and high-precision printing. A drawing copy refers to each physical copy printed. An electronic signature is a digital seal image embedded synchronously during the printing process. In practice, the executing entity sends the print task instructions to the architectural drawing printer. The printer reads the original electronic drawing files according to the storage path specified in the instructions, prints them according to the specified paper size, and overlays the electronic signature image containing the drawing number and production date onto each drawing at the designated coordinates, ultimately outputting multiple drawing copies. For example, the architectural drawing printer prints five A1-sized drawings, each stamped with a red electronic signature containing "J-01" and "2024-05-12" at the lower right corner.
[0071] The fifth step involves completing the printing of the original electronic drawing files, obtaining the stacking position information of each drawing copy, and generating a print completion signal. The stacking position information describes the placement and stacking order of the drawing copies on the printer's output tray after printing. The print completion signal is a status signal returned by the printer after completing all printing tasks, indicating that the printing process is finished. In practice, the aforementioned execution entity can monitor the output status of the architectural drawing printer. After the printer has finished printing all drawing copies, it obtains the stacking position information of each drawing copy on the output tray (e.g., the top layer is sheet 1, the bottom layer is sheet 5) from the printer, and simultaneously receives the print completion signal from the printer, indicating that the printing stage is complete and the next step of stamping can proceed.
[0072] Step 6: Based on the print completion signal and the drawing number, generate a stamping task instruction. This instruction includes the stacking position information of each drawing copy, the page number to be stamped, and the stamp type. The stamping task instruction is a set of parameter instructions used to control the automatic stamping machine to perform the physical stamping operation. The page number to be stamped refers to the page or location on the drawing to be stamped, usually a designated area of the archive page. The stamp type refers to the style of the physical stamp to be used, such as a stamp containing the word "archive". In practice, after receiving the print completion signal, the executing entity determines the page number to be stamped (e.g., bottom right corner of the first page) and the stamp type (e.g., "archive" stamp) from the project configuration based on the drawing number, and integrates the stacking position information obtained from the printer with these parameters to generate the stamping task instruction. For example, the generated stamping task instruction includes the stacking position information "paper tray, 5 sheets from top to bottom", the page number to be stamped "bottom right corner of the first page", and the stamp type "archive stamp".
[0073] Step 7: Based on the aforementioned stamping task instructions, the automatic stamping machine is controlled to grab each obtained copy of the drawings and imprint a physical steel stamp containing the project name at the archiving position corresponding to the stamped page number, resulting in stamped copies of the drawings. The automatic stamping machine is an automated device capable of automatically grabbing paper and imprinting a physical steel stamp at a designated position. A physical steel stamp is a physical seal that forms an embossed mark on paper using mechanical pressure, typically used to indicate that a document has been archived or approved. The stamped copy of the drawings refers to the drawing after being physically stamped. In practice, the executing entity sends the stamping task instructions to the automatic stamping machine. The stamping machine grabs the copy of the drawings from the output tray according to the stacking position information in the instructions, identifies the stamped page number, then transports the drawings to the stamping position, uses the specified stamp type to imprint a physical steel stamp containing the project name at the archiving position, and finally outputs the stamped copy of the drawings to the next workstation. For example, an automatic stamping machine picks up five drawings sequentially from the paper output tray and stamps a physical seal containing the words "XX Residential Community Phase I Project" on the lower right corner of the first page of each drawing, thus obtaining a copy of the drawing with the seal affixed.
[0074] Step 8: Based on the aforementioned drawing number and drawing date, generate an archiving instruction. This instruction includes the archiving category number corresponding to the drawing number, a storage period identifier determined based on the drawing date, and the cabinet coordinates of the intelligent mobile shelving. The archiving instruction is a set of parameter commands used to control the intelligent mobile shelving to perform the drawing archiving operation. The archiving category number is a classification code determined according to the drawing number and archiving rules, used to determine the cabinet area where the drawing should be stored. The storage period identifier refers to the retention period of the drawing determined based on the drawing date, such as permanent storage, long-term storage, or periodic destruction. Specific rules can be preset according to archival management regulations; for example, drawings with a drawing date more than 10 years ago are marked as "permanent storage," those 5-10 years ago as "long-term storage," and those less than 5 years ago as "periodic destruction." Intelligent mobile shelving refers to intelligent mobile storage equipment that can automatically control the opening of cabinet doors and the illumination of indicator lights. The cabinet coordinates refer to the specific location where the drawing should be stored in the intelligent mobile shelving, typically including the cabinet column number, cabinet shelf number, and shelf number. In practice, the aforementioned implementing entity can query the archiving classification rule library based on the drawing number to obtain the corresponding archiving classification number; calculate the drawing's age based on the drawing date and the current date, and determine the storage period identifier according to preset storage rules; then query the cabinet location mapping table based on the archiving classification number and storage period identifier to obtain the specific cabinet location coordinate information, and finally integrate this information into an archiving instruction. For example, the generated archiving instruction includes the archiving classification number "J-01-Structural Construction Drawing", the storage period identifier "Permanent Storage", and the cabinet location coordinate information "3 Columns 5 Shelves 2 Floors".
[0075] Step 9: Based on the aforementioned archiving instructions, control the intelligent mobile shelving to open the cabinet door indicated by the cabinet coordinate information, illuminate the indicator light indicated by the cabinet coordinate information, and display the storage period indicator on the display screen. Opening the cabinet door means the intelligent mobile shelving automatically opens the door of the designated cabinet according to the instruction. Illuminating the indicator light means the intelligent mobile shelving illuminates the indicator light at the designated cabinet location to guide the operator in placing the drawings. The display screen refers to the electronic screen on the intelligent mobile shelving used to display information. In practice, the aforementioned executing entity sends the archiving instructions to the intelligent mobile shelving. The intelligent mobile shelving automatically opens the corresponding cabinet door according to the cabinet coordinate information in the instruction, illuminates the indicator light corresponding to that cabinet location, and displays the storage period indicator (such as "Permanent Storage") on its display screen, prompting the operator to place the stamped copy of the drawings into that cabinet location. For example, the intelligent mobile shelving opens the door of the 5th shelf in the 3rd column, illuminates the blue indicator light for that shelf, and displays "Permanent Storage" on the screen.
[0076] Step 10: Obtain the execution status codes returned by the aforementioned architectural drawing printer, automatic stamping machine, and intelligent mobile shelving after performing their respective operations. The execution status code refers to the status code returned by each physical device after completing its operation, indicating whether the operation was successfully completed and related status information, such as "0" for success and "1" for failure, or including specific timestamps, remaining paper quantity, etc. In practice, the aforementioned executing entity can communicate with each device to receive the printing status code returned by the architectural drawing printer (e.g., including printing completion time and paper quantity), the stamping status code returned by the automatic stamping machine (e.g., including stamping completion time and stamp quantity), and the archiving status code returned by the intelligent mobile shelving (e.g., including cabinet door open status and indicator light status), and collect these status codes for subsequent log recording.
[0077] Step 11: Based on the acquired execution status codes, generate a drawing archiving operation log including the aforementioned drawing number, project name, and drawing date, and store the drawing archiving operation log in the database. The drawing archiving operation log is a log file that records the entire automated operation process and its results, including operation time, operation content, execution status, and other information. The database is a data storage system used to store log information. In practice, the executing entity can integrate the execution status codes obtained from each device, along with the drawing number, project name, drawing date, and current timestamp, into a complete operation log record, and then store this log record in the database for subsequent querying, auditing, and traceability. For example, the generated log record might be: "2024-05-12 14:30:25, Drawing J-01, Project XX Residential Community Phase I, Printing Completed (Status Code 0), Stamping Completed (Status Code 0), Archiving Completed (Status Code 0), Operation Successful."
[0078] Steps one through eleven of this disclosure are an inventive point of this disclosure, solving the technical problem that "existing drawing management systems, after successfully recognizing drawing signature information, lack an automated closed-loop process from metadata parsing to multi-physical device collaborative control, resulting in subsequent printing, stamping, and archiving operations still requiring a large amount of manual intervention, leading to low efficiency, error-proneness, and difficulty in traceability." Existing technologies have the following shortcomings in post-processing of drawing recognition: Firstly, the drawing printing process requires manual selection of paper according to the drawing size, input of the number of copies, and manual affixing of electronic signatures, a cumbersome process prone to specification mismatches; secondly, the stamping operation relies on manual handling of the printed drawings to the stamping machine and manual positioning of the stamp, which is not only inefficient but also results in large deviations in the steel stamp position; thirdly, archiving requires manual searching of cabinet locations, determination of retention periods, and filling in archiving records, which is time-consuming, labor-intensive, and prone to misplacement; and fourthly, the entire processing flow is fragmented, information between devices is isolated, making integrated operation impossible, and there is a lack of full-process operation log records, making subsequent auditing difficult. Solving the above problems would enable printers, stamping machines, and intelligent mobile shelving to work collaboratively directly from the drawing recognition results, automatically completing the entire process of printing, stamping, and archiving. This would significantly improve the efficiency and accuracy of drawing processing and create a complete and traceable digital archive. To achieve this, this disclosure proposes the following steps: First, parse the structured drawing metadata to obtain the drawing number, project name, drawing size, and drawing date. This extracts key parameters from the recognition results, providing a precise data foundation for subsequent printing, stamping, and archiving operations, thus solving the inefficiency and input errors caused by manually reviewing drawing information. Second, based on the drawing number, query and retrieve the original electronic drawing file corresponding to the original architectural drawing image from the drawing repository. This establishes a link between the recognition results and the original electronic file, ensuring that the printed output is a high-quality electronic original consistent with the recognized image content, thus resolving the problem of printing errors caused by inconsistent file versions. The third step involves generating a print job instruction based on the aforementioned drawing size information. This instruction includes the storage path of the retrieved original electronic drawing file, the paper size determined based on the drawing size information, the number of copies to be printed based on the project name, and the coordinates for affixing the electronic signature. This automatically maps the drawing size to the paper size and automatically associates the project name with the number of copies, achieving intelligent configuration of printing parameters and eliminating size mismatches and quantity estimation errors that occur when manually setting parameters. The fourth step involves controlling the architectural drawing printer to print the original electronic drawing file based on the print job instruction, and affixing an electronic signature containing the drawing number and the output date to the designated coordinates on each drawing copy, thus obtaining individual drawing copies.Thus, electronic signatures are affixed simultaneously during the printing process, integrating the printing of drawing content with information identification, avoiding the cumbersome process of separately affixing signatures after printing, and ensuring the consistency and accuracy of signature positions. The fifth step, in response to the completion of printing the original electronic drawing file, obtains the stacking position information of each drawing copy and generates a printing completion signal. This allows for real-time monitoring of the printing completion status and the physical position of the drawings, providing precise coordinates for subsequent automated stamping and achieving seamless integration between processes. The sixth step, based on the printing completion signal and the drawing number, generates a stamping task instruction, which includes the stacking position information of each drawing copy, the page number to be stamped, and the stamp type. This automatically converts the output information of the printing stage into input instructions for the stamping stage, enabling cross-device data flow and task collaboration, eliminating delays and errors that may occur with manual information transmission. Step 7: Based on the aforementioned stamping task instructions, control the automatic stamping machine to grab each obtained drawing copy and imprint a physical steel stamp, including the project name, onto each drawing copy at the archiving position corresponding to the stamped page number, resulting in stamped drawing copies. Thus, by automating the drawing grabbing, positioning, and imprinting operations, the machine ensures accurate physical stamp placement and clear markings, significantly improving stamping efficiency and consistency. Step 8: Based on the aforementioned drawing number and drawing date, generate an archiving instruction. This instruction includes the archiving category number corresponding to the drawing number, a storage period identifier determined based on the drawing date, and the cabinet coordinates of the intelligent mobile shelving. This transforms the drawing number and time information into a scientific archiving category and storage period, automatically matching it to a specific storage cabinet, achieving intelligent and standardized drawing archiving. Step 9: Based on the aforementioned archiving instruction, control the intelligent mobile shelving to open the cabinet door indicated by the cabinet coordinates, illuminate the indicator light indicated by the cabinet coordinates, and display the storage period identifier on the screen. Thus, through the physical guidance of lights and cabinet door opening, operators are intuitively guided to place the drawings in the correct positions. Simultaneously, the display screen indicates the retention period, completely eliminating the hassle and errors of manually searching for cabinet locations and determining retention periods. Step 10: Obtain the execution status codes returned by the aforementioned architectural drawing printer, automatic stamping machine, and intelligent mobile shelving after performing their respective operations. This allows for real-time collection of the execution results status of each device, providing a reliable data source for subsequent log recording and anomaly handling. Step 11: Based on the obtained execution status codes, generate a drawing archiving operation log including the drawing number, project name, and drawing date, and store this log in the database. This comprehensively records the entire process from printing and stamping to archiving, forming a traceable and auditable digital archive, providing complete data support for drawing management.In summary, steps one through eleven of this embodiment collaborate with each other, covering the entire process from metadata parsing, file retrieval, instruction generation, printing and signing, status awareness, stamping and imprinting, intelligent archiving to log storage. By constructing an end-to-end, multi-device collaborative automated control framework, a highly integrated, intelligent, and traceable drawing recognition and post-processing workflow is achieved. This effectively eliminates the efficiency bottlenecks and potential errors of manual operation, ensuring the real-time performance, accuracy, and standardization of the drawing processing workflow, and to a certain extent, meeting the core requirements of modern construction engineering management for automated and digitized drawing archiving.
[0079] In some optional implementations of certain embodiments, the aforementioned executing entity can control the architectural drawing printer to print the original electronic drawing file based on the aforementioned print task instruction through the following steps, and affix an electronic signature including the drawing number and the drawing date to the affixation coordinates of each drawing copy to obtain each drawing copy: First, parse the aforementioned print task instruction to obtain the storage path, number of copies, paper size, and affixation coordinates of the electronic signature of the original electronic drawing file. Wherein, the print task instruction refers to a set of parameter instructions used to control the printer to perform the printing operation, containing various configuration information required for printing. The original electronic drawing file refers to an electronic format file corresponding to the original architectural drawing image that can be printed, such as DWG, PDF, etc. The storage path refers to the storage location of the original electronic drawing file in the current system, used by the printer to locate and read the file. The number of copies refers to the number of drawing copies to be printed. The paper size refers to the printing paper size determined according to the drawing sheet information, such as A0, A1, A2, etc. The electronic signature refers to a seal embedded in the drawing in the form of a digital image, usually containing information such as the drawing number and the drawing date. The affixing coordinates refer to the positional coordinates of the electronic signature on the drawing, usually expressed in pixels or millimeters relative to the origin of the drawing page. In practice, the aforementioned executing entity can parse the print task instruction generated in step 107 to extract the storage path, number of copies, paper size, and affixing coordinates of the electronic signature from the original electronic drawing file. For example, the parsed result might be a storage path of " / storage / J-01.pdf", a print count of 5, a paper size of "A1", and a affixing coordinate of "(x:800mm, y:560mm)".
[0080] The second step involves retrieving the original electronic drawing file from the drawing repository based on the aforementioned storage path and loading it into the print buffer. The drawing repository refers to a database or file system used to store original electronic drawing files, typically indexed and managed according to drawing numbers. The print buffer is a storage area in the printer or control system used to temporarily store data to be printed, ensuring the continuity and stability of the printing process. In practice, the executing entity can locate the corresponding original electronic drawing file in the drawing repository based on the parsed storage path, read it, and load it into the print buffer, awaiting printer access. For example, based on the storage path " / storage / J-01.pdf", the file "J-01.pdf" is retrieved from the drawing repository, and its data is loaded into the print buffer.
[0081] The third step involves repeating the following printing steps until all copies of the drawings corresponding to the above-mentioned number of prints are printed and signed: First sub-step: Based on the above paper specifications, control the paper feed mechanism of the architectural drawing printer to pick up blank drawings from the paper tray matching the paper specifications and transport them to the print path. Here, an architectural drawing printer refers to a large-format printing device specifically designed for printing engineering drawings, typically supporting multiple paper sizes and high-precision printing. The paper feed mechanism refers to the mechanical device inside the printer responsible for picking up and transporting paper. The paper tray refers to the container on the printer used to store blank drawings; different paper trays can hold different paper sizes, and each paper tray is associated with corresponding paper size information in the printer configuration. The paper tray matching the paper size refers to the paper tray containing blank drawings of the corresponding size, as found according to the printer configuration information. Blank drawings refer to blank paper that has not yet been printed. The print path refers to the internal path of the printer used to transport paper and complete the printing process. In practice, the aforementioned executing entity queries the printer's paper tray configuration table based on paper size (e.g., A1) to find the paper tray number that stores A1 paper. It then sends an instruction to the architectural drawing printer to control the paper feed mechanism to pick up a blank drawing from the tray with that number and deliver it to the beginning of the printing path. For example, the paper feed mechanism picks up a blank A1 drawing from the tray labeled "Paper Tray 2" and configured for A1 paper size, and feeds it into the printing path.
[0082] The second sub-step involves controlling the printer's engine to parse and render the original electronic drawing file, creating the drawing content on the captured blank paper, resulting in an unstamped copy. The printer engine is the core component inside the printer responsible for converting electronic files into print data, typically including a raster image processor (RIP) and a printhead control unit. Parsing and rendering refer to the process of converting the original electronic drawing file into dot matrix data or ink droplet control instructions that the printer can recognize. The drawing content refers to the graphics, lines, text, and other information on the drawing. An unstamped copy is a semi-finished drawing that has been printed but has not yet been electronically signed. In practice, the aforementioned execution entity controls the printer engine to read data from the original electronic drawing file from the print buffer, parse and render it, and then output the rendered image data through the printhead onto the blank paper, forming the complete drawing content and obtaining an unstamped copy. For example, the printer engine parses and renders the "J-01.pdf" file, printing a complete architectural floor plan on an A1 blank sheet, resulting in an unstamped copy.
[0083] The third sub-step involves monitoring the position of the unstamped copy of the drawing in the output channel and generating a trigger signal when the unstamped copy reaches the target position corresponding to the stamping coordinates. Here, the output channel refers to the path the drawing follows from the print engine to the output tray after printing. The output position refers to the real-time position of the drawing in the output channel, typically detected by a sensor (such as a photoelectric sensor). The target position corresponding to the stamping coordinates refers to the specific location in the output channel where the stamping operation should be performed, calculated based on the stamping coordinates of the electronic signature. The trigger signal is an electrical signal generated by the sensor or control system when the drawing reaches the target position, used to initiate the stamping action. In practice, the executing entity monitors the movement of the unstamped copy of the drawing in real time using position sensors installed on the output channel. When the drawing moves to the target position corresponding to the preset stamping coordinates (e.g., the lower right corner of the drawing is directly below the electronic signature module), the control system generates a trigger signal, notifying the electronic signature module to prepare for the stamping operation. For example, when the unstamped copy of the drawing is transported until its lower right corner aligns with the electronic signature module, the sensor triggers, generating a trigger signal.
[0084] The fourth sub-step involves, in response to the aforementioned trigger signal, controlling the electronic signature module to perform a downward pressing action at the current position of the unstamped drawing copy, affixing a red electronic signature including the drawing number and the production date at the designated stamping coordinates, thus obtaining a single drawing copy. Here, the electronic signature module refers to a device installed on the printer's paper output path for printing electronic signatures on drawings, typically consisting of a miniature printhead or stamp assembly. The downward pressing action refers to the action of the signature module applying pressure to the drawing surface and printing or imprinting. The red electronic signature refers to a stamp image containing the drawing number and production date, printed with red ink or toner. A single drawing copy refers to a complete drawing after all printing and stamping operations are completed. In practice, upon receiving the trigger signal, the executing entity immediately controls the electronic signature module to move downwards, printing a red electronic signature containing the drawing number and production date at the stamping coordinates on the drawing, thereby completing the printing and stamping of a complete drawing copy, resulting in a single drawing copy. For example, the electronic signature module prints a red "J-01 2024-05-12" electronic signature at the lower right corner (800mm, 560mm) of the drawing, resulting in a complete copy of the drawing.
[0085] The fourth step involves monitoring the output tray status of the architectural drawing printer to obtain the stacking order and position information of each drawing copy on the output tray, in response to the completion of printing and stamping of all the corresponding number of copies. The output tray is the tray at the end of the printer used to collect the printed drawings. The output tray status refers to the stacking of drawings on the tray, including the presence of drawings and stacking height. The stacking order refers to the top-to-bottom order of the drawings on the tray; typically, the first printed drawing is at the bottom, and the last printed drawing is at the top. The stacking position information refers to the specific coordinates of the drawing's placement on the tray, used as a positioning reference for the subsequent stamping machine. In practice, after the execution entity completes the cyclical operation for all printing copies (e.g., 5 sheets), the status of the output tray is monitored using the printer's built-in sensors or an external vision system to obtain the stacking order (e.g., the first, second, etc. from top to bottom) and stacking position information (e.g., the corner coordinates of each drawing) of each drawing copy on the tray. This information is recorded for use in generating subsequent stamping task instructions. For example, the monitoring showed that there were 5 sheets of paper stacked on the paper tray, numbered 1 to 5 from top to bottom, with the coordinates of the top left corner of each sheet being (x1, y1) to (x5, y5).
[0086] The above-described implementation method of this disclosure, as an inventive point of this disclosure, solves the technical problem of "how to achieve integrated and precise control of printing and electronic signature affixing during the automated printing of drawings." Existing technologies have the following shortcomings in the drawing printing process: Firstly, printing and signing are usually two independent processes. The drawing content is printed first, and then an electronic signature is affixed manually or through another device. This is not only inefficient but also prone to problems such as signature position misalignment and mismatch between the signature content and the drawing. Secondly, the printer lacks real-time monitoring and precise control of the drawing transport position, making it impossible to complete the signing operation synchronously during printing, resulting in difficulty in determining the timing of the signing. Thirdly, the stacking information of the drawings after printing cannot be automatically obtained, requiring manual intervention from the subsequent stamping machine to locate and grasp them, affecting the smooth connection of the entire automated process. Fourthly, when multiple drawings are printed continuously, the consistency of the signature position and the stability of the signature quality cannot be guaranteed for each drawing. If the above problems are solved, integrated and synchronous operation of printing and electronic signatures can be achieved, accurately completing the signing and affixing during the drawing printing process and automatically recording the drawing stacking information, providing reliable data for subsequent automated operations. To achieve this effect, this disclosure proposes the following steps: First, parse the aforementioned print task instruction to obtain the storage path, number of copies, paper size, and coordinates for affixing the electronic signature of the original electronic drawing file. This extracts all key parameters from the print task instruction, providing a complete data foundation for subsequent precise control and solving the problem of scattered and difficult-to-unify print parameters. Second, based on the aforementioned storage path, retrieve the original electronic drawing file from the drawing repository and load it into the print buffer. This ensures that the electronic file to be printed is correctly loaded into the print buffer, preparing for continuous and stable print output and resolving print interruptions caused by file read delays or failures. Third, repeat the following print output steps until all drawing copies corresponding to the aforementioned number of copies are printed and affixed: First sub-step: Based on the aforementioned paper size, control the paper feed mechanism of the architectural drawing printer to grab blank drawings from the paper tray matching the aforementioned paper size and transport them to the print channel. This automatically selects the correct paper tray to grab blank drawings according to the preset paper size, ensuring that the size of each sheet of paper strictly matches the drawing size, solving the problems of errors and size mismatches in manual paper selection. The second sub-step involves controlling the printer's engine to parse and render the original electronic drawing file, creating the drawing content on the captured blank paper, resulting in an unstamped copy. This accurately converts the electronic file into printed drawing content, ensuring the integrity and clarity of the drawing and resolving issues of unstable print quality and missing content. The third sub-step monitors the position of the unstamped copy in the paper output channel and generates a trigger signal when it reaches the target position corresponding to the stamping coordinates.Therefore, by accurately capturing the moment the drawing reaches the signature position through real-time position monitoring, a precise triggering time is provided for synchronous signature, solving the problems of inaccurate signature timing and positional deviation. In the fourth sub-step, in response to the aforementioned trigger signal, the electronic signature module is controlled to perform a pressing action at the current position of the unstamped drawing copy, affixing a red electronic signature including the drawing number and the drawing date at the aforementioned stamping coordinate position, resulting in a single drawing copy. Thus, the precise affixing of the electronic signature is completed synchronously during the printing process, realizing integrated printing and signing operations and solving the problems of process separation, low efficiency, and positional deviation. In the fourth step, in response to completing the printing and signing of all drawing copies corresponding to the aforementioned number of copies, the status of the paper output tray of the architectural drawing printer is monitored to obtain the stacking order and stacking position information of each drawing copy on the paper output tray. Thus, the physical stacking information of the drawings after printing is automatically obtained, providing a precise positioning basis for the subsequent automatic grasping of the stamping machine, solving the problems of missing drawing stacking information and the inability of subsequent equipment to operate automatically. In summary, the implementation methods described above in this disclosure cooperate with each other, starting from the entire process of "parameter parsing, file loading, automatic paper selection, accurate printing, position monitoring, synchronous signing and stamping to stacking information collection." By constructing a highly integrated, real-time closed-loop integrated control scheme for printing and stamping, the intelligent, accurate, and automated drawing printing process is achieved. This effectively eliminates the efficiency loss and positional deviation caused by the separation of printing and stamping, ensures consistent and stable stamping quality for each drawing, and provides reliable drawing stacking information for subsequent automated processes. To a certain extent, this meets the core requirements of modern drawing management for efficient, accurate, and integrated printing operations.
[0087] In some optional implementations of certain embodiments, the aforementioned executing entity can control an automatic stamping machine to grasp each obtained drawing copy based on the aforementioned stamping task instruction, and to imprint a physical steel stamp including the aforementioned project name on each obtained drawing copy at the archiving position corresponding to the aforementioned stamping page, thereby obtaining each drawing copy with the steel stamp: First, parse the aforementioned stamping task instruction to obtain the stacking position information, stamping page number, and stamp type of each drawing copy. The stamping task instruction refers to a set of parameter instructions used to control the automatic stamping machine to perform the physical steel stamping operation, including information such as grasping position, stamping position, and stamp specifications. Each drawing copy refers to multiple physical drawings output by the architectural drawing printer in step 107 that have been electronically signed. The stacking position information refers to the description of the placement and stacking order of each drawing copy on the printer's output tray, typically including the corner coordinates and upper / lower order of the drawings. The stamping page number refers to which page or specific location of the drawing needs to be stamped, such as "lower right corner of the first page" or "specified area of the archiving page." The stamp type refers to the style of the physical stamp to be used, usually corresponding to different text content (such as "archived," "void," "approved") or patterns. In practice, the aforementioned executing entity can parse the stamping task instruction generated in step 107 to extract the stacking position information, stamping page number, and stamp type of each drawing copy. For example, the parsed stacking position information is "paper tray, 5 sheets from top to bottom, with the upper left corner coordinates of each sheet being (x1, y1) to (x5, y5)", the stamping page number is "lower right corner of the first page", and the stamp type is "archive stamp".
[0088] The second step involves repeating the following stamping operation steps until all the above-mentioned drawing copies are stamped: First sub-step: Based on the stacking position information, control the robotic arm of the automatic stamping machine to move above the stacking position of each drawing copy, and control the vacuum suction cup array at the end of the robotic arm to grab the topmost single drawing copy from the stacking position. Here, "automatic stamping machine" refers to an automated device capable of automatically grabbing paper, identifying its position, and imprinting a physical stamp in a designated area. "Robotic arm" refers to the multi-jointed robotic arm on the automatic stamping machine used to perform grabbing and moving operations. "Vacuum suction cup array" refers to a grabbing device installed at the end of the robotic arm, consisting of multiple vacuum suction cups, which uses vacuum to generate negative pressure to attract and grab paper. "Stacking position" refers to the specific location of the drawing copies on the output tray, usually represented by coordinate information. "Topmost single drawing copy" refers to the topmost drawing in the current stack, which is the next to be grabbed. In practice, based on the stacking position information obtained from the analysis, the aforementioned executing entity controls the robotic arm of the automatic stamping machine to move to the corresponding position above the paper output tray. Then, it controls the vacuum suction cup array to contact the topmost copy of the drawing and starts the vacuum pump. The drawing is then adsorbed onto the suction cups through negative pressure, completing the grasping action. For example, the robotic arm moves to coordinates (x1, y1) above the paper output tray, and the vacuum suction cup array adsorbs and grasps the first copy of the topmost drawing.
[0089] The second sub-step involves responding to a successful grasp signal received by monitoring the negative pressure sensor status of the aforementioned vacuum suction cup array. The robotic arm is then controlled to transport the grasped copy of the current drawing to the visual inspection area of the stamping platform. Here, the negative pressure sensor is a pressure sensor installed in the vacuum suction cup tubing, used to detect the vacuum level within the suction cup to determine if the drawing has been successfully adsorbed. The successful grasp signal is generated when the vacuum level detected by the negative pressure sensor reaches a preset threshold, indicating that the drawing has been reliably adsorbed. The current drawing copy refers to the drawing currently being grasped and processed. The stamping platform refers to the flat surface on the automatic stamping machine where drawing positioning and stamping operations are performed. The visual inspection area is the area on the stamping platform covered by a camera for capturing images of the drawing. In practice, the executing entity continuously monitors the status of the negative pressure sensor. Upon receiving the successful grasp signal, confirming that the drawing has been firmly adsorbed, it then controls the robotic arm to move the current drawing copy from the paper output tray to above the visual inspection area of the stamping platform and place it stably within that area, ready for image acquisition. For example, when the negative pressure sensor detects that the vacuum level has reached -0.6 bar, it generates a successful grasping signal, and the robotic arm moves the adsorbed drawing to the visual detection area and puts it down.
[0090] The third sub-step involves controlling the camera on top of the automatic stamping machine to capture images of the current drawing copy, obtaining an image of the current drawing. The camera is a high-definition industrial camera mounted on top of the automatic stamping machine, viewing the stamping platform from above, used to capture image information of the drawing. Image acquisition refers to the process of the camera taking a picture of the drawing and generating a digital image. The current drawing image is the digital image file obtained after the camera captures the current drawing copy. In practice, the aforementioned executing entity controls the camera on top of the automatic stamping machine to capture images of the current drawing copy located in the visual inspection area, obtaining a clear image of the drawing for subsequent position recognition and deviation calculation. For example, the camera captures an image of the drawing located in the visual inspection area, obtaining a current drawing image with a resolution of 1920×1080 pixels.
[0091] The fourth sub-step involves performing header orientation recognition and corner detection on the current drawing image to obtain the current header orientation and the coordinates of the four corners of the current page. Header orientation recognition refers to the process of analyzing the orientation of text or graphics in the drawing image using image processing algorithms to determine the orientation of the header (usually at the top of the drawing). Corner detection refers to identifying the precise positions of the four corner points of the drawing in the image using edge detection algorithms. The current header orientation refers to the rotation angle of the current drawing copy relative to the standard orientation, such as 0°, 90°, 180°, or 270°. The four corner coordinates refer to the pixel coordinates of the top-left, top-right, bottom-left, and bottom-right corners of the drawing in the image coordinate system. In practice, the execution entity can use image processing algorithms (such as Hough transform and corner detection) to analyze the current drawing image, identify the header orientation, and accurately locate the coordinates of the four corners. For example, analysis revealed that the header of the drawing was facing upwards (0°), and the coordinates of the four corners were (100, 100), (900, 100), (100, 1300), and (900, 1300) respectively.
[0092] The fifth sub-step compares the current header direction and the coordinates of the four corners with the preset standard header direction and standard archiving position coordinates, and generates the angular deviation value and various displacement deviation values of the current drawing copy relative to the stamping platform. The preset standard header direction refers to the correct orientation of the drawing under ideal conditions, typically 0° (header upwards). The standard archiving position coordinates are predefined, representing the ideal position on the drawing directly below the stamp header where the steel stamp should be affixed; these are usually preset based on drawing specifications and archiving standards. The angular deviation value is the difference in angle between the current header direction and the standard header direction; for example, if the current header direction is 2°, the angular deviation value is +2°. The various displacement deviation values refer to the pixel or physical distance difference between the actual archiving position of the current drawing and the standard archiving position in the X and Y axes. In practice, the executing entity can compare the identified current header direction with the preset standard header direction to calculate the angular deviation value; simultaneously, it can determine the actual position of the current drawing based on the coordinates of the four corners and compare it with the standard archiving position coordinates to calculate the displacement deviation values in the X and Y directions. For example, if the current header direction is 2° and the standard header direction is 0°, then the angle deviation is +2°; if the standard archiving position coordinates are (500, 600) and the actual archiving position coordinates are (505, 598), then the X-direction displacement deviation is +5 pixels and the Y-direction displacement deviation is -2 pixels. It should be noted that the stamping platform actually consists of two parts: an upper fixed platform that carries the drawing, and a lower fine-tuning motor that drives the fixed platform to move. Therefore, the position of the entire stamping platform and the drawing can be adjusted by controlling the fine-tuning motor.
[0093] The sixth sub-step involves controlling the fine-tuning motor drive platform below the stamping platform, based on the aforementioned angular deviation and displacement deviation values, to move the archiving position corresponding to the stamped page number of the current drawing copy to directly below the stamp head. Here, the fine-tuning motor refers to a high-precision stepper motor or servo motor installed below the stamping platform for precisely adjusting the platform's position. The drive platform is a movable platform driven by the fine-tuning motor; the drawing is placed on this platform, and position correction is achieved through platform movement. The stamp head is the mechanical component that mounts the physical steel stamp and performs the downward stamping action. The archiving position refers to the specific location on the drawing where the steel stamp should be affixed, determined by the stamped page number. In practice, the aforementioned executing entity sends control commands to the fine-tuning motor based on the calculated angular and displacement deviation values, causing the motor drive platform to perform corresponding rotational and translational movements, thereby precisely moving the archiving position on the drawing directly below the stamp head. For example, the fine-tuning motor drive platform rotates 2° clockwise, moves 5 pixels in the positive X direction, and moves 2 pixels in the negative Y direction, aligning the drawing's archiving position with the stamp head.
[0094] The seventh sub-step, in response to obtaining a correction completion signal for the current drawing copy by monitoring the encoder feedback signal of the aforementioned fine-tuning motor, controls the stamping head to carry the physical steel stamp corresponding to the aforementioned stamp type to imprint a physical steel stamp including the aforementioned project name at the aforementioned archiving position, thus obtaining the current drawing copy after steel stamping. Here, the encoder refers to a position feedback device installed on the fine-tuning motor, used to monitor the motor's rotation angle and displacement in real time and feed back the actual position to the control system. The correction completion signal is a signal generated by the control system indicating that the correction has been completed when the actual position fed back by the encoder matches the target position. The physical steel stamp is a solid metal stamp with an embossed pattern, leaving an imprint on paper through pressure. A physical steel stamp is an embossed mark formed on paper through physical pressure, typically used to indicate that a document has been archived or reviewed. The current drawing copy after steel stamping refers to the current drawing with the steel stamp imprinted. In practice, the aforementioned execution entity continuously monitors the encoder feedback signal of the fine-tuning motor. When the platform moves to the target position and the encoder feedback value matches the set value, a correction completion signal is generated. Subsequently, the stamping head is controlled to move downwards, carrying a physical steel stamp of a specified type to imprint at the archiving position of the drawing, forming a physical steel stamp containing the project name, thus obtaining a copy of the current drawing after the steel stamp is affixed. For example, if the encoder feedback confirms that the platform is in position, the stamping head presses down, imprinting an archiving steel stamp with the words "XX Residential Community Phase I Project" in the lower right corner of the drawing.
[0095] The eighth sub-step, in response to the stamping completion signal obtained by monitoring the limit switch status of the stamping head, controls the robotic arm to transport the stamped copy of the current drawing to the output tray and controls the vacuum suction array to release. Here, the limit switch refers to a limit switch installed on the movement path of the stamping head, used to detect whether the stamping head has completed pressing down and returned to its original position. The stamping completion signal is the signal generated when the limit switch detects that the stamping head has completed pressing down and returned to its original position. The output tray is the tray on the automatic stamping machine used to collect the stamped drawings. Release refers to the action of the vacuum suction array stopping vacuuming, releasing the negative pressure, and thus releasing the drawing. In practice, the aforementioned execution entity monitors the status of the limit switch; upon receiving the stamping completion signal, it confirms that the current drawing copy has been successfully stamped; then it controls the robotic arm to pick up the stamped drawing from the stamping platform, transport it above the output tray, and then controls the vacuum suction array to stop vacuuming, allowing the drawing to fall smoothly into the output tray. For example, when the limit switch detects the stamp head returning to its original position, the robotic arm moves the drawing to the output tray, the vacuum suction cup releases, and the drawing falls into the tray.
[0096] The third step involves completing the stamping operation on all the aforementioned drawing copies, thus confirming the presence of stamped drawing copies. Completing the stamping operation means iteratively executing the stamping steps for all drawing copies, meaning each drawing undergoes the entire process of grabbing, positioning, correcting, imprinting, and releasing. Stamped drawing copies refer to the final collection of drawings obtained after physically stamping all the original drawing copies. In practice, once the executing entity has completed the iterative processing of all drawing copies, it confirms that all stamped drawing copies are obtained. These drawings are neatly stacked in the output tray and can be used for subsequent archiving operations. For example, after 5 iterations, the output tray contains 5 drawing copies stamped with the physical seal of "XX Residential Community Phase I Project".
[0097] The above-described implementation method of this disclosure, as an inventive point of this disclosure, solves the technical problem of "how to achieve high-precision physical steel stamping during the automated stamping process of drawings". Existing technologies have the following shortcomings in the drawing stamping process: Firstly, the stamping operation relies on manual labor, requiring manual handling of drawings from the output tray, manual alignment of the stamping position, and manual stamping of the physical steel stamp. This is not only inefficient but also results in large deviations in the steel stamp position and inconsistent stamp depth. Secondly, drawings are prone to angular and displacement deviations during transport and placement, which are difficult to correct manually, leading to poor consistency in the steel stamp position of the same batch of drawings. Furthermore, the lack of reliable detection of successful grasping makes it easy for drawings to fail to grasp or fall during the process without being detected in time. Finally, after stamping, drawings are piled up haphazardly, making it difficult to smoothly connect with subsequent archiving processes and affecting the efficiency of the entire automated process. Solving these problems enables the automatic stamping machine to accurately grasp, visually position, automatically correct deviations, and precisely stamp drawings, ensuring accurate physical steel stamp position and clear imprints on each drawing, and orderly outputting them to the next workstation. To achieve this effect, this disclosure proposes the following steps: First, analyze the stamping task instruction to obtain the stacking position information, stamping page number, and stamp type of each drawing copy. This extracts all key parameters from the stamping task instruction, providing a precise data foundation for subsequent grasping, positioning, and imprinting operations, solving the problem of scattered and unrestricted operation parameters. Second, repeat the following stamping operation steps until the stamping of each drawing copy is completed: First sub-step: Based on the stacking position information, control the robotic arm of the automatic stamping machine to move above the stacking position of each drawing copy, and control the vacuum suction cup array at the end of the robotic arm to grasp the topmost single drawing copy from the stacking position. This automatically locates and grasps the drawing based on precise stacking coordinates, achieving reliable drawing pickup and solving the problems of low efficiency and easy damage to the drawing during manual handling. Second sub-step: In response to a successful grasping signal of the current drawing copy obtained by monitoring the negative pressure sensor status of the vacuum suction cup array, control the robotic arm to transport the grasped current drawing copy to the visual inspection area of the stamping platform. Therefore, by using a negative pressure sensor to confirm in real time that the drawing has been firmly attached, reliable gripping is ensured before transfer, solving the problem of not being able to detect gripping failures or drops during transit in a timely manner. The third sub-step controls the camera on top of the automatic stamping machine to capture an image of the current drawing copy, obtaining an image of the current drawing. This provides high-definition image data for subsequent position recognition and deviation calculation, solving the problem of not being able to accurately perceive the actual position of the drawing. The fourth sub-step performs header direction recognition and corner detection on the current drawing image, obtaining the current header direction of the current drawing copy and the coordinates of the four corners of the current page. Thus, image processing technology accurately identifies the actual placement angle and position of the drawing, solving the problem of large errors in manual visual positioning.The fifth sub-step compares the current header direction and the coordinates of the four corners with the preset standard header direction and standard archiving position coordinates, generating the angular deviation value and various displacement deviation values of the current drawing copy relative to the stamping platform. This quantitatively compares the actual position of the drawing with the ideal position, accurately calculating the angle and displacement that need correction, solving the problems of unquantifiable deviations and lack of basis for correction. The sixth sub-step, based on the angular deviation value and various displacement deviation values, controls the fine-tuning motor drive platform below the stamping platform to move the archiving position corresponding to the stamped page of the current drawing copy to directly below the stamping head. This achieves automatic correction through a high-precision fine-tuning motor, accurately aligning the archiving position of the drawing with the stamping head, solving the problems of low accuracy and poor consistency in manual correction. The seventh sub-step, responding to the correction completion signal of the current drawing copy obtained by monitoring the encoder feedback signal of the fine-tuning motor, controls the stamping head to carry the physical steel stamp corresponding to the stamp type to imprint a physical steel stamp including the project name at the archiving position, obtaining the current drawing copy with the steel stamp. Therefore, after confirming the precise positioning, the stamping operation is performed, and encoder feedback ensures proper correction, solving the problems of inaccurate stamping position and blurred imprints. The eighth sub-step, responding to the stamping completion signal of the current drawing copy obtained by monitoring the travel switch status of the stamping head, controls the robotic arm to transport the stamped drawing copy to the output tray and controls the release of the vacuum suction array. Thus, after confirming the stamping is complete, the finished drawings are automatically transferred to the output tray and stacked orderly, solving the problem of messy drawing stacking and inability to connect with subsequent processes. The third step, responding to the completion of the stamping operation on each of the above drawing copies, confirms that each drawing copy has been stamped. Thus, it is confirmed that all drawings have been stamped and neatly stacked on the output tray, providing a complete set of finished drawings for subsequent archiving operations. In summary, the implementation methods described above in this disclosure cooperate with each other, starting from the entire process of "instruction parsing, precise grasping, visual positioning, deviation calculation, automatic correction, accurate imprinting to orderly output." By constructing an automated stamping solution integrating mechanical control, visual recognition, and positional closed-loop, high precision, high efficiency, and high quality are achieved in the physical stamping process. This effectively eliminates the positional deviations and efficiency bottlenecks caused by manual stamping, ensuring accurate and consistent stamping positions and clear, standardized imprints on each drawing, and providing orderly finished drawings for subsequent automated archiving. To a certain extent, this meets the core requirements of modern drawing management for automation and precision in the physical stamping process.
[0098] The above-described embodiments of this disclosure have the following beneficial effects: The architectural drawing label text recognition and control method of some embodiments of this disclosure can achieve high-precision positioning, adaptive direction correction, fine stroke enhancement and repair, and structured information extraction for the label area in complex architectural drawings, significantly improving the intelligence level of digital archiving and management of drawings. Specifically, traditional methods (such as full-image OCR recognition or fixed-position-based cropping schemes) may encounter problems such as label position shifting, large-area blank interference, text rotation, extremely thin fonts, and low contrast, resulting in positioning failures, direction misjudgments, low OCR recognition rates, and the inability to effectively use the results for subsequent processing. If only conventional image enhancement or simple rule matching is relied upon, text may become stuck with table lines, and field extraction errors may occur, ultimately leading to inaccurate drawing archiving information and low management efficiency. Therefore, the architectural drawing label text recognition and control method of some embodiments of this disclosure first acquires the original architectural drawing image. This provides basic input data for subsequent processing, ensuring compatibility and processability for architectural drawing images from various sources (such as scans, screenshots, and photographs). Then, full-image text perception detection is performed on the original architectural drawing image to obtain the coordinate information of the full-image detection text boxes. This obtains a sparse representation of the full-image text distribution with extremely low computational overhead, providing reliable clues for subsequent accurate positioning of the title tag area, avoiding blind searching or complex feature extraction across the entire image, and improving processing efficiency from the source. Next, based on the coordinate information of the full-image detection text boxes, a title tag ROI image is generated. Then, using a spatial clustering algorithm of text boxes, based on a comprehensive score of text density, quantity, and positional features, the densest text clusters located at the edge of the drawing are automatically selected as the title tag area. This effectively solves the problem of positioning difficulties caused by the wandering position of the title tag in existing technologies, achieving "visual attention focus" on the title tag area, eliminating interference from large graphic areas and blank areas in the middle of the drawing, and significantly reducing the computational complexity of subsequent processing. Finally, adaptive orientation correction is performed on the title tag ROI image to obtain the orientation-corrected title tag ROI image. Therefore, by performing orientation classification and rotation correction only on the cropped, clean ROI of the tag, the problem of missing texture features and low confidence caused by large blank areas when performing orientation detection on the entire image is avoided. This fundamentally solves the problem of OCR character morphology confusion caused by the rotation of tag text. At the same time, the rotation operation is limited to small-sized ROIs, significantly reducing computational overhead and avoiding image distortion that may be introduced by rotating the entire image. Next, scale-space transformation enhancement is performed on the orientation-corrected tag ROI image to obtain the enhanced tag ROI image.Therefore, a closed-loop processing technique of "upsampling-enhancement-downsampling" is adopted to sharpen and morphologically dilate extremely fine strokes in a magnified space. This effectively thickens weak strokes, improves the readability of low-contrast text, and precisely controls the dilation amplitude, preventing text from sticking to adjacent table lines. This solves the technical problems of difficult recognition of extremely fine fonts and OCR segmentation errors caused by table line sticking, and the enhanced image does not increase the file size. Then, structured semantic parsing is performed on the enhanced title tag ROI image to extract structured drawing metadata. Using a dual-path fusion strategy of keyword tag matching and location region matching, key fields such as project name, drawing number, and date are accurately extracted from scattered text blocks. Format validation and disambiguation rules ensure the accuracy of these fields, solving the problem of converting OCR recognition results into structured information and providing a high-quality data foundation for subsequent automated operations. Finally, based on the structured drawing metadata, downstream physical devices are controlled to perform related automated operations. This achieves full-process automation from drawing recognition to physical archiving. Furthermore, this method incorporates optimization mechanisms tailored to the characteristics of architectural drawings in core processes such as full-image text perception detection, ROI generation, adaptive orientation correction, scale space transformation enhancement, structured semantic parsing and extraction, and physical device control. This allows it to effectively adapt to architectural drawings of different sizes, layouts, and font styles, and possesses inherent enhancement and repair capabilities for complex situations such as extremely fine strokes, low contrast, and overlapping table lines, thereby enhancing its robustness and generalization in real-world engineering scenarios. Simultaneously, through end-to-end process design, each step is interconnected and progressively advanced, ensuring consistency and reliability across the entire processing chain from original image input to final physical control. Thus, by combining visual attention focusing, scale space transformation enhancement, and structured semantic parsing, it achieves a significant overall improvement in the accuracy, reliability, and downstream control effectiveness of complex architectural drawing ROI recognition, providing crucial technical support for the digital management of architectural engineering drawings.
[0099] Referring further to Figure 2, as an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a building drawing label text recognition and control device. These device embodiments correspond to the method embodiments shown in Figure 1, and the device can be specifically applied to various electronic devices.
[0100] As shown in Figure 2, the architectural drawing label text recognition and control device 200 in some embodiments includes: an acquisition unit 201, a detection unit 202, a generation unit 203, a correction unit 204, an enhancement unit 205, an extraction unit 206, and a control unit 207. The system comprises the following components: an acquisition unit 201, configured to acquire an original architectural drawing image; a detection unit 202, configured to perform full-image text perception detection on the original architectural drawing image to obtain the coordinate information of the full-image detection text box; a generation unit 203, configured to generate a title tag ROI image based on the coordinate information of the full-image detection text box; a correction unit 204, configured to perform adaptive orientation correction on the title tag ROI image to obtain an orientation-corrected title tag ROI image; an enhancement unit 205, configured to perform scale space transformation enhancement on the orientation-corrected title tag ROI image to obtain an enhanced title tag ROI image; an extraction unit 206, configured to perform structured semantic parsing extraction on the enhanced title tag ROI image to obtain structured drawing metadata; and a control unit 207, configured to control downstream physical devices to perform related automated operations based on the structured drawing metadata.
[0101] It is understood that the units described in the apparatus 200 correspond to the various steps in the method described with reference to FIG1. Therefore, the operations, features, and beneficial effects described above for the method also apply to the apparatus 200 and the units contained therein, and will not be repeated here.
[0102] Referring now to FIG3, a schematic diagram of the structure of an electronic device 300 suitable for implementing some embodiments of the present disclosure is shown. The electronic device shown in FIG3 is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present disclosure.
[0103] As shown in Figure 3, the electronic device 300 may include a processing unit 301 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. The RAM 303 also stores various programs and data required for the operation of the electronic device 300. The processing unit 301, ROM 302, and RAM 303 are interconnected via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0104] Typically, the following devices can be connected to I / O interface 305: input devices 306 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 307 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; and communication devices 309. Communication device 309 allows electronic device 300 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 shows electronic device 300 with various devices, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Each box shown in Figure 3 may represent one device, or multiple devices may be represented as needed.
[0105] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 309, or installed from storage device 308, or installed from ROM 302. When the computer program is executed by processing device 301, it performs the functions defined in the methods of some embodiments of this disclosure.
[0106] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use 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: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0107] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0108] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: acquire an original architectural drawing image; perform full-image text perception detection on the original architectural drawing image to obtain the coordinate information of the full-image detection text box; generate a title tag ROI image based on the coordinate information of the full-image detection text box; perform adaptive orientation correction on the title tag ROI image to obtain an orientation-corrected title tag ROI image; perform scale-space transformation enhancement on the orientation-corrected title tag ROI image to obtain an enhanced title tag ROI image; perform structured semantic parsing and extraction on the enhanced title tag ROI image to obtain structured drawing metadata; and control downstream physical devices to perform related automated operations based on the structured drawing metadata.
[0109] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0111] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including an acquisition unit, a detection unit, a generation unit, a correction unit, an enhancement unit, an extraction unit, and a control unit. The names of these units do not necessarily limit the specific unit; for example, an acquisition unit may also be described as "a unit for acquiring original architectural drawing images."
[0112] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0113] Some embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements any of the above-described methods for recognizing and controlling text on architectural drawing labels.
[0114] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for recognizing and controlling text on architectural drawing labels, characterized in that, include: Obtain the original architectural drawings; The original architectural drawing image is subjected to full-image text perception detection to obtain the coordinate information of the full-image detection text box; Based on the coordinate information of the full-image detection text box, a tag ROI image is generated; the tag ROI image is then adaptively oriented to obtain an oriented ROI image. The orientation-corrected ROI image of the tag is enhanced by scale-space transformation to obtain the enhanced ROI image of the tag; The enhanced ROI image of the title block is subjected to structured semantic parsing and extraction to obtain structured drawing metadata; Based on the structured drawing metadata, downstream physical devices are controlled to perform associated automated operations.
2. The method according to claim 1, characterized in that, The step of performing full-image text perception detection on the original architectural drawing image to obtain the coordinate information of the full-image detection text box includes: extracting the aspect ratio of the original architectural drawing image to obtain the image aspect ratio; responding to the image aspect ratio exceeding a preset aspect ratio threshold, overlapping and segmenting the original architectural drawing image along its long side to obtain various segmented image blocks; performing text region detection on the original architectural drawing image or the various segmented image blocks to obtain the coordinate information of each detection text box; and merging the coordinate information of the various detection text boxes to obtain the coordinate information of the full-image detection text box.
3. The method according to claim 1, characterized in that, The step of generating a title tag ROI image based on the coordinate information of the full-image probing text boxes includes: generating the spatial distance between the center points of each probing text box based on the coordinate information of the full-image probing text boxes; performing disjoint-set clustering on each probing text box based on a preset adaptive distance threshold to obtain a set of text clusters; generating a comprehensive score for each text cluster in the set of text clusters; extracting target text clusters based on the comprehensive scores of each text cluster, and generating the bounding rectangle of the target text clusters; and cropping the title tag ROI image from the original architectural drawing image based on the bounding rectangle.
4. The method according to claim 1, characterized in that, The step of adaptively correcting the orientation of the tag ROI image to obtain a orientation-corrected tag ROI image includes: performing orientation reasoning on the tag ROI image to obtain the text orientation category and the corresponding orientation confidence; generating a reverse rotation matrix in response to the text orientation category being non-positive and the orientation confidence exceeding a preset orientation confidence threshold; rotating the tag ROI image based on the reverse rotation matrix to obtain the orientation-corrected tag ROI image; determining the tag ROI image as the orientation-corrected tag ROI image in response to the text orientation category being non-positive and the orientation confidence not exceeding the preset orientation confidence threshold; and determining the tag ROI image as the orientation-corrected tag ROI image in response to the text orientation category being positive.
5. The method according to claim 1, characterized in that, The process of enhancing the orientation-corrected ROI image through scale-space transformation to obtain an enhanced ROI image includes: converting the orientation-corrected ROI image to grayscale to obtain a grayscale ROI image; performing histogram analysis on the grayscale ROI image to obtain pixel intensity distribution information; performing adaptive brightness equalization on the grayscale ROI image based on the pixel intensity distribution information to obtain a preprocessed ROI image; upsampling the preprocessed ROI image to obtain an enlarged ROI image; performing high-frequency edge enhancement on the enlarged ROI image to obtain a sharpened ROI image; performing morphological dilation on the sharpened ROI image to obtain a thickened high-resolution image; and downsampling the thickened high-resolution image to obtain the enhanced ROI image.
6. The method according to claim 1, characterized in that, The step of performing structured semantic parsing and extraction on the enhanced ROI image of the title block to obtain structured drawing metadata includes: performing text recognition on the enhanced ROI image of the title block to obtain a sequence of recognized text boxes, as well as the text content, coordinates, and confidence score of each recognized text box; obtaining a predefined set of target fields, wherein each target field in the target field set has corresponding keyword tags and location region information; performing keyword tag matching on the sequence of recognized text boxes based on the keyword tags corresponding to each target field to obtain a first candidate text box group corresponding to each target field; performing location region matching on the sequence of recognized text boxes based on the location region information corresponding to each target field to obtain a second candidate text box group corresponding to each target field; performing fusion processing on the first and second candidate text box groups corresponding to each target field to obtain a candidate text box set corresponding to each target field; and concatenating or extracting the candidate text box set corresponding to each target field. The process involves obtaining a set of candidate field values for each target field; for each candidate field value in the set, generating a field confidence score based on the recognition confidence score of at least one corresponding recognition text box; performing format validation on the set of candidate field values for each target field to obtain a set of validated field values and a field confidence score for each validated field value; in response to any target field's set of validated field values including at least two validated field values, filtering the set of validated field values based on the field confidence scores for each validated field value to obtain the final field value for the target field; in response to any target field's set of validated field values including only one validated field value, determining the included validated field value as the final field value for the target field; and organizing the final field values for each target field to obtain structured drawing metadata.
7. A device for recognizing and controlling text on architectural drawing labels, characterized in that, include: The acquisition unit is configured to acquire the original architectural drawing image; The detection unit is configured to perform full-image text perception detection on the original architectural drawing image to obtain the coordinate information of the full-image detection text box; The generation unit is configured to generate a tag ROI image based on the coordinate information of the full-image detection text box; The correction unit is configured to perform adaptive orientation correction on the tag ROI image to obtain an orientation-corrected tag ROI image. An enhancement unit is configured to perform scale-space transformation enhancement on the orientation-corrected ROI image of the tag, to obtain an enhanced ROI image of the tag. The extraction unit is configured to perform structured semantic parsing and extraction on the enhanced ROI image to obtain structured drawing metadata; the control unit is configured to control downstream physical devices to perform associated automated operations based on the structured drawing metadata.
8. An electronic device, characterized in that, include: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1 to 6.
9. A computer-readable medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Structured information extraction method and device, electronic equipment and storage medium
CN113568965A
Engineering drawing label identification method and system based on multi-modal information extraction
CN119964171A
Power customer digital archive classification method and device, electronic equipment and storage medium
CN120808361A
Heterogeneous document structured data extraction system and method based on multi-modal fusion
CN121658894A
Engineering drawing equipment tag matching method and device, electronic equipment and storage medium
CN121686507A
Cited By
Building engineering drawing structured information extraction method, device, equipment and medium
CN122157299A
Drawing cutting method, device and equipment based on frame recognition and readable medium
CN122185325A