A method and system for identifying image labels

The method and system efficiently and accurately identify drawing labels in construction drawings by parsing text and using machine learning to determine page layout features, addressing the time-consuming and error-prone manual identification of label information.

CN118887696BActive Publication Date: 2024-12-27TECHNOLOGY (CHENGDU) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411285131.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-27
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

Construction drawings often require manual identification of label information, which is time-consuming and prone to errors due to varying label standards across different engineering design software.

Method used

A method and system for identifying drawing labels by parsing the drawing to extract text information, determining key fields and their positions, and using a knowledge base to accurately determine page layout features and label information, leveraging machine learning models for efficient and error-free identification.

Benefits of technology

Enables rapid and accurate identification of drawing label information across different standards, reducing manual effort and errors, and ensuring consistent labeling in construction drawings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118887696B_ABST
    Figure CN118887696B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and system for identifying a drawing label, which relates to the technical field of construction drawings. The method includes parsing a target drawing, obtaining drawing content in the target drawing, and the drawing content includes text information; based on the text information, determining multiple target key fields and corresponding multiple target key field contents; based on the multiple target key field contents and their corresponding position information, determining the page layout characteristics of the target drawing, the page layout characteristics are related to the page layout of the multiple target key field contents corresponding to the multiple target key fields in the target drawing; and based on the page layout characteristics, determining the drawing label information of the target drawing. The present invention can identify target drawings with different drawing label standards, accurately and quickly determine the drawing label information corresponding to the target drawing, and avoid errors caused by manual participation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of construction drawings, and in particular to a drawing label recognition method and system. Background Art

[0002] Construction drawings (e.g., CAD drawings) are widely used in construction projects to guide production and construction. Construction drawings usually contain a label area, which clearly indicates the name, project name, drawing number, version, drawing unit, specialty and other label information of the construction drawings. Since construction drawings can be drawn using different engineering design software, different label standards may be used, resulting in differences in the naming and specific location of the label information in the label area corresponding to different construction drawings, which often require manual identification. This not only wastes a lot of time, but manual identification may also lead to errors.

[0003] Therefore, it is necessary to provide a method and system for image label recognition. Summary of the invention

[0004] One or more embodiments of the present invention provide a method for identifying a drawing label, the method comprising: parsing a target drawing to obtain drawing content in the target drawing, the drawing content comprising text information; based on the text information, determining a plurality of target key fields and corresponding plurality of target key field contents; based on the plurality of target key field contents and their corresponding position information, determining a page layout feature of the target drawing, the page layout feature being related to a page layout of the plurality of target key field contents corresponding to the plurality of target key fields in the target drawing; and determining the drawing label information of the target drawing based on the page layout feature.

[0005] In some embodiments, determining multiple target key fields and corresponding multiple target key field contents based on the text information includes: matching in a preset knowledge base based on the text information to determine the multiple target key field contents, the preset knowledge base includes reference key fields corresponding to a reference graphic label table and reference key field contents corresponding to each of the reference key fields; determining the multiple target key fields based on the multiple target key field contents.

[0006] In some embodiments, the page layout features of the target drawing are determined based on the multiple target key field contents and their corresponding position information, including: sorting the multiple target key field contents based on the position information to obtain multiple pairs of adjacent target key field contents; for each pair of adjacent target key field contents, determining the relative positions between the pair of target key field contents based on their corresponding position information; and determining a data sequence based on the corresponding relative positions of the multiple pairs of adjacent target key field contents as the page layout features.

[0007] In some embodiments, determining the label information of the target drawing based on the page layout characteristics includes: determining a label table based on the page layout characteristics; matching a target range of a target cell in the label table with the text information to determine a target key field value; and determining the label information based on the label table and the target key field value.

[0008] In some embodiments, the preset knowledge base further includes reference page layout features corresponding to a reference image label table, and determining the image label table based on the page layout features includes: matching the page layout features in the preset knowledge base to determine whether there is a reference image label table with reference page layout features identical to the page layout features; in response to the presence of a reference image label table with reference page layout features identical to the page layout features in the preset knowledge base, determining the reference image label table as the image label table.

[0009] In some embodiments, the method further includes: in response to determining that the preset knowledge base does not contain a reference label table whose reference page layout features are the same as the page layout features, determining the label table based on the position information corresponding to the contents of the multiple target key fields.

[0010] In some embodiments, the drawing content also includes a target straight line extending along the X-axis direction and / or the Y-axis direction, and the drawing label table is determined based on the position information corresponding to the multiple target key field contents, including: for each target key field content, based on the position information corresponding to the target key field content, auxiliary straight lines are made along the X-axis direction and the Y-axis direction respectively, and intersection information between the auxiliary straight line and the target straight line is determined, the intersection information includes the intersection point and the vector of each intersecting line segment; based on the intersection information, the drawing label table is determined.

[0011] In some embodiments, the label form includes a left border, a right border, a bottom border, and an upper border, the X-axis direction includes the positive direction of the X-axis and the negative direction of the X-axis, and the Y-axis direction includes the positive direction of the Y-axis and the negative direction of the Y-axis. The left border is determined by the following steps: based on the intersection information, a first set of intersection points along the negative direction of the X-axis is determined; based on the first set of intersection points, a target first intersection point is determined; a straight line passing through the target first intersection point and along the Y-axis direction is determined as the left border. The right border is determined by the following steps: based on the intersection information, a plurality of second intersection point sets along the positive direction of the X-axis are determined; based on the plurality of second intersection point sets, a candidate first intersection point set is determined; based on the candidate first intersection point set, a target second intersection point is determined; a straight line passing through the target second intersection point and along the Y-axis direction is determined as the right border. The lower frame is determined by the following steps: based on the intersection information, determining a third intersection point set along the negative direction of the Y axis; based on the third intersection point set, determining a target third intersection point; and determining a straight line passing through the target third intersection point and along the X axis as the lower frame. The upper frame is determined by the following steps: based on the intersection information, determining a plurality of fourth intersection point sets along the positive direction of the Y axis; based on the plurality of fourth intersection point sets, determining a candidate second intersection point set; based on the candidate second intersection point set, determining a target fourth intersection point; and determining a straight line passing through the target fourth intersection point and along the X axis as the upper frame.

[0012] In some embodiments, determining the label table based on the intersection information also includes: for each target key field content, based on the intersection information, determining the first number of intersections along the X-axis direction and the second number of intersections along the Y-axis direction within the border range; determining the maximum number of rows and the maximum number of columns of the label table based on the first number of intersections and the second number of intersections of the multiple target key field contents; for each target key field content, determining the number of rows occupied by the target key field content based on the second number of intersections and the maximum number of rows of the target key field content; determining the number of columns occupied by the target key field content based on the first number of intersections and the maximum number of columns of the target key field content; determining the row number of the target key field content based on the third number of intersections of the target key field content in the positive direction of the Y-axis; and determining the column number of the target key field content based on the fourth number of intersections of the target key field content in the negative direction of the X-axis.

[0013] In some embodiments, the target cell is determined based on the following steps: based on the number of occupied columns of the target key field content, determining whether there is a verification cell; in response to the existence of the verification cell, judging whether the verification cell is occupied by other target key field contents; in response to the verification cell not being occupied by other target key field contents, determining the verification cell as the target cell; in response to the verification cell being occupied by other target key field contents, determining the cell where the target key field content is located as the target cell; in response to the absence of the verification cell, determining the cell where the target key field content is located as the target cell.

[0014] In some embodiments, the determining whether there is a verification cell based on the number of occupied columns of the target key field content includes: in response to the number of occupied columns being equal to 1, determining that the verification cell exists; in response to the number of occupied columns being not equal to 1, judging whether the number of occupied columns is equal to the maximum number of columns; in response to the number of occupied columns being not equal to the maximum number of columns, determining that the verification cell exists; in response to the number of occupied columns being equal to the maximum number of columns, determining that the verification cell does not exist.

