Method, device and computer equipment for identifying architectural drawing table content
By extracting the characteristic data of architectural drawing tables and using machine learning models for matching, the problem of heavy workload when manually reading the contents of architectural drawing tables is solved, automatic identification is achieved, costs are saved and accuracy is improved.
Patent Information
- Application Number
- CN202010599424.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-28
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2040-06-28
AI Technical Summary
In the prior art, manual reading of architectural drawing table contents is high, costly, and it is difficult to quickly identify complex drawing information.
By extracting the structural features and text features of the architectural drawing tables, and using the machine learning model in the preset sample table library for matching, the table data set is determined, thereby realizing automatic identification of table contents.
Automatic recognition of the contents of architectural drawing tables is realized, which saves operating costs, shortens recognition time, and improves recognition accuracy compared to manual recognition.
Smart Images

Figure CN111753763B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of drawing recognition, and in particular to a method, device and computer equipment for recognizing the contents of a table in an architectural drawing. Background Art
[0002] In the field of construction, including civil engineering, steel structure, installation and other professional fields, it is often necessary to establish corresponding structural models in various stages such as project budgeting, bidding and implementation. In the modeling process, the existing technology requires manual reading of the table content of the building drawings to obtain structural data for modeling. For some large-scale projects, not only is the amount of structural data large, which will lead to a large workload and high cost for manual reading, but also the complex information of the building drawings will cause certain interference to the manual reading process. For example, when manually reading the table content of the floor table to obtain structural data, it is necessary to first determine the floor according to the table structure of the floor table on the CAD drawing, and then find the frame beams, wall columns, strong beams and other components in the floor table and the concrete number data of the components. The workload is large, and the table reader is also required to have a certain understanding of the drawing and expression of the CAD legend. At the same time, the CAD drawings have different drawing methods for the floor table, but the meaning of the expression is the same. This requires a lot of energy and time for large engineering projects. In addition, the concrete number information between different projects is different, so the table reader needs to spend a lot of time.
[0003] Therefore, how to quickly identify the contents of architectural drawing tables has become a technical problem that urgently needs to be solved in this field. Summary of the invention
[0004] The purpose of the present invention is to provide a method, device and computer equipment for identifying the contents of architectural drawing tables, so as to solve the above-mentioned technical problems in the prior art.
[0005] On the one hand, to achieve the above-mentioned purpose, the present invention provides a method for identifying the content of a table in an architectural drawing.
[0006] The method for identifying the contents of tables in architectural drawings includes: determining a table to be identified on the architectural drawing; extracting feature data of the table to be identified, wherein the feature data includes structural features and text features of the table to be identified; matching a sample table corresponding to the table to be identified in a preset sample table library according to the feature data; and determining a table data set according to the table structure of the sample table.
[0007] Furthermore, the step of extracting the structural features of the table to be identified includes: obtaining line primitives in the table to be identified; obtaining the endpoints of the line primitives and the intersections of two or more of the line primitives as feature points of the table to be identified; and extracting features of the feature points as the structural features, wherein the features of the feature points include the number, angle, line type, color of the line primitives at the feature points and / or statistical features of the feature points in the table to be identified.
[0008] Furthermore, the step of extracting the structural features of the table to be identified includes: obtaining line primitives on the architectural drawing; and calculating the relationship features between the line primitives in the table to be identified and all the line primitives on the architectural drawing as the structural features.
[0009] Furthermore, the step of extracting the text features of the table to be recognized includes: obtaining text primitives in the table to be recognized; and performing word segmentation and filtering on the text primitives to obtain the text features.
[0010] Furthermore, in the preset sample table library, the step of matching the sample table corresponding to the table to be identified according to the feature data includes: inputting the feature data of the table to be identified into a trained random forest model, wherein the trained random forest model outputs the similarity between the table to be identified and each of the sample tables; and determining that the sample table with the greatest similarity to the table to be identified is the sample table corresponding to the table to be identified.
[0011] Furthermore, before inputting the feature data of the table to be identified into the trained random forest model, the method also includes: constructing an initial random forest model; obtaining the sample table in the sample table library as a training table; using the feature data of the training table as the input of the initial random forest model, using the similarity between the training table and the sample table in the sample table library as the output of the initial random forest model, and training the initial random forest model to obtain the trained random forest model.
[0012] Furthermore, after the step of determining a table data set according to the table structure of the sample table, the method for identifying the content of a building drawing table further includes: obtaining correction information of the table data set; constructing the sample table according to the correction information, and updating the preset sample table library.
[0013] On the other hand, to achieve the above-mentioned purpose, the present invention provides a device for identifying the contents of a table in an architectural drawing.
[0014] The device for identifying the content of tables in architectural drawings includes: a determination module, used to determine the table to be identified on the architectural drawing; an extraction module, used to extract feature data of the table to be identified, wherein the feature data includes structural features and text features of the table to be identified; a matching module, used to match the sample table corresponding to the table to be identified in a preset sample table library according to the feature data; and an identification module, used to determine a table data set according to the table structure of the sample table.
[0015] On the other hand, to achieve the above purpose, the present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above method when executing the computer program.
[0016] On the other hand, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method are implemented.
[0017] The method, device and computer equipment for identifying the contents of architectural drawing tables provided by the present invention pre-set a sample table library, which includes multiple sample tables with known table structures. For the table to be identified on the architectural drawing, its feature data is first extracted, and then the sample table corresponding to the table to be identified is matched according to the extracted feature data, and finally the table data set can be determined according to the table structure of the sample table. Through the present invention, automatic identification of architectural drawing tables can be achieved, which can save manual operation costs, shorten identification time and improve identification accuracy compared to manual identification in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0019] Figure 1 A flowchart of a method for identifying the contents of a table in a building drawing provided in Embodiment 1 of the present invention;
[0020] Figure 2 A block diagram of a device for identifying the contents of a table in a building drawing provided in a second embodiment of the present invention;
[0021] Figure 3 This is a hardware structure diagram of a computer device provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0023] In order to solve the problem of heavy workload in manually identifying the contents of architectural drawing tables in the prior art, the inventors studied actual drawing tables in the architectural field and found that similar tables often have basically similar table structures. At the same time, under the premise of knowing the table structure and the text in the table, the contents of the table can be determined. Based on this, the present invention provides a method, device, computer equipment and readable storage medium for identifying the contents of architectural drawing tables. In the method for identifying the contents of architectural drawing tables provided by the present invention, the table to be identified on the architectural drawing is first determined, and then the feature data of the table to be identified is extracted. Based on the feature data, the table to be identified is matched with the sample table in the preset sample table library to match the sample table corresponding to the table to be identified. Finally, the table data set is determined according to the table structure of the matched sample table, and the content in the table to be identified is identified, thereby realizing the automation of the content recognition of architectural drawing tables. Compared with manual recognition, it can save manual operation costs, shorten recognition time, and improve recognition accuracy.
[0024] The specific implementation of the method, device, computer equipment and readable storage medium for identifying the contents of architectural drawing tables provided by the present invention will be described in detail below.
[0025] Embodiment 1
[0026] Embodiment 1 of the present invention provides a method for identifying the contents of a table in an architectural drawing. By using this method, the contents of a table in an architectural drawing can be automatically identified, which can save manual operation costs and improve the accuracy of identification. Specifically, Figure 1 This is a flow chart of a method for identifying the contents of a table in a building drawing provided in Embodiment 1 of the present invention. Figure 1 As shown, the method for identifying the content of a building drawing table provided in this embodiment includes the following steps S101 to S104.
[0027] Step S101: Determine the table to be identified on the architectural drawing.
[0028] Specifically, in one embodiment, the user can import the architectural drawings to be identified into a software system that executes the method of this embodiment. After the system displays the drawings, the user can select the tables to be identified through box selection operations or line selection operations according to business requirements. The system determines the tables to be identified based on the area selected by the user.
[0029] Alternatively, in one embodiment, the user can import the drawing to be calculated into a software system that executes the method of this embodiment, and enter parameters that can limit the position area of the table to be identified on the drawing in the parameter receiving window, such as the position coordinates of the position area and the length and width of the area. The system determines the table to be identified based on the parameters entered by the user.
[0030] Alternatively, the table to be identified may also be determined based on other operations or instructions, which is not limited in this application.
[0031] Step S102: extracting characteristic data of the table to be identified.
[0032] Specifically, the feature data of the table to be identified may include the structural features of the table and the text features of the table, etc., wherein the structural features refer to the features that can reflect the structure of the table, such as the size of the table, the number of rows and columns, the number of lines that make up the table, etc.; the text features refer to the features extracted from the text in the table, such as the text included in the table, whether the table includes preset keywords, the degree of repetition of the content in the table, etc. The feature data of the table to be identified is constructed by using some or all of the above features.
[0033] Step S103: In a preset sample table library, a sample table corresponding to the table to be identified is matched according to the feature data.
[0034] A sample form library is preset, and the sample form library includes a plurality of sample forms. In step S103, a sample form corresponding to the form to be identified is matched in the preset sample form library according to the feature data of the form to be identified, that is, a sample form having a high similarity with the form to be identified.
[0035] Optionally, in one embodiment, the sample table library stores data corresponding to the sample table, specifically including feature data of the sample table, and determines the similarity between the table to be identified and the sample table by comparing the feature data of the table to be identified with the feature data of the sample table.
[0036] Alternatively, in another embodiment, a machine learning model is set, and the feature data corresponding to the sample table is used as the input of the machine learning model, and the table structure of the sample table is used as the output of the machine learning model. The machine learning model is trained to determine the structure and / or parameters of the machine learning model to obtain a trained machine learning model. In this step, after the feature data of the table to be identified is input into the trained machine learning model, the machine learning model can output a predicted table structure. In the preset sample table library, the sample table with this table structure is the sample table corresponding to the table to be identified.
[0037] Alternatively, other methods may be used to determine the sample table corresponding to the table to be identified, which is not limited herein.
[0038] Step S104: determining a table data set according to the table structure of the sample table.
[0039] Specifically, the table structure refers to the format and content framework of the table, that is, what information is set in each row (column) of a table. Therefore, under the premise of knowing the table structure and the text graphics in the table, the content of the table can be identified. For example, for a floor table, its table structure is: the first column sets the floor, the second column sets the floor bottom elevation, and the third column sets the floor height. The text graphics in a row are 5, 11.6, and 2.9 respectively. Then the content of a row in the floor table is: the floor is 5, the floor bottom elevation is 11.6, and the floor height is 2.9.
[0040] The sample table is a table with high similarity to the table to be identified. The two have a table structure with high similarity or the same structure. Therefore, when identifying the content in the table to be identified, the table structure of the sample table can be referred to for identification. Specifically, after identifying the content of the table, the content of the table can be output in the form of a table data set. Optionally, the table data set includes multiple data records, each data record includes multiple fields, and each field is stored in the form of a key-value pair, where the key is the field name and the value is the value corresponding to the field. When displaying the table data set, each row displays a data record and each column displays a field. For example, the table to be identified is a floor table, and the table data set of the floor table includes multiple data records corresponding to the floors, that is, each row displays a data record of a floor, and each data record includes the concrete number of the wall column, wall beam, frame column, frame beam, shear wall, and slab, as well as the floor identification, floor bottom elevation and floor height, etc., then the floor table finally displayed includes N (N is the number of floors) rows and M (M is the number of fields included in each data record, for example, the above data record includes 9 fields, then M=9) columns of data.
[0041] In the method for identifying the contents of architectural drawing tables provided in this embodiment, a sample table library is preset, and the sample table library includes multiple sample tables with known table structures. For the table to be identified on the architectural drawing, its feature data is first extracted, and then the sample table corresponding to the table to be identified is matched according to the extracted feature data. Finally, the table data set can be determined according to the table structure of the sample table to identify the contents of the table to be identified. The method for identifying the contents of architectural drawing tables provided in this embodiment can realize automatic identification of architectural drawing tables, which can save manual operation costs, shorten identification time, and improve identification accuracy compared to manual identification in the prior art.
[0042] Optionally, in an embodiment, when extracting feature data of the table to be identified, the above step S102 specifically includes: extracting structural features of the table to be identified; and extracting text features of the table to be identified.
[0043] By adopting the method for identifying the contents of tables in architectural drawings provided in this embodiment, feature data of the table to be identified is extracted from both the structural features and the text features of the table, so that the feature data can fully reflect the characteristics of the table, which is conducive to the subsequent use of the feature data to match sample tables, improve the accuracy of sample table matching, and further improve the accuracy of table content recognition.
[0044] The following three extraction methods are further included for the structural features of the table to be identified, wherein the three extraction methods can be combined with each other.
[0045] First, the step of extracting the structural features of the table to be identified includes: obtaining line primitives in the table to be identified; obtaining the endpoints of the line primitives and the intersections of two or more line primitives as feature points of the table to be identified; and extracting features of the feature points as structural features, wherein the features of the feature points include the number, angle, line type, color of the line primitives at the feature points and / or statistical features of the feature points in the table to be identified.
[0046] Specifically, for drawings in formats such as CAD, the table includes line primitives and text primitives. When extracting the structural features of the table to be identified, the line primitives of the table to be identified are first obtained, and then the endpoints of the line primitives and the intersections of the line primitives can be further obtained, wherein a line primitive has two endpoints, and each intersection can be the intersection of two line primitives, or the intersection of more than two line primitives. The above endpoints and intersections constitute the characteristic points of the table to be identified. Optionally, after determining the endpoints and intersections, deduplication is performed, and the deduplicated endpoints and intersections are used as feature points. After determining the feature points, the features of the feature points are extracted as the structural features of the table to be identified, wherein the features of the feature points include the number, angle, line type, color of the line primitives at the feature points and / or the statistical features of the feature points in the table to be identified.
[0047] The number of line primitives at a feature point is further explained as follows: when a feature point is the endpoint of a line primitive and the endpoint is not an intersection point, the number of line primitives at the feature point is 1; for example, when a feature point is the intersection point of two line primitives, the number of line primitives at the feature point is 2; for example, when a feature point is the intersection point of three line primitives, the number of line primitives at the feature point is 3, and so on.
[0048] The angle of the line primitive at the feature point includes the angles of all line primitives at the feature point. The angle of the line primitive refers to the angle between the line primitive and the 0-degree vector, where the 0-degree vector can be a vector extending horizontally to the right, then the angle of the line primitive extending horizontally to the left is 180 degrees, the angle of the line primitive extending vertically upward is 90 degrees, and the angle of the line primitive extending vertically downward is 270 degrees.
[0049] The line type of the line primitive at the feature point includes the line types of all line primitives at the feature point, and the line type may specifically be a solid line, a dashed line, or a dash-dot line.
[0050] The color of the line primitive at the feature point includes the colors of all the line primitives at the feature point, and the color of the line primitive can be represented by an RGB color value.
[0051] The statistical features of the feature points in the table to be identified refer to the statistical features of the feature points of the same category in the table to be identified, and the category dimension of the feature point can be the dimension on any feature of the feature point. Further optionally, the step of calculating the statistical features of the feature points in the table to be identified includes: counting the number of all feature points in the table to be identified to obtain the total number of feature points; counting the number of feature points where the number of line primitives at the feature points in the table to be identified is N, to obtain the Nth number of feature points, where N is an integer greater than or equal to 1; calculating the ratio of the Nth number of feature points to the total number of feature points to obtain the Nth ratio as the structural feature.
[0052] For tables on drawings such as CAD, the relationship between the line type, color and other characteristics of line graphics and the positional relationship between line graphics can all reflect the table structure of the table. The method for identifying the content of architectural drawing tables provided in this embodiment is used to use the endpoints and intersections of the line graphics in the table to be identified as feature points, and the relevant features of the line graphics at the feature points and the statistical features of the feature points as the structural features of the table to be identified, so that the extracted structural features can simultaneously reflect the characteristic association relationship and the positional relationship between the line graphics, and thus can better reflect the table structure of the table to be identified, which is beneficial to the subsequent use of the feature data to match the sample table, improve the accuracy of the sample table matching, and further improve the accuracy of the table content recognition.
[0053] Second, the step of extracting the structural features of the table to be identified includes: determining the number of rows and columns of the table to be identified.
[0054] Specifically, by extracting the line primitives of the table and calculating the intersection points of the line primitives in the table, the table style and the coordinate information of each cell are obtained, and the number of rows and columns of the table is further determined.
[0055] For a table, a row (or column) of a table is usually used as a unit of the table, and accordingly, a column (or row) of a table becomes a component structure of a unit. Therefore, the number of rows and columns of a table can also reflect the table structure of the table. Using the method for identifying the content of a table of architectural drawings provided in this embodiment, the number of rows and columns is used as the structural features of the table to be identified, and can also reflect the table structure of the table to be identified, which is conducive to the subsequent use of the feature data to match the sample table, thereby improving the accuracy of the sample table matching, and further improving the accuracy of the table content recognition.
[0056] The third step of extracting structural features of the table to be identified includes: obtaining line primitives on the architectural drawings; and calculating the relationship features between the line primitives in the table to be identified and all the line primitives on the architectural drawings as structural features.
[0057] Specifically, the relationship features between the line elements in the table to be identified and all the line elements on the architectural drawings may include the proportion of the line elements in the table to be identified to all the line elements on the architectural drawings, the ratio of the average length of the line elements in the table to be identified to the average length of all the line elements on the architectural drawings, etc.
[0058] Using the method for identifying the content of tables in architectural drawings provided in this embodiment, the relationship characteristics between the line graphics elements in the table to be identified and all the line graphics elements on the architectural drawings are used as structural characteristics of the table to be identified, which reflects the characteristics of the table to be identified on the architectural drawings, increases the dimension of table matching, improves the accuracy of sample table matching, and further improves the accuracy of table content recognition.
[0059] With respect to the text features of the table to be identified, the step of extracting the text features of the table to be identified includes: obtaining text primitives in the table to be identified; and performing word segmentation and filtering on the text primitives to obtain text features.
[0060] Specifically, first obtain all the text primitives in the table to be recognized, and segment the text primitives according to their semantics. When the text primitives are numbers, the numbers in a text primitive can be a word. When the text primitives are text, they can be segmented according to the text semantics. After obtaining the segmentation results, further filtering is performed to filter meaningless words, synonyms, and repeated words. The words obtained after filtering are the text features.
[0061] The method for identifying the contents of architectural drawing tables provided in this embodiment constructs text features through text primitives, and performs word segmentation and filtering on the text primitives, which can not only increase the dimension of the table feature data to be identified, but also avoid affecting the recognition speed due to excessive data volume.
[0062] Optionally, in one embodiment, when the above-mentioned step S103 matches the sample table corresponding to the table to be identified according to the feature data in the preset sample table library, the specific steps performed include: training the machine learning model, wherein the input of the machine learning model is the feature data of the training table, and the output of the machine learning model is the similarity between the training table and the sample table; inputting the feature data of the table to be identified into the trained machine learning model to obtain the similarity between the table to be identified and each sample table; and determining that the sample table with the greatest similarity to the table to be identified is the sample table corresponding to the table to be identified.
[0063] Specifically, a machine learning model is preset, a sample table library is constructed, and the preset machine learning model is trained using the samples in the sample table library, wherein the sample table library includes multiple tables on architectural drawings, which may be Table 1, Table 2, Table 3, etc. The feature data of these tables are extracted as the input of the machine learning model, and the output of the machine learning model is the table similarity. Specifically, when the feature data of Table 1 is used as the input of the machine learning model, the output of the machine learning model is 1, 0, 0, etc.; when the feature data of Table 2 is used as the input of the machine learning model, the output of the machine learning model is 0, 1, 0, etc.; when the feature data of Table 3 is used as the input of the machine learning model, the output of the machine learning model is 0, 0, 1, etc. After the machine learning model training is completed, it is stored, and the feature data of the table to be identified is input to obtain the similarity between the table to be identified and each sample table, and finally the sample table with the greatest similarity to the table to be identified is determined as the sample table corresponding to the table to be identified.
[0064] The method for identifying the contents of architectural drawing tables provided in this embodiment introduces a machine learning model in the automatic identification of tables. Based on the powerful data learning ability of the machine learning model, the accuracy of matching the table to be identified with the sample table can be improved, thereby further improving the accuracy of table content recognition.
[0065] Optionally, in one embodiment, when the above-mentioned step S103 matches the sample table corresponding to the table to be identified according to the feature data in the preset sample table library, the specific steps performed include: inputting the feature data of the table to be identified into a trained random forest model, wherein the trained random forest model outputs the similarity between the table to be identified and each sample table; and determining that the sample table with the greatest similarity to the table to be identified is the sample table corresponding to the table to be identified.
[0066] The method for identifying the contents of architectural drawing tables provided by this embodiment uses a random forest model as the machine learning model. Since the random forest model is a special bagging (also known as bagging method), it uses the decision tree as the model in bagging. For the constructed decision tree, when finding features for splitting at the node, it does not find all features that can maximize the index (such as information gain), but randomly extracts a part of the features, finds the optimal solution among the extracted features, applies it to the node, and splits it. Random forest is based on the idea of bagging, which is actually equivalent to sampling both samples and features, so it can avoid overfitting, so that the recognition table has higher accuracy.
[0067] Optionally, in one embodiment, before inputting the feature data of the table to be identified into the trained random forest model, the method also includes: constructing an initial random forest model; obtaining a sample table in a sample table library as a training table; using the feature data of the training table as the input of the initial random forest model, using the similarity between the training table and the sample table in the sample table library as the output of the initial random forest model, and training the initial random forest model to obtain a trained random forest model.
[0068] Optionally, in one embodiment, after the step of identifying the content in the table to be identified according to the table structure of the sample table, the method for identifying the content of the architectural drawing table also includes: obtaining correction information of the table data set; constructing a sample table according to the correction information, and updating a preset sample table library.
[0069] Specifically, when constructing a sample table, the table data set is corrected according to the correction information, and the feature data of the table to be identified is corrected (mainly including the correction of text features), and the corrected table data set is used as the table structure of the sample table, and the corrected feature data is used as the feature data of the sample table to complete the construction of the sample table. When obtaining the correction information of the table data set, the content of the table to be identified can be displayed in a preset data display method corresponding to the table structure; the user's modification operation on the content of the table to be identified is received to obtain the correction information.
[0070] By adopting the method for identifying the contents of architectural drawing tables provided by this embodiment, after the identification is completed, the correction information of the table data set is obtained, and then a sample table is constructed to update the preset sample table library. Furthermore, the identification result can be displayed to the user, and the user can correct the identification result. After correction, it is uploaded to the sample table library as a sample table in the sample table library. By adopting this embodiment, the sample table library can be expanded, the accuracy of matching the table to be identified with the sample table can be improved, and the accuracy of table content recognition can be further improved.
[0071] Specifically, taking the floor table as an example, the execution process of the method for identifying the content of the architectural drawing table provided in this embodiment is described as follows.
[0072] In this embodiment, the user only needs to import the drawings, and the software executing the method for identifying the contents of architectural drawing tables can automatically identify the floor tables in the drawings and export the identification results. Specifically, the software includes a client and a server. The interaction between the user and the software is completed on the client. The data processing process is completed by the interaction between the client and the server. On the server, a large number of related floor tables are stored as sample tables in the sample table library, and a machine learning model for calculating the similarity between the table to be identified and the sample table is stored. When the user wants to identify the floor table in the drawing, the drawing is imported into the software through the client and the recognition function is triggered. At this time, the client will automatically collect the feature information of all the graphics elements in the drawing, and convert various graphics elements into the feature data required for identifying the floor table, that is, convert the legend information into vector information, and then upload it to the cloud server for similarity calculation. After the similarity calculation, the server determines the sample table, and then determines the content of the floor table according to the table structure of the sample table, and returns it to the client. The client displays the identified content through the display window according to the content display format, for example, the floor name, floor code, floor height, floor bottom elevation and the concrete number corresponding to the component (including non-frame beams, wall columns, wall beams, frame columns, frame beams, shear walls and slabs) are displayed in the window. The user can modify and confirm the display results on the client. After confirmation, the client uploads the relevant information to the server for storage for subsequent identification. In this way, with the continuous accumulation of server data, the accuracy of recognition will become higher and higher, and ultimately avoid user modification and achieve the purpose of rapid modeling.
[0073] The method for identifying the contents of tables in architectural drawings provided in this embodiment is adopted, and the artificial intelligence algorithm of feature engineering is used to calculate the similarity of professional floor table graphics, and the floor table information is continuously collected to make the model more and more accurate, gradually reduce the user's modification operations, and use a unified process to handle floor table recognition problems of different professions. By automating floor table recognition, user operating costs are saved, the accuracy is improved, and the time is shortened. It can be used in all scenarios where floor tables are needed, and it is universal. The user only needs to trigger the recognition function, and the algorithm automatically processes it, and the operation is simple and fast.
[0074] Embodiment 2
[0075] Corresponding to the above-mentioned embodiment 1, embodiment 2 of the present invention provides a method, apparatus and computer device for identifying the contents of a table in an architectural drawing. Figure 2 A block diagram of a method, device and computer device for identifying the contents of a table in a building drawing provided in Embodiment 2 of the present invention, such as Figure 2As shown, the device includes a determination module 201, an extraction module 202, a matching module 203 and an identification module 204: the determination module 201 is used to determine the table to be identified on the architectural drawing; the extraction module 202 is used to extract the feature data of the table to be identified, wherein the feature data includes the structural features and text features of the table to be identified; the matching module 203 is used to match the sample table corresponding to the table to be identified in the preset sample table library according to the feature data; the identification module 204 is used to determine the table data set according to the table structure of the sample table.
[0076] Optionally, in one embodiment, the extraction module 202 includes: a first acquisition unit, a second acquisition unit and an extraction unit, wherein the first acquisition unit is used to acquire line primitives in the table to be identified; the second acquisition unit is used to acquire the endpoints of the line primitives and the intersections of two or more line primitives as feature points of the table to be identified; and the extraction unit is used to extract features of the feature points as structural features, wherein the features of the feature points include the number, angle, line type, color of the line primitives at the feature points and / or statistical features of the feature points in the table to be identified.
[0077] Optionally, in one embodiment, the extraction module 202 includes: a third acquisition unit and a calculation unit, wherein the third acquisition unit is used to acquire line primitives on the architectural drawings; the calculation unit is used to calculate the relationship features between the line primitives in the table to be identified and all the line primitives on the architectural drawings as structural features.
[0078] Optionally, in one embodiment, the extraction module 202 includes: a fourth acquisition unit and a processing unit, wherein the fourth acquisition unit is used to acquire text primitives in the table to be identified; and the processing unit is used to segment and filter the text primitives to obtain text features.
[0079] Optionally, in one embodiment, the matching module 203 includes: an output unit and a determination unit, wherein the output unit is used to input the feature data of the table to be identified into a trained random forest model, wherein the trained random forest model outputs the similarity between the table to be identified and each sample table; and the determination unit is used to determine that the sample table with the greatest similarity to the table to be identified is the sample table corresponding to the table to be identified.
[0080] Optionally, in one embodiment, the device also includes a training module, which is used to construct an initial random forest model before the matching module 203 inputs the feature data of the table to be identified into the trained random forest model; obtain a sample table in the sample table library as a training table; use the feature data of the training table as the input of the initial random forest model, and use the similarity between the training table and the sample table in the sample table library as the output of the initial random forest model, and train the initial random forest model to obtain a trained random forest model.
[0081] Optionally, in one embodiment, the device for identifying the content of a building drawing table further includes: an acquisition module and an update module, wherein the acquisition module is used to acquire correction information of a table data set; the update module is used to construct a sample table according to the correction information and update a preset sample table library.
[0082] Embodiment 3
[0083] This third embodiment also provides a computer device, such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. Figure 3 As shown, the computer device 01 of this embodiment includes at least but is not limited to: a memory 011 and a processor 012 which can be interconnected through a system bus. Figure 3 It should be pointed out that Figure 3 Only a computer device 01 having components memory 011 and processor 012 is shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0084] In this embodiment, the memory 011 (i.e., readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 011 may be an internal storage unit of the computer device 01, such as a hard disk or memory of the computer device 01. In other embodiments, the memory 011 may also be an external storage device of the computer device 01, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card, etc. equipped on the computer device 01. Of course, the memory 011 may also include both the internal storage unit of the computer device 01 and its external storage device. In this embodiment, the memory 011 is generally used to store the operating system and various application software installed on the computer device 01, such as the program code of the device for identifying the content of the architectural drawing table in the second embodiment. In addition, the memory 011 can also be used to temporarily store various types of data that have been output or are to be output.
[0085] In some embodiments, the processor 012 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 012 is generally used to control the overall operation of the computer device 01. In this embodiment, the processor 012 is used to run the program code stored in the memory 011 or process data, such as a method for identifying the content of a table of architectural drawings.
[0086] Embodiment 4
[0087] The fourth embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, and the program implements the corresponding function when executed by the processor. The computer-readable storage medium of this embodiment is used to store a device for identifying the content of a building drawing table, and when executed by the processor, the method for identifying the content of a building drawing table of the first embodiment is implemented.
[0088] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0089] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0091] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for identifying the content of a table in an architectural drawing, characterized in that: include: Identify the forms to be identified on the architectural drawings; Extracting characteristic data of the table to be identified, wherein the characteristic data includes structural characteristics and text characteristics of the table to be identified; In a preset sample table library, a sample table corresponding to the table to be identified is matched according to the feature data; Determine a table data set according to the table structure of the sample table, The step of extracting the structural features of the table to be identified includes: obtaining line primitives in the table to be identified; obtaining the endpoints of the line primitives and the intersections of two or more line primitives as feature points of the table to be identified; and extracting features of the feature points as the structural features, wherein the features of the feature points include the number, angle, line type, color of the line primitives at the feature points and the statistical features of the feature points in the table to be identified. Among them, when the feature point is the endpoint of the line primitive and the endpoint is not an intersection point, the number of line primitives at the feature point is 1; when the feature point is the intersection point of two line primitives, the number of line primitives at the feature point is 2; when the feature point is the intersection point of three line primitives, the number of line primitives at the feature point is 3, and so on. The angle of the line primitive at the feature point includes the angles of all line primitives at the feature point, and the angle of the line primitive refers to the angle between the line primitive and the 0 degree vector. The line type of the line primitive at the feature point includes the line types of all line primitives at the feature point, and the line types include solid lines, dashed lines, and dot-dashed lines. The color of the line primitive at the feature point includes the colors of all line primitives at the feature point, and the color of the line primitive is represented by an RGB color value. The statistical features of the feature points in the table to be identified refer to the statistical features of the feature points of the same category in the table to be identified.
2. The method for identifying the contents of a table in a building drawing according to claim 1, characterized in that: The step of extracting the structural features of the table to be identified includes: Obtaining line graphics elements on the architectural drawing; The relationship features between the line graphics elements in the to-be-identified table and all the line graphics elements on the architectural drawing are calculated as the structural features.
3. The method for identifying the contents of a table of architectural drawings according to claim 1, characterized in that: The step of extracting text features of the table to be identified includes: Obtaining text primitives in the table to be recognized; The text primitives are segmented and filtered to obtain the text features.
4. The method for identifying the contents of a table in an architectural drawing according to claim 1, characterized in that: In a preset sample table library, the step of matching the sample table corresponding to the table to be identified according to the feature data includes: Inputting the feature data of the table to be identified into a trained random forest model, wherein the trained random forest model outputs the similarity between the table to be identified and each of the sample tables; and The sample table having the greatest similarity to the table to be identified is determined as the sample table corresponding to the table to be identified.
5. The method for identifying the contents of a table in a building drawing according to claim 4, characterized in that: Before inputting the feature data of the table to be identified into the trained random forest model, the method further includes: Build an initial random forest model; Acquire the sample form in the sample form library as a training form; The characteristic data of the training table is used as the input of the initial random forest model, and the similarity between the training table and the sample table in the sample table library is used as the output of the initial random forest model. The initial random forest model is trained to obtain the trained random forest model.
6. The method for identifying the contents of a table in an architectural drawing according to claim 1, characterized in that: After the step of determining the table data set according to the table structure of the sample table, the method for identifying the content of the architectural drawing table further includes: Obtaining correction information of the table data set; The sample table is constructed according to the correction information, and the preset sample table library is updated.
7. A device for identifying the contents of a table in an architectural drawing, characterized in that: include: A determination module, used for determining a table to be identified on a building drawing; An extraction module, used for extracting characteristic data of the table to be identified, wherein the characteristic data includes structural characteristics and text characteristics of the table to be identified; A matching module, used for matching a sample table corresponding to the table to be identified in a preset sample table library according to the feature data; an identification module, configured to determine a table data set according to the table structure of the sample table, The extraction module includes: a first acquisition unit, a second acquisition unit and an extraction unit, wherein the first acquisition unit is used to acquire the line primitives in the table to be identified; the second acquisition unit is used to acquire the endpoints of the line primitives and the intersections of two or more line primitives as feature points of the table to be identified; and the extraction unit is used to extract the features of the feature points as structural features, wherein the features of the feature points include the number, angle, line type, color of the line primitives at the feature points and the statistical features of the feature points in the table to be identified, Among them, when the feature point is the endpoint of the line primitive and the endpoint is not an intersection point, the number of line primitives at the feature point is 1; when the feature point is the intersection point of two line primitives, the number of line primitives at the feature point is 2; when the feature point is the intersection point of three line primitives, the number of line primitives at the feature point is 3, and so on. The angle of the line primitive at the feature point includes the angles of all line primitives at the feature point, and the angle of the line primitive refers to the angle between the line primitive and the 0 degree vector. The line type of the line primitive at the feature point includes the line types of all line primitives at the feature point, and the line types include solid lines, dashed lines, and dot-dashed lines. The color of the line primitive at the feature point includes the colors of all line primitives at the feature point, and the color of the line primitive is represented by an RGB color value. The statistical features of the feature points in the table to be identified refer to the statistical features of the feature points of the same category in the table to be identified.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable 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 according to any one of claims 1 to 6 are implemented.