Method and device for data structuring of railway signal diagrams

By automating the analysis and recognition of railway signal diagrams, the problem of low efficiency in manual processing has been solved, and efficient and accurate data structuring processing of railway signal diagrams has been achieved, adapting to the informatization development of the railway industry.

CN122432236APending Publication Date: 2026-07-21BEIJING HOLLYSYS
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING HOLLYSYS
Filing Date
2026-03-05
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing technologies, the information processing of railway signal diagrams relies on manual operation, which is inefficient and difficult to guarantee accuracy, and cannot meet the needs of the railway industry's informatization and intelligent development.

Method used

An automated data structuring process is employed, including parsing railway signal maps, identifying graphic elements, tables, and kilometer marker information, and converting them into standardized structured data. An improved Grounding DINO model and an OCR engine are used for automatic identification of graphic elements and table information.

Benefits of technology

It has enabled efficient and accurate automated processing of railway signal diagrams, reduced human error, improved the efficiency and accuracy of data structure processing, and met the informatization development needs of the railway industry.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122432236A_ABST
    Figure CN122432236A_ABST
Patent Text Reader

Abstract

The application discloses a data structured processing method and device of a railway signal diagram, and relates to the technical field of railway signal systems. The method comprises the following steps: acquiring a railway signal diagram; analyzing the railway signal diagram according to the format of the railway signal diagram to obtain a first intermediate data set; the first intermediate data set comprises all objects in the railway signal diagram and related information of the objects; according to the format of the railway signal diagram, a corresponding preset processing strategy is adopted to identify the first intermediate data set to obtain identification results of diagram element information, table information and kilometer marker information of the railway signal diagram; and the identification results of the diagram element information, the table information and the kilometer marker information are respectively converted into standardized structure data output. The scheme provided by the embodiment can effectively improve the accuracy of data structured processing of the railway signal diagram and reduce manual errors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This article relates to the field of railway signaling system technology, and in particular to a method and apparatus for structuring railway signal diagrams. Background Technology

[0002] In railway transportation systems, railway signal diagrams serve as crucial references for the planning, design, construction, and maintenance management of signaling equipment. These diagrams contain a wealth of information, such as the location, connection relationships, and technical parameters of equipment like signals, track circuits, and turnouts. Accurate and efficient information extraction and management are of paramount importance for ensuring railway transportation safety and improving operational efficiency.

[0003] Currently, the processing of element information in railway signal diagrams generally relies on manual reconstruction by comparing them with design institute drawings. This traditional method has many drawbacks. First, manual operation is extremely inefficient. Due to the complexity and numerous elements in railway signal diagrams, technicians need to spend a significant amount of time and energy identifying, recording, and organizing each element, severely impacting work progress. Second, the accuracy of manual operation is difficult to guarantee. Prolonged repetitive work can easily lead to technician fatigue, resulting in errors and omissions in information recording, posing safety hazards to subsequent maintenance and management of railway signal equipment. Furthermore, with the rapid development of railway construction, the number and scale of railway signal diagrams are constantly expanding, and manual processing methods can no longer meet the ever-increasing information processing demands and cannot adapt to the trend of informatization and intelligentization in the railway industry. Therefore, there is an urgent need for an automated, efficient, and accurate technical means to achieve rapid extraction and structured processing of element information in railway signal diagrams, thereby improving the overall level and efficiency of railway signal diagram management. Summary of the Invention

[0004] This application provides a method and apparatus for structuring railway signal map data, which can significantly improve the efficiency and accuracy of structuring railway signal map data.

[0005] One embodiment of this application provides a method for structuring railway signal maps, including: Obtain railway signal diagrams; According to the format of the railway signal diagram, the railway signal diagram is parsed to obtain a first intermediate dataset; the first intermediate dataset includes all objects in the railway signal diagram and their related information; Based on the format of the railway signal map, a corresponding preset processing strategy is adopted to identify the objects and related information in the first intermediate dataset, and to obtain the identification results of the graphic element information, table information and kilometer marker information of the railway signal map. The identification results of the graphic element information, the table information, and the kilometer marker information are respectively converted into standardized structured data output.

[0006] In one exemplary embodiment, parsing the railway signal diagram according to its format to obtain a first intermediate dataset includes: If the railway signal diagram is in DXF format, then the model space of the railway signal diagram is traversed and all objects contained in the railway signal diagram are extracted; the types of the objects include primitives, text, lines, and block references; For each object contained in the railway signal diagram, the following parsing operations are performed: determine the type of the object based on the name of the layer in which the object is located; extract the attribute information corresponding to the object based on the object type, and convert the coordinates in the corresponding attribute information of the object into absolute coordinates; The first intermediate dataset is determined based on all objects and their attribute information in the railway signal diagram; or... If the railway signal diagram is in PDF format, the railway signal diagram is converted into a first image, and the first image is analyzed using an OCR engine to obtain all text objects in the railway signal diagram and their position coordinates. The first image is identified using a preset layout analysis model to obtain the table area coordinates and structural information of all table objects in the railway signal diagram; the structural information includes the distribution of table rows, columns, and merged cells. The first intermediate dataset is determined based on the first image, all text objects and their position coordinates in the railway signal diagram, and all table objects and their table area coordinates and structural information.

[0007] In one exemplary embodiment, after acquiring the railway signal diagram and before parsing the railway signal diagram according to its format, the method further includes: if the railway signal diagram is in DWG format, then converting the railway signal diagram to DXF format; Before traversing the model space of the railway signal diagram, the method further includes performing any one or more of the following vector graphics preprocessing operations on the railway signal diagram: format verification, redundant data cleaning, coordinate system one; After converting the railway signal map into a first image, and before analyzing the first image using an OCR engine, the method further includes performing any one or more of the following image preprocessing operations on the first image: denoising, binarization, tilt correction, and edge enhancement.

[0008] In one exemplary embodiment, the step of identifying objects and their related information in the first intermediate dataset according to the format of the railway signal map and employing a corresponding preset processing strategy to obtain the identification result of the primitive information of the railway signal map includes: If the railway signal map is in DXF format, then objects contained in non-standard layers in the first intermediate dataset are filtered out; for each object in the filtered first intermediate dataset, the following operations are performed: The object's geometry is subjected to a Hough transform to extract a first feature. The first feature is then compared with the primitive features stored in a preset primitive feature library to determine the primitive type of the object. The primitive feature library contains primitive types and one or more of the following features: geometric shape, layer naming rules, and associated attribute blocks. Extract the first text object within a first distance region surrounding the object, and verify the object's primitive type based on the primitive number contained in the first text object; if the verification is successful, annotate the object using the standard semantic label corresponding to the object's primitive type to obtain the recognition result of the primitive information; or, If the railway signal map is in PDF format, the first image and the pre-constructed prompts are input into a pre-trained improved Grounding DINO model for processing to obtain all primitive objects contained in the railway signal map, their bounding boxes, types, and confidence scores, which serve as the recognition results of the primitive information.

