A highway engineering design drawing analysis and optimization method based on a knowledge graph

By using a knowledge graph-based approach combined with various technical means to optimize the parsing of highway engineering design drawings, the problems of low efficiency and insufficient accuracy in existing technologies have been solved. This has enabled efficient and accurate determination of design parameter compliance and detection of construction conflicts, thereby improving design quality and project implementation efficiency.

CN122244892APending Publication Date: 2026-06-19YUNNAN TRAFFIC PLANNING DESIGN RESEARCH INSTITUTE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
YUNNAN TRAFFIC PLANNING DESIGN RESEARCH INSTITUTE CO LTD
Filing Date
2026-03-18
Publication Date
2026-06-19

Smart Images

  • Figure CN122244892A_ABST
    Figure CN122244892A_ABST
Patent Text Reader

Abstract

This invention relates to a knowledge graph-based system and method for parsing and optimizing highway engineering design drawings, belonging to the field of artificial intelligence and knowledge graph application technology. The system includes a data acquisition and processing module, a drawing parsing module, a knowledge graph construction module, and a reasoning and optimization module. This invention integrates drawing semantic parsing, knowledge graph reasoning, and adaptive optimization, significantly improving the automatic identification accuracy and compliance judgment efficiency of highway engineering design drawings. It supports intelligent association and optimization suggestion generation from regulatory constraints to construction examples, enhancing the intelligence level of engineering design review and management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of knowledge graph technology, specifically relating to a knowledge graph-based method for parsing and optimizing highway engineering design drawings. Background Technology

[0002] Highway engineering design drawings are core documents in highway construction, detailing the planning, design, and construction requirements of the highway project. These drawings are typically prepared collaboratively by multiple professional teams, including road engineers, structural engineers, and traffic engineers, to ensure the highway's safety, functionality, and economy. Highway engineering design drawings mainly include the following: First, the drawings clearly define the highway's starting and ending points, route alignment, mileage markers, and the location and dimensions of structures such as roadbeds, pavements, bridges, and tunnels. Second, the drawings detail the highway's longitudinal and transverse profiles, including longitudinal slopes, vertical curves, and cross-sectional layout, ensuring the highway's alignment meets design speed and traffic flow requirements. Furthermore, the drawings include designs for traffic safety facilities such as traffic signs, markings, and guardrails, as well as ancillary facilities such as drainage systems, lighting systems, and landscaping. These design drawings not only guide construction but also serve as crucial bases for project acceptance and subsequent maintenance. During the drawing preparation process, engineers fully consider natural conditions such as geology, topography, and climate, as well as traffic demands such as traffic volume and speed, ensuring the highway design is both scientific and practical. Therefore, highway engineering design drawings are an indispensable and essential component of highway construction.

[0003] To address the issues of inefficiency and inaccuracy in the intelligent processing and knowledge reasoning of engineering data in highway engineering design drawings, existing technologies employ a combination of manual review and traditional image processing software. However, manual review is time-consuming and prone to errors, while traditional image processing software struggles to effectively identify complex structures and implicit logical relationships in the drawings. This leads to inaccurate determination of design parameter compliance and untimely detection of construction conflicts.

[0004] Therefore, overcoming the shortcomings of existing technologies is an urgent problem to be solved in the field of knowledge graph technology. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of existing technologies and provide a knowledge graph-based method for optimizing highway engineering design drawings.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A knowledge graph-based highway engineering design drawing parsing and optimization system includes a data acquisition and processing module, a drawing parsing module, a knowledge graph construction module, and a reasoning and optimization module. The data acquisition and processing module is used to collect highway engineering design drawing data, perform grayscale normalization preprocessing on the collected data to eliminate scanning artifacts and background noise, use edge detection algorithm to extract line features in the drawings, and combine connected component analysis and OCR recognition technology to extract annotation text and symbol marks as key element features of the drawings. The drawing parsing module, connected to the data acquisition and processing module, is used to extract features and perform semantic parsing on drawing images based on the Tongyi Qianwen large model framework and optical character recognition technology. It also uses vector graphics parsing algorithms to extract structured data such as component dimensions, material specifications, and construction coordinates. The knowledge graph construction module, connected to the drawing parsing module, is used to construct a knowledge graph for the highway engineering field that includes three types of entities: road components, material properties, and construction specifications, using the Neo4j graph database. Through rule-based reasoning and anomaly detection, it enables compliance determination of design parameters and detection of geometric conflicts. The reasoning and optimization module, connected to the knowledge graph construction module, uses vector space mapping technology to perform semantic vector conversion and matching between natural language queries and graph nodes in the highway engineering knowledge graph. Combined with a multi-hop path reasoning algorithm, it performs semantic association analysis between design specifications and construction cases in the knowledge graph, and constructs recommended paths from design specifications to construction cases. Based on the gradient descent optimization algorithm, it constructs a loss function for drawing recognition errors, backpropagates errors, and iteratively optimizes model parameters. Using a report generation engine, it automatically outputs compliance judgment reports including dimensional compliance, material specifications, and construction conflict situations, and generates optimization suggestions for anomalies.

[0007] This invention also provides a knowledge graph-based method for parsing and optimizing highway engineering design drawings. Employing the aforementioned knowledge graph-based highway engineering design drawing parsing and optimization system, the method includes the following steps: S1. Collect highway engineering design drawing data. Obtain images or vector data of highway engineering design drawings through scanners or digital interfaces. Perform grayscale normalization preprocessing on the collected data to eliminate scanning artifacts and background noise. Use edge detection algorithms to extract line features in the drawings. Combine connected component analysis and OCR recognition technology to extract annotation text and symbol markings as key element features of the drawings. S2. Based on the Tongyi Qianwen large model framework and optical character recognition technology, feature extraction and semantic parsing are performed on the drawing images. Combined with vector graphics parsing algorithms, structured data such as component dimensions, material specifications, and construction coordinates are extracted. The Neo4j graph database is used to construct a knowledge graph in the highway engineering field that includes three types of entities: road components, material properties, and construction specifications. Through rule reasoning and anomaly detection, compliance determination of design parameters and geometric conflict detection are achieved. S3. Using vector space mapping technology, semantic vector conversion and matching are performed between natural language queries and graph nodes of the knowledge graph in the field of highway engineering. Combined with multi-hop path reasoning algorithm, semantic association analysis between design specifications and construction cases is realized in the knowledge graph, and a recommended path from design specifications to construction cases is constructed. S4. Construct a loss function for drawing recognition error based on gradient descent optimization algorithm, backpropagate the error and iteratively optimize model parameters to improve the recognition accuracy of key elements in drawings; use a report generation engine to automatically output compliance judgment reports including dimensional compliance, material specifications and construction conflict situations, and generate optimization suggestions for anomalies.

[0008] Furthermore, preferably, in S1, the highway engineering design drawing data includes CAD vector graphics, PDF documents, and image files of the highway engineering design drawings.

[0009] Furthermore, preferably, in S1, the acquired data undergoes grayscale normalization preprocessing to eliminate scanning artifacts and background noise. The specific method is as follows: Calculate the grayscale value of each pixel in the color image, convert it to a grayscale image, traverse the entire grayscale image, find the minimum and maximum grayscale values ​​in the image, normalize the grayscale image, and map the normalized grayscale values ​​back to the brightness range of 0 to 255. Smooth the image by weighted averaging, with the weights determined by a Gaussian function.

[0010] Furthermore, preferably, in S2, based on the Tongyi Qianwen large model framework and optical character recognition technology, feature extraction and semantic parsing are performed on the drawing image, and structured data such as component dimensions, material specifications, and construction coordinates are extracted by combining vector graphics parsing algorithms; the specific method is as follows: The preprocessed grayscale image is input into the Tongyi Qianwen Big Model to obtain a feature map that combines global semantic information and local geometric structure. At the same time, the Tongyi Qianwen Big Model fuses shallow features and deep features. Based on fusion features, an improved DeepLabv3+ semantic segmentation algorithm is introduced to perform pixel-level region classification on drawings.

[0011] Furthermore, preferably, the area classification is divided into the following categories: road components, labeled text areas, material annotations, structural auxiliary lines, non-structural areas, and blurred and unidentified areas.

[0012] Furthermore, preferably, in S2, a knowledge graph for the highway engineering domain is constructed using the Neo4j graph database, containing three types of entities: road components, material properties, and construction specifications. The specific method is as follows: The structured data extracted from the drawings will be imported into the Neo4j graph database; three types of entities will be defined: road components, material properties, and construction specifications.

[0013] The main relationships between entities are as follows: Components use a certain material (USES); Components conform to a certain construction specification (COMPLIES_WITH); Composite components contain sub-components (CONTAINS); Spatial connections or structural associations between components (CONNECTED_TO); Specifications reference other specifications, or components depend on a certain standard (REQUIRES); The Neo4j Cypher statement batch import mechanism is used to convert structured JSON data into a graph structure, create a label for each node, establish edges for each type of relationship, perform a MERGE operation after import to prevent node duplication, and establish necessary indexes and unique constraints. After establishing a relationship connection, automatic checks on connection integrity and reasonableness are performed.

[0014] Furthermore, preferably, in S2, the design parameters include dimensional parameters, material parameters, spatial parameters, and construction parameters.

[0015] Furthermore, preferably, in S3, during matching, the similarity between the natural language query vector and the graph node vector is calculated, and the top N nodes with the highest similarity scores are selected as the matching results.

[0016] Furthermore, preferably, in S3, when constructing recommended paths from standard requirements to construction examples, each path is scored, and the top N paths with the highest scores are selected as recommended results and displayed to the user.

[0017] In S1 of this invention, highway engineering design drawing data is collected using an engineering drawing scanning device and digital interface technology. This data includes CAD vector graphics, PDF documents, and image files of the highway engineering design drawings. The specific collection process is as follows: Place the paper drawing flat on the scanning device's worktable, start the scanner, select the color scanning mode according to the drawing type, set the resolution to 300 DPI, generate a digital image file, export the standard format of the CAD vector graphic using CAD software, and download the PDF document from the document management system. The scanning device's worktable is made of aluminum alloy, with dimensions of 1200mm × 900mm, a load-bearing capacity of ≥50kg, and a surface flatness error of ≤0.1mm. It supports automatic alignment and fixing of A0 to A4 size drawings. The document management system is a cloud-based electronic document storage and retrieval platform that supports version control, permission management, and batch download functions for PDF and CAD format files.

[0018] Vector graphics parsing algorithms refer to the processing flow of automatically parsing vector graphics elements in CAD format engineering drawings. This includes steps such as layer separation algorithms, coordinate mapping and unit conversion algorithms, and topology reconstruction algorithms. It realizes CAD entity recognition and structured parsing functions based on the LibreDWG library.

