A semantic sorting method and recognition system for hydraulic cylinder engineering drawing forms

By using a semantic sorting method for hydraulic cylinder engineering drawings, the problems of low symbol recognition rate and complex table structure in hydraulic cylinder engineering drawings are solved, realizing efficient, accurate and automated conversion from drawings to data, and improving recognition accuracy and structural restoration.

CN121963216BActive Publication Date: 2026-06-09SHAOGUAN HYDRAULICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHAOGUAN HYDRAULICS CO LTD
Filing Date
2026-04-01
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently and accurately convert tabular information in hydraulic cylinder engineering drawings into machine-readable structured data. In particular, the low recognition rate of special symbols and the difficulty in parsing complex non-standard table structures result in insufficient recognition accuracy and structural fidelity, failing to meet the needs of industrial applications.

Method used

A semantic sorting method for hydraulic cylinder engineering drawings is adopted, including image preprocessing, optical character recognition, engineering symbol correction, geometric matching of merged cells across rows and columns, and dynamic order reconstruction, to generate structured tabular data.

Benefits of technology

It significantly improves the recognition accuracy and structural reproduction of hydraulic cylinder engineering drawings, realizes end-to-end automated processing from drawings to data, solves the problem of data sequence disorder in traditional methods, and ensures data accuracy and system robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121963216B_ABST
    Figure CN121963216B_ABST
Patent Text Reader

Abstract

The application discloses a kind of hydraulic cylinder engineering chart form semantic sequencing method and identification system, the method includes the following steps: the table in the hydraulic cylinder engineering drawing is extracted, and the boundary box coordinates and geometric attribute of each cell are obtained;The image area of each cell is executed optical character recognition and engineering symbol correction, and text recognition result is obtained;According to geometric attribute, respectively filter cross-row merged cell and cross-column merged cell, based on geometric matching degree, the subordination relationship and the relative orientation of cross-row merged cell, cross-column merged cell and corresponding sub-cell are calculated respectively, and the subordination relationship mapping is established;Based on subordination relationship mapping, right orientation post-adjustment, left orientation pre-adjustment, lower orientation post-adjustment and upper orientation pre-adjustment are sequentially executed, and the ordered sequence of cell is generated;According to ordered sequence and text recognition result, output structured table data file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent processing technology for engineering drawings, specifically to a semantic sorting method and recognition system for hydraulic cylinder engineering drawings. Background Technology

[0002] As a core actuator in hydraulic systems, the design, manufacturing, maintenance, and supply chain management of hydraulic cylinders heavily rely on detailed technical drawings. These engineering drawings contain structured tables of technical parameters, detailing key parameters such as operating mode, cylinder diameter, rod diameter, rated pressure, working pressure, stroke, port specifications, and cushioning type. Efficiently and accurately converting the tabular information from these drawings into machine-readable and computable structured data is crucial for building digital twins of products, automating the generation of bills of materials, conducting operational simulations and verifications, enabling intelligent procurement and inventory management of spare parts, and driving the digital transformation of the manufacturing industry.

[0003] Currently, the extraction of such engineering drawing information in the industry still mainly relies on manual visual reading and manual entry into spreadsheets. This method is extremely inefficient and prone to data errors due to fatigue and negligence, making it difficult to meet the needs of digital archiving of massive amounts of historical drawings and rapid design change processes. With the maturity of Optical Character Recognition (OCR) and document intelligence technologies, automated information extraction from general documents has become possible and is widely used in fields such as finance and government.

[0004] However, directly applying general OCR and table recognition technologies to hydraulic cylinder engineering drawings faces a series of unique and severe challenges, resulting in recognition accuracy, structural restoration, and the usability of the final data falling far short of the requirements for industrial applications. First, the accuracy of recognizing special engineering symbols is low: hydraulic cylinder tables are filled with numerous professional symbols, which general OCR models rarely cover during training, easily misidentifying them as common characters with similar shapes. Second, complex non-standard table structures are difficult to parse: to clearly express the hierarchical relationships between parameters, hydraulic cylinder technical parameter tables often use multi-level merged cells, including two high-frequency forms: cross-row merging and cross-column merging. This structure disrupts the regular grid layout, causing traditional algorithms based on simple row and column line intersection detection to completely fail. While existing end-to-end deep learning table recognition models can predict cell positions, the accuracy of allocating row and column relationships for these logically closely related merged cells spanning multiple rows and columns still needs improvement. Furthermore, the existing physical detection order is severely deviating from the logical reading order: the output order of text boxes initially detected by the OCR engine is usually based on a simple sorting of the center coordinates of their detection boxes. However, in the presence of complex merged cells, this purely geometric order is quite different from the logical order by which humans understand tables. Existing technical solutions mostly focus on processing rule-based three-line tables or financial statements, lacking in-depth modeling and optimization of the unique table structures, character sets, and semantic logic in heavy machinery engineering drawings such as hydraulic cylinders. Summary of the Invention

[0005] This invention proposes a semantic sorting method and recognition system for hydraulic cylinder engineering drawings, which solves the problem of low recognition rate of special symbols in hydraulic cylinder engineering drawings in existing technologies.

[0006] To address the aforementioned technical problems, this invention provides a semantic sorting method for hydraulic cylinder engineering drawings, comprising the following steps:

[0007] Step S1: Extract the structure of the table in the hydraulic cylinder engineering drawing to obtain the bounding box coordinates and geometric attributes of each cell;

[0008] Step S2: Perform optical character recognition and engineering symbol correction on the image area of ​​each cell to obtain the text recognition result;

[0009] Step S3: Based on the geometric attributes, filter the merged cells across rows and merged cells across columns respectively, and calculate the subordinate relationship and relative position of the merged cells across rows and merged cells across columns and their corresponding sub-cells based on the geometric matching degree, and establish a subordinate relationship mapping;

[0010] Step S4: Based on the above subordinate relationship mapping, perform right-side adjustment, left-side adjustment, bottom-side adjustment and top-side adjustment in sequence to generate an ordered sequence of cells;

[0011] Step S5: Output a structured tabular data file based on the ordered sequence and the text recognition result.

[0012] Preferably, step S1 includes the following steps:

[0013] Step S11: Perform grayscale conversion, adaptive denoising based on nonlocal mean algorithm, contrast enhancement based on contrast-limited adaptive histogram equalization, and binarization based on Otsu's method on the hydraulic cylinder engineering drawing in sequence to obtain a binary image.

[0014] Step S12: Perform morphological opening and closing operations on the binary image using the horizontal structuring element kernel and the vertical structuring element kernel respectively, extract and enhance the horizontal and vertical table lines, and fuse them to generate a table line mask.