[0009] In one exemplary embodiment, the pre-trained improved Grounding DINO model is obtained through the following method: In the feature enhancer of the Grounding DINO model, convolutional block attention layers (CBAMs) are concatenated in the text branch and the image branch after the FFN layer to obtain the improved Grounding DINO model. A training image set is acquired, and the improved Grounding DINO model to be trained is subjected to two-stage fine-tuning training based on transfer learning. The training includes: in the first stage, the text encoder is frozen, and only the visual encoder and cross-modal fusion module are trained; in the second stage, all parameters are unfrozen and end-to-end fine-tuning is performed. During training, a joint loss function including bounding box regression loss and class prediction loss is used, wherein the bounding box regression loss includes at least L1 loss and GIoU loss. A focus loss is used to increase attention to hard and small samples, and the AdamW optimizer and progressive learning rate scheduling strategy are used to update the parameters. After the model converges, the pre-trained improved Grounding DINO model is obtained.

[0010] In one exemplary embodiment, the step of identifying objects and their related information in the first intermediate dataset according to the format of the railway signal map and employing a corresponding preset processing strategy to obtain the identification result of the table information of the railway signal map includes: If the railway signal diagram is in DXF format, then from the line objects in the first intermediate dataset, based on layer features, line type features, and continuity features, the set of border lines of the first table is identified; wherein, the layer features include the table being located in a preset table layer; the line type features include the table border lines being continuous and the line width not less than a preset threshold; the continuity features include: if the distance between the endpoints of two lines is not greater than a preset endpoint distance threshold, they are determined to be connected; For the lines in the set of border lines, Hough transform is used to extract horizontal and vertical lines, and a clustering algorithm is used to merge approximately parallel lines with an included angle of less than a preset angle to determine the outer border lines and internal dividing lines of the first table. A grid matrix is ​​generated based on the intersection coordinates of the horizontal and vertical lines, and merged cells in the first table are identified by the continuity feature of the internal dividing lines; wherein, the set of row coordinates of the grid matrix is ​​Y=[y1,y2,…,yn], the set of column coordinates is X=[x1,x2,…,xm], and the cells in the grid matrix refer to the rectangular area from (xi,yj) to (xi+1,yj+1); For each text object in the first intermediate dataset, the spatial inclusion relationship between the text object and the rectangular area of ​​the cell in the grid matrix is ​​determined based on the position coordinates or center point coordinates in the attribute information of the text object, and the text object is associated with the corresponding cell according to the spatial inclusion relationship. For the header of each column in the first table, keyword matching is performed based on a preset standard header set to determine the column semantics. Alternatively, if the header is missing, the column semantics of the header are determined based on the location of the first table and the text object associated with the cell in that column. And logical relationships between rows are established based on the uniqueness of the device number. Based on the matching results between the first table and its cells and text objects, a mapping relationship between rows, columns, and text objects is established as the recognition result of the table information; or... If the railway signal diagram is in PDF format, then for each second table in the first intermediate dataset, extract the text objects within the coordinate range of its table area, and based on the structural information of the second table, associate the text objects within the coordinate range of the row and column boundaries with the corresponding cells, and establish the mapping relationship between the rows, columns, and text objects of the second table as the recognition result of the table information.

[0011] In one exemplary embodiment, the step of identifying objects and their related information in the first intermediate dataset according to the format of the railway signal map and employing a corresponding preset processing strategy to obtain the identification result of the kilometer marker information of the railway signal map includes: If the railway signal map is in DXF format, the first dataset is generated based on the text objects and their corresponding position coordinates in the first intermediate dataset, as well as the text objects and their corresponding position coordinates obtained after recursively parsing the block reference objects; or, if the railway signal map is in PDF format, the first dataset is generated based on the text objects and their corresponding position coordinates in the first intermediate dataset. From the text objects in the first dataset, central stations are selected based on a preset set of central station names, and the point with the largest Y value in the central station location coordinates is taken as the central station reference coordinate. From the text objects in the first dataset, text objects with content of 0 are selected as zero points, and the coordinates of the zero point positions are used as the zero point coordinates for mileage calculation. Based on the location coordinates of the central station, within a preset kilometer marker distance threshold, text objects are selected from a preset set of kilometer marker names and used as the reference kilometer markers for the central station. Based on the central station's reference coordinates, the Y-axis coordinates of text objects located above the central station's Y-coordinate are selected, and K-Means clustering algorithm is used to group them to obtain text grouping recognition results; For each text group in the text group recognition result, a device is matched from the text objects in the text group based on a preset set of device names, and the distance value corresponding to the device is matched according to a preset device distance threshold. Based on the relative position of the device's location coordinates and the zero point coordinates on the x-axis, and the distance value corresponding to the device, the actual kilometer marker corresponding to the device is determined, and the rationality of the calculation result is verified by a preset rule to obtain the recognition result of the kilometer marker information.

[0012] In one exemplary embodiment, determining the actual kilometer marker corresponding to the device based on the relative position of the device's location coordinates and the zero-point coordinates on the x-axis, and the corresponding distance value of the device, includes: If the x-coordinate of the device is less than or equal to the x-coordinate of the zero point, then the actual kilometer marker of the device is the difference between the distance value of the central station's reference kilometer marker and the distance value corresponding to the device. If the x-coordinate of the device is less than or equal to the x-coordinate of the zero point, then the actual kilometer marker of the device is the sum of the distance values ​​between the central station's reference kilometer marker and the distance corresponding to the device.

[0013] In one exemplary embodiment, the identification results of the primitive information, the table information, and the kilometer marker information are respectively converted into standardized structured data output: Based on the primitive objects in the recognition results of the primitive information and the line objects in the first intermediate dataset, a coordinate-based topological relationship model is constructed and output; wherein, in the topological relationship model, nodes represent primitive objects, and edges represent the connection between two primitive objects corresponding to nodes through lines; Based on the recognition results of the table information, the mapping relationship of rows, columns and text objects contained in each table is converted into a two-dimensional data table structure and output; Based on the identification results of the kilometer marker information, a data structure relating the device, the actual kilometer marker, and the location coordinates is generated and output for each device.

[0014] In another embodiment of this application, a data structuring processing apparatus for railway signal diagrams is provided, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to perform the data structuring processing method for railway signal diagrams as described above.

