A method, apparatus, equipment, and medium for tabular recognition of tunnel longitudinal profile drawings.

By using a collision detection algorithm model to automatically identify tunnel longitudinal profile drawings during tunnel construction, the problem of time-consuming and labor-intensive table recognition in tunnel longitudinal profile drawings has been solved, achieving efficient table recognition and saving labor costs.

CN118470732BActive Publication Date: 2026-07-31GLODON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GLODON CO LTD
Filing Date
2024-05-23
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

During tunnel construction, the identification of tables in the tunnel longitudinal profile drawings is time-consuming, inefficient, and costly. Existing technologies mainly rely on manual identification, resulting in low efficiency.

Method used

A collision detection algorithm model is used to automatically identify the longitudinal section drawings of the tunnel. The border line information and cell position of the table are extracted by the wireframe recognition technology to achieve automatic table recognition.

Benefits of technology

It improves the efficiency of table recognition in tunnel longitudinal profile drawings, saves labor costs, and provides convenience for subsequent table content processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470732B_ABST
    Figure CN118470732B_ABST
Patent Text Reader

Abstract

This invention relates to the field of computer-aided technology, specifically disclosing a method, apparatus, device, and medium for table recognition in tunnel longitudinal profile drawings. Applied to a client-side application, the client has a function for recognizing geological longitudinal profiles. The method includes: upon receiving a tunnel longitudinal profile drawing imported by a user, parsing the drawing to obtain line element information, and displaying a tunnel longitudinal profile view containing the line element information; if the geological longitudinal profile recognition function is triggered, using a collision detection algorithm model to perform wireframe recognition on at least one table in the tunnel longitudinal profile view, obtaining the position information and border line information of each cell in the at least one table. This method achieves automatic table recognition in tunnel longitudinal profile drawings, avoiding the time-consuming and labor-intensive manual recognition, improving the efficiency of table recognition in tunnel longitudinal profile drawings, saving labor costs, and providing convenience for subsequent table content processing and implementation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer-aided technology, and in particular to a method, apparatus, device, and medium for table recognition of tunnel longitudinal profile drawings. Background Technology

[0002] In tunnel construction, lining and pre-support are crucial construction measures. Lining is used to maintain the stability of the surrounding rock; different sections have different rock grades, requiring different support structures. Pre-support is an auxiliary measure to ensure the stability of the tunnel excavation face, and its requirements also vary from section to section. These differences are reflected in the drawings; therefore, these factors must be considered when extracting geological longitudinal profile information.

[0003] With the development of information technology, more and more highway engineering cost estimators are starting to use 3D model quantity calculation software. In the process of calculating tunnel construction quantities, identifying and extracting tunnel longitudinal section drawing information is a tedious task, because most of the identification and extraction work is currently done manually, which is time-consuming, labor-intensive, costly, and inefficient. Summary of the Invention

[0004] To address the problems of time-consuming, inefficient, and costly table extraction from tunnel longitudinal profile drawings, this invention provides a method, apparatus, equipment, and medium for table recognition in tunnel longitudinal profile drawings. The specific technical solution disclosed is as follows:

[0005] In a first aspect, the present invention discloses a method for table recognition of tunnel longitudinal profile drawings, applied to a client-side application. This client-side application has a function for recognizing geological longitudinal profiles. The method includes: when receiving a tunnel longitudinal profile drawing imported by a user, parsing the tunnel longitudinal profile drawing to obtain line element information, wherein the tunnel longitudinal profile drawing includes: a tunnel longitudinal profile thumbnail and at least one table, each table consisting of multiple cells, and the line element information is used to extract the border line information of at least one table; displaying a tunnel longitudinal profile view containing the line element information; if the geological longitudinal profile recognition function is triggered, using a collision detection algorithm model to perform wireframe recognition on at least one table in the tunnel longitudinal profile view, obtaining the position information and border line information of each cell contained in at least one table.

[0006] The method provided in this paper automatically identifies the imported tunnel longitudinal profile drawings when the user triggers the geological longitudinal profile identification function. It uses a collision detection algorithm model to identify the wireframe of at least one table in the current tunnel longitudinal profile view, and obtains the position information and border line information of each cell in the table. This achieves automatic identification of tables in tunnel longitudinal profile drawings, avoiding the time-consuming and labor-intensive manual identification. This method improves the efficiency of table identification in tunnel longitudinal profile drawings, saves labor costs, and provides convenience for subsequent table content processing and implementation.

[0007] In conjunction with the first aspect, in one possible implementation, displaying a tunnel longitudinal profile view containing line primitive information further includes: displaying controls for identifying geological longitudinal profiles;

[0008] If the geological longitudinal section recognition function is triggered, the process includes: triggering the geological longitudinal section recognition function upon receiving a user's selection operation on the control. This embodiment includes a control for the geological longitudinal section recognition function on the client side; when this control is triggered, the method flow for starting the geological longitudinal section table recognition is as follows.

[0009] In conjunction with the first aspect, in one possible implementation, a collision detection algorithm model is used to perform wireframe recognition on at least one table in the tunnel longitudinal profile view to obtain the position information and border line information of each cell contained in at least one table. This includes: scanning the tunnel longitudinal profile view using a preset line to identify the pagination area of ​​the tunnel longitudinal profile view; performing table border recognition and table position recognition on at least one table contained in the pagination area, and determining the target table therefrom; using a collision detection algorithm model to identify the table header area and table body area of ​​the target table; and identifying each cell contained in the table header area and table body area respectively to obtain the position information and border line information of each cell.

[0010] In this embodiment, a collision detection algorithm model is used to first identify the outer frame of the tunnel longitudinal section view, i.e., the pagination area. Then, the pagination area of ​​the outer frame is stripped away, and the inner border, as well as the table header area and table body area inside the inner border, are identified. Finally, the position information and border line information of each cell contained in the table header area and table body area are identified through collision detection, so as to realize the identification of the table in the tunnel longitudinal section drawing, and the identification granularity reaches the smallest cell.

[0011] In conjunction with the first aspect, in one possible implementation, table border recognition and table position recognition are performed on at least one table contained within the pagination area, including: calculating the range of all lines within the pagination area in the X-axis and Y-axis directions to obtain the overall circumscribed rectangle border; based on the size of the overall circumscribed rectangle border, shrinking it by a certain percentage in the vertical direction on the far left of the border to construct a scanning frame; scanning the scanning frame sequentially from left to right with a preset step size, and performing collision detection between the scanning frame and the border lines of at least one table within the pagination area to detect at least one graphic element that has collided; clustering all detected collision graphic elements to obtain the table border and table position of each table.

[0012] In conjunction with the first aspect, in one possible implementation, the collision detection algorithm model is used to identify the table header region and table body region of the target table, including: using the collision detection algorithm model to identify all vertical lines in the target table to obtain a first frame line, a second frame line, and a third frame line that meet the filtering conditions, wherein the filtering conditions are three vertical lines whose length exceeds a preset value and which are used as the first frame line, the second frame line, and the third frame line; determining the region between the first frame line and the second frame line as the table header region, and determining the region between the second frame line and the third frame line as the table body region.

