Railway bridge construction drawing visual semantic extraction and BIM parameterization method and system

CN122551380APending Publication Date: 2026-08-11INST OF COMPUTING TECH CHINA ACAD OF RAILWAY SCI +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-15
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0006]鉴于此,本发明实施例提供了一种铁路桥梁施工图视觉语义提取与BIM参数化方法及系统,解决现有铁路桥梁施工图纸信息提取存在人工依赖强、缺工程语义理解、识别精度低、与BIM建模衔接不畅的问题

Benefits of technology

[0017]This invention relates to a method and system for visual semantic extraction and BIM parameterization of railway bridge construction drawings. First, the railway bridge construction drawings undergo image preprocessing. Then, an optical character recognition (OCR) model optimized for railway bridge scenarios is used to recognize characters, extracting character sequences and corresponding font features, spatial coordinates, and character orientation. Next, based on the spatial coordinates and orientation of the characters, the proximity between characters is calculated to extract related characters with annotation associations. Subsequently, the multi-dimensional features of the characters and related characters are input into a pre-trained semantic classification model to complete the semantic classification of attributes such as component name, geometric dimensions, material grade, and construction stage. Finally, the classification results are matched and mapped with a railway bridge BIM standard library to generate structured construction information, which is output through a preset interface, providing data support for automated BIM modeling. The optimized OCR model in this invention improves character recognition accuracy under complex layouts, the proximity calculation restores the engineering logical associations of the drawing annotations, the semantic classification model realizes the engineering semantic parsing of characters, and the direct mapping with the BIM standard library establishes a data link from two-dimensional drawings to three-dimensional BIM modeling, achieving automated conversion of drawing information into structured construction parameters. It significantly reduces the amount of manual intervention, greatly improves the efficiency of drawing information extraction and the level of BIM modeling automation, ensures the accuracy and consistency of engineering data, and provides reliable technical support for the information management, digital twin construction and full-process digital control of railway bridge engineering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122551380A_ABST
    Figure CN122551380A_ABST
Patent Text Reader

Abstract

The present application provides a railway bridge construction drawing visual semantic extraction and BIM parameterization method and system, first, the construction drawing is preprocessed, the character is recognized through the OCR model adapted to the railway scene optimization, the character sequence and the font, position, direction and other multidimensional features are extracted; then the character proximity is calculated, the related characters with label correlation are extracted; subsequently, the multidimensional features of the characters and related characters are input into the pre-trained semantic classification model, the semantic classification of four types of engineering properties such as component name and geometric size is completed; finally, the classification results are matched and mapped with the railway bridge BIM standard library, the structured construction information is generated and output through the interface, and the BIM automatic modeling is supported. The present application breaks through the data link from two-dimensional drawing to three-dimensional BIM modeling, realizes the automatic conversion of drawing information to structured construction parameters, greatly reduces the manual intervention, improves the information extraction and modeling efficiency, and provides reliable technical support for the informatization and digitalization management and control of railway bridge engineering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of engineering information processing technology, and in particular to a method and system for visual semantic extraction and BIM parameterization of railway bridge construction drawings. Background Technology

[0002] With the continuous expansion of railway construction, the proportion of railway bridges in projects is increasing year by year. Construction drawings, as the core technical basis for carrying multi-dimensional engineering information such as geometric dimensions, structural forms, material grades, and reinforcement parameters, directly impact the quality and efficiency of BIM automated modeling and the information management of the entire engineering process through their digitization and intelligent extraction efficiency. Railway bridge construction drawings are diverse in type and have high information density, containing a large amount of professional text annotations, dimension symbols, structural codes, and tabular data, with complex layouts, posing a significant challenge to the efficient extraction of structured engineering information.

[0003] In recent years, the development of OCR (Optical Character Recognition) technology and deep learning algorithms has provided a new technical path for the digitization of engineering drawings. Some studies have applied it to the field of railway bridge construction drawing recognition, realizing the extraction of basic information such as text and dimension annotations. Some studies have also attempted to introduce neural network algorithms in the post-recognition processing stage to perform simple semantic summarization of the recognition results, in order to provide preliminary data support for BIM modeling.

[0004] However, the current extraction of information from railway bridge construction drawings still mainly relies on manual operation, traditional CAD file parsing, and general OCR recognition technology. Although this has achieved the digitization of drawing data to a certain extent, it has many technical defects and cannot meet the needs of engineering informatization development: manual input is extremely labor-intensive and prone to information omissions and data errors, seriously affecting data accuracy; general OCR only stays at the character extraction level and lacks the ability to understand engineering semantics, making it impossible to distinguish the engineering attributes of information; the recognition accuracy is insufficient for complex layouts such as mixed text and graphics and slanted annotations, which can easily lead to incomplete extraction of key engineering information; the recognition results are mostly unstructured text, with no direct connection mechanism between them and BIM modeling, requiring secondary manual processing; and no dedicated semantic knowledge system for the railway bridge field has been established, making it impossible to achieve standardized extraction and summarization of engineering information.

[0005] The aforementioned problems prevent existing technologies from automating and structurally extracting information from railway bridge construction drawings, and also hinder seamless integration with BIM modeling, thus restricting the digitalization and informatization of railway bridge engineering. Therefore, there is an urgent need to develop an intelligent recognition method adapted to the characteristics of railway bridge construction drawings, enabling full automation of the entire process from drawing information extraction to semantic parsing and parameterized output. Summary of the Invention

[0006] In view of this, embodiments of the present invention provide a method and system for visual semantic extraction and BIM parameterization of railway bridge construction drawings, which solves the problems of existing railway bridge construction drawing information extraction, such as strong reliance on manual labor, lack of engineering semantic understanding, low recognition accuracy, and poor integration with BIM modeling.