[0015] Step S13: Based on the table line mask, use the contour retrieval algorithm to locate the contours of all internal cells, calculate the bounding box coordinates, center coordinates, width and height of each cell, and form the bounding box coordinates and geometric attributes of each cell.

[0016] Preferably, step S2 includes the following steps:

[0017] Step S21: Using a deep learning-based optical character recognition model, text detection and recognition are performed on the image region corresponding to each cell, and preliminary recognition results containing text strings and character confidence scores are output.

[0018] Step S22: Start the dedicated rule engine to perform engineering symbol correction on the preliminary identification results. The engineering symbol correction includes connected domain topology analysis correction of the diameter symbol Ø and regular expression pattern matching correction of the threaded interface symbol G and subsequent combinations of numbers and fractions.

[0019] Preferably, the connected domain topology analysis and correction of the diameter symbol Ø includes the following steps: calculating the ratio of the area of ​​the largest inscribed blank region to the area of ​​the circumscribed rectangle within the connected domain as the hole area ratio, and measuring the ring width uniformity in multiple radial directions. The ring width uniformity is determined using the multi-directional ring width standard deviation method: with the character centroid as the center, the ring width is measured in eight equally divided angular directions, and the ratio of the standard deviation of the ring width to the mean is calculated. If the ratio is less than 0.2, the ring width is considered uniform. If the hole area ratio is between 0.05 and 0.4 and the ring width is uniform, the current character is corrected to Ø. For cases where ring breaks are caused by image noise, morphological closing operations are first applied to the character region to close the gap, and then the feature calculations of the hole area ratio and ring width uniformity are performed.

[0020] Preferably, step S3 includes the following steps:

[0021] Step S31: Filter candidates spanning multiple rows and multiple columns of parent cells separately:

[0022] Candidate filtering across parent cells: Calculate the average height of all cells based on the geometric attributes. with standard deviation Cells that highly satisfy the following relation will be filtered as potential cross-row parent cell candidates:

[0023] ;

[0024] In the formula, The height of the cell; This is an adjustable coefficient;

[0025] Candidate filtering across parent cells: Calculate the average width of all cells. with standard deviation Filter cells whose widths satisfy the following relationship as potential cross-column parent cell candidates:

[0026] ;

[0027] In the formula, The width of the cell; This is an adjustable coefficient;

[0028] Step S32: For cells that simultaneously meet both the cross-row parent cell candidate filtering condition and the cross-column parent cell candidate filtering condition, perform the matching calculations of steps S33 to S34 in both the cross-row and cross-column directions respectively, select the direction with the lower comprehensive geometric matching score as the final subordinate type of the cell, and remove it from the candidate set of the other direction; if the comprehensive geometric matching scores of the two directions are equal, then the cross-column subordinate takes priority.

[0029] The formula for calculating the comprehensive geometric matching score is:

[0030] Cross-line matching score = total height matching degree + vertical center alignment degree;

[0031] Cross-column match score = total width match score + horizontal center alignment score;

[0032] Step S33: For each potential parent cell candidate, search for a sequence of candidate child cells in the corresponding direction based on the type of the parent cell candidate:

[0033] For a candidate parent cell spanning multiple rows, within the horizontal right or left adjacent area of ​​the candidate parent cell, search for multiple cells that simultaneously satisfy center horizontal coordinate alignment and are vertically consecutive as a candidate child cell sequence. The alignment tolerance for center horizontal coordinate alignment is:

[0034] ;

[0035] In the formula, Alignment tolerance for center horizontal coordinate alignment; The width of the parent cell;

[0036] The spacing threshold for the vertically continuous arrangement is:

[0037] ;

[0038] In the formula, The spacing threshold for vertically continuous arrangement;

[0039] For a cross-column parent cell candidate, multiple cells that simultaneously satisfy center y-coordinate alignment and are horizontally consecutive within the adjacent area vertically below or above the cross-column parent cell candidate are searched as a sequence of candidate child cells. The alignment tolerance of the center y-coordinate is:

[0040] ;

[0041] In the formula, Alignment tolerance for the center ordinate; The height of the parent cell candidate;

[0042] The spacing threshold for the horizontally continuous arrangement is:

[0043] ;

[0044] In the formula, The spacing threshold for horizontally continuous arrangement;

[0045] Step S34: Calculate the joint bounding rectangle of the candidate sub-cell sequence. The joint bounding rectangle is the smallest bounding rectangle containing all candidate sub-cells. For the case of spanning rows, calculate the total height matching degree and vertical center alignment degree between the potential spanning parent cell candidate and the candidate sub-cell sequence. The expression for calculating the total height matching degree is:

[0046] Total height matching degree = ;

[0047] In the formula, The height of the parent cell candidate; The height of the joint bounding rectangle of the candidate sub-cell sequence;

[0048] The expression for calculating the vertical center alignment is:

[0049] Vertical center alignment = ;

[0050] In the formula, The center y-coordinate of the candidate cell in the parent cell; The ordinate of the center of the joint bounding rectangle of the candidate sub-cell sequences;

[0051] For cross-column cases, the total width matching degree and horizontal center alignment degree between the potential cross-column parent cell candidates and the candidate child cell sequence are calculated using the following expression:

[0052] Total width matching degree = ;

[0053] In the formula, The width of the candidate cell in the parent cell; The width of the joint bounding rectangle of the candidate subcell sequence;

[0054] The expression for calculating the horizontal center alignment is:

[0055] Horizontal center alignment = ;

[0056] In the formula, The x-coordinate of the center of the candidate cell in the parent cell; The x-coordinate of the center of the joint bounding rectangle of the candidate sub-cell sequences;

[0057] Step S35: If both geometric matching indices in the corresponding scenario are less than the preset threshold, the subordinate relationship is determined to be established, the relative orientation is determined, and the subordinate relationship and the relative orientation are recorded in the subordinate relationship mapping.

[0058] Preferably, the rule for determining the relative orientation in step S34 is as follows:

[0059] Regarding the subordinate relationship corresponding to the merged cells across rows: If < If, then the relative orientation is determined to be the left; if > If the two are equal, then the relative orientation is determined to be the right side; if they are equal, then the relative orientation is determined to be the left side by default.

[0060] Regarding the dependency relationship corresponding to the merged cells across columns: if < If, then the relative orientation is determined to be upward; if > If the relative positions are equal, then the relative positions are determined to be downwards; if the two are equal, then the relative positions are determined to be upwards by default.

