CAD table information reading method, device, computer equipment and medium

By scaling and constructing a spatial coordinate network from CAD table line segments, the method addresses the inefficiencies in recognizing multi-line table edges, enhancing CAD table recognition accuracy and efficiency.

CN118762376BActive Publication Date: 2024-12-31GUANGDONG KAITONG SOFTWARE DEV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411226279.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-31
Estimated Expiration
2044-09-03

AI Technical Summary

Technical Problem

Existing CAD table recognition technologies struggle with efficiently and accurately reading information from CAD tables with multiple line segments forming a single table edge, leading to inefficient edge recognition and generation of meaningless empty table cells.

Method used

A method involving scaling the endpoint coordinates of first and second-direction line segments, constructing a spatial coordinate network, and filling it with text content to create a target CAD table, thereby simplifying multi-line table edges and improving recognition efficiency.

Benefits of technology

The method effectively avoids the issues of meaningless empty cells and enhances the recognition efficiency of CAD tables by optimizing the recognition of mixed multi-line table borders, allowing for faster processing of CAD files with improved accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762376B_ABST
    Figure CN118762376B_ABST
Patent Text Reader

Abstract

The present disclosure provides a CAD table information reading method, device, computer equipment and medium, including: obtaining data object information of an initial CAD table, the data object information including: endpoint coordinates of line segments contained in the table and description content of text contained in the table, the line segments contained in the table including: multiple first direction line segments and multiple second direction line segments; scaling the endpoint coordinates of multiple first direction line segments and multiple second direction line segments respectively; determining a spatial coordinate network based on the multiple first direction line segments and multiple second direction line segments obtained after scaling; filling the spatial coordinate network with content based on the description content of the text contained in the table to obtain a target CAD table; performing table data recognition on the target CAD table to obtain a table information reading result of the target CAD table. Thus, by simplifying multiple line segments in the initial CAD table, the information recognition efficiency of the CAD table is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the technical field of information reading, and in particular, to a method, apparatus, computer equipment and medium for reading CAD table information. Background Art

[0002] With the continuous advancement of CAD (Computer Aided Design) technology, its application in various fields is becoming more and more extensive. Among them, the table information in CAD drawings, such as material lists, dimension tables, parameter tables, etc., has become an important source of data in the design process. However, with the increase in design complexity, how to read CAD table information efficiently and accurately has become an important issue.

[0003] In the related art, when realizing CAD table information reading, the OCR (Optical Character Recognition) table image recognition technology is mainly used, such as CAD-based tool data, and pattern recognition technology is used to identify the corresponding information in the CAD table.

[0004] However, in the existing method, it is difficult to effectively realize the reading of table information when multiple line segments form a single table edge. Summary of the invention

[0005] The embodiments described herein provide a method, apparatus, computer device and medium for reading CAD table information, which overcome the above-mentioned problems.

[0006] In a first aspect, according to the present disclosure, a method for reading CAD table information is provided, comprising:

[0007] Acquire data object information of an initial CAD table, the initial CAD table is used to describe a CAD table with a multi-line border, the data object information includes: endpoint coordinates of line segments contained in the table and description content of text contained in the table, the line segments contained in the table include: a plurality of first direction line segments and a plurality of second direction line segments, the first direction line segments are perpendicular to the second direction line segments;

[0008] Respectively scaling the endpoint coordinates of a plurality of first-direction line segments and the endpoint coordinates of a plurality of second-direction line segments;

[0009] Determine a spatial coordinate network based on the plurality of first direction line segments and the plurality of second direction line segments obtained after scaling;

[0010] Filling the spatial coordinate network with content based on the description content of the text contained in the table to obtain a target CAD table;

[0011] The target CAD table is subjected to table data recognition to obtain a table information reading result of the target CAD table.

[0012] In a second aspect, according to the content of the present disclosure, a CAD table information reading device is provided, comprising:

[0013] An acquisition module is used to acquire data object information of an initial CAD table, wherein the initial CAD table is used to describe a CAD table with a multi-line border, wherein the data object information includes: endpoint coordinates of line segments contained in the table and description content of text contained in the table, wherein the line segments contained in the table include: a plurality of first direction line segments and a plurality of second direction line segments, wherein the first direction line segments are perpendicular to the second direction line segments;

[0014] A processing module, used for respectively performing scaling processing on the endpoint coordinates of a plurality of first-direction line segments and the endpoint coordinates of a plurality of second-direction line segments;

[0015] A determination module, configured to determine a spatial coordinate network based on a plurality of first direction line segments and a plurality of second direction line segments obtained after scaling;

[0016] A filling module, used for filling the spatial coordinate network with content based on the description content of the text contained in the table to obtain a target CAD table;

[0017] The recognition module is used to perform table data recognition on the target CAD table to obtain the table information reading result of the target CAD table.

[0018] In a third aspect, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the CAD table information reading method in any of the above embodiments are implemented.

[0019] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the CAD table information reading method in any of the above embodiments are implemented.

[0020] The CAD table information reading method provided in the embodiment of the present application obtains the data object information of the initial CAD table, the initial CAD table is used to describe the CAD table of multi-line borders, the data object information includes: the endpoint coordinates of the line segments contained in the table and the description content of the text contained in the table, the line segments contained in the table include: multiple first-direction line segments and multiple second-direction line segments, the first-direction line segments are perpendicular to the second-direction line segments; the endpoint coordinates of the multiple first-direction line segments and the endpoint coordinates of the multiple second-direction line segments are scaled respectively; based on the multiple first-direction line segments and the multiple second-direction line segments obtained after the scaling process, the spatial coordinate network is determined; based on the description content of the text contained in the table, the spatial coordinate network is filled with content to obtain the target CAD table; the target CAD table is identified for the table data to obtain the table information reading result of the target CAD table. In this way, by scaling the data object information of the initial CAD table to simplify the multiple line segments in the initial CAD table, the problem of mixed multi-line table edges affecting information recognition is avoided, and the information recognition efficiency of the CAD table is effectively improved.

[0021] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly described below. It should be noted that the drawings described below only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure, wherein:

[0023] Figure 1 It is a flow chart of a method for reading CAD table information provided by the present disclosure;