[0015] The technical solutions provided by the embodiments of this application can effectively improve the accuracy of data structuring processing of railway signal diagrams and reduce human error.

[0016] Other features and advantages of this application will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the application. Other advantages of this application can be realized and obtained by means of the embodiments described in the description and the accompanying drawings. Attached Figure Description

[0017] The accompanying drawings are used to provide an understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0018] Figure 1 A flowchart illustrating a data structuring method for railway signal maps provided in this application embodiment; Figure 2 A schematic diagram of the improved Grounding DINO large model structure provided in the embodiments of this application; Figure 3 This is a schematic diagram of a data structuring processing device for railway signal maps provided in an embodiment of this application. Detailed Implementation

[0019] This application describes several embodiments, but these descriptions are exemplary and not limiting, and it will be apparent to those skilled in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with, or may replace, any feature or element of any other embodiment.

[0020] This application includes and contemplates combinations of features and elements known to those skilled in the art. The embodiments, features, and elements disclosed in this application can also be combined with any conventional features or elements to form unique inventive solutions. Any feature or element of any embodiment can also be combined with features or elements from other inventive solutions to form another unique inventive solution. Therefore, it should be understood that any feature shown and / or discussed in this application can be implemented individually or in any suitable combination. Therefore, the embodiments are not limited except by the limitations imposed by the appended claims and their equivalents. Furthermore, various modifications and changes can be made within the scope of the appended claims.

[0021] Furthermore, in describing representative embodiments, the specification may have presented methods and / or processes as a specific sequence of steps. However, the method or process should not be limited to the specific order of steps described herein, to the extent that it does not depend on such a specific order. As will be understood by those skilled in the art, other sequences of steps are also possible. Therefore, the specific order of steps set forth in the specification should not be construed as a limitation of the claims. Moreover, the claims concerning the method and / or process should not be limited to the steps performed in the written order, and those skilled in the art will readily understand that these orders can be varied and still remain within the spirit and scope of the embodiments of this application.

[0022] Figure 1 This illustration shows a flowchart of a data structuring method for railway signal maps according to an embodiment of this application, as shown below. Figure 1 As shown, the method includes: Step 100: Obtain the railway signal diagram; Step 101: Parse the railway signal diagram according to its format to obtain a first intermediate dataset; the first intermediate dataset includes all objects in the railway signal diagram and their related information; Step 102: Based on the format of the railway signal map, adopt the corresponding preset processing strategy to identify the objects and related information in the first intermediate dataset, and obtain the identification results of the graphic element information, table information and kilometer marker information of the railway signal map; Step 103: Convert the identification results of the graphic element information, the table information and the kilometer marker information into standardized structured data output respectively.

[0023] The railway signal map data structuring method provided in this embodiment, after acquiring the railway signal map, firstly parses and extracts the objects and related information in the railway signal map according to its format, obtaining a first intermediate dataset. Then, according to the railway signal map format, it adopts a corresponding preset processing strategy to identify the objects and related information in the first intermediate dataset, obtaining the identification results of the railway signal map's element information, table information, and kilometer marker information, and converting them into standardized structured data output. This realizes an end-to-end closed-loop automated processing flow from railway signal map file parsing to structured data output. The intelligent railway signal map processing method constructed in this embodiment achieves full-process automation from automatic parsing of railway signal map files to automatic identification of element information, table information, and kilometer marker information, and then to structured data generation. It can effectively reduce manual processing errors, significantly improve the accuracy of railway signal map data structuring processing, and overcome the technical difficulties of low efficiency and low accuracy of manual data extraction.

[0024] In one exemplary embodiment, parsing the railway signal diagram according to its format to obtain a first intermediate dataset includes: If the railway signal diagram is in DXF format, then the model space of the railway signal diagram is traversed and all objects contained in the railway signal diagram are extracted; the types of the objects include primitives, text, lines, and block references; In this embodiment, the underlying data of the DXF file can be parsed based on the ezdxf library. All objects contained in the file can be obtained by traversing the modelspace of the DXF file, such as LINE (line segment), LWPOLYLINE (polyline), TEXT (text), MTEXT (multiline text), BLOCK (block reference), etc.

[0025] For each object contained in the railway signal diagram, the following parsing operations are performed: determine the type of the object based on the name of the layer in which the object is located; extract the attribute information corresponding to the object based on the object type, and convert the coordinates in the corresponding attribute information of the object into absolute coordinates; The first intermediate dataset is determined based on all objects and their attribute information in the railway signal diagram; In this embodiment, the layer naming convention of railway signal CAD can be used (such as "XHJ" representing signal and "GC" representing track) to classify objects according to the name of the layer in which the object is located, thereby reducing cross-layer interference (such as filtering non-critical objects in the "auxiliary line" layer).

[0026] The attribute information of an object can include geometric attributes (such as the start / end coordinates of a line segment, the center / radius of a circle, and the insertion point coordinates of text) and non-geometric attributes (such as layer name, color code, line type, text content, and the name and scaling of a block reference), serving as the basic data for subsequent recognition processes. The attribute information extraction process can include: extracting start / end coordinates and line type for line objects; extracting content, insertion point, and rotation angle for text objects; and extracting block name, scaling, and associated attributes for block references. In one exemplary embodiment, after converting the coordinates in the corresponding attribute information of the object into absolute coordinates, the derived parameters of the object (such as line segment length, polygon area, and text bounding box) can be further calculated for subsequent recognition processing.

[0027] If the railway signal diagram is in PDF format, the railway signal diagram is converted into a first image, and the first image is analyzed using an OCR engine to obtain all text objects in the railway signal diagram and their position coordinates. In this embodiment, the PaddleOCR engine can be used to perform full-image text recognition on the first image, outputting all text objects, confidence scores, and corresponding pixel coordinates. The OCR recognition model can be optimized for railway signal-specific terminology (such as "DK123+456" and "S1 signal") to ensure a text recognition accuracy of ≥95%.

[0028] The first image is identified using a preset layout analysis model to obtain the table area coordinates and structural information of all table objects in the railway signal diagram; the structural information includes the distribution of table rows, columns, and merged cells. The first intermediate dataset is determined based on the first image, all text objects and their position coordinates in the railway signal diagram, and all table objects and their table area coordinates and structural information.

[0029] In this embodiment, the PaddleX layout analysis model can be used to identify table objects in the first image and output the position coordinates and structural information of the table area (such as row, number, and distribution of merged cells), providing a positioning and structural benchmark for subsequent extraction of table structure and content.