[0061] Preferably, step S4 employs a four-stage sequential adjustment algorithm, executing the following adjustment steps in sequence:

[0062] Phase 1: Right-position adjustment. Scan from the bottom to the top of the global list of cell sequences. For the subordinate relationships in the mapping where the relative position is on the right, move the corresponding parent cell from its current position to after the last element of the child cell sequence corresponding to the parent cell.

[0063] Second stage: Left position front adjustment. On the global list after the right position back adjustment, scan from bottom to top. For the subordinate relationship mapping with the relative position on the left, move the corresponding parent cell from the current position to before the first element of the child cell sequence corresponding to the parent cell.

[0064] Third stage: Lower position adjustment. On the global list after the left position adjustment, scan from bottom to top. For the subordinate relationship in the subordinate relationship mapping with the relative position as lower, move the corresponding parent cell from the current position to after the last element of the child cell sequence corresponding to the parent cell.

[0065] Fourth stage: Upper position front adjustment. On the global list after the lower position back adjustment, scan from bottom to top. For the subordinate relationship with the upper position in the subordinate relationship mapping, move the corresponding parent cell from the current position to before the first element of the child cell sequence corresponding to the parent cell.

[0066] Preferably, step S5 includes the following steps:

[0067] Step S51: Read the corrected text content of each cell sequentially according to the ordered sequence;

[0068] Step S52: Infer the row and column logical structure of the table based on the geometric positional relationship of the cells in the ordered sequence;

[0069] Step S53: Fill the inferred row and column logical structure with the text content, and organize the cells with the subordinate relationship into nested key-value pairs;

[0070] Step S54: Output the final structured data as JSON and Excel files.

[0071] This invention also provides a system for recognizing hydraulic cylinder engineering drawings, based on the semantic sorting method for hydraulic cylinder engineering drawings described above. The system includes:

[0072] Image preprocessing and structure extraction module: performs image enhancement and table structure extraction on hydraulic cylinder engineering drawings, and outputs the bounding box coordinates and geometric attributes of each cell;

[0073] Text Recognition and Domain Correction Module: Integrates an optical character recognition engine and a dedicated rule engine to perform optical character recognition and engineering symbol correction on each cell image region and output the text recognition results;

[0074] Cross-level relationship analysis module: Based on the geometric attributes, it filters merged cells across rows by height statistics, filters merged cells across columns by width statistics, and calculates and determines the subordinate relationship and relative position with child cells based on geometric matching degree, and outputs the subordinate relationship mapping;

[0075] Dynamic sequence reconstruction module: Based on the subordinate relationship mapping, it sequentially performs four-stage sorting: right-side post-adjustment, left-side pre-adjustment, lower-side post-adjustment, and upper-side pre-adjustment, and outputs an ordered sequence;

[0076] Structured output module: Outputs a structured tabular data file based on the ordered sequence and the text recognition result.

[0077] Preferably, the dedicated rule engine in the text recognition and domain correction module includes a diameter symbol correction sub-engine and a thread symbol correction sub-engine. The diameter symbol correction sub-engine corrects the diameter symbol Ø through connected domain topology analysis, and the thread symbol correction sub-engine corrects the thread interface symbol G and subsequent combinations of numbers and fractions through character aspect ratio verification and regular expression pattern matching.

[0078] The advantages of this invention include at least the following:

[0079] 1. Customized design across the entire chain is carried out to address the special characteristics and difficulties of hydraulic cylinder engineering drawings. From low-level image processing to high-level logic reconstruction, it significantly improves the overall recognition accuracy, structural restoration and system robustness in complex industrial scenarios. It realizes end-to-end automated processing from drawing images to usable data without the need for manual proofreading and sorting.

[0080] 2. A dedicated rule engine based on connected domain geometric feature analysis and contextual semantics is introduced, which effectively solves the industry pain point of low recognition rate of core hydraulic cylinder symbols such as Ø, G, and MPa by general OCR models, and ensures the accuracy of data from the source.

[0081] 3. The proposed cross-level relationship discrimination and four-stage dynamic sorting strategy based on geometric metrics can intelligently understand and reconstruct the complex logical structure of merged cells, rearrange the messy physical detection boxes output by OCR into a data sequence with clear hierarchy that conforms to human semantic understanding, and solve the fundamental problem that the traditional method outputs data in disordered order and cannot be used directly. Attached Figure Description

[0082] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention;

[0083] Figure 2 This is a schematic diagram illustrating the image preprocessing and table structure extraction process in an embodiment of the present invention;

[0084] Figure 3 This is a schematic diagram illustrating the principle of the four-stage dynamic sorting strategy in an embodiment of the present invention.

[0085] Figure 4 This is a schematic diagram comparing table segmentation and semantic sorting before and after in an embodiment of the present invention;

[0086] Figure 5 This is a schematic diagram of the system structure for implementing the present invention. Detailed Implementation

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

[0088] like Figure 1 As shown, this embodiment of the invention provides a semantic sorting method for hydraulic cylinder engineering drawing tables, including the following steps:

[0089] Step S1: Extract the structure of the table in the hydraulic cylinder engineering drawing to obtain the bounding box coordinates and geometric attributes of each cell.

[0090] The goal of this step is to perform enhanced preprocessing and table structure extraction on the input hydraulic cylinder engineering drawings to obtain an initial set of physical coordinates containing complete cell outlines and geometric attributes. Specifically, this includes the following three sub-steps:

[0091] Step S11: Image Enhancement and Binarization. After receiving the hydraulic cylinder engineering drawing image uploaded by the user, the system sequentially performs grayscale conversion, adaptive denoising based on the Non-Local Means algorithm, contrast enhancement based on Limiting Contrast Adaptive Histogram Equalization (CLAHE), and binarization based on the Otsu method to obtain an optimized binary image. Grayscale conversion converts the color image into a single-channel representation, reducing the computational complexity of subsequent processing; Non-Local Means denoising can effectively preserve image edge details while smoothing noise, avoiding blurring and degradation of table lines and text strokes; The CLAHE algorithm effectively improves the problem of uneven lighting caused by poor scanning or shooting conditions by enhancing the contrast of local areas of the image; OTSU adaptive binarization can automatically determine the optimal segmentation threshold based on the bimodal characteristics of the image grayscale distribution, ultimately generating a binary image with clear black and white contrast and maximized contrast between text and lines and the background, laying the foundation for subsequent table line extraction.