[0024] Figure 2 It is a partial schematic diagram of a mixed multi-line table edge provided by the present disclosure;

[0025] Figure 3 is a structural schematic diagram of an initial coordinate network provided by the present disclosure;

[0026] Figure 4 is a second quadrant intersection analysis result diagram provided by the present disclosure;

[0027] Figure 5 It is a fourth quadrant intersection analysis result diagram provided by the present disclosure;

[0028] Figure 6 It is a structural schematic diagram of a spatial coordinate network provided by the present disclosure;

[0029] Figure 7 It is a structural schematic diagram of a CAD table information reading device provided by the present disclosure;

[0030] Figure 8 It is a structural schematic diagram of a computer device provided by the present disclosure.

[0031] It should be noted that the elements in the drawings are schematic and not drawn to scale. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work also fall within the scope of protection of the present disclosure.

[0033] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by a person skilled in the art to which the subject matter of the present disclosure belongs. It will be further understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the specification and the relevant art, and will not be interpreted in an idealized or overly formal form unless otherwise explicitly defined herein. As used herein, a statement that two or more parts are "connected" or "coupled" together shall mean that the parts are joined together directly or through one or more intermediate components.

[0034] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase "embodiments" in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0035] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists, A and B exist at the same time, and B exists. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. Terms such as "first" and "second" are only used to distinguish one component (or a part of a component) from another component (or another part of a component).

[0036] In the description of the present application, unless otherwise specified, “plurality” means more than two (including two), and similarly, “plurality groups” means more than two (including two).

[0037] A table with multiple line segments combined into a single table edge can be called a CAD table with multiple line borders. A CAD table with multiple line borders has the following characteristics: it is composed of two or more line segments; there is no text between the line segments; the distance between the line segments is inconsistent; the distance between the line segments is closer than that of normal cells.

[0038] However, the existing CAD drawing table recognition technology is lacking in the edge recognition of mixed multi-line tables. Since it is highly dependent on AutoCAD software and Windows system, it cannot run independently; duplicate CAD data objects are not deduplicated, which interferes with the output results and greatly reduces the operating efficiency; the edge recognition efficiency of mixed multi-line tables is extremely low, and a certain number of meaningless blank tables will appear in the generated table. Therefore, a line segment will be recognized as an edge, resulting in meaningless cells in the output Excel table, affecting subsequent business processing.

[0039] This embodiment optimizes and improves the traditional CAD drawing table data recognition algorithm by introducing an adaptive bird's-eye view rate to optimize the recognition effect of mixed multi-line table borders, avoiding the problem of meaningless empty table cells generated by traditional algorithms when processing such CAD drawing tables. In addition, the algorithm operation efficiency is greatly improved. For CAD files with 200 data objects, the processing speed can reach milliseconds. The algorithm program can run on Windows, amd64, arm64 and other operating systems, and is suitable for cloud deployment.

[0040] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0041] Figure 1 is a flow chart of a method for reading CAD table information provided by an embodiment of the present disclosure, such as Figure 1 As shown, the specific process of the CAD table information reading method includes:

[0042] S110, obtaining data object information of an initial CAD table, the data object information including: endpoint coordinates of line segments contained in the table and description content of text contained in the table, the line segments contained in the table including: a plurality of first direction line segments and a plurality of second direction line segments.

[0043] The initial CAD table is used to describe a CAD table with multiple line borders, and the first direction line segment is perpendicular to the second direction line segment. The first direction line segment can be a horizontal line segment in the initial CAD table, and the second direction line segment can be a vertical line segment in the initial CAD table.

[0044] The endpoint coordinates of the line segments contained in the table may be the starting point coordinates and the ending point coordinates of the line segments, that is, the starting point coordinates and the ending point coordinates corresponding to multiple first direction line segments, and the starting point coordinates and the ending point coordinates corresponding to multiple second direction line segments.

[0045] The description content of the text contained in the table can be the object data of the text object contained between multiple line segments, such as material design dimension value, material property value, material parameter value, etc.

[0046] like Figure 2 As shown, three horizontal line segments and two vertical line segments are illustrated, and the three horizontal line segments and the two vertical line segments intersect with each other respectively.

[0047] S120, scaling the endpoint coordinates of a plurality of first direction line segments and the endpoint coordinates of a plurality of second direction line segments respectively.