[0019] The improved DeepLabv3+ semantic segmentation algorithm used in this invention is an improvement upon the DeepLabv3+ algorithm, mainly including: 1) introducing a multi-scale dilated convolution (ASPP) fusion module in the encoder to improve the recognition accuracy of complex lines and small annotations; 2) using an attention weight mechanism (AttentionRefinement Module) to enhance the contextual relationships of adjacent pixels in the decoder stage; 3) introducing a residual skip connection structure to optimize the feature fusion effect between deep and shallow layers. The improved method is referenced in: Chen et al., Encoder-Decoder with Atrous Separable Convolution for Semantic Image Segmentation, ECCV 2018. Li et al., Attention-based Feature Fusion for High-PrecisionEngineering Drawing Segmentation, Automation in Construction, 2022. In this invention S2, the design parameters specifically include dimensional parameters: component length, width, height, thickness, clearance, turning radius, etc.; material parameters: material type, strength grade, elastic modulus, diameter, cross-sectional dimensions, density, etc.; spatial parameters: component center coordinates, boundary points, azimuth angle, slope, etc.; and construction parameters: construction sequence, station number, coordinate mileage, elevation, etc.

[0020] In S3 of this invention, a semantic association path between design specifications and construction cases is established through vector space mapping and multi-hop inference algorithm; S4 uses gradient descent optimization algorithm to reverse the component identification error involved in the inference result of S3 and re-optimize the parameters, realizing closed-loop feedback from semantic inference to visual recognition model, thereby forming an adaptive optimization mechanism between drawing parsing and knowledge graph inference.

[0021] In this invention, the "REQUIRES" relationship is used to represent references or dependencies between specifications, or the dependence of a component on a specific standard. This means that a construction specification node references a clause in another specification, or the component design depends on a clause in a certain standard. For example, a clause in the "Highway Engineering Technical Standard" can reference parameter restrictions in the "General Specification for Bridge and Culvert Design" through a REQUIRES relationship. Data (here, data refers to the design parameter instance data stored in the knowledge graph, including fields such as dimensions, materials, coordinates, and strength grades extracted from drawings. When these actual values ​​are inconsistent with specification thresholds or rule constraints, it is determined as a "VIOLATES" relationship, used for subsequent anomaly detection and compliance report generation.) This data conflicts with specifications and is subsequently used for anomaly detection (VIOLATES). By using vector space mapping algorithms and multi-hop inference path search algorithms, natural language queries and semantic similarity calculations of knowledge graph nodes can be achieved. Furthermore, the correlation between design specifications and construction cases can be deeply analyzed, enabling engineers to quickly and accurately obtain construction case information that matches design specifications. This significantly improves the overall level of highway engineering design. Additionally, gradient descent optimization algorithms are used to backpropagate and correct drawing recognition errors and iteratively update model parameters, continuously improving analytical accuracy. The report generation engine automatically generates standard compliance reports and optimization suggestions, providing intuitive feedback to the design team and accelerating the design iteration and optimization process.

[0022] Compared with the prior art, the beneficial effects of this invention are as follows: (1) This invention provides a knowledge graph-based optimization method for highway engineering design drawing parsing, which significantly improves the accuracy and efficiency of drawing parsing. Through grayscale normalization preprocessing and key element feature extraction, scanning artifacts and background noise are effectively eliminated. Combined with advanced OCR technology and vector graphics parsing algorithms, the structured data in the drawings can be accurately identified, laying a solid foundation for subsequent knowledge graph construction and rule reasoning. This greatly reduces the workload of manual review and improves the accuracy of design parameter compliance judgment and conflict detection. (2) This invention provides a knowledge graph-based method for analyzing and optimizing highway engineering design drawings, realizing intelligent correlation analysis between design knowledge and construction cases. By utilizing vector space mapping algorithm and multi-hop reasoning path search algorithm, this method can deeply understand the implicit logical relationships in design drawings, effectively link design specifications with past construction cases, provide engineers with rich reference information and optimization suggestions, promote the integration of design innovation and practical experience, and improve the overall level of highway engineering design.

[0023] (3) This invention provides a knowledge graph-based method for parsing and optimizing highway engineering design drawings with continuous learning and self-optimization capabilities. Its core is to integrate a deep image recognition model with a structured knowledge graph reasoning system, and continuously correct the error between the model output and manual annotation through a gradient descent optimization algorithm, thereby realizing dynamic iterative updates of model parameters and improving the accuracy and stability of drawing recognition.

[0024] Compared to existing static OCR recognition or rule-driven primitive parsing methods, this invention introduces a supervised learning + self-feedback mechanism. The model recognition accuracy in the training set can be improved from the initial 82.3% to 94.7% (taking text region recognition accuracy as an example), and the component semantic segmentation mIoU index is improved by about 12.4%, significantly reducing the size error and text misrecognition rate in drawing recognition.

[0025] Furthermore, the system's integrated compliance analysis report automatic generation engine can output illustrated compliance judgments and improvement suggestions based on the knowledge graph and specification matching results (corresponding to the "automatic generation of standard compliance reports and optimization suggestions" in the claims), achieving closed-loop feedback to the design team. In simulated design review experiments, teams using the system of this invention for review showed an average problem detection rate increase of 38.5% and a drawing rework cycle reduction of approximately 22%, significantly improving design quality and project implementation efficiency.

[0026] The key steps in the above continuous optimization process—drawing image recognition → model error backpropagation → parameter update → compliance verification → result feedback—form an adaptive optimization closed loop. This mechanism not only improves analytical accuracy but also possesses cross-project transfer learning capabilities, making it applicable to various types of highway design drawings. Attached Figure Description

[0027] Figure 1 This is a flowchart of the knowledge graph-based optimization method for highway engineering design drawings according to the present invention. Detailed Implementation

[0028] The present invention will now be described in further detail with reference to the embodiments.

[0029] Those skilled in the art will understand that the following embodiments are for illustrative purposes only and should not be construed as limiting the scope of the invention. Where specific techniques or conditions are not specified in the embodiments, they are performed in accordance with the techniques or conditions described in the literature in the field or according to the product instructions. Materials or equipment whose manufacturers are not specified are all conventional products that can be obtained by purchase.

[0030] A knowledge graph-based method for parsing and optimizing highway engineering design drawings includes the following steps: S1. Collect highway engineering design drawing data. Obtain images or vector data of highway engineering design drawings through scanners or digital interfaces. Perform grayscale normalization preprocessing on the collected data to eliminate scanning artifacts and background noise. Use edge detection algorithms to extract line features in the drawings. Combine connected component analysis and OCR recognition technology to extract annotation text and symbol markings as key element features of the drawings. S2. Based on the Tongyi Qianwen large model framework and optical character recognition technology, feature extraction and semantic parsing are performed on the drawing images. Combined with vector graphics parsing algorithms, structured data such as component dimensions, material specifications, and construction coordinates are extracted. The Neo4j graph database is used to construct a knowledge graph in the highway engineering field that includes three types of entities: road components, material properties, and construction specifications. Through rule reasoning engine and anomaly detection algorithm, compliance determination of design parameters and geometric conflict detection are realized. S3. Using vector space mapping technology, semantic vector conversion and matching are performed between natural language queries and graph nodes. Combined with multi-hop path reasoning algorithm, semantic association analysis between design specifications and construction cases is realized in knowledge graph, and recommended paths from specification requirements to construction examples are constructed. S4. Construct a loss function for drawing recognition error based on gradient descent optimization algorithm, backpropagate the error and iteratively optimize model parameters to improve the recognition accuracy of key elements in drawings; use a report generation engine to automatically output compliance judgment reports including dimensional compliance, material specifications and construction conflict situations, and generate optimization suggestions for anomalies.

[0031] In S1, highway engineering design drawing data includes CAD vector graphics, PDF documents, and image files of highway engineering design drawings.

[0032] In S1, the acquired data undergoes grayscale normalization preprocessing to eliminate scanning artifacts and background noise. The specific method is as follows: The process involves calculating the grayscale value of each pixel in a color image, converting it to a grayscale image, iterating through the entire grayscale image to find the minimum and maximum grayscale values, normalizing the grayscale image, mapping the normalized grayscale values ​​back to a brightness range of 0 to 255, and smoothing the image using a weighted average method with weights determined by a Gaussian function. The specific implementation is as follows: For each pixel, take its neighboring pixels within a certain range (e.g., a 3×3 or 5×5 window centered on the current pixel), and use a two-dimensional Gaussian kernel function to calculate the weight of each pixel within the neighborhood. The calculation formula is: Where (x, y) represents the offset of the current neighboring pixel relative to the center pixel, and σ is the standard deviation of the Gaussian function, used to control the smoothness, typically ranging from 0.8 to 1.6. This weight value reflects the principle that pixels closer to the center pixel are more important.

[0033] When calculating the new grayscale value of the current center pixel, the grayscale value of each pixel in the neighborhood is multiplied by its corresponding Gaussian weight, and the sum of all weighted values ​​is calculated. Finally, the result is divided by the sum of the weights to obtain the weighted average. Where I(i,j) is the gray value of the original image, I'(i,j) is the gray value after smoothing, and N is the neighborhood range. This method effectively reduces random noise in the image while preserving key structural features, laying the foundation for subsequent image recognition and text extraction.

[0034] The line type features, annotation text, and symbols in the drawing are extracted as key element features. Specifically, this involves using an edge detection algorithm to identify the line type features in the drawing. The edge detection operation is performed on a grayscale image that has undergone Gaussian weighted smoothing to reduce noise interference and improve the accuracy of edge detection.

[0035] Linear features refer to the edge contours of graphic elements such as straight lines, curves, and broken lines in drawings that have engineering significance. These usually represent structural information such as road centerlines, edge lines, pipelines, and the outlines of structures, and have clear linear characteristics.

[0036] The specific operation is as follows: First, use the Sobel operator to perform gradient calculation on the image to obtain the gradient magnitude and direction of each pixel in the horizontal and vertical directions.

[0037] Then, non-maximum suppression is performed at each pixel location according to its gradient direction, that is, only pixels with local maxima along the gradient direction are retained as potential edge points, and the rest are set to 0, thereby achieving edge refinement.

[0038] Next, set two gradient magnitude thresholds: a high threshold and a low threshold. and low threshold High threshold Set to low threshold Twice: 1) When the gradient magnitude of a pixel is greater than the high threshold, the pixel is considered a strong edge and is directly retained; 2) When the gradient magnitude of a pixel is less than the low threshold, it is considered a non-edge and is directly discarded; 3) For pixels in between, only retain them if they are connected to strong edge pixels (such as adjacent pixels in 8 neighborhoods). Use a double threshold connection method to make the judgment to ensure edge continuity.