[0092] Step S12: Oriented Morphological Operations and Table Line Mask Generation. Morphological opening and closing operations are performed on the aforementioned binary image using horizontal and vertical structuring element kernels respectively, extracting and enhancing horizontal and vertical table lines, and then fusing them to generate a table line mask. For example... Figure 2 As shown, firstly, a flat, elongated horizontal structuring element kernel, for example, 1 pixel high and 30 pixels wide, is used to perform a morphological opening operation on the binary image to break up vertical noise and text strokes intersecting the horizontal lines, preserving the continuous horizontal line segment structure. Then, a closing operation is performed to connect the horizontal line breaks caused by noise or image defects, resulting in an enhanced horizontal table line image. Similarly, a flat, elongated vertical structuring element kernel, for example, 30 pixels high and 1 pixel wide, is used to perform the same opening and closing operations to obtain an enhanced vertical table line image. The enhanced horizontal and vertical line images are then pixel-level additively fused, and an additional closing operation is performed using a small kernel to fill the corner gaps at line intersections, ultimately generating a table line mask image with coherent lines and a clear grid.

[0093] Step S13: Cell Outline Location and Geometric Attribute Calculation. Based on the aforementioned table line mask, a contour retrieval algorithm is used to locate all internal cell outlines. This algorithm identifies internal outlines with parent outlines by searching the hierarchical relationship of the outlines; these internal outlines correspond to the various cell regions in the table. For each detected cell outline, its minimum bounding rectangle is calculated as the bounding box, and the coordinates of its upper left and lower right corners are obtained. Then the center coordinates are calculated. ,width w and height h .like Figure 2As shown in the green rectangle, the system successfully located all cells in the table, including individual regular cells and merged cells spanning multiple rows. All this geometric information together constitutes the initial set of physical coordinates, providing the spatial basis for subsequent text recognition, relationship analysis, and sequence reconstruction. It should be noted that the cell numbers at this point only represent the order in which the outlines were detected, not the correct logical reading order.

[0094] Step S2: Perform optical character recognition and engineering symbol correction on the image area of ​​each cell to obtain the text recognition result, which specifically includes the following two sub-steps:

[0095] Step S21: Optical Character Recognition. A deep learning-based optical character recognition model, such as PaddleOCR, is used to detect and recognize text in the original image region corresponding to each cell in the initial physical coordinate set. The system crops the region defined by the bounding box coordinates of each cell from the original image and feeds it into the pre-trained OCR model for inference. The model outputs preliminary recognition results containing the text string and the recognition confidence of each character.

[0096] Step S22: Engineering Symbol Correction. Based on the domain characteristics of the hydraulic cylinder engineering drawing, a dedicated rule engine is activated to accurately correct the preliminary recognition results. This rule engine incorporates domain knowledge of hydraulic cylinders and focuses on the following two types of engineering symbols that frequently err in general OCR.

[0097] For the symbol “Ø” representing diameter, a connected component topology analysis method is used for correction. Specifically, the ratio of the area of ​​the largest inscribed blank region within the connected component of the target character to the area of ​​the circumscribed rectangle of the connected component is calculated. This ratio is defined as the hole area ratio. Simultaneously, the uniformity of ring width in multiple radial directions is measured. The uniformity of ring width is determined using the multi-directional ring width standard deviation method: with the character centroid as the center, the ring width is measured in eight equally divided angular directions: 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°. The ratio of the standard deviation of all ring widths to the mean is calculated. If this ratio is less than 0.2, the ring width is considered uniform. If the hole area ratio is between 0.05 and 0.4 and the ring width is uniformly distributed, the character is determined to have typical ring topological characteristics, indicating that it is a ring structure with a central hole rather than a solid character, and is therefore corrected to “Ø”.

[0098] The basis for this judgment logic is that although the number "0" is similar in shape to "Ø", it does not have a true through-hole structure inside, and the two have a distinguishable difference in the geometric metric of hole area ratio. For cases where ring breaks are caused by image noise, the engine first applies a small-size morphological closing operation to the character region to bridge the gap and restore the topological integrity of the ring, and then performs the aforementioned feature calculations for hole area ratio and ring width uniformity. For example, for text initially identified as "Φ125mm" or "O125mm", the engine analyzes the binary image of the character region and finds a clear ring feature in the center, thus correcting the text to "Ø125mm".

[0099] For the "G" symbol representing a threaded interface and the following combination of numbers and fractions, a method combining character geometric verification and regular expression pattern matching is used for correction. First, the aspect ratio of the "G" character's bounding box is verified. If it falls within the typical range of 0.8 to 1.2, the credibility of its recognition as "G" is enhanced, eliminating the possibility of misidentification as characters such as "C" due to similar strokes. Simultaneously, the regular expression ^\d+\s+\d+ / \d+$ is used to perform pattern matching on the context following the "G" symbol, verifying whether it conforms to the typical writing format of "number + space + fraction" for thread specifications. If a match is successful, the entire character combination is corrected. For example, for the thread specification "G11 / 4", the engine verifies the glyph characteristics of "G" and confirms the correctness of the format of the subsequent "1" and "1 / 4", ensuring that it is correctly understood as a complete thread specification.

[0100] Step S3: Based on geometric attributes, filter merged cells across rows and merged cells across columns respectively. Calculate the dependency relationship and relative position between merged cells across rows and columns and their corresponding sub-cells based on geometric matching degree, establishing a dependency relationship mapping. This step fully covers the two most common scenarios of merged cells across rows and columns in hydraulic cylinder parameter tables, specifically including the following four sub-steps:

[0101] Step S31: Filter candidates for parent cells spanning rows and parent cells spanning columns.

[0102] Candidate filtering across parent cells: Iterate through the geometric properties of each cell in the initial physical coordinate set and calculate the average height of all cells. and standard deviation In the hydraulic cylinder technical parameter table, the height of merged cells spanning multiple rows is typically significantly greater than that of regular cells because they span multiple sub-rows vertically. Therefore, cells whose height meets the following criteria are selected as potential candidates for merged parent cells:

[0103] ;

[0104] in, The height of the cell; This is an adjustable coefficient, with a value range of 1.5 to 2.5.

[0105] Candidate filtering across parent cells: Iterate through the geometric properties of each cell in the initial physical coordinate set and calculate the average width of all cells. and standard deviation In hydraulic cylinder technical parameter tables, merged cells spanning multiple columns are commonly found in table headers, parameter group headers, and shared description items. Their width is typically significantly larger than regular cells, spanning multiple sub-columns horizontally. Therefore, cells whose width meets the following criteria are selected as potential candidates for parent cells spanning multiple columns:

[0106] ;

[0107] In the formula, The width of the cell; This is an adjustable coefficient, and in this embodiment, it is set to 1.8.