[0048] When scaling the endpoint coordinates of multiple first-direction line segments and the endpoint coordinates of multiple second-direction line segments, the scaling ratios (i.e., bird's-eye view ratios) corresponding to each other are used. Each first-direction line segment uses the same line segment scaling ratio; each second-direction line segment uses the same line segment scaling ratio.

[0049] The bird's-eye view rate is based on the CAD bird's-eye view, which measures the value of the CAD bird's-eye view height and the scaling ratio of the field of view. The larger the bird's-eye view rate, the clearer the drawing details; the smaller the bird's-eye view rate, the blurrier the drawing details. That is, the larger the line segment scaling ratio, the clearer the drawing details, and the smaller the line segment scaling ratio, the blurrier the drawing details.

[0050] In some embodiments, scaling the endpoint coordinates of the plurality of first direction line segments and the endpoint coordinates of the plurality of second direction line segments respectively includes:

[0051] Based on the corresponding multiple first direction line segments in the initial CAD table, determine the corresponding first line segment scaling ratio; based on the corresponding multiple second direction line segments in the initial CAD table, determine the corresponding second line segment scaling ratio; based on the first line segment scaling ratio, scale the endpoint coordinates of each first direction line segment; and, based on the second line segment scaling ratio, scale the endpoint coordinates of each second direction line segment.

[0052] Wherein, when determining the first line segment scaling ratio corresponding to a plurality of first direction line segments and the second line segment scaling ratio corresponding to a plurality of second direction line segments, an adaptive method can be adopted. Adaptation is a process of automatically adjusting the processing method, processing sequence, processing parameters, boundary conditions or constraints according to the data characteristics of the processed data during the processing and analysis process, so as to adapt them to the statistical distribution characteristics and structural characteristics of the processed data to obtain the best processing effect.

[0053] Therefore, by respectively obtaining the first line segment scaling ratio corresponding to the first direction line segment and the second line segment scaling ratio corresponding to the second direction line segment, it is convenient to perform scaling processing on the first direction line segment and the second direction line segment.

[0054] In some embodiments, determining the corresponding first line segment scaling ratio based on the corresponding plurality of first direction line segments in the initial CAD table includes:

[0055] Detect whether there is text contained in the table corresponding to every two adjacent line segments in the multiple first direction line segments; if there is not text contained in the table corresponding to every two adjacent line segments in the multiple first direction line segments, determine the first interval matrix data based on the line segment interval distance between every two adjacent line segments in the multiple first direction line segments; determine the first algorithm segmentation threshold based on the first interval matrix data; determine the first line segment scaling ratio based on the relationship between the line segment interval distance between every two adjacent line segments in the multiple first direction line segments and the first algorithm segmentation threshold, and the detection result that there is text contained in the table corresponding to every two adjacent line segments in the multiple first direction line segments.

[0056] Wherein, when detecting whether there is a table-containing text corresponding to each two adjacent line segments in a plurality of first-direction line segments, it can be determined based on regional pixel value recognition. Detecting whether there is a table-containing text corresponding to each two adjacent line segments in a plurality of first-direction line segments can include: detecting the regional point pixel values ​​between each two adjacent line segments in a plurality of first-direction line segments; if the regional point pixel values ​​between each two adjacent line segments in a plurality of first-direction line segments are equal, it is determined that there is a table-containing text corresponding to each two adjacent line segments in a plurality of first-direction line segments; if the regional point pixel values ​​between each two adjacent line segments in a plurality of first-direction line segments are not equal, it is determined that there is not a table-containing text corresponding to each two adjacent line segments in a plurality of first-direction line segments.

[0057] It should be noted that not every two adjacent line segments in the multiple first direction line segments correspond to table-containing text. It can be understood that while there are two adjacent line segments in the multiple first direction line segments that correspond to table-containing text, there are also other two adjacent line segments that do not correspond to table-containing text.

[0058] Based on the line segment spacing distance between every two adjacent line segments in the plurality of first direction line segments, the first spacing matrix data is determined to be obtained, indicating that the first spacing matrix data includes: the line segment spacing distance between every two adjacent horizontal line segments.

[0059] The first algorithm segmentation threshold is the optimal segmentation threshold corresponding to the first interval matrix data determined by the preset algorithm. Determining the first algorithm segmentation threshold based on the first interval matrix data may include: using the OTSU algorithm to solve the optimal segmentation threshold for the first interval matrix data to obtain the first algorithm segmentation threshold. For example, from the line segment interval distance between each two adjacent horizontal line segments, a line segment interval distance corresponding to the maximum inter-class variance is selected as the first algorithm segmentation threshold.

[0060] Based on the relationship between the line segment interval distance between every two adjacent line segments in a plurality of first direction line segments and the first algorithm segmentation threshold, and the detection result that there is a table-containing text corresponding to each two adjacent line segments in the plurality of first direction line segments, determining the first line segment scaling ratio may include: detecting whether the line segment interval distance between two current adjacent line segments is less than the first algorithm segmentation threshold, and whether there is a table-containing text corresponding to each two current adjacent line segments; if not, selecting a line segment interval distance that is less than the first algorithm segmentation threshold and has the smallest distance difference with the first algorithm segmentation threshold from the plurality of line segment interval distances as the first target segmentation threshold, and using the following formula (1) to calculate the first line segment scaling ratio through the first target segmentation threshold.

[0061] (1)

[0062] In formula (1), t 1 is the first target segmentation threshold, S 1 is the scaling ratio of the first line segment.

[0063] If so, determine that the line segment interval distance between the current two adjacent line segments is the new first algorithm segmentation threshold, update the current two adjacent line segments, and continue to detect whether the line segment interval distance between the current two adjacent line segments is less than the first algorithm segmentation threshold, and whether there is a table-containing text between the current two adjacent line segments; if so, continue to execute the update of the current two adjacent line segments, and continue to detect whether the line segment interval distance between the current two adjacent line segments is less than the first algorithm segmentation threshold, and whether there is a table-containing text between the current two adjacent line segments, until the line segment interval distance between the current two adjacent line segments is not less than the first algorithm segmentation threshold, and there is a table-containing text between the current two adjacent line segments; if not, select a line segment interval distance that is less than the first algorithm segmentation threshold and has the smallest distance difference with the first algorithm segmentation threshold from multiple line segment interval distances as the first target segmentation threshold, and use formula (1) to calculate the first line segment scaling ratio through the first target segmentation threshold.

[0064] It should be noted that, if the above indicates: the line segment interval distance between the current two adjacent line segments is less than the first algorithm segmentation threshold, and there is a table containing text between the current two adjacent line segments; if no indicates: the line segment interval distance between the current two adjacent line segments is greater than or equal to the first algorithm segmentation threshold, and there is a table containing text between the current two adjacent line segments, or, the line segment interval distance between the current two adjacent line segments is greater than or equal to the first algorithm segmentation threshold, and there is no table containing text between the current two adjacent line segments, or, the line segment interval distance between the current two adjacent line segments is less than the first algorithm segmentation threshold, and there is no table containing text between the current two adjacent line segments.

[0065] Correspondingly, in some other embodiments, if there is a table containing text between every two adjacent line segments in the plurality of first direction line segments, the preset value is determined as the first line segment scaling ratio. The preset value is 1.

[0066] Thus, by detecting whether there is corresponding text contained in the table between every two adjacent line segments in a plurality of first-direction line segments, and based on the line segment spacing distance between two adjacent line segments which are closest to the first algorithm segmentation threshold and correspond to the text contained in the table as an indirect measurement value, the first line segment scaling ratio is determined, thereby effectively avoiding the influence of the first line segment scaling ratio on the scaling of the description content of the text contained in the table.

[0067] In some embodiments, determining the corresponding second line segment scaling ratio based on the corresponding plurality of second direction line segments in the initial CAD table includes:

[0068] Detect whether there is corresponding table-containing text between every two adjacent line segments in the multiple second direction line segments; if there is not corresponding table-containing text between every two adjacent line segments in the multiple second direction line segments, determine the second interval matrix data based on the line segment interval distance between every two adjacent line segments in the multiple second direction line segments; determine the second algorithm segmentation threshold based on the second interval matrix data; determine the second line segment scaling ratio based on the relationship between the line segment interval distance between every two adjacent line segments in the multiple second direction line segments and the second algorithm segmentation threshold, and the detection result that there is corresponding table-containing text between every two adjacent line segments in the multiple second direction line segments.

[0069] Wherein, when detecting whether there is a table-containing text corresponding to each two adjacent line segments in a plurality of second-direction line segments, it can be determined based on regional pixel value recognition. Detecting whether there is a table-containing text corresponding to each two adjacent line segments in a plurality of second-direction line segments can include: detecting the regional point pixel values ​​between each two adjacent line segments in a plurality of second-direction line segments; if the regional point pixel values ​​between each two adjacent line segments in a plurality of second-direction line segments are equal, it is determined that there is a table-containing text corresponding to each two adjacent line segments in a plurality of second-direction line segments; if the regional point pixel values ​​between each two adjacent line segments in a plurality of second-direction line segments are not equal, it is determined that there is not a table-containing text corresponding to each two adjacent line segments in a plurality of second-direction line segments.

[0070] It should be noted that not every two adjacent line segments in the multiple second direction line segments correspond to table-containing text. It can be understood that while there are two adjacent line segments in the multiple second direction line segments that correspond to table-containing text, there are also other two adjacent line segments that do not correspond to table-containing text.

[0071] Based on the line segment spacing distance between every two adjacent line segments in the plurality of second direction line segments, the second spacing matrix data is determined to be obtained, indicating that the second spacing matrix data includes: the line segment spacing distance between every two adjacent vertical line segments.

[0072] The second algorithm segmentation threshold is the optimal segmentation threshold corresponding to the second interval matrix data determined by the preset algorithm. Determining the second algorithm segmentation threshold based on the second interval matrix data may include: using the OTSU algorithm to solve the optimal segmentation threshold for the second interval matrix data to obtain the second algorithm segmentation threshold. For example, from the line segment interval distance between every two adjacent vertical line segments, a line segment interval distance corresponding to the maximum inter-class variance is selected as the second algorithm segmentation threshold.

[0073] Based on the relationship between the line segment interval distance between every two adjacent line segments in the plurality of second direction line segments and the second algorithm segmentation threshold, and the detection result that there is a table-containing text corresponding to each two adjacent line segments in the plurality of second direction line segments, determining the second line segment scaling ratio may include: detecting whether the line segment interval distance between two current adjacent line segments is less than the second algorithm segmentation threshold, and whether there is a table-containing text corresponding to each two current adjacent line segments; if not, selecting a line segment interval distance that is less than the second algorithm segmentation threshold and has the smallest distance difference with the second algorithm segmentation threshold from the plurality of line segment interval distances as the second target segmentation threshold, and using the following formula (2) to calculate the second line segment scaling ratio through the second target segmentation threshold.

[0074] (2)

[0075] In formula (2), t2 is the second target segmentation threshold, S 2 is the scaling ratio of the second line segment.

[0076] If so, determine that the line segment interval distance between the current two adjacent line segments is the new second algorithm segmentation threshold, update the current two adjacent line segments, and continue to detect whether the line segment interval distance between the current two adjacent line segments is less than the second algorithm segmentation threshold, and whether there is a table-containing text between the current two adjacent line segments; if so, continue to execute the update of the current two adjacent line segments, and continue to detect whether the line segment interval distance between the current two adjacent line segments is less than the second algorithm segmentation threshold, and whether there is a table-containing text between the current two adjacent line segments, until the line segment interval distance between the current two adjacent line segments is not less than the second algorithm segmentation threshold, and there is a table-containing text between the current two adjacent line segments; if not, select a line segment interval distance that is less than the second algorithm segmentation threshold and has the smallest distance difference with the second algorithm segmentation threshold from multiple line segment interval distances as the second target segmentation threshold, and use formula (2) to calculate the second line segment scaling ratio through the second target segmentation threshold.

[0077] It should be noted that, if the above indicates: the line segment interval distance between the current two adjacent line segments is less than the second algorithm segmentation threshold, and there is a table containing text between the current two adjacent line segments; if no indicates: the line segment interval distance between the current two adjacent line segments is greater than or equal to the second algorithm segmentation threshold, and there is a table containing text between the current two adjacent line segments, or, the line segment interval distance between the current two adjacent line segments is greater than or equal to the second algorithm segmentation threshold, and there is no table containing text between the current two adjacent line segments, or, the line segment interval distance between the current two adjacent line segments is less than the second algorithm segmentation threshold, and there is no table containing text between the current two adjacent line segments.

[0078] Correspondingly, in some other embodiments, if there is a table containing text between every two adjacent line segments in the plurality of second direction line segments, the preset value is determined as the second line segment scaling ratio. The preset value is 1.

[0079] Thus, by detecting whether there is corresponding text contained in the table between every two adjacent line segments in the multiple second direction line segments, and based on the line segment spacing distance between two adjacent line segments that are closest to the second algorithm segmentation threshold and correspond to the text contained in the table as an indirect measurement value, the second line segment scaling ratio is determined, thereby effectively avoiding the influence of the second line segment scaling ratio on the scaling of the description content of the text contained in the table.

[0080] The following description is made by taking the determination of the first algorithm segmentation threshold as an example (the determination principle of the second algorithm segmentation threshold is the same as the determination principle of the first algorithm segmentation threshold).

[0081] For example, assuming that the first interval matrix data is a 1×N matrix, that is, each value in the matrix is ​​a horizontal line segment adjacent interval I n , I n The value range of is (0, +∞). The first interval matrix data is normalized to the maximum and minimum values, as shown in the following formula (3).

[0082] (3)

[0083] To simplify the calculation process, this embodiment quantizes the matrix to [0, 255] with a total of 256 levels. The quantization formula is shown in the following formula (4).

[0084] (4)

[0085] The Otsu algorithm function integrated in Opencv can be used to calculate the matrix E n Find the best segmentation threshold E opt , converted back to the original optimal segmentation interval T (i.e., the segmentation threshold of the first algorithm), as shown in the following formula (5).

[0086] (5)

[0087] Correspondingly, based on the first line segment scaling ratio, the endpoint coordinates of each first direction line segment are scaled, as shown in the following formula (6).

[0088] (6)

[0089] In formula (6), is the coordinate of one endpoint of the first direction segment, The scaling ratio of the first line segment S 1 The endpoint coordinates of the first direction segment obtained after scaling.

[0090] The appropriate bird's-eye view rate can make the coordinates of multiple line segments in the mixed multi-line table border overlap, and then through line segment deduplication and merging operations, the mixed multi-line table border is converted into a single-line border, which greatly reduces the difficulty of table recognition and improves recognition efficiency.

[0091] S130. Determine a spatial coordinate network based on the multiple first direction line segments and the multiple second direction line segments obtained after scaling processing.

[0092] Among them, the spatial coordinate network is a spatial structure composed of multiple horizontal line segments and multiple vertical line segments.

[0093] In some embodiments, determining a spatial coordinate network based on a plurality of first direction line segments and a plurality of second direction line segments obtained after scaling processing includes:

[0094] Based on multiple first-direction line segments and multiple second-direction line segments obtained after scaling processing, an initial coordinate network is constructed according to the line segment connection relationship, and the initial coordinate network includes: multiple network point coordinates; a plane coordinate system corresponding to each network point coordinate is established with each network point coordinate as the center and the first direction and the second direction as the coordinate axis; based on the second quadrant angular intersection point and the fourth quadrant angular intersection point in the plane coordinate system corresponding to each network point coordinate, a quadrant connecting line segment corresponding to each network point coordinate is formed; based on the intersection state data of the quadrant connecting line segments corresponding to the network point coordinate, a unit grid corresponding to each network point coordinate is determined; based on the determination of the unit grid corresponding to each network point coordinate, a spatial coordinate network is determined.

[0095] Among them, the initial coordinate network is as follows Figure 3 shown.

[0096] The intersection state data is used to describe whether the quadrant connection line segment corresponding to the corresponding network point coordinate has an intersection relationship with other line segments. Based on the intersection state data of the quadrant connection line segment corresponding to the network point coordinate, determining the unit grid corresponding to each network point coordinate may include: if the intersection state data of the quadrant connection line segment corresponding to a network point coordinate indicates that the quadrant connection line segment corresponding to the network point coordinate has an intersection relationship with other line segments, then determining that the network point coordinate and the corresponding quadrant connection line segment cannot form a unit grid; if the intersection state data of the quadrant connection line segment corresponding to a network point coordinate indicates that the quadrant connection line segment corresponding to the network point coordinate does not have an intersection relationship with other line segments, then determining that the network point coordinate and the corresponding quadrant connection line segment form a unit grid.

[0097] For example, the line segment skeleton set of the initial coordinate network is L. In order to realize the spatial coordinate grid recognition, it is necessary to find the diagonals of the second quadrant and the fourth quadrant of all spatial coordinate grids, and store the intersection points of the second quadrant angles in set N1 and the intersection points of the fourth quadrant angles in set N2.

[0098] Assume that the vertical line segment l 1 by endpoint A ( x 1, y A ) and endpoints B ( x 1, y B ), horizontal line segment l 2 by endpoint C ( x C , y 2) and endpointsD ( x D , y 2) Composition. Among them, y A > y B , x C < x D .

[0099] like l 1 and l 2 intersect, then: ,get l 1 and l The intersection of 2 O ( x 1, y 2).

[0100] If O ( x 1, y 2) If the second quadrant angle of the intersection point exists, then: ,Will O ( x 1, y 2) Stored in set N1, the result is as follows Figure 4 shown.

[0101] If O ( x 1, y 2) If the fourth quadrant angle of the intersection point exists, then: ,Will O ( x 1, y 2) Stored in set N2, the result is as follows Figure 5 shown.

[0102] Assume that the line segment l 1∈L, corner point P 1 m ∈N1, corner point P 2 n ∈N2, P 1 m and P 2 n Composition line segment l p ,like P 1 m and P 2 n To form a spatial coordinate grid diagonal, the conditions shown in formula (7) and the following conditions must be met: there is no l n and lp intersect and the intersection coordinates do not match P 1 m Coordinates or P 2 n The coordinates are equal.

[0103] (7)

[0104] The corner points in set N1 and set N2 are cyclically judged to match and obtain the spatial coordinate grid. The analysis results are as follows: Figure 6 shown.

[0105] Thus, by determining the unit grid corresponding to the coordinates of each network point, a spatial coordinate network that does not contain empty table cells can be effectively constructed.

[0106] S140, filling the spatial coordinate network with content based on the description content of the text contained in the table to obtain a target CAD table.

[0107] When filling the space coordinate network with content, mapping and filling can be performed based on the corresponding relationship between each grid in the initial CAD table and each grid in the space coordinate network.

[0108] In some embodiments, filling the spatial coordinate network with content based on the description content of the text contained in the table to obtain the target CAD table includes:

[0109] Get multiple text boundary encircles corresponding to the text in the table, each text boundary encircle has corresponding boundary point coordinates; scale the boundary point coordinates corresponding to each text boundary encircle; match the center coordinates of each text boundary encircle obtained after scaling with the center coordinates of the unit grid corresponding to each network point coordinate, to obtain the unit grid corresponding to each text boundary encircle; fill the description content corresponding to each text boundary encircle into the corresponding unit grid in the spatial coordinate network, to obtain the target CAD table.

[0110] The boundary point coordinates corresponding to each text boundary encirclement include: point coordinates corresponding to multiple first direction line segments and point coordinates corresponding to multiple second direction line segments. When scaling the boundary point coordinates corresponding to each text boundary encirclement, it may include: scaling the point coordinates corresponding to multiple first direction line segments based on the first line segment scaling ratio; scaling the point coordinates corresponding to multiple second direction line segments based on the second line segment scaling ratio.

[0111] The center coordinates of the text boundary encircle may be the centroid coordinates of the text boundary encircle. Matching the center coordinates of each text boundary encircle obtained after scaling with the center coordinates of the unit grid corresponding to each network point coordinate to obtain the unit grid corresponding to each text boundary encircle may include: if the difference between the center coordinates of a text boundary encircle and the center coordinates of the unit grid corresponding to a network point coordinate is the smallest, determining the unit grid corresponding to the network point coordinate as the unit grid corresponding to the text boundary encircle.

[0112] Therefore, through the unit grid mapping method, the unit grid corresponding to the information in the original CAD table can be effectively filled, so as to ensure the accuracy of the table information.

[0113] In some embodiments, before determining the spatial coordinate network based on the plurality of first direction line segments and the plurality of second direction line segments obtained after the scaling process, the method further includes:

[0114] Preprocess the multiple first direction line segments obtained after the scaling process to update the multiple first direction line segments obtained after the scaling process; preprocess the multiple second direction line segments obtained after the scaling process to update the multiple second direction line segments obtained after the scaling process.

[0115] The preprocessing includes: merging overlapping line segments and / or deleting duplicate line segments.

[0116] For example, suppose the line segment l AB By endpoint A and endpoints B Composition, line segment l CD By endpoint C and endpoints D Among them, the vector With vector Angle ,vector With vector Angle .

[0117] If the line segment l AB With line segment l CD If they are collinear and the first and last endpoints completely coincide, then it is as shown in formula (8).

[0118] (8)

[0119] If the line segment l AB With line segment l CDCollinear, with endpoints A With line segment l CD If the endpoints coincide, then the equation is as shown in formula (9).

[0120] (9)

[0121] If the line segment l AB With line segment l CD Collinear, with endpoints B With line segment l CD If the endpoints coincide, then the equation is as shown in formula (10).

[0122] (10)

[0123] If the line segment l AB With line segment l CD If they are collinear and the first and last endpoints do not overlap, then it is as shown in formula (11).

[0124] (11)

[0125] In summary, for l AB With line segment l CD If they are co-linear and have an intersection, merge the two line segment objects.

[0126] Therefore, by preprocessing the multiple first direction line segments obtained after the scaling process and preprocessing the multiple second direction line segments obtained after the scaling process, duplicate line segments are effectively excluded and overlapping line segments are merged, thereby further optimizing the CAD table.

[0127] S150, performing table data recognition on the target CAD table to obtain a table information reading result of the target CAD table.

[0128] Among them, table recognition technology can be used to identify the table data of the target CAD table, so as to write the identified data into the created Excel table, complete the import of CAD table data into the Excel table, and obtain the table information reading result of the target CAD table.

[0129] In this embodiment, the data object information of the initial CAD table is obtained. The initial CAD table is used to describe a CAD table with a multi-line border. The data object information includes: the endpoint coordinates of the line segments contained in the table and the description content of the text contained in the table. The line segments contained in the table include: multiple first-direction line segments and multiple second-direction line segments, and the first-direction line segments are perpendicular to the second-direction line segments; the endpoint coordinates of the multiple first-direction line segments and the endpoint coordinates of the multiple second-direction line segments are scaled respectively; based on the multiple first-direction line segments and the multiple second-direction line segments obtained after the scaling process, a spatial coordinate network is determined; the spatial coordinate network is filled with content based on the description content of the text contained in the table to obtain a target CAD table; the target CAD table is identified for table data to obtain the table information reading result of the target CAD table. In this way, by scaling the data object information of the initial CAD table to simplify the multiple line segments in the initial CAD table, the problem of mixed multi-line table edges affecting information recognition is avoided, and the information recognition efficiency of the CAD table is effectively improved.

[0130] Figure 7 This is a schematic diagram of the structure of a CAD table information reading device provided in this embodiment. The CAD table information reading device may include: an acquisition module 710, a processing module 720, a determination module 730, a filling module 740 and an identification module 750.

[0131] Acquisition module 710 is used to acquire data object information of an initial CAD table, where the initial CAD table is used to describe a CAD table with a multi-line border, and the data object information includes: the endpoint coordinates of the line segments contained in the table and the description content of the text contained in the table, and the line segments contained in the table include: a plurality of first direction line segments and a plurality of second direction line segments, where the first direction line segments are perpendicular to the second direction line segments.

[0132] The processing module 720 is used to perform scaling processing on the endpoint coordinates of multiple first-direction line segments and the endpoint coordinates of multiple second-direction line segments respectively.

[0133] The determination module 730 is used to determine a spatial coordinate network based on the multiple first direction line segments and the multiple second direction line segments obtained after the scaling process.

[0134] The filling module 740 is used to fill the space coordinate network with content based on the description content of the text contained in the table to obtain a target CAD table.

[0135] The identification module 750 is used to perform table data identification on the target CAD table to obtain the table information reading result of the target CAD table.

[0136] In this embodiment, optionally, the processing module 720 includes: a first determining unit, a second determining unit, and a processing unit.

[0137] The first determining unit is used to determine the corresponding first line segment scaling ratio based on the corresponding plurality of first direction line segments in the initial CAD table.

[0138] The second determining unit is used to determine the corresponding second line segment scaling ratio based on the corresponding plurality of second direction line segments in the initial CAD table.

[0139] The processing unit is used to scale the endpoint coordinates of each first-direction line segment based on the first line segment scaling ratio; and to scale the endpoint coordinates of each second-direction line segment based on the second line segment scaling ratio.

[0140] In this embodiment, optionally, the first determining unit is specifically configured to:

[0141] Detect whether there is corresponding table-containing text between every two adjacent line segments in a plurality of first-direction line segments; if there is not corresponding table-containing text between every two adjacent line segments in a plurality of first-direction line segments, determine first interval matrix data based on the line segment interval distance between every two adjacent line segments in a plurality of first-direction line segments; determine a first algorithm segmentation threshold based on the first interval matrix data, the first algorithm segmentation threshold being the optimal segmentation threshold corresponding to the first interval matrix data determined by a preset algorithm; determine a first line segment scaling ratio based on a relationship between the line segment interval distance between every two adjacent line segments in a plurality of first-direction line segments and the first algorithm segmentation threshold, and a detection result that there is corresponding table-containing text between every two adjacent line segments in a plurality of first-direction line segments.

[0142] In this embodiment, optionally, the second determining unit is specifically configured to:

[0143] Detect whether there is corresponding table-containing text between every two adjacent line segments in the multiple second direction line segments; if there is not corresponding table-containing text between every two adjacent line segments in the multiple second direction line segments, determine the second interval matrix data based on the line segment interval distance between every two adjacent line segments in the multiple second direction line segments; determine the second algorithm segmentation threshold based on the second interval matrix data, the second algorithm segmentation threshold is the optimal segmentation threshold corresponding to the second interval matrix data determined by a preset algorithm; determine the second line segment scaling ratio based on the relationship between the line segment interval distance between every two adjacent line segments in the multiple second direction line segments and the second algorithm segmentation threshold, and the detection result that there is corresponding table-containing text between every two adjacent line segments in the multiple second direction line segments.

[0144] In this embodiment, optionally, the determination module 730 is specifically configured to:

[0145] Based on multiple first-direction line segments and multiple second-direction line segments obtained after scaling processing, an initial coordinate network is constructed according to the line segment connection relationship, and the initial coordinate network includes: multiple network point coordinates; a plane coordinate system corresponding to each network point coordinate is established with each network point coordinate as the center and the first direction and the second direction as the coordinate axis; based on the second quadrant angular intersection point and the fourth quadrant angular intersection point in the plane coordinate system corresponding to each network point coordinate, a quadrant connection line segment corresponding to each network point coordinate is formed; based on the intersection state data of the quadrant connection line segment corresponding to the network point coordinate, a unit grid corresponding to each network point coordinate is determined, and the intersection state data is used to describe whether the quadrant connection line segment corresponding to the corresponding network point coordinate has an intersection relationship with other line segments; based on the determination of the unit grid corresponding to each network point coordinate, a spatial coordinate network is determined.

[0146] In this embodiment, optionally, the filling module 740 is specifically used to:

[0147] Get multiple text boundary encircles corresponding to the text in the table, each text boundary encircle has corresponding boundary point coordinates; scale the boundary point coordinates corresponding to each text boundary encircle; match the center coordinates of each text boundary encircle obtained after scaling with the center coordinates of the unit grid corresponding to each network point coordinate, to obtain the unit grid corresponding to each text boundary encircle; fill the description content corresponding to each text boundary encircle into the corresponding unit grid in the spatial coordinate network, to obtain the target CAD table.

[0148] In this embodiment, optionally, it also includes: an update module.

[0149] An updating module is used to pre-process multiple first-direction line segments obtained after scaling processing so as to update the line segments of the multiple first-direction line segments obtained after scaling processing; and to pre-process multiple second-direction line segments obtained after scaling processing so as to update the line segments of the multiple second-direction line segments obtained after scaling processing; wherein the pre-processing includes: merging overlapping line segments and / or deleting duplicate line segments.

[0150] The CAD table information reading device provided in the present disclosure can execute the above method embodiments. Its specific implementation principles and technical effects can be found in the above method embodiments, and the present disclosure will not repeat them here.

[0151] The present application also provides a computer device. Figure 8 , Figure 8 This is a basic structural block diagram of the computer device in this embodiment.

[0152] The computer device includes a memory 810 and a processor 820 that are connected to each other through a system bus. It should be noted that the figure only shows a computer device with a memory 810 and a processor 820, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0153] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.