[0007] One aspect of the present invention provides a method for visual semantic extraction and BIM parameterization of railway bridge construction drawings, the method comprising the following steps: Image preprocessing is performed on the railway bridge construction drawings to be analyzed, which are formatted for individual building components. Then, an optical character recognition model optimized for railway bridge construction drawings is used to recognize the characters in the railway bridge construction drawings to be analyzed, and the character sequence and the font features, spatial coordinates and character direction of each character are extracted. The proximity between characters is calculated according to the spatial coordinates and orientation of each character in the character sequence according to a preset rule, and related characters that have a labeling relationship with each character are extracted based on the proximity. The font features, spatial coordinates, and character orientation of each individual character in the character sequence and its corresponding related characters are input into a pre-trained semantic classification model to extract semantic labels for each character and complete attribute classification. The attribute classification includes component name, geometric dimensions, material grade, and construction stage. The attribute classification results of each character in the character sequence are matched with the railway bridge BIM standard library and a mapping is established to generate structured construction information containing the component name, geometric dimensions, material grade and construction stage, and provided to the outside world through a preset interface for automated BIM model construction.

[0008] In some embodiments, image preprocessing is performed on the railway bridge construction drawings to be analyzed in a defined format, including: Convert the original railway bridge construction drawings to be analyzed into standard image formats such as JPG, PNG, or TIFF, and perform grayscale conversion, binarization, distortion correction, noise reduction, and layer separation. The distortion correction includes tilt correction using probabilistic Hough line transform and perspective distortion correction using perspective transformation algorithm; the denoising uses median filtering or bilateral filtering; and the layer separation uses adaptive thresholding and connected component analysis.

[0009] In some embodiments, the optimization steps of the optical character recognition model include: Obtain a first training sample set containing railway bridge construction drawing samples in multiple image formats. Each railway bridge construction drawing sample is labeled with the position coordinates, character direction, text content, and font features of the sample characters as labels. The initial optical character recognition model is trained by sampling the first training sample set. The initial optical character recognition model adopts the PP-OCR v4 model, which includes a text detection module, a text direction classification module, and a text recognition module. The text detection module takes the railway bridge construction drawing sample as input and outputs a first predicted value for the position coordinates of the sample characters. The text direction classification module takes the image of the first predicted value portion as input and outputs a second predicted value for the character direction. The text recognition module takes the image of the first predicted value portion as input and outputs a third predicted value for the text content and font features. Based on the deviations of the first predicted value, the second predicted value, and the third predicted value from the label, a loss is constructed, and the parameters of the initial optical character recognition model are updated to obtain the optical character recognition model.

[0010] In some embodiments, the method further includes: rotating, scaling, blurring, and adding noise to the railway bridge construction drawing samples in the first training sample set to expand the data size.

[0011] In some embodiments, the proximity between characters is calculated according to a preset rule based on the spatial coordinates and orientation of each character in the character sequence, and related characters with a labeled relationship are extracted based on the proximity, including: The distance between the center points of each character is calculated based on the spatial position coordinates of each character, and the spatial distance proximity is obtained by assigning a score based on the first preset value range. The directional difference between each character is calculated based on the character direction of each character, and the character directional proximity is obtained by assigning a score based on the second preset value range. Based on the spatial coordinates of each character, determine whether the characters are horizontally or vertically aligned, and assign a score to obtain the layout relevance proximity. The proximity is obtained by weighting and summing the spatial distance proximity, the character directional proximity, and the layout correlation proximity between each character; For each character, extract the set number of characters with the highest proximity as related characters.

[0012] In some embodiments, the pre-training step of the semantic classification model includes: Obtain a second training sample set containing multiple samples. Each sample contains a single sample character extracted from the railway bridge construction drawing sample and the font features, spatial coordinates, and character direction of the corresponding related character, and annotate the semantic labels of the sample character attribute classification. The initial semantic classification model is trained using the second training sample set. The input is the font features, spatial coordinates and character direction of the sample characters and their corresponding related characters in the sample. The output is a fourth predicted value for classifying the attribute of the sample characters. The loss is constructed based on the deviation between the fourth predicted value and the semantic label to update the parameters of the initial semantic classification model, thereby obtaining the semantic classification model. The initial semantic classification model uses a BP neural network or a BERT model.

[0013] In some embodiments, when training the initial semantic classification model using the second training sample set, the initial learning rate is set to 0.0001 and dynamically adjusted based on the cosine annealing algorithm.

[0014] On the other hand, the present invention also provides a device for visual semantic extraction and BIM parameterization of railway bridge construction drawings, including a processor, a memory, and a computer program or instructions stored in the memory. The processor is used to execute the computer program or instructions, and when the computer program / instructions are executed, the device implements the steps of the above method.

[0015] On the other hand, the present invention also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.

[0016] On the other hand, the present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.

[0017] This invention relates to a method and system for visual semantic extraction and BIM parameterization of railway bridge construction drawings. First, the railway bridge construction drawings undergo image preprocessing. Then, an optical character recognition (OCR) model optimized for railway bridge scenarios is used to recognize characters, extracting character sequences and corresponding font features, spatial coordinates, and character orientation. Next, based on the spatial coordinates and orientation of the characters, the proximity between characters is calculated to extract related characters with annotation associations. Subsequently, the multi-dimensional features of the characters and related characters are input into a pre-trained semantic classification model to complete the semantic classification of attributes such as component name, geometric dimensions, material grade, and construction stage. Finally, the classification results are matched and mapped with a railway bridge BIM standard library to generate structured construction information, which is output through a preset interface, providing data support for automated BIM modeling. The optimized OCR model in this invention improves character recognition accuracy under complex layouts, the proximity calculation restores the engineering logical associations of the drawing annotations, the semantic classification model realizes the engineering semantic parsing of characters, and the direct mapping with the BIM standard library establishes a data link from two-dimensional drawings to three-dimensional BIM modeling, achieving automated conversion of drawing information into structured construction parameters. It significantly reduces the amount of manual intervention, greatly improves the efficiency of drawing information extraction and the level of BIM modeling automation, ensures the accuracy and consistency of engineering data, and provides reliable technical support for the information management, digital twin construction and full-process digital control of railway bridge engineering.

[0018] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.

[0019] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description

[0020] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings: Figure 1 This is a flowchart illustrating the method for visual semantic extraction and BIM parameterization of railway bridge construction drawings according to an embodiment of the present invention.

[0021] Figure 2 This is a schematic diagram of the intelligent recognition system for railway bridge construction drawings that combines optical character recognition and neural network semantic classification, according to an embodiment of the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.

[0023] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.

[0024] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.

[0025] It should also be noted that, unless otherwise specified, the term "connection" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.