[0108] In addition, an auxiliary analysis is performed on the consistency of height within a row. If the height of a cell is significantly greater than the consensus row height of other cells in its row, it is also added as a candidate to prevent missed detections due to a large overall height variance. Figure 2 Taking the hydraulic cylinder parameter table shown as an example, the long cells containing labels such as "working pressure", "oil port", and "buffer type" are marked as potential cross-row parent cell candidates because they span two sub-rows and their height is significantly greater than the average row height.

[0109] Step S32: For cells that simultaneously meet the candidate filtering conditions for parent cells across rows and parent cells across columns, perform the matching calculations of steps S33 to S34 in both the row-crossing and column-crossing directions respectively. Select the direction with the lower comprehensive geometric matching score as the final subordinate type of the cell and remove it from the candidate set in the other direction. If the comprehensive geometric matching scores in the two directions are equal, then the column-crossing subordinate takes priority.

[0110] The formula for calculating the overall geometric matching score is:

[0111] Cross-line matching score = total height matching degree + vertical center alignment degree;

[0112] Cross-column matching score = total width matching score + horizontal center alignment score.

[0113] Step S33: Candidate Child Cell Sequence Search. For each potential cross-row parent cell candidate, search for multiple cells in its horizontal right or left adjacent area that meet specific geometric conditions as a candidate child cell sequence. The search range is limited to the area extending downwards from the left and right boundaries of the parent cell by no more than twice the average row height to avoid mistakenly including irrelevant cells that are too far away. Candidate child cells must meet two conditions simultaneously:

[0114] (1) Center x-coordinate alignment: that is, the absolute value of the difference between the center x-coordinate of the child cell and the center x-coordinate of the parent cell is less than the alignment tolerance. Defined as:

[0115] ;

[0116] in, Alignment tolerance for center horizontal coordinate alignment; The width of the parent cell.

[0117] (2) Vertical consecutive arrangement: that is, the vertical distance between adjacent candidate sub-cells is less than the consecutive distance threshold. Defined as:

[0118] ;

[0119] In the formula, The spacing threshold for vertically continuous arrangement.

[0120] For a parent cell candidate spanning multiple columns, multiple cells satisfying specific geometric conditions are searched within the adjacent area vertically below or above it as a sequence of candidate child cells. The search range is limited to the area extending outward from the top and bottom edges of the parent cell by no more than twice the average row height. Candidate child cells must simultaneously meet two core conditions:

[0121] (1) Horizontal coverage matching: that is, the absolute value of the difference between the width of the joint bounding rectangle of the candidate sub-cell sequence and the width of the parent cell is ≤ 10% of the width of the parent cell;

[0122] (2) Horizontal continuous arrangement: that is, the horizontal distance between adjacent candidate sub-cells is less than the continuous column spacing threshold. The expression for the continuous column spacing threshold is:

[0123] ;

[0124] In this embodiment, the threshold is 16 pixels.

[0125] Step S34: Geometric matching degree calculation. Calculate the corresponding geometric matching index between the parent cell candidate and the candidate child cell sequence to quantitatively assess the degree of spatial fit between them.

[0126] Taking the "Work Pressure" cell as an example, this cell is a merged cell spanning multiple rows. The system searches for cells labeled "with rod cavity" and "without rod cavity" with their center vertical coordinates aligned with the cell on the right and arranged vertically in a continuous sequence, and lists them as a preliminary candidate sub-cell sequence.

[0127] Two key geometric matching metrics are calculated between cross-row parent cell candidates and candidate child cell sequences to quantitatively assess the degree of spatial fit between them.

[0128] The first metric is the overall height matching degree, defined as the absolute difference between the height of the parent cell and the height of the joint bounding rectangle of the child cell sequence, normalized to the height of the parent cell. Its calculation expression is:

[0129] Total height matching degree = ;

[0130] In the formula, The height of the parent cell; The height of the bounding rectangle of the candidate subcell sequence.

[0131] This metric measures whether the parent cell exactly contains its candidate subsequences in the height dimension. The closer the matching degree is to zero, the higher the degree of agreement between the two in terms of height.

[0132] The second metric is vertical center alignment, defined as the absolute difference between the y-coordinate of the parent cell's center and the y-coordinate of the center of the joint bounding rectangle of the candidate child cell sequence, after normalization by the parent cell's height. Its calculation expression is:

[0133] Vertical center alignment = ;

[0134] In the formula, The y-coordinate of the parent cell's center; The ordinate of the center of the bounding rectangle of the candidate subcell sequence.

[0135] This metric measures whether the centers of two objects are aligned in the vertical direction. The closer the alignment is to zero, the more closely the vertical centers of the two objects match.

[0136] For cross-column cases, calculate two geometric matching metrics: total width matching degree and horizontal center alignment degree.

[0137] Total width matching degree = ;

[0138] In the formula, The width of the candidate cell in the parent cell; The width of the joint bounding rectangle of the candidate subcell sequence;

[0139] Horizontal center alignment = ;

[0140] In the formula, The x-coordinate of the center of the candidate cell in the parent cell; The x-coordinate of the center of the joint bounding rectangle of the candidate subcell sequence.

[0141] Step S35: Determine the subordinate relationship and record the location. Set a joint determination threshold. If the total height matching degree and vertical center alignment degree calculated above are both less than the threshold, it is determined that there is a stable subordinate relationship between the candidate parent cell and the candidate child cell sequence. The preferred value of the joint determination threshold is 0.1.

[0142] Upon confirming the existence of a subordinate relationship, the relative orientation shall be determined according to the following rules:

[0143] Regarding the hierarchical relationship of merged cells across rows: If < If, then it is determined to be on the left; if > If the two are equal, it is determined to be on the right; if they are equal, it is determined to be on the left by default.

[0144] Regarding the dependency relationship of merged cells across columns: If < If, then it is determined to be above; if > If the two are equal, the bottom is determined; if they are equal, the top is determined by default.

[0145] by Figure 2 The following is an example illustrating this. Taking cell number 18, "Work Pressure," as an example, the system calculates its height. The height of the joint bounding rectangle of the two candidate subcells, number 16 "with rod cavity" and number 17 "14MPa". and center ordinate The system compares the calculated total height matching degree and vertical center alignment degree with a threshold of 0.1. Since both indicators are less than the threshold, the system determines that cell number 18 is the parent cell of cells numbered 16 and 17. Simultaneously, comparing the center x-coordinates of the three cells reveals that cell number 18 is further to the left, therefore its orientation is recorded as "left". Similarly, the system establishes a hierarchy between "oil port" and its subordinate "rod cavity" and "rodless cavity" sub-items, as well as a hierarchy between "buffer type" and its corresponding sub-items, ultimately generating a complete hierarchy mapping.