[0013] This implementation uses a collision detection algorithm model to identify all vertical lines in the target table. Then, based on the length of the colliding vertical lines, three vertical lines can be determined. The first two vertical lines can determine the table header area, and the last two vertical lines can determine the table body area, providing a basis for subsequent smaller-granular cell identification.

[0014] In conjunction with the first aspect, in one possible implementation, identifying each cell contained in the table header area and obtaining the position information and border line information of each cell includes: constructing left and right position scan lines of the table header based on the border line information of the table header area; using the left and right position scan lines to perform collision and intersection with at least one horizontal border line in the table header area to determine whether there are border lines of nested rows; if so, determining the position information and border line information of each cell in the table body area based on the collision and intersection result, wherein the position information and border line information include the border lines and position information of nested rows.

[0015] In conjunction with the first aspect, in one possible implementation, each cell contained in the table body area is identified to obtain the position information and border information of each cell, including:

[0016] Obtain the top and bottom border lines of each cell in the table header area; extend the top and bottom border lines of each cell into the table body area as the top and bottom position scan lines for collision detection; use the top and bottom position scan lines to collide with at least one vertical line in the table body area to obtain the position information and border line information of each cell in the table body area; wherein the type of the vertical line connecting at least two cells in the table body area includes one or more of the following: vertical line, bracket line, and polyline.

[0017] In this implementation, collision detection can be performed using upper and lower position scanning lines to identify vertical lines between cells, thus determining the type of vertical line between two connected cells and achieving cell recognition at the smallest granularity.

[0018] In conjunction with the first aspect, in another possible implementation, if the number of tunnel longitudinal profile drawings imported by the user is N, where N ≥ 2 and is a positive integer; the pagination area of ​​the tunnel longitudinal profile view is identified by scanning the tunnel longitudinal profile view using preset lines, including:

[0019] Based on the horizontal scanning clustering algorithm, the N tunnel longitudinal profile views are subjected to a top-to-bottom collision scan using a first preset line, and the line results after the collision scan are clustered to obtain the first group of frame lines in the horizontal direction; based on the vertical scanning clustering algorithm, the N tunnel longitudinal profile views are subjected to a left-to-right collision scan using a second preset line, and the line results after the collision scan are clustered to obtain the second group of frame lines in the vertical direction; by summarizing the first group of data and the second group of data, the pagination area of ​​the N tunnel longitudinal profile views corresponding to the N tunnel longitudinal profile drawings is obtained.

[0020] In this embodiment, for N tunnel longitudinal profile drawings, the N drawings are clustered and grouped by horizontal and vertical flat-sweep clustering algorithms, and the page area corresponding to each drawing is identified, thus realizing the identification of multi-page tunnel longitudinal profile drawings.

[0021] In conjunction with the first aspect, in another possible implementation, at least one table in the tunnel longitudinal profile drawing further includes textual and / or vector information to describe the engineering quantity information of the tunnel longitudinal profile thumbnail; after obtaining the position information and border line information of each cell contained in at least one table, it further includes:

[0022] The text and / or vector information in each cell is parsed; the text and / or vector information is inserted into a preset program code framework, and the preset program code framework is executed to pop up and display a window containing the text and / or vector information. This implementation method can directly display drawing information, including text and numbers, to the user in a pop-up window after conversion through a preset program code framework, thereby improving the efficiency of content recognition in tunnel longitudinal section drawings and enhancing the user experience.

[0023] Secondly, the present invention discloses a table recognition device for tunnel longitudinal profile drawings, the device comprising:

[0024] The receiving module is used to receive tunnel longitudinal profile drawings imported by the user. The tunnel longitudinal profile drawings include: a tunnel longitudinal profile thumbnail and at least one table, each table consisting of multiple cells.

[0025] The parsing module is used to parse the tunnel longitudinal section drawings to obtain line element information, which is used to extract the border line information of at least one table.

[0026] The display module is used to display a longitudinal section view of the tunnel containing line graphic element information;

[0027] The processing module is used to perform wireframe recognition on at least one table in the tunnel longitudinal profile view using a collision detection algorithm model when the geological longitudinal profile recognition function is triggered, so as to obtain the position information and border line information of each cell contained in at least one table.

[0028] Thirdly, the present invention also discloses an electronic device, including a processor and a memory, wherein the memory is coupled to the processor; the memory stores computer-readable program instructions, which, when executed by the processor, implement the table recognition method for tunnel longitudinal section drawings as described in the first aspect or any embodiment of the first aspect.

[0029] In addition, the present invention also discloses a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a table recognition method for tunnel longitudinal section drawings as described in the first aspect or any embodiment of the first aspect.

[0030] This invention discloses a method and apparatus for table recognition in tunnel longitudinal profile drawings. When a user triggers the geological longitudinal profile recognition function, the imported tunnel longitudinal profile drawings are automatically recognized. A collision detection algorithm model is used to perform wireframe recognition on at least one table in the current tunnel longitudinal profile view, obtaining the position information and border line information of each cell in the table. This achieves automatic recognition of tables in tunnel longitudinal profile drawings, avoiding the time-consuming and labor-intensive manual recognition. This method improves the efficiency of table recognition in tunnel longitudinal profile drawings, saves labor costs, and provides convenience for subsequent table content processing and implementation. Attached Figure Description

[0031] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0032] Figure 1 This is a schematic diagram of a tunnel longitudinal section drawing provided in an embodiment of the present invention;

[0033] Figure 2 This is a flowchart of a table recognition method for tunnel longitudinal section drawings provided in an embodiment of the present invention;

[0034] Figures 3a to 3b This is a schematic diagram of a table recognition method for tunnel longitudinal section drawings provided in an embodiment of the present invention;

[0035] Figure 4 This is a flowchart of another method for table recognition of tunnel longitudinal profile drawings provided in an embodiment of the present invention;

[0036] Figures 5a to 5e This is a schematic diagram of a collision scanning table provided in an embodiment of the present invention;

[0037] Figure 6 This is a flowchart of another method for table recognition of tunnel longitudinal profile drawings provided in an embodiment of the present invention;

[0038] Figures 7a to 7c This is a schematic diagram illustrating the identification of the table header area and the table body area provided by an embodiment of the present invention;

[0039] Figures 8a to 8e This is a schematic diagram illustrating how to identify cells contained in a table header area according to an embodiment of the present invention;

[0040] Figures 9a to 9f This is a schematic diagram illustrating an embodiment of the present invention for identifying cells contained in a table body area;

[0041] Figures 10a to 10c This is a schematic diagram of a variety of drawing recognition pagination areas provided in an embodiment of the present invention;

[0042] Figure 11 This is a flowchart of another method for table recognition of tunnel longitudinal profile drawings provided in an embodiment of the present invention;

[0043] Figure 12 This is a schematic diagram of a pop-up window provided in an embodiment of the present invention;

[0044] Figure 13 This is a structural block diagram of a table recognition device for tunnel longitudinal section drawings provided in an embodiment of the present invention;

[0045] Figure 14 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0046] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0047] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another.

[0048] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0049] Tunnel longitudinal section drawing: also known as tunnel geological longitudinal section drawing or tunnel geological longitudinal profile, refers to a cross-sectional drawing obtained by cutting and unfolding an imaginary vertical plane through the road centerline, such as... Figure 1 As shown.