[0154] The memory 810 includes at least one type of readable storage medium, and the readable storage medium includes a non-volatile memory or a volatile memory, such as a flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory, etc.), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc., and the RAM may include a static RAM or a dynamic RAM. In some embodiments, the memory 810 may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 810 may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, or a flash card (Flash Card), etc., equipped on the computer device. Of course, the memory 810 may also include both an internal storage unit of the computer device and an external storage device thereof. In this embodiment, the memory 810 is generally used to store an operating system and various application software installed on the computer device, such as the program code of the above method, etc. In addition, the memory 810 may also be used to temporarily store various data that have been output or are to be output.

[0155] The processor 820 is generally used to perform the overall operation of the computer device. In this embodiment, the memory 810 is used to store program codes or instructions, the program code includes computer operation instructions, and the processor 820 is used to execute the program codes or instructions stored in the memory 810 or process data, such as running the program code of the above method.

[0156] In this article, the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus system can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0157] Another embodiment of the present application also provides a computer-readable medium, which may be a computer-readable signal medium or a computer-readable medium. A processor in a computer reads a computer-readable program code stored in the computer-readable medium, so that the processor can execute the functional actions specified in each step or a combination of steps in the above method; and generate a device for implementing the functional actions specified in each block or a combination of blocks in the block diagram.