[0026] The demand for efficient extraction of construction drawing information and integration with BIM modeling in the current information-based construction of railway bridge engineering is becoming increasingly urgent. Although existing technologies have attempted to apply OCR technology and simple artificial intelligence algorithms to the recognition of railway bridge construction drawings, achieving basic extraction of some text, numbers, and other characters, and a small number of studies have explored the preliminary summarization of recognition results, providing a certain technical path for drawing digitization, the overall technology still relies on manual operation and traditional CAD file parsing. Furthermore, general OCR models have not been specifically optimized for the characteristics of railway bridge drawings, resulting in many shortcomings in the application of the technology. Existing technologies can only extract surface-level characters, lacking the ability to understand engineering semantics and distinguish the engineering attributes corresponding to characters. They do not consider the annotation association logic of characters in drawings, and cannot extract related characters with engineering connections, resulting in fragmented recognition information. They have poor adaptability to complex layouts of railway bridge drawings with mixed text and graphics and multi-directional annotations, resulting in insufficient recognition accuracy and easy omission of key engineering information. Moreover, the recognition results are mostly unstructured text, which has no direct mapping and connection mechanism with the railway bridge BIM standard library. It requires manual secondary processing before it can be used for modeling, which is not only inefficient and prone to data errors and omissions, but also causes a break in the data chain from drawing information to BIM modeling, making it difficult to support the actual needs of automated BIM modeling and information management of railway bridge engineering.

[0027] In view of this, the present invention provides a method for visual semantic extraction and BIM parameterization of railway bridge construction drawings, such as... Figure 1 As shown, the method includes the following steps S101~S104: Step S101: Perform image preprocessing on the railway bridge construction drawings to be analyzed, which are formatted for individual building components, and use an optical character recognition model optimized for railway bridge construction drawings to perform character recognition on the railway bridge construction drawings to be analyzed, extracting character sequences and the font features, spatial coordinates and character orientation of each character.

[0028] Step S102: Calculate the proximity between each character according to the spatial coordinates and direction of each character in the character sequence, and extract related characters that have a labeling relationship with each character based on the proximity.

[0029] Step S103: Input the font features, spatial coordinates and character orientation of a single character in the character sequence and its corresponding related characters into a pre-trained semantic classification model to extract semantic labels for each character and complete attribute classification. The attribute classification includes component name, geometric dimensions, material grade and construction stage.

[0030] Step S104: Match the attribute classification results of each character in the character sequence with the railway bridge BIM standard library and establish a mapping to generate structured construction information containing component name, geometric dimensions, material grade and construction stage, and provide it to the outside world through a preset interface for automated BIM model construction.

[0031] In step S101, the construction drawings of independent components in the railway bridge are first selected by importing files or manually selecting a bounding box to clarify the data objects to be processed. In actual processing, the construction drawings of complex railway bridge structures are broken down into individual components, such as pier drawings, box girder drawings, and support beam drawings. The drawings of the corresponding components are used to mark the component's name, dimensions, materials, construction stage, and other attributes according to specifications based on the geometric shape. Under railway construction standards and specifications, the structure and form of the data labeled for these independent components are relatively fixed, and there is correlation and semantic relevance. Based on this, the scheme of this application can be effectively identified.

[0032] The imported data can be in various formats, such as PDF, DWG, or scanned images. In some embodiments, image preprocessing is performed on the railway bridge construction drawings to be analyzed in a specified format, including the following steps: converting the original railway bridge construction drawings to be analyzed into standard image formats such as JPG, PNG, or TIFF, and performing grayscale conversion, binarization, distortion correction, denoising, and layer separation; wherein, distortion correction includes performing tilt correction using probabilistic Hough line transform and performing perspective distortion correction using perspective transformation algorithm; denoising uses median filtering or bilateral filtering; layer separation uses adaptive thresholding and connected component analysis methods.

[0033] Specifically, for the three original input formats of PDF, DWG, and scanned images, dedicated tools / programs are used to convert them into standard raster image formats such as JPG, PNG, or TIFF. PDF format can be converted to high resolution using PyMuPDF, Adobe Acrobat Pro, and Foxit Advanced PDF Editor. DWG format relies on open-source libraries such as AutoCAD, GstarCAD, and ezdxf to complete vector primitive rendering and conversion. Scanned images can be directly read and converted after resolution verification using OpenCV and Matlab.

[0034] Grayscale conversion is the basic image optimization step. The weighted average method, a common engineering algorithm, is used. The converted three-channel standard image is converted into a single-channel grayscale image using built-in functions in OpenCV, Python Scikit-Image library, and Matlab image processing toolbox. This removes color information interference, reduces the amount of subsequent calculations, and at the same time fully preserves the brightness characteristics of the text and annotation lines in the drawing.

[0035] Distortion correction is implemented in two steps, both using OpenCV and Matlab: First, the probabilistic Hough line transform algorithm is used to perform tilt correction. Edge detection is performed on the grayscale image to highlight the annotation lines and contour lines. Then, straight lines in the image are detected and the average tilt angle is calculated. Correction is completed by rotating the image. For perspective distortion caused by scanning or shooting, a perspective transformation algorithm is used. By identifying the feature points at the four corners of the drawing, the homography matrix is ​​solved to perform perspective correction on the image and restore the regular rectangular shape of the drawing.

[0036] The median filtering or bilateral filtering algorithms used in the denoising process can be directly implemented using the built-in filtering functions of OpenCV and Matlab: median filtering mainly removes speckles and noise generated by scanning, and can effectively preserve the edge integrity of text and annotation lines; bilateral filtering takes edge preservation into account while denoising, and is suitable for processing railway bridge drawings with slightly blurred backgrounds. A single algorithm or a combination of algorithms can be flexibly selected according to the noise type of the drawing.

[0037] Layer separation is achieved using OpenCV, Matlab image processing toolbox, and ImageJ professional image analysis software. First, the denoised grayscale image is binarized using an adaptive thresholding method to accurately separate the text, annotation lines, and background. Then, an 8-connected domain analysis algorithm is used to identify adjacent foreground pixel regions in the binary image. Combined with the geometric features of the text and annotation lines in the railway bridge drawings, effective regions are selected, and interference such as component outlines, table lines, and isolated noise points are eliminated. Finally, the text and annotation line layers are effectively separated from other layers, and a high-quality recognition base map is output.