[0050] The longitudinal profile drawings of the tunnel can show the longitudinal alignment of the route center, as well as information such as the undulation of the ground, the geology, and the general situation of the structures along the route. Figure 1 The tunnel longitudinal section drawings consist of two main parts: a sample drawing and a data table.

[0051] The sample drawing includes a scale and two main lines. Specifically, the scale is smaller in the horizontal direction than in the vertical direction, typically 1:5000 for the horizontal and 1:500 for the vertical. The two main lines in the drawing are the original ground elevation line (represented by an irregular thin broken line) and the design ground elevation line (represented by a medium-thick solid line). By comparing these two line types, the location and height of fill and cut sections can be determined.

[0052] In addition, the tunnel longitudinal profile drawings also indicate specific information reflecting the surrounding rock conditions, lining type, and construction methods at various mileage sections along the entire route during the tunnel construction quantity calculation process, thus providing an important basis for tunnel construction quantity calculation.

[0053] Optionally, the tunnel longitudinal section drawings can be in PDF format.

[0054] The technical solution provided in this embodiment will be described in detail below.

[0055] According to an embodiment of the present invention, a table recognition method for tunnel longitudinal profile drawings is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0056] This embodiment provides a method for table recognition in tunnel longitudinal profile drawings. This method can automatically recognize tables in tunnel longitudinal profile drawings, thereby saving labor costs and improving table recognition efficiency.

[0057] This method can be applied to a client, which includes, but is not limited to, mobile terminals such as PCs, tablets, smartphones, wireless terminal devices, mobile terminals, and wearable devices. The client includes a function to identify geological longitudinal sections, which can be implemented through software, hardware, or a combination of both, such as through a software app.

[0058] See Figure 2 This is a flowchart of a table recognition method for tunnel longitudinal section drawings according to an embodiment of the present invention. This method is applied to the aforementioned client. Specifically, the method includes the following steps:

[0059] Step 101: When receiving the tunnel longitudinal section drawing imported by the user, parse the tunnel longitudinal section drawing to obtain line element information.

[0060] The tunnel longitudinal profile drawing includes: a thumbnail of the tunnel longitudinal profile and at least one table. Each table consists of multiple cells, and line graph information is used to extract the border line information of the at least one table. Each small cell in the table is called a "cell".

[0061] For example, see Figure 1 As shown, the tunnel's longitudinal profile thumbnail shows the tunnel above a high mountain. Furthermore, the thumbnail includes descriptive information about geological conditions, such as the design line, ground line, and rock strata. Below the tunnel's longitudinal profile thumbnail and in the blank space, there is at least one table, such as... Figure 1 As shown, there is a table in the upper left corner titled "Statistics Table of Surrounding Rock and Lining Length of Left Line". Below the tunnel longitudinal profile thumbnail is another table that describes the relevant geological information of the tunnel longitudinal profile thumbnail above.

[0062] The contents of the tunnel longitudinal profile thumbnail and at least one table can be referred to as graphic elements or graphic data. Graphic data is the basic element constituting the tunnel longitudinal profile drawing, mainly including data on various line segments, points, curves, and other graphic elements reflecting the longitudinal profile features of the tunnel route. This data is represented on the drawing as various lines, symbols, and text, used to describe information such as the tunnel's orientation, gradient, elevation, and cross-sectional shape. By parsing and processing the graphic data, the tunnel's longitudinal profile table can be identified, thus providing crucial basic data support for the tunnel's construction, operation, and maintenance.

[0063] Since the tunnel longitudinal section drawings imported by users may contain one or more image data elements, the system needs to distinguish between multiple image data elements and determine each image data element, including one type of image data element which is the location information of the cell and the border line information.

[0064] Step 102: Display a longitudinal section view of the tunnel containing the line element information.

[0065] When a user imports a PDF version of a tunnel longitudinal section drawing into the client software, the software receives the PDF drawing data, parses it, generates line element information, and saves it as an internal GAD drawing file. This line element information includes the line's position, color, line type, line width, and a unique identifier (ID). Furthermore, the software displays this generated line element information on the client's interface, such as... Figure 3a As shown, since the accompanying drawings in this embodiment cannot display color, they are represented only by black, white and gray lines.

[0066] It should be understood that lines, text, and other information on the actual display interface can be displayed in different colors to facilitate identification and differentiation.

[0067] Optionally, the software used for parsing can be a highway quantity calculation software or other software, and this embodiment does not limit it.

[0068] Step 103: Detect whether the geological longitudinal section function has been triggered.

[0069] Specifically, when a user imports tunnel longitudinal profile drawings into the software, the software will display controls for recognizing geological longitudinal profiles, such as... Figure 3a As shown, the control is "Identify Geological Longitudinal Section".

[0070] When a user selects the "Identify Geological Longitudinal Section" control, such as clicking the control, the function to identify the geological longitudinal section is activated. Conversely, if the user does not click the control, the function is not activated.

[0071] Alternatively, another implementation involves the user triggering a button to batch recognize geological longitudinal profile maps, using a mouse selection tool to ensure the entire table area is selected. The system receives a right-click from the user and, in response, triggers the geological longitudinal profile recognition algorithm to begin recognizing the geological longitudinal profile maps.

[0072] Step 104: If yes, that is, the geological longitudinal section identification function is triggered and started, then the collision detection algorithm model is used to perform wireframe identification on at least one table in the tunnel longitudinal section view to obtain the position information and border line information of each cell contained in the at least one table.

[0073] The collision detection algorithm model is a pre-set model of the software system, used to identify the wireframes of at least one table in the tunnel longitudinal section view, and output the position information and border line information of each cell after identification. The collision detection algorithm model includes one or more algorithms, such as a collision detection algorithm based on geometric space, or more fine-grained algorithms such as BSP tree, also known as a bipartite tree.

[0074] See Figure 3b This is the output of the collision detection algorithm model, which includes information such as the table header, row index, table area, cell position range, and cell sequence index within a single row. Finally, this information is displayed, for example, using different colors and lines to show the position and border information of each cell. Figure 3b The example shown uses black, white, and gray lines to display the recognition results.

[0075] The method provided in this embodiment automatically identifies the imported tunnel longitudinal profile drawing when the user triggers the geological longitudinal profile identification function. It uses a collision detection algorithm model to identify the wireframe of at least one table in the current tunnel longitudinal profile view, and obtains the position information and border line information of each cell in the table. This realizes the automatic identification of tables in the tunnel longitudinal profile drawing, avoiding the time-consuming and labor-intensive manual identification. This method improves the efficiency of table identification in tunnel longitudinal profile drawings, saves labor costs, and provides convenience for subsequent table content processing and implementation.

[0076] Optionally, in one specific implementation, such as Figure 4 As shown, step 104 above, the process of using a collision detection algorithm model to perform wireframe recognition on at least one table in the tunnel longitudinal section view, specifically includes:

[0077] Step 1041: Scan the tunnel longitudinal section view using a preset line to identify the pagination area of ​​the tunnel longitudinal section view.

[0078] In this embodiment, a step-by-step peeling method from the outside in is used to identify the border line information and position information in the table, ultimately identifying the smallest granular cell. Further, the identification process from the outside in specifically includes: pagination area identification, table area identification, header and row area identification, header row information identification, header column information identification, table row information area row boundary identification, and single-row cell boundary identification, among other operations.