[0015] In some embodiments, the target range of the target cell is determined by the following steps: dividing the target cell along the Y-axis direction into a first part, a second part, and a third part; in response to the target key field content being located in the first part, determining the minimum value of the target cell in the X-axis direction as the minimum value of the target range in the X-axis direction, determining the maximum value of the target cell in the X-axis direction as the maximum value of the target range in the X-axis direction, determining the minimum value of the target cell in the Y-axis direction as the minimum value of the target range in the Y-axis direction, and determining the minimum value of the range of the target key field content in the Y-axis direction as the maximum value of the target range in the Y-axis direction; in response to the target key field content not being located in the first part, determining the maximum value of the range of the target key field content in the X-axis direction as the minimum value of the target range in the X-axis direction, determining the maximum value of the target cell in the X-axis direction as the maximum value of the target range in the X-axis direction, determining the minimum value of the target cell in the Y-axis direction as the minimum value of the target range in the Y-axis direction, and determining the maximum value of the target cell in the Y-axis direction as the maximum value of the target range in the Y-axis direction.

[0016] In some embodiments, the method further includes: updating the preset knowledge base based on the label table and the corresponding page layout features.

[0017] One or more embodiments of the present invention provide a drawing label recognition system, the system comprising: a parsing module, the parsing module being configured to parse a target drawing and obtain drawing content in the target drawing, the drawing content comprising text information; a first determination module, the first determination module being configured to determine a plurality of target key fields and corresponding plurality of target key field contents based on the text information; a second determination module, the second determination module being configured to determine a page layout feature of the target drawing based on the plurality of target key field contents and their corresponding position information, the page layout feature being related to a page layout of the plurality of target key field contents corresponding to the plurality of target key fields in the target drawing; and a third determination module, the third determination module being configured to determine the drawing label information of the target drawing based on the page layout feature.

[0018] According to the above scheme, construction drawings with different drawing label standards can be identified, and the drawing label information corresponding to the construction drawings can be accurately and quickly determined, avoiding errors caused by manual participation. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The present invention will be further described in the form of exemplary embodiments, which will be described in detail by way of the accompanying drawings. These embodiments are not restrictive, and in these embodiments, the same number represents the same structure, wherein:

[0020] Figure 1 is an exemplary module diagram of a label recognition system according to some embodiments of the present invention;

[0021] Figure 2 is an exemplary flow chart of a method for identifying a graphic label according to some embodiments of the present invention;

[0022] Figure 3 is an exemplary flow chart of a process of determining the label information of a target drawing according to some embodiments of the present invention;

[0023] Figure 4 is an exemplary schematic diagram of a process of determining a drawing label table according to some embodiments of the present invention;

[0024] Figure 5 is an exemplary flow chart of a process of determining a row number and a column number of a target key field content according to some embodiments of the present invention;

[0025] Figure 6 is an exemplary schematic diagram of a process of determining a target cell according to some embodiments of the present invention;

[0026] Figure 7a is an exemplary schematic diagram of a target range of a target cell according to some embodiments of the present invention;

[0027] Figure 7b is an exemplary schematic diagram of a target range of a target cell according to other embodiments of the present invention;

[0028] Figure 8 is an exemplary schematic diagram of determining a graphic label table according to some embodiments of the present invention;

[0029] Fig. 9 is an exemplary schematic diagram of a label table according to some embodiments of the present invention. DETAILED DESCRIPTION

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some examples or embodiments of the present invention. For ordinary technicians in this field, the present invention can also be applied to other similar scenarios based on these drawings without creative work. Unless it is obvious from the language environment or otherwise explained, the same reference numerals in the figures represent the same structure or operation.

[0031] It should be understood that the "system", "device", "unit" and / or "module" used herein are a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.

[0032] As shown in the present invention and claims, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular, but also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list, and the method or device may also include other steps or elements.

[0033] The present invention uses a flow chart to illustrate the operations performed by the system according to an embodiment of the present invention. It should be understood that the preceding or following operations are not necessarily performed precisely in order. On the contrary, the various steps may be processed in reverse order or simultaneously. At the same time, other operations may also be added to these processes, or one or more operations may be removed from these processes.

[0034] Different construction drawings may be drawn by different engineering design software, and their corresponding drawing label information may adopt different drawing label standards, resulting in differences in the naming and specific location of the drawing label information, which requires manual identification and processing. This will not only waste a lot of time, but also manual identification may cause errors. Some embodiments of the present invention provide a drawing label recognition method and system, which can identify construction drawings of different drawing label standards, accurately and quickly determine the drawing label information corresponding to the construction drawings, and avoid errors caused by manual participation.

[0035] Figure 1 FIG. 1 is an exemplary module diagram of a label recognition system 100 according to some embodiments of the present invention. In some embodiments, the label recognition system 100 may include a parsing module 110 , a first determination module 120 , a second determination module 130 , and a third determination module 140 .

[0036] The parsing module 110 is configured to parse the target drawing and obtain the drawing content in the target drawing. The drawing content includes text information. For more information about the parsing module, please refer to step S210 and its related description.

[0037] The first determination module 120 is configured to determine multiple target key fields and corresponding multiple target key field contents based on the text information. For more information about the first determination module, please refer to step S220 and its related description.

[0038] The second determination module 130 is configured to determine the page layout characteristics of the target drawing based on the multiple target key field contents and their corresponding position information. The page layout characteristics are related to the page layout of the multiple target key field contents corresponding to the multiple target key fields in the target drawing. For more information about the second determination module, please refer to step S230 and its related description.

[0039] The third determination module 140 is configured to determine the label information of the target drawing based on the page layout characteristics. For more information about the third determination module, see steps S240 and Figure 3-Figure 6 and its related description.

[0040] It should be noted that the above description of the image signature recognition system 100 and its modules is for convenience of description only and does not limit the present invention to the scope of the embodiments. It is understandable that, after understanding the principle of the system, those skilled in the art may arbitrarily combine the modules or form a subsystem to connect with other modules without deviating from the principle. In some embodiments, Figure 1The parsing module 110, the first determination module 120, the second determination module 130 and the third determination module 140 disclosed in the disclosure may be different modules in a system, or one module may realize the functions of two or more of the above modules. For example, each module may share a storage module, or each module may have its own storage module. Such variations are all within the protection scope of the present invention.

[0041] Figure 2 is an exemplary flow chart of a method for identifying a label according to some embodiments of the present invention. Figure 2 As shown, the label recognition process 200 may include the following steps.

[0042] Step S210, parsing the target drawing to obtain the drawing content in the target drawing.

[0043] The target drawing refers to the drawing that needs to be identified.

[0044] The drawing content refers to the information contained on the target drawing. For example, the drawing content may include line segments, text, tables, etc. on the target drawing. In some embodiments, the drawing content includes text information and a target straight line extending along the X-axis direction and / or the Y-axis direction. In the present invention, the X-axis direction refers to the horizontal direction of the target drawing, the positive direction of the X-axis refers to the direction from the left side of the target drawing to the right, and the negative direction of the X-axis refers to the direction from the right side of the target drawing to the left; the Y-axis direction refers to the vertical direction of the target drawing, the positive direction of the Y-axis refers to the direction from the bottom edge of the target drawing to the top edge, and the negative direction of the Y-axis refers to the direction from the top edge of the target drawing to the bottom edge.

[0045] The text information refers to information related to the text in the target drawing, for example, the text information may include the text content corresponding to the text, the location point information corresponding to the text, and the layer to which the text belongs.