[0030] In one exemplary embodiment, after acquiring the railway signal diagram and before parsing the railway signal diagram according to its format, the method further includes: if the railway signal diagram is in DWG format, then converting the railway signal diagram to DXF format; Before traversing the model space of the railway signal diagram, the method further includes performing any one or more of the following vector graphics preprocessing operations on the railway signal diagram: format verification, redundant data cleaning, coordinate system one; In this embodiment, if the railway signal diagram is a DWG file, it can be converted into a DXF file using ODA File Converter. Furthermore, the ezdxf library can be used to load the DXF file and perform preprocessing operations such as format verification (version compatibility, layer integrity), redundant data cleaning (invalid empty layers, duplicate entities), coordinate system unification (converting to the global coordinate system of the drawing), and outputting intermediate sets of vector entities.

[0031] After converting the railway signal map into a first image, and before analyzing the first image using an OCR engine, the method further includes performing any one or more of the following image preprocessing operations on the first image: denoising, binarization, tilt correction, and edge enhancement.

[0032] In this embodiment, before performing OCR recognition, the first image obtained by converting the railway signal map in PDF format can be denoised (Gaussian filtering), binarized, tilted, and edge enhanced to optimize the quality of the first image and improve the accuracy of subsequent recognition.

[0033] The technical solution provided in this embodiment fully supports the three mainstream formats of railway signal drawings: DWG, DXF, and PDF, covering a wide range of formats. Furthermore, it adapts to the processing needs of different drawing formats through differentiated processing methods, eliminating the need for additional format conversion tools and demonstrating strong adaptability.

[0034] In one exemplary embodiment, the step of identifying objects and their related information in the first intermediate dataset according to the format of the railway signal map and employing a corresponding preset processing strategy to obtain the identification result of the primitive information of the railway signal map includes: If the railway signal map is in DXF format, then objects contained in non-standard layers in the first intermediate dataset are filtered out; for each object in the filtered first intermediate dataset, the following operations are performed: In this embodiment, only objects in industry standard layers (such as "XHJ layer" and "DC layer") can be retained to reduce interference from irrelevant objects.

[0035] The object's geometry is subjected to a Hough transform to extract a first feature. The first feature is then compared with the primitive features stored in a preset primitive feature library to determine the primitive type of the object. The primitive feature library contains primitive types and one or more of the following features: geometric shape, layer naming rules, and associated attribute blocks. In this embodiment, the first feature of the object, such as line angle and length, can be extracted by Hough transform, and similarity calculation can be performed with the primitive features in the feature library. For example, the matching degree of the three-line angle of the turnout is ≥85%, so as to determine the primitive type of the object.

[0036] Among them, the industry-specific graphic element feature library can be built and define feature templates for core graphic elements based on the "Railway Signaling Design Specification", for example: Signal: It consists of "circular / square block reference (block name contains 'XHJ') + red / blue lines + associated text (such as 'S1')", and the geometric dimensions conform to the drawing scale of 1:500 or 1:1000; Turnout: It consists of "three sets of intersecting polylines (with an included angle of 30°±5°) + block reference (block name contains 'DC') + numbered text (such as '1#')", with the length ratio of the main line to the siding being 3:1; Track circuit: It consists of "two parallel polysegment lines (5-10mm apart, corresponding to 1-2m in actual length) + section number text (such as 'G1')" and is parallel to the route.

[0037] For specialized graphic elements in railway signaling, such as signal lights, track circuits, turnouts, and insulating joints, accurate identification and extraction can be achieved through a pre-set graphic element feature library (including features such as geometric shapes, layer naming rules, and associated attribute blocks). Extract the first text object within a first distance region surrounding the object, and verify the object's primitive type based on the primitive number contained in the first text object; if the verification is successful, use the standard semantic label corresponding to the object's primitive type to label the object, and obtain the recognition result of the primitive information.

[0038] In this embodiment, for an object whose graphic element type is determined, text objects within a first distance (e.g., 50mm) around the object can be further extracted, and it can be verified whether the extracted text objects contain graphic element numbers (e.g., signal text contains the prefix "S"), so as to improve the accuracy of graphic element recognition.

[0039] For successfully identified graphic elements, semantic labels can be added according to industry standards, for example: Signal: Type (entry / exit), number, coordinates, and section; Turnout: Number, direction of travel (left / right), frog number, connecting track number.

[0040] If the railway signal map is in PDF format, the first image and the pre-constructed prompts are input into a pre-trained improved Grounding DINO model for processing to obtain all primitive objects contained in the railway signal map, their bounding boxes, types, and confidence scores, which serve as the recognition results of the primitive information.

[0041] In this embodiment, for the first image converted from the PDF drawing, text prompts tailored to the professional characteristics of railway signaling elements are designed. An improved Grounding DINO large model target detection technique is used to identify the graphic element objects, outputting results including bounding boxes, category labels, and confidence scores. This achieves automated extraction of railway signaling-specific graphic elements. The specific process is as follows: The first image of the railway signal map and pre-constructed text prompts are simultaneously input into a pre-trained improved Grounding DINO model. The model employs cross-modal reasoning and an attention-based query selection strategy, prioritizing regions highly relevant to the text description as candidate detection results. It outputs the bounding boxes, confidence scores, and similarity scores between the bounding boxes, confidence scores, and text prompts of the primitive objects in the image. Based on these similarity scores, a primitive category label is assigned to each detected primitive. A non-maximum suppression (NMS) strategy is used to eliminate redundant detection boxes with high overlap, ensuring that each primitive object corresponds to only one bounding box. To address the dense arrangement of primitive objects in railway signal maps, the overlap threshold of NMS is adjusted to strike a balance between preventing missed detections and reducing duplicate detections. In one exemplary embodiment, the initial results output by the model can be logically verified using industry standards for railway signal maps, such as the fact that signals are typically located beside the tracks and switches are located at track intersections. Prior knowledge is used to correct obviously erroneous detection results, improving the accuracy of recognition. Finally, by combining the geometric features of the primitives with contextual verification to filter out low-quality results, and using a coordinate mapping table to convert pixel coordinates into the global coordinate system of the drawing to achieve accurate positioning, and supplementing semantic information output, we can achieve efficient and accurate extraction of railway signal primitives in PDF, while taking into account both speed and accuracy.