[0038] Furthermore, character extraction is performed using an optical character recognition model optimized for railway bridge construction drawings. In some embodiments, the optimization steps of the optical character recognition model include steps S1011 and S1012: Step S1011: Obtain the first training sample set containing railway bridge construction drawing samples in multiple image formats. For each railway bridge construction drawing sample, label the position coordinates of the sample characters, character direction, text content, and font features as labels.

[0039] Step S1012: Sample the first training sample set to train the initial optical character recognition model. The initial optical character recognition model adopts the PP-OCR v4 model, which includes a text detection module, a text direction classification module, and a text recognition module. The text detection module takes the railway bridge construction drawing sample as input and outputs the first predicted value for the position coordinates of the sample characters. The text direction classification module takes the image of the first predicted value portion as input and outputs the second predicted value for the character direction. The text recognition module takes the image of the first predicted value portion as input and outputs the third predicted value for the text content and font features. Based on the deviation between the first, second, and third predicted values ​​and the label, construct the loss and update the parameters of the initial optical character recognition model to obtain the optical character recognition model.

[0040] Step S1011 is used to build a labeled sample set that fits the characteristics of railway bridge construction drawings, providing accurate supervised data for model optimization. First, samples of railway bridge construction drawings covering different types and formats are collected, and all samples are converted to pre-processed JPG, PNG, or TIFF standard image formats to ensure consistency with actual application scenarios. Then, each sample is finely annotated in multiple dimensions. The annotation content must completely cover the supervised labels required for model training, including the spatial coordinates of the sample characters, character direction, text content, and font features. Specifically, spatial coordinates can use bounded rectangle coordinate annotations, character directions can be set to 0°, 90°, 180°, and 270° to adapt to the characteristics of railway drawing annotations, text content can include engineering-specific characters such as Φ, @, component codes, etc., and font features can include font size, weight, and style. After annotation, all labeled samples are integrated to form the first training sample set, providing targeted learning basis for subsequent model training.

[0041] In some embodiments, the method further includes rotating, scaling, blurring, and adding noise to railway bridge construction drawing samples in a first training sample set to expand the data size.

[0042] Step S1012 utilizes the three-module architecture of the PP-OCR v4 model to perform targeted training and optimization for railway bridge drawings. Using the first training sample set as input, the sample images are fed into the text detection module of PP-OCR v4. This module outputs the first predicted value of the sample character position coordinates through feature extraction and object detection algorithms, focusing on learning accurate positioning in scenarios where characters overlap with annotation lines and component outlines in railway drawings. The character region image output by the detection module is then fed into the text direction classification module, which outputs the second predicted value of the character direction, solving the direction recognition problem for multi-directional annotations in railway drawings. Simultaneously, the character region image is fed into the text recognition module, which outputs the third predicted value of the text content and font features, focusing on learning the recognition of railway engineering-specific characters and font feature extraction. Finally, the deviations between the first, second, and third predicted values ​​and the sample annotation labels are calculated, constructing a multi-task loss function including detection loss, direction classification loss, and recognition loss. The model parameters are iteratively updated through backpropagation, continuously optimizing until the loss converges, ultimately obtaining an optical character recognition model adapted to railway bridge construction drawings. This model can accurately extract character sequences and corresponding key information such as position coordinates, character direction, and font features from the drawings.

[0043] Step S102 calculates the proximity between characters according to preset rules based on the spatial coordinates and orientation of each character in the character sequence, and extracts related characters that have a labeling relationship with each character based on the proximity.

[0044] In some embodiments, the proximity between characters is calculated according to a preset rule based on the spatial coordinates and orientation of each character in the character sequence, and related characters that have a labeling relationship with each character are extracted based on the proximity, including steps S1021~S1025: Step S1021: Calculate the distance between the center points of each character based on the spatial coordinates of each character, and obtain the spatial proximity based on the first preset value range.

[0045] Step S1022: Calculate the directional difference between each character based on the character direction of each character, and obtain the character directional proximity based on the second preset value range.

[0046] Step S1023: Determine whether the characters are horizontally or vertically aligned based on their spatial coordinates, and assign a score to obtain the layout relevance proximity.

[0047] Step S1024: The proximity is obtained by weighting and summing the spatial distance proximity, character direction proximity, and layout correlation proximity between each character.

[0048] Step S1025: For each character, extract the set number of characters with the highest proximity as related characters.

[0049] Step S1021 first calculates the center point coordinates of each character based on the spatial coordinates of the characters extracted in S101, and then calculates the distance between the center points of each pair of characters using the Euclidean distance formula. Subsequently, a first preset value range is set based on the character density characteristics of the railway bridge drawings. For example, at a resolution of 300 DPI, a center point distance ≤ 50 pixels is assigned a full score of 1 point, a center point distance between 50 and 100 pixels is assigned 0.5 points, and a center point distance > 100 pixels is assigned 0 points. For characters in railway drawings connected by leader lines, such as component names and far-end dimension annotations, the value range restriction can be waived and a full score can be directly assigned. Finally, the spatial distance proximity reflecting the physical proximity of the characters is obtained. This step directly anchors the most basic engineering correlation possibility between characters.

[0050] In step S1022, the direction difference between each pair of characters is first calculated. Then, a second preset value range is set. For example, a direction difference of 0° or 90° is assigned a full score of 1 point to adapt to horizontal and vertical association labels; 180° or 270° is assigned 0 points to exclude inverted and reversed invalid characters. By assigning scores, the character direction proximity is obtained, eliminating the interference of character direction differences on association determination.

[0051] Step S1023 determines whether characters are horizontally or vertically aligned based on the coordinates of the character center point. Specifically, if the difference in the y-coordinate of the center point is ≤20 pixels, it is considered horizontally aligned; if the difference in the x-coordinate of the center point is ≤20 pixels, it is considered vertically aligned. If the condition is met, a full score of 1 point is assigned; otherwise, a score of 0 points is assigned. This yields the layout relevance proximity, enhancing the engineering adaptability of proximity calculation.