[0046] The location point information corresponding to the text refers to the coordinate position of the text on the target drawing. In some embodiments, a point located at any position on the text can be selected as the location point corresponding to the text, and the coordinate position of the location point can be determined as the location point information corresponding to the text. As an example only, a point located at the lower left corner of the text can be selected as the location point corresponding to the text, and the coordinate position of the location point can be determined as the location point information corresponding to the text.

[0047] In some embodiments, the target drawing may be processed by an image recognition algorithm or any other suitable algorithm to extract text content and location point information corresponding to the text content in the target drawing and determine it as text information.

[0048] The target straight line refers to the line segment on the target drawing that meets the preset line segment conditions.

[0049] In some embodiments, the target drawing may be processed by an image recognition algorithm or any other suitable algorithm to extract all line segments in the target drawing, and the line segments that meet the line segment preset conditions may be determined as the target straight line. The line segment preset conditions may include the following conditions:

[0050] (1) The line segment is parallel to the X-axis or the Y-axis; (2) The length of the line segment is less than a preset length (for example, the preset length is a default value, a preset value, a user input value, etc.). In some embodiments, the line segment preset condition may only include the above condition (1).

[0051] Step S220: determining a plurality of target key fields and corresponding contents of a plurality of target key fields based on the text information.

[0052] The target key field refers to the key field included in the target drawing, and the target key field content refers to the key field content included in the target drawing. Among them, the key field can also be called a standard field or a standard name of a field. A key field may have different names in different drawings, and these names can be called key field content. For example, the key field is the drawing name, and its corresponding name in different drawings (i.e., key field content) can include drawing name, drawing name, title, Title, etc.

[0053] In some embodiments, a match can be performed in a preset knowledge base based on text information to determine multiple target key field contents; and multiple target key fields can be determined based on the multiple target key field contents.

[0054] The preset knowledge base includes multiple reference drawing label tables, and each of the multiple reference drawing label tables has a corresponding reference key field and the reference key field content corresponding to each reference key field. In some embodiments, the reference drawing label table and its corresponding information can be generated during the processing of historical drawings. In some embodiments, the reference drawing label table and its corresponding information can be input and / or confirmed by the user. In some embodiments, the preset knowledge base further includes reference page layout features corresponding to the reference drawing label table. For more information about the page layout features, please refer to step S230 and its related description.

[0055] In some embodiments, based on the location point information and text content in the text information, the reference key field contents at the same position corresponding to multiple reference image tag tables of a preset knowledge base can be traversed, and the reference key field contents that are the same as the text content corresponding to the text information can be determined as the target key field contents, and the location point information corresponding to the text content can be determined as the location information corresponding to the target key field contents.

[0056] In some embodiments, after the target key field content is determined, the target key field can be determined based on the correspondence between the key field content and the key field. In some embodiments, based on the determined multiple target key field contents, multiple corresponding reference key fields in the preset knowledge base can be determined through the correspondence, and the multiple reference key fields can be determined as the corresponding multiple target key fields.

[0057] In some embodiments of the present invention, by matching text information with a preset knowledge base, the target key field content and the corresponding target key field in the text information can be quickly acquired.

[0058] In some embodiments, the text information can be identified and processed by a semantic model to determine the contents of multiple target key fields and the corresponding multiple target key fields. The semantic model is a trained machine learning model, such as a deep neural network (DNN) model.

[0059] In some embodiments of the present invention, text information is processed through a semantic model to determine multiple target key field contents and corresponding multiple target key fields. The influence of multiple factors can be considered at the same time, making the determination of the target key field contents and the corresponding target key fields more efficient and accurate, and avoiding errors caused by manual determination.

[0060] Step S230, determining the page layout characteristics of the target drawing based on the contents of multiple target key fields and their corresponding position information.

[0061] The position information refers to the coordinate position of the target key field content on the target drawing. In some embodiments, a point located at any position on the target key field content can be selected as a representative position point corresponding to the target key field content, and the coordinate position of the representative position point is determined as the position information corresponding to the target key field content. As an example only, a point located at the lower left corner of the target key field content can be selected as a representative position point corresponding to the target key field content, and the coordinate position of the representative position point is determined as the position information corresponding to the target key field content.

[0062] Page layout features refer to the characteristic parameters used to characterize the label table used in the target drawing.

[0063] In some embodiments, the page layout feature is related to the page layout of multiple target key field contents corresponding to multiple target key fields in the target drawing. For example, the page layout feature can reflect the position information of the target key field contents in the target drawing and the relative position with other target key field contents.

[0064] In some embodiments, the page layout features of the target drawing can be determined through a preset data comparison table based on multiple target key field contents and their corresponding position information. The preset data comparison table records multiple key field contents and their corresponding position information corresponding to different page layout features. The preset data comparison table can be preset based on prior knowledge or historical data.

[0065] In some embodiments, multiple target key field contents can be sorted based on position information to obtain multiple pairs of adjacent target key field contents; for each pair of adjacent target key field contents, the relative positions between the pair of target key field contents are determined based on their corresponding position information; based on the corresponding relative positions of multiple pairs of adjacent target key field contents, a data sequence is determined as a page layout feature.

[0066] In some embodiments, multiple target field contents can be sorted based on the location information by a preset sorting rule. As an example only, the preset sorting rule can be sorting in ascending order based on the size of the Y-axis coordinates in the location information corresponding to the multiple target key field contents. Further, for multiple target key field contents with the same Y-axis coordinate, they can be sorted in ascending order based on the size of the X-axis coordinates in the corresponding location information to obtain sorted target key field contents. Furthermore, multiple pairs of adjacent target key field contents can be obtained in the sorted target key field contents.

[0067] The relative position can be represented by parameters that characterize the positional relationship between adjacent target key field contents.

[0068] In some embodiments, for each pair of adjacent target key field contents, the vector between the representative position points corresponding to the two target key field contents can be calculated based on their corresponding position information, and the calculated vector is determined as the relative position between the two target key field contents. For example, the position coordinates of the representative position point of the first target key field content a are (x1, y1), and the position coordinates of the representative position point of the adjacent second target key field content b are (x2, y2), then the relative position between the two target key field contents is .

[0069] In some embodiments, for each pair of adjacent target key field contents, the representative position points of the target key field contents in the pair of target key field contents can be determined; the representative position points corresponding to the pair of target key field contents are connected to obtain representative segment lines; and the shape features of the representative segment lines are calculated as the relative positions of the pair of adjacent target key field contents.

[0070] The representative location point refers to the point on the target key field content that is selected as a reference.

[0071] In some embodiments, for multiple pairs of adjacent target key field contents, points located at the same position on each target key field content may be selected and determined as representative position points corresponding to the target key field content.

[0072] The shape feature of the representative line segment refers to a parameter used to characterize the shape of the representative line segment. For example, the shape feature of the representative line segment may include the length of the representative line segment, the angle between the representative line segment and the positive direction of the x-axis, etc.

[0073] In some embodiments, for each representative line segment, the relative distance between the two representative position points corresponding to the representative line segment can be calculated and determined as the length of the representative line segment, and the angle between the representative line segment and the positive direction of the X-axis is calculated to obtain the shape feature of the representative line segment, and the shape feature is determined as the relative position of the corresponding adjacent target key field content. For example, the length of the representative line segment between the adjacent fourth target key field content d and the fifth target key field content e is L, and the angle between the representative line segment and the positive direction of the X-axis is α, then the relative position between the two target key field contents is (L, α).

[0074] The data sequence is a sequence of parameters that characterize the relative relationship between multiple pairs of adjacent target key field contents. For example, the relative position of the first target key field content a and the adjacent second target key field content b is , the relative position of the second target key field content b and the adjacent third target key field content c is , then the data sequence can be expressed as For another example, the relative position between the fourth target key field content d and the adjacent fifth target key field content e is (L, α), and the relative position between the fifth target key field content e and the sixth adjacent target key field content f is (M, β), then the data sequence can be expressed as {(de, L, α), (ef, M, β)}.