[0146] Step S4: Based on the subordinate relationship mapping, perform right-side adjustment, left-side adjustment, bottom-side adjustment, and top-side adjustment in sequence to generate an ordered sequence of cells.

[0147] like Figure 3 As shown, this step employs a four-stage sequential adjustment algorithm. First, the complete dependency mapping established in step S3 is obtained, containing all identified "parent cell-child cell sequence-location" relationship pairs. Then, the four-stage sequential adjustment is performed on the global cell list composed of the initial physical coordinate set. The four-stage sequential adjustment algorithm follows the core principles of prioritizing horizontal dependencies over vertical dependencies and subsequent adjustments over preceding adjustments. For scenarios where multiple dependency relationships exist within the same parent cell, adjustments are performed in the priority order of right → left → down → up. After the parent cell is moved at any stage, it is marked as sorted. Subsequent scanning stages will skip parent cells with sorted marks to avoid sequence conflicts and duplicate moves.

[0148] Specifically, the first stage is the right-position post-adjustment. This stage processes all subordinate pairs marked "right". The algorithm scans the global list from bottom to top, and for each scanned pair, if its position is "right", the parent cell is removed from its current position in the list and inserted after the last element of its corresponding child cell sequence. In the hydraulic cylinder parameter table, the parent cell with the position "right" usually corresponds to a shared unit or descriptive text located to the right of the child sequence. For example, the "MPa" unit cell is located to the right of multiple numerical child cells. Post-adjusting it after the child sequence ensures that the specific numerical value is read first and then the shared unit in the final reading sequence, which conforms to the natural order of understanding.

[0149] The second stage involves adjusting the left-side orientation. After the first stage of adjustments, the list is scanned again from bottom to top. For each pair of relationships marked "left," its parent cell is removed from its current position and inserted before the first element of its corresponding child cell sequence. Parent cells marked "left" typically correspond to parameter names located to the left of the child sequence, such as labels like "Working Pressure," "Oil Port," and "Buffer Type." Placing these before the child sequence ensures that the parameter names are read first, followed by the specific parameter values, in the final reading sequence, conforming to the "category first, details later" table reading habit.

[0150] The third stage involves adjusting the position below. After the second stage of adjustments, the list is scanned again from bottom to top. For each pair of relationships marked "below," its parent cell is removed from its current position and inserted after the last element of its corresponding child cell sequence. The parent cell marked "below" typically corresponds to a common description or summary row located below the child sequence; placing it after the child sequence ensures that in the final reading sequence, the content of each child item is read first, followed by the common description.

[0151] The fourth stage involves adjusting the orientation to "above". After the third stage adjustment, the list is scanned again from bottom to top. For each pair of relationships marked "above", its parent cell is removed from its current position and inserted before the first element of its corresponding child cell sequence. The parent cell marked "above" typically corresponds to the parameter group header or title row located above the child sequence. Placing it before the child sequence ensures that the header is read first, followed by the content of each sub-column, conforming to the habit of reading tables from the general to the specific.

[0152] All four stages described above employ a bottom-to-top scanning direction. When processing a parent cell located at the top of the list, the relative positions of its child cells and the indices of elements further down the list have already been stabilized during previous scans and will not change due to the current movement operation. This avoids complex index maintenance and potential order disruptions, ensuring the stability and correctness of the sorting algorithm.

[0153] After the above four-stage adjustment, the cell order in the global list has been fundamentally changed. Cells that were originally adjacent in physical coordinates but logically unrelated have been appropriately separated, while cells with logical subordinate relationships have been grouped together, with parent items located on the correct side of their child items; that is, name-type parent items precede their child items, and unit-type parent items follow their child items. For example... Figure 4 As shown, comparing the results before and after sorting reveals that the numbering before sorting was disordered, with logically related cells such as "Working Pressure", "Rod Chamber", and "14MPa" separated by other rows. After sorting, however, these three cells are adjacent to each other, with the parent item "Working Pressure" at the top. The new numbering from 1 to 31 strictly follows the logical reading order from top to bottom, from left to right, and from parent item to child item.

[0154] Step S5: Based on the ordered sequence and text recognition results, output a structured tabular data file. This step specifically includes the following four sub-steps:

[0155] Step S51: Ordered text content reading. Following the final ordered sequence generated in step S4, each cell is accessed sequentially, and its text content, corrected by engineering symbols in step S2, is read. At this point, the text content reading order has changed from the original chaotic physical detection order to a semantically logical ordered order.

[0156] Step S52: Row and column logical structure inference. Based on the geometric positional relationship of each cell in the ordered sequence, dynamically infer the row and column logical structure of the table.

[0157] Specifically, for regular cells without hierarchical relationships, logical rows and columns are defined by analyzing the center coordinate jump characteristics of consecutive cells in the sequence: multiple consecutive cells with similar center ordinates are grouped into the same logical row, and cells in the same column have similar center abscissas. For merged cells with hierarchical relationships, due to their significant center coordinate offset, they are not included in the above coordinate jump analysis. Instead, based on the hierarchical mapping established in step S3, the logical row span or logical column span of their corresponding child cell sequence is directly inherited. This dynamic inference method based on geometric position combined with logical relationship inheritance can adapt to the differences in the number and layout of rows and columns in parameter tables of different specifications of hydraulic cylinders, effectively avoiding row and column division errors caused by the center coordinate offset of merged cells.

[0158] Step S53: Nested Structure Assembly. The corrected text content is filled into the inferred row-column logical structure. For cell groups with hierarchical relationships, i.e., sequences of parent cells spanning multiple rows and their child cells, they are organized into nested key-value pairs in the structured data to accurately represent the hierarchical semantics of the original table. For example, "Working Pressure" is used as the key, with nested sub-key-value pairs "with rod cavity: 14MPa" and "without rod cavity: 14MPa," thus constructing a tree-like hierarchical data model.

[0159] Step S54: Output in Multiple Formats. The final organized structured data is output in common file formats, including: JSON format files, which can flexibly express nested hierarchical relationships, facilitating automatic program parsing and network transmission; and Excel format files, generating standard spreadsheet files, where merged cells across rows are visually displayed through cell merging attributes, facilitating manual review and further editing. At this point, the technical parameter table in the hydraulic cylinder engineering drawing has been completely, accurately, and automatically converted into structured data that can be directly processed and analyzed by a computer system.