[0039] The three judgment rules mentioned above—strong edge preservation, weak edge connection, and non-edge discarding—are the core steps of the Canny Edge Detection algorithm. This algorithm achieves high-precision edge extraction through gradient calculation, non-maximum suppression, and double threshold connection, and is currently the mainstream method for line type feature detection in drawings.

[0040] After completing the above steps, the Hough Transform is used to detect straight lines and curves in the drawing. For straight line detection, a standard straight line Hough Transform is used to map points in the image space to (ρ, θ) in the parameter space. All pixels in the image that could potentially belong to a straight line are then represented by polar coordinate equations. Mapped to a (Distance) and In a parameter space with (angle) as the coordinate axis, the intersection points of curves are found in this space to detect straight lines in the image. Collinear pixels are detected by an accumulator; for curve detection (such as arcs), a circular Hough transform or a custom polar coordinate transform is used to identify curved edges with geometric patterns; the output of the Hough transform includes the parameters of each straight line or curve (such as start and end coordinates, radius, angle, etc.) as well as its position in the line space and confidence score.

[0041] Ultimately, graphic boundaries representing structural boundaries, road centerlines, construction auxiliary lines, and other engineering-related features are extracted as line type features, serving as important inputs for subsequent drawing understanding and knowledge graph construction.

[0042] The specific method for identifying annotation text and symbols in drawings using connected component analysis is as follows: This process is based on the grayscale image that has undergone Gaussian smoothing and edge detection. First, the grayscale image is converted into a binary image, that is, the grayscale value of each pixel is mapped to black and white, which is used to distinguish the foreground and background.

[0043] The pixel threshold T can be set using one of the following two methods: 1) Fixed threshold method: For example, setting T=127 is suitable for images with uniform lighting and stable drawing quality; 2) Adaptive thresholding method: By analyzing the gray-level histogram of the image, the segmentation point that maximizes the inter-class variance is automatically selected as the threshold, which is suitable for cases where the image is unevenly illuminated.

[0044] After setting the threshold, pixels with values ​​greater than T are set to white (value 255, representing the foreground) and pixels with values ​​less than T are set to black (value 0, representing the background).

[0045] Subsequently, the Connected Component Analysis (CCA) algorithm is used to traverse the entire binary image. A connected region is a foreground region consisting of several pixels, where each pixel is reachable by a path from its neighboring pixels (based on 4-neighborhood or 8-neighborhood). The algorithm identifies all independent connected regions in the graph using methods such as Depth-First Search (DFS) or Disjoint-Set Union (DSU) and assigns a unique label to each connected region.

[0046] Next, regions that may be text or symbol markers are filtered based on the area of ​​the connected components (i.e., the number of pixels) and geometric features (such as aspect ratio, contour moments, and boundary complexity). Regions that are too small or too large are excluded (less than 20 pixels may be noise, and more than 5000 pixels may be graphic regions); aspect ratios between [0.2, 5.0] are common character shapes; further filtering can be performed by calculating shape descriptors such as Hu moments, invariant moments, and perimeter-area ratios.

[0047] The selected connected regions are processed using the Tesseract OCR engine. The text in the image is then converted into editable text. First, the characters within each connected region are segmented individually (character separation), and then the feature vectors of each character are extracted, including the number of strokes, contour complexity, horizontal and vertical projected contours, and orientation histogram (HOG).

[0048] These feature vectors are then classified. Existing trained support vector machines (SVM) or neural network models can be used for character recognition. Classification labels typically include common types such as Chinese characters, Arabic numerals, and English letters.

[0049] The identified characters are converted into standard editable text formats (such as UTF-8 encoded text) and combined with their spatial position in the drawing to form structured annotation information.

[0050] The recognition of symbols is similar to that of text recognition, except that its feature vectors focus more on shape contours (such as circles, arrows, cross-section symbols, etc.). It can be recognized through template matching, shape context or deep learning classifiers, and integrated with text into structured annotation information.

[0051] Based on the Tongyi Qianwen large model framework and optical character recognition technology, feature extraction and semantic parsing are performed on the drawing images. Combined with vector graphics parsing algorithms, structured data such as component dimensions, material specifications, and construction coordinates are extracted. The specific method is as follows: The preprocessed grayscale image is input into the Tongyi Qianwen large model. Here, the "preprocessed grayscale image" refers to the drawing image data after grayscale normalization, weighted smoothing, edge refinement and other processing in step S1, which has a high signal-to-noise ratio and structural clarity.

[0052] The Tongyi Qianwen Big Data Model employs a low-level convolutional neural network (CNN) architecture. In its multi-scale feature extraction module, it processes different resolution versions of the image to obtain feature maps that combine global semantic information with local geometric structure. The model fuses shallow features (such as edges and textures) with deep features (such as component semantic regions and primitive types) to generate a unified multi-scale feature representation, improving the ability to recognize complex structural primitives.

[0053] Based on the aforementioned fusion features, an improved DeepLabv3+ semantic segmentation algorithm is introduced (the improved method references the following literature and industry research results: Chen LC et al., DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs, IEEE TPAMI, 2018; Wang Zhuo et al., "Semantic Segmentation Method for Engineering Drawings Based on Multi-Scale Feature Fusion", Computer Engineering and Applications, Vol. 59, No. 8, 2023). This invention, based on the existing system, incorporates semantic priors from the Tongyi Qianwen large-scale model and introduces an attention mechanism and context feature enhancement module to achieve precise identification of complex component boundaries in highway engineering drawings. The drawings are classified at the pixel level. The classification results are mainly divided into the following categories: road components (such as lanes, slopes, curbs, culverts, etc.); labeled text areas (including text blocks and their guide lines); material annotations (such as "C30 concrete", "φ16 steel bar", etc.); structural auxiliary lines (dimension lines, section lines, positioning grids, etc.); non-structural areas (blank areas, drawing frames, legends, etc.); and blurred and unidentified areas (low confidence, requiring post-processing confirmation).

[0054] For the problem of recognizing the labeled text region again, the labeled text recognition in this step is not a repetition of OCR, but rather the segmentation and classification of the labeled blocks in the image space as "objects". This is a different level of task from the step of extracting characters based on connected components for text transcoding in S1. The former serves to build a "semantic map of the drawing", while the latter serves "text content extraction and structuring".

[0055] Based on this, the system further analyzes the logical relationships between different objects in the drawing, mainly including the following categories: Spatial relationships: such as the relative positional relationships between road components (connection, overlap, adjacency), and the attachment relationship between text and components (such as dimension text and the component pointed to by its leader line). Topological relationships: such as whether the road centerline and edge line form a closed road area, whether the drainage ditch and the curb are side by side, and whether the symbols correspond to multiple components; Functional dependencies: such as whether a certain construction node depends on the completion of the preceding structure, and the constraint relationship between material specifications and physical components; Label-target mapping relationship: the semantic binding between the labeled text content and the specific graphic entity. For example, the length value "L=12m" should be assigned to a certain road component.

[0056] The reasoning and analysis of the above logical relationships provide the source of edges and attributes for the subsequent construction of the knowledge graph, and is one of the improvement points after combining the output of the Tongyi Qianwen basic model with the module of this invention.

[0057] Based on the semantic objects (including road components, dimension annotations, material annotations, etc.) and annotation text areas of the drawings identified by the Tongyi Qianwen Big Data Model and DeepLabv3+ algorithm in the aforementioned steps, key data such as the geometric dimensions of the components, material specifications, and construction coordinates are further extracted.

[0058] Extraction of component size information: This step uses a location-based semantic alignment method to associate the dimension text in the drawing with the corresponding components. The specific steps are as follows: 1) First, the text areas with dimensions marked in the drawing are located using connected component analysis and the Tesseract OCR recognition algorithm; 2) Then, based on the spatial position of these texts in the image, the direction of the leader lines, and the direction of the arrows, establish the mapping relationship between the dimension annotations and the graphic elements; 3) The system automatically determines the component edge or center line segment corresponding to this size based on a graphical analysis algorithm; 4) Standardize the units of the identified dimensions and textual content, converting them into numerical data in millimeters (mm) for easier subsequent structured processing and computational modeling. Material specification information extraction: The Tesseract OCR engine, combined with the results of drawing element recognition, was used to analyze the material labeling areas in the drawings. Material labels are usually attached to the components in text form or appear in the legend area, such as "C30 concrete", "Q235 steel", "φ16 threaded steel", etc.

[0059] 1) The identified material names are classified into the following categories through keyword matching and rule templates: concrete (e.g., C20, C30, C35); steel reinforcement (e.g., HRB400, HRB335, threaded steel, plain round steel); steel components (e.g., Q235, Q345); waterproof and finishing materials (e.g., SBS membrane, fireproof coating); other materials (e.g., blocks, asphalt, plastic pipes, etc.).

[0060] 2) For each type of material, the system extracts and records its specification parameters, including but not limited to: strength grade (e.g., C30 for concrete indicates a cubic compressive strength of 30 MPa); material type (e.g., HRB400 indicates a rebar with a yield strength of 400 MPa); diameter or cross-sectional dimensions (e.g., "φ16" indicates a diameter of 16 mm); application location and scope (e.g., "used for foundation caps"); national or industry standard number (e.g., GB50010-2010). These parameters constitute structured "material-property" data pairs, which can be referenced in subsequent knowledge graph modeling.

[0061] Construction coordinate information extraction: Construction coordinates refer to key point information used in design drawings to locate the position of roads or structures. They are usually represented by coordinate point markings, such as "X=235.40 Y=118.65" or station markings such as "K3+200".

[0062] The extraction method is as follows: 1) Using the structural semantic segmentation module in the Tongyi Qianwen large model, the coordinate point text and its position in the drawing are identified; 2) Map using a two-dimensional Cartesian plane coordinate system (the origin is the lower left corner of the drawing by default, and the unit is millimeters). Combine the drawing scale and the actual projection annotation to calculate the position of the coordinate point in the actual geographic space. 3) For road station markings, the X and Y coordinate values ​​are automatically converted according to the station spacing rules (e.g., one station every 100 meters), the starting mileage, and the station direction; 4) The obtained coordinates are recorded in the form of "component ID - spatial location" pairs, which can be used for subsequent component positioning, spatial consistency detection and visualization analysis.

[0063] The Tesseract OCR engine, combined with connected component analysis and an existing support vector machine (SVM) classifier, is used to recognize and structure the annotation text in drawings.