[0158] Computer-readable media include but are not limited to electronic, magnetic, optical, electromagnetic, infrared memory or semiconductor systems, devices or apparatuses, or any appropriate combination of the foregoing, the memory is used to store program codes or instructions, the program codes include computer operating instructions, and the processor is used to execute the program codes or instructions of the above methods stored in the memory.

[0159] For the definitions of memory and processor, please refer to the description of the aforementioned computer device embodiment and will not be repeated here.

[0160] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0161] Each functional unit or module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0162] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store program codes.

[0163] In the claims, any reference symbols placed between brackets shall not be construed as limiting the claims. The word "comprising" described in the present application does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application can be implemented with the aid of hardware comprising several different elements and with the aid of a suitably programmed computer. In a unit claim that lists a number of devices, several units of these devices may be embodied by the same hardware item. The use of first, second, and third, etc. does not indicate any order, and these words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

[0164] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for reading CAD table information, characterized in that: include: Acquire data object information of an initial CAD table, the initial CAD table is used to describe a CAD table with a multi-line border, the data object information includes: endpoint coordinates of line segments contained in the table and description content of text contained in the table, the line segments contained in the table include: a plurality of first direction line segments and a plurality of second direction line segments, the first direction line segments are perpendicular to the second direction line segments; Respectively scaling the endpoint coordinates of a plurality of first-direction line segments and the endpoint coordinates of a plurality of second-direction line segments; Preprocessing the plurality of first-direction line segments obtained after the scaling process to update the plurality of first-direction line segments obtained after the scaling process; preprocessing the plurality of second-direction line segments obtained after the scaling process to update the plurality of second-direction line segments obtained after the scaling process; wherein the preprocessing includes: merging overlapping line segments and / or deleting duplicate line segments; Determine a spatial coordinate network based on the plurality of first direction line segments and the plurality of second direction line segments obtained after scaling; Filling the spatial coordinate network with content based on the description content of the text contained in the table to obtain a target CAD table; The target CAD table is subjected to table data recognition to obtain a table information reading result of the target CAD table.