[0160] Corresponding to the above method, embodiments of the present invention also provide a system for recognizing hydraulic cylinder engineering drawings, such as... Figure 5 As shown, the system contains five functional modules, each corresponding to a step in the above method flow, and they work together.

[0161] The image preprocessing and structure extraction module is configured to execute step S1, which is responsible for image enhancement of the input hydraulic cylinder engineering drawings, including grayscale conversion, noise reduction and contrast enhancement, table line enhancement, extraction and fusion of horizontal and vertical lines through directional morphological operations, as well as cell contour detection and geometric attribute calculation, and finally outputting the initial physical coordinate set.

[0162] The text recognition and domain correction module, configured to execute step S2, integrates two components: a general OCR engine and a hydraulic cylinder-specific rule engine. The general OCR engine is responsible for text detection and recognition in each cell image region. The hydraulic cylinder-specific rule engine includes a diameter symbol correction sub-engine and a thread symbol correction sub-engine. The diameter symbol correction sub-engine corrects the diameter symbol Ø through connected component topology analysis, while the thread symbol correction sub-engine corrects the thread interface symbol G and subsequent combinations of numbers and fractions through character aspect ratio verification and regular expression pattern matching. The two sub-engines work together to output a set of text content that has undergone domain adaptation correction.

[0163] The cross-level relationship analysis module is configured to execute step S3, which establishes a logical hierarchy graph between cells using a geometric matching algorithm. This module first identifies cross-row parent cell candidates based on height statistics and cross-column parent cell candidates based on width statistics. Then, it searches for their corresponding candidate child cell sequences. Finally, it confirms the hierarchy by jointly determining the total height matching degree and vertical center alignment degree, records the orientation information, and outputs a complete hierarchy mapping.

[0164] The dynamic order reconstruction module is configured to execute step S4, which implements a four-stage sorting strategy based on the subordinate relationship mapping. That is, it sequentially performs four-stage sorting: right-side adjustment, left-side adjustment, bottom-side adjustment, and top-side adjustment, generating a logically ordered cell sequence.

[0165] The structured output module is configured to execute step S5, which assembles ordered text content according to the inferred row and column logical structure, constructs nested hierarchical expressions for cells with subordinate relationships, and finally converts and outputs them as structured data files in JSON and Excel formats.

[0166] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described; only preferred embodiments of the present invention are illustrated. The descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. As long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.

[0167] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this invention should be determined by the appended claims.

Claims

1. A method of semantic ordering of a hydraulic cylinder engineering drawing table, characterized by, Includes the following steps: Step S1: Extract the structure of the table in the hydraulic cylinder engineering drawing to obtain the bounding box coordinates and geometric attributes of each cell; Step S2: Perform optical character recognition and engineering symbol correction on the image area of ​​each cell to obtain the text recognition result; including the following steps: Step S21: Using a deep learning-based optical character recognition model, text detection and recognition are performed on the image region corresponding to each cell, and preliminary recognition results containing text strings and character confidence scores are output. Step S22: Start the dedicated rule engine to perform engineering symbol correction on the preliminary identification results. The engineering symbol correction includes connected domain topology analysis correction of the diameter symbol Ø and regular expression pattern matching correction of the threaded interface symbol G and subsequent combinations of numbers and fractions. The connected domain topology analysis and correction of the diameter symbol Ø includes the following steps: calculating the ratio of the area of ​​the largest inscribed blank region to the area of ​​the circumscribed rectangle within the connected domain as the hole area ratio, and measuring the ring width uniformity in multiple radial directions. The ring width uniformity is determined using the multi-directional ring width standard deviation method: with the character centroid as the center, the ring width is measured in eight equally divided angular directions, and the ratio of the standard deviation of the ring width to the mean is calculated. If the ratio is less than 0.2, the ring width is considered uniform. If the hole area ratio is between 0.05 and 0.4 and the ring width is uniform, the current character is corrected to Ø. For cases where ring breaks are caused by image noise, morphological closing operations are first applied to the character region to close the gaps, and then the characteristic calculations of the hole area ratio and ring width uniformity are performed. Step S3: Based on the geometric attributes, filter the merged cells across rows and merged cells across columns respectively, and calculate the subordinate relationship and relative position of the merged cells across rows and merged cells across columns and their corresponding sub-cells based on the geometric matching degree, and establish a subordinate relationship mapping; Step S4: Based on the above subordinate relationship mapping, perform right-side adjustment, left-side adjustment, bottom-side adjustment and top-side adjustment in sequence to generate an ordered sequence of cells; Step S5: Output a structured tabular data file based on the ordered sequence and the text recognition result.

2. The method of semantic ordering of hydraulic cylinder engineering drawing sheets according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: Perform grayscale conversion, adaptive denoising based on nonlocal mean algorithm, contrast enhancement based on contrast-limited adaptive histogram equalization, and binarization based on Otsu's method on the hydraulic cylinder engineering drawing in sequence to obtain a binary image. Step S12: Perform morphological opening and closing operations on the binary image using the horizontal structuring element kernel and the vertical structuring element kernel respectively, extract and enhance the horizontal and vertical table lines, and fuse them to generate a table line mask. Step S13: Based on the table line mask, use the contour retrieval algorithm to locate the contours of all internal cells, calculate the bounding box coordinates, center coordinates, width and height of each cell, and form the bounding box coordinates and geometric attributes of each cell.

