Construction file information identification method, device and system
By using industrial computers for intelligent information identification of construction documents in nuclear power projects, the problem of frequent data input errors in construction drawings has been solved, construction efficiency and accuracy have been improved, and labor costs have been reduced.
Patent Information
- Application Number
- CN202411046989.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-08-01
AI Technical Summary
In nuclear power projects, construction drawing data input errors are frequent, resulting in low construction efficiency, high manual entry costs, and difficulty in detecting data errors, which affects construction quality.
Provide an information recognition method for construction documents, using industrial computers to automatically split drawings, preview sub-drawings, identify area marks and text recognition, and realize intelligent information recognition through AI algorithms and preset information recognition models to improve the accuracy of information recognition. and efficiency.
It greatly reduces the error rate of manual entry, improves construction efficiency, reduces labor costs, realizes automated data collection, and is suitable for the identification and processing of massive engineering drawings.
Smart Images

Figure CN118736615A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of nuclear island stations, and in particular to a method, device and system for identifying information of construction documents. Background Art
[0002] Construction drawing information is the data foundation of each construction management information system of nuclear power project departments and is of vital importance. During the entire nuclear power installation and construction process, due to the large number of drawings and the large amount of information, data input often becomes a restrictive factor affecting the progress of the project. In recent years, quality incidents and problems caused by data input errors by input personnel have emerged one after another.
[0003] At present, the drawing input of nuclear island installation engineering is mainly to transfer the design of the drawings to the construction unit through PDF drawing files after the design institute completes the drawing design. The construction unit relies on manual input to collect the table information on the drawings to facilitate the identification of the table information for on-site construction, and formulate corresponding construction plans based on the table information for on-site construction. However, once this method has an explosive growth in the number of documents, the labor cost will also increase greatly. Long-term manual input will lead to a high rate of manual errors and it will be difficult to find errors in the data. Data errors will directly affect the construction site, resulting in low construction efficiency. At the same time, repetitive work will reduce employee enthusiasm and inefficient production capacity. The form of manual input is far from meeting the on-site construction requirements. Summary of the invention
[0004] The purpose of this application is to provide a method, device and system for information recognition of construction documents, which can automatically split the loaded drawings, preview the sub-drawings, identify area markings, recognize text and save the recognition results, so as to realize intelligent information recognition of construction documents, improve the accuracy and efficiency of information recognition, and thus improve construction efficiency.
[0005] In a first aspect, the present application provides an information recognition method for a construction document, and the method is applied to an industrial computer; the method comprises: loading a target drawing in a construction document; the drawing comprises at least one of the following: a construction drawing, a table, and text; splitting the loaded target drawing into multiple sub-drawings by page; displaying a preview of the target sub-drawing according to the page number and zoom ratio selected by the user; automatically searching and marking a target recognition area in the target sub-drawing through an AI algorithm, and / or, in response to a user's editing operation on the recognition area of the target sub-drawing, marking the target recognition area; performing text recognition on the marked target recognition area in the target sub-drawing through a preset information recognition model to obtain text recognition information corresponding to the target recognition area; and saving the text recognition information corresponding to the target recognition area.
[0006] Furthermore, the step of loading the target drawings in the construction file includes: in response to the user's selection operation on the target construction file, loading all drawings in the target construction file as target drawings; or, in response to the user's selection operation on the target drawings in the target construction file, loading the selected target drawings.
[0007] Furthermore, the above-mentioned information recognition model includes a text detection model and a text recognition model; the step of identifying the target recognition area marked in the target sub-drawing through the preset information recognition model includes: detecting the text position of the target recognition area through the text detection model in the information recognition model, and recognizing the text at the detected text position through the text recognition model in the information recognition model to obtain the text recognition information corresponding to the target recognition area.
[0008] Furthermore, the above step of saving the text recognition information corresponding to the target recognition area includes: saving the text recognition information corresponding to the target recognition area into an Excel file with the same name as the target drawing and with a page number suffix added.
[0009] Furthermore, the training process of the above-mentioned information recognition model is as follows: obtain a training sample set; the samples in the training sample set include: drawings marked with text position data, text image frames and text content corresponding to the text image frames; based on the text position data of the samples in the training sample set, train a preset text detection model to obtain a text detection model; based on the text image frames of the samples in the training sample set and the text content corresponding to the text image frames, train a preset text recognition model to obtain a text recognition model; use the text detection model and the text recognition model as an information recognition model; when new sample data is obtained, train the information recognition model through an incremental training mode to obtain an updated information recognition model.
[0010] Furthermore, the above-mentioned information recognition model includes: an encoder, a decoder and an objective function; the encoder includes: a two-dimensional convolutional neural network, a two-dimensional batch normalization layer and a ReLU class function; the decoder includes: a recursive neural network with a gating mechanism and a fully connected neural network; the objective function includes a CTC connection time series classification function.
[0011] Furthermore, the hyperparameter design during the training of the above model includes: increasing the convolution kernel layer by layer in multiples of 2 during convolution encoding; setting the text height to 32 pixels; selecting the font based on GB / T 14691-93; and conducting comparative ablation experiments on the following parameters: 4-8 convolution layers, 16-256 convolution kernels, the number of convolution groups with half the number of kernels or kernels, point-wise and depth-wise, and 1-2 recursive layers.
[0012] In the second aspect, the present application also provides an information identification device for construction documents, which is applied to an industrial computer; the device includes: a drawing loading module, a drawing preview module, an identification area management module, and an identification and saving module; wherein the drawing loading module is used to load the target drawing in the construction document; the drawing includes at least one of the following: a construction drawing, a table, and text; a drawing preview module is used to split the loaded target drawing into multiple sub-drawings by page; the previewed target sub-drawing is displayed according to the number of pages and the zoom ratio selected by the user; the identification area management module is used to automatically find and mark the target identification area in the target sub-drawing through an AI algorithm, and / or, in response to the user's editing operation on the identification area of the target sub-drawing, mark the target identification area; the identification and saving module is used to perform text recognition on the marked target identification area in the target sub-drawing through a preset information recognition model to obtain the text recognition information corresponding to the target identification area; and save the text recognition information corresponding to the target identification area.
[0013] In a third aspect, the present application also provides an information identification system for construction documents, the system comprising: an industrial computer and a training server; the training server is used to train an information identification model and transmit the information identification model to the industrial computer; the industrial computer is used to identify construction information of the construction documents to be identified based on the information identification model using the method described in the first aspect.
[0014] In a fourth aspect, the present application further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method described in the first aspect above.
[0015] The information identification method, device and system of the construction documents provided by the present application are applied to an industrial computer; the method includes: loading a target drawing in the construction document; the drawing includes at least one of the following: a construction drawing, a table, and text; splitting the loaded target drawing into multiple sub-drawings by page; displaying the previewed target sub-drawings according to the page number and zoom ratio selected by the user; automatically finding and marking the target identification area in the target sub-drawing by an AI algorithm, and / or, in response to the user's editing operation of the identification area of the target sub-drawing, marking the target identification area; performing text recognition on the marked target identification area in the target sub-drawing by a preset information recognition model, and obtaining the text recognition information corresponding to the target identification area; and saving the text recognition information corresponding to the target identification area. The present application can automatically split the loaded drawings, preview the sub-drawings, mark the identification areas, recognize text, and save the recognition results, so as to realize the intelligent information recognition of the construction documents, improve the accuracy and efficiency of information recognition, and thus improve the construction efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 A flowchart of a method for identifying information of a construction document provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of a training process of a text detection model provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of a training process of a text recognition model provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of an activation function provided in an embodiment of the present application;
[0021] Figure 5 A structural block diagram of an information identification device for construction documents provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of the structure of a drawing loading module provided in an embodiment of the present application;
[0023] Figure 7 A schematic diagram of the structure of a drawing preview module provided in an embodiment of the present application;
[0024] Figure 8 A schematic diagram of the structure of an identification area management module provided in an embodiment of the present application;
[0025] Fig. 9 A schematic diagram of the structure of an identification and storage module provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The technical solution of the present application will be described clearly and completely below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0027] In view of the shortcomings of existing construction methods, in order to reduce human errors and improve the efficiency of construction drawing information collection, the embodiments of the present application provide a method, device and system for information recognition of construction documents, which overcome the defects of the existing manual input form. On the application industrial computer, the drawings in the construction documents are input, and the loaded drawings are automatically split, sub-drawings are previewed, area markings are recognized, text recognition is performed and recognition results are saved, so as to realize intelligent information recognition of construction documents, improve the accuracy and efficiency of information recognition, and thus improve construction efficiency.
[0028] To facilitate understanding of this embodiment, a method for identifying information of a construction document disclosed in an embodiment of the present application is first introduced in detail.
[0029] Figure 1 A flowchart of a method for identifying information of a construction document provided in an embodiment of the present application, the method is applied to an industrial computer; the method specifically comprises the following steps:
[0030] Step S102, loading the target drawing in the construction document; the drawing includes at least one of the following: construction drawing, table, text;
[0031] The target drawings in the construction files loaded above can identify construction drawings in vector and scanned PDF and TIF formats. The drawings may include construction drawings, tables, texts and other contents. The construction drawings may also contain texts, and the tables may also contain texts.
[0032] The above-mentioned industrial computer is equipped with a visual interface, which allows users to import and select different PDF files, and use function buttons to manually select text areas, detect and recognize table text, and export results.
[0033] Step S104, splitting the loaded target drawing into multiple sub-drawings by page;
[0034] There may be multiple construction drawings in a construction document, and a construction drawing may include multiple sub-drawings. Therefore, after loading the target drawing in the construction document, it can be automatically split into multiple sub-drawings by page.
[0035] Step S106, displaying the previewed target sub-drawing sheet according to the page number and zoom ratio selected by the user;
[0036] For example, if the user selects page 3 and the zoom ratio is 1.2, the target sub-drawing of page 3 zoomed in 1.2 times will be displayed in the preview area for the user to view.
[0037] Step S108, automatically searching and marking the target recognition area in the target sub-drawing sheet through an AI algorithm, and / or, responding to the user's editing operation on the recognition area of the target sub-drawing sheet, marking the target recognition area;
[0038] If the user does not select or edit the area, the target recognition area in the target sub-drawing will be automatically found and marked, such as the table area filled with text, or the construction drawing area marked with text, etc. Alternatively, the user can directly select in the previewed target sub-drawing to determine the target recognition area, or, after the system automatically finds and marks the target recognition area, it responds to the user's adjustment and editing operation on the target recognition area and uses the adjusted and edited boxed area as the target recognition area.
[0039] Step S110, performing text recognition on the target recognition area marked in the target sub-drawing through a preset information recognition model to obtain text recognition information corresponding to the target recognition area;
[0040] The above-mentioned information recognition model can be trained on an industrial computer, or it can be trained on a training server and then imported into the industrial computer. In this embodiment, the sample set used for training the model is an expandable adversarial sample library, which can upgrade the recognition ability of the model. The information recognition model is a recognition model based on printed text lines, which can recognize the text content in the target area.
[0041] Step S112, saving the text recognition information corresponding to the target recognition area.
[0042] The information identification method for construction documents provided in the embodiment of the present application can cope with the differences in drawings in different fields, different industries, and different layouts, and customize the identification area to perform effective content identification and extraction. Automatically collect drawing data, store it in the middleware database, and retain the connection with the construction management system. Improve the efficiency and accuracy of information identification and extraction in construction documents, thereby improving construction efficiency.
[0043] The embodiment of the present application also provides another method for information recognition of construction documents, which is implemented on the basis of the above embodiment; this embodiment focuses on describing the model training process and possible implementation methods of the above steps.
[0044] The training process of the above information recognition model is as follows:
[0045] Acquire a training sample set; the samples in the training sample set include: drawings annotated with text position data, text image frames and text content corresponding to the text image frames; based on the text position data of the samples in the training sample set, train a preset text detection model to obtain a text detection model; based on the text image frames of the samples in the training sample set and the text content corresponding to the text image frames, train a preset text recognition model to obtain a text recognition model; use the text detection model and the text recognition model as an information recognition model; when newly added sample data is acquired, train the information recognition model through an incremental training mode to obtain an updated information recognition model.
[0046] In the specific implementation, in order to effectively improve the accuracy of drawing recognition, the information on the drawings is sorted out, and the images of the fields to be recognized are extracted to establish a sample library, which is the above-mentioned training sample set. First, the text content to be recognized in the drawing PDF is selected through the annotation tool to form a sample library. In the drawing recognition process, the recognition accuracy is effectively improved by identifying the information on the drawings and comparing the sample information in the sample library.
[0047] First, based on the text position data marked in the drawing, the text detection model is trained. If it is new data, the model is trained through the incremental training mode. The specific process is as follows: Figure 2 Then, based on the text images cut out from the drawings and the corresponding annotated text content data, the text recognition model is trained. If it is new data, the incremental training mode is used, such as Figure 3 As shown. Finally, the generated model is deployed online.
[0048] The above-mentioned information recognition model includes: an encoder, a decoder and an objective function; the encoder includes: a two-dimensional convolutional neural network, a two-dimensional batch normalization layer and a ReLU class function; the decoder includes: a recursive neural network with a gating mechanism and a fully connected neural network; the encoder is used to perform high-dimensional abstraction and encoding of the input original feature map, and extract local and global feature information that can effectively distinguish characters; the decoder is used to effectively decode the input high-dimensional features according to the decoding direction, and extract local and global feature information that can effectively distinguish the relationship between characters; the objective function is used to set a convergence target for the training process, and quantify the degree of convergence of each stage iteration, and provide the gradient error of back propagation in the form of derivatives.
[0049] The hyperparameter design during the training of the above model includes: increasing the convolution kernel layer by layer in multiples of 2 during convolution encoding; setting the text height to 32 pixels; selecting the font based on GB / T 14691-93; and conducting comparative ablation experiments on the following parameters: 4-8 convolution layers, 16-256 convolution kernels, the number of convolution groups with half the number of kernels or cores, point-wise and depth-wise, and 1-2 recursive layers.
[0050] Point-wise: usually refers to the convolution operation that operates independently on each pixel in the convolutional neural network, such as 1x1 convolution. Point-wise convolution can be regarded as an independent adjustment of the features of each channel, which does not change the dimension of the feature map, but can enhance the expressiveness of the features.
[0051] Depth-wise: refers to performing convolution operations on each channel of the input feature map. The convolution kernel of each channel is independent, so that the model can learn the characteristics of each channel without increasing the number of parameters. This operation is usually used to reduce the amount of calculation and the number of parameters of the model and improve the efficiency of the model.
[0052] The feature extraction process is optimized by combining these two convolution methods. First, depth-wise convolution is used to extract features independently on each channel, and then point-wise convolution is used to merge these features, or depth-wise convolution is performed first and then point-wise convolution is performed in some layers to enhance the model's ability to capture features.
[0053] The following is a detailed description of the training process:
[0054] To meet the needs of rapid training and deployment, Pytorch is used as the training framework, Python is used as the programming language, and the hardware is based on a GPU (NVIDIA GeForce RTX 2080Ti) server.
[0055] For sequence-to-sequence (Seq2Seq) recognition tasks, the overall model structure is divided into three parts: encoder, decoder, and objective function. The encoder is used to perform high-dimensional abstraction and encoding of the input original feature map, and extract local and global feature information that can effectively distinguish characters. The decoder is used to effectively decode the input high-dimensional features according to the decoding direction, and extract local and global feature information that can effectively distinguish the relationship between characters. The objective function is used to set the convergence target for the training and quantify the convergence degree of each stage iteration, providing the gradient error of back propagation in the form of derivatives.
[0056] Since the text line input is a 256-level grayscale image, that is, a single-channel byte image, in order to effectively capture the shape features of the text and avoid inefficient manual feature design, a 2D convolutional neural network is used for effective feature encoding in the encoding stage. At the same time, in order to accelerate the convergence of the model and further approach the independent and identically distributed assumption, the input of each layer maintains approximately the same distribution and zero mean, and a batch normalization operation is added. Furthermore, in order to accelerate the convergence of the model and solve the problems of gradient disappearance and explosion, the excitation function uses a ReLU-type function.
[0057] Since the reading order of text lines is horizontal, that is, the width is the decoding order direction, in order to effectively capture the features encoded by the convolutional neural network and adapt to different font widths, font spacing and font deformation, a recursive neural network is used for effective feature decoding in the decoding stage. At the same time, in order to solve the gradient disappearance and explosion problems, a recursive neural network with a gating mechanism is used. Finally, in order to give the activation values of different character classifications, a fully connected neural network is used to correspond to the activation outputs of different characters.
[0058] Since it is difficult to calibrate the position of data word by word during training and it is also difficult to perform accurate character segmentation when using it, CTC (Connectionist Temporal Classification) is used in the objective function selection to solve the problem that it is difficult to correspond one-to-one between input sequences and output sequences, so as to improve recognition accuracy.
[0059] The following is a detailed description of convolutional neural networks, normalization, activation operations, recurrent neural networks, fully connected neural networks, and objective functions:
[0060] (1) Convolutional Neural Network:
[0061] The input of the above 2D convolutional neural network is a tensor of N×C×H×W structure, where N is the number of data in a set during training, C is the number of channels, H is the height, and W is the width. The output tensor maintains the same structure, N remains unchanged, and C, H, and W may change according to the convolution parameter settings. The 2D convolution formula is as follows:
[0062]
[0063] Among them, ★ is a cross-correlation operation. out represents the output feature map; bias represents the bias term, which is used to adjust the output of the convolution layer; weight represents the weight of the convolution kernel, which determines the filtering characteristics of the convolution operation; input represents the input feature map, that is, the original image or the output of the previous layer; k represents the convolution kernel size, which determines the receptive field size of the convolution operation.
[0064] The parameters involved in the 2D convolution process are: kernel size, which determines the local receptive field of the convolution operation; stride, which indicates the step size of the convolution kernel; padding, which is used to add extra pixels to the edge of the input feature map to control the size of the output feature map; dilation, which indicates the spacing between elements in the convolution kernel, which can increase the receptive field without increasing parameters; and group, which groups the input channels for convolution to reduce the number of parameters and the amount of computation.
[0065] (2) Normalization operation:
[0066] The input of the above normalization operation is a tensor of N×C×H×W structure, where N is the number of data in a set during training, C is the number of channels, H is the height, and W is the width. The output tensor maintains the same structure, and N, C, H, and W also remain unchanged. The formula for the 2D batch normalization operation is as follows:
[0067]
[0068] Among them, γ and β are learnable parameters, E is the expectation, that is, the mean, and Var is the variance. γ represents the scaling factor, a learnable parameter, used to scale the standardized output; β represents the offset, a learnable parameter, used to offset the standardized output; E represents the expectation, that is, the mean, used to calculate the statistic of the mean; ∈ represents a very small constant for numerical stability; Var represents the variance, used to calculate the statistic of the variance.
[0069] The 2D batch normalization operation is performed channel by channel.
[0070] (3) Activation operation:
[0071] The input of the activation function is a tensor of N×C×H×W structure, where N is the number of data in a set during training, C is the number of channels, H is the height, and W is the width. The output tensor maintains the same structure, and N, C, H, and W also remain unchanged.
[0072] The activation function is LeakyReLU, whose formula and image are as follows Figure 4 As shown:
[0073] Where negative_slope is the slope coefficient of the negative area.
[0074] The LeakyReLU operation is performed point by point.
[0075] (4) Recurrent Neural Network
[0076] The input of the recursive neural network is a tensor of the structure T×N×O, where T is the length of the time axis, N is the number of a set of data during training, and O is the number of neurons. The output tensor maintains the same structure, T and N remain unchanged, and O may change according to the hidden unit parameter settings.
[0077] The recurrent neural network selects GRU with a gating mechanism, and its formula is as follows:
[0078] r t =σ(W ir x t +b ir +W hr h (t-1) +bhr )
[0079] z t =σ(W iz x t +b iz +W hz h (t-1) +b hz )
[0080] n t =tanh(W in x t +b in +r t *(W hn h (t-1) +b hn ))
[0081] h t =(1-z t )*n t +z t *h (t-1) ;
[0082] Among them, * is the Hadamard product operation, which refers to the element-wise product operation. The parameters involved in the GRU process are: the number of hidden units (hidden size), which determines the complexity and capacity of the GRU model.
[0083] ir: reset gate input, used to control the impact of the hidden state of the previous time step on the current time step;
[0084] hr: The output of the reset gate, usually denoted as rt, is a value between 0 and 1 that is used to adjust the hidden state h of the previous time step (t-1) Impact on the current time step;
[0085] xt: input of the current time step;
[0086] zt: update gate, used to control the update degree of new information;
[0087] rt: reset gate, used to decide whether to ignore or retain the information of the previous time step;
[0088] ht: candidate hidden state;
[0089] nt: hidden state of the current time step;
[0090] hn: updated hidden state;
[0091] in: input of the current time step;
[0092] iz: input to update gate and reset gate;
[0093] σ: activation function.
[0094] (5) Fully connected neural network
[0095] The input of the fully connected neural network is a tensor of N×O structure, where N is the number of data in a set during training, and O is the number of neurons. The output tensor maintains the same structure, N remains unchanged, and O may change according to the hidden unit parameter settings. The fully connected formula is as follows:
[0096] y=xA T +b;
[0097] Among them, A represents the weight matrix, which is used to connect the output of the previous layer and the input of the current layer; b represents the bias vector, which is used to adjust the output of the fully connected layer; T represents the transpose operation, which is used to transpose the weight matrix.
[0098] The parameters involved in the full connection process are: the number of hidden units (hidden size).
[0099] (6) Objective function
[0100] The objective function is CTC. Assuming that the outputs at different time steps are independent, the probability formula for any output sequence π is as follows:
[0101]
[0102] Where π represents the output sequence; p(π|x) represents the probability of outputting the sequence π given the labeled text sequence x. T is the sequence length, and πt represents all elements in π before time step t.
[0103] The goal is to maximize the probability of annotated text sequences, that is, to optimize the model parameters during the training process so that the probability of the sequence output by the model and the annotated text sequence is maximized.
[0104] During the training process, the goal is to maximize the probability of annotating text sequences.
[0105] In the embodiment of the present application, the hyperparameter design includes the following contents:
[0106] 1) Convolution kernel incremental strategy
[0107] In order to effectively retain discriminative high-dimensional features when encoding from low dimensions to high dimensions, the convolution kernel is increased layer by layer in multiples of 2 during convolution encoding. By increasing the convolution kernel layer by layer in multiples of 2, discriminative high-dimensional features can be effectively retained when encoding from low dimensions to high dimensions. This design helps the model capture features of different granularities at different levels, thereby improving the model's recognition ability.
[0108] 2) Character height
[0109] Due to the particularity of printed optical characters, the text height is set to 32 pixels to meet the needs of text distinction. Setting the text height to 32 pixels can meet the needs of text distinction, while avoiding unnecessary calculations and improving the efficiency of the model.
[0110] 3) Data simulation
[0111] Font selection is based on GB / T 14691-93. This ensures the quality and diversity of training data and helps improve the generalization ability of the model.
[0112] 4) Ablation experiment
[0113] In order to select the model with the strongest classification ability, it is necessary to conduct comparative ablation experiments on the following parameters:
[0114] Number of convolutional layers (4-8)
[0115] Number of convolution kernels (16-256)
[0116] Number of convolution groups (number of cores or half of the number of cores)
[0117] Point-wise and depth-wise (pw+dw and pw+dw+pw)
[0118] Number of recursive levels (1-2)
[0119] By comparing ablation experiments, we can select the model parameter combination with the strongest classification ability and optimize the model performance. The purpose of these hyperparameter designs is to optimize the model training process, improve the recognition accuracy and efficiency of the model, and ensure that the model can achieve better results in practical applications.
[0120] After the model training is completed, the model parameters are exported, and the model is JIT (Just In Time) tracked and packaged, and then loaded and predicted in Libtorch.
[0121] According to the whole method workflow, the method corresponding device can be divided into four functionally independent modules, see Figure 5 As shown, they are respectively a drawing loading module 52, a drawing preview module 54, a recognition area management module 56, and a recognition saving module 58.
[0122] The drawing loading module 52 is responsible for loading drawings. The user can load all drawings in a folder at one time, or only load a few selected drawings in a folder. When it is found that wrong drawing information has been loaded, the user can clear the loaded drawings.
[0123] The drawing preview module 54 is responsible for dividing the loaded drawings into pages and displaying the drawing information according to the page number and zoom ratio selected by the user.
[0124] The recognition area management module 56 is responsible for marking the recognition area in the selected drawing. The recognition area can be automatically found and marked by an AI algorithm, or the marked recognition area can be manually edited.
[0125] The recognition and saving module 58 recognizes the recognition modules marked in the drawing and saves the recognition results.
[0126] The specific process of another method for identifying information of construction documents provided by an embodiment of the present application is described in detail below based on the above four modules:
[0127] (1) The drawing loading module loads the target drawings in the construction documents.
[0128] Drawing loading belongs to the preparation stage of the software. The user determines which drawings need information collection and loads the drawings into the software. The drawing loading module has three sub-functions, namely loading drawings, adding drawings, and clearing drawings. Figure 6 As shown:
[0129] Loading drawings means that users can load all PDF drawings in a folder. The software will clear the loaded drawings before loading drawings. After the user triggers the loading drawings operation, the software will pop up a folder selection dialog box. After the user selects the folder to be loaded, the software will load all PDF files in the folder.
[0130] Adding drawings means that the user can select to load some PDF drawings in a folder into the software. This operation will not clear the loaded drawings. After the user triggers the add drawing operation, the software will pop up a file selection dialog box. After the user selects the file to be loaded, the software will load the selected file.
[0131] Clearing drawings means that users can clear loaded drawings.
[0132] That is, the industrial computer can respond to the user's operation of selecting a target construction file and load all drawings in the target construction file as target drawings; or respond to the user's operation of selecting a target drawing in the target construction file and load the selected target drawing. In addition, the industrial computer can respond to the user's operation of clearing drawings and clear the loaded drawings.
[0133] (2) The drawing preview module splits the loaded target drawing into multiple sub-drawings by page; and displays the previewed target sub-drawings according to the page number and zoom ratio selected by the user.
[0134] After the drawing information is loaded into the software, the software will split the drawing into pages and display the pictures of the user-specified pages for the user to preview, providing a basis for the recognition area management module. The drawing preview module includes two sub-functions: drawing splitting and drawing preview. Figure 7 As shown:
[0135] If the loaded drawings are in PDF format, there will be multiple pages. The drawing preview module will split the loaded PDF drawings into different sub-drawings by page. The subsequent preview, recognition area management, and recognition saving are all performed on the sub-drawings of a certain page.
[0136] When previewing drawings, you can select which page of drawings to preview, and you can zoom in or out of the selected page of drawings to achieve the best preview effect, thus avoiding wrong operations due to not being able to see the drawings clearly.
[0137] (3) The recognition area management module automatically searches and marks the target recognition area in the target sub-drawing through the AI algorithm, or responds to the user's recognition area editing operation on the target sub-drawing and marks the target recognition area.
[0138] The recognition area management module is the core module of the system. There are two ways to determine the recognition area. One is to automatically determine and mark the recognition area in the drawing through the AI algorithm, and the other is for the user to determine and modify the recognition area through the software. The former can reduce a lot of manual operations by computer calculation, and the latter is a supplement and improvement to the former, correcting some errors and mistakes of the AI algorithm.
[0139] The recognition area management module has two sub-functions, namely, the AI algorithm determines the recognition area and the user edits the recognition area. Figure 8 As shown:
[0140] The AI algorithm can determine which areas in the drawing need to be identified and marked, which can be completed by the computer, reducing the user's operation.
[0141] After the software enters the recognition area editing mode, the user can modify the size and position of the recognition area determined by the AI algorithm, or add or delete a recognition area.
[0142] (4) The recognition and saving module performs text recognition on the target recognition area marked in the target sub-drawing through a preset information recognition model to obtain text recognition information corresponding to the target recognition area; and saves the text recognition information corresponding to the target recognition area.
[0143] Specifically, the text recognition and extraction is performed on the target recognition area through the OCR recognition module in the information recognition model to obtain the text recognition information corresponding to the target recognition area. In specific implementation, the above-mentioned OCR recognition module includes: a text detection model and a text recognition model; the step of identifying the target recognition area marked in the target sub-drawing through the preset information recognition model includes: detecting the text position of the target recognition area through the text detection model in the information recognition model, and recognizing the text at the detected text position through the text recognition model in the information recognition model to obtain the text recognition information corresponding to the target recognition area. Finally, the text recognition information corresponding to the target recognition area is saved in an Excel file with the same name as the target drawing and with the page number suffix added for user viewing.
[0144] The recognition and saving module is a module that produces results. It is divided into two sub-functions: OCR recognition and result saving. The OCR recognition function recognizes the area determined in the recognition area management module and converts the image into text information; the result saving function saves the recognition results as an Excel spreadsheet file in a predefined format. Fig. 9 shown.
[0145] The embodiments of the present application can realize automation in information data collection, greatly reduce personnel input, effectively prevent human errors, shorten the data collection cycle, and save investment costs.
[0146] Taking 180,000 drawings as an example, the manual input machine can input a maximum of 600 drawings per day, working 22 days per month, and 10 input operators need 14 months to complete the work, and 5 people are needed to review it. Using this system, 800 drawings can be recognized per day, working 22 days per month, and the work can be completed in 10 months. Only 5 people are needed for subsequent maintenance and review, and the labor cost can be saved by more than 600,000 yuan.
[0147] The system uses AI intelligence to establish a massive sample library of various types of engineering drawings. It has the largest number of nuclear engineering drawing information samples in the country and develops a neural network learning algorithm. On average, it takes less than 1 minute to complete data collection for each drawing, with an accuracy rate of 99.5%. It also has a 100% error correction function, which effectively eliminates human errors and greatly improves the efficiency of reading and inputting drawings. It is suitable for drawing material information data collection work in various fields, especially in the field of nuclear engineering construction.
[0148] In the information identification method of construction documents provided in the embodiment of the present application, the industrial computer can allow users to load construction drawings of various formats, and split the drawings by page, so that users can preview and operate in units of pages. Through the AI algorithm, it can independently determine which areas in the drawings need to be identified and mark them, or allow users to edit the identification areas on this basis. After the identification area of the drawing is determined, the text in the identification area can be identified, and the identification results can be saved in an Excel spreadsheet file. The accuracy and efficiency of information identification and extraction are greatly improved, thereby improving construction efficiency.
[0149] Based on the above method embodiment, the present application embodiment also provides an information identification device for construction documents, which is applied to an industrial computer; see Figure 5 As shown, the device includes: a drawing loading module 52, a drawing preview module 54, an identification area management module 56, and an identification saving module 58; wherein the drawing loading module 52 is used to load the target drawing in the construction document; the drawing includes at least one of the following: a construction drawing, a table, and text; the drawing preview module 54 is used to split the loaded target drawing into multiple sub-drawings by page; and display the previewed target sub-drawing according to the number of pages and the zoom ratio selected by the user; the identification area management module 56 is used to automatically find and mark the target identification area in the target sub-drawing through an AI algorithm, and / or, in response to the user's editing operation on the identification area of the target sub-drawing, mark the target identification area; the identification saving module 58 is used to perform text recognition on the marked target identification area in the target sub-drawing through a preset information recognition model to obtain text recognition information corresponding to the target identification area; and save the text recognition information corresponding to the target identification area.
[0150] Furthermore, the drawing loading module 52 is used to respond to the user's selection operation on the target construction file and load all drawings in the target construction file as target drawings; or, respond to the user's selection operation on the target drawing in the target construction file and load the selected target drawing.
[0151] Furthermore, the above-mentioned information recognition model includes a text detection model and a text recognition model; the recognition and storage module 58 is used to detect the text position of the target recognition area through the text detection model in the information recognition model, and recognize the text at the detected text position through the text recognition model in the information recognition model to obtain the text recognition information corresponding to the target recognition area.
[0152] Furthermore, the recognition saving module 58 is used to save the text recognition information corresponding to the target recognition area into an Excel file with the same name as the target drawing and with a page number suffix added.
[0153] Furthermore, the above-mentioned device also includes: a model training module, which is used to execute the following information recognition model training process: obtaining a training sample set; the samples in the training sample set include: drawings marked with text image frames and text content corresponding to the text image frames; training a preset text recognition model based on the samples in the training sample set to obtain an information recognition model; when new sample data is obtained, training the information recognition model through an incremental training mode to obtain an updated information recognition model.
[0154] Furthermore, the above-mentioned information recognition model includes: an encoder, a decoder and an objective function; the encoder includes: a two-dimensional convolutional neural network, a two-dimensional batch normalization layer and a ReLU class function; the decoder includes: a recursive neural network with a gating mechanism and a fully connected neural network; the encoder is used to perform high-dimensional abstraction and encoding of the input original feature map, and extract local and global feature information that can effectively distinguish characters; the decoder is used to effectively decode the input high-dimensional features according to the decoding direction, and extract local and global feature information that can effectively distinguish the relationship between characters; the objective function is used to set a convergence target for the training process, and quantify the degree of convergence of each stage iteration, and provide the gradient error of back propagation in the form of a derivative.
[0155] Furthermore, the hyperparameter design during the training of the above model includes: increasing the convolution kernel layer by layer in multiples of 2 during convolution encoding; setting the text height to 32 pixels; selecting the font based on GB / T 14691-93; and conducting comparative ablation experiments on the following parameters: 4-8 convolution layers, 16-256 convolution kernels, the number of convolution groups with half the number of kernels or kernels, point-wise and depth-wise, and 1-2 recursive layers.
[0156] The device provided in the embodiment of the present application has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the device, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0157] Based on the above method embodiment, the present application embodiment also provides an information identification system for construction documents, see Fig. 9 As shown, the system includes: an industrial computer 92 and a training server 94; the training server 94 is used to train the information recognition model and transmit the information recognition model to the industrial computer 92; the industrial computer 92 is used to identify the construction information of the construction documents to be identified based on the information recognition model using the method described in the method embodiment.
[0158] The system provided in the embodiment of the present application has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the system, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0159] An embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above method. The specific implementation can be found in the aforementioned method embodiment, which will not be repeated here.
[0160] The computer program products of the methods, devices, and electronic devices provided in the embodiments of the present application include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the previous method embodiments. The specific implementation can be found in the method embodiments, which will not be repeated here.
[0161] Unless otherwise specifically stated, the relative steps, numerical expressions and values of the components and steps set forth in these embodiments do not limit the scope of the present application.
[0162] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0163] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0164] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for identifying information of construction documents, characterized in that: The method is applied to an industrial computer; the method comprises: The target drawings loaded into the construction documents; the drawings include at least one of the following: construction drawings, tables, and texts; Split the loaded target drawing into multiple sub-drawings by page; Display the previewed target sub-drawing according to the page number and zoom ratio selected by the user; Automatically searching and marking the target identification area in the target sub-drawing sheet by an AI algorithm, and / or, in response to a user's editing operation on the identification area of the target sub-drawing sheet, marking the target identification area; Using a preset information recognition model, text recognition is performed on the target recognition area marked in the target sub-drawing to obtain text recognition information corresponding to the target recognition area; The text recognition information corresponding to the target recognition area is saved.
2. The method according to claim 1, characterized in that The steps to load the target drawings in the construction documents include: In response to a user's selection operation on a target construction file, all drawings in the target construction file are loaded as target drawings; or, in response to a user's selection operation on a target drawing in a target construction file, the selected target drawing is loaded.
3. The method according to claim 1, characterized in that The information recognition model includes a text detection model and a text recognition model; the step of identifying the target recognition area marked in the target sub-drawing by using the preset information recognition model includes: The text position of the target recognition area is detected by the text detection model in the information recognition model, and the text at the detected text position is recognized by the text recognition model in the information recognition model to obtain the text recognition information corresponding to the target recognition area.
4. The method according to claim 1, characterized in that: The step of saving the text recognition information corresponding to the target recognition area includes: The text recognition information corresponding to the target recognition area is saved in an Excel file with the same name as the target drawing and with a page number suffix added.
5. The method according to claim 1, characterized in that The training process of the information recognition model is as follows: Acquire a training sample set; the samples in the training sample set include: drawings annotated with text position data, text image frames, and text content corresponding to the text image frames; Based on the text position data of the samples in the training sample set, a preset text detection model is trained to obtain a text detection model; based on the text image frames of the samples in the training sample set and the text content corresponding to the text image frames, a preset text recognition model is trained to obtain a text recognition model; the text detection model and the text recognition model are used as an information recognition model; When new sample data is acquired, the information recognition model is trained through an incremental training mode to obtain an updated information recognition model.
6. The method according to claim 5, characterized in that The information recognition model includes: an encoder, a decoder and an objective function; the encoder includes: a two-dimensional convolutional neural network, a two-dimensional batch normalization layer and a ReLU class function; the decoder includes: a recursive neural network with a gating mechanism and a fully connected neural network; the objective function includes a CTC connection time series classification function.
7. The method according to claim 6, characterized in that The hyperparameter design during model training includes: increasing the convolution kernel layer by layer in multiples of 2 during convolution encoding; setting the text height to 32 pixels; selecting the font based on GB / T 14691-93; and conducting comparative ablation experiments on the following parameters: 4-8 convolution layers, 16-256 convolution kernels, the number of convolution groups with half the number of kernels or kernels, point-wise and depth-wise, and 1-2 recursive layers.
8. An information recognition device for construction documents, characterized in that: The device is applied to an industrial computer; the device comprises: a drawing loading module, a drawing preview module, a recognition area management module, and a recognition saving module; wherein, The drawing loading module is used to load the target drawing in the construction document; the drawing includes at least one of the following: construction drawing, table, text; The drawing preview module is used to split the loaded target drawing into multiple sub-drawings by page; and display the previewed target sub-drawings according to the page number and zoom ratio selected by the user; The recognition area management module is used to automatically find and mark the target recognition area in the target sub-drawing through an AI algorithm, and / or, in response to a user's editing operation of the recognition area of the target sub-drawing, mark the target recognition area; The recognition and saving module is used to perform text recognition on the target recognition area marked in the target sub-drawing through a preset information recognition model to obtain text recognition information corresponding to the target recognition area; and save the text recognition information corresponding to the target recognition area.
9. An information identification system for construction documents, characterized in that: The system includes: an industrial computer and a training server; the training server is used to train an information recognition model and transmit the information recognition model to the industrial computer; the industrial computer is used to identify construction information of the construction documents to be identified based on the information recognition model using the method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Engineering drawing material information extraction method based on template
CN101882225A
PDF document table extraction method, device and equipment and computer readable storage medium
CN110390269A
Bill text recognition method and system
CN110647829A
Part drawing title bar filling method and system and storage medium
CN111353284A
Device list character recognition method and device
CN116704511A
Cited By
Engineering drawing content difference identification method and device, equipment and storage medium
CN120748002A
Machine-readable constructional engineering standard digital processing method and device
CN121806571A