[0079] This step begins with the identification of the pagination area. Because a long tunnel longitudinal section requires N tunnel longitudinal section drawings to represent it, and often a single drawing cannot show the entire tunnel longitudinal section (N≥2 and is a positive integer), this step, pagination area identification, is necessary.

[0080] Step 1042: Perform table border recognition and table position recognition on at least one table contained in the pagination area, and determine the target table from there.

[0081] This step involves identifying the table area. The specific identification process includes:

[0082] First, calculate the span of all lines within the pagination area in the X and Y directions to obtain the overall bounding rectangle. Specifically, based on the pagination area (Area) obtained in step 1041, traverse each dataset C within that area, calculating the maximum and minimum total span of all lines in the X and Y directions for each dataset C. This yields the overall bounding rectangle, which can be represented as a box. Figure 5aAs shown, three tables are identified: Table 1, Table 2, and Table 3.

[0083] Then, based on the size of the overall bounding rectangle, a certain percentage is shrunk vertically on the leftmost side of the bounding rectangle to construct the scan frame. Specifically, the overall bounding rectangle Box obtained above is used to construct the scan bounding rectangle (ScanRect) by shrinking its height by 10% on the leftmost side in the vertical direction, as shown above. Figure 5b As shown.

[0084] Optionally, in one example, the percentage of contraction is 10%. For specific examples, see... Figure 5c As shown, the scanning frame is obtained by shrinking the top and bottom boundaries inward by 10% in principle.

[0085] It should be understood that the shrinkage percentage can also be customized by the system or the user, and this embodiment does not impose any restrictions.

[0086] Then, scan from left to right with a starting step size of 100 mm (preset step size). The lines are detected by collision detection between the scanning frame and the bounding rectangle of the lines. When a line is detected, the scanning step size is adjusted to the width of the line in the horizontal direction. When no object is collided, the scanning step size is adjusted to 100 mm.

[0087] Finally, by continuously reducing the width of the scan line, the continuity of the outer frame of the primitive data is determined. If it is continuous, it indicates the entire outer frame; otherwise, it indicates internal table information. This distinguishes between the outer frame and the internal table, and the outer frame is then removed. In other words, all primitives that are detected to have collisions are clustered to obtain the table border and table position for each table.

[0088] In addition, the scanning frame can also be a preset scanning line, which is used to perform a translational scan on the border lines in the image data. The translational scan is performed according to a preset step size and direction.

[0089] In this embodiment, the scan line is an important tool or technique. It is a preset, translational line or thin frame that scans the graphic element data according to a certain step size and direction. The scan line is translated according to a preset step size and direction. The preset step size refers to, for example, scanning from left to right with an initial step size of 100 mm. The line is detected by collision detection between the scan frame and the outer rectangle of the line. When a line is detected, the scanning step size is adjusted to the width of the line in the horizontal direction; when no collision is detected, the scanning step size is adjusted back to 100 mm. Figure 5d As shown.

[0090] This embodiment employs a collision detection method, or geometric space collision detection algorithm, to scan the wireframe. Geometric space collision detection algorithms primarily perform intersection calculations based on the geometric features of 3D objects to determine whether collisions occur between them. Some common geometric space-based collision detection algorithms include: spatial partitioning algorithms, distance tracking methods, hierarchical bounding box methods, the Separating Axis Theorem (SAT), and Oriented Bounding Box (OBB).

[0091] This application primarily employs a spatial partitioning algorithm, which divides the scene into different regions according to certain rules, such as uniform mesh, octree, kd-dimensional tree, and BSP (Binary Space Partitioning) tree. During collision detection, only models located in the same or adjacent regions need to be detected, which significantly reduces the number of combined tests and thus improves the efficiency of the separation test phase.

[0092] Furthermore, the BSP tree, also known as a binary space partitioning tree, has a binary tree structure. For an n-dimensional space, it recursively divides the space into multiple subspace pairs using any n-1 hyperplanes. In most scenarios, the BSP tree can achieve the same effect as a kd-tree and an octree. In this step, the BSP tree can be used to implement collision detection for all primitives.

[0093] If, during the horizontal scanning process, a state change occurs from no collision detected primitives, to collision detected at least one primitive, and then back to no collision detected primitives, the primitives detected during this period are grouped together, i.e., clustering is performed. This yields the table borders and table positions for each table, thus obtaining the vertical clustering results. For example... Figure 5e As shown, after clustering, three tables are obtained, along with the borders and positions of each table.

[0094] Based on the above Figure 5e For example, after collision detection and clustering, the table borders and position information are obtained.

[0095] After identifying the borders and positions of each table, the largest table is selected as the target table because it contains more information and has a more complex structure. In this example, the target table is represented by Table1.

[0096] Optionally, other tables can be selected as the target table, but this embodiment does not limit this.

[0097] Step 1043: Use the collision detection algorithm model to identify the table header region and table body region of the target table.

[0098] This step involves identifying the header and body regions of the target table. The identification method still uses a collision detection algorithm model, such as the aforementioned spatial partitioning algorithm. For the specific detection process, please refer to the following description.

[0099] Step 1044: Identify each cell contained in the table header area and the table body area respectively, and obtain the position information and border line information of each cell.

[0100] See Figure 6 As shown, step 1043 above, which uses a collision detection algorithm model to identify the table header region and table body region of the target table, specifically includes:

[0101] Step 601: Use the collision detection algorithm model to identify all vertical lines in the target table to obtain the first frame line, the second frame line, and the third frame line that meet the filtering conditions. The filtering conditions are three vertical lines whose length exceeds a preset value and are used as the first frame line, the second frame line, and the third frame line.

[0102] Specifically, this includes: first, constructing a border search line, which can be built from the bottom upwards at a certain proportion, such as 30% of the height of the outer rectangle of the table area, as shown below. Figure 7a As shown, the line pointed to by the arrow is the border search line.

[0103] By performing collision detection with the bounding rectangle of all lines in the target table Table1, the vertical lines that intersect with the bounding rectangle of the search line are picked and sorted from left to right. The border line that covers the most of the entire table area in the vertical direction on the left is taken as the left border line, i.e., the first border; the border line that covers the most of the entire table area in the vertical direction immediately adjacent to the left border line is taken as the right border line of the table header, i.e., the second border; similarly, the rightmost border line is the right border line, i.e., the third border.

[0104] For example, collision detection assumes there are m bounding boxes, each with lengths L1, L2, L3, ..., Lm. The lengths of each bounding box L1, L2, L3, ..., Lm are compared with a preset length L. 预设 Size, filter for lengths greater than or equal to L 预设 The first three border lines are used as the first border line, the second border line, and the third border line, as follows: Figure 7b As shown.

[0105] Step 602: Determine the area between the first frame line and the second frame line as the table header area, and determine the area between the second frame line and the third frame line as the table body area.

[0106] Figure 7c As shown, the first border is the left border of the table header, and the second border is the right border of the table header and the left border of the row area; they are the same border. The two borders on the right (including the third border) are borders for the candidate row areas. Among them, the shortest one is the third border, and the longest one is the fourth border, which is the rightmost border.