[0052] In steps S1024 and S1025, weights are set according to the priority of railway engineering annotations. Spatial proximity weight can be set at 60%, character direction proximity weight at 20%, and layout relevance proximity weight at 20%. The proximity is obtained by weighted summation. For each character, other characters are sorted from high to low according to their total proximity, and a set number of characters are extracted as related characters. Fragmented individual characters are restored into annotation combinations with engineering significance, such as associating "PZ3 pier" with "C50" and "L=32m". This provides character feature combinations that conform to engineering logic for subsequent semantic classification, solving the problem that general methods only extract single characters and cannot reflect engineering relevance.

[0053] In step S103, the semantic classification model can employ a BP neural network or a BERT fine-tuning model. Input features include character content, location coordinates, font features, and neighboring entity types. BP neural networks are suitable for rapid feature classification of short and medium-length texts. They receive numerical features extracted by OCR and map them to pre-defined engineering semantic labels. Training parameters include learning rate, number of iterations, and batch size. The BERT fine-tuning model is used to handle long text annotations and annotations with strong contextual relationships. By loading a Chinese BERT baseline model and fine-tuning it on a railway bridge corpus, it can accurately capture the deep semantic relationships of terms. The functional principle of this step lies in fusing multimodal features, such as text content and spatial context, and using neural networks to achieve automatic mapping from character recognition results to engineering semantic categories. This achieves a leap from text recognition to engineering semantic understanding, enabling the computer to automatically determine that "C50" represents a material strength grade, "L=32m" represents a beam length parameter, etc., providing accurate semantic labels for subsequent parametric modeling.

[0054] In some embodiments, the pre-training step of the semantic classification model includes steps S1031 and S1032: Step S1031: Obtain a second training sample set containing multiple samples. Each sample contains a single sample character extracted from railway bridge construction drawing samples and the font features, spatial coordinates, and character orientation of its corresponding related characters, and annotates the semantic labels of the sample character attribute classification.

[0055] Step S1032: Train the initial semantic classification model using the second training sample set. Take the font features, spatial coordinates and character orientation of the sample characters and their corresponding related characters in the sample as input, and output the fourth predicted value of the attribute classification of the sample characters. Based on the deviation between the fourth predicted value and the semantic label, construct the loss to update the parameters of the initial semantic classification model and obtain the semantic classification model.

[0056] In step S1031, the sample data source is entirely derived from railway bridge construction drawing samples, and each sample integrates the core features output from step S102, namely the font features, spatial coordinates, and character orientation of a single sample character and related characters with annotations, fully preserving the physical features and engineering-related features of the characters, ensuring that the sample input dimension is consistent with the subsequent actual inference stage. Each sample undergoes refined semantic annotation, with the semantic labels strictly corresponding to preset engineering attributes, and the annotation rules conforming to railway bridge design specifications. Annotated samples from different types of railway bridge drawings, such as reinforcement drawings, pier structure drawings, and general layout drawings, are integrated to form a second training sample set covering the entire scenario, ensuring the model has sufficient generalization ability.

[0057] In step S1032, using the second training sample set, the initial semantic classification model learns the mapping relationship between multi-dimensional character features and attribute classification results. The fused features of individual characters and their related characters in the sample are used as model input, allowing the model to combine engineering-related features to determine semantic attributes. The model outputs a fourth predicted value for the attribute classification of the sample characters through forward propagation. The deviation between the fourth predicted value and the manually labeled semantic tags is calculated, and a loss function adapted to the classification task, such as cross-entropy loss, is constructed. The model parameters are iteratively updated through backpropagation. During training, the learning rate can be dynamically adjusted using the previously mentioned cosine annealing algorithm to avoid overfitting and improve convergence stability. Finally, when the loss function converges to a preset threshold, a pre-trained semantic classification model is obtained. This model can accurately convert multi-dimensional character features into corresponding engineering semantic tags, achieving attribute classification of characters in railway bridge drawings.

[0058] In some embodiments, when training the initial semantic classification model using a second training sample set, the initial learning rate is set to 0.0001 and dynamically adjusted based on the cosine annealing algorithm.

[0059] Step S104 matches and maps the attribute classification results of each character in the character sequence with the railway bridge BIM standard library, generating structured construction information including component names, geometric dimensions, material grades, and construction stages. This information is then provided externally through a preset interface for automated BIM model building. During implementation, mapping rules between semantic fields and modeling parameters are established based on railway bridge design specifications and BIM coding systems (such as EBS coding). Semantic tags are converted into standardized parameter tables, generating structured files in formats such as JSON, XML, or IFC. The output module provides a configurable API interface, supporting automatic modeling calls from multiple platforms such as Revit, Civil 3D, and Bentley. Through knowledge base mapping and standardized output, the data link from drawing recognition to BIM modeling is established, achieving seamless integration between recognition results and the modeling system. This significantly improves the efficiency of construction drawing information processing and automated modeling capabilities, providing technical support for the full-process digital management of railway bridge construction.

[0060] On the other hand, the present invention also provides a device for visual semantic extraction and BIM parameterization of railway bridge construction drawings, including a processor, a memory, and a computer program or instructions stored in the memory. The processor is used to execute the computer program or instructions, and when the computer program / instructions are executed, the device implements the steps of the above method.

[0061] On the other hand, the present invention also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.

[0062] On the other hand, the present invention also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.

[0063] The present invention will now be described with reference to a specific embodiment: This embodiment provides an intelligent recognition system for railway bridge construction drawings that combines Optical Character Recognition (OCR) with neural network semantic classification. The aim is to achieve automated recognition and semantic parsing of construction drawing information. By combining OCR image recognition technology with a neural network semantic classification model, it automatically recognizes text, dimensions, symbols, and tabular data in the drawings and determines their engineering semantic category based on contextual position. A semantic knowledge base for bridge drawings is established to achieve structured data output. A semantic tagging system and mapping rules specific to the railway bridge field are constructed, transforming the recognition results into standardized, machine-readable engineering parameter data, forming a structured bridge component information model. Automatic connection from drawings to BIM models is achieved by outputting the recognized structured parameters through an interface into a standard data format (such as JSON, XML, or IFC) that can be called by the BIM system, enabling seamless connection between the drawing recognition results and the BIM modeling module, supporting automatic modeling and parametric generation of bridge components. Significantly improved drawing recognition efficiency and accuracy are achieved through deep learning model optimization and OCR algorithm customization, increasing the recognition accuracy of complex annotations in railway bridge drawings, and improving drawing recognition efficiency to several times that of manual methods. Promote the integration of construction information digitization and automated modeling, realize the automated conversion from traditional two-dimensional drawings to structured parameter data, and provide data support for information management, quality traceability and digital twins in the construction phase of railway bridges.