3. The semantic sorting method for hydraulic cylinder engineering drawing tables according to claim 1, characterized in that: Step S3 includes the following steps: Step S31: Filter candidates spanning multiple rows and multiple columns of parent cells separately: Candidate filtering across parent cells: Calculate the average height of all cells based on the geometric attributes. with standard deviation Cells that highly satisfy the following relation will be filtered as potential cross-row parent cell candidates: ; In the formula, The height of the cell; This is an adjustable coefficient; Candidate filtering across parent cells: Calculate the average width of all cells. with standard deviation Filter cells whose widths satisfy the following relationship as potential cross-column parent cell candidates: ; In the formula, The width of the cell; This is an adjustable coefficient; Step S32: For cells that simultaneously meet both the cross-row parent cell candidate filtering condition and the cross-column parent cell candidate filtering condition, perform the matching calculations of steps S33 to S34 in both the cross-row and cross-column directions respectively, select the direction with the lower comprehensive geometric matching score as the final subordinate type of the cell, and remove it from the candidate set of the other direction; if the comprehensive geometric matching scores of the two directions are equal, then the cross-column subordinate takes priority. The formula for calculating the comprehensive geometric matching score is: Cross-line matching score = total height matching degree + vertical center alignment degree; Cross-column match score = total width match score + horizontal center alignment score; Step S33: For each potential parent cell candidate, search for a sequence of candidate child cells in the corresponding direction based on the type of the parent cell candidate: For a candidate parent cell spanning multiple rows, within the horizontal right or left adjacent area of ​​the candidate parent cell, search for multiple cells that simultaneously satisfy center horizontal coordinate alignment and are vertically consecutive as a candidate child cell sequence. The alignment tolerance for center horizontal coordinate alignment is: ; In the formula, Alignment tolerance for center horizontal coordinate alignment; The width of the parent cell; The spacing threshold for the vertically continuous arrangement is: ; In the formula, The spacing threshold for vertically continuous arrangement; For a cross-column parent cell candidate, multiple cells that simultaneously satisfy center y-coordinate alignment and are horizontally consecutive within the adjacent area vertically below or above the cross-column parent cell candidate are searched as a sequence of candidate child cells. The alignment tolerance of the center y-coordinate is: ; In the formula, Alignment tolerance for the center ordinate; The height of the parent cell candidate; The spacing threshold for the horizontally continuous arrangement is: ; In the formula, The spacing threshold for horizontally continuous arrangement; Step S34: Calculate the joint bounding rectangle of the candidate sub-cell sequence. The joint bounding rectangle is the smallest bounding rectangle containing all candidate sub-cells. For the case of spanning rows, calculate the total height matching degree and vertical center alignment degree between the potential spanning parent cell candidate and the candidate sub-cell sequence. The expression for calculating the total height matching degree is: Total height matching degree = ; In the formula, The height of the parent cell candidate; The height of the joint bounding rectangle of the candidate sub-cell sequence; The expression for calculating the vertical center alignment is: Vertical center alignment = ; In the formula, The center y-coordinate of the candidate cell in the parent cell; The ordinate of the center of the joint bounding rectangle of the candidate sub-cell sequences; For cross-column cases, the total width matching degree and horizontal center alignment degree between the potential cross-column parent cell candidates and the candidate child cell sequence are calculated using the following expression: Total width matching degree = ; In the formula, The width of the candidate cell in the parent cell; The width of the joint bounding rectangle of the candidate subcell sequence; The expression for calculating the horizontal center alignment is: Horizontal center alignment = ; In the formula, The x-coordinate of the center of the candidate cell in the parent cell; The x-coordinate of the center of the joint bounding rectangle of the candidate sub-cell sequences; Step S35: If both geometric matching indices in the corresponding scenario are less than the preset threshold, the subordinate relationship is determined to be established, the relative orientation is determined, and the subordinate relationship and the relative orientation are recorded in the subordinate relationship mapping.

4. The semantic sorting method for hydraulic cylinder engineering drawing tables according to claim 3, characterized in that: The rule for determining the relative orientation in step S34 is as follows: Regarding the subordinate relationship corresponding to the merged cells across rows: If < If so, the relative orientation is determined to be the left side; like > If so, then the relative orientation is determined to be the right side; If the two are equal, the relative orientation is determined to be on the left by default; Regarding the dependency relationship corresponding to the merged cells across columns: if < If so, then the relative orientation is determined to be above; like > If so, then the relative orientation is determined to be downward; If the two are equal, the relative orientation is determined to be above by default.

5. The semantic sorting method for hydraulic cylinder engineering drawing tables according to claim 1, characterized in that: Step S4 employs a four-stage sequential adjustment algorithm, executing the following adjustment steps in sequence: Phase 1: Right-position adjustment. Scan from the bottom to the top of the global list of cell sequences. For the subordinate relationships in the mapping where the relative position is on the right, move the corresponding parent cell from its current position to after the last element of the child cell sequence corresponding to the parent cell. Second stage: Left position front adjustment. On the global list after the right position back adjustment, scan from bottom to top. For the subordinate relationship mapping with the relative position on the left, move the corresponding parent cell from the current position to before the first element of the child cell sequence corresponding to the parent cell. Third stage: Lower position adjustment. On the global list after the left position adjustment, scan from bottom to top. For the subordinate relationship in the subordinate relationship mapping with the relative position as lower, move the corresponding parent cell from the current position to after the last element of the child cell sequence corresponding to the parent cell. Fourth stage: Upper position front adjustment. On the global list after the lower position back adjustment, scan from bottom to top. For the subordinate relationship with the upper position in the subordinate relationship mapping, move the corresponding parent cell from the current position to before the first element of the child cell sequence corresponding to the parent cell.

6. The semantic sorting method for hydraulic cylinder engineering drawing tables according to claim 1, characterized in that: Step S5 includes the following steps: Step S51: Read the corrected text content of each cell sequentially according to the ordered sequence; Step S52: Infer the row and column logical structure of the table based on the geometric positional relationship of the cells in the ordered sequence; Step S53: Fill the inferred row and column logical structure with the text content, and organize the cells with the subordinate relationship into nested key-value pairs; Step S54: Output the final structured data as JSON and Excel files.

7. A recognition system for hydraulic cylinder engineering drawing tables, implemented based on the semantic sorting method for hydraulic cylinder engineering drawing tables as described in any one of claims 1-6, characterized in that, The system includes: Image preprocessing and structure extraction module: performs image enhancement and table structure extraction on hydraulic cylinder engineering drawings, and outputs the bounding box coordinates and geometric attributes of each cell; Text Recognition and Domain Correction Module: Integrates an optical character recognition engine and a dedicated rule engine to perform optical character recognition and engineering symbol correction on each cell image region and output the text recognition results; Cross-level relationship analysis module: Based on the geometric attributes, it filters merged cells across rows by height statistics, filters merged cells across columns by width statistics, and calculates and determines the subordinate relationship and relative position with child cells based on geometric matching degree, and outputs the subordinate relationship mapping; Dynamic sequence reconstruction module: Based on the subordinate relationship mapping, it sequentially performs four-stage sorting: right-side post-adjustment, left-side pre-adjustment, lower-side post-adjustment, and upper-side pre-adjustment, and outputs an ordered sequence; Structured output module: Outputs a structured tabular data file based on the ordered sequence and the text recognition result.

8. The hydraulic cylinder engineering drawing table recognition system according to claim 7, characterized in that: The dedicated rule engine in the text recognition and domain correction module includes a diameter symbol correction sub-engine and a thread symbol correction sub-engine. The diameter symbol correction sub-engine corrects the diameter symbol Ø through connected domain topology analysis, and the thread symbol correction engine corrects the thread interface symbol G and subsequent combinations of numbers and fractions through character aspect ratio verification and regular expression pattern matching.