[0064] This recognition process is not a repetition of the previous steps, but rather a supplement and enhancement to different processing objectives: in the previous stage, Tesseract OCR was used to extract text values ​​from specific dimensioning areas; the current step broadly identifies all text annotations (including dimension descriptions, material markings, construction descriptions, component codes, and legends) across the entire drawing area, and further realizes spatial association with graphic objects, which is a deeper processing of the semantic understanding of the drawing.

[0065] Each piece of text information is spatially aligned using its geometric position in the image. The geometric position refers to the pixel coordinate region where the text is located in the drawing image, usually represented by the coordinates of the center point of its bounding box or a rectangle.

[0066] The alignment process includes the following steps: 1) Character positioning: Obtain the coordinates of the bounding box for each character; 2) Component location modeling: The identified component elements (such as walls, road centerlines, slope boundaries, etc.) are also converted into geometric coordinate ranges; 3) Spatial proximity matching: Based on the nearest neighbor algorithm or Euclidean distance calculation, a spatial mapping relationship is established between the text region and the component primitive; 4) Semantic confirmation: Combine keywords in the text content to determine the possible object to which it belongs (e.g., “L=4.2m” is preferentially matched with linear components, “φ16 steel bar” is preferentially matched with steel bar nodes, etc.).

[0067] This matching process ensures that the text annotations in the drawings establish an accurate "text-object" semantic alignment relationship with the specific component elements, forming high-quality structured data.

[0068] A unified standard unit refers to the unified dimension used for all engineering values ​​within the system. This mainly includes: length units: millimeter (mm) as the default length unit; coordinate units: meter (m) as the default unit after drawing positioning conversion; strength units: megapascal (MPa), used for material strength parameters; and area units: square meter (m²). 2 Volume unit: cubic meter (m³) 3 ); Angular units: degrees (°) or radians (rad); The unit conversion mechanism is implemented in the following ways: automatically identifying unit markers in the original annotations (such as "4.2m", "4200", "φ16mm"); combining the context and unit rules to uniformly convert them into the system standard units (such as "4.2m" → "4200mm"); and for dimensions without unit annotations, inferring the unit by combining the scale, default rules, or user settings.

[0069] The process of converting text to numerical values ​​involves: first, extracting the valid digits and unit information from the string; parsing symbols (such as "±", percent sign, "φ", etc.); removing format symbols (such as commas, decimal points) and standardizing the format; using regular expressions or rule bases to convert the string into floating-point or integer numerical values; and finally storing the numerical values ​​with unified units in a structured dataset for subsequent knowledge graph modeling and rule reasoning.

[0070] For example: "φ16" → Type: Rebar diameter, Value: 16, Unit: mm; "L=4.2m" → Type: Component length, Value: 4200, Unit: mm; "100×200" → Type: Cross-sectional dimension, Value: [100,200], Unit: mm.

[0071] Through the above alignment and conversion mechanisms, the system can automatically extract semantically clear and numerically consistent engineering data from drawings and images, supporting intelligent analysis and standardized modeling.

[0072] The use of vector graphics parsing algorithms refers to the process of automatically parsing vector graphics elements in CAD format engineering drawings. Specifically, it employs existing unified standard CAD entity recognition algorithms (such as Polyline, Line, Arc, Circle, Text, Block, etc.); layer separation algorithms (based on the layer attribute classification of primitives); coordinate mapping and unit conversion algorithms (based on the linear transformation between the original coordinates of the drawing and the actual projection); and topology reconstruction algorithms (such as node-edge graph reconstruction based on the connection relationship of components).

[0073] In this invention, the vector graphic parsing is implemented based on the LibreDWG library, which is an open-source C language library that supports DWG format reading and entity traversal and can be used to extract vector graphic elements from CAD drawings.

[0074] Layer separation: Various graphic elements in DWG drawings are classified according to their Layer attributes. Common engineering layers include: ROAD_CENTER: road centerline, DIMENSION: dimension annotation, TEXT: text annotation, STRUCTURE: lines of structures such as bridges, culverts, and retaining walls, DRAINAGE: drainage structure layer, GRID: positioning grid, and ANNOTATION: description and legend. The system extracts the corresponding graphic element entities by traversing the layer data structure and processes them separately.

[0075] Coordinate transformation and alignment: The coordinate unit in DWG is usually millimeters, with the origin located at the lower left corner of the design drawing. To align with the drawing image space (raster map) or GIS map coordinate space, the following processing is required: Coordinate normalization: unify the bottom left corner to (0,0); Translation transformation: Translate the coordinate system according to the reference point or positioning station specified in the drawing; Scaling transformation: Converts CAD coordinates to actual distance units (such as meters) according to the scale or projection parameters. Rotation correction: If the drawing has a rotation angle, use affine transformation to correct the coordinates.

[0076] Vector Graphics Information Extraction: Extract the following key structural elements from CAD vector graphics: Road outline: A closed path consisting of polylines or lines; Text annotations: Dimensions, elevations, and material text in Text or MText objects; Component boundary: The two-dimensional outline of a structural component (such as a rectangle or ellipse); Centerline and station numbers: The path sequence consisting of the centerline and the station numbers; Dimension leaders: Leaders and dimension values ​​for Dimension objects.

[0077] The image recognition and OCR processing mentioned earlier are for drawing images (raster format), while this step parses vector format drawings (DWG). The two are complementary information channels.

[0078] All extracted information (component dimensions, material specifications, coordinate points, etc.) is integrated into a structured dataset according to a unified data structure, and its organization format is as follows: All geometric information (such as coordinates, length, and dimensions) is stored in numerical form (float or int); All physical properties (such as material name) are stored in a text + parameter structure; All spatial dimensions are uniformly converted to standard units, such as: length / coordinate: meter (m), diameter: millimeter (mm), area: square meter (m²). 2 Intensity: megapascals (MPa).

[0079] This structured dataset ultimately serves as input for drawing knowledge graph modeling, achieving a standardized bridge from CAD drawings to knowledge graphs.

[0080] { "component_id": "RC001", "type": "slope" "geometry": { "type": "polyline" "points": [[235.0, 114.3], [240.1, 118.9], ...], "unit": "m }, "properties": { "length": 5.2, "width": 0.8, "material": "C30 concrete" "diameter": null }, "location": { "x": 236.5, "y": 116.3 } } In S2, a knowledge graph for the highway engineering domain is constructed using the Neo4j graph database, containing three types of entities: road components, material properties, and construction specifications. The specific method is as follows: The structured data extracted from the drawings will be imported into the Neo4j graph database; the structured data originates from the two main processing steps mentioned above: 1) Image recognition path (including grayscale image preprocessing, edge detection, OCR recognition, and extraction of labeled text and dimensions); 2) Vector graphics parsing path (based on LibreDWG parsing of DWG drawings to extract component elements, material annotations, spatial coordinates, etc.); The structured results from both have been integrated into an engineering semantic dataset (containing components, dimensions, materials, coordinates, descriptions, etc.) in a unified format in the previous stage, serving as input data for knowledge graph modeling in this stage. Before knowledge graph construction, the system has established a unified "Engineering Semantic Dataset" based on the output results of image recognition paths and vector map parsing paths. This dataset contains all structured information extracted from drawings (component dimensions, material properties, spatial coordinates, annotation text, etc.) and is organized and stored in JSON format, serving as the input data source for Neo4j graph modeling, achieving a standardized bridge from drawing data to semantic knowledge.

[0081] Based on the content and semantic structure of highway engineering design drawings, the entity types and their relationships in the knowledge graph are defined as follows: The system defines three main categories of core entities, namely: 1) Road Component: Represents the actual physical structure, such as lanes, slopes, drainage ditches, bridges, culverts, etc. 2) Material Properties: Represents information about building materials related to the component, such as concrete strength grade, steel bar diameter and type, and composite material name; 3) Construction Standard: This represents the technical standards, parameter ranges, or regulatory clauses that should be followed in the design or construction of an engineering project, such as "C30 concrete compressive strength ≥ 30MPa" or "turning radius not less than 60m".

[0082] The main relationships between entities are as follows: USES (components use a certain material), COMPLIES_WITH (components conform to a certain construction specification), CONTAINS (composite components contain sub-components), CONNECTED_TO (spatial connection or structural association between components), REQUIRES (specifications reference other specifications, or components depend on a certain standard), VIOLATES (data conflicts with specifications, used for anomaly detection later).

[0083] Create a node for each identified road component instance and set the following basic attribute fields: id: unique component code (e.g., "RC2025_001"), name: component name (e.g., "Right Drainage Ditch"), type: component type (e.g., "Slope", "Culvert"), geometry: component outline coordinate information (can be a JSON string or GeoJSON format), position: center point coordinates (e.g., {"x": 235.4, "y": 117.8}), dimensions: dimension parameters (e.g., length, width, height, all in millimeters). Create a node for each material type marked in the drawing. The node attributes include: name: material name (e.g., "C30 concrete"), category: material classification (e.g., "concrete", "reinforced steel", "asphalt"), specifications: specification parameters (e.g., strength grade, modulus of elasticity, diameter, etc.), and usage_scope: applicable component range (e.g., "subgrade foundation", "pier cladding").

[0084] Each specification requirement corresponds to a node with the following attributes: clause_id: specification clause number (e.g., "GB50010-2010 Clause 5.3.2"), description: clause text description (e.g., "When the vehicle speed is not greater than 40km / h, the turning radius shall not be less than 60m"), apply_to: applicable component type (e.g., "ramp", "sharp bend"), limit_type: specification form (e.g., maximum value / minimum value / range / Boolean condition), threshold: limit value (e.g., minimum turning radius = 60).

[0085] This code uses Neo4j Cypher's batch import mechanism to convert structured JSON data into a graph structure. It creates a label for each node, establishes edges for each type of relationship, performs a MERGE operation after importing to prevent node duplication, and establishes necessary indexes and unique constraints. The following is a Cypher example: MERGE (c:RoadComponent {id:"RC2025_001"}) SET c.name="Right Drainage Ditch", c.type="Drainage", c.dimensions={length:5200,width:600} MERGE (m:MaterialProperty {name:"C30 concrete"}) MERGE (c)-[:USES]->(m) MERGE (s:ConstructionStandard {clause_id:"JTJ004-2016-4.2.1"}) SET s.description="The trench depth shall not be less than 300mm" MERGE (c)-[:COMPLIES_WITH]->(s) In the process of knowledge graph construction, relationships between entities are established (the term "connection" is more accurate, and the expression "establishing relationships between entities" conforms to graph databases and standard terminology in this field) to fully represent the semantic dependencies and structural associations between road components, material properties and construction specifications.