[0042] In one exemplary embodiment, the pre-trained improved Grounding DINO model is obtained through the following method: In the feature enhancer of the Grounding DINO model, convolutional block attention layers (CBAMs) are concatenated in the text branch and the image branch after the FFN layer to obtain the improved Grounding DINO model. A training image set is acquired, and the improved Grounding DINO model to be trained is subjected to two-stage fine-tuning training based on transfer learning. The training includes: in the first stage, the text encoder is frozen, and only the visual encoder and cross-modal fusion module are trained; in the second stage, all parameters are unfrozen and end-to-end fine-tuning is performed. During training, a joint loss function including bounding box regression loss and class prediction loss is used, wherein the bounding box regression loss includes at least L1 loss and GIoU (Generalized Intersection over Union) loss. A focus loss is used to increase attention to hard and small samples, and the AdamW optimizer and progressive learning rate scheduling strategy are used to update the parameters. After the model converges, the pre-trained improved Grounding DINO model is obtained.

[0043] In this embodiment, the improved Grounding DINO model designed for extracting special graphic elements from railway signal drawings can be constructed using the following method: Data preparation and preprocessing: The data preparation and preprocessing stage aims to provide high-quality railway signal map images and corresponding annotation information as a training image set for model training and inference. This stage includes three key steps: 1) Railway Signal Drawing Collection and Digitization: Acquire railway signaling drawings, including scanned copies of historical drawings, CAD electronic drawings, and drawings from actual engineering projects. To ensure drawing quality, image preprocessing techniques are used to denoise, enhance contrast, and correct distortion in scanned drawings, eliminating interference caused by aging drawings and scanning quality issues. The drawings are then uniformly converted to a standard format and categorized and stored according to different lines and periods, establishing a dedicated database of railway signaling drawings.

[0044] 2) Drawing Image Enhancement and Annotation Standardization: Various data enhancement techniques, such as data augmentation and environmental interference, are employed to process the input image data, enriching the features of the sample data. By rotating, scaling, adjusting colors, and performing affine transformations on the drawing images, data diversity is increased, improving the model's generalization ability. Simultaneously, annotation standards are established based on prior knowledge, defining annotation standards for multiple core graphic elements such as "signals," "track circuits," "turnouts," and "insulating joints," ensuring annotation consistency.

[0045] 3) Text Prompt Design and Construction: A structured prompt template was designed to address the specialized characteristics of railway signal drawings. Clause-level text feature extraction technology was employed, with the prompt format designed as "signal machine. track circuit. turnout. insulation joint," using periods as separators to ensure the independence of feature extraction for each category. Furthermore, to address potential aliases for graphic elements in different drawings, a thesaurus was constructed; for example, "switch machine" can be mapped to "turnout," enhancing the model's understanding of technical terminology.

[0046] After obtaining the training image set, the improved Grounding DINO model is constructed and trained to create a dedicated model suitable for primitive detection in railway signal drawings. Detection performance is enhanced through transfer learning and targeted improvements. The specific process includes: Improved construction of the Grounding DINO model: like Figure 2 As shown, a dual-encoder-single-decoder architecture is constructed based on the open-source Grounding DINO framework. The image encoder uses the Swin Transformer to adapt to multi-scale feature extraction from railway signaling images; the text encoder uses the BERT model to handle the semantic understanding of railway signaling terminology. Targeting the characteristics of railway signaling drawings, the GroundingDINO model is improved by introducing a Convolutional Attention Module (CBAM) in the feature enhancement stage to enhance the model's attention to detailed features of the drawings. The improved Grounding DINO model enables a language-guided query selection mechanism, using text features to select the most relevant regions from image features as candidate queries. By calculating the similarity between image and text features, the top-k most relevant image features are selected as the initial values ​​for the decoder query. In the cross-modal decoder, a self-attention layer, an image cross-attention layer, and a text cross-attention layer are integrated to fully integrate visual and linguistic information in the query vector. Through multi-layer cross-modal decoding, the position and size of the predicted bounding box are progressively refined.

[0047] Model training and optimization: A transfer learning strategy was adopted, first pre-training the model on a large general dataset, and then fine-tuning it on a dedicated training image set for railway signal drawings. The training process consisted of two phases: first, the text encoder was frozen, and only the visual encoder and cross-modal fusion module were trained; then, all parameters were unfrozen for end-to-end fine-tuning. Visual analysis of the model's intermediate layer features verified whether the model focused on the correct primitive regions, ensuring the reliability of the detection process. The model's loss function was set to combine bounding box regression loss (GLOU loss and L1 loss) and class prediction loss (contrastive learning loss), balancing the weights of each loss through multi-task learning. To address the class imbalance problem in railway signal drawings, focal loss was used to increase attention to hard and small samples. The model optimization process used the AdamW optimizer with a progressive learning rate scheduling strategy to ensure stable convergence.

[0048] In one exemplary embodiment, the step of identifying objects and their related information in the first intermediate dataset according to the format of the railway signal map and employing a corresponding preset processing strategy to obtain the identification result of the table information of the railway signal map includes: If the railway signal diagram is in DXF format, then from the line objects in the first intermediate dataset, based on layer features, line type features, and continuity features, the set of border lines of the first table is identified; wherein, the layer features include the table being located in a preset table layer; the line type features include the table border lines being continuous and the line width not less than a preset threshold; the continuity features include: if the distance between the endpoints of two lines is not greater than a preset endpoint distance threshold, they are determined to be connected; In this embodiment, table borders are identified from line objects in the first intermediate dataset using layer, line type, and continuity features: Layer characteristics: Railway signal tables are mostly located in "BIAOGE", "Data Table" or other custom layers; Line characteristics: Border lines are mostly "CONTINUOUS" (continuous lines), with a line width ≥ 0.3mm (drawing unit); Continuity feature: Matching is done by the distance between the endpoints of two lines. For example, a distance ≤ 0.5mm is considered a connection, and the set of border lines that form a closed area is filtered out.

[0049] For the lines in the set of border lines, Hough transform is used to extract horizontal and vertical lines, and a clustering algorithm is used to merge approximately parallel lines with an included angle of less than a preset angle to determine the outer border lines and internal dividing lines of the first table. A grid matrix is ​​generated based on the intersection coordinates of the horizontal and vertical lines, and merged cells in the first table are identified by the continuity feature of the internal dividing lines; wherein, the set of row coordinates of the grid matrix is ​​Y=[y1,y2,…,yn], the set of column coordinates is X=[x1,x2,…,xm], and the cells in the grid matrix refer to the rectangular area from (xi,yj) to (xi+1,yj+1); In this embodiment, merged cells can be identified by detecting the continuity of internal dividing lines. For example, if a row or column in the table has no dividing line, it is determined to be a merged cell. For tilted tables (rotation angle ≤ 15°), they can be corrected to a horizontal table by coordinate rotation before being divided.

