A Semi-Automatic Method and System for Verifying Ship Cable Books Based on CAD Attribute Blocks
By standardizing symbols and decomposing structured data using regular expressions, the method for collating cable specifications and models between ship cable manuals and CAD drawings has solved the problem of false discrepancies caused by inconsistent writing formats, and achieved efficient and accurate collation of discrepancies.
Patent Information
- Application Number
- CN202611314693.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-11-10
AI Technical Summary
In the existing technology, the verification of cable specifications and models between ship cable manuals and CAD drawings suffers from false discrepancies due to inconsistent writing formats, and the discrepancies cannot be accurately located, resulting in low verification efficiency.
By employing symbolic standardization and regular expression structured decomposition methods, cable specifications and models are decomposed into independent semantic fields such as model prefix, number of main cores, main cross-sectional area, additional number of cores, and additional cross-sectional area. Then, the semantic fields are compared one by one through cable number association to generate comprehensive comparison conclusions and difference description text.
This reduces false discrepancies, improves proofreading efficiency, and allows proofreaders to identify discrepancies without having to examine each character individually, thus enhancing the accuracy and efficiency of proofreading.
Smart Images

Figure CN123069550A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of marine electrical engineering data processing technology, specifically to a semi-automatic calibration method and system for marine cable books based on CAD attribute blocks. Background Technology
[0002] During the electrical construction of ships, the cable book records the specifications and technical parameters of all the cables on the ship. These parameters need to be checked against the cable specifications and models in the attribute blocks of the CAD drawings to confirm data consistency.
[0003] The existing verification process uses CABLE_NO as the primary key to associate records on both sides, and compares the CABLE_SPEC field character by character using an exact string matching method.
[0004] However, the CAD attribute blocks and cable manuals were entered by different personnel at different times, resulting in multiple equivalent writing styles for the same cable specification. These variations included differences in hyphens and spaces, multiplication signs, and the presence or absence of unit suffixes. All of these equivalent expressions were flagged as discrepancies under exact match, generating numerous false discrepancies due to inconsistent writing formats rather than actual specifications. Proofreaders had to manually review and eliminate each discrepancy. Furthermore, when substantial discrepancies existed, exact match only output a "difference" conclusion, failing to specify whether the difference occurred in the model prefix, core count, or cross-sectional area. Proofreaders still had to identify the discrepancy character by character, leading to low proofreading efficiency. Summary of the Invention
[0005] This invention provides a semi-automatic method and system for calibrating ship cable registers based on CAD attribute blocks, which solves the technical problem of difficulty in efficiently detecting inconsistencies between cable specification and model information in ship cable registers and CAD drawings.
[0006] This invention discloses a semi-automatic verification method for ship cable registers based on CAD attribute blocks, including the following steps: obtaining the set of specification and model field values of all cable records in the CAD drawing attribute block and the set of specification and model field values of all cable records in the cable register table; For each specification and model field value in both sets, perform symbolic standardization and regular expression structured decomposition to generate a specification and model structured record containing five independent semantic fields: model prefix, number of main cores, main cross-sectional area, number of additional cores, and additional cross-sectional area. The cable number is used as the primary key to associate the specification and model structured records on both sides. For each successfully associated pair of records, the five semantic fields are independently compared to generate sub-comparison conclusions for each semantic field. Based on the sub-comparison conclusions, a comprehensive comparison conclusion for each pair of related records is calculated, and for entries with substantial differences, a difference description text containing the names of the difference semantic fields and the corresponding values on both sides is generated. Write the comprehensive comparison conclusion and the difference description text into the proofreading results worksheet, and output the specification and model semantic comparison result report.
[0007] Furthermore, the symbol standardization includes: replacing all asterisks in the specification field value with multiplication signs; removing all space characters in the specification field value; and performing full-width to half-width conversion on full-width numbers, full-width letters, and full-width symbols in the specification field value.
[0008] Furthermore, the regular expression structured decomposition includes: using regular expressions to match continuous character sequences composed of letters, numbers, and slashes in the standardized specification text to extract the model prefix segment; removing hyphens between the model prefix segment and subsequent characters; using regular expressions to match numerical combinations in the format of core number multiplied by cross-sectional area to extract the main core number and main cross-sectional area; detecting whether there is an additional core specification segment connected by a plus sign; if so, parsing the numerical combinations in the format of core number multiplied by cross-sectional area in the additional core specification segment to extract the additional core number and additional cross-sectional area; if not, marking the additional core number and additional cross-sectional area as null values; matching and removing the unit suffix text after the cross-sectional area value to generate the final specification structured record.
[0009] Furthermore, performing independent comparisons on the five semantic fields includes: for the model prefix field, converting the values of both sides of the field to uppercase letters and then performing a character-by-character comparison to generate a model prefix sub-comparison conclusion; for the main core number segment and the main cross-sectional area field, converting the values of both sides of the field to numeric types and then performing an equality determination to generate a main core number sub-comparison conclusion and a main cross-sectional area sub-comparison conclusion; for the additional core number segment and the additional cross-sectional area field, determining the null value status of both sides of the field and then performing a comparison. If both sides are null, the sub-comparison conclusion is consistent; if only one side is null while the other side has a numeric value, the sub-comparison conclusion is different; if both sides have numeric values, the field values are converted to numeric types and then an equality determination is performed.
[0010] Furthermore, the calculation of the comprehensive comparison conclusion includes: if all the sub-comparison conclusions of the five semantic fields are consistent, and the original specification and model field values on both sides are the same at the string level, then the comprehensive comparison conclusion is completely consistent; if all the sub-comparison conclusions of the five semantic fields are consistent, but the original specification and model field values on both sides are different at the string level, then the comprehensive comparison conclusion is substantially consistent in terms of format difference; if there is a difference in the sub-comparison conclusion of any semantic field, then the comprehensive comparison conclusion is substantially different.
[0011] Furthermore, the format of the difference description text is to list the names of the semantic fields for each sub-alignment conclusion that are different, and to annotate the CAD attribute block side value and the cable book side value after the semantic field name.
[0012] Furthermore, the output specification and model semantic comparison result report also includes: highlighting entries with a red background for those with a substantial difference in the overall comparison conclusion, and adding the name of the difference semantic field and the corresponding values on both sides in the remarks column; marking entries with a gray background for those with a substantial consistency in the format difference in the overall comparison conclusion; and keeping the default background color for those with a completely consistent overall comparison conclusion.
[0013] Furthermore, it also includes: sorting the records in the proofreading results worksheet according to the comprehensive comparison conclusion type, placing the items with substantial differences at the top, the items with substantial consistency in format differences in the middle, and the items with complete consistency at the bottom.
[0014] Furthermore, it also includes: marking records that fail to match after performing association with the cable number as the primary key as unmatched, recording the data source identifier to which the unmatched record belongs, and including the unmatched record in the verification result.
[0015] This invention discloses a semi-automatic verification system for ship cable books based on CAD attribute blocks, used to execute the above-mentioned semi-automatic verification method for ship cable books based on CAD attribute blocks, including: a data acquisition module, used to acquire the set of specification and model field values of all cable records in the CAD drawing attribute block and the set of specification and model field values of all cable records in the cable book table; The structured decomposition module is used to perform symbolic standardization and regular expression structured decomposition on each specification and model field value in both sets, generating a specification and model structured record containing five independent semantic fields: model prefix, number of main cores, main cross-sectional area, number of additional cores, and additional cross-sectional area. The semantic comparison module is used to associate the specification and model structured records on both sides with the cable number as the primary key, and to perform independent comparisons on the five semantic fields respectively, generating sub-comparison conclusions for each semantic field. The comprehensive judgment module is used to calculate the comprehensive comparison conclusion based on the sub-comparison conclusions of each semantic field, and generate a difference description text containing the names of the difference semantic fields and the corresponding values on both sides for entries with substantial differences. The results output module is used to write the comprehensive comparison conclusion and the difference description text into the proofreading results worksheet and output the specification and model semantic comparison results report.
[0016] The beneficial effects of this invention are as follows: This invention standardizes and decomposes the specification field values using symbols, unifying the values on both sides into the same semantic field representation. This ensures that specifications that differ at the string level but are semantically identical are correctly identified as consistent. This solves the technical problem of numerous false discrepancies arising from format differences in exact string matching, requiring proofreaders to manually review each entry. It achieves the technical effect of reducing false discrepancies and decreasing the workload of manual review. Furthermore, by independently comparing each semantic field and directly outputting the names of the specific inconsistent semantic fields and their corresponding values in the overall comparison conclusion, it solves the technical problem that exact matching cannot locate the semantic level of the difference. This achieves the technical effect of allowing proofreaders to identify the location of the difference without having to examine each character individually. Attached Figure Description
[0017] Figure 1 This is a flowchart of a semi-automatic calibration method for ship cable books based on CAD attribute blocks provided in an embodiment of the present invention. Detailed Implementation
[0018] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, some features described in the examples may be combined in other examples.
[0019] At least one embodiment of the present invention discloses a semi-automatic calibration method for ship cable books based on CAD attribute blocks, see [link to relevant documentation]. Figure 1 This includes the following steps: Step 100: Obtain the cable specification and model data to be calibrated.
[0020] Retrieve the set of CABLE_SPEC field values for all cable records from the CAD drawing attribute block parsing output, and the set of specification / model field values for all cable records from the cable register table parsing output. Each cable record is uniquely identified by CABLE_NO.
[0021] Step 200: Perform symbolic standardization and structured decomposition on the cable specification field value to generate a structured record of the specification.
[0022] For each field value in the CABLE_SPEC field value set and each field value in the specification and model field value set, the regular expression parsing engine is called to perform symbol standardization and structured decomposition to generate a specification and model structured record containing five independent semantic fields: model prefix, number of main cores, main cross-sectional area, number of additional cores, and additional cross-sectional area.
[0023] Step 200 may specifically include: Step 201: Perform symbol standardization on the specification field value, replacing all "*" symbols with "×" and removing all space characters to generate the standardized specification text.
[0024] Step 202: Use regular expressions to match continuous character sequences consisting of letters, numbers, and forward slashes in the standardized specification text to extract the model prefix segment.
[0025] Step 203: Remove the hyphen between the model prefix and the following characters.
[0026] Step 204: Use regular expressions to match numerical combinations in the format "number of cores × cross-sectional area" to extract the number of main cores and the main cross-sectional area.
[0027] Step 205: Check if there are any additional core specification segments connected by plus signs. If they exist, parse the numerical combination in the format "number of cores × cross-sectional area" in the additional core specification segment and extract the additional core number and additional cross-sectional area; if they do not exist, mark the additional core number and additional cross-sectional area as null values.
[0028] Step 206: Match and remove the unit suffix text after the cross-sectional area value to generate the final specification and model structured record.
[0029] It should be noted that the above-mentioned model prefix is a continuous character sequence consisting of letters, numbers, and forward slashes, corresponding to the cable model identifier, such as "CJPF86 / SC". The main core specification segment is a numerical combination in the format of "number of cores × cross-sectional area" immediately following the model prefix, such as "3×2.5" where the number of main cores is 3 and the main cross-sectional area is 2.5. The additional core specification segment is a description of the core specifications connected to the main core specification segment by a plus sign "+", such as "+1×1.5" where the number of additional cores is 1 and the additional cross-sectional area is 1.5. The unit suffix segment is the text of the unit of measurement that appears after the cross-sectional area value, such as "mm". 2 "or "mm2".
[0030] It should be noted that in the above symbol standardization process, the removal of spaces refers to the spaces inserted between the model prefix and the core specification section due to different input habits, such as the space between the model identifier and the core specification in "CJPF86 / SC 3×2.5". The removal of hyphens refers to the "-" symbol between the end of the model prefix and the beginning of the main core specification section, such as the hyphen in "CJPF86 / SC-3×2.5". These two types of separators do not carry semantic information in cable specification designations, and their removal does not change the technical meaning of the specification designation.
[0031] In this embodiment of the application, in order to handle the full-width characters that may exist in the specification field, based on step 201, full-width numbers, full-width letters and full-width symbols in the field value are also converted to half-width characters, so that the field values entered under different encoding input environments are unified into a unified half-width character representation.
[0032] Step 300: Using CABLE_NO as the primary key, associate the structured records of specifications and models on both sides, perform independent comparison of semantic fields, and generate sub-comparison conclusions.
[0033] Using CABLE_NO as the primary key, structured records with the same specification and model number are associated between the CAD attribute block side and the cable book side. For each successfully associated pair of specification and model structured records, independent comparisons are performed on the five semantic fields: model prefix, number of main cores, main cross-sectional area, additional cores, and additional cross-sectional area. Sub-comparison conclusions are generated for each semantic field, indicating whether they are consistent or different.
[0034] Step 300 may specifically include: Step 301: Perform string comparison on the model prefix field and generate a sub-comparison conclusion for the model prefix.
[0035] Furthermore, the string comparison of the model prefix field is performed in a case-insensitive manner, that is, the values of the model prefix fields on both sides are uniformly converted to uppercase letters before being compared character by character, in order to eliminate false differences caused by different capitalization habits of data entry personnel.
[0036] Step 302: Perform numerical comparison on the main core digital segment and generate the main core digital sub-comparison conclusion.
[0037] Step 303: Perform numerical comparison on the main cross-sectional area field to generate the main cross-sectional area sub-comparison conclusion.
[0038] Step 304: Perform a comparison on the additional core number segments to generate an additional core number sub-comparison conclusion. If both sides of the additional core number are empty, the additional core number sub-comparison conclusion is consistent. If only one side is empty while the other side has a value, the additional core number sub-comparison conclusion is different.
[0039] Step 305: Perform an alignment on the additional cross-sectional area field to generate an alignment conclusion for the additional cross-sectional area. The alignment logic is the same as that for the additional core count in Step 304.
[0040] It should be noted that the above numerical comparison involves converting the values of both fields to numeric types before determining equality, in order to avoid inconsistencies at the string level due to different leading zeros or decimal places. For example, the main cross-sectional area "2.50" and "2.5" are determined to be the same in numerical comparison.
[0041] In this embodiment of the application, in order to handle the situation where CABLE_NO exists in the data on one side but not on the other side, in addition to step 300, the following steps are also included: for records that fail to match after performing association with CABLE_NO as the primary key, mark them as "unmatched", record the data source side identifier to which the unmatched record belongs, and include the unmatched record in the verification result.
[0042] Step 400: Calculate the comprehensive comparison result based on the sub-comparison results of each semantic field.
[0043] Based on the sub-comparison results of five semantic fields—model prefix, number of main cores, main cross-sectional area, number of additional cores, and additional cross-sectional area—the comprehensive comparison result for each pair of related records is calculated.
[0044] Step 400 may specifically include: Step 401: Determine whether the sub-comparison results of the five semantic fields are all consistent. If they are all consistent, and the original CABLE_SPEC field value on the CAD attribute block side is the same as the original specification and model field value on the cable book side at the string level, then the overall comparison result is "completely consistent".
[0045] Step 402: If the sub-comparison results of all five semantic fields are consistent, but the original field values on both sides are different at the string level, then the overall comparison result is "the format differences are substantially consistent".
[0046] Step 403: If any semantic field has a sub-alignment result of "difference", the overall alignment result is "substantial difference". Extract the names of the specific inconsistent semantic fields and their corresponding values on both sides to generate a difference description text.
[0047] Furthermore, the format of the difference description text is to list the names of the semantic fields for which each sub-comparison conclusion shows a difference, and to indicate the CAD attribute block side value and the cable book side value in parentheses after the field name. For example, when there is a difference in the main cross-sectional area field, the difference description text includes "Main cross-sectional area (CAD side: 4.0, cable book side: 2.5)".
[0048] Step 500: Generate and output a semantic comparison result report of specifications and models.
[0049] Write the comprehensive comparison conclusions and difference descriptions of all cable records into the specification and model comparison column of the verification results worksheet, and output the specification and model semantic comparison result report.
[0050] In this embodiment of the application, in order to facilitate proofreaders to quickly distinguish between different types of comprehensive comparison conclusions, based on step 500, the "substantial difference" item is highlighted with a red background and the difference field name and corresponding values on both sides are noted in the remarks column; the "format difference substantially consistent" item is marked with a gray background; and the "completely consistent" item retains the default background color.
[0051] In this embodiment of the application, in order to further improve the efficiency of proofreaders in locating items to be processed, based on step 500, the records in the proofreading result worksheet are sorted according to the comprehensive comparison conclusion type, with "substantial difference" items arranged at the beginning, "format difference substantially consistent" items arranged in the middle, and "completely consistent" items arranged at the end.
[0052] On the other hand, the present invention also proposes a semi-automatic calibration system for ship cable books based on CAD attribute blocks, comprising: The data acquisition module is used to obtain the set of CABLE_SPEC field values for all cable records in the CAD drawing attribute block and the set of specification and model field values for all cable records in the cable book table.
[0053] The structured decomposition module is used to perform symbolic standardization and regular expression structured decomposition on each specification and model field value on the CAD attribute block side and the cable book side, generating a specification and model structured record containing five independent semantic fields: model prefix, number of main cores, main cross-sectional area, additional cores, and additional cross-sectional area.
[0054] The semantic comparison module is used to associate the specification and model structured records on both sides with CABLE_NO as the primary key, perform independent comparisons on the five semantic fields respectively, and generate sub-comparison conclusions for each semantic field.
[0055] The comprehensive judgment module is used to calculate the comprehensive comparison conclusion based on the sub-comparison conclusions of each semantic field, and generate difference description text for the items with substantial differences.
[0056] The results output module is used to write the comprehensive comparison conclusions and difference description text into the proofreading results worksheet and output a specification and model semantic comparison result report.
[0057] By way of example, the system proposed in this invention may also include various features and combinations thereof in the method embodiments, which will not be elaborated here.
[0058] This invention uses regular expressions to decompose the cable specification text on both the CAD attribute block side and the cable book side into five independent semantic fields: model prefix, main core count, main cross-sectional area, additional core count, and additional cross-sectional area. During the decomposition process, "*" is uniformly replaced with "×", spaces, hyphens, and unit suffixes are removed. Therefore, equivalent writing styles arising from differences in input personnel, input time, and input habits on both sides are unified into the same semantic field values after structured decomposition. This ensures that specifications that differ at the string level but are semantically identical are correctly identified as consistent, eliminating false discrepancies caused by format differences under exact string matching and avoiding the need for proofreaders to manually review and eliminate format differences line by line. Furthermore, by comparing each semantic field independently, when substantial differences exist, the comprehensive comparison conclusion directly outputs the specific inconsistent semantic field names and corresponding values on both sides. This allows proofreaders to determine whether the difference occurs at the model prefix, core count, or cross-sectional area level without having to identify each character individually, improving the accuracy of difference location and proofreading efficiency.
[0059] Application example: A shipbuilding company undertook an electrical installation project for a multipurpose vessel in a certain year. The project's cable register contained approximately 1200 cable records, corresponding to about 1200 attribute blocks in the CAD drawings. Before the electrical installation, the verification personnel needed to confirm the consistency between the CABLE_SPEC field in the CAD drawing attribute blocks and the specification / model field in the cable register. This verification uses four cable records as examples to demonstrate the complete data flow process of the semantic comparison procedure.
[0060] The computer terminal parses attribute block data from the CAD drawing file and reads corresponding fields from the cable register table file. Using CABLE_NO as a unique identifier, it retrieves the CABLE_SPEC field values on both sides. The CAD drawings are entered by the draftsman, while the cable register is entered by the materials manager. Differences in entry times and habits between the two groups result in discrepancies in the writing of the same cable's specifications and model numbers.
[0061] Table 1 Original cable specification data from the CAD attribute block side Table 2 Original Cable Specifications Data from the Cable Register Symbolic standardization and structured decomposition were performed on the above 8 field values. Taking the field value "CJPJ95 / SC-3*2.5+1*1.5" from the W002 cable booklet as an example: First, all "*" were replaced with "×", and spaces were removed to obtain the standardized text "CJPJ95 / SC-3×2.5+1×1.5". Then, a continuous character sequence consisting of letters, numbers, and slashes was matched to extract the model prefix segment "CJPJ95 / SC". The hyphen after the model prefix segment was removed. The main core specification segment "3×2.5" was matched to extract the number of main cores (3) and the main cross-sectional area (2.5). The additional core specification segment "1×1.5" connected by a plus sign was detected, and the number of additional cores (1) and the additional cross-sectional area (1.5) were extracted. Taking the field value "CJPF86 / SC-3×2.5mm" from the W003 CAD side as an example: 2 For example: After standardization, the text is "CJPF86 / SC-3×2.5mm". 2 Extract the model prefix segment "CJPF86 / SC"; remove hyphens; match the main core specification segment "3×2.5"; no additional core specification segment was detected, and the number of additional cores and additional cross-sectional area are marked as empty values; match and remove the unit suffix "mm" after the cross-sectional area value. 2 ".
[0062] Table 3. Results of Structured Decomposition Table 4. Structural decomposition results of W004 cable After associating the structured records on both sides with CABLE_NO as the primary key, an independent comparison is performed on the five semantic fields of each pair of records. Taking W001 as an example, the model prefix field "CJPF86 / SC" and "CJPF86 / SC" are determined to be consistent after a case-insensitive comparison; the number of main cores 3 and 3 are equal, so they are determined to be consistent; the main cross-sectional area 2.5 and 2.5 are equal, so they are determined to be consistent; the number of additional cores on both sides are empty, so they are determined to be consistent; the additional cross-sectional area on both sides are empty, so they are determined to be consistent. Taking W004 as an example, the model prefix, number of main cores, number of additional cores, and additional cross-sectional area fields are all consistent, but the main cross-sectional area field is 4.0 on the CAD side and 2.5 on the cable book side, which are not equal, so they are determined to be different.
[0063] Table 5. Semantic field-by-semantic field comparison results The overall comparison conclusion is calculated based on the sub-comparison results of each semantic field. For W001, all five semantic fields are identical, but the original value "CJPF86 / SC-3×2.5" on the CAD side differs from the original value "CJPF86 / SC 3×2.5" on the cable book side at the string level (difference between hyphens and spaces). The overall comparison conclusion is "format difference, substantially identical." For W002, all five semantic fields are identical, but the original values on the CAD side and the cable book side differ at the string level (difference between multiplication signs). The overall comparison conclusion is "format difference, substantially identical." For W003, all five semantic fields are identical, but the original value on the CAD side includes a unit suffix while the one on the cable book side does not, resulting in a difference at the string level. The overall comparison conclusion is "format difference, substantially identical." For W004, there is a difference in the main cross-sectional area field. The overall comparison conclusion is "substantially different," and the difference description text "Main cross-sectional area (CAD side: 4.0, cable book side: 2.5)" is generated.
[0064] Table 6. Overall Comparison Conclusions and Description of Differences Write the above conclusions into the verification results worksheet and output them in sorted order by the type of comprehensive comparison conclusion. W004, as the "Substantial Difference" item, is listed first and highlighted with a red background, with the remarks column noting "Main cross-sectional area (CAD side: 4.0, cable book side: 2.5)". W001, W002, and W003, as the "Format Difference Substantial Consistency" items, are listed after it with a gray background.
[0065] The data flow process of the above four cable records reflects a step-by-step transformation logic from raw text to structured semantic fields, and then to comparison conclusions. In the initial stage, the data from both sides presented multiple equivalent writing forms due to differences in input habits. After symbol standardization and structured decomposition, the equivalent forms were unified into the same semantic field values. In the independent comparison stage of each semantic field, format differences were correctly identified as substantial consistency, and the actual differences in the main cross-sectional area were accurately located. In the comprehensive judgment stage, the comparison conclusions were distinguished into two types: "format differences with substantial consistency" and "substantial differences," and the specific difference fields and corresponding values on both sides were directly output for the substantial difference items. The final output proofreading result worksheet is sorted by conclusion type. Proofreaders only need to focus on the substantial difference items highlighted in red, without needing to review each item caused by inconsistent writing formats.
[0066] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.
Claims
1. A semi-automatic method for calibrating ship cable books based on CAD attribute blocks, characterized in that, Includes the following steps: Retrieve the set of specification and model field values for all cable records in the CAD drawing attribute block and the set of specification and model field values for all cable records in the cable book table; For each specification and model field value in both sets, perform symbolic standardization and regular expression structured decomposition to generate a specification and model structured record containing five independent semantic fields: model prefix, number of main cores, main cross-sectional area, number of additional cores, and additional cross-sectional area. The cable number is used as the primary key to associate the specification and model structured records on both sides. For each successfully associated pair of records, the five semantic fields are independently compared to generate sub-comparison conclusions for each semantic field. Based on the sub-comparison conclusions, a comprehensive comparison conclusion for each pair of related records is calculated, and for entries with substantial differences, a difference description text containing the names of the difference semantic fields and the corresponding values on both sides is generated. Write the comprehensive comparison conclusion and the difference description text into the proofreading results worksheet, and output the specification and model semantic comparison result report.
2. The semi-automatic calibration method for ship cable books based on CAD attribute blocks according to claim 1, characterized in that, The symbol standardization includes: Replace all asterisks with multiplication signs in the specification field; Remove all white characters from the specification / model field value; Perform full-width to half-width conversion on full-width numbers, full-width letters, and full-width symbols in the specification field.
3. The semi-automatic calibration method for ship cable books based on CAD attribute blocks according to claim 2, characterized in that, The structured decomposition of the regular expression includes: Use regular expressions to match continuous character sequences consisting of letters, numbers, and forward slashes in the standardized specification text to extract the model prefix segment; Remove the hyphen between the model prefix and the following characters; The main core number and main cross-sectional area are extracted by matching numerical combinations in the format of core number multiplied by cross-sectional area using regular expressions. Detect whether there is an additional core specification segment connected by a plus sign. If it exists, parse the numerical combination of the number of cores multiplied by the cross-sectional area in the additional core specification segment and extract the additional core number and additional cross-sectional area. If it does not exist, mark the additional core number and additional cross-sectional area as null values. Match and remove the unit suffix text after the cross-sectional area value to generate the final specification and model structured record.
4. The semi-automatic calibration method for ship cable books based on CAD attribute blocks according to claim 1, characterized in that, Performing independent comparisons on the five semantic fields includes: For the model prefix field, after converting the values of both fields to uppercase letters, perform a character-by-character comparison to generate a model prefix sub-comparison conclusion; For the main core digital segment and the main cross-sectional area field, after converting the values of the fields on both sides into numerical types, perform equality judgment to generate the main core digital segment comparison conclusion and the main cross-sectional area segment comparison conclusion. For the additional core number segment and the additional cross-sectional area field, after determining the null value status of the field values on both sides, a comparison is performed. If both sides are null, the sub-comparison conclusion is that they are consistent. If only one side is null while the other side has a value, the sub-comparison conclusion is that they are different. If both sides have a value, the field values are converted to numeric types and then an equality judgment is performed.
5. The semi-automatic calibration method for ship cable books based on CAD attribute blocks according to claim 1, characterized in that, The calculation of the comprehensive comparison conclusion includes: If the sub-comparison results of all five semantic fields are consistent, and the original specification and model field values on both sides are the same at the string level, then the overall comparison result is completely consistent. If the sub-comparison results of all five semantic fields are consistent, but the original specification and model field values on both sides are different at the string level, then the overall comparison result is that the format differences are substantially consistent. If any semantic field has a sub-alignment result indicating a difference, then the overall alignment result is a substantial difference.
6. The semi-automatic calibration method for ship cable books based on CAD attribute blocks according to claim 5, characterized in that, The format of the difference description text is to list the names of the semantic fields for each sub-alignment that show a difference, and then annotate the CAD attribute block side value and the cable book side value after the semantic field name.
7. The semi-automatic calibration method for ship cable books based on CAD attribute blocks according to claim 5, characterized in that, The output specification and model semantic comparison result report also includes: Entries with a substantial difference in the overall comparison conclusion are highlighted with a red background, and the names of the semantic fields of the difference and their corresponding values on both sides are noted in the remarks column; Items whose overall comparison results show that the format differences are substantially consistent are marked with a gray background; The default background color is retained for entries whose overall comparison results are completely consistent.
8. The semi-automatic calibration method for ship cable books based on CAD attribute blocks according to claim 7, characterized in that, Also includes: Sort the records in the proofreading results worksheet according to the comprehensive comparison conclusion type, with the items of substantial differences at the top, the items of format differences but substantial consistency in the middle, and the items of complete consistency at the bottom.
9. The semi-automatic calibration method for ship cable books based on CAD attribute blocks according to claim 1, characterized in that, Also includes: For records that fail to match after performing association using the cable number as the primary key, mark them as unmatched, record the data source identifier to which the unmatched record belongs, and include the unmatched record in the verification results.
10. A semi-automatic calibration system for ship cable books based on CAD attribute blocks, used to execute the semi-automatic calibration method for ship cable books based on CAD attribute blocks as described in any one of claims 1 to 9, characterized in that, include: The data acquisition module is used to acquire the set of specification and model field values of all cable records in the CAD drawing attribute block and the set of specification and model field values of all cable records in the cable book table. The structured decomposition module is used to perform symbolic standardization and regular expression structured decomposition on each specification and model field value in both sets, generating a specification and model structured record containing five independent semantic fields: model prefix, number of main cores, main cross-sectional area, number of additional cores, and additional cross-sectional area. The semantic comparison module is used to associate the specification and model structured records on both sides with the cable number as the primary key, and to perform independent comparisons on the five semantic fields respectively, generating sub-comparison conclusions for each semantic field. The comprehensive judgment module is used to calculate the comprehensive comparison conclusion based on the sub-comparison conclusions of each semantic field, and generate a difference description text containing the names of the difference semantic fields and the corresponding values on both sides for entries with substantial differences. The results output module is used to write the comprehensive comparison conclusion and the difference description text into the proofreading results worksheet and output the specification and model semantic comparison results report.