[0086] The definition and construction of relational connections specifically include the following relation types: 1) Uses: Represents the hierarchical relationship between a road component entity and the material properties it uses; it is matched based on the material labels, material specifications or component annotation text near the component in the drawing; for example: if a drainage ditch component RC001 uses C30 concrete, then in the drawing, it is established as: (RC001:RoadComponent)-[:USES]->(C30:MaterialProperty).

[0087] 2) Compliance Relationship (COMPLIES_WITH): This indicates the construction specification requirements that material properties or road components must meet. The so-called "compliance relationship" means that an entity (such as a material) must meet or be limited by the performance indicators, parameter ranges, or usage conditions specified in a specific specification clause. For example, a certain type of steel bar must meet the strength grade requirements in the "Code for Design of Reinforced Concrete Structures": (HRB400:MaterialProperty)-[:COMPLIES_WITH]->(Specification Clause:ConstructionStandard). Similarly, road turning radius components must meet the minimum radius requirements in the JTGF40 specification, which also establishes a compliance relationship.

[0088] 3) Other expandable relationships (This invention is not limited to the two types mentioned above) To enhance semantic richness and graph reasoning capabilities, the system can further establish the following common associations: PART_OF: indicates that a component is part of a composite component; CONNECTED_TO: indicates physical structural connection relationships, such as the connection between a slope and a drainage ditch; ADJACENT_TO: indicates spatial proximity relationships, used for relative geographic positioning; REQUIRES: indicates dependency or reference relationships between construction specifications; VIOLATES: indicates that a data node has the potential risk of not meeting the specifications, used for subsequent reasoning or alarms.

[0089] Connection Validation and Optimization: After establishing connections, the system automatically performs connection integrity and rationality checks, including: Isolated Node Detection: Checking for nodes not referenced or connected by any other nodes (e.g., materials or components without any relational edges), indicating whether data is missing or misidentified; Connection Logic Consistency Detection: If a component connects to multiple contradictory materials (e.g., using both "asphalt" and "C30 concrete" as surface layers), it is considered a potentially unreasonable relationship; Path Redundancy and Anomaly Identification: Detecting for connection paths that do not conform to the actual structural logic using graph traversal algorithms, such as meaningless circular references like "component A uses material B, and material B uses component C"; Pre-rule Constraint Validation: Combining industry knowledge base rules, such as certain components not using certain materials, the system performs preliminary compliance screening based on rule templates, providing data preparation for subsequent compliance checks.

[0090] Note: The "Check the connection between nodes and adjust unreasonable associations" step in this section is different from the compliance verification and anomaly alarm based on the comparison of design specifications and actual data in subsequent chapters. This step focuses on the logical correctness and usability of the internal structure of the graph ontology.

[0091] In S2, compliance determination of design parameters and geometric conflict detection are achieved through rule-based reasoning and anomaly detection. The specific method is as follows: 1) Definition of Design Specifications and Standards Rule Base The design specifications and standard rule base refers to a set of structured knowledge rules established based on national, industry, or enterprise-level standard documents, including but not limited to: "Technical Standards for Highway Engineering" (GB / T 917-2017); "Specifications for Highway Route Design" (JTG D20-2017); "General Specifications for Highway Bridge and Culvert Design" (JTG D60-2015); "Standards for Quality Inspection and Evaluation of Highway Engineering" and project-specific enterprise internal control standards.

[0092] The definition methods for the rule base include: text specification structuring, which involves parsing specification documents such as PDF and Word documents using OCR+NLP to extract structured clause content; and rule modeling, which uses a four-tuple format of "component type + parameter field + constraint condition + scope of application" to define rules, for example: { "component": "slope" "parameter": "slope", "constraint": "slope ratio ≥ 1:1.5", "scope": "Mountain Class II Highway" } And the conversion of executable rule forms: rule items are represented as computable expressions (such as slope_ratio>=1.5) and converted into structures that the rule engine can call (such as Drools or custom DSLs). The specification and standard rule library is mainly derived from existing standard documents and engineering experience data, and can also be supplemented and defined according to specific project needs.

[0093] 2) Rule reasoning and compliance verification Introduce a rule-based reasoning engine (such as Drools, CLIPS, or a custom reasoning framework based on forward chain reasoning) to perform rule-by-rule matching and verification on the structured data of the drawings.

[0094] The structured data is a dataset obtained during image recognition, vector graphics parsing, and knowledge graph modeling, including attribute fields such as component dimensions, material parameters, and construction coordinates, in the form of triples or key-value pairs. The inference steps include: loading the rule base and initializing the inference engine; taking each component node (or material attribute) as fact input; performing rule matching using a forward chain algorithm (IF-THEN mechanism); marking a rule as "non-compliant" if a rule condition is not met; and using all results to generate a compliance analysis report.

[0095] Compliance verification objectives include: whether the component dimensions are within the range specified in the standard; whether the material type meets the strength grade requirements; whether the "must comply" relationship between the component and the standard is met; and whether there are any conflicting references to the standard and specification clauses.

[0096] 3) Experience-based anomaly detection and classification To enhance the automatic anomaly identification capability, the system sets parameter threshold ranges based on historical engineering project data and domain expert experience, including: component size: such as lane width should be between 3.25m and 3.75m; material strength: such as the compressive strength range of C30 concrete is 28-32MPa; and technical parameters: such as the cross slope of the bridge deck should not exceed 2%.

[0097] Threshold selection methods include: referencing typical values ​​from specifications; based on historical sample statistics (mean ± 2σ); and setting flexible boundaries by combining on-site construction experience values.

[0098] Data outside the specified range is marked as outliers. Furthermore, a classification model is introduced to automatically identify anomalies. The following is an example of the model structure: Model type: Random Forest or Lightweight Neural Network; Input features: Component type (categorical feature); Size parameters (numerical feature); Material grade (coded feature); Connection relationship between adjacent components (graph feature); Output labels: Compliant (0), Suspicious (1), Severely Anomaly (2).

[0099] The training method is semi-supervised learning or construction of expert-annotated sample sets. The so-called expected pattern refers to the distribution of typical component attribute combinations learned based on compliance historical data, such as: "lane width is 3.5m, C30 concrete is used, slope is 1.5%, drainage slope is 2%". When the detection data deviates significantly from this pattern, it is identified as an anomaly.

[0100] 4) Logical conflict detection and specification conflict detection After the classification detection result is "abnormal," a conflict detection mechanism is further triggered. This mechanism includes logical conflict detection, which checks whether there are mutually exclusive or contradictory structural or semantic relationships between different entities in the diagram. For example: the same component establishes a USES relationship with two incompatible materials; a component with a 3% slope is associated with the construction standard "applicable to slopes ≤2%". Specification conflict detection analyzes whether two or more specification clauses raise conflicting parameter requirements for a certain entity. For example, specification A requires the culvert's clear width to be no less than 2.5m; specification B (local standard) limits the culvert's clear width to no more than 2.4m; the actual width in the current drawing is 2.45m, resulting in a "dual specification conflict".

[0101] The system uses graph structure path analysis and rule matching to locate contradictory specification clause numbers, conflict edge nodes, and their entity characteristic values.

[0102] 5) Anomaly detection report generation Based on the reasoning and detection results, the system automatically generates an anomaly detection report, which includes: a list of anomaly points (component ID, location coordinates); anomaly type (out of limit, missing, conflict); specific anomaly description (e.g., "material strength grade does not meet construction requirements," "parameter conflicts exist between specifications"); graphic annotation (anomaly points are highlighted in the drawings); and improvement suggestions (e.g., suggesting the use of C35 material, changing the slope ratio to 1:1.5, and referring to provincial standards to replace national standard clauses, etc.). This report can be exported as structured text (JSON, CSV) and visual documents (PDF, overlay of drawings).

[0103] In S3, vector space mapping technology is used to perform semantic vector transformation and matching between natural language queries and graph nodes. The specific method is as follows: This invention provides a natural language query and knowledge graph node matching method based on semantic vector mapping, which supports users to retrieve semantic-level information from the knowledge graph of highway engineering design drawings through natural language input.

[0104] 1) Natural Language Query Input and Processing Natural language queries refer to information needs expressed by users in unstructured language, such as: "What is the minimum width of the drainage ditch?" "Does C30 concrete meet the current bridge design requirements?" "Which components violate the design specifications?" The system performs natural language processing (NLP) on such queries, including word segmentation, part-of-speech tagging, named entity recognition, and dependency analysis, to identify information units such as keywords, entities, and intents in the query.

[0105] 2) Natural Language Query and Construction of Graph Node Vector Representation To achieve semantic-level matching, it is necessary to unify the natural language query and node description information in the graph into vector representations. The specific steps are as follows: Text representation vectorization is achieved by encoding the text using a pre-trained word embedding model (such as Word2Vec, GloVe, BERT, or a domestic generalized embedding model): Input: Each word (e.g., "width", "concrete", "drainage ditch"); Output: The corresponding word vector (e.g., a dense vector with dimensions 128 or 768); The pre-trained model is trained using a large-scale corpus (e.g., architectural design texts, national standards and specifications, engineering case studies) to learn the contextual semantic relationships between words.

[0106] Construct representation vectors for natural language queries and node text. For natural language queries: segment the query into words and obtain the vector representation of each word. For graph node descriptions: include the node's name, type, and text in the attribute fields (e.g., "RC001, slope, width: 1.5m, material: C30 concrete"). Use a weighted average method to synthesize the multi-word vectors into a single vector. The formula is as follows: Where vᵢ is the vector of the i-th word, wᵢ is its weight, Z is the normalization factor, and n is the total number of words.

[0107] The weight adjustment mechanism adjusts the word weight based on the inverse document frequency (IDF) of the word in the entire graph node document set (the set of all node descriptions): Term Frequency (TF): the frequency of the word appearing in the current query or node description; Document Frequency (DF): the number of nodes containing the word; Weight calculation method: Where N is the total number of nodes in the graph node document set, DFᵢ is the number of nodes containing word i, and adding 1 to the denominator is used to avoid the case where the denominator is zero. This formula suppresses the weight of high-frequency words by introducing a logarithmic ratio, thus avoiding interference from high-frequency meaningless words in the results.

[0108] 3) Similarity calculation and ranking matching The semantic similarity between natural language query vectors and graph node vectors can be calculated using the following method: the preferred vector similarity calculation method is cosine similarity, as shown in the formula below. The closer to 1, the closer the semantics.

[0109] Where Sim(A,B) represents the semantic similarity between vectors A and B, and its value ranges from 1 to 2. The closer the value is to 1, the closer the two are semantically.