2. The method according to claim 1, characterized in that The scaling process of respectively scaling the endpoint coordinates of the plurality of first-direction line segments and the endpoint coordinates of the plurality of second-direction line segments comprises: Determining a corresponding first line segment scaling ratio based on a plurality of first direction line segments corresponding to the initial CAD table; Determining a corresponding second line segment scaling ratio based on a plurality of corresponding second direction line segments in the initial CAD table; Based on the first line segment scaling ratio, the endpoint coordinates of each first-direction line segment are scaled; and based on the second line segment scaling ratio, the endpoint coordinates of each second-direction line segment are scaled.

3. The method according to claim 2, characterized in that The determining the corresponding first line segment scaling ratio based on the corresponding plurality of first direction line segments in the initial CAD table includes: Detecting whether the text contained in the table corresponds to between every two adjacent line segments in the plurality of line segments in the first direction; If the table-containing text does not correspond to every two adjacent line segments in the plurality of first-direction line segments, determining first interval matrix data based on the line segment interval distance between every two adjacent line segments in the plurality of first-direction line segments; Determine a first algorithm segmentation threshold based on the first interval matrix data, where the first algorithm segmentation threshold is an optimal segmentation threshold corresponding to the first interval matrix data determined by a preset algorithm; The first line segment scaling ratio is determined based on the relationship between the line segment spacing distance between every two adjacent line segments in the first direction and the first algorithm segmentation threshold, and the detection result that there is text contained in the table between every two adjacent line segments in the first direction.