[0075] In some embodiments, a data sequence corresponding to the contents of all target key fields on a target drawing may be determined as a page layout feature corresponding to the target drawing.

[0076] Step S240: determining the label information of the target drawing based on the page layout characteristics.

[0077] The label information refers to information related to the label in the target drawing. For example, the label information may include the drawing name, project name, drawing number, professional and sub-item name, etc. In some embodiments, the label information may include a label form extracted from the target drawing and the label content (such as the target key field value described later), wherein the label content may be filled in the corresponding position of the label form. In some embodiments, the position of the label content in the label form may be adjusted so that there is no intersection or occlusion between text and text, or between text and lines.

[0078] In some embodiments, the page layout features may be processed by a label determination model to determine the label information of the target drawing, wherein the label determination model is a trained machine learning model.

[0079] In some embodiments, a label table can be determined based on page layout features; a target range of a target cell in the label table can be matched with text information to determine a target key field value; and label information can be determined based on the label table and the target key field value. For more information about this embodiment, see Figure 3 and its related description.

[0080] In some embodiments of the present invention, the page layout characteristics of the target drawing are determined by the contents of multiple target key fields contained in the target drawing and the corresponding multiple target key fields, so that target drawings with different drawing label standards can be identified, and the drawing label information corresponding to the target drawing can be accurately and quickly determined, avoiding errors caused by human participation.

[0081] Figure 3 FIG. 3 is an exemplary flow chart of a process of determining the label information of a target drawing according to some embodiments of the present invention. In some embodiments, the label information determination process 300 may be used to implement step S240. Figure 3 As shown, the image label information determination process 300 includes the following steps.

[0082] Step S310, determining a label table based on the page layout characteristics.

[0083] The graphic label form refers to a form that has not yet filled in the target key field value and only contains the target key field content. The graphic label form may include a left border, a right border, a lower border, and an upper border. Among them, the target key field value refers to the specific information corresponding to the target key field content. For more information about the target key field value, please refer to step S320 and its related description.

[0084] In some embodiments, the image label table can be determined based on the page layout characteristics through a preset data comparison table. The preset data comparison table records the page layout characteristics corresponding to different image label tables. The preset data comparison table can be preset based on prior knowledge or historical data.

[0085] In some embodiments, a match can be made in a preset knowledge base based on the page layout feature to determine whether there is a reference image label table whose reference page layout feature is the same as the page layout feature; in response to the presence of a reference image label table whose reference page layout feature is the same as the page layout feature in the preset knowledge base, the reference image label table is determined as the image label table. For more information about this embodiment, see Figure 4 and its related description.

[0086] Step S320, matching the target range of the target cell in the label table with the text information to determine the target key field value.

[0087] The target cell refers to the cell in the label table that needs to be filled with the target key field value. For a certain target key field content, the target cell and the cell where the target key field content is located can be the same cell, in which case the target key field content and the target key field value are filled in the same cell; or the target cell and the cell where the target key field content is located can be different cells, in which case the target key field content and the target key field value are filled in different cells.

[0088] In some embodiments, the storage device may pre-store the correspondence between different graphic label tables and target cells, and the storage device may be accessed based on the determined graphic label table to determine the target cell through the correspondence.

[0089] In some embodiments, it is possible to determine whether there is a check cell based on the number of columns occupied by the target key field content; in response to the existence of a check cell and the check cell is not occupied by other target key field contents, the check cell is determined as the target cell; in response to the existence of a check cell and the check cell is occupied by other target key field contents, the cell where the target key field content is located is determined as the target cell; in response to the absence of a check cell, the cell where the target key field content is located is determined as the target cell. For more information about this embodiment, please refer to Figure 6 and its related description.

[0090] The target range refers to the range of the target area in the target drawing for filling in the target key field value in the target cell. In some embodiments, the target range can be represented by the coordinate range (e.g., maximum value and minimum value) of the target area in the X-axis direction and the Y-axis direction. In some embodiments, the range of the target cell or a part thereof can be determined as the target range.

[0091] In some embodiments, the target cell may be divided into a first part, a second part, and a third part along the Y-axis direction. For example, the target cell may be equally divided into a first part, a second part, and a third part along the Y-axis direction.

[0092] Further, it can be determined whether the target key field content is located in the first part. For example, the ratio of the range of the target key field content in the first part to the range of the target key field content can be calculated, and if the ratio is greater than a ratio threshold, it is determined that the target key field content is located in the first part. The ratio threshold can be a default value, a preset value, a user input value, etc.

[0093] In some embodiments, in response to the target key field content being located in the first part, the minimum value of the target cell in the X-axis direction is determined as the minimum value of the target range in the X-axis direction, the maximum value of the target cell in the X-axis direction is determined as the maximum value of the target range in the X-axis direction, the minimum value of the target cell in the Y-axis direction is determined as the minimum value of the target range in the Y-axis direction, and the minimum value of the range of the target key field content in the Y-axis direction is determined as the maximum value of the target range in the Y-axis direction.

[0094] Just as an example, Figure 7a FIG. 1 is an exemplary schematic diagram of a target range of a target cell according to some embodiments of the present invention. Figure 7a As shown, the target cell is divided into a first part 721, a second part 722 and a third part 723 along the Y-axis direction. The shaded part is the range where the seventh target key field content 710 is located, and the seventh target key field content 710 is located in the first part 721 of the target cell. At this time, the seventh target key field content 710 is located in the upper part of the target cell, and the target key field value is located below the seventh target key field content 710. Then, the minimum value of the target cell in the X-axis direction (i.e., the value corresponding to the first axis 741 on the X-axis) is the minimum value of the target range in the X-axis direction, the maximum value of the target cell in the X-axis direction (i.e., the value corresponding to the second axis 742 on the X-axis) is the maximum value of the target range in the X-axis direction, the minimum value of the target cell in the Y-axis direction (i.e., the value corresponding to the third axis 732 on the Y-axis) is the minimum value of the target range in the Y-axis direction, and the minimum value of the range of the seventh target key field content 710 in the Y-axis direction (i.e., the value corresponding to the fourth axis 731 on the Y-axis) is determined as the maximum value of the target range in the Y-axis direction. The final target range is Figure 7a The range of the first light shaded portion 780 in FIG.

[0095] In some embodiments, in response to the target key field content not being located in the first part, the maximum value of the target key field content in the X-axis direction is determined as the minimum value of the target range in the X-axis direction, the maximum value of the target cell in the X-axis direction is determined as the maximum value of the target range in the X-axis direction, the minimum value of the target cell in the Y-axis direction is determined as the minimum value of the target range in the Y-axis direction, and the maximum value of the target cell in the Y-axis direction is determined as the maximum value of the target range in the Y-axis direction.

[0096] Just as an example, Figure 7b FIG. 1 is an exemplary schematic diagram of a target range of a target cell according to some other embodiments of the present invention. Figure 7b As shown, the target cell is divided into a first part 721, a second part 722 and a third part 723 along the Y-axis direction. The shaded part is the range where the eighth target key field content 750 is located, and the eighth target key field content 750 is not located in the first part 721 of the target cell. At this time, the eighth target key field content 750 is located on the left of the target cell, and the target key field value is located on the right of the eighth target key field content 750. Then, the maximum value of the range of the eighth target key field content 750 in the X-axis direction (i.e., the value corresponding to the fifth axis 771 on the X-axis) is the minimum value of the target range in the X-axis direction, the maximum value of the target cell in the X-axis direction (i.e., the value corresponding to the second axis 742 on the X-axis) is the maximum value of the target range in the X-axis direction, the minimum value of the target cell in the Y-axis direction (i.e., the value corresponding to the third axis 732 on the Y-axis) is the minimum value of the target range in the Y-axis direction, and the maximum value of the target cell in the Y-axis direction (i.e., the value corresponding to the sixth axis 761 on the Y-axis) is the maximum value of the target range in the Y-axis direction. The target range finally obtained is Figure 7b The range of the second light shaded portion 790 in FIG.