[0110] A: Represents the semantic vector of a natural language query; B: Represents the semantic vector describing a node in the knowledge graph; A·B: Represents the dot product of vectors A and B, calculated as follows: in, and These are the i-th components of vectors A and B, respectively; ‖A‖: Represents the magnitude of vector A, i.e. ‖B‖: Represents the magnitude of vector B, calculated in the same way as above; denominator This represents the product of the lengths of two vectors, used to normalize the result.

[0111] This calculation formula reflects the cosine value of the angle between two vectors in a multidimensional semantic space: like This indicates that the two directions are completely consistent, and their meanings are the same or extremely similar. like This indicates that the two are orthogonal and semantically unrelated; like This indicates that the two directions are opposite, and their meanings are mutually exclusive or opposite.

[0112] In semantic retrieval and knowledge graph matching processes, only a range of values ​​is typically considered. The similarity score indicates that the semantics are closer. A higher value indicates that the similarity is closer.

[0113] An alternative approach is to calculate the Euclidean distance as an auxiliary metric. Where D(A,B) represents the Euclidean distance between vectors A and B, and the smaller the value, the closer the two are in the semantic space.

[0114] A: Represents the semantic vector of a natural language query; B: Represents the semantic vector of a knowledge graph node; Aᵢ: The i-th component of vector A; Bᵢ: The i-th component of vector B; d: The dimension of the vector, i.e., the number of features contained in each vector; (A i B i ) 2 : Represents the squared difference between two vectors along the i-th dimension; The smaller the Euclidean distance, the closer the semantics, and the inverse relationship with the similarity.

[0115] The system sorts and matches all knowledge graph nodes based on their similarity scores. The top N nodes with the highest similarity scores (e.g., N=5) are selected as the matching results. The returned content includes the node ID and type; a summary of the matched fields; the similarity score; and relevant attribute content (such as size, material, specification clauses, etc.). Users can click on the results to perform further queries or browse the knowledge graph visualization.

[0116] In S3, a multi-hop path reasoning algorithm is used to perform semantic association analysis between design specifications and construction cases in the knowledge graph, and to construct recommended paths from design specifications to construction cases. The specific method is as follows: This invention further provides a multi-hop path reasoning method based on knowledge graphs, which realizes semantic path association recommendation from design specifications to actual construction cases, and is used to support construction feasibility verification and case reference in the specification design process.

[0117] (a) Definition of Start Node The Start Node is a design standard node in the knowledge graph, used to represent constraint semantic information from industry standards, design specifications, or construction drawings.

[0118] These types of nodes typically correspond to semantic rules such as design requirements, size limits, safety distances, and material specifications, and are used to guide the design or verify construction plans.

[0119] During the graph construction phase, the system extracts such descriptive text from engineering design specification documents and structures it as "design specification type nodes (ConstructionStandard)".

[0120] For example: "The width of the drainage ditch shall not be less than 600mm"; "The clearance height inside the tunnel shall not be less than 4.5m"; "The load-bearing capacity of cable trench covers should meet the requirements of the 'Code for Design of Building Structures'".

[0121] Each "design specification node" typically contains the following attribute fields: NodeID: Unique identifier for a node Type: Node type StandardSource: The source of a standard or regulation (such as the "Code for Design of Municipal Engineering"). ClauseText: The original description of the specification (e.g., "The width of the drainage ditch shall not be less than 600mm"). ParameterName: Parameters specified in the standard (e.g., "drainage ditch width") ParameterConstraint: Parameter constraints (e.g., "≥600mm") Unit: Parameter unit (e.g., "mm") These nodes represent constraints at the semantic level and are the starting points of the knowledge graph reasoning chain, used to connect downwards to nodes such as design parameters, component information, or test results.

[0122] (ii) Definition of End Node The end node is the entity parameter node (DesignParameter Node) corresponding to the specification requirements in the knowledge graph, which is used to represent the actual values or object instances that appear in the engineering design, construction or inspection process.

[0123] For example: The design parameter node corresponding to the drainage ditch component, with the attribute "width = 580mm"; The inspection result node corresponding to the cable trench cover plate, with the attribute "bearing capacity = 45kN".

[0124] The end nodes usually come from: 1. Design document parsing (CAD, BIM, structural parameter table, etc.); 2. Construction inspection data or operation monitoring data.

[0125] Its typical attributes include: NodeID: The unique identifier of the node Type: The type of the node (such as DesignParameter, Component, Measurement, etc.) ParameterName: The parameter name (corresponding to the starting point constraint parameter) [[ID=2-4]] ParameterValue: The actual measured value or design value Unit: Unit Source: The data source (such as "BIM model", "on-site inspection form") (3) The relationship between the starting point and the end point The starting point node (ConstructionStandard) provides "the specification requirements that should be met"; The end point node (DesignParameter) provides "the actual design or inspection results"; The system forms a "specification → parameter" relationship edge (Relation: CompliesWith or ViolatedBy) through semantic matching, parameter name mapping and constraint rule calculation.

[0126] For example, Table 1: Table 1 (4) Supplementary notes If the "ConstructionStandard" type node is not included in the current graph model, this type needs to be added in the knowledge graph construction link to store and manage the design specification text parsing results.

[0127] This node type is a necessary foundational data layer for subsequent design verification, compliance reasoning, and automated review.

[0128] 1) Path search process and multi-hop reasoning mechanism Based on the constructed knowledge graph structure, the system understands the entity types and their semantic relationships (e.g., design specifications → component types → materials → construction instances) and performs the following reasoning process: Path start: Starting from the input design specification node, this node is used as the path starting point; First hop (Direct Relation): Finding road component nodes directly connected to the specification node (through COMPLIES_WITH or REQUIRES relationships); Mid-layer Expansion: Starting from the component node, recursively searching for other related entities connected to it, using the material properties; the construction project where the component is located; the component instance node (e.g., "RC001"); Multi-hop termination condition: Once a construction instance node that meets the following conditions is found, the path is considered valid: the component attribute value of the instance meets the parameter constraints of the input specification; the instance has been marked as "accepted" or "compliant with specifications" in the actual project; the instance is supported by multiple standards or historical project data; It should be noted that the entity nodes generated in the knowledge graph construction phase can all contain "instance layer data", that is, instantiated nodes of components and parameters. Each instance node is automatically generated from specific design project data, such as "RC001 drainage ditch width = 580mm", which is used to represent the physical sample in the actual design or testing.

[0129] These instance nodes are defined as "End Nodes" in the S3 multi-hop inference phase, forming an inference path of "Specification → Parameter → Instance" with the specification nodes. Therefore, the construction case nodes that appear in S3 are derived from the expansion and mapping of the aforementioned instantiated component data.

[0130] The process employs a recursive algorithm (such as depth-first or breadth-first expansion) to search for all possible semantic paths within the maximum allowed number of hops (e.g., ≤5 hops).

[0131] Path length This represents the number of hops from the start node to the end node, i.e., the number of edges in the path. The shorter the path, the more direct the reasoning link and the stronger the semantic association.

[0132] To quantify the merits of path length, the system defines the following path length scoring criteria: in: ScoreL The path length score measures the quality of a path in terms of length; a higher value indicates a shorter path and higher priority. L is the path length, representing the number of hops (i.e., the number of edges) between the starting point and the ending point. Calculation rules: If the path only contains direct connections (start point → end point), then ,Score ; If the path contains two intermediate nodes (start point → A → B → end point), then ,Score ; Therefore, the shorter the path, the higher the score, and the higher the priority in ranking and recommendation.

[0133] 2) Comprehensive route score In the system, the total path score can be composed of multiple dimensions of indicators, such as: in: Path length score; The average score of node weights or semantic similarity in the path; Path stability or confidence score; α, β, γ: Weighting coefficients, which are adjusted according to business needs to make the influence of different dimensions controllable.

[0134] The final system is based on The candidate paths are sorted by their scores, and the path with the highest score is output as the recommendation result.

[0135] 3) Natural Language Interpretation The core idea of ​​the path scoring mechanism is: Shorter, more relevant, and more stable paths should receive a higher recommendation priority in semantic reasoning.

[0136] Through this quantitative calculation method, the system can automatically filter out the most representative and logically reasonable paths in complex knowledge graphs, thereby improving the credibility of automatic reasoning and result interpretation.

[0137] Node coverage (C) indicates that the more diverse the types of nodes involved in the path, the more comprehensive the semantic information of the component; if the path simultaneously includes materials, components, specifications, and projects, the weight is higher. Semantic diversity score is used to measure whether the entity types involved in the path have sufficient coverage and richness.

[0138] If a path contains only nodes of the same type (such as all being parameter nodes or device nodes), its semantic diversity is low; if it contains multiple types of entities (such as specifications, components, parameters, test results, etc.), its semantic diversity is high.

[0139] The scoring formula is as follows: in: Semantic diversity scoring measures the degree of diversity in node types within a path. This represents the number of unique entity types, specifically the number of distinct entity types appearing in the path (counted after deduplication). The total number of entity nodes, the total number of nodes in the path. Calculation logic: If the path contains 5 nodes of type {Standard, Parameter, Parameter, Component, Result}, then UniqueEntityTypes=4 TotalEntityTypes= Score_C=4 / 5=0.8 The closer the value is to 1, the more diverse the entity types covered by the path and the richer the semantic information. The closer the value is to 0, the more homogeneous the path type and the weaker the inference chain information.

[0140] Historical data support score item ( ) Historical data support measures the frequency with which a semantic path has been validated or occurred in previous projects, reflecting its credibility and reliability in practice.

[0141] The scoring formula is as follows: in: (Historical Data Support Score): Measures the percentage of times this path occurs in historical data. (Current path supports counting): Indicates the number of times this path or similar paths have appeared in historical projects, samples, or expert validation. (Maximum Support Count): Represents the count of the path that appears most frequently among all paths, used for normalization.

[0142] Calculation logic: If path A appears 15 times in historical data, path B appears 5 times, and the most frequent path in the system appears 20 times, then: (A) = 15 / 20 = 0.75 (B) = 5 / 20 = 0.25 therefore, The larger the value, the more frequently the path appears in historical projects, and the higher its credibility. If a path has been manually annotated or verified by experts, the system can give its support count a weighted boost (e.g., ×1.2) when calculating it.

[0143] Comprehensive explanation and function It emphasizes semantic coverage, reflecting the diversity and interpretability of the pathways; It emphasizes historical experience and credibility, reflecting the stability and practical support of the path; Both can be used together in the total score calculation, for example: Where: α, β, γ are weight parameters; It can be dynamically adjusted according to the application scenario (such as knowledge recommendation, intelligent review, anomaly detection).