[0050] For each text object in the first intermediate dataset, the spatial inclusion relationship between the text object and the rectangular area of ​​the cell in the grid matrix is ​​determined based on the position coordinates or center point coordinates in the attribute information of the text object, and the text object is associated with the corresponding cell according to the spatial inclusion relationship. In this embodiment, text objects can be associated with corresponding cells based on their position coordinates or center point coordinates falling within the rectangular area of ​​the cell. For multi-line text objects, the content can be concatenated using line breaks; for rotated text objects (angle ≠ 0°), coordinate transformation correction can be performed before further processing.

[0051] For the header of each column in the first table, keyword matching is performed based on a preset standard header set to determine the column semantics. Alternatively, if the header is missing, the column semantics of the header are determined based on the location of the first table and the text object associated with the cell in that column. And logical relationships between rows are established based on the uniqueness of the device number. In this embodiment, the header row can be identified by matching text keywords (such as "number" and "model") based on industry table standards (such as the header of a railway signal equipment table is usually "number, type, location, parameter"). For tables with missing header rows, the semantics of the corresponding columns can be inferred by the table's location (such as the table next to the signal corresponding to the signal parameters) and the content features of each column (such as the equipment number containing "S1" and "G1").

[0052] In one exemplary embodiment, logical relationships between rows can be established based on the uniqueness of the device number (such as the "signal device number" in the same table not being repeated), such as adjacent rows being devices in the same range, and the rationality of the data can be verified by combining industry parameter ranges, and outliers can be marked.

[0053] Based on the matching results of the first table and its cells with text objects, a mapping relationship between rows, columns, and text objects is established as the recognition result of the table information.

[0054] In this embodiment, based on the matching results of the first table and its cells with text objects, a mapping relationship between rows, columns, and text objects is established to achieve the structured transformation of table data.

[0055] If the railway signal diagram is in PDF format, then for each second table in the first intermediate dataset, extract the text objects within the coordinate range of its table area, and based on the structural information of the second table, associate the text objects within the coordinate range of the row and column boundaries with the corresponding cells, and establish the mapping relationship between the rows, columns, and text objects of the second table as the recognition result of the table information.

[0056] In one exemplary embodiment, the step of identifying objects and their related information in the first intermediate dataset according to the format of the railway signal map and employing a corresponding preset processing strategy to obtain the identification result of the kilometer marker information of the railway signal map includes: If the railway signal map is in DXF format, the first dataset is generated based on the text objects and their corresponding position coordinates in the first intermediate dataset, as well as the text objects and their corresponding position coordinates obtained after recursively parsing the block reference objects; or, if the railway signal map is in PDF format, the first dataset is generated based on the text objects and their corresponding position coordinates in the first intermediate dataset. In this embodiment, for railway signal diagrams in DXF format, the first dataset can be generated based on the text objects (including TEXT, MTEXT types and text nested within block references) in the first intermediate dataset parsed by ezdxf, and the text objects (such as “DK123+456”, “0”, “XX station”) and their location coordinates. For railway signal diagrams in PDF format, the first dataset can be generated based on the text objects in the first intermediate dataset and their corresponding location coordinates.

[0057] From the text objects in the first dataset, central stations are selected based on a preset set of central station names, and the point with the largest Y value in the central station location coordinates is taken as the central station reference coordinate. From the text objects in the first dataset, text objects with content of 0 are selected as zero points, and the coordinates of the zero point positions are used as the zero point coordinates for mileage calculation. Based on the location coordinates of the central station, within a preset kilometer marker distance threshold, text objects are selected from a preset set of kilometer marker names and used as the reference kilometer markers for the central station. In this embodiment, the reference points (center station reference coordinates, zero point coordinates) and reference values ​​(center station reference kilometer markers) for mileage calculation can be determined by filtering text object features (such as text recognition of the central station with the suffix "station" or "institute", text recognition of the zero point coordinates with the suffix "0", and text recognition of the reference kilometer markers with the prefix "DK / DIK"). Specifically, this includes: Central station reference coordinate identification: Select text objects with the suffix "station", "office" or "parking lot" (such as "XX station") from the first dataset, and use the point with the largest Y value in its position coordinates as the central station reference coordinate; Zero-point coordinate identification: Select text containing "0" from the first dataset, and use its position coordinates as the zero-point coordinates (point_0) for mileage calculation. Central station baseline kilometer marker identification: Based on the central station baseline coordinates, within a preset distance threshold (e.g., 10 units), texts prefixed with "DK" or "DIK" (e.g., "DK123+456") are selected from the first dataset and used as the central station baseline kilometer markers.

[0058] Based on the central station's reference coordinates, the Y-axis coordinates of text objects located above the central station's Y-coordinate are selected, and K-Means clustering algorithm is used to group them to obtain text grouping recognition results; For each text group in the text group recognition result, a device is matched from the text objects in the text group based on a preset set of device names, and the distance value corresponding to the device is matched according to a preset device distance threshold. Based on the relative position of the device's location coordinates and the zero point coordinates on the x-axis, and the distance value corresponding to the device, the actual kilometer marker corresponding to the device is determined, and the rationality of the calculation result is verified by a preset rule to obtain the recognition result of the kilometer marker information.

[0059] In this embodiment, based on the central station's reference coordinates, text objects located above the central station's Y-coordinate are filtered (excluding interfering text containing "signal", "turnout", or "distance"). The filtered text objects are then grouped using K-Means clustering (the number of clusters is automatically determined by the difference in coordinate gaps). If no cluster number is specified, the number of clusters is automatically determined by calculating the gap difference after sorting the Y-axis coordinates (using 3 times the average gap as a threshold). The clustering results correspond to the text layout of different rows in the drawing, achieving row-level grouping of text objects. Furthermore, the device identifier text objects are matched with their corresponding distance values ​​based on the location coordinate distance (e.g., "S1" is associated with "50"). Combining the relative X-axis position of the device's location coordinates and the zero-point coordinates, mileage conversion is performed based on the central station's reference kilometer markers (supporting carry / borrow processing when the decimal part exceeds the range, e.g., "+950+100" is converted to "+1+050"). The reasonableness of the calculation results is verified through preset rules (e.g., logical consistency with the mileage of adjacent devices), thereby achieving automated identification and calculation of kilometer marker information indicating mileage locations in railway signal drawings.

[0060] In one exemplary embodiment, determining the actual kilometer marker corresponding to the device based on the relative position of the device's location coordinates and the zero-point coordinates on the x-axis, and the corresponding distance value of the device, includes: If the x-coordinate of the device is less than or equal to the x-coordinate of the zero point, then the actual kilometer marker of the device is the difference between the distance value of the central station's reference kilometer marker and the distance value corresponding to the device. If the x-coordinate of the device is less than or equal to the x-coordinate of the zero point, then the actual kilometer marker of the device is the sum of the distance values ​​between the central station's reference kilometer marker and the distance corresponding to the device.