[0097] The target key field value refers to the specific information corresponding to the target key field content. For example, if the target key field content is "drawing name", the target key field value can be "house structure drawing". For another example, if the target key field content is "person in charge name", the key field value can be "Zhang San".

[0098] In some embodiments, the text content at the same position in the text information can be determined based on the target range of the target cell, and the text content can be determined as the target key field value corresponding to the target cell.

[0099] Step S330, determining the image label information based on the image label table and the target key field value.

[0100] In some embodiments, the target key field value may be filled into the target range of the corresponding target cell in the tag table to obtain the tag information.

[0101] Figure 4 is an exemplary schematic diagram of a process of determining a label table according to some embodiments of the present invention.

[0102] In some embodiments, Figure 4 As shown, a match can be made in the preset knowledge base 420 based on the page layout feature 410, and step S430 is executed to determine whether there is a reference image label table with the same reference page layout feature as the page layout feature; in response to the presence of a reference image label table with the same reference page layout feature as the page layout feature in the preset knowledge base, step S440 is executed to determine the reference image label table as the image label table.

[0103] In some embodiments, the vector distances between the page layout feature 410 and the reference page layout features in the preset knowledge base 420 may be calculated respectively, and the reference image label table corresponding to the reference page layout feature with a vector distance of zero may be determined as the image label table.

[0104] In some embodiments, in response to determining that the preset knowledge base does not contain a reference image label table having the same reference page layout characteristics as the page layout characteristics, step S450 is executed to determine the image label table based on position information corresponding to the contents of multiple target key fields.

[0105] In some embodiments, the location information corresponding to the contents of multiple target key fields can be processed by a label table determination model to determine the label table, wherein the label table determination model is a machine learning model.

[0106] In some embodiments, for each target key field content, auxiliary straight lines can be drawn along the X-axis and Y-axis directions based on the position information corresponding to the target key field content to determine the intersection information between the auxiliary straight lines and the target straight line; based on the intersection information, the label table is determined.

[0107] The intersection information refers to information related to the intersection point of the auxiliary straight line and the target straight line. In some embodiments, the intersection information includes the intersection point and its corresponding coordinate position. For example only, Figure 8 is an exemplary schematic diagram of determining a graphic label table according to some embodiments of the present invention, such as Figure 8 As shown in the figure, the gray shadow is the target key field content, the solid line is the target straight line in the target drawing, and the point in the lower left corner of the target key field content is uniformly selected as the representative position point. Auxiliary straight lines are drawn along the X-axis direction and the Y-axis direction based on the representative position point (i.e. Figure 8 ), and obtain the intersection point of the auxiliary straight line and the target straight line.

[0108] In some embodiments, the X-axis direction includes an X-axis positive direction and an X-axis negative direction, and the Y-axis direction includes a Y-axis positive direction and a Y-axis negative direction.

[0109] In some embodiments, the left border of the label table is determined by the following steps: based on the intersection information, determine the first intersection point set along the negative direction of the X-axis; based on the first intersection point set, determine the target first intersection point; and determine the straight line passing through the target first intersection point and along the Y-axis direction as the left border.

[0110] The first intersection point set refers to a set of multiple first intersection points. The first intersection point refers to the intersection point closest to the representative position point of the target key field content in the negative direction of the X axis. For example, Figure 8 As shown, the intersection points of the first representative position point A1 in the negative direction of the X-axis are A2 and A3. Among them, A2 is closest to the first representative position point A1 and is the first intersection point corresponding to the first representative position point A1. Similarly, the first intersection point corresponding to the second representative position point B1 is B2, the first intersection point corresponding to the third representative position point C1 is C2, and the first intersection point corresponding to the fourth representative position point D1 is D2. In other words, the first intersection point set is {A2, B2, C2, D2}.

[0111] The target first intersection point refers to the first intersection point selected. In some embodiments, the first intersection points in the first intersection point set can be sorted in ascending order based on the size of the X-axis coordinate of the first intersection point, and the first intersection point with the smallest X-axis coordinate is selected and determined as the target first intersection point, and the straight line passing through the target first intersection point and along the Y-axis direction is determined as the left border. For example only, Figure 8 As shown, the first intersection point set is {A2, B2, C2, D2}, the first intersection points with the smallest X-axis coordinates include A2, B2 and C2, and the target first intersection point is A2, B2 or C2. The first straight line 810 passing through A2, B2 or C2 and along the Y-axis direction is determined as the left frame.

[0112] In some embodiments, the right border of the label table is determined by the following steps: based on the intersection information, determine multiple second intersection point sets along the positive direction of the X-axis; based on the multiple second intersection point sets, determine a candidate first intersection point set; based on the candidate first intersection point set, determine the target second intersection point; and determine the straight line passing through the target second intersection point and along the Y-axis direction as the right border.

[0113] The second intersection point set refers to a set of multiple second intersection points. The second intersection point refers to the intersection point in the positive direction of the X-axis corresponding to the representative position point of the target key field content. For example, Figure 8As shown, the intersection points of the first representative position point A1 in the positive direction of the X axis are A4 and A6, so the second intersection point set corresponding to the first representative position point A1 is {A4, A6}. Similarly, the second intersection point set corresponding to the second representative position point B1 is {B3, D2, D3, D4, D8}, the second intersection point set corresponding to the third representative position point C1 is {C3, C4, C6}, and the second intersection point set corresponding to the fourth representative position point D1 is {D3, D4, D8}.

[0114] The candidate first intersection point set refers to a set consisting of multiple candidate first intersection points, wherein the candidate first intersection point refers to an intersection point preliminarily selected from multiple second intersection point sets.

[0115] In some embodiments, the X-axis coordinates of all second intersection points in each second intersection point set may be counted, and the X-axis coordinates that exist in each second intersection point set may be selected, and the intersection point corresponding to the X-axis coordinate may be determined as the candidate first intersection point. Figure 8 As shown, multiple second intersection point sets include {A4, A6}, {B3, D2, D3, D4, D8}, {C3, C4, C6} and {D3, D4, D8}, and the X-axis coordinates existing in each second intersection point set are the X-axis coordinate corresponding to A4 (or D4 or C4) and the X-axis coordinate corresponding to A6 (or D8 or C6), then A4 (or D4 or C4) and A6 (or D8 or C6) are candidate first intersection points, and the candidate first intersection point set is {A4, A6}.

[0116] The target second intersection point refers to the candidate first intersection point that is finally selected. In some embodiments, the candidate first intersection points in the candidate first intersection point set can be sorted in ascending order based on the size of the X-axis coordinates of the candidate first intersection points, and the candidate first intersection point with the smallest X-axis coordinate is selected and determined as the target second intersection point, and the straight line passing through the target second intersection point and along the Y-axis direction is determined as the right frame. For example only, Figure 8 As shown, the candidate first intersection point set is {A4, A6}, the candidate first intersection point with the smallest X-axis coordinate is A4, and the target second intersection point is A4. The second straight line 820 passing through A4 and along the Y-axis direction is determined as the right frame.

[0117] In some embodiments, the bottom border of the label table is determined by the following steps: based on the intersection information, determine the third intersection point set along the negative direction of the Y axis; based on the third intersection point set, determine the target third intersection point; and determine the straight line passing through the target third intersection point and along the X axis as the bottom border.