[0064] This embodiment uses railway bridge construction drawings as input data and achieves automated conversion from drawing information to BIM modeling parameters through five stages: image preprocessing, text recognition, semantic classification, parameter mapping, and data output. This invention employs an improved OCR algorithm to recognize text and symbol information on the drawings and utilizes a neural network to perform semantic understanding and engineering attribute classification on the recognition results, ultimately generating structured parametric bridge data that can be directly used by the BIM automatic modeling system. This method realizes data integration from two-dimensional drawings to three-dimensional parametric models, forming an intelligent information flow from drawings and semantic data to the BIM model.

[0065] like Figure 2 As shown, the system described in this embodiment includes the following four core modules: 1) Drawing preprocessing module This embodiment collects 500 construction drawings of railway bridges of different types, including simply supported beams, continuous beams, and piers. The original data was input in PDF, DWG, or scanned image formats. Image grayscale conversion, binarization, distortion correction, noise removal, and layer separation were performed on the original data. Specifically, for the complex backgrounds and multiple annotation layers commonly found in railway bridge drawings, an adaptive thresholding method and connected component analysis were used to extract clear text and annotation line areas.

[0066] In other embodiments, adaptive morphological filtering or deep learning-based denoising algorithms (such as U-Net and DenoiseNet) can be used instead of traditional binarization methods. For scanned documents, Hough transform can be introduced to detect tilt angles and achieve automatic rotation correction.

[0067] 2) OCR recognition module Based on the PaddleOCR or EZDXF library and combined with a customized training dataset, this system recognizes text, numbers, symbols, dimensions, material specifications, and table content in drawings, and outputs character sequences and their spatial position information. It adds character orientation detection, supporting the recognition of character rotation angles at 0°, 90°, 180°, and 270°, improving the recognition capability of vertical annotations and italicized notes. In some embodiments, PaddleOCR can be replaced with open-source or commercial OCR engines such as Tesseract OCR, EasyOCR, or ABBYY FineReader. If the drawing is in CAD vector format (DWG, DXF), a primitive analysis algorithm can be used to directly extract text and annotation data, replacing the optical recognition process.

[0068] In some embodiments, a multi-branch OCR model is used for text, symbols, and tables, which are independently identified in different channels and then the results are fused to improve the robustness of complex drawings.

[0069] 3) Semantic classification module Implemented using a BP neural network or a fine-tuned model based on BERT (Bidirectional Encoder Representations from Transformers).

[0070] The input includes the OCR recognition results, specifically the character content, location coordinates, font features, and proximity relationships. See Table 1 for an example dataset. The output consists of semantic labels corresponding to the characters, such as pier number, beam type, concrete grade, rebar specifications, and prestressing parameters.

[0071] Table 1. Field Design Table for the Semantic Classification Dataset of Bridge Drawings A backpropagation (BP) neural network is a multi-layer feedforward network trained using the backpropagation algorithm. Its core principle is to utilize gradient descent to minimize the sum of squared errors in the network output by continuously adjusting the weight coefficients between neurons, thereby establishing a complex nonlinear feature mapping relationship. In this embodiment, the BP neural network is mainly used for fast feature classification of short and medium-sized texts. It is responsible for receiving numerical features extracted by OCR, such as coordinate position, number of characters, and aspect ratio, and mapping them to preset engineering semantic labels. Its training parameters are set as follows: Learning rate: The initial learning rate is set to 0.0001, dynamically adjusted using the cosine annealing algorithm. Number of iterations (Epochs): Set to 200, with an Early Stopping mechanism to prevent overfitting. Batch size: 32. Its convergence metrics include the training set accuracy stabilizing after 150 iterations, and the semantic classification accuracy on the final validation set reaching over 95%.

[0072] The actions performed by the BP neural network include: 1. Input mapping: Vectorizing the text location information, font size, percentage of the bounding box, and other features recognized by OCR into input. 2. Forward propagation: Performing non-linear transformations through hidden layers to calculate the probability of each semantic category. 3. Error correction: Updating the weight parameters in reverse based on the error between the predicted result and the true label, so that the model's recognition accuracy continuously approaches the true value.

[0073] In other embodiments, the BERT model can also be used. BERT is based on the Transformer encoder structure and employs a self-attention mechanism. Unlike traditional algorithms, it can simultaneously capture both forward and backward semantic information of the text, exhibiting bidirectionality. By fine-tuning on a railway engineering-specific dataset, the model can accurately capture the implicit meaning of words in specific engineering scenarios. For example, "L" may represent "span" or "length" in different sections, thus achieving high-precision semantic classification. The BERT fine-tuning model is mainly used to handle long text annotations and annotations with strong contextual relationships. It can understand the deep semantic relationships in railway engineering terminology, compensating for the shortcomings of BP neural networks in understanding textual logic. The execution actions include: 1. Pre-trained model loading: Loading the Chinese BERT baseline model trained on a general corpus. 2. Downstream task fine-tuning: Accessing a railway bridge domain corpus and performing domain-adaptive training through the "Mask Language Model (MLM)" mechanism. 3. Semantic reasoning: Identifying long sentences such as "prestressed steel strands use 15.2mm high-strength low-relaxation steel strands" and extracting core parameters from them.

[0074] In other embodiments, the neural network, besides a backpropagation (BP) neural network, can employ a convolutional neural network (CNN), a bidirectional long short-term memory (BiLSTM) network, or a Transformer structure. For large-scale training corpora, pre-trained language models such as RoBERTa can be introduced for transfer learning.

[0075] Furthermore, the text features output by OCR can be concatenated with spatial features such as coordinates, distance, and angles. Alternatively, an attention mechanism can be used to model contextual semantic associations, thereby enhancing the semantic discrimination ability of complex annotations. Furthermore, a railway bridge knowledge graph can be constructed to store information on component types, parameter relationships, and semantic labels in a graph structure, and a graph neural network (GNN) can be used to replace the traditional backpropagation model for semantic reasoning.