4. The method according to claim 3, characterized in that The determining the corresponding second line segment scaling ratio based on the plurality of second direction line segments corresponding to the initial CAD table includes: Detecting whether the text contained in the table corresponds to between every two adjacent line segments in the plurality of line segments in the second direction; If the table-containing text does not correspond to every two adjacent line segments in the plurality of second-direction line segments, determining the second interval matrix data based on the line segment interval distance between every two adjacent line segments in the plurality of second-direction line segments; Determine a second algorithm segmentation threshold based on the second interval matrix data, where the second algorithm segmentation threshold is an optimal segmentation threshold corresponding to the second interval matrix data determined by the preset algorithm; The second line segment scaling ratio is determined based on the relationship between the line segment spacing distance between each two adjacent line segments in the second direction and the second algorithm segmentation threshold, and the detection result that the text contained in the table corresponds to between each two adjacent line segments in the second direction.

5. The method according to claim 1, characterized in that The determining of the spatial coordinate network based on the plurality of first direction line segments and the plurality of second direction line segments obtained after the scaling process comprises: Based on the plurality of first direction line segments and the plurality of second direction line segments obtained after the scaling process, an initial coordinate network is constructed according to the line segment connection relationship, wherein the initial coordinate network includes: a plurality of network point coordinates; Taking each of the network point coordinates as the center and the first direction and the second direction as the coordinate axes, a plane coordinate system corresponding to each of the network point coordinates is established; Based on the second quadrant angle intersection point and the fourth quadrant angle intersection point in the plane coordinate system corresponding to each of the network point coordinates, forming a quadrant connecting line segment corresponding to each of the network point coordinates; Determine the unit grid corresponding to each of the network point coordinates based on the intersection state data of the quadrant connection line segments corresponding to the network point coordinates, wherein the intersection state data is used to describe whether the quadrant connection line segment corresponding to the corresponding network point coordinate has an intersection relationship with other line segments; The spatial coordinate network is determined based on determining the unit grid corresponding to each of the network point coordinates.