[0118] The third intersection point set refers to a set of multiple third intersection points. The third intersection point refers to the intersection point farthest from the representative position point of the target key field content in the negative direction of the Y axis. For example, Figure 8 As shown, the intersection points of the first representative position point A1 in the negative direction of the Y axis are A7, B4 and C5, among which C5 is the farthest from the first representative position point A1 and is the third intersection point. Similarly, the third intersection point corresponding to the second representative position point B1 is C5, the third intersection point corresponding to the third representative position point C1 is C5, and the third intersection point corresponding to the fourth representative position point D1 is D7, so the third intersection point set is {C5, D7}.

[0119] The target third intersection point refers to the selected third intersection point. In some embodiments, the third intersection points in the set of third intersection points can be sorted in ascending order based on the size of the Y-axis coordinates of the third intersection points, and the third intersection point with the smallest Y-axis coordinate is selected and determined as the target third intersection point, and the straight line passing through the target third intersection point and along the X-axis direction is determined as the bottom border. For example only, Figure 8 As shown, the third intersection point set is {C5, D7}, the third intersection points with the smallest Y-axis coordinates include C5 and D7, and the target third intersection point is C5 or D7. The third straight line 830 passing through C5 or D7 and along the X-axis direction is determined as the lower frame.

[0120] In some embodiments, the upper border of the label table is determined by the following steps: based on the intersection information, determine multiple fourth intersection point sets along the positive direction of the Y-axis; based on the multiple fourth intersection point sets, determine a candidate second intersection point set; based on the candidate second intersection point set, determine the target fourth intersection point; and determine the straight line passing through the target fourth intersection point and along the X-axis direction as the upper border.

[0121] The fourth intersection point set refers to a set consisting of multiple fourth intersection points. The fourth intersection point refers to the intersection point in the positive direction of the Y axis corresponding to the representative position point of the target key field content. For example, Figure 8 As shown, the intersection points of the first representative position point A1 in the positive direction of the Y axis are A5 and A8, so the fourth intersection point set corresponding to the first representative position point A1 is {A5, A8}. Similarly, the fourth intersection point set corresponding to the second representative position point B1 is {A7, A5, A8}, the fourth intersection point set corresponding to the third representative position point C1 is {B4, A7, A5, A8}, and the fourth intersection point set corresponding to the fourth representative position point D1 is {D9, D5, D6}.

[0122] The candidate second intersection point set refers to a set consisting of multiple candidate second intersection points. Among them, the candidate second intersection point refers to the intersection point preliminarily selected from multiple fourth intersection point sets. In some embodiments, the Y-axis coordinates of all fourth intersection points in each fourth intersection point set can be counted, and the Y-axis coordinates that exist in each fourth intersection point set can be selected, and the intersection point corresponding to the Y-axis coordinate can be determined as the candidate second intersection point. Just as an example, Figure 8 As shown, multiple fourth intersection point sets include {A5, A8}, {A7, A5, A8}, {B4, A7, A5, A8} and {D9, D5, D6}, and the Y-axis coordinates existing in each fourth intersection point set are the Y-axis coordinate corresponding to A5 (or D5) and the Y-axis coordinate corresponding to A8 (or D6), then A5 (or D5) and A8 (or D6) are candidate second intersection points, and the candidate second intersection point set is {A5, A8}.

[0123] The target fourth intersection point refers to the candidate second intersection point that is finally selected. In some embodiments, the candidate second intersection points in the candidate second intersection point set can be sorted in ascending order based on the size of the Y-axis coordinates of the candidate second intersection points, and the candidate second intersection point with the smallest Y-axis coordinate is selected and determined as the target fourth intersection point, and the straight line passing through the target fourth intersection point and along the X-axis direction is determined as the upper border. For example only, Figure 8 As shown, the candidate second intersection point set is {A5, A8}, the candidate second intersection point with the smallest Y-axis coordinate is A5, and the target fourth intersection point is A5. The fourth straight line 840 passing through A5 and along the X-axis direction is determined as the upper frame.

[0124] In some embodiments, when the preset knowledge base does not contain a reference drawing label table whose reference page layout features are the same as the page layout features of the target drawing, the preset knowledge base can be updated based on determining the drawing label table and the corresponding page layout features of the target drawing. Specifically, the drawing label table and the page layout features of the target drawing can be stored in the preset knowledge base as the reference drawing label table and the corresponding reference page layout features. In some embodiments, the target key field and the target key field content of the target drawing can be stored in the preset knowledge base as the reference key field and the reference key field content.

[0125] In some embodiments of the present invention, the image label table and its corresponding information that do not exist in the preset knowledge base are updated and stored in the preset knowledge base, which can make the preset knowledge base more complete and improve the efficiency of subsequent image label table analysis.

[0126] Figure 5 is an exemplary flow chart of a process for determining the row number and column number of the target key field content according to some embodiments of the present invention. Figure 5As shown, the process 500 of determining row numbers and column numbers may include the following steps.

[0127] Step S510: for each target key field content, based on the intersection information, determine the number of first intersections along the X-axis direction and the number of second intersections along the Y-axis direction within the bounding box.

[0128] The first intersection number refers to the number of intersections of the target key field content within the border along the X-axis direction.

[0129] In some embodiments, based on the intersection information, the number of intersection points within the frame whose X-axis coordinates are the same as the X-axis coordinates of the representative position points corresponding to the target key field content can be counted and determined as the first number of intersection points. Figure 8 As shown, for the second representative position point B1 of the target key field content, within the bounding box, the intersection points whose X-axis coordinates are the same as the X-axis coordinates of the second representative position point B1 include B2, B3, D2, D3 and D4, then the number of first intersection points corresponding to the second representative position point B1 is 5.

[0130] The second number of intersection points refers to the number of intersection points of the target key field content within the border range along the Y-axis direction.

[0131] In some embodiments, based on the intersection information, the number of intersection points within the frame whose Y-axis coordinates are the same as the Y-axis coordinates of the representative position points corresponding to the target key field content can be counted and determined as the second number of intersection points. Figure 8 As shown, for the second representative position point B1 of the target key field content, within the border range, the intersection points whose Y-axis coordinates are the same as the Y-axis coordinates of the second representative position point B1 include A5, A7, B4 and C5, and the number of second intersection points corresponding to the second representative position point B1 is 4.

[0132] Step S520, determining the maximum number of rows and the maximum number of columns of the label table based on the first number of intersections and the second number of intersections of the contents of the multiple target key fields.

[0133] In some embodiments, the first intersection numbers of the contents of multiple target key fields can be sorted from large to small, the largest first intersection number is selected, and the maximum number of columns of the label table is calculated by the formula p1=q1-1, where p1 is the maximum number of columns of the label table, and q1 is the selected first intersection number.

[0134] In some embodiments, the second intersection numbers of the contents of multiple target key fields can be sorted in descending order, the largest second intersection number is selected, and the maximum number of rows of the label table is calculated by the formula p2=q2-1, where p2 is the maximum number of rows of the label table, and q2 is the selected second intersection number.

[0135] For each target key field content, steps S530 - S560 may be performed thereon to determine the row number and column number corresponding to the target key field content.

[0136] Step S530: determining the number of rows occupied by the target key field content based on the second intersection number and the maximum number of rows of the target key field content.

[0137] In some embodiments, the maximum number of rows in the label table can be calculated by the formula m2=p2-n2+2, where m2 is the number of rows occupied by the target key field content, p2 is the maximum number of rows in the label table, and n2 is the number of second intersection points corresponding to the target key field content.

[0138] Step S540: determining the number of columns occupied by the target key field content based on the first intersection number and the maximum number of columns of the target key field content.

[0139] In some embodiments, the maximum number of columns of the label table can be calculated by the formula m1=p1-n1+2, where m1 is the number of columns occupied by the target key field content, p1 is the maximum number of columns of the label table, and n1 is the number of first intersections corresponding to the target key field content.