[0061] In this embodiment, the format of the reference kilometer marker at the parsing center station (e.g., "DK123+456" is decomposed into the prefix "DK", the integer part 123, and the decimal part 456) is analyzed. Based on the relative position of the equipment location coordinates to the zero-point coordinates (point_0) on the X-axis, the actual kilometer marker is calculated, specifically including: If the equipment x-coordinate ≤ zero point x-coordinate: actual kilometer marker = central station reference kilometer marker - distance value (if the decimal part is negative, borrow from the integer part, such as "+050" minus "100" to get "-1+950"); If the equipment x-coordinate > the zero point x-coordinate: actual kilometer marker = central station reference kilometer marker + distance value (if the decimal part exceeds 1000, round up to the integer part, such as "+950" plus "100" to get "+1+050").

[0062] In one exemplary embodiment, the identification results of the primitive information, the table information, and the kilometer marker information are respectively converted into standardized structured data output: Based on the primitive objects in the recognition results of the primitive information and the line objects in the first intermediate dataset, a coordinate-based topological relationship model is constructed and output; wherein, in the topological relationship model, nodes represent primitive objects, and edges represent the connection between two primitive objects corresponding to nodes through lines; Based on the recognition results of the table information, the mapping relationship of rows, columns and text objects contained in each table is converted into a two-dimensional data table structure and output; Based on the identification results of the kilometer marker information, a data structure relating the device, the actual kilometer marker, and the location coordinates is generated and output for each device.

[0063] In this embodiment, the recognition results of primitive information, table information, and kilometer marker information are converted into standardized structured data output, including: Spatial relationship structuring: For elements such as primitive objects and line objects, construct a coordinate-based topological relationship model (which can represent, for example, the relative position of a signal and a track, or the connection relationship between a turnout and adjacent equipment). Table data structuring: Converts the mapping relationship of rows, columns, and text objects in a table into a two-dimensional data table structure, supporting special scenarios such as table header recognition and cell merging processing.

[0064] Kilometer marker data structuring: The calculated actual kilometer markers are bound to the corresponding equipment (such as signals and turnouts) to form an association structure of equipment, actual kilometer markers, and coordinate positions, which is then incorporated into the spatial attribute system of railway signaling equipment.

[0065] In one exemplary embodiment, multi-format output and storage capabilities can also be provided, supporting the export of standardized structured data to standardized formats such as JSON, XML, and Excel. The output exhibits strong adaptability and close data correlation, meeting the data integration needs of downstream systems. The standardized structured data can be stored in a pre-defined railway signaling data model, supporting data indexing and relational queries, thus demonstrating high practicality.

[0066] like Figure 3 As shown, in another embodiment of this application, a data structuring processing apparatus for railway signal diagrams is provided, including a memory 300 and a processor 301. The memory 300 stores a computer program, and the processor 301 is configured to run the computer program to perform the data structuring processing method for railway signal diagrams as described above.

[0067] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term "computer storage medium" includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

Claims

1. A method for structuring railway signal diagrams, characterized in that, include: Obtain railway signal diagrams; Based on the format of the railway signal diagram, the railway signal diagram is parsed to obtain a first intermediate dataset; The first intermediate dataset includes all objects in the railway signal diagram and their related information; Based on the format of the railway signal map, a corresponding preset processing strategy is adopted to identify the objects and related information in the first intermediate dataset, and to obtain the identification results of the graphic element information, table information and kilometer marker information of the railway signal map. The identification results of the graphic element information, the table information, and the kilometer marker information are respectively converted into standardized structured data output.

2. The data structuring processing method for railway signal maps according to claim 1, characterized in that, The step of parsing the railway signal diagram according to its format to obtain a first intermediate dataset includes: If the railway signal diagram is in DXF format, then the model space of the railway signal diagram is traversed and all objects contained in the railway signal diagram are extracted; the types of the objects include primitives, text, lines, and block references; For each object contained in the railway signal diagram, the following parsing operations are performed: determine the type of the object based on the name of the layer in which the object is located; extract the attribute information corresponding to the object based on the object type, and convert the coordinates in the corresponding attribute information of the object into absolute coordinates; The first intermediate dataset is determined based on all objects and their attribute information in the railway signal diagram; or... If the railway signal diagram is in PDF format, the railway signal diagram is converted into a first image, and the first image is analyzed using an OCR engine to obtain all text objects in the railway signal diagram and their position coordinates. The first image is identified using a preset layout analysis model to obtain the table area coordinates and structural information of all table objects in the railway signal diagram; the structural information includes the distribution of table rows, columns, and merged cells. The first intermediate dataset is determined based on the first image, all text objects and their position coordinates in the railway signal diagram, and all table objects and their table area coordinates and structural information.

3. The data structuring processing method for railway signal maps according to claim 2, characterized in that, After acquiring the railway signal diagram, and before parsing the railway signal diagram according to its format, the method further includes: if the railway signal diagram is in DWG format, then converting the railway signal diagram to DXF format; Before traversing the model space of the railway signal diagram, the method further includes performing any one or more of the following vector graphics preprocessing operations on the railway signal diagram: format verification, redundant data cleaning, coordinate system one; After converting the railway signal map into a first image, and before analyzing the first image using an OCR engine, the method further includes performing any one or more of the following image preprocessing operations on the first image: denoising, binarization, tilt correction, and edge enhancement.

4. The data structuring processing method for railway signal maps according to claim 2, characterized in that, The step of identifying objects and their related information in the first intermediate dataset according to the format of the railway signal map and using a corresponding preset processing strategy to obtain the identification result of the primitive information of the railway signal map includes: If the railway signal map is in DXF format, then objects contained in non-standard layers in the first intermediate dataset are filtered out; for each object in the filtered first intermediate dataset, the following operations are performed: The object's geometry is subjected to a Hough transform to extract a first feature. The first feature is then compared with the primitive features stored in a preset primitive feature library to determine the primitive type of the object. The primitive feature library contains primitive types and one or more of the following features: geometric shape, layer naming rules, and associated attribute blocks. Extract the first text object within a first distance region surrounding the object, and verify the object's primitive type based on the primitive number contained in the first text object; if the verification is successful, annotate the object using the standard semantic label corresponding to the object's primitive type to obtain the recognition result of the primitive information; or, If the railway signal map is in PDF format, the first image and the pre-constructed prompts are input into a pre-trained improved Grounding DINO model for processing to obtain all primitive objects contained in the railway signal map, their bounding boxes, types, and confidence scores, which serve as the recognition results of the primitive information.

