Method for identifying railway signal outdoor wiring diagram
By identifying and structuring the information of boxes, cables, and terminals in railway signal outdoor wiring diagrams, a relationship table is generated, which solves the problems of time-consuming and laborious fault location and information omission in existing technologies, and achieves high efficiency and accuracy in fault diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HENAN SPLENDOR SCI & TECH
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-12
Smart Images

Figure CN122019619A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway signaling engineering design technology, and in particular to a method for identifying outdoor wiring diagrams of railway signals. Background Technology
[0002] Railway signal outdoor wiring diagrams are crucial technical drawings in railway signaling systems. They detail the wiring connections from indoor signal machinery to various outdoor signal devices—such as signals, track circuits, and switch machines. These diagrams clearly illustrate the cable routing, specifications, core count, and specific wiring relationships between terminals in various boxes (such as cable boxes and transformer boxes). Typically, a single station involves a large number of wiring diagrams, each densely depicting the complex connections between multiple boxes, cable segments, and corresponding equipment, collectively forming a complete electrical connectivity logic for the signaling equipment.
[0003] Currently, these drawings are mainly stored in paper form in railway signal equipment rooms, or scattered across computers as single CAD electronic files. This traditional management method has revealed significant shortcomings in actual maintenance and troubleshooting. When signal equipment malfunctions, maintenance personnel, lacking effective means of retrieving drawing information, often have to manually check paper drawings one by one based on experience, or open multiple CAD files sequentially on the computer. This process is not only time-consuming and laborious, but also highly susceptible to overlooking crucial information due to visual fatigue or misunderstandings of the drawings' relationships, thus affecting the efficiency and accuracy of fault location.
[0004] To solve the above problems, it is urgent to realize the digital intelligent recognition and information structuring of railway signal outdoor wiring diagrams. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a method and system for identifying outdoor wiring diagrams of railway signaling systems. This invention can identify information about boxes, cables, and terminal wiring in various outdoor wiring diagrams of railway signaling systems, and can associate this information with specific areas for information retrieval and location.
[0006] Specifically, the first aspect of the present invention provides a method for identifying outdoor wiring diagrams of railway signals, comprising: (1) Obtain the drawing file of the railway signal outdoor wiring diagram in CAD format and read the information of all elements in the drawing file; the elements include line segments, text and various shapes, and the information includes coordinates and size; (2) Identify boxes; Based on the line segments in the elements, find all closed rectangles; if a rectangle is pierced by multiple horizontal lines, it is identified as a box; if a rectangle is not pierced by multiple horizontal lines, it is identified as an indoor port. The method for finding the closed rectangle is as follows: Find two straight lines. Based on the coordinates of the two lines, calculate the included angle between the two lines and the distance between the four pairs of endpoints of the two lines. When the included angle deviates from 90 degrees by 0.001 degrees and the distance between the endpoints of the two lines is within 0.01 degrees, the two lines are considered to intersect perpendicularly and can be used as two sides of a closed rectangle. Based on the two sides of the rectangle found, use the same judgment method to find the other two sides of the rectangle, and confirm that the other two sides also intersect perpendicularly, that is, find the closed rectangle. (3) Identify cable information; For the rectangle containing the box, the text above the box is identified as cable information text; (4) Identify the name and type of the box / box; Within the rectangular box, find two horizontal lines whose endpoints are less than 0.001 from the two vertical sides of the rectangle. The line with the larger Y-coordinate forms a rectangle I with the top and vertical sides of the rectangle. Identify the text in rectangle I as the box name. The line with the smaller Y-coordinate forms a rectangle II with the line with the larger Y-coordinate and the vertical side. Identify the text in rectangle II as the box type. (5) Identify the terminal information inside the enclosure; Identify the horizontal line passing through the rectangle containing the box as the core wire of the cable, and identify the text above the core wire as the terminal information of the core wire in the corresponding box; wherein, the x-coordinate of the position above the core wire is within the x-coordinate range of the two vertical sides of the box, and the y-coordinate is within the coordinate range of 0.5 above the side passing through the horizontal line. (6) Identify the cable wiring sequence; First, identify the multiple core wires of a cable that cross the horizontal line between two boxes. Then, identify the text above each horizontal line as the wire sequence information of that core wire. The X coordinate of the position above the horizontal line is within the X coordinate range of the vertical edge of the two adjacent boxes, and the Y coordinate is within the coordinate range of 0.5 of the edge above the horizontal line. (7) Identify indoor terminals; Within the rectangular indoor port area, locate the horizontal line intersecting the left vertical edge of the rectangle, and identify the text on the right side of each horizontal line as the indoor terminal number of that core wire; the method for locating the horizontal line intersecting the left vertical edge of the rectangular indoor port area is as follows: Find the two endpoints of the horizontal line, where one endpoint is less than the X-coordinate of the left vertical side of the rectangle, and the X-coordinate of the other endpoint is between the X-coordinates of the two vertical sides of the rectangle; the right side of the horizontal line is located where the Y-coordinate is less than 0.5 of the horizontal line, and the X-coordinate is greater than the X-coordinate of the endpoint of the horizontal line and less than the X-coordinate of the right vertical side of the rectangle. (8) Function to identify cable core wires Within the rectangular indoor port, locate the horizontal line that intersects with the left vertical edge of the rectangle, and identify the text above the horizontal line as the core line. The position above the horizontal line is within a range where the Y coordinate is less than 0.5 of the horizontal line, and the X coordinate of the lower left corner of the text is between the X coordinate of the left side of the port rectangle and the X coordinate of the endpoint of the horizontal line inside the rectangle. (9) Establish the cable connection relationship between indoor and outdoor boxes; Starting from the indoor port, trace the core wires, find the connections between the indoor port and the box, between boxes, the cables and internal core wires between the indoor port and the box, and the connections between the core wires and the terminal blocks of the box. This constitutes the cable connection relationship of the entire drawing. (10) Store all identified location information in association; Store the location, name, and type of each box graphic; the wiring length and core wire sequence name between two boxes; the terminal number inside the box; and the relevant core wire sequence name connected to the terminal. Graphics on CAD drawings all have GUIDs. For graphics composed of multiple graphics, such as terminals or boxes, they are combined into a block, and this block has a GUID. Based on the boxes, cables, terminals, core wires, and CAD graphic GUIDs, four relationship tables are generated: a box-cable relationship information table, a core wire-terminal relationship table, a terminal GUID table, and a box GUID table.
[0007] Secondly, this application provides an electronic device, comprising: At least one processor, and a memory coupled to said at least one processor; The memory stores a computer program that can be executed by the at least one processor to implement the method for identifying railway signal outdoor wiring diagrams as described above.
[0008] Thirdly, this application provides a computer-readable storage medium storing a computer program that, when executed, enables the identification method for railway signal outdoor wiring diagrams as described above.
[0009] Fourthly, this application provides a computer program product, including a computer program / instruction that, when executed by a processor, implements the method for identifying railway signal outdoor wiring diagrams as described above.
[0010] This invention has outstanding substantive features and significant progress compared to the prior art, specifically: This invention identifies outdoor signaling boxes and equipment boxes sequentially according to indoor directional openings within a CAD-format electronic drawing of the railway signaling outdoor wiring diagram. It then identifies the box name, type, cable length between boxes, and the terminals and wiring sequence within each box. This information is digitized and linked to four relational tables corresponding to each outdoor box's name, type, and cable length between boxes, facilitating retrieval and location. This invention offers the following advantages and benefits: 1. Automatically identified the location, coordinate information, and graphic element composition information of boxes, cables, terminals, and wiring in railway signal cable wiring drawings within CAD drawings; 2. An electronic connection relationship between cable boxes was established; 3. Associate the coordinates of the CAD drawings with the boxes, cables, etc. 4. Maintenance personnel can quickly locate relevant wiring information and its specific position in drawings by entering keywords such as equipment number, cable code, or terminal number, thereby greatly improving the efficiency and accuracy of fault diagnosis and providing strong technical support for the stable operation of railway signaling equipment. Attached Figure Description
[0011] Figure 1 It is a railway signal outdoor wiring diagram. Detailed Implementation
[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0013] Example 1 like Figure 1 As shown, this embodiment provides a method for identifying outdoor wiring diagrams of railway signals, including: (1) Obtain the drawing file of the railway signal outdoor wiring diagram in CAD format and read the information of all elements in the drawing file; the elements include line segments, text and various shapes, and the information includes coordinates and size.
[0014] (2) Identify boxes; Based on the line segments in the elements, find all closed rectangles; if a rectangle is pierced by multiple horizontal lines, it is identified as a box; if a rectangle is not pierced by multiple horizontal lines, it is identified as an indoor port. The method for finding the closed rectangle is as follows: Find two straight lines. Based on the coordinates of the two lines, calculate the included angle between the two lines and the distance between the four pairs of endpoints of the two lines. When the included angle deviates from 90 degrees by 0.001 degrees and the distance between the endpoints of the two lines is within 0.01 degrees, the two lines are considered to intersect perpendicularly and can be used as two sides of a closed rectangle. Based on the two sides of the rectangle found, use the same judgment method to find the other two sides of the rectangle, and confirm that the other two sides also intersect perpendicularly, that is, find the closed rectangle. like Figure 1 In the diagram, the rectangle next to YP1 is the indoor port, and the rectangle containing YP-5, VAGJ, and IIIAGF is the enclosure.
[0015] (3) Identify cable information; For the rectangle containing the box, identify the text above the box as cable information text (X coordinate within the X coordinate range of the two vertical sides of the box, Y coordinate within the coordinate range of 0.5 of the top side of the box); For example Figure 1 In the middle, the cable information above the rectangle where VAGJ is located is $10-8(2), which means 10 meters long, 8 core wires, and two spare core wires. Among them, $ represents SPTYWA23 type ordinary integrated sheath digital signal cable.
[0016] (4) Identify the name and type of the box / box; Within the rectangular box, find two horizontal lines whose endpoints are less than 0.001 from the two vertical sides of the rectangle (the difference in the Y coordinates of the two endpoints is less than 0.001). The line with the larger Y coordinate forms a rectangle I with the top and vertical sides of the rectangle. Identify the text within rectangle I (with coordinates within the range of smaller rectangle I) as the box name. The line with the smaller Y coordinate forms a rectangle II with the line with the larger Y coordinate and the vertical side. Identify the text within rectangle II (with coordinates within the range of smaller rectangle II) as the box type. For example Figure 1 In the text, the Chinese characters in rectangle 1 of the rectangle containing VAGJ are the box name VAGJ, and the Chinese characters in rectangle 2 are the box type FHH(2600-2), protective box, 2600HZ-2 frequency band.
[0017] (5) Identify the terminal information inside the enclosure; Identify the horizontal line passing through the rectangle containing the box (the difference between the X coordinates of the two endpoints and the two vertical sides of the box is greater than 0.001, and the X coordinates of the two endpoints are outside the two vertical sides of the box) as the core wire of the cable. Identify the text above the core wire (the X coordinate is within the X coordinate range of the two vertical sides of the box, and the Y coordinate is within the coordinate range of 0.5 above the horizontal line) as the terminal information of the core wire in the corresponding box. For example Figure 1 In the VAGJ box, the terminal block for JS1 is E1, and the terminal block for JS2 is E2.
[0018] (6) Identify the cable wiring sequence; First, identify the multiple horizontal lines between the two boxes (same as the horizontal line method in step 5) as multiple core wires of a cable. Then, identify the text above each horizontal line (X coordinate within the X coordinate range of the vertical edge of the two adjacent boxes, Y coordinate within the coordinate range of 0.5 above the horizontal line) as the wire sequence information of that core wire. For example Figure 1 In the YP-5 and VAGJ boxes, we identified four horizontal lines. Above each line, we identified the core wire text. The first core wire has "1-1" and "1-2" above it, which means that the two core wires, 1-1 and 1-2, are connected to terminal 1 of box YP-1 and terminal E1 of box VAGJ.
[0019] (7) Identify indoor terminals; Within the rectangular indoor port area, locate the horizontal line intersecting the left vertical edge of the rectangle, and identify the text on the right side of each horizontal line as the indoor terminal number of that core wire; the method for locating the horizontal line intersecting the left vertical edge of the rectangular indoor port area is as follows: Find the two endpoints of the horizontal line, where one endpoint is less than the X-coordinate of the left vertical side of the rectangle, and the X-coordinate of the other endpoint is between the X-coordinates of the two vertical sides of the rectangle; the right side of the horizontal line is located where the Y-coordinate is less than 0.5 of the horizontal line, and the X-coordinate is greater than the X-coordinate of the endpoint of the horizontal line and less than the X-coordinate of the right vertical side of the rectangle. For example Figure 1 In the middle, the indoor terminal number of the first core wire is ZH1-D1-10.
[0020] (8) Function to identify cable core wires Within the rectangular indoor port, locate the horizontal line that intersects with the left vertical edge of the rectangle, and identify the text above the horizontal line as the core line. The position above the horizontal line is within a range where the Y coordinate is less than 0.5 of the horizontal line, and the X coordinate of the lower left corner of the text is between the X coordinate of the left side of the port rectangle and the X coordinate of the endpoint of the horizontal line inside the rectangle. For example Figure 1In the middle, the function of the first core wire is VAGJ-JS1.
[0021] (9) Establish the cable connection relationship between indoor and outdoor boxes; The indoor ports, boxes, cables, box terminals, and cable cores have already been identified. Starting from the indoor port, find the cores (horizontal lines passing through boxes and ports), find the connections between indoor ports and boxes, and between boxes (i.e., the horizontal lines of the cores), the cables and internal cores between indoor ports and boxes, and the connections between the cores and the box terminals, which constitute the cable connection relationship of the entire drawing; (10) Store all identified location information in association; The boxes, internal terminals, and core wire locations identified in the previous steps are associated and stored with their relevant names. The location, name, and type of each box graphic are stored; the wiring length and core wire sequence name between two boxes are stored; the internal terminal number of the box and the relevant core wire sequence name connected to the terminal block are stored. Graphics on CAD drawings all have GUIDs. For graphics composed of multiple graphics, such as terminals or boxes, they are grouped into blocks, and each block has a GUID. Based on the boxes, cables, terminals, core wires, and CAD graphic GUIDs, four relationship tables are generated: a box-cable relationship information table, a core wire-terminal relationship table, a terminal GUID table, and a box GUID table.
[0022] Table 1. Cable Relationship Information for Boxes and Enclosures , Table 2. Relationship between core wire terminals , Table 3 Terminal GUID Table , Table 4 Box GUID Table , With the four relationship tables, when you need to retrieve certain information, you can find the corresponding CAD drawing GUID through the four relationship tables, find the location of the drawing on the CAD drawing, locate it on the CAD drawing, and quickly see related information such as cable connection relationships.
[0023] Example 2 This application also provides an electronic device, which includes a memory and a processor. The memory and the processor are connected via a bus. The memory stores a computer program that can run on the processor to implement the steps in the method for identifying railway signal outdoor wiring diagrams disclosed in Embodiment 1 of this application.
[0024] This application also provides a computer-readable storage medium storing a computer program / instruction that, when executed by a processor, implements the steps in the method for identifying railway signal outdoor wiring diagrams as disclosed in Embodiment 1 of this application.
[0025] This application also provides a computer program product, including a computer program / instruction that, when executed by a processor, implements the steps in the method for identifying railway signal outdoor wiring diagrams as disclosed in Embodiment 1 of this application.
[0026] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0027] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for identifying outdoor wiring diagrams of railway signals, characterized in that, include: (1) Obtain the drawing file of the railway signal outdoor wiring diagram in CAD format and read the information of all elements in the drawing file; the elements include line segments, text and various shapes, and the information includes coordinates and size; (2) Identify boxes; Based on the line segments in the elements, find all closed rectangles; if a rectangle is pierced by multiple horizontal lines, it is identified as a box; if a rectangle is not pierced by multiple horizontal lines, it is identified as an indoor port. The method for finding the closed rectangle is as follows: Find two straight lines. Based on the coordinates of the two lines, calculate the included angle between the two lines and the distance between the four pairs of endpoints of the two lines. When the included angle deviates from 90 degrees by 0.001 degrees and the distance between the endpoints of the two lines is within 0.01 degrees, the two lines are considered to intersect perpendicularly and can be used as two sides of a closed rectangle. Based on the two sides of the rectangle found, use the same judgment method to find the other two sides of the rectangle, and confirm that the other two sides also intersect perpendicularly, that is, find the closed rectangle. (3) Identify cable information; For the rectangle containing the box, the text above the box is identified as cable information text; (4) Identify the name and type of the box / box; Within the rectangular box, find two horizontal lines whose endpoints are less than 0.001 from the two vertical sides of the rectangle. The line with the larger Y-coordinate forms a rectangle I with the top and vertical sides of the rectangle. Identify the text in rectangle I as the box name. The line with the smaller Y-coordinate forms a rectangle II with the line with the larger Y-coordinate and the vertical side. Identify the text in rectangle II as the box type. (5) Identify the terminal information inside the enclosure; Identify the horizontal line passing through the rectangle containing the box as the core wire of the cable, and identify the text above the core wire as the terminal information of the core wire in the corresponding box; wherein, the x-coordinate of the position above the core wire is within the x-coordinate range of the two vertical sides of the box, and the y-coordinate is within the coordinate range of 0.5 above the side passing through the horizontal line. (6) Identify the cable wiring sequence; First, identify the multiple core wires of a cable that cross the horizontal line between two boxes. Then, identify the text above each horizontal line as the wire sequence information of that core wire. The X coordinate of the position above the horizontal line is within the X coordinate range of the vertical edge of the two adjacent boxes, and the Y coordinate is within the coordinate range of 0.5 of the edge above the horizontal line. (7) Identify indoor terminals; Within the rectangular indoor port area, locate the horizontal line intersecting the left vertical edge of the rectangle, and identify the text on the right side of each horizontal line as the indoor terminal number of that core wire; the method for locating the horizontal line intersecting the left vertical edge of the rectangular indoor port area is as follows: Find the two endpoints of the horizontal line, where one endpoint is less than the X-coordinate of the left vertical side of the rectangle, and the X-coordinate of the other endpoint is between the X-coordinates of the two vertical sides of the rectangle; the right side of the horizontal line is located where the Y-coordinate is less than 0.5 of the horizontal line, and the X-coordinate is greater than the X-coordinate of the endpoint of the horizontal line and less than the X-coordinate of the right vertical side of the rectangle. (8) Function to identify cable core wires Within the rectangular indoor port, locate the horizontal line that intersects with the left vertical edge of the rectangle, and identify the text above the horizontal line as the core line. The position above the horizontal line is within a range where the Y coordinate is less than 0.5 of the horizontal line, and the X coordinate of the lower left corner of the text is between the X coordinate of the left side of the port rectangle and the X coordinate of the endpoint of the horizontal line inside the rectangle. (9) Establish the cable connection relationship between indoor and outdoor boxes; Starting from the indoor port, trace the core wires, find the connections between the indoor port and the box, between boxes, the cables and internal core wires between the indoor port and the box, and the connections between the core wires and the terminal blocks of the box. This constitutes the cable connection relationship of the entire drawing. (10) Store all identified location information in association; Store the location, name, and type of each box graphic; the wiring length and core wire sequence name between two boxes; the terminal number inside the box; and the relevant core wire sequence name connected to the terminal. Graphics on CAD drawings all have GUIDs. For graphics composed of multiple graphics, such as terminals or boxes, they are combined into a block, and this block has a GUID. Based on the boxes, cables, terminals, core wires, and CAD graphic GUIDs, four relationship tables are generated: a box-cable relationship information table, a core wire-terminal relationship table, a terminal GUID table, and a box GUID table.
2. An electronic device, characterized in that, include: At least one processor, and a memory coupled to said at least one processor; The memory stores a computer program that can be executed by the at least one processor to implement the steps of the method for identifying railway signal outdoor wiring diagrams as described in claim 1.
3. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, enables the implementation of the steps of the method for identifying railway signal outdoor wiring diagrams as described in claim 1.
4. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the steps of the method for identifying the railway signal outdoor wiring diagram as described in claim 1.