[0076] 4) Parameterized mapping module The semantic recognition results are matched with railway bridge BIM standard libraries, such as the EBS coding system, to establish a mapping relationship between semantic fields and modeling parameters. Formatted data structure records are generated, containing information such as component name, geometric dimensions, material grade, and construction stage attributes. One-click generation of bridge component models is supported, enabling an automated modeling process from drawing information to 3D models, in formats such as JSON or XML. IFC (Industry Foundation Classes) or CSV formats are also supported for seamless integration with different BIM platforms.

[0077] Furthermore, the workflow of this embodiment is as follows: 1) Drawing Input and Preprocessing: Import railway bridge construction drawings into the system, perform image enhancement, layer extraction and vectorization operations to provide high-quality input for subsequent OCR recognition.

[0078] 2) OCR Recognition and Text Extraction: An improved OCR algorithm is used to recognize all text, numbers, and symbols in the drawing and record their spatial positions. The recognition results are stored in the form of {content, coordinates, font features}.

[0079] 3) Feature Extraction and Semantic Classification: Extract contextual features such as the relationship between annotation lines around the text, positional proximity, and font style, and input them into the neural network model. The model outputs semantic category labels, such as "C50" as material strength grade, "Φ25@200" as reinforcement parameters, "PZ3 pier" as structure number, and "L=32m" as beam length parameters.

[0080] 4) Parameter Mapping and Structured Generation: The system calls upon the railway bridge semantic knowledge base, matching semantic tags with corresponding BIM parameter tables to form a unified structured description file. A mapping table is established based on railway bridge design specifications and BIM coding systems (such as TB10002.1-2017) to directly convert recognition results into modeling attributes. The output module provides a configurable API interface, supporting automatic modeling calls from multiple platforms such as Revit, Civil 3D, and Bentley. It can also provide RESTful API, WebSocket, or database interfaces to ensure compatibility with different BIM modeling systems and enterprise data platforms.

[0081] The method described in this embodiment can be deployed as a desktop application, a web-based cloud service, or a local server version, adapting to different engineering project scenarios. It can be modularly combined through a microservice architecture, facilitating subsequent upgrades and expansions.

[0082] The identification method of this embodiment can extract key parameters and classify semantics of a standard bridge construction drawing within seconds, with an identification accuracy of over 95%. The identification results can directly drive the generation of BIM models, greatly improving the efficiency of information processing of construction drawings and realizing automatic connection between design and modeling stages.

[0083] This embodiment significantly enhances the overall intelligence level of railway bridge construction drawing recognition and modeling. Compared with traditional manual drawing interpretation or simple OCR text recognition methods, this embodiment combines OCR character recognition with neural network semantic understanding to form a complete intelligent recognition system. By performing contextual semantic analysis on the recognition results through neural networks, it achieves cross-level information conversion from text recognition to engineering semantic understanding, enabling computers to automatically understand the structural names, parameter meanings, and attribute types in the drawings, significantly improving the automation and intelligence level of recognition.

[0084] This embodiment achieves a semantically structured expression of drawing information. Existing OCR solutions typically output unstructured text, which still requires manual processing before use. This embodiment establishes a semantic knowledge base and parameter mapping rules for the railway bridge field, automatically converting the identified information into a structured engineering parameter table, achieving unified format management of drawings, data, and models. This structured output can directly support BIM system calls, significantly reducing the manual data processing steps.

[0085] This embodiment significantly improves recognition accuracy and adaptability. Addressing the unique layout and symbol system of railway bridge construction drawings, this embodiment introduces adaptive threshold binarization, text direction detection, and table structure recognition strategies into the OCR module, effectively handling drawings with different formats and complex backgrounds. After training with diverse samples, recognition accuracy is improved by approximately 15% to 20%, maintaining high stability, especially in key areas such as dimension annotations, material codes, and reinforcement symbols.

[0086] This embodiment demonstrates strong semantic classification capabilities and clear engineering knowledge expression. Based on a BP neural network or Transformer model, it performs semantic classification on the OCR results, not only recognizing textual content but also automatically determining its corresponding engineering semantic category. This classification method endows the system with a certain level of knowledge understanding, enabling it to automatically infer the logical relationships between fields and provide direct semantic support for parametric bridge modeling.

[0087] This embodiment achieves direct integration between drawing recognition and BIM modeling. The output data format is compatible with the standard coding of railway bridge BIM systems (such as the EBS coding system) and can be directly called by modeling platforms such as Revit, Civil 3D, or Bentley. Compared with traditional manual data entry or intermediate file conversion methods, this embodiment realizes an automated process from drawing recognition to 3D model generation, significantly reducing the modeling cycle and manpower input.

[0088] This embodiment boasts strong scalability and versatility, providing an extensible interface system and semantic mapping rules that can be quickly adapted to different bridge types or mapping standards. It can also be extended to other railway structure identification tasks such as tunnels and roadbeds. This characteristic gives this embodiment excellent versatility and engineering application value.

[0089] This embodiment demonstrates a significant improvement in quantification performance. In a typical railway bridge construction drawing recognition experiment, compared to traditional OCR recognition, the overall recognition accuracy increased to over 95%, parametric modeling preparation time was reduced by approximately 80%, manual intervention was reduced by approximately 70%, and the data format conversion error rate decreased to below 2%. Substantial improvements were achieved in recognition accuracy, automation level, and data flow efficiency.

[0090] Therefore, this embodiment is significantly superior to existing technologies in terms of recognition accuracy, semantic intelligence, structured output, cross-platform modeling integration, and system scalability, and can provide key technical support for the digital, automated, and intelligent processing of railway bridge construction drawings.

[0091] Corresponding to the above method, the present invention also provides an apparatus / system including a computer device, the computer device including a processor and a memory, the memory storing computer instructions, the processor executing the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the apparatus / system performs the steps of the method as described above.

[0092] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.