5. The data structuring processing method for railway signal maps according to claim 4, characterized in that, The pre-trained improved Grounding DINO model is obtained through the following method: In the feature enhancer of the Grounding DINO model, convolutional block attention layers (CBAMs) are concatenated in the text branch and the image branch after the FFN layer to obtain the improved Grounding DINO model. A training image set is acquired, and the improved Grounding DINO model to be trained is subjected to two-stage fine-tuning training based on transfer learning. The training includes: in the first stage, the text encoder is frozen, and only the visual encoder and cross-modal fusion module are trained; in the second stage, all parameters are unfrozen and end-to-end fine-tuning is performed. During training, a joint loss function including bounding box regression loss and class prediction loss is used, wherein the bounding box regression loss includes at least L1 loss and GIoU loss. A focus loss is used to increase attention to hard and small samples, and the AdamW optimizer and progressive learning rate scheduling strategy are used to update the parameters. After the model converges, the pre-trained improved Grounding DINO model is obtained.

6. The data structuring processing method for railway signal maps according to claim 2, characterized in that, The step of identifying objects and their related information in the first intermediate dataset according to the format of the railway signal map and using a corresponding preset processing strategy to obtain the identification result of the table information of the railway signal map includes: If the railway signal diagram is in DXF format, then from the line objects in the first intermediate dataset, based on layer features, line type features, and continuity features, the set of border lines of the first table is identified; wherein, the layer features include the table being located in a preset table layer; the line type features include the table border lines being continuous and the line width not less than a preset threshold; the continuity features include: if the distance between the endpoints of two lines is not greater than a preset endpoint distance threshold, they are determined to be connected; For the lines in the set of border lines, Hough transform is used to extract horizontal and vertical lines, and a clustering algorithm is used to merge approximately parallel lines with an included angle of less than a preset angle to determine the outer border lines and internal dividing lines of the first table. A grid matrix is ​​generated based on the intersection coordinates of the horizontal and vertical lines, and merged cells in the first table are identified by the continuity features of the internal dividing lines; wherein, the set of row coordinates of the grid matrix is ​​Y=[y1,y2,…,yn], the set of column coordinates is X=[x1,x2,…,xm], and the cells in the grid matrix refer to the rectangular area from (xi,yj) to (xi+1,yj+1); For each text object in the first intermediate dataset, the spatial inclusion relationship between the text object and the rectangular area of ​​the cell in the grid matrix is ​​determined based on the position coordinates or center point coordinates in the attribute information of the text object, and the text object is associated with the corresponding cell according to the spatial inclusion relationship. For the header of each column in the first table, keyword matching is performed based on a preset standard header set to determine the column semantics. Alternatively, if the header is missing, the column semantics of the header are determined based on the location of the first table and the text object associated with the cell in that column. And logical relationships between rows are established based on the uniqueness of the device number. Based on the matching results between the first table and its cells and text objects, a mapping relationship between rows, columns, and text objects is established as the recognition result of the table information; or... If the railway signal diagram is in PDF format, then for each second table in the first intermediate dataset, extract the text objects within the coordinate range of its table area, and based on the structural information of the second table, associate the text objects within the coordinate range of the row and column boundaries with the corresponding cells, and establish the mapping relationship between the rows, columns, and text objects of the second table as the recognition result of the table information.

7. The data structuring processing method for railway signal maps according to claim 2, characterized in that, The step of identifying objects and their related information in the first intermediate dataset according to the format of the railway signal map and using a corresponding preset processing strategy to obtain the identification result of the kilometer marker information of the railway signal map includes: If the railway signal map is in DXF format, the first dataset is generated based on the text objects and their corresponding position coordinates in the first intermediate dataset, as well as the text objects and their corresponding position coordinates obtained after recursively parsing the block reference objects; or, if the railway signal map is in PDF format, the first dataset is generated based on the text objects and their corresponding position coordinates in the first intermediate dataset. From the text objects in the first dataset, central stations are selected based on a preset set of central station names, and the point with the largest Y value in the central station location coordinates is taken as the central station reference coordinate. From the text objects in the first dataset, text objects with content of 0 are selected as zero points, and the coordinates of the zero point positions are used as the zero point coordinates for mileage calculation. Based on the location coordinates of the central station, within a preset kilometer marker distance threshold, text objects are selected from a preset set of kilometer marker names and used as the reference kilometer markers for the central station. Based on the central station's reference coordinates, the Y-axis coordinates of text objects located above the central station's Y-coordinate are selected, and K-Means clustering algorithm is used to group them to obtain text grouping recognition results; For each text group in the text group recognition result, a device is matched from the text objects in the text group based on a preset set of device names, and the distance value corresponding to the device is matched according to a preset device distance threshold. Based on the relative position of the device's location coordinates and the zero point coordinates on the x-axis, and the distance value corresponding to the device, the actual kilometer marker corresponding to the device is determined, and the rationality of the calculation result is verified by a preset rule to obtain the recognition result of the kilometer marker information.

8. The data structuring processing method for railway signal maps according to claim 7, characterized in that, The step of determining the actual kilometer marker corresponding to the device based on the relative position of the device's location coordinates and the zero-point coordinates on the x-axis, and the corresponding distance value of the device, includes: If the x-coordinate of the device is less than or equal to the x-coordinate of the zero point, then the actual kilometer marker of the device is the difference between the distance value of the central station's reference kilometer marker and the distance value corresponding to the device. If the x-coordinate of the device is less than or equal to the x-coordinate of the zero point, then the actual kilometer marker of the device is the sum of the distance values ​​between the central station's reference kilometer marker and the distance corresponding to the device.

9. The data structuring processing method for railway signal maps according to claim 8, characterized in that, The identification results of the graphic element information, the table information, and the kilometer marker information are respectively converted into standardized structured data output: Based on the primitive objects in the recognition results of the primitive information and the line objects in the first intermediate dataset, a coordinate-based topological relationship model is constructed and output; wherein, in the topological relationship model, nodes represent primitive objects, and edges represent the connection between two primitive objects corresponding to nodes through lines; Based on the recognition results of the table information, the mapping relationship of rows, columns and text objects contained in each table is converted into a two-dimensional data table structure and output; Based on the identification results of the kilometer marker information, a data structure relating the device, the actual kilometer marker, and the location coordinates is generated and output for each device.

10. A data structuring processing apparatus for railway signal maps, comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the data structuring processing method for railway signal diagrams as described in any one of claims 1 to 9.