[0144] The final system is based on The candidate paths are sorted, and the path with the highest score is selected as the recommended result.

[0145] To achieve a comprehensive evaluation of semantic path priority, the system calculates a final comprehensive score based on multiple scoring results. This serves as the basis for path ranking and recommendation.

[0146] The comprehensive scoring formula is as follows: in: (Final Score): Represents the total score of the path, reflecting its overall priority and rationality. (Path length score): Reflects the impact of path hop count on feasibility (shorter is better). (Semantic diversity score): Measures the frequency of path validation in historical data (higher scores indicate greater reliability). (Historical Support Score): Measures the frequency of a path's validation in historical data (higher scores indicate greater reliability). α (path length weight parameter): controls Weight in the overall score β (Semantic diversity weight parameter): controls Weight in the overall score γ (historical support weight parameter): controls Weight in the overall score Computational logic The system first calculates for each path separately. , , ; Then, the overall score is calculated according to the weighted formula. ; All paths are sorted from highest to lowest based on their overall score, and the path with the highest score is the recommended path. Weight parameters , , It can be dynamically adjusted according to the task scenario or model optimization strategy.

[0147] For example: In semantic reasoning tasks, priority should be given to the logical rationality of the path, and settings can be configured accordingly. , , ; In data review and design verification scenarios, emphasizing the credibility of historical experience can be achieved by setting... , , .

[0148] Interpretation of Results when The larger the value, the better the overall performance of the path in terms of structural rationality, semantic coverage, and empirical support. The system can be controlled by thresholds (such as...) ) Filter high-quality paths for automatic reasoning or recommendation output.

[0149] 4) Natural Language Description This comprehensive scoring mechanism, by introducing a multi-dimensional weighted model, achieves a triple evaluation of the path's "structurality, semantics, and credibility".

[0150] Compared to a single scoring criterion, it can more accurately reflect the global importance and logical rationality of a path in knowledge graph reasoning, thereby improving the interpretability and reliability of the recommendation results.

[0151] 5) Path filtering and display The system sorts all paths based on the rating results and selects the top N paths (e.g., N=3) with the highest scores as recommendations to be displayed to the user.

[0152] The recommended results include a recommended path diagram (starting point specification, passing through component and material nodes, ending point construction case); relationship tags and attribute summaries between each jump; and detailed information about the final construction case, including component number, type, size, materials used and their parameters, project, construction unit, geographical location, whether it has passed acceptance, and applicable standard number, etc.

[0153] This recommended path helps users understand the typical implementation of a design specification in actual construction projects, improving the efficiency of feasibility verification of design schemes.

[0154] The specific method for S4 is as follows: 1) Drawing recognition model training and loss function definition To improve the accuracy of component identification and attribute extraction in drawings, a deep learning recognition model is constructed and supervised training is performed. The model can adopt the following structure: Model type: a joint image segmentation and text recognition model based on a convolutional neural network (CNN), such as U-Net+OCR Head or DeepLabv3++CRNN; Input data: preprocessed drawing images (grayscale or RGB); Output targets include image segmentation output: generating pixel-level component partitioning maps (e.g., distinguishing road slopes, drainage ditches, culverts, etc.) and text recognition output: recognizing the text regions marked in the drawing and their corresponding numerical content.

[0155] The model's total loss function is defined as: in: L (Total Loss): Measures the overall model error and is used to guide parameter updates; Image segmentation loss: measures the difference between the model's segmentation output and the ground truth label, usually using cross-entropy loss or Dice loss; (OCR Loss): Measures the difference between the text sequence recognized by the model and the manually labeled sequence, usually using CTC (Connectionist Temporal Classification) loss; λ1 (Segmentation Task Weight Coefficient): Controls the degree of influence of the image segmentation task on the total loss; λ2 (Recognition Task Weight Coefficient): Controls the degree of influence of the character recognition task on the total loss; Explanation: When At this time, the system pays more attention to the accuracy of the segmentation task; when At that time, the system pays more attention to the accuracy of text recognition; The weights can be tuned based on the results of experiments or validation sets to achieve multi-task balance.

[0156] Model training and optimization process The system employs a gradient descent-based optimization algorithm to optimize the model parameter set. Iterative updates will be performed.

[0157] 1. Parameter initialization Initialize parameter set: Parameters can be obtained through random initialization or by loading a pre-trained model.

[0158] 2. Forward Propagation The input image is processed layer by layer through the model's convolutional layers, attention layers, and text recognition module to generate: Segmentation Map Text recognition results (Recognized Text Sequence) The predicted output is denoted as .

[0159] 3. Loss Calculation According to the actual label Compared with the prediction results Calculate the loss function value: 4. Backpropagation The partial derivatives of the loss function with respect to the parameters of each layer are calculated using the chain rule: in, This represents the i-th parameter.

[0160] 5. Gradient Update Parameter updates are performed based on gradient descent (SGD) or its improved algorithms (such as Adam and RMSprop). Where: θ i (The i-th parameter in the model): can be a trainable variable such as weights or biases; η (Learning Rate): Controls the step size for each parameter update; a typical value range is 10. -4 ~10 -2 ; (Partial derivatives of the loss function with respect to the parameters): Indicates the degree of influence of the current parameters on the loss function; Training convergence and optimization strategies: When the loss function The training process terminates when convergence (i.e., the decrease in magnitude after multiple iterations is less than the threshold ε). If an adaptive learning rate optimization algorithm (such as Adam) is used, the system will automatically adjust based on historical gradients. ; To prevent overfitting, regularization mechanisms such as Dropout and Weight Decay can be introduced during training.

[0161] (iv) Natural Language Interpretation This mechanism, by defining a composite loss function, enables the model to simultaneously optimize both image segmentation and text recognition tasks. Task splitting (L) seg Focus on the localization and boundary accuracy of the target region in the image; Recognition task (L) ocr Focus on the accuracy of text content recognition; The overall loss L achieves a balance among tasks through weights λ1 and λ2; By continuously optimizing the parameter θ using the gradient descent algorithm, and gradually minimizing L, the overall performance is improved.

[0162] Repeat the above process of "forward propagation → loss calculation → back propagation → parameter update" until the loss function converges or the preset number of training rounds is reached.

[0163] 2) Compliance verification and model output validation After the model training is completed, the system saves the optimal model parameters (i.e., the parameter set that performs best on the validation set) and uses them to predict new drawing images. The prediction results include the category, location, and geometric dimensions of each road component; the recognized text content and unit information corresponding to each labeled text area; and the label information related to materials (such as "C30 concrete" and "φ16 steel bar") and their spatial location.

[0164] The system compares the recognition results output by the model with predefined design specifications and standards to determine compliance. The criteria for compliance include whether the component dimensions fall within the range defined in the design specifications; whether the material name and specifications meet the technical requirements (such as strength grade and diameter); and whether there are any conflicts or violations with the construction specifications to which the component is connected.

[0165] 3) Suggestions for Compliance Report Generation and Anomaly Handling The system generates automatic compliance reports through a report generation engine (such as Pandas+Jinja2+WeasyPrint / PDFKit). The report content includes compliance judgment of component dimension (component ID, name, identification size, standard value range of the corresponding design specification, judgment result: compliant, non-compliant, questionable); compliance judgment of material properties, the type and specification parameters of the materials used in the component, material specification requirements (such as minimum strength grade), compliance result judgment and remarks.

[0166] The assessment of the compliance with construction specifications includes whether the actual components are correctly referenced and meet the specifications; whether there are any conflicts between provincial / national standards; and the compliance status label.

[0167] 4) Improvement suggestions based on anomaly detection results The anomaly detection results are derived from the outputs of the aforementioned classification model, rule-based reasoning, or conflict detection. The system provides the following types of automated suggestions for anomalous components, as shown in Table 2.

[0168] Table 2 The generated compliance reports can be exported in formats such as .pdf, .docx, and .json for use in design reviews, project filings, and intelligent reviews.

[0169] Application Examples In a highway interchange design project, to verify the applicability and practical effect of the knowledge graph-based drawing parsing optimization method proposed in this invention, the following three typical design indicators were structurally identified and tested for compliance: the longitudinal slope compliance of the ramp, the minimum turning radius of the ramp, and whether the horizontal clearance between the drainage ditch and the curb meets the specifications. The original drawing sources include CAD format road design drawings (DWG), containing centerline layers, drainage ditch layers, and annotation layers; PDF format drawing description documents and partial drawing snapshots; and image-format drawings (.png) converted from PDF for image recognition.

[0170] To evaluate the performance of this invention under various parsing modes, the following experimental procedures and parameters were set: 1) Input data Design section: Interchange ramps NK3+120 to NK3+520, ramp longitudinal slope = 8.5%, design specification limit ≤ 8.0%; minimum turning radius = 55m, design specification limit ≥ 60m; horizontal distance between drainage ditch and curbstone = 0.30m, design specification limit ≥ 0.50m. Data source: CAD drawings (DWG) including centerline layer (ROAD_CENTER), drainage ditch layer (DRAINAGE), component annotation layer (ANNOTATION); PDF drawing instructions including structural dimensions, material parameters, and typical cross-sectional diagrams; PDF converted to image format (.png) via OCR for model input.

[0171] 2) Comparison of multi-mode processing paths This experiment compares the performance of four different drawing parsing modes, as shown in Table 3. Table 3 Table 3 3) Analysis steps of this invention (see Table 3, Modes C and D): Image and CAD preprocessing: Extract component vector information using LibreDWG and perform image OCR recognition simultaneously; Unified structured data conversion: Convert extracted dimensions and text information into standard units (e.g., slope%, distance in meters); Knowledge graph construction: Construct a knowledge graph in Neo4j including component entities, material entities, specification clause entities, and their connections; Rule-based reasoning and conflict detection: Define specification thresholds for slope, radius, and clear distance, and perform forward chain reasoning and anomaly detection; Model error correction mechanism: Use backpropagation to optimize model parameters and iteratively reduce text and dimension errors during drawing OCR recognition; Automatic report generation: Output dimension judgment results, material specification verification results, construction consistency judgment results, and suggested optimization paths.

[0172] 4) Quantitative comparison indicators Details are shown in Table 4.

[0173] Table 4 project Mode A Mode B Pattern C (This invention) Pattern D (This invention) Text recognition accuracy 78.1% not applicable 91.4% 94.7% Component dimension extraction error (mean) ±0.45m ±0.26m ±0.14m ±0.09m Compliance testing success rate 62.3% 77.8% 90.2% 93.6% Automatic report generation time (single image) - - 13.6s 11.2s 5) Results Analysis Using the method of this invention (Mode D), without altering the original drawing format, automatic extraction and standard comparison of design parameters are achieved. This not only results in higher recognition accuracy but also generates structured compliance reports, identifies anomalies, and provides optimization suggestions. Compared to traditional document or CAD parsing methods, this invention offers greater adaptability, scalability, and semantic understanding capabilities.