[0093] In summary, the present invention provides a method and system for visual semantic extraction and BIM parameterization of railway bridge construction drawings. First, the railway bridge construction drawings undergo image preprocessing. Then, an optical character recognition model optimized for railway bridge scenarios is used to recognize characters, extracting character sequences and corresponding font features, spatial coordinates, and character orientation. Next, the proximity between characters is calculated based on their spatial coordinates and orientations, extracting related characters with annotation associations. Subsequently, the multi-dimensional features of the characters and related characters are input into a pre-trained semantic classification model to complete the semantic classification of attributes such as component name, geometric dimensions, material grade, and construction stage. Finally, the classification results are matched and mapped with the railway bridge BIM standard library to generate structured construction information and output it through a preset interface, providing data support for automated BIM modeling. The optimized OCR model in this invention improves character recognition accuracy under complex layouts, the proximity calculation restores the engineering logical associations of drawing annotations, the semantic classification model realizes the engineering semantic parsing of characters, and the direct mapping with the BIM standard library establishes a data link from two-dimensional drawings to three-dimensional BIM modeling, achieving automated conversion of drawing information into structured construction parameters. It significantly reduces the amount of manual intervention, greatly improves the efficiency of drawing information extraction and the level of BIM modeling automation, ensures the accuracy and consistency of engineering data, and provides reliable technical support for the information management, digital twin construction and full-process digital control of railway bridge engineering.

[0094] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.

[0095] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.

[0096] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.

[0097] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for visual semantic extraction and BIM parameterization of railway bridge construction drawings, characterized in that, The method includes the following steps: Image preprocessing is performed on the railway bridge construction drawings to be analyzed, which are formatted for individual building components. Then, an optical character recognition model optimized for railway bridge construction drawings is used to recognize the characters in the railway bridge construction drawings to be analyzed, and the character sequence and the font features, spatial coordinates and character orientation of each character are extracted. The proximity between characters is calculated according to the spatial coordinates and orientation of each character in the character sequence according to a preset rule, and related characters that have a labeling relationship with each character are extracted based on the proximity. The font features, spatial coordinates, and character orientation of each individual character in the character sequence and its corresponding related characters are input into a pre-trained semantic classification model to extract semantic labels for each character and complete attribute classification. The attribute classification includes component name, geometric dimensions, material grade, and construction stage. The attribute classification results of each character in the character sequence are matched with the railway bridge BIM standard library and a mapping is established to generate structured construction information containing the component name, geometric dimensions, material grade and construction stage, and provided to the outside world through a preset interface for automated BIM model construction.

2. The railway bridge construction drawing visual semantic extraction and BIM parameterization method according to claim 1, characterized in that, Image preprocessing is performed on the railway bridge construction drawings to be analyzed in a specified format, including: Convert the original railway bridge construction drawings to be analyzed into standard image formats such as JPG, PNG, or TIFF, and perform grayscale conversion, binarization, distortion correction, noise reduction, and layer separation. The distortion correction includes tilt correction using probabilistic Hough line transform and perspective distortion correction using perspective transformation algorithm; the denoising uses median filtering or bilateral filtering; and the layer separation uses adaptive thresholding and connected component analysis.

3. The railway bridge construction drawing visual semantic extraction and BIM parameterization method according to claim 1, characterized in that, The optimization steps of the optical character recognition model include: Obtain a first training sample set containing railway bridge construction drawing samples in multiple image formats. Each railway bridge construction drawing sample is labeled with the position coordinates, character direction, text content, and font features of the sample characters as labels. The initial optical character recognition model is trained by sampling the first training sample set. The initial optical character recognition model adopts the PP-OCR v4 model, which includes a text detection module, a text direction classification module, and a text recognition module. The text detection module takes the railway bridge construction drawing sample as input and outputs a first predicted value for the position coordinates of the sample characters. The text direction classification module takes the image of the first predicted value portion as input and outputs a second predicted value for the character direction. The text recognition module takes the image of the first predicted value portion as input and outputs a third predicted value for the text content and font features. Based on the deviations of the first predicted value, the second predicted value, and the third predicted value from the label, a loss is constructed, and the parameters of the initial optical character recognition model are updated to obtain the optical character recognition model.

4. The railway bridge construction drawing visual semantic extraction and BIM parameterization method according to claim 3, characterized in that, The method further includes rotating, scaling, blurring, and adding noise to the railway bridge construction drawing samples in the first training sample set to expand the data scale.

5. The railway bridge construction drawing visual semantic extraction and BIM parameterization method according to claim 1, characterized in that, Based on the spatial coordinates and orientation of each character in the character sequence, the proximity between characters is calculated according to a preset rule. Then, based on the proximity, related characters with a labeled relationship to each character are extracted, including: The distance between the center points of each character is calculated based on the spatial position coordinates of each character, and the spatial distance proximity is obtained by assigning a score based on the first preset value range. The directional difference between each character is calculated based on the character direction of each character, and the character directional proximity is obtained by assigning a score based on the second preset value range. Based on the spatial coordinates of each character, determine whether the characters are horizontally or vertically aligned, and assign a score to obtain the layout relevance proximity. The proximity is obtained by weighting and summing the spatial distance proximity, the character directional proximity, and the layout correlation proximity between each character; For each character, extract the set number of characters with the highest proximity as related characters.

6. The railway bridge construction drawing visual semantic extraction and BIM parameterization method according to claim 1, characterized in that, The pre-training steps of the semantic classification model include: Obtain a second training sample set containing multiple samples. Each sample contains a single sample character extracted from the railway bridge construction drawing sample and the font features, spatial coordinates, and character direction of the corresponding related character, and annotate the semantic labels of the sample character attribute classification. The initial semantic classification model is trained using the second training sample set. The input is the font features, spatial coordinates and character direction of the sample characters and their corresponding related characters in the sample. The output is a fourth predicted value for classifying the attribute of the sample characters. The loss is constructed based on the deviation between the fourth predicted value and the semantic label to update the parameters of the initial semantic classification model, thereby obtaining the semantic classification model. The initial semantic classification model uses a BP neural network or a BERT model.

7. The method for visual semantic extraction and BIM parameterization of railway bridge construction drawings according to claim 6, characterized in that, The initial semantic classification model was trained using the second training sample set, with the initial learning rate set to 0.0001 and dynamically adjusted based on the cosine annealing algorithm. 8.A railway bridge construction drawing visual semantic extraction and BIM parameterization device, comprising a processor, a memory and a computer program or instructions stored on the memory, characterized in that, The processor is used to execute the computer program or instructions, and when the computer program / instructions are executed, the device implements the steps of the method as described in any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.