[0140] Step S550: determining the row number of the target key field content based on the number of third intersections of the target key field content in the positive direction of the Y axis.

[0141] The third intersection point number refers to the number of intersection points of the target key field content within the border range along the positive direction of the Y axis.

[0142] In some embodiments, based on the intersection points corresponding to the second number of intersection points, the number of intersection points in the positive direction of the Y axis can be counted and determined as the third number of intersection points. Figure 8 As shown, for the second representative position point B1 of the target key field content, the intersection points corresponding to its second intersection point quantity include A5, A7, B4 and C5, and the intersection points in the positive direction of the Y-axis include A5 and A7, then the third intersection point quantity corresponding to the second representative position point B1 is 2.

[0143] In some embodiments, the third intersection number of the target key field can be determined as the row number of the target key field content. Figure 8As shown, the number of the third intersection points corresponding to the second representative position point B1 of the target key field content is 2, and the row number of the target key field content is the 2nd row.

[0144] Step S560: Determine the column number of the target key field content based on the number of fourth intersections of the target key field content in the negative direction of the X-axis.

[0145] The fourth intersection point number refers to the number of intersection points of the target key field content within the border range along the negative direction of the X-axis.

[0146] In some embodiments, based on the intersection points corresponding to the first number of intersection points, the number of intersection points in the negative direction of the X-axis can be counted and determined as the fourth number of intersection points. Figure 8 As shown, for the second representative position point B1 of the target key field content, the intersection points corresponding to the first number of intersection points include B2, B3, D2, D3 and D4, and the intersection points in the negative direction of the X-axis include B2, then the fourth number of intersection points corresponding to the second representative position point B1 is 1.

[0147] In some embodiments, the fourth intersection number of the target key field can be determined as the column number of the target key field content. Figure 8 As shown, the number of the fourth intersection points corresponding to the second representative position point B1 of the target key field content is 1, and the column number of the target key field content is the 1st column.

[0148] It should be noted that the above description of the image label recognition process 200, the image label information determination process 300, and the row number and column number determination process 500 is only for example and explanation, and does not limit the scope of application of the present invention. For those skilled in the art, various modifications and changes can be made to the image label recognition process 200, the image label information determination process 300, and the row number and column number determination process 500 under the guidance of the present invention. However, these modifications and changes are still within the scope of the present invention.

[0149] Figure 6 is an exemplary schematic diagram of a process of determining a target cell according to some embodiments of the present invention.

[0150] In some embodiments, Figure 6 As shown, whether there is a check cell can be determined based on the number of columns occupied by the target key field content 610.

[0151] The check cell refers to the cell where the target key field value corresponding to the target key field content is located. For example, the check cell may be a cell located to the right of the cell where the target key field content is located.

[0152] In some embodiments, step S620 is executed to determine whether the number of occupied columns is equal to 1. In response to the number of occupied columns being equal to 1, step S630 is executed to determine whether a check cell exists; in response to the number of occupied columns not being equal to 1, step S640 is executed to determine whether the number of occupied columns is equal to the maximum number of columns; in response to the number of occupied columns not being equal to the maximum number of columns, step S650 is executed to determine whether a check cell exists; in response to the number of occupied columns being equal to the maximum number of columns, step S660 is executed to determine whether a check cell does not exist.

[0153] Just as an example, Fig. 9 FIG. 1 is an exemplary schematic diagram of a label table according to some embodiments of the present invention. Fig. 9 As shown, the maximum number of columns in the label table is 4, and the number of columns occupied by the ninth target key field content 920 (or the tenth target key field content 960) is 1, so it is determined that there is a first check cell 940. The number of columns occupied by the eleventh target key field content 930 is 3, and it is not equal to the maximum number of columns of 4, so it is determined that there is a second check cell 950. The number of columns occupied by the twelfth target key field content 910 is 4, and it is equal to the maximum number of columns of 4, so it is determined that there is no check cell.

[0154] In some embodiments, Figure 6 As shown, in response to the existence of a verification cell, step S670 is executed to determine whether the verification cell is occupied by other target key field contents; in response to the verification cell not being occupied by other target key field contents, step S680 is executed to determine the verification cell as the target cell; in response to the verification cell being occupied by other target key field contents, step S690 is executed to determine the cell where the target key field content is located as the target cell; in response to the absence of a verification cell, the cell where the target key field content is located is determined as the target cell.

[0155] Just as an example, Fig. 9 As shown, the ninth target key field content 920 and the tenth target key field content 960 have check cells, and the first check cell 940 corresponding to the ninth target key field content 920 is not occupied by other target key field contents, then the first check cell 940 is determined as the target cell; the check cell corresponding to the tenth target key field content 960 is occupied by other target key field contents (i.e., the ninth target key field content 920), then the cell where the tenth target key field content 960 is located is determined as the target cell. If there is no check cell for the twelfth target key field content 910, then the cell where the twelfth target key field content 910 is located is determined as the target cell.

[0156] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of the present invention. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements and corrections to the present invention. Such modifications, improvements and corrections are suggested in the present invention, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of the present invention.

[0157] At the same time, the present invention uses specific words to describe the embodiments of the present invention. For example, "some embodiments" means a certain feature, structure or characteristic related to at least one embodiment of the present invention. In addition, some features, structures or characteristics in one or more embodiments of the present invention can be appropriately combined.

[0158] In addition, unless explicitly stated in the claims, the order of the processing elements and sequences described in the present invention, the use of alphanumeric characters, or the use of other names are not intended to limit the order of the processes and methods of the present invention. Although the above disclosure discusses some of the invention embodiments currently considered useful through various examples, it should be understood that such details are only for illustrative purposes, and the attached claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that are consistent with the essence and scope of the embodiments of the present invention. For example, although the system components described above can be implemented by hardware devices, they can also be implemented only by software solutions, such as installing the described system on an existing server or mobile device.

[0159] Similarly, it should be noted that in order to simplify the description of the present invention and thus facilitate the understanding of one or more embodiments of the invention, in the above description of the embodiments of the invention, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this disclosure method does not mean that the subject matter of the invention requires more features than those mentioned in the claims. In fact, the features of the embodiments are less than all the features of the single embodiment disclosed above.

[0160] Each patent, patent application, patent application publication, and other materials, such as articles, books, instructions, publications, documents, etc., cited in this invention are hereby incorporated by reference in their entirety. Except for application history documents that are inconsistent with or conflicting with the contents of this invention, documents that limit the broadest scope of the claims of this invention (currently or later attached to this invention) are also excluded. It should be noted that if the descriptions, definitions, and / or use of terms in the accompanying materials of this invention are inconsistent or conflicting with the contents of this invention, the descriptions, definitions, and / or use of terms in this invention shall prevail.

[0161] Finally, it should be understood that the embodiments described in the present invention are only used to illustrate the principles of the embodiments of the present invention. Other variations may also fall within the scope of the present invention. Therefore, as an example and not a limitation, the alternative configurations of the embodiments of the present invention may be considered consistent with the teachings of the present invention. Accordingly, the embodiments of the present invention are not limited to the embodiments explicitly introduced and described in the present invention.

Claims

1. A method for identifying a graphic label, characterized in that: The method comprises: Parsing a target drawing to obtain drawing content in the target drawing, wherein the drawing content includes text information; Based on the text information, determining a plurality of target key fields and corresponding plurality of target key field contents; Based on the contents of the multiple target key fields and their corresponding position information, determining a page layout feature of the target drawing, wherein the page layout feature is related to a page layout of the contents of the multiple target key fields corresponding to the multiple target key fields in the target drawing; Determine a label table based on the page layout characteristics; Matching the target range of the target cell in the image label table with the text information to determine the target key field value; Based on the label table and the target key field value, the label information is determined, wherein the target cell is determined based on the following steps: Determining whether a check cell exists based on the number of columns occupied by the target key field content; In response to the existence of the check cell, determining whether the check cell has been occupied by other target key field contents; In response to the fact that the check cell is not occupied by other target key field contents, determining the check cell as a target cell; In response to the checking cell being occupied by other target key field contents, determining the cell where the target key field contents are located as the target cell; In response to the absence of the check cell, the cell where the target key field content is located is determined as the target cell.

