Engineering energy industry equipment document and drawing bit number automatic extraction system
By introducing automatic extraction system for equipment documents and drawings in digital factories, and using automated means to extract and store bit number information, the problems of low efficiency and low accuracy of manual bit number selection are solved, and fast and accurate bit number extraction is achieved, and data processing efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411673311.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-11-21
AI Technical Summary
During the management of a digital factory, the bit number information contained in the equipment documents and drawings is usually unknown, and it requires manual selection and marking of the bit number, which is large and inaccurate.
It provides an automatic extraction system for the equipment documents and drawings of the engineering energy industry, including document and drawing upload module, preprocessing module, OCR module, bit number information extraction module, bit number position positioning module, accuracy matching module and extraction result storage module, and extract and store bit number information through automated means.
It realizes the rapid and accurate extraction of key bit numbers from a large amount of data, improves data processing speed and efficiency, reduces manual intervention and errors, reduces labor costs, and enhances data accuracy and timeliness.
Smart Images

Figure CN119559654A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of engineering energy industry, and in particular, relates to an automatic extraction system for equipment documents and drawing position numbers in the engineering energy industry. Background Art
[0002] In the management process of digital factories, various data documents need to be associated with 2D drawings and 3D models, so that relevant equipment parameters, documents, drawings, etc. can be viewed through the equipment. This association is mainly carried out in the form of equipment tags, but because it is unknown which tags are included in existing documents and drawings, the tags must be selected and marked manually, which is very labor-intensive and not accurate enough. Summary of the invention
[0003] Based on this, it is necessary to provide an automatic extraction system for equipment documents and drawing position numbers in the engineering energy industry to address the above technical problems.
[0004] In a first aspect, the present application provides a system for automatically extracting equipment documents and drawing position numbers in the engineering energy industry, including: A document and drawing upload module, used to upload files to be processed to the system, wherein the files include documents and / or drawings; A document drawing preprocessing module is used to preprocess the uploaded file to obtain a target file; The document drawing OCR module is used to perform OCR recognition on the target file, extract the text in the file, and obtain text information; A position number information extraction module is used to match the text information according to preset rules and extract the position number information that meets the preset rules; A bit number position locating module, used to locate the bit number information to the bit number position of the target file to obtain the bit number position information; A position number accuracy matching module is used to perform similarity matching between the position number information and the position numbers in the existing position number library to obtain the position number information with the highest similarity; The extraction result storage module is used to store the bit number information with the highest similarity and the corresponding bit number position information.
[0005] In some practicable ways, the document drawing preprocessing module is used to preprocess the uploaded file to obtain the target file, including: The document drawing preprocessing module is used to use a filtering algorithm to smooth the noise points in the document to obtain a first intermediate file; The document drawing preprocessing module is used to detect the smeared area of the first intermediate file by using an opening operation, and restore the smeared area by using adjacent pixel interpolation or fuzzy filling to obtain a second intermediate file; The document drawing preprocessing module is used to process the residual stains in the background of the second intermediate file by using an adaptive threshold segmentation method to obtain a third intermediate file; The document drawing preprocessing module is used to detect the straight line features of the third intermediate file by using Hough transform to obtain the deflection angle of the third intermediate file; The document drawing preprocessing module is used to adjust the third intermediate file according to the deflection angle of the third intermediate file to obtain a target file.
[0006] In some practicable ways, the document drawing OCR module is used to perform OCR recognition on the target file, extract text from the file, and obtain text information, including: The document drawing OCR module is used to identify the text area position in the target file by using an edge detection algorithm; The document drawing OCR module is used to extract the text in the text area to obtain text information.
[0007] In some practicable manners, the bit number information extraction module is used to match the text information according to preset rules and extract the bit number information that meets the preset rules, including: The bit number information extraction module is used to construct the preset rule, wherein the preset rule represents a regular expression; The bit number information extraction module is used to match the text information according to the preset rule to obtain the text information that meets the preset rule; The bit number information extraction module is used to extract text information that meets the preset rules to obtain bit number information that meets the preset rules.
[0008] In some practicable manners, the bit number position locating module is used to locate the bit number information at the bit number position of the target file to obtain the bit number position information, including: The bit number position positioning module is used to map the bit number information back to the coordinate system of the target file to obtain the coordinates of the bit number information in the coordinate system; The position number location positioning module is used to construct a marking layer with a coordinate system on the target file; The position number location positioning module is used to mark the corresponding coordinate position on the marking layer according to the coordinates of the position number information in the coordinate system to obtain the marking layer of the position number location information.
[0009] In some practicable manners, the position number accuracy matching module is used to perform similarity matching between the position number information and the position numbers in the existing position number library to obtain the position number information with the highest similarity, including: The position number accuracy matching module is used to calculate the distance between each position number information and the position numbers in the existing position number library by using the edit distance to obtain the distance result; The position number accuracy matching module is used to determine the position number information with the highest similarity based on the distance result.
[0010] In some practicable manners, the extraction result storage module is used to store the bit number information with the highest similarity and the corresponding bit number position information, including: The extraction result storage module is used to obtain the bit number information with the highest similarity and the corresponding bit number position information; The extraction result storage module is used to form structured data by combining the bit number information with the highest similarity and the corresponding bit number position information to obtain a key-value pair; The extraction result storage module is used to store key-value pairs.
[0011] In a second aspect, the present application provides a method for automatically extracting device documents and drawing position numbers in the engineering energy industry, which is applied to the aforementioned automatic extraction system for device documents and drawing position numbers in the engineering energy industry, and the method includes: Uploading files to be processed to the system, wherein the files include documents and / or drawings; Preprocessing the uploaded file to obtain a target file; Performing OCR recognition on the target file, extracting text from the file, and obtaining text information; According to the preset rules, the text information is matched and extracted to obtain the bit number information that meets the preset rules; Positioning the bit number information at the bit number position of the target file to obtain bit number position information; Performing similarity matching between the bit number information and the bit numbers in the existing bit number library to obtain the bit number information with the highest similarity; The bit number information with the highest similarity and the corresponding bit number position information are stored.
[0012] In a third aspect, the present application provides a computer device including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the aforementioned method for automatically extracting position numbers from equipment documents and drawings in the engineering energy industry are implemented.
[0013] In a fourth aspect, the present application provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the aforementioned method for automatically extracting position numbers from equipment documents and drawings in the engineering energy industry.
[0014] Beneficial effect: The present application provides an automatic extraction system for equipment documents and drawings in the engineering energy industry, the system comprising: a document drawing upload module, for uploading the files to be processed to the system, wherein the files include documents and / or drawings; a document drawing preprocessing module, for preprocessing the uploaded files to obtain the target files; a document drawing OCR module, for performing OCR recognition on the target files, extracting the text in the files, and obtaining text information; a number information extraction module, for matching the text information according to preset rules, and extracting, to obtain the number information that meets the preset rules; a number position positioning module, for locating the number information to the number position of the target file, to obtain the number position information; a number accuracy matching module, for matching the number information with the number in the existing number library for similarity, to obtain the number information with the highest similarity; an extraction result storage module, for storing the number information with the highest similarity, and the corresponding number position information. The above modules can quickly and accurately extract key numbers from a large amount of data through automated means, greatly improving the speed and efficiency of data processing. And reduce manual intervention, reduce errors and delays caused by human factors. Automated extraction reduces reliance on manual labor, thereby reducing labor costs. At the same time, it enhances data accuracy, reduces the risk of data errors and omissions, and ensures the timeliness and accuracy of data. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A flowchart of a system for automatically extracting position numbers from equipment documents and drawings in the engineering energy industry in one embodiment; Figure 2 This is a schematic diagram of the file list uploaded to the server; Figure 3 This is a schematic diagram before file processing; Figure 4 This is a schematic diagram of the file after processing; Figure 5 Schematic diagram of forming a double-layer PDF; Figure 6A schematic diagram of extracting the bit number information in the system according to the extraction rules; Figure 7 A schematic diagram for marking the identified bit number at the original file position; Figure 8 A schematic diagram for locating the position of the bit number; Fig. 9 It is a schematic diagram of bit number information comparison; Fig.10 Schematic diagram saved for the extraction results; Fig.11 The present invention is a flowchart of a method for automatically extracting position numbers from equipment documents and drawings in the engineering energy industry in one embodiment. DETAILED DESCRIPTION
[0017] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used herein includes any and all couplings of one or more related listed items.
[0019] It can be understood that the terms "first", "second", etc. used in the present application can be used in this article to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from another element.
[0020] Some terms involved in this application are explained below to facilitate understanding of this application: Median filtering is a nonlinear digital filtering technique, usually used to remove noise from images. The principle is to replace each pixel value in the image with the median value of its neighborhood pixel values. The "neighborhood" here can be a pixel area of size 3x3, 5x5, etc. While removing noise, the median filter can maintain edge information, so it protects the edge and texture details of the image better than linear filters (such as mean filters).
[0021] Gaussian blur is a linear image filtering technique that uses Gaussian functions as weights to smooth images. Gaussian blur can effectively reduce image noise and details, making the image look softer. Its principle is to replace each pixel value in the image with the weighted average of its neighboring pixel values. The weight is determined by the Gaussian distribution, and the closer to the center pixel, the greater the weight.
[0022] Opening is a basic concept in mathematical morphology. It is a combination operation consisting of two basic operations: erosion and dilation. The definition of opening is to first perform an erosion operation on the image and then perform a dilation operation on the eroded result. The applications of opening in image processing mainly include: Eliminating small objects: small noise points or small objects in the image can be removed, because these small objects will be completely eliminated during the erosion process. Separating objects: Separating adjacent objects at thin places, because erosion will disconnect narrow connected parts. Smoothing boundaries: Smoothing the edges of larger objects without significantly changing their area, because the dilation operation will fill the small holes and breaks left after erosion.
[0023] Adaptive threshold segmentation is an image segmentation technique that is used to separate the foreground and background in an image. Unlike the traditional global threshold segmentation method, the adaptive threshold segmentation method does not use a single fixed threshold to process the entire image, but calculates the threshold of each pixel or local area in the image, so as to better adapt to local changes in the image, such as noise.
[0024] Hough Transform is a feature extraction technology mainly used for shape detection in images, especially the detection of straight lines, circles or other curves. It is a mapping method from image space to parameter space, which recognizes specific shapes through a voting mechanism.
[0025] Affine transformation is a linear transformation in two-dimensional space that preserves the collinearity of points in an image and the angles between straight lines.
[0026] Canny edge detection is a commonly used edge detection algorithm that aims to identify areas with significant intensity changes in an image.
[0027] Tesseract is an open source optical character recognition (OCR) engine used to extract text from images into editable text information. Tesseract is widely used in various OCR tasks, including document digitization, image text extraction, and data entry.
[0028] Regular Expression is a powerful text processing tool used to search, replace, check or parse text that meets specific patterns (rules). Regular expressions consist of a series of characters, which can be common characters (such as letters a to z), special characters, or a combination of both.
[0029] The edit distance (Levenshtein distance) is a way to measure the difference between two strings. It is defined as the minimum number of single-character edit (insertion, deletion, or substitution) operations required to transform one string into another.
[0030] In the first aspect, the present application provides an automatic extraction system for equipment documents and drawings in the engineering energy industry, which is used to extract the correct information of the position number from historical documents and drawings through computer processing and related algorithms. After extraction, the document is associated with the specific equipment to ensure that all associated information can be obtained during the later equipment query and use process.
[0031] like Figure 1 As shown, a system for automatically extracting equipment documents and drawing position numbers in the engineering energy industry includes: The document and drawing upload module is used to upload the files to be processed to the system, wherein the files include documents and / or drawings.
[0032] Specifically, the document and drawing upload module aims to successfully upload files to the system for storage and ensure the preparation for subsequent processing. Users can select files to be uploaded from their local devices. The system supports a variety of common formats, including PDF, JPG, PNG, TIFF, etc. Before uploading a file, the system will perform a preliminary check on the file type and size. For example, whether the file format is a supported format and whether the file size is within the system's processing capacity. If the file does not meet the requirements, the system will prompt the user to reselect.
[0033] For example, the user selected "Equipment Maintenance Manual.pdf" and "Position Number Engineering Drawing.jpg" from the local folder. The system detected that both files conformed to the supported format and the size was within the system's allowed range, and passed the verification. The system uploaded the two files to the server through a secure channel and stored them in the system's file storage directory. The system prompted that "Equipment Maintenance Manual.pdf" and "Position Number Engineering Drawing.jpg" were uploaded successfully, and displayed the file details. The user can proceed to the next step after confirmation.
[0034] The document drawing preprocessing module is used to preprocess the uploaded files to obtain the target files.
[0035] Specifically, the method for preprocessing the uploaded file to obtain the target file may include the following: The document drawing preprocessing module is used to use a filtering algorithm to smooth the noise points in the file to obtain a first intermediate file.
[0036] Specifically, the image is processed using filtering algorithms such as median filtering or Gaussian blur to reduce scattered noise and small particle interference. The first intermediate file generated has a significantly reduced noise level and a smooth image, which is suitable for subsequent processing.
[0037] The document drawing preprocessing module is used to detect the smeared area of the first intermediate file by using an opening operation, and restore the smeared area by using adjacent pixel interpolation or fuzzy filling to obtain a second intermediate file.
[0038] Specifically, an opening operation is applied to the first intermediate file to detect the smeared area. The opening operation can eliminate small black areas and restore the smeared area through neighboring pixel interpolation or fuzzy filling method to ensure clear content. The generated second intermediate file contains the repaired smeared area with better visual effect.
[0039] The document drawing preprocessing module is used to process the residual stains in the background of the second intermediate file using an adaptive threshold segmentation method to obtain a third intermediate file.
[0040] Specifically, the adaptive threshold segmentation method is applied to the second intermediate file to separate and remove residual stains in the background. The adaptive threshold can be dynamically adjusted according to the local features of the image to ensure accurate separation of the background and foreground. The generated third intermediate file has background stains removed and the overall image is cleaner.
[0041] The document drawing preprocessing module is used to detect the straight line features of the third intermediate file by using Hough transform to obtain the deflection angle of the third intermediate file.
[0042] Specifically, the Hough transform algorithm is used to detect the straight line features in the third intermediate file, thereby calculating the deflection angle of the image. The Hough transform can effectively identify straight lines and performs well even in a noisy background. The deflection angle information of the image is obtained for use in subsequent correction steps.
[0043] The document drawing preprocessing module is used to adjust the third intermediate file according to the deflection angle of the third intermediate file to obtain a target file.
[0044] Specifically, the third intermediate file is rotationally corrected according to the detected deflection angle. Affine transformation or rotation transformation is used to ensure that the drawing content is horizontally aligned. The final target file is generated with all contents clear and aligned, suitable for further information extraction and analysis.
[0045] For example, if a user uploads a PDF file of an engineering drawing, it contains the following questions: There is some minor noise (such as dust from scanning).
[0046] Some parts of the drawing are blurred (e.g. manually marked parts).
[0047] The overall drawing is tilted by 3 degrees.
[0048] Processing process of engineering drawing PDF files: Noise Smoothing: The system applies a median filter to process the drawing, removes scattered dust noise, and generates a first intermediate file.
[0049] Smear area detection and repair: The system detects the smeared area and repairs the part by interpolating neighboring pixels to generate a second intermediate file.
[0050] Background stain treatment: Adaptive threshold segmentation method is used to remove residual stains in the background of the drawing and generate the third intermediate file.
[0051] Deflection angle detection: The Hough transform recognizes that the deflection angle of the drawing is 3 degrees and records this information.
[0052] Image Adjustment: The system performs rotation correction on the drawing according to a 3-degree deflection angle to obtain the final target file.
[0053] It should be noted that the document drawing preprocessing module can also use other conventional processing methods for preprocessing the file (for example, using edge detection (such as Canny edge detection) to supplement the repair of the smeared area, or using image enhancement technology to enhance the contrast of the drawing), so that the processed file can clearly display the content in the file.
[0054] The document drawing OCR module is used to perform OCR recognition on the target file, extract the text information in the file, and obtain the bit number information; Specifically, performing OCR recognition on the target file, extracting text information in the file, and obtaining the bit number information may include the following method: The document drawing OCR module is used to identify the text area position in the target file by using an edge detection algorithm; The document drawing OCR module is used to extract the text in the text area to obtain text information.
[0055] It should be noted that after obtaining the target file in the aforementioned steps, it is necessary to perform text recognition on the target file in order to obtain text information. First, the target file is converted into an image, and then the edge detection algorithm (such as Canny edge detection) is used to identify the position of the text area in the image and determine the position of the text area so that the OCR engine can focus on these areas for recognition, avoiding the recognition of the whole image and wasting resources. Next, according to the position of the text area, the image is divided into separate text lines or words for easy recognition one by one. Then, an OCR engine (such as Tesseract) is used to identify each text candidate area and convert the text in the image into text. Next, the recognition results are corrected and formatted, such as correcting recognition errors, merging line information, etc., and finally extracting text information. Among them, correcting recognition errors, merging line information, etc. can include the following steps: In OCR recognition, low-confidence words or phrases are marked as potential errors, and these marked contents are passed as input to the large model for correction suggestions. By presetting common OCR error patterns (such as similar character replacement: 0 and O, 1 and I, etc.), potential error areas are marked to further improve the efficiency of large model correction.
[0056] Based on the potentially incorrect words that need to be corrected, extract the paragraphs or sentences in which they are located to provide context to the big model, where the big model can combine semantic understanding to ensure that the recommended correction content is consistent with the context. Furthermore, for specialized terms in engineering documents (such as bit numbers, equipment names, etc.), custom dictionaries or domain vocabularies can be used to help the big model identify specialized terms and give priority to recommendations that are consistent with the industry terminology of engineering documents.
[0057] Using the large model, potentially incorrect spellings of words are corrected to obtain corrected text information.
[0058] The corrected text information is compared with the original text information, and the comparison results are used as adjustment parameters of the large model to adjust and train the large model.
[0059] For example, assuming that the OCR recognition result contains an error such as "BL10O1E" caused by similar characters, the correction process of the large model is as follows: Detection error: The OCR recognition module found that "BL10O1E" did not match the existing bit pattern and marked it as low confidence.
[0060] Input context: The system inputs the sentence containing "Position number: BL10O1E" together with the context into the large model, and prompts the model to be corrected according to the standard position number mode.
[0061] Large model output: The large model generates a correction suggestion to replace "BL10O1E" with "BL1001E".
[0062] User confirmation: The system displays the corrected results to the user for confirmation. If the user confirms that they are correct, the model records the correction pattern to provide a reference for automatic correction of similar errors.
[0063] The bit number information extraction module is used to match and extract the text information according to preset rules to obtain the bit number information that meets the preset rules.
[0064] Specifically, the method for matching the text information according to the preset rules and extracting the bit number information that meets the preset rules may include the following methods: The bit number information extraction module is used to construct the preset rule, wherein the preset rule represents a regular expression.
[0065] The bit number information extraction module is used to match the text information according to the preset rule to obtain the text information that meets the preset rule.
[0066] The bit number information extraction module is used to extract text information that meets the preset rules to obtain bit number information that meets the preset rules.
[0067] It should be noted that the preset rules for matching the bit number information are constructed by defining regular expressions. These rules ensure that the bit number information that meets the standards can be accurately identified and extracted. According to the preset rules, the text information obtained by OCR recognition is matched, and the regular expression is applied to search the text information to find all matching strings. After successfully matching to the bit number, the information will be extracted and stored as bit number information that meets the preset rules for subsequent use or analysis.
[0068] The bit number position positioning module is used to reversely locate the bit number position of the target file according to the target bit number information.
[0069] Specifically, according to the target bit number information, reverse positioning to the bit number position of the target file may include the following methods: The bit number position positioning module is used to map the bit number information back to the coordinate system of the target file to obtain the coordinates of the bit number information in the coordinate system.
[0070] The position number location positioning module is used to construct a marking layer with a coordinate system on the file.
[0071] The position number location positioning module is used to mark the corresponding coordinate position on the marking layer according to the coordinates of the position number information in the coordinate system to obtain the marking layer of the position number location information.
[0072] It should be noted that by setting the bit number position information at the bit number position of the target file, the exact position of the bit number information in the original file can be determined. First, in the aforementioned steps, the matched bit number information has been obtained, so that the extracted bit number information is associated with the exact position in the document or drawing of the target file. That is to say, the coordinates corresponding to the bit number information are obtained on the target file. Next, a marking layer is constructed, and the coordinates corresponding to the bit number information are also displayed on the marking layer. In this way, the marking layer will display the bit number information on the target file at the same position, thereby ensuring that the bit number information is correctly positioned on the document or drawing. Specifically, a rectangular box or other shaped annotation can be drawn on the annotation layer to highlight the position of the bit number, and text annotations of the bit number information can be added in or next to the annotation box to provide more contextual information.
[0073] It should also be noted that in the OCR recognition process, in addition to extracting text information, the bounding box (Bounding Box) of each character or string is also recorded, that is, the coordinate position of the character in the image. These coordinates usually include: the x coordinate (x) of the upper left corner, the y coordinate (y) of the upper left corner, the width (width), and the height (height). Next, the position of the file bit number information is mapped to the annotation layer with a coordinate system by translation or scaling, so as to obtain the corresponding coordinate position on the annotation layer, so as to present the bit number information and obtain the annotation layer of the bit number position information. The annotation layer can facilitate users to view, edit and confirm the coordinates of the bit number information.
[0074] Through the above method, the bit number information can be accurately mapped to the rotated file coordinate system, ensuring the accuracy and availability of the bit number information so that it can be effectively queried and used in the rotated file context.
[0075] It should also be noted that, since in the aforementioned steps, the target file is rotated and then recognized by OCR, in this step, there is no need to rotate the coordinates corresponding to the position number information on the target file, only translation and / or scaling are required.
[0076] The position number accuracy matching module is used to perform similarity matching between the target position number information and the position numbers in the existing position number library to obtain the position number information with the highest similarity.
[0077] Specifically, performing similarity matching between the target bit number information and the bit numbers in the existing bit number library to obtain the bit number information with the highest similarity may include the following steps: The position number accuracy matching module is used to calculate the distance between each position number information and the position numbers in the existing position number library by using the edit distance to obtain the distance result; The position number accuracy matching module is used to determine the position number information with the highest similarity based on the distance result.
[0078] It should be noted that, first, for each bit number in the bit number library, the edit distance algorithm is used to calculate the distance between it and the target bit number information. The results of each comparison are recorded, usually stored in a table or dictionary, with the target bit number as the key and the edit distance as the value. Next, based on the edit distance result, select the bit number with the smallest edit distance to the target bit number information, because a smaller edit distance means a higher similarity. A threshold can be set so that two bits are considered similar only when the edit distance is less than or equal to this threshold. Find the smallest value from the recorded edit distance results, and the bit number corresponding to this value is the bit number with the highest similarity.
[0079] For example, there are the following tag libraries and target tag information: Tags in the tag library: ["T12010", "T12012", "T12020", "T13011", "T12011"].
[0080] Target number information: "T12011".
[0081] Use Levenshtein distance to calculate the similarity between the target reference designator and each reference designator in the reference designator library: The edit distance between "T12010" and "T12011" is 1 (replace the last character "0" with "1").
[0082] The edit distance between "T12012" and "T12011" is also 1 (replace the last character "2" with "1").
[0083] The edit distance between "T12020" and "T12011" is 2 ("20" needs to be replaced with "1" and "1").
[0084] The edit distance between "T13011" and "T12011" is 2 (the first character "3" needs to be replaced with "1" and "2").
[0085] The edit distance between "T12011" and "T12011" is 0.
[0086] According to the above calculation results, the most similar bit number information can be obtained. If there is no "T12011" in the bit number library, then "T12010" and "T12012" both have the minimum edit distance of 1 with the target bit number "T12011". If we set the threshold to 1, these two bits are considered to be similar to the target bit number. If no threshold is set, the bit number with the smallest edit distance can be selected as the most similar bit number, or all candidate bits can be provided for further manual confirmation if the distance is the same.
[0087] Through the above method, the bit number accuracy matching module can effectively identify the bit number with the highest similarity to the target bit number information from the bit number library.
[0088] The extraction result storage module is used to store the bit number information with the highest similarity.
[0089] Specifically, storing the bit number information with the highest similarity may include the following steps: The extraction result storage module is used to obtain the bit number information with the highest similarity and the corresponding bit number position information; The extraction result storage module is used to form structured data by combining the bit number information with the highest similarity and the corresponding bit number position information to obtain a key-value pair; The extraction result storage module is used to store key-value pairs.
[0090] It should be noted that after completing the matching process of the bit number information, the system will obtain a set of matching results, including the bit number information with the highest similarity and its position in the target file. Next, the extraction result storage module will organize the extracted bit number information and location information into a structured data format, such as a key-value pair, for easy storage and retrieval. First, build a data structure, which can be a dictionary or a JSON object, containing necessary keys, such as bit number text, similarity score, location information, etc. Next, fill the collected information (the bit number information with the highest similarity, and the corresponding bit number location information) into the data structure to form a key-value pair. Finally, store the formed key-value pair in a persistent storage system, such as a database or file system, for long-term storage and subsequent access.
[0091] The key-value pair structured data storage makes the organization of the bit number information and location information clearer and more orderly, and the form is convenient for quickly locating and accessing specific data items. The relevant values can be quickly retrieved by key without traversing the entire data set. It helps to maintain data consistency and reduce data redundancy and inconsistency. The key-value pair ensures that each data item has a unique identifier to avoid data conflicts.
[0092] Example like Figure 2 As shown, 1. The selected files are uploaded to the server, and the system lists the uploaded files.
[0093] 2. The system automatically processes uploaded documents, such as Figure 3 As shown in the figure, it includes decontamination, de-skew, correction, black spot removal and other processing. The processed scanned file, such as Figure 4 shown.
[0094] like Figure 5 As shown, 3. Perform OCR recognition on documents and drawings to extract text information from the scanned images. Integrate the text information with the original PDF to form a double-layer PDF.
[0095] like Figure 6 As shown, 4. The bit number information in the system is extracted according to the extraction rules. The system can configure the extraction rules in the background. The extraction rules include configuration information such as regular expressions. Figure 6 In the figure, select the extracted bit number information.
[0096] like Figure 7 As shown, 5. The system can match the position numbers in the document and the drawing according to different extraction rules, and mark the identified position numbers at the original position.
[0097] like Figure 8 As shown, 6. The system performs positioning information of the specifically identified bit number in the PDF according to the identified bit number, so that the user can know where the bit number is extracted from. Figure 8 In the PDF, the bit number information corresponds to the location information of the bit number specifically identified in the PDF. like Fig. 9 As shown, 7. Use the extracted bit number information to perform similarity matching with the bit number information in the system bit number library, and put the bit number with the highest similarity at the top for the user to confirm. Fig. 9 In the dialog box, the selected area is the matching information in the tag library.
[0098] like Fig.10 As shown, 8. After the above steps are completed, the bit number will be retained to establish a relationship with the document or drawing. In the later use of the digital factory, you can click on a device to retrieve the content of its related documents or drawings through the bit number. Fig.10 In the dialog box, select the area to associate with the device.
[0099] In summary, the present application provides a method for automatically extracting position numbers from equipment documents and drawings in the engineering energy industry, which has the following beneficial effects: 1. Improve work efficiency Automated processing: Intelligent bit number extraction can quickly and accurately extract key bit numbers from large amounts of data through automated means, greatly improving the speed and efficiency of data processing.
[0100] Reduced manual intervention: Traditional manual extraction is not only time-consuming and labor-intensive, but also prone to errors. Intelligent tag extraction reduces manual intervention, reducing errors and delays caused by human factors.
[0101] 2. Reduce costs Human cost: Automated extraction reduces reliance on manual labor, thereby reducing human cost. Enterprises can devote more human resources to more valuable tasks.
[0102] Time cost: Fast data processing capabilities mean that companies can obtain the information they need more quickly, thereby shortening decision cycles and response times.
[0103] 3. Enhance data accuracy High-precision identification: Intelligent tag extraction technology is usually based on advanced algorithms and models, which can accurately identify and extract the target tag, reducing the risk of data errors and omissions.
[0104] Real-time update: For data that needs to be processed in real time, intelligent tag extraction technology can extract and update data in real time to ensure the timeliness and accuracy of the data.
[0105] like Fig.11 As shown, in the second aspect, the present application provides a method for automatically extracting device documents and drawing position numbers in the engineering energy industry, which is applied to the aforementioned automatic extraction system for device documents and drawing position numbers in the engineering energy industry, and the method includes: Uploading files to be processed to the system, wherein the files include documents and / or drawings; Preprocessing the uploaded file to obtain a target file; Performing OCR recognition on the target file, extracting text from the file, and obtaining text information; According to the preset rules, the text information is matched and extracted to obtain the bit number information that meets the preset rules; Positioning the bit number information at the bit number position of the target file to obtain bit number position information; Performing similarity matching between the bit number information and the bit numbers in the existing bit number library to obtain the bit number information with the highest similarity; The bit number information with the highest similarity and the corresponding bit number position information are stored.
[0106] In a third aspect, the present application provides a computer device including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the aforementioned method for automatically extracting position numbers from equipment documents and drawings in the engineering energy industry are implemented.
[0107] In a fourth aspect, the present application provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the aforementioned method for automatically extracting position numbers from equipment documents and drawings in the engineering energy industry.
[0108] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0109] The various embodiments in the present disclosure are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0110] The protection scope of the present disclosure is not limited to the above-mentioned embodiments. Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the scope and spirit of the present disclosure. If these changes and modifications fall within the scope of the claims of the present disclosure and their equivalents, the intention of the present disclosure also includes these changes and modifications.
Claims
1. An automatic extraction system for equipment documents and drawings in the engineering energy industry, characterized in that the system include: A document and drawing upload module, used to upload files to be processed to the system, wherein the files include documents and / or drawings; A document drawing preprocessing module is used to preprocess the uploaded file to obtain a target file; The document drawing OCR module is used to perform OCR recognition on the target file, extract the text in the file, and obtain text information; A position number information extraction module is used to match the text information according to preset rules and extract the position number information that meets the preset rules; A bit number position locating module, used to locate the bit number information to the bit number position of the target file to obtain the bit number position information; A position number accuracy matching module is used to perform similarity matching between the position number information and the position numbers in the existing position number library to obtain the position number information with the highest similarity; The extraction result storage module is used to store the bit number information with the highest similarity and the corresponding bit number position information.
2. The automatic extraction system of equipment documents and drawing position numbers in the engineering energy industry according to claim 1 is characterized in that: The document drawing preprocessing module is used to preprocess the uploaded file to obtain the target file, including: The document drawing preprocessing module is used to use a filtering algorithm to smooth the noise points in the document to obtain a first intermediate file; The document drawing preprocessing module is used to detect the smeared area of the first intermediate file by using an opening operation, and restore the smeared area by using adjacent pixel interpolation or fuzzy filling to obtain a second intermediate file; The document drawing preprocessing module is used to process the residual stains in the background of the second intermediate file by using an adaptive threshold segmentation method to obtain a third intermediate file; The document drawing preprocessing module is used to detect the straight line features of the third intermediate file by using Hough transform to obtain the deflection angle of the third intermediate file; The document drawing preprocessing module is used to adjust the third intermediate file according to the deflection angle of the third intermediate file to obtain a target file.
3. The automatic extraction system of equipment documents and drawing position numbers in the engineering energy industry according to claim 1 is characterized in that: The document drawing OCR module is used to perform OCR recognition on the target file, extract the text in the file, and obtain text information, including: The document drawing OCR module is used to identify the text area position in the target file by using an edge detection algorithm; The document drawing OCR module is used to extract the text in the text area to obtain text information.
4. The automatic extraction system of equipment documents and drawing position numbers in the engineering energy industry according to claim 1 is characterized in that: The bit number information extraction module is used to match the text information according to preset rules and extract the bit number information that meets the preset rules, including: The bit number information extraction module is used to construct the preset rule, wherein the preset rule represents a regular expression; The bit number information extraction module is used to match the text information according to the preset rule to obtain the text information that meets the preset rule; The bit number information extraction module is used to extract text information that meets the preset rules to obtain bit number information that meets the preset rules.
5. The automatic extraction system of equipment documents and drawing position numbers in the engineering energy industry according to claim 1 is characterized in that: The bit number position locating module is used to locate the bit number information to the bit number position of the target file to obtain the bit number position information, including: The bit number position positioning module is used to map the bit number information back to the coordinate system of the target file to obtain the coordinates of the bit number information in the coordinate system; The position number location positioning module is used to construct a marking layer with a coordinate system on the target file; The position number location positioning module is used to mark the corresponding coordinate position on the marking layer according to the coordinates of the position number information in the coordinate system to obtain the marking layer of the position number location information.
6. The automatic extraction system of equipment documents and drawing position numbers in the engineering energy industry according to claim 1 is characterized in that: The position number accuracy matching module is used to perform similarity matching between the position number information and the position numbers in the existing position number library to obtain the position number information with the highest similarity, including: The position number accuracy matching module is used to calculate the distance between each position number information and the position numbers in the existing position number library by using the edit distance to obtain the distance result; The position number accuracy matching module is used to determine the position number information with the highest similarity based on the distance result.
7. The automatic extraction system of equipment documents and drawing position numbers in the engineering energy industry according to claim 1 is characterized in that: The extraction result storage module is used to store the bit number information with the highest similarity and the corresponding bit number position information, including: The extraction result storage module is used to obtain the bit number information with the highest similarity and the corresponding bit number position information; The extraction result storage module is used to form structured data by combining the bit number information with the highest similarity and the corresponding bit number position information to obtain a key-value pair; The extraction result storage module is used to store key-value pairs.
8. A method for automatically extracting position numbers from equipment documents and drawings in the engineering energy industry, characterized in that: The system for automatically extracting equipment documents and drawing position numbers in the engineering energy industry according to any one of claims 1 to 7 comprises: Uploading files to be processed to the system, wherein the files include documents and / or drawings; Preprocessing the uploaded file to obtain a target file; Performing OCR recognition on the target file, extracting text from the file, and obtaining text information; According to the preset rules, the text information is matched and extracted to obtain the bit number information that meets the preset rules; Positioning the bit number information at the bit number position of the target file to obtain bit number position information; Performing similarity matching between the bit number information and the bit numbers in the existing bit number library to obtain the bit number information with the highest similarity; The bit number information with the highest similarity and the corresponding bit number position information are stored.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for automatically extracting position numbers from equipment documents and drawings in the engineering energy industry as described in claim 8 are implemented.
10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for automatically extracting position numbers from equipment documents and drawings in the engineering energy industry as described in claim 8 are implemented.
Citation Information
Patent Citations
Method for recognizing wall in house type image and method for automatically correcting length ratio of house type image
CN103971098A
Method for automatically identifying case not registered within specified time limit
CN111899132A
Text recognition method and system based on paper document and computer medium
CN112418204A
PID drawing identification and reconstruction system based on end-to-end deep learning
CN117373051A
Method and system for automatic processing and management of technical digital documents and drawings
US20140214758A1
Cited By
Engineering drawing analysis and identification method and system based on AI
CN120472491A