[0107] After identifying the first to third border lines, it can be determined that the area between the left border line and the right border line of the table header is the table header area, and the area between the right border line and the third border line is the table body area.

[0108] This embodiment achieves automatic identification of the table header area and table body area in Table1. Finally, it identifies the smallest cell in the table header area and table body area. Specifically, step 1044 includes: a first identification process: cell identification in the table header area; and a second identification process: cell identification in the table body area.

[0109] Further, the first identification process: cell identification in the table header area, that is, in step 1044 above, identifying each cell contained in the table header area, and obtaining the position information and border line information of each cell, including:

[0110] Based on the border line information of the table header area, construct the left and right position scan lines of the table header; use the left and right position scan lines to collide and intersect with at least one horizontal border line in the table header area to determine whether there are border lines of nested rows; if so, determine the position information and border line information of each cell in the table body area based on the collision and intersection results, wherein the position information and border line information include the border lines and position information of the nested rows.

[0111] In this embodiment, the table header area is part of the table header information, and it includes the table header area location information. Furthermore, the table header information also includes: row index and row cell position range information. More granularly, the cells in the table header area are divided into two types, such as... Figure 8a As shown.

[0112] Type 1: A single cell, without or without nested cells, such as the cell "Rock Grade (m)". Type 2: A cell that includes or nests other cells, more granular sub-cells, such as including: lining, lining type and length, start and end station numbers, up to 3 sub-cells, such as... Figure 8b As shown.

[0113] The first recognition process specifically includes: constructing left and right position scanning lines, that is, shifting the left edge of the table header 10 cm to the right, and then shifting the right edge of the table header 10 cm to the left, in order to prevent misjudgment due to the lack of intersection between tables in the original PDF tunnel drawing. After the shift, two search box lines are formed, as shown below. Figure 8c The two scan lines shown are the left row information scan line and the right row information scan line, respectively. The two scan lines scan inwards respectively. The lines that collide and intersect with the rectangles outside the two scan lines, and whose length in the horizontal direction is greater than 50% between the two frame lines, are used as the top and bottom edges of the header row information. Among them, the lines that collide and intersect at the same time are the top and bottom edge lines of normal rows, and the lines with a length of about 50% are the frame lines of nested rows.

[0114] One implementation includes: acquiring each vertical wireframe and each horizontal wireframe of the image data, sorting each vertical wireframe and each horizontal wireframe according to the acquisition order, and generating a wireframe sorting result.

[0115] The specific sorting process includes: based on the sorting result, determining whether the intersection points of two adjacent vertical bounding boxes and each of the horizontal bounding boxes are the same. The system will determine the intersection points of the left and right vertical lines and horizontal lines of the cell, and determine whether the intersection points are consistent. If they are consistent, it is determined that there are no nested rows in the two adjacent vertical bounding boxes, and the corresponding collision detection result of the image data is generated. Figure 8c As shown, the intersection points on both sides of the content such as the surrounding rock grade and tunnel type are the same, proving that there are no nested lines.

[0116] If there is a discrepancy, it is determined that there are nested rows in adjacent vertical bounding boxes. A new row needs to be added to the vertical bounding box with more intersections, and the corresponding collision detection result for the image data needs to be generated. For example... Figure 8b As shown, if the left vertical frame of the table header has fewer intersection points than the right frame, it indicates that there are nested rows on the right. The system will automatically generate the corresponding nested rows based on the number of intersection points. For example, if the lining corresponds to type and length, the system will automatically generate two rows for "Type" and "Length (m)" on the right based on the number of intersection points.

[0117] In this embodiment, the intersection points of adjacent vertical and horizontal wireframes are determined based on the sorting results. This helps to determine whether there are nested rows in the table cells. If nested rows exist, a new row is added to prevent nested rows from existing in the original drawing. This ensures the accuracy and completeness of the collision detection results and provides a foundation for subsequent table data analysis and processing.

[0118] like Figure 8dAs shown, after scanning with the left and right scan lines, the upper and lower boundary lines of the normal row are obtained. Similarly, after scanning with the left and right scan lines, the border lines of the nested rows will also be obtained, as shown... Figure 8e As shown. Finally, by summarizing the top and bottom borders of the normal rows and the borders of the nested rows, we obtain the position information and border information of each cell in the table header.

[0119] In this embodiment, the left and right position scanning lines collide and intersect with at least one horizontal border line in the table header area, thereby scanning each cell in the table header area and determining the cell's position information and border line information.

[0120] Similarly, in this embodiment, the method further includes: a second identification process: a cell identification process for the table body area. The table body area is part of the table body information, and the table body area includes table body area location information. In addition, the table body information also includes: table row information, cell index in a single table row, cell identifier range, range of text annotations in cells, and the type of left and right border lines of cells, such as vertical lines, bracket-like border lines, and right-angled broken lines indicating overlapping relationships.

[0121] In this embodiment, the cell borders in the table body area are also divided into three types, such as... Figure 9a As shown, it includes: Type 1: vertical line; Type 2: bracket-like border line; Type 3: right-angled broken line indicating overlapping relationship.

[0122] In addition, cell borders may include other types, which are not limited in this embodiment.

[0123] The second identification process specifically includes: obtaining the top and bottom border lines of each cell in the table header area; extending the top and bottom border lines of each cell to the table body area as the upper and lower position scanning lines for collision detection; and using the upper and lower position scanning lines to collide and intersect with at least one vertical line in the vertical direction in the table body area to obtain the position information and border line information of each cell in the table body area.

[0124] The vertical line connecting at least two cells within the table body area can be one or more of the following types: vertical line, bracket line, and polyline. These correspond to types 1 to 3 as described above, respectively.

[0125] Specifically, based on the row identification in the table header area, a search box with a height of 10% of the row height and a width equal to the width of the entire table area is constructed using the table's top and bottom borders as the top and bottom borders. Figure 9bAs shown, the two arrows indicate the top and bottom border lines, which serve as the upper and lower position scan lines for collision detection. Linear primitives that collide with or intersect the circumscribed rectangles of the upper and lower position scan lines in the vertical direction are retrieved. These linear primitives include multiple continuous line segments and single-line data, such as... Figure 9c As shown, the data that forms the cell borders after sorting is the data that forms the border lines.

[0126] Furthermore, the input data includes: the upper and lower boundary lines of the cells identified in the table header, i.e., the upper and lower position scan lines, and the left and right boundary lines of the cells; after being identified by the collision detection algorithm, the output data includes information such as the text identification area of ​​each cell in the table body area, the cell position identification area, and the category of the left and right border lines of the cells.

[0127] Specifically, this includes detecting that if both the left and right boundary lines of a cell are vertical lines, then the overlapping area of ​​the cell's text label area and the cell's position label area is the area enclosed by the top, bottom, left, and right boundary lines. The left and right boundary lines are vertical lines, such as... Figure 9d As shown, the cell type belongs to type 1: vertical line.