2. The method according to claim 1, characterized in that The determining, based on the text information, a plurality of target key fields and corresponding contents of a plurality of target key fields comprises: Based on the text information, the text information is matched in a preset knowledge base to determine the contents of the multiple target key fields, wherein the preset knowledge base includes a reference key field corresponding to the reference image signature table and a reference key field content corresponding to each of the reference key fields; Based on the contents of the multiple target key fields, the multiple target key fields are determined.

3. The method according to claim 1, characterized in that The determining of the page layout features of the target drawing based on the contents of the multiple target key fields and their corresponding position information includes: Based on the position information, sorting the multiple target key field contents to obtain multiple pairs of adjacent target key field contents; For each pair of adjacent target key field contents, determine the relative position between the pair of target key field contents based on their corresponding position information; Based on the relative positions corresponding to the multiple pairs of adjacent target key field contents, a data sequence is determined as the page layout feature.

4. The method according to claim 1, characterized in that: The method further comprises: Based on the page layout feature, matching is performed in a preset knowledge base to determine whether there is a reference image label table with the same reference page layout feature as the page layout feature; the preset knowledge base includes the reference page layout feature corresponding to the reference image label table; In response to the presence of a reference image label table having a reference page layout feature identical to the page layout feature in the preset knowledge base, the reference image label table is determined as the image label table.

5. The method according to claim 4, characterized in that The method further comprises: In response to determining that the preset knowledge base does not include a reference image label table having a reference page layout feature identical to the page layout feature, the image label table is determined based on the position information corresponding to the contents of the multiple target key fields.

6. The method according to claim 5, characterized in that The drawing content also includes a target straight line extending along the X-axis direction and / or the Y-axis direction. The step of determining the image label table based on the location information corresponding to the contents of the multiple target key fields includes: For each target key field content, Based on the position information corresponding to the target key field content, draw auxiliary straight lines along the X-axis direction and the Y-axis direction respectively, and determine the intersection information of the auxiliary straight line and the target straight line, wherein the intersection information includes the intersection point and its corresponding coordinate position; Based on the intersection information, the image label table is determined.

7. The method according to claim 6, characterized in that The label table includes a left border, a right border, a bottom border and an upper border, the X-axis direction includes an X-axis positive direction and an X-axis negative direction, and the Y-axis direction includes a Y-axis positive direction and a Y-axis negative direction. The left border is determined by the following steps: Based on the intersection information, determine a first intersection point set along the negative direction of the X-axis; based on the first intersection point set, determine a target first intersection point; determine a straight line passing through the target first intersection point and along the Y-axis direction as the left frame; The right border is determined by the following steps: Based on the intersection information, determine a plurality of second intersection point sets along the positive direction of the X-axis; based on the plurality of second intersection point sets, determine a candidate first intersection point set; Based on the candidate first intersection point set, determine the target second intersection point; determine the straight line passing through the target second intersection point and along the Y-axis direction as the right frame; The lower border is determined by the following steps: Based on the intersection information, determine a third intersection point set along the negative direction of the Y axis; based on the third intersection point set, determine a target third intersection point; determine a straight line passing through the target third intersection point and along the X axis direction as the lower frame; The upper border is determined by the following steps: Based on the intersection information, a plurality of fourth intersection point sets along the positive direction of the Y axis are determined; based on the plurality of fourth intersection point sets, a candidate second intersection point set is determined; based on the candidate second intersection point set, a target fourth intersection point is determined; A straight line passing through the fourth intersection point of the target and along the X-axis direction is determined as the upper frame.

8. The method according to claim 7, characterized in that The step of determining the image label table based on the intersection information further includes: For each target key field content, based on the intersection information, determine the number of first intersection points along the X-axis direction and the number of second intersection points along the Y-axis direction within the border range; Determine the maximum number of rows and columns of the label table based on the first number of intersections and the second number of intersections of the contents of the multiple target key fields; For each target key field content, Determine the number of occupied rows of the target key field content based on the second number of intersection points and the maximum number of rows of the target key field content; Determine the number of columns occupied by the target key field content based on the first number of intersection points and the maximum number of columns of the target key field content; Determine the row number of the target key field content based on the number of third intersections of the target key field content in the positive direction of the Y axis; Based on the number of fourth intersections of the target key field content in the negative direction of the X-axis, the column number of the target key field content is determined.

9. The method according to claim 1, characterized in that: The determining whether there is a check cell based on the number of columns occupied by the target key field content includes: In response to the number of occupied columns being equal to 1, determining that the check cell exists; In response to the occupied number of columns not being equal to 1, determining whether the occupied number of columns is equal to a maximum number of columns; In response to the occupied column number not being equal to the maximum column number, determining that the check cell exists; In response to the occupied column number being equal to the maximum column number, it is determined that the check cell does not exist.

10. The method according to claim 1, characterized in that The target range of the target cell is determined by the following steps: Divide the target cell into a first part, a second part and a third part along the Y-axis direction; In response to the target key field content being located in the first part, the minimum value of the target cell in the X-axis direction is determined as the minimum value of the target range in the X-axis direction, the maximum value of the target cell in the X-axis direction is determined as the maximum value of the target range in the X-axis direction, the minimum value of the target cell in the Y-axis direction is determined as the minimum value of the target range in the Y-axis direction, and the minimum value of the range of the target key field content in the Y-axis direction is determined as the maximum value of the target range in the Y-axis direction; In response to the target key field content not being located in the first part, the maximum value of the range of the target key field content in the X-axis direction is determined as the minimum value of the target range in the X-axis direction, the maximum value of the target cell in the X-axis direction is determined as the maximum value of the target range in the X-axis direction, the minimum value of the target cell in the Y-axis direction is determined as the minimum value of the target range in the Y-axis direction, and the maximum value of the target cell in the Y-axis direction is determined as the maximum value of the target range in the Y-axis direction.

11. The method according to claim 5, characterized in that The method further comprises: Based on the image label table and the corresponding page layout features, the preset knowledge base is updated.

12. A label recognition system, characterized in that: The system comprises: A parsing module, wherein the parsing module is configured to parse a target drawing and obtain drawing content in the target drawing, wherein the drawing content includes text information; A first determination module, the first determination module is configured to determine a plurality of target key fields and corresponding plurality of target key field contents based on the text information; A second determination module, the second determination module being configured to determine a page layout feature of the target drawing based on the multiple target key field contents and their corresponding position information, the page layout feature being related to a page layout of the multiple target key field contents corresponding to the multiple target key fields in the target drawing; and A third determining module, wherein the third determining module is configured to: Determine a label table based on the page layout characteristics; Matching the target range of the target cell in the image label table with the text information to determine the target key field value; Based on the label table and the target key field value, the label information is determined, wherein the target cell is determined based on the following steps: Determining whether a check cell exists based on the number of columns occupied by the target key field content; In response to the existence of the check cell, determining whether the check cell has been occupied by other target key field contents; In response to the fact that the check cell is not occupied by other target key field contents, determining the check cell as a target cell; In response to the checking cell being occupied by other target key field contents, determining the cell where the target key field contents are located as the target cell; In response to the absence of the check cell, the cell where the target key field content is located is determined as the target cell.

Citation Information

Cited By

  • Building construction drawing catalog and drawing tab bar intelligent identification method

    CN121236791A