[0174] The document mode processing flow identifies text parameters in PDF documents, directly compares the text parameters with the standard threshold, ignores the geometric positional relationship between the drainage ditch and the curb, and determines the conflict only by the text spacing. The vector pattern processing flow extracts the road centerline coordinate point sequence from the CAD vector map, fits the longitudinal slope equation, calculates the slope value, calculates the turning radius based on the coordinate vector, analyzes the drainage ditch layer coordinates to calculate the minimum spacing, and directly compares the calculation results with the standard threshold. The knowledge graph pattern processing flow loads the highway design specification knowledge base, establishes the constraint relationship between the longitudinal slope entity and the specification value ≤8%, constructs the topological rules for the location of the drainage ditch spacing entity and the curb, and finds through path search that when the longitudinal slope is 8.5%, the specification limit is exceeded, and when the horizontal distance between the drainage ditch and the curb is 0.3m, the topology is violated. The vector + knowledge graph pattern processing flow involves data fusion, parsing CAD coordinates in the vector layer to generate a 3D vector model of the road centerline, and loading longitudinal slope specifications and turning radius formulas in the knowledge layer. Joint verification: The actual value of the longitudinal slope is calculated by vector model, and the slope-vehicle speed-sight distance composite rule in the highway design specification knowledge base is associated with it. The geometric spacing of the drainage ditch is calculated by combining coordinate vectors to verify the topological constraints of the drainage system in the highway design specification knowledge base. System optimization: The radius compensation formula in the highway design specification knowledge base is used to correct the coordinate analysis error, and the specification association threshold is dynamically adjusted based on the vector calculation results; 6) Optimization Results and Comprehensive Capability Analysis In the vector + knowledge graph fusion mode proposed in this invention, a three-dimensional compliance verification mechanism of parameters, specifications, and space is realized by simultaneously introducing parameter calculation (such as longitudinal slope numerical calculation), specification matching (based on construction standard requirements in the graph), and spatial location verification (component spacing judgment). The optimization suggestions automatically generated by the system are shown in Table 5.

[0175] Table 5 The method of this invention can automatically generate the above-mentioned optimized paths and their suggested basis, component annotations and drawing visualization marks, and provide them to the design team in the form of a report for reference, which significantly accelerates the iterative design process.

[0176] 7) Comparative analysis of efficiency and accuracy To evaluate the efficiency improvement of the method of the present invention, the processing time and error rate under the four analytical methods were compared respectively, and the results are shown in Table 6.

[0177] Table 6 The results show that the method of the present invention is superior to the other three methods in terms of both accuracy and efficiency. In particular, it has a stronger ability to automatically detect the relationship between complex components and the conflict detection of execution specifications, and is more suitable for batch processing of drawings and initial design review scenarios.

[0178] 8) Conclusion Explanation The above embodiments clearly demonstrate the basic principles, core features, and application value of the method of this invention in actual highway design drawings. This invention not only surpasses existing methods in component identification accuracy but also introduces a linkage mechanism between graph reasoning and deep learning models, achieving a comprehensive improvement in parsing accuracy, compliance judgment capability, and system processing efficiency.

[0179] Those skilled in the art should understand that the above specific embodiments are only used to illustrate the principles and advantages of the present invention and do not constitute a limitation on the scope of protection of the present invention. Any equivalent changes or substitutions to the structure, method, sequence of steps, etc., without departing from the spirit and substance of the present invention shall fall within the scope of protection of the present invention. The scope of protection of the present invention is determined by the appended claims and their equivalents.

Claims

1. A knowledge graph-based system for parsing and optimizing highway engineering design drawings, characterized in that, It includes a data acquisition and processing module, a drawing parsing module, a knowledge graph construction module, and a reasoning and optimization module; The data acquisition and processing module is used to collect highway engineering design drawing data, perform grayscale normalization preprocessing on the collected data to eliminate scanning artifacts and background noise, use edge detection algorithm to extract line features in the drawings, and combine connected component analysis and OCR recognition technology to extract annotation text and symbol marks as key element features of the drawings. The drawing parsing module, connected to the data acquisition and processing module, is used to extract features and perform semantic parsing on drawing images based on the Tongyi Qianwen large model framework and optical character recognition technology. It also uses vector graphics parsing algorithms to extract structured data such as component dimensions, material specifications, and construction coordinates. The knowledge graph construction module, connected to the drawing parsing module, is used to construct a knowledge graph for the highway engineering field that includes three types of entities: road components, material properties, and construction specifications, using the Neo4j graph database. Through rule-based reasoning and anomaly detection, it enables compliance determination of design parameters and detection of geometric conflicts. The reasoning and optimization module, connected to the knowledge graph construction module, uses vector space mapping technology to perform semantic vector conversion and matching between natural language queries and graph nodes in the highway engineering knowledge graph. Combined with a multi-hop path reasoning algorithm, it performs semantic association analysis between design specifications and construction cases in the knowledge graph, and constructs recommended paths from design specifications to construction cases. Based on the gradient descent optimization algorithm, it constructs a loss function for drawing recognition errors, backpropagates errors, and iteratively optimizes model parameters. Using a report generation engine, it automatically outputs compliance judgment reports including dimensional compliance, material specifications, and construction conflict situations, and generates optimization suggestions for anomalies.

2. A knowledge graph-based method for parsing and optimizing highway engineering design drawings, employing the knowledge graph-based highway engineering design drawing parsing and optimization system described in claim 1, characterized in that... Includes the following steps: S1. Collect highway engineering design drawing data. Obtain images or vector data of highway engineering design drawings through scanners or digital interfaces. Perform grayscale normalization preprocessing on the collected data to eliminate scanning artifacts and background noise. Use edge detection algorithms to extract line features in the drawings. Combine connected component analysis and OCR recognition technology to extract annotation text and symbol markings as key element features of the drawings. S2. Based on the Tongyi Qianwen large model framework and optical character recognition technology, feature extraction and semantic parsing are performed on the drawing images. Combined with vector graphics parsing algorithms, structured data such as component dimensions, material specifications, and construction coordinates are extracted. The Neo4j graph database is used to construct a knowledge graph in the highway engineering field that includes three types of entities: road components, material properties, and construction specifications. Through rule reasoning and anomaly detection, compliance determination of design parameters and geometric conflict detection are achieved. S3. Using vector space mapping technology, semantic vector conversion and matching are performed between natural language queries and graph nodes of the knowledge graph in the field of highway engineering. Combined with multi-hop path reasoning algorithm, semantic association analysis between design specifications and construction cases is realized in the knowledge graph, and a recommended path from design specifications to construction cases is constructed. S4. Construct a loss function for drawing recognition error based on gradient descent optimization algorithm, backpropagate the error and iteratively optimize model parameters to improve the recognition accuracy of key elements in drawings; Using a report generation engine, the system automatically outputs compliance assessment reports, including those on dimensional compliance, material specifications, and construction conflicts, and generates optimization suggestions for anomalies.

3. The knowledge graph-based method for optimizing highway engineering design drawings according to claim 2, characterized in that: In S1, highway engineering design drawing data includes CAD vector graphics, PDF documents, and image files of highway engineering design drawings.

4. The knowledge graph-based method for optimizing highway engineering design drawings according to claim 2, characterized in that: In S1, the acquired data undergoes grayscale normalization preprocessing to eliminate scanning artifacts and background noise. The specific method is as follows: Calculate the grayscale value of each pixel in the color image, convert it to a grayscale image, traverse the entire grayscale image, find the minimum and maximum grayscale values ​​in the image, normalize the grayscale image, and map the normalized grayscale values ​​back to the brightness range of 0 to 255. Smooth the image by weighted averaging, with the weights determined by a Gaussian function.

5. The knowledge graph-based method for optimizing highway engineering design drawings according to claim 2, characterized in that: In S2, based on the Tongyi Qianwen large model framework and optical character recognition technology, feature extraction and semantic parsing are performed on the drawing images. Combined with vector graphics parsing algorithms, structured data such as component dimensions, material specifications, and construction coordinates are extracted. The specific method is as follows: The preprocessed grayscale image is input into the Tongyi Qianwen Big Model to obtain a feature map that combines global semantic information and local geometric structure. At the same time, the Tongyi Qianwen Big Model fuses shallow features and deep features. Based on fusion features, an improved DeepLabv3+ semantic segmentation algorithm is introduced to perform pixel-level region classification on drawings.

6. The knowledge graph-based method for optimizing highway engineering design drawings according to claim 5, characterized in that: The regions are classified into the following categories: road components, labeled text areas, material annotations, structural auxiliary lines, non-structural areas, and blurred and unidentified areas.

7. The knowledge graph-based method for optimizing highway engineering design drawings according to claim 2, characterized in that: In S2, a knowledge graph for the highway engineering domain is constructed using the Neo4j graph database, containing three types of entities: road components, material properties, and construction specifications. The specific method is as follows: The structured data extracted from the drawings will be imported into the Neo4j graph database; three types of entities will be defined: road components, material properties, and construction specifications. The main relationships between entities are as follows: Components use a certain material (USES); Components conform to a certain construction specification (COMPLIES_WITH); Composite components contain sub-components (CONTAINS); Spatial connections or structural associations between components (CONNECTED_TO); Specifications reference other specifications, or components depend on a certain standard (REQUIRES); The Neo4j Cypher statement batch import mechanism is used to convert structured JSON data into a graph structure, create a label for each node, establish edges for each type of relationship, perform a MERGE operation after import to prevent node duplication, and establish necessary indexes and unique constraints. After establishing a relationship connection, automatic checks on connection integrity and reasonableness are performed.

8. The knowledge graph-based method for optimizing highway engineering design drawings according to claim 2, characterized in that: In S2, the design parameters include dimensional parameters, material parameters, spatial parameters, and construction parameters.

9. The knowledge graph-based method for optimizing highway engineering design drawings according to claim 2, characterized in that: In S3, during matching, the similarity between the natural language query vector and the graph node vector is calculated, and the top N nodes with the highest similarity scores are selected as the matching results.

10. The knowledge graph-based method for optimizing highway engineering design drawings according to claim 2, characterized in that: In S3, when constructing recommended paths from standard requirements to construction examples, each path is scored, and the top N paths with the highest scores are selected as the recommended results and displayed to the user.