[0128] If a cell has square bracket-type borders on both sides, the area enclosed by the apex of the bracket and the vertical line is the cell's location area, and the area enclosed by the brackets is the text label area. For example... Figure 9e As shown, the arrow indicates that the text label area of ​​the cell is larger than the actual position area of ​​the cell, so the cell type is Type 2: square brackets are used to separate the two cells. The area enclosed by the apex of the square brackets and the vertical line is the cell's position area, and the area enclosed by the square brackets is the text label area. This is to prevent the generated table from not covering all the text information in the cell, which could lead to errors in subsequent processing.

[0129] If there are overlapping markings within the border lines, the overlapping area between the text marking area and the actual location area is the area formed by the outermost border lines. Figure 9f As shown, the cell type belongs to type 3: polyline. When there is an overlapping line indicator in the border lines of the image data, the system will automatically determine that the outermost constitutive area is the cell range.

[0130] In the process of table recognition on tunnel longitudinal profile drawings, the preset scan lines perform collision detection with the wireframes during each translation to generate collision detection results for map data. These results mainly include the position information of the wireframes, i.e., the coordinate position of the wireframes on the drawing. Through collision detection, the position information of the wireframes can be accurately determined. For example, the system obtains the horizontal axis of the table through the vertical scan lines, then obtains the vertical axis of the table through the horizontal scan lines, and then uses a preset algorithm to calculate the intersection of the horizontal and vertical axes to determine the row and column relationships of the table, thereby generating collision detection results.

[0131] It should be noted that the above embodiments of this application are as described above. Figures 3a to 3b , Figure 5c , Figures 7a to 7c , Figures 8a to 8c , Figures 9a to 9f , Figure 12 The above diagrams are only intended to illustrate table borders, preset scan lines, table borders, and table positions. They do not impose any restrictions or requirements on the text, characters, or numbers in the tables. Therefore, the blurring or unrecognizable text, characters, or numbers in the tables in the above diagrams do not affect the understanding and implementation of this solution.

[0132] In some implementations, step 101, if the number of tunnel longitudinal profile drawings imported by the user is N, where N ≥ 2 and is a positive integer, i.e., the user imports two or more tunnel longitudinal profile drawings, the step of scanning the tunnel longitudinal profile view using preset lines to identify the pagination area of ​​the tunnel longitudinal profile view includes:

[0133] Based on the horizontal scanning clustering algorithm, the N tunnel longitudinal profile views are subjected to a top-to-bottom collision scan using a first preset line, and the line results after the collision scan are clustered to obtain the first group of frame lines in the horizontal direction; based on the vertical scanning clustering algorithm, the N tunnel longitudinal profile views are subjected to a left-to-right collision scan using a second preset line, and the line results after the collision scan are clustered to obtain the second group of frame lines in the vertical direction; by summarizing the first group of data and the second group of data, the pagination area of ​​the N tunnel longitudinal profile views corresponding to the N tunnel longitudinal profile drawings is obtained.

[0134] Specifically, the pagination region identification process is as follows: First, a first parameter set is received, which includes: the position information, width, color, and line style (straight line segment or continuous straight line segment) of all lines to be identified, and the generation order information of the lines, i.e., the ID information. Then, the pagination region identification algorithm is called on the parameters in the first parameter set to identify the pagination region, and the set of lines contained in each page is obtained, such as Area1(1), Area1(2), Area1(3) to Area1(12).

[0135] Furthermore, such as Figure 10a As shown, the implementation process includes: before scanning, constructing a flat scan frame line covering the entire horizontal direction on the top side of the first parameter set, for example, a horizontal area with a height of 1 mm and a width equal to the range of the first parameter set.

[0136] Then the scanning begins, with an initial step size of 500 mm scanning from top to bottom in a cyclical manner. The lines are detected by collision detection between the scanning frame and the bounding rectangle of the lines. When a line is detected, the scanning step size is adjusted to the vertical height of the line. When no collision is found, the scanning step size is adjusted to 500 mm.

[0137] If, during the horizontal scanning process, a state change occurs from no collision detection of primitives to collision detection of primitives, and then back to no collision detection of primitives, the primitives that were detected during this period are clustered together to obtain the horizontal clustering result, such as... Figure 10a The diagram shown after scanning.

[0138] The above method and steps complete the horizontal scanning operation of N tunnel longitudinal profile drawings, and after clustering, obtain the horizontal pagination area, which is the first group of data.

[0139] This also includes: a horizontal sweep operation in the vertical direction to obtain the second group of data for the frame lines in the vertical direction. Specifically, such as... Figure 10b As shown, the process includes: clustering the input vector lines using a vertical scanning clustering algorithm to obtain grouped data (B1) of the lines in the vertical direction, which is the second parameter set. Before scanning, a scanning frame line covering the entire vertical direction is constructed on the leftmost side of the second parameter set, with a width of 1 mm and a height equal to the entire vertical area of ​​the second parameter set.

[0140] During the scanning process, the scan proceeds sequentially from left to right with an initial step size of 500 mm. The lines are detected by collision detection between the scanning frame and the bounding rectangle of the lines. When a line is detected, the scanning step size is adjusted to the horizontal height of the line; when no collision is detected, the scanning step size is adjusted to 500 mm.

[0141] If a state change occurs during the horizontal scanning process, from no collision detection of primitives to collision detection of primitives, and then back to no collision detection of primitives, the primitives that were detected during this period will be clustered into a group, thus obtaining the vertical clustering result, i.e., a second group of data.

[0142] The clustering data from the above steps is repeated, and the first and second grouped data are integrated and summarized to obtain the pagination areas of N tunnel longitudinal section views corresponding to N tunnel longitudinal section drawings, such as... Figure 10c As shown, the left side displays the input of N tunnel longitudinal profile drawings, and the right side displays the output paginated area results. Different colors can be used to distinguish grouped line information during display. This embodiment enables automatic recognition of multiple tunnel longitudinal profile drawings imported by the user, providing a basis for subsequent steps 101 to 104.

[0143] In another embodiment, the at least one table in the tunnel longitudinal profile drawing further includes textual and / or vector information for describing the engineering quantity information of the tunnel longitudinal profile thumbnail; such as Figure 11 As shown, after step 104 above, the following steps are also included:

[0144] Step 105: Parse the text information and / or vector information in each cell.

[0145] Step 106: Insert the text information and / or the vector information into a preset program code framework, execute the preset program code framework, and pop up and display a window containing the text information and / or the vector information.

[0146] Specifically, based on the parsed text and / or vector information of each cell, such as lining, type: S4a, length (m): 230, etc., this information is inserted into a preset program code framework. Running this preset program code framework generates a table containing text and / or vector information, that is, the graphic element information is filled into the table corresponding to the preset program code framework and displayed on the real interface. For example... Figure 12 As shown, this table is displayed in a pop-up window and accurately reflects the structure and content of the tunnel longitudinal section drawing, making it easy for users to read the table content information and process the data subsequently.

[0147] In addition, the preset program code framework may include, but is not limited to, computer program instructions, and the preset program code framework may be customized by the user or the system; this embodiment does not impose any restrictions on this.

[0148] This embodiment processes the graphic data in the tunnel longitudinal section drawings by parsing and scanning to generate corresponding tables, which are then displayed in a pop-up window. This improves the accuracy and efficiency of table recognition, especially when processing a large number of tunnel longitudinal section drawings. It helps engineers quickly extract the table information of the tunnel longitudinal section, thus providing assistance for subsequent processing, reducing manual workload, and saving labor costs.

[0149] This embodiment also provides a table recognition device for tunnel longitudinal profile drawings. This device is used to implement the table recognition method for tunnel longitudinal profile drawings described in the above embodiments, and will not be repeated hereafter. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0150] This embodiment provides a table recognition device for tunnel longitudinal section drawings, such as... Figure 13As shown, the device includes a receiving module 1301, a parsing module 1302, a display module 1303, and a processing module 1304. Furthermore, the device may include other units / modules, such as a storage module, etc., which are not limited in this embodiment.

[0151] The receiving module 1301 is used to receive tunnel longitudinal section drawings imported by the user.

[0152] The tunnel longitudinal section drawing includes: a tunnel longitudinal section thumbnail and at least one table, each table consisting of multiple cells, and the line graphic element information is used to extract the border line information of the at least one table.

[0153] The parsing module 1302 is used to parse the tunnel longitudinal section drawing imported by the user to obtain line element information.

[0154] Display module 1303 is used to display a longitudinal section view of the tunnel containing the line graphic information.

[0155] The processing module 1304 is used to perform wireframe recognition on at least one table in the tunnel longitudinal section view using a collision detection algorithm model if the geological longitudinal section recognition function is triggered, so as to obtain the position information and border line information of each cell contained in at least one table.

[0156] In some optional implementations, the display module 1303 is further configured to display controls for the geological longitudinal profile identification function. The processing module 1304 is further configured to trigger the activation of the geological longitudinal profile identification function upon receiving a user's selection operation on the controls.

[0157] In some optional implementations, the processing module 1304 is further configured to scan the tunnel longitudinal section view using a preset line to identify the pagination area of ​​the tunnel longitudinal section view; identify the table border and table position of at least one table contained in the pagination area, and determine the target table therefrom; identify the table header area and table body area of ​​the target table using the collision detection algorithm model; identify each cell contained in the table header area and the table body area respectively, and obtain the position information and border line information of each cell.

[0158] In some alternative implementations, the processing module 1304 is further configured to calculate the span of all lines within the pagination area in the X-axis and Y-axis directions to obtain an overall circumscribed rectangle border; based on the size of the overall circumscribed rectangle border, shrink the leftmost vertical direction of the border by a certain percentage to construct a scanning frame; scan the scanning frame sequentially from left to right with a preset step size, and perform collision detection between the scanning frame and the border lines of at least one table within the pagination area to detect at least one graphic element that has collided; cluster all detected graphic elements that have collided to obtain the table border and table position of each table.

[0159] In some alternative implementations, the processing module 1304 is further configured to use the collision detection algorithm model to identify all vertical lines in the target table, and obtain a first frame line, a second frame line, and a third frame line that meet the filtering conditions. The filtering conditions are three vertical lines whose length exceeds a preset value and are used as the first frame line, the second frame line, and the third frame line. The area between the first frame line and the second frame line is determined as the table header area, and the area between the second frame line and the third frame line is determined as the table body area.

[0160] In some alternative implementations, the processing module 1304 is further configured to construct left and right position scan lines of the table header based on the border line information of the table header area; use the left and right position scan lines to collide and intersect with at least one horizontal border line in the table header area to determine whether there are border lines of nested rows; if so, determine the position information and border line information of each cell in the table body area based on the result of the collision and intersection.

[0161] The location information and border line information include the border lines and location information of the nested rows.

[0162] In some optional implementations, the processing module 1304 is further configured to obtain the top and bottom border lines of each cell in the table header area; extend the top and bottom border lines of each cell to the table body area as the upper and lower position scan lines for collision detection; and use the upper and lower position scan lines to collide and intersect with at least one vertical line in the vertical direction in the table body area to obtain the position information and border line information of each cell in the table body area.

[0163] The type of vertical line connecting at least two cells within the table body area includes one or more of the following: vertical line, bracket line, and broken line.

[0164] Furthermore, in some optional implementations, if the number of tunnel longitudinal profile drawings imported by the user received by the receiving module 1301 is N, where N ≥ 2 and is a positive integer, the processing module 1304 is further configured to:

[0165] Based on the horizontal scanning clustering algorithm, the N tunnel longitudinal section views are scanned from top to bottom using the first preset line, and the line results after the collision scan are clustered to obtain the first group data of the frame lines in the horizontal direction.

[0166] Based on the vertical horizontal scanning clustering algorithm, the N tunnel longitudinal section views are subjected to collision scanning from left to right using the second preset line, and the line results after collision scanning are clustered to obtain the second grouping data of the frame lines in the vertical direction.

[0167] By summarizing the first group of data and the second group of data, the pagination areas of the N tunnel longitudinal section views corresponding to the N tunnel longitudinal section drawings are obtained.

[0168] In some alternative embodiments, the at least one table in the tunnel longitudinal profile drawing further includes textual and / or vector information for describing the engineering quantity information of the tunnel longitudinal profile thumbnail;

[0169] The parsing module 1302 is further configured to parse the text information and / or the vector information in each cell; the processing module 1304 is further configured to insert the text information and / or the vector information into a preset program code framework, execute the preset program code framework, pop up a window containing the text information and / or the vector information through the display module 1303.

[0170] This embodiment provides a table recognition device for tunnel longitudinal profile drawings. When the user triggers the geological longitudinal profile recognition function, the device automatically recognizes the imported tunnel longitudinal profile drawings. It uses a collision detection algorithm model to perform wireframe recognition on at least one table in the current tunnel longitudinal profile view, obtaining the position information and border line information of each cell in the table. This achieves automatic recognition of tables in tunnel longitudinal profile drawings, avoiding the time-consuming and labor-intensive manual recognition. This method improves the efficiency of table recognition in tunnel longitudinal profile drawings, saves labor costs, and provides convenience for subsequent table content processing and implementation.

[0171] Please see Figure 14 This is a schematic diagram of the hardware structure of an electronic device provided in an optional embodiment of the present invention, such as... Figure 14As shown, the electronic device includes one or more processors 10, a memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processor can process instructions executed within the electronic device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces).

[0172] In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple storage devices, if needed. Similarly, multiple electronic devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 14 Take a processor 10 as an example.

[0173] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0174] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the file backup method shown in the above embodiments.

[0175] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function. The data storage area may store directory files, folders, hash directory trees, and other data. In addition, the memory 20 may include high-speed random access memory and may also include non-transient memory, such as at least one disk storage device, flash memory device, or other non-transient solid-state storage device.

[0176] In some alternative implementations, memory 20 may optionally include memory remotely located relative to processor 10, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof. Memory 20 may include volatile memory, such as random access memory; memory may also include non-volatile memory, such as flash memory, hard disks, or solid-state drives; memory 20 may also include combinations of the above types of memory.

[0177] In addition, the electronic device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 14 Taking the example of a connection between China and Israel via a bus.

[0178] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the electronic device, such as a touch screen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touch screen.

[0179] In addition, the electronic device also includes a communication interface for communicating with other devices or communication networks.

[0180] It should be understood that the above-mentioned electronic device may also include other more or fewer components and structural modules, and this embodiment does not limit this.

[0181] This invention also provides a computer-readable storage medium in which the methods described in this invention can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and to be stored on a local storage medium after being downloaded via a network, so that the methods described herein can be stored on such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware.

[0182] The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; furthermore, the storage medium can also include combinations of the above types of memory. It is understood that a computer, processor, microprocessor controller, or programmable hardware includes storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0183] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0184] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method of identifying a table in a tunnel profile drawing, characterized by, Applied to a client-side application, the client having a function for identifying geological longitudinal sections, the method includes: When receiving a tunnel longitudinal section drawing imported by a user, the tunnel longitudinal section drawing is parsed to obtain line element information. The tunnel longitudinal section drawing includes: a tunnel longitudinal section thumbnail and at least one table. Each table consists of multiple cells. The line element information is used to extract the border line information of the at least one table. Displays a longitudinal section view of the tunnel containing the line primitive information; If the geological longitudinal section identification function is triggered, the collision detection algorithm model is used to identify the wireframe of at least one table in the tunnel longitudinal section view, and the position information and border line information of each cell contained in the at least one table are obtained. Specifically, the method of using a collision detection algorithm model to perform wireframe recognition on at least one table in the tunnel longitudinal section view to obtain the position information and border line information of each cell contained in the at least one table includes: The pagination area of ​​the tunnel longitudinal section view is identified by scanning the preset lines. The table borders and table positions of at least one table contained within the pagination area are identified, and the target table is determined from them; The collision detection algorithm model is used to identify the header and body regions of the target table; Each cell contained in the table header area and the table body area is identified respectively to obtain the position information and border line information of each cell; The step of using the collision detection algorithm model to identify the header and body regions of the target table includes: The collision detection algorithm model is used to identify all vertical lines in the target table to obtain the first frame line, the second frame line, and the third frame line that meet the filtering conditions. The filtering conditions are three vertical lines whose length exceeds a preset value and are used as the first frame line, the second frame line, and the third frame line. The area between the first border and the second border is defined as the table header area, and the area between the second border and the third border is defined as the table body area.

2. The method of claim 1, wherein, The tunnel longitudinal section view displaying the line primitive information further includes: Controls that display the function of identifying geological longitudinal sections; If the geological longitudinal section identification function is triggered, it includes: When the user selects the control, the function of identifying the geological longitudinal section is triggered.

3. The method of claim 1, wherein, The step of identifying table borders and table positions for at least one table within the pagination area includes: Calculate the span of all lines within the pagination area in the X-axis and Y-axis directions to obtain the overall bounding rectangle border; Based on the size of the overall circumscribed rectangle, a certain percentage is shrunk in the vertical direction on the far left of the border to construct the scanning frame; The scanning frame is scanned sequentially from left to right with a preset step size. Collision detection is performed between the scanning frame and the border line of at least one table in the pagination area to detect at least one graphic element that has collided. Cluster all detected collision primitives to obtain the table border and table position for each table.

4. The method of claim 1, wherein, The step of identifying each cell contained in the table header area and obtaining the position information and border line information of each cell includes: Based on the border line information of the table header area, construct the left and right position scan lines of the table header; The left and right position scan lines are used to collide and intersect with at least one horizontal frame line in the table header area to determine whether there are frame lines for nested rows. If so, the position information and border line information of each cell in the table header area are determined based on the collision intersection result, wherein the position information and the border line information include the border line and position information of the nested rows.

5. The method of claim 4, wherein, The process of identifying each cell contained in the table body area and obtaining the position information and border line information of each cell includes: Obtain the top and bottom border lines of each cell in the table header area; The top and bottom border lines of each cell are extended to the table body area to serve as the upper and lower position scan lines for collision detection. By intersecting the upper and lower position scan lines with at least one vertically connected line in the table body area, the position information and border line information of each cell in the table body area are obtained; the type of the vertically connected line between at least two cells in the table body area includes one or more of the following: Vertical lines, bracket lines, and broken lines.

6. The method of claim 1, wherein, If the number of tunnel longitudinal section drawings imported by the user is N, then N≥2 and is a positive integer; The step of scanning the tunnel longitudinal section view using preset lines to identify the pagination area of ​​the tunnel longitudinal section view includes: Based on the horizontal scanning clustering algorithm, the N tunnel longitudinal section views are scanned from top to bottom using the first preset line, and the line results after the collision scan are clustered to obtain the first group data of the frame lines in the horizontal direction. Based on the vertical horizontal scanning clustering algorithm, the N tunnel longitudinal section views are subjected to collision scanning from left to right using the second preset line, and the line results after collision scanning are clustered to obtain the second grouping data of the frame lines in the vertical direction. By summarizing the first group of data and the second group of data, the pagination areas of the N tunnel longitudinal section views corresponding to the N tunnel longitudinal section drawings are obtained.

7. The method according to any one of claims 1 to 6, characterized in that, The at least one table in the tunnel longitudinal profile drawing also includes text information and / or vector information for describing the engineering quantity information of the tunnel longitudinal profile thumbnail; After obtaining the position information and border information of each cell contained in the at least one table, the method further includes: Parse the text information and / or vector information in each cell; The text information and / or the vector information are inserted into a preset program code framework, and the preset program code framework is executed to pop up and display a window containing the text information and / or the vector information.

8. A profile identification device for tunnel profile paper, characterized in that, The device includes: The receiving module is used to receive tunnel longitudinal profile drawings imported by the user. The tunnel longitudinal profile drawings include: a tunnel longitudinal profile thumbnail and at least one table, each of which consists of multiple cells. The parsing module is used to parse the tunnel longitudinal section drawing to obtain line element information, and the line element information is used to extract the border line information of at least one table; The display module is used to display a longitudinal section view of the tunnel containing the line element information; The processing module is used to perform wireframe recognition on at least one table in the tunnel longitudinal section view using a collision detection algorithm model when the geological longitudinal section recognition function is triggered, so as to obtain the position information and border line information of each cell contained in the at least one table. Specifically, the method of using a collision detection algorithm model to perform wireframe recognition on at least one table in the tunnel longitudinal section view to obtain the position information and border line information of each cell contained in the at least one table includes: The pagination area of ​​the tunnel longitudinal section view is identified by scanning the preset lines. The table borders and table positions of at least one table contained within the pagination area are identified, and the target table is determined from them; The collision detection algorithm model is used to identify the header and body regions of the target table; Each cell contained in the table header area and the table body area is identified respectively to obtain the position information and border line information of each cell; The step of using the collision detection algorithm model to identify the header and body regions of the target table includes: The collision detection algorithm model is used to identify all vertical lines in the target table to obtain the first frame line, the second frame line, and the third frame line that meet the filtering conditions. The filtering conditions are three vertical lines whose length exceeds a preset value and are used as the first frame line, the second frame line, and the third frame line. The area between the first border and the second border is defined as the table header area, and the area between the second border and the third border is defined as the table body area.

9. An electronic device, comprising: It includes a processor and a memory, wherein the memory is coupled to the processor; The memory stores computer-readable program instructions, which, when executed by the processor, implement the table recognition method for tunnel longitudinal profile drawings as described in any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by the processor, it implements the table recognition method for tunnel longitudinal section drawings as described in any one of claims 1 to 7.