6. The method according to claim 5, characterized in that The filling of the spatial coordinate network with content based on the description content of the text contained in the table to obtain a target CAD table includes: Obtain multiple text boundary encircles corresponding to the text contained in the table, each of the text boundary encircles corresponding to boundary point coordinates; Scaling the coordinates of the boundary points corresponding to each of the text boundary encirclements; Matching the center coordinates of each of the text boundary encircles obtained after the scaling process with the center coordinates of the unit grid corresponding to each of the network point coordinates to obtain the unit grid corresponding to each of the text boundary encircles; The description content corresponding to each text boundary enclosing circle is filled into the corresponding unit grid in the spatial coordinate network to obtain the target CAD table.

7. A CAD table information reading device, characterized in that: include: An acquisition module is used to acquire data object information of an initial CAD table, wherein the initial CAD table is used to describe a CAD table with a multi-line border, wherein the data object information includes: endpoint coordinates of line segments contained in the table and description content of text contained in the table, wherein the line segments contained in the table include: a plurality of first direction line segments and a plurality of second direction line segments, wherein the first direction line segments are perpendicular to the second direction line segments; A processing module, used for respectively performing scaling processing on the endpoint coordinates of a plurality of first-direction line segments and the endpoint coordinates of a plurality of second-direction line segments; An updating module, used for preprocessing the plurality of first-direction line segments obtained after the scaling process, so as to update the plurality of first-direction line segments obtained after the scaling process; and preprocessing the plurality of second-direction line segments obtained after the scaling process, so as to update the plurality of second-direction line segments obtained after the scaling process; wherein the preprocessing includes: merging overlapping line segments and / or deleting duplicate line segments; A determination module, configured to determine a spatial coordinate network based on a plurality of first direction line segments and a plurality of second direction line segments obtained after scaling; A filling module, used for filling the spatial coordinate network with content based on the description content of the text contained in the table to obtain a target CAD table; The recognition module is used to perform table data recognition on the target CAD table to obtain the table information reading result of the target CAD table.

8. A computer device, characterized in that: The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, a method for reading CAD table information as described in any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the CAD table information reading method as described in any one of claims 1 to 6 is implemented.