A DXF format-based station plan information extraction and instantiation method
By reading the ENTITIES module in DXF format and using the graphic position algorithm, the signal equipment in the station plan is extracted and instantiated, solving the problem that the existing technology cannot intuitively reflect the interlocking relationship and edit it, and realizing efficient management of station plan data and convenient operation for designers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CASCO SIGNAL LTD
- Filing Date
- 2022-12-16
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies cannot intuitively reflect the interlocking relationships between signaling devices, and cannot instantiate signaling devices, resulting in the inability to edit and upgrade station plan data, which affects the efficiency and accuracy of interlocking data design.
By reading the ENTITIES module in DXF format, the signal equipment type, coordinates, and attributes in the station plan are extracted. The signal equipment control is then called to redraw the station plan. Combined with the graphic position algorithm, a continuous and complete station plan is generated, and the editing and modification of equipment attributes are supported.
It realizes the intuitive reflection and instantiation of the interlocking relationship of signal equipment, improves the efficiency of data editing and upgrade management, reduces the workload of data changes, and improves the work efficiency of designers.
Smart Images

Figure CN115861487B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway engineering design and construction, specifically to a method for extracting and instantiating station plan information based on DXF format. Background Technology
[0002] The station signal layout plan (hereinafter referred to as "station plan") is an important basis for railway engineering design and construction, and also a design input for interlocking data production. It can intuitively reflect the layout of railway signaling equipment and important interlocking relationships. Urban rail transit station data production uses computer-aided design software, employing a manual method of drawing station plans, to redraw the station plan using controls on the signaling equipment in the station plan, and then set the attributes of each device in the station plan to complete the station plan data and provide input for subsequent signaling design. To improve the work efficiency of interlocking data designers and ensure the completeness of station plan information recognition, automatically completing the station plan drawing by extracting station plan data and instantiating station plan equipment using computer-aided design software is an inevitable trend towards automating interlocking data design.
[0003] Current methods for extracting station plan data either fail to intuitively reflect the interlocking relationships between signaling equipment, making them unsuitable for interlocking data designers, or they fail to instantiate the signaling equipment, making it impossible to edit the generated graphics. This means that when equipment is modified in a certain part of the station plan and the station plan needs to be regenerated to update the corresponding equipment information, the data lacks upgrade management functions and cannot establish interlocking relationships to prepare for generating station plan data structures. Summary of the Invention
[0004] The purpose of this invention is to propose a method for extracting station plan data that can intuitively reflect the interlocking relationship between signaling devices, instantiate the signaling devices, make the generated graphics editable, and have upgrade management functions.
[0005] To achieve the above objectives, this invention proposes a method for extracting and instantiating station plan information based on DXF format, comprising the following steps:
[0006] S1. Based on the principles of computer interlocking station interlocking chart compilation and combined with the existing equipment types in the station plan, design signal equipment controls and their attributes;
[0007] S2. The ENTITIES module reads the DXF file and obtains the type, coordinates, and attributes of each device in the station signal plan based on the graphic object code of the DXF file.
[0008] S3. Based on the equipment type and corresponding coordinates and rotation attributes extracted in step S2, call the different types of equipment controls designed in S1 to draw the signal, turnout and axle counter at the corresponding coordinate positions to form the initial station map.
[0009] S4. Based on the initial station map, generate sections according to each axle position using a graphical position algorithm, and connect the turnouts in the station map to form a continuous and complete station map.
[0010] S5. Based on the equipment type and attributes extracted in step S2, obtain the names of each signal equipment element named after the equipment name, use them as the names and attributes of the corresponding controls in the station diagram, and call the text control to place the names and attributes above the corresponding signal equipment to complete the drawing of the station diagram.
[0011] S6. When it is necessary to modify the station layout plan, the signaling equipment is manually operated to improve the attributes that cannot be directly obtained from the station layout plan, providing input for the interlocking data structure.
[0012] The signal equipment controls include signal controller controls, turnout controls, axle counter controls, section controls, text controls, left and right directional arrow controls, button controls, indicator light controls, and platform controls.
[0013] Step S2 further includes the following steps:
[0014] S21. Read DXF format data and determine whether each line of data is an ENTITIES field. If it is not an ENTITIES field, read the next line of data. If it is an ENTITIES field, obtain each entity segment that conforms to the device type naming rules line by line.
[0015] S22. Read the DXF format data line by line until the data with the ENDSEC field is read, then end the information extraction process.
[0016] Step S21 includes the following cases: if the data in the row is the equipment type name corresponding to the signal or turnout entity, then extract the equipment name corresponding to DXF group code 1, the horizontal coordinate of the equipment corresponding to group code 10, the vertical coordinate of the equipment corresponding to group code 20, and the rotation attribute of the equipment corresponding to group code 50; if the data in the row is the equipment type name corresponding to the axle counting entity, then extract the horizontal coordinate of the equipment corresponding to group code 10, the vertical coordinate of the equipment corresponding to group code 20, and the rotation attribute of the equipment corresponding to group code 50.
[0017] Step S4 further includes the following steps:
[0018] S41. For each axle counting element, draw a segment and set the segment name according to the coordinates of the axle and its adjacent devices;
[0019] S42. For each turnout graphic element, draw the turnout and connect the axle counting device and the turnout device according to the direction of the turnout tip and its adjacent equipment.
[0020] S43. Traverse the axle counts and turnouts in the station diagram, and complete the drawing of all sections and turnouts according to the drawing and connection methods in S41 and S42.
[0021] For each axle counting element, step S41 further includes the following steps:
[0022] S411. For each axle counting element, search for axle counting devices and turnout devices within the first specified range to the right of its coordinates;
[0023] S412. If the nearest device to the right of the axle counting element is an axle counting device, then the area between these two axle counting elements is a segment. The segment control is called to draw the segment. The starting and ending coordinates of the segment are the coordinates of the two axle counting elements, respectively. Then, S413 is executed. If the nearest device to the right of the axle counting element is not an axle counting device, then S411 is returned.
[0024] S413. Within the second specified range between the two counting axes, search from left to right for text elements that satisfy the segment naming rules, and determine whether the text element is within the range of the segment. If it is, use the text element as the name attribute of the segment formed by the two counting axes, and return to S411. If the text element is not within the range of the segment, continue searching until a text element is found within the second specified range as the name attribute of the segment, and then return to S411.
[0025] For each axle element, the first specified range is: the difference between its ordinate and the axle coordinate is less than 5 units; for two axles, the second specified range is: the axle coordinate is between the axle coordinates of the two axles, and the difference between the ordinate and the axle coordinate is less than 5 units.
[0026] For each turnout element, step S42 further includes the following steps:
[0027] S421. For each turnout graphic element, search for the axle counting device and the turnout device within the third specified range on both its left and right sides.
[0028] S422. If the device closest to the turnout element within the third specified range is an axle counting device, then connect the branch of the turnout represented by the turnout element to the axle counting device and execute S425; if the device closest to the turnout element within the third specified range is not an axle counting device, then continue to execute S423.
[0029] S423. If the device closest to the turnout element within the third specified range is a turnout device, then connect the branch of the turnout represented by the turnout element to the middle of the two turnout devices, and execute S425; if the device closest to the turnout element within the third specified range is not a turnout device, then return to S421, continue searching within the third specified range on both sides of the next turnout element and determine whether the device closest to it is an axle counting device or a turnout device.
[0030] S424. Locate the straight endpoint of the turnout in the reverse position within the fourth specified range. If the other endpoint of the extended straight line is connected to the reverse position of another turnout, connect the reverse branch of the turnout to the reverse branch of the turnout at the other endpoint of the extended straight line, and return to S421. If the other endpoint of the extended straight line is not connected to the reverse position of another turnout, execute S425.
[0031] S425. Search for axle counting devices and turnout devices within the fifth specified range on both sides of the other end of the straight extension of each turnout in reverse position. If the device closest to the end is an axle counting device, extend the turnout in reverse position branch to the other end of the straight line and then connect it to the axle counting device, and return to S421; if the device closest to the end is not an axle counting device, execute S426.
[0032] S426. Within the fifth specified range on both sides of the other end of the reverse straight extension of each turnout, if the nearest adjacent device to the other end of the reverse straight extension of each turnout is a turnout device, then connect the two turnouts according to the direction of the turnout tip and the opening direction, and then return to S421; if the nearest adjacent device to the other end of the reverse straight extension of each turnout is not a turnout device, then directly return to S421.
[0033] Specifically, for each turnout graphic element, the third specified range is: the difference between its ordinate and coordinate is less than 3 units; the fourth specified range is: the difference between its abscissa and coordinate is less than 1 unit, and the difference between its ordinate and coordinate is less than 5 units; the fifth specified range is: the difference between its ordinate and coordinate of the other end of its opposite straight line is less than 5 units.
[0034] Step S422 includes the following cases:
[0035] When the tip of the turnout is to the right, if the axle counting device is on the left side of the turnout, the front branch of the turnout is connected to the axle counting device; if the axle counting device is on the right side of the turnout, the rear branch of the turnout is connected to the axle counting device.
[0036] When the tip of the turnout is to the left, if the axle counter is on the left side of the turnout, the rear branch of the turnout is connected to the axle counter; if the axle counter is on the right side of the turnout, the front branch of the turnout is connected to the axle counter.
[0037] Step S423 includes the following situations:
[0038] The first turnout points to the right, and the second turnout points in the same direction. If the second turnout is to the left of the first turnout, then connect the front branch of the first turnout to the rear branch of the second turnout; if the second turnout is to the right of the first turnout, then connect the rear branch of the first turnout to the front branch of the second turnout.
[0039] The first turnout points to the right, and the second turnout points to the opposite direction. If the second turnout is to the left of the first turnout, then connect the front branch of the first turnout to the front branch of the second turnout; if the second turnout is to the right of the first turnout, then connect the rear branch of the first turnout to the rear branch of the second turnout.
[0040] The first turnout points to the left, and the second turnout points in the same direction. If the second turnout is to the left of the first turnout, then connect the rear branch of the first turnout to the front branch of the second turnout; if the second turnout is to the right of the first turnout, then connect the front branch of the first turnout to the rear branch of the second turnout.
[0041] The first turnout points to the left, and the second turnout points to the opposite direction. If the second turnout is to the left of the first turnout, then connect the rear branch of the first turnout to the rear branch of the second turnout; if the second turnout is to the right of the first turnout, then connect the front branch of the first turnout to the front branch of the second turnout.
[0042] Wherein, the first turnout is each of the turnouts being drawn, and the second turnout is the turnout device closest to the first turnout.
[0043] Step S426 includes the following situations:
[0044] If the tips and opening directions of the first and third turnouts are the same, then the reverse branch of the first turnout is extended to the end point and then connected to the front branch of the third turnout.
[0045] If the first turnout and the third turnout have different tips but the same opening direction, then extend the reverse branch of the first turnout to the end point and connect it with the post-turnout branch of the third turnout.
[0046] Wherein, the first turnout is each of the turnouts being drawn, and the third turnout is the turnout device closest to the reverse straight end of the first turnout.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] This method directly extracts the type and location relationship of interlocking signal equipment in the station plan drawing using DXF format. It instantiates the signal equipment using custom entities and redraws the station plan by calling the signal equipment control, providing reliable input for the formation of the station data structure and making data upgrades more convenient.
[0049] This method uses a graphical position algorithm to match the positions of axle counting equipment, sections, and turnouts. It refines the turnout type by the turnout tip direction and opening direction, making the connection of the station map closer to the station plan and reflecting the interlocking relationship of the signal equipment more intuitively.
[0050] This method facilitates designers' verification and modification of station diagram connection relationships and equipment types by operating on instantiated signaling equipment. By setting and changing the attributes of instantiated signaling equipment, it can reduce the workload caused by data changes requiring modifications from the source and improve the efficiency of data production by designers. Attached Figure Description
[0051] Figure 1 This is a flowchart illustrating a method for extracting and instantiating station plan information based on DXF format according to the present invention.
[0052] Figure 2 Instantiate the device structure diagram;
[0053] Figure 3 Flowchart for DXF data extraction;
[0054] Figure 4 Flowchart illustrating the implementation principle of the segment graphic position algorithm;
[0055] Figure 5 Flowchart illustrating the implementation principle of the turnout graphic position algorithm;
[0056] Figure 6 This is a schematic diagram of turnout types and turnout branches. Detailed Implementation
[0057] The following will be combined with the embodiments of the present invention. Figures 1-6 The technical solutions, structural features, objectives and effects achieved in the embodiments of the present invention will be described in detail.
[0058] It should be noted that the accompanying drawings are in a very simplified form and use non-precise proportions. They are only used to facilitate and clarify the purpose of illustrating the embodiments of the present invention, and are not intended to limit the implementation conditions of the present invention. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportional relationship, or adjustments to the size should still fall within the scope of the technical content disclosed in the present invention, provided that they do not affect the effects and objectives that the present invention can produce.
[0059] It should be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only the expressly listed elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0060] This embodiment discloses a method for extracting and instantiating station plan information based on the DXF format. DXF is a CAD data file format used for data exchange with AutoCAD, and it has excellent readability. Since signaling equipment in the station plan is stored as block elements, and the ENTITIES module in the DXF file describes these block elements, by reading this part of the graphic entity data, including signals, turnouts, and axle counters, the coordinates and basic attributes of each signaling device in the station plan can be obtained. Then, by calling controls to redraw the station plan, a complete and editable station layout diagram with connected signaling equipment is generated, providing input for the interlocking data structure. Figure 1 As shown, this method specifically includes the following steps:
[0061] S1. Based on the principles of computer-aided interlocking station interlocking chart compilation and considering the existing equipment types on the station plan, design signal equipment controls and their attributes. These control sets mainly include signal controller controls, turnout controls, axle counter controls, section controls, and other controls convenient for designers to use, including text controls, left and right directional arrow controls, button controls, indicator light controls, and platform controls. Figure 2 The instantiation structure of some devices is shown, with uplink and downlink using different colors for distinction.
[0062] S2. The ENTITIES module reads the DXF file and, based on the graphical object code in the DXF file, obtains the type, coordinates, and attributes of each device in the station signal plan, such as... Figure 3 As shown, the specific steps are as follows:
[0063] S21. Read DXF format data and determine whether each line of data is an ENTITIES field. If it is not an ENTITIES field, read the next line of data. If it is an ENTITIES field, obtain each entity segment that conforms to the device type naming rules line by line.
[0064] In AutoCAD, among all the group codes defined in the ENTITIES field of the DXF format, group code 1 corresponds to the main name of the element, i.e., the equipment name; group codes 10 and 20 correspond to the X and Y coordinates of the element in the plan view, respectively; group code 50 corresponds to the rotation attribute of the element in the plan view; and there are other group codes corresponding to stretch attributes, scaling ratios, etc. However, when redrawing the plan view, only the equipment names, coordinates, and rotation attributes of the signals, switches, and axle counters are needed to complete the drawing of the station plan view.
[0065] The rotation attribute of the equipment is to more accurately reproduce the equipment layout in the plan: equipment such as signal lights may have a certain rotation angle, that is, the equipment is located on a diagonal line. Therefore, when calling the corresponding control to draw, the same rotation should be performed to reproduce the station plan.
[0066] Depending on the device type of each row of data, step S21 includes the following cases:
[0067] If the data in this row is the equipment type name corresponding to the signal or turnout entity, then extract the equipment name corresponding to DXF group code 1, the horizontal coordinate of the equipment corresponding to group code 10, the vertical coordinate of the equipment corresponding to group code 20, and the rotation attribute of the equipment corresponding to group code 50.
[0068] If the data in this row is the equipment type name corresponding to the axle counting entity, then extract the horizontal coordinate of the equipment corresponding to group code 10, the vertical coordinate of the equipment corresponding to group code 20, and the rotation attribute of the equipment corresponding to group code 50.
[0069] S22. Read the DXF format data line by line until the data with the ENDSEC field is read, then end the information extraction process.
[0070] S3. Based on the equipment type, corresponding coordinates, and rotation attributes extracted in S2, call the different types of equipment controls designed in S1 to draw the signal, turnout, and axle counter at the corresponding coordinate positions to form the initial station map;
[0071] S4. Based on the initial station map, generate sections using a graphical location algorithm according to the positions of axles and turnouts, and connect the turnouts in the station map to form a continuous and complete station map.
[0072] The aforementioned graphic positioning algorithm enables the drawing and naming of section equipment in the station map, as well as the connection of turnout equipment, specifically including the following steps:
[0073] S41. For each axis counting element, based on the axis counting coordinates and its adjacent devices, call the segment control to draw a segment and set the segment name, such as... Figure 4 As shown, the specific steps include:
[0074] S411. For each axle counting element, a search is performed on the axle counting and turnout equipment within a first specified range to the right of its coordinates (for ease of description, each axle counting element that is being searched for its surroundings is referred to as the first axle counting element). The first specified range is set according to actual needs. In this embodiment, the specified range is set to be: the difference between the vertical coordinate of the first axle counting element and the vertical coordinate of the first axle counting element is less than 5 coordinate units.
[0075] S412. If the nearest device to the right of the first axle counting element is an axle counting device, then the area between these two axle counting elements is a segment. The segment control is called to draw the segment. The starting and ending coordinates of the segment are the coordinates of the two axle counting elements, respectively. Then, S413 is executed. If the nearest device to the right of the first axle counting element is not an axle counting device, then S411 is returned, and the first specified range to the right of the next axle counting element is searched.
[0076] S413. Within the second specified range between the two counting axes, search sequentially from left to right for text elements that satisfy the segment naming rule (i.e., the segment name begins with G or T). Determine if the text element is within the segment range. If it is, use the text element as the name attribute of the segment formed by the two counting axes and return to S411. If not, continue searching until a text element that is within the segment range and satisfies the segment naming rule is found within the second specified range and used as the name attribute of that segment. Return to S411 and search the first specified range to the right of the next counting axis element. The specified range is set according to the actual situation. In this embodiment, the second specified range is set as follows: on the horizontal axis, it is set between the horizontal coordinates of the two counting axes; on the vertical axis, it is set to have a difference of less than 5 units from the vertical coordinates of the two counting axes.
[0077] S42. For each turnout element (for ease of description, each turnout element being drawn will be referred to as the first turnout element below), draw the turnout according to the turnout tip direction and adjacent equipment, and connect the axle counting device and the turnout equipment, such as... Figure 5 As shown, the specific steps include:
[0078] S421. For each turnout graphic element, the axle counting device and the turnout device are searched within a third specified range on its left and right sides. The third specified range is set according to actual needs. In this embodiment, the third specified range is set as: the difference between the vertical coordinate of the first turnout graphic element and the vertical coordinate of the first turnout graphic element is less than 3 units.
[0079] S422. If the device closest to the first turnout element within the third specified range is an axle counting device, then connect the branch of the first turnout represented by the first turnout element to the axle counting device and continue to execute S424; if it is not an axle counting device, then execute the next step S423.
[0080] When the device closest to the first turnout within the third specified range is a shaft counting device, the direction of the first turnout tip ( Figure 6 The diagram illustrates the different types of turnouts and the varying relative positions of the axle counter and the first turnout, including the following situations:
[0081] When the tip of the first turnout is to the right, if the axle counting device is to the left of the first turnout, then the front branch of the first turnout is connected to the axle counting device; if the axle counting device is to the right of the first turnout, then the rear branch of the first turnout is connected to the axle counting device.
[0082] When the tip of the first turnout is to the left, if the axle counting device is to the left of the first turnout, then the branch of the first turnout after the turnout is connected to the axle counting device; if the axle counting device is to the right of the first turnout, then the branch of the first turnout before the turnout is connected to the axle counting device.
[0083] S423. If the device closest to the first turnout element within the third specified range is a turnout device (for ease of description, the turnout device closest to the first turnout element is referred to as the second turnout), then connect the branch of the turnout represented by the first turnout element to the middle of the two turnout devices, and continue to execute S424.
[0084] Specifically, depending on the direction and relative position of the tips of the first and second turnouts, the connection methods include the following:
[0085] The first turnout points to the right, and the second turnout points in the same direction. If the second turnout is to the left of the first turnout, then connect the front branch of the first turnout to the rear branch of the second turnout; if the second turnout is to the right of the first turnout, then connect the rear branch of the first turnout to the front branch of the second turnout.
[0086] The first turnout points to the right, and the second turnout points to the opposite direction. If the second turnout is to the left of the first turnout, then connect the front branch of the first turnout to the front branch of the second turnout; if the second turnout is to the right of the first turnout, then connect the rear branch of the first turnout to the rear branch of the second turnout.
[0087] The first turnout points to the left, and the second turnout points in the same direction. If the second turnout is to the left of the first turnout, then connect the rear branch of the first turnout to the front branch of the second turnout; if the second turnout is to the right of the first turnout, then connect the front branch of the first turnout to the rear branch of the second turnout.
[0088] The first turnout points to the left, and the second turnout points to the opposite direction. If the second turnout is to the left of the first turnout, then connect the rear branch of the first turnout to the rear branch of the second turnout; if the second turnout is to the right of the first turnout, then connect the front branch of the first turnout to the front branch of the second turnout.
[0089] If the device closest to the first turnout element within the third specified range is not a turnout device, then return to S421 and continue searching within the third specified range on both sides of the next turnout element to determine whether the device closest to it is an axle counting device or a turnout device.
[0090] S424. Within the fourth specified range, find the straight endpoint at the reverse position of the first turnout. If the other endpoint of the extended straight line is connected to the reverse position of another turnout, connect the reverse branch of the first turnout to the reverse branch of the turnout at the other endpoint of the extended straight line, return to S421, and search for and connect the next turnout element. If the other endpoint of the extended straight line is not connected to the reverse position of another turnout, continue to execute step S425. Wherein, the fourth specified range is: the difference between the horizontal coordinate and the first turnout is less than 1 unit coordinate, and the difference between the vertical coordinate and the first turnout is less than 5 units coordinate.
[0091] S425. Within the fifth specified range on both sides of the other end of the first turnout reverse straight line extension, search for axle counting devices and turnout devices. First, determine whether the device closest to the end is an axle counting device. If it is an axle counting device, extend the first turnout reverse branch to the other end of the straight line and then connect it to the axle counting device, and return to S421 to search and connect the next turnout element. If it is not an axle counting device, directly execute step S426. The fifth specified range is defined as: the difference between the ordinate and the other end of the first turnout reverse straight line is less than 5 coordinate units.
[0092] S426. Within the fifth specified range to the left and right of the other end point of the reverse straight line extension of each first turnout, determine whether the device closest to that end point is a turnout device. If it is a turnout device (for ease of description, the turnout device closest to the end point of the reverse straight line of the first turnout is referred to as the third turnout), then connect the first turnout and the third turnout according to the direction of the turnout tip and the opening direction, and then return to S421 to search and connect the next turnout element; if it is not a turnout device, then directly return to S421 to search and connect the next turnout element.
[0093] Specifically, the connection is made based on the direction of the tips and the direction of opening of the first and third turnouts, as follows:
[0094] If the direction of the tip and the direction of the opening of the first turnout and the third turnout are the same, it indicates that the first turnout is a single-acting turnout. The reverse branch of the first turnout is extended to the end point and then connected to the front branch of the third turnout.
[0095] If the first turnout and the third turnout have different tips but the same opening direction, it indicates that the first turnout is a double-acting turnout. The reverse branch of the first turnout is extended to the end point and then connected to the branch of the third turnout.
[0096] S43. According to steps S41 to S42, traverse all axle counting elements and turnout elements to complete the drawing of all sections and turnouts;
[0097] S5. Based on the equipment type and attributes extracted in S2, obtain the names of each signal equipment element named after the equipment name, use them as the names and attributes of the corresponding controls in the station diagram, and call the text control to place the names and attributes above the corresponding signal equipment to complete the drawing of the station diagram.
[0098] S6. When it is necessary to modify the station layout plan, the signal equipment can be manually operated, such as modifying equipment attributes, adding or deleting equipment, etc., to improve the attributes that cannot be directly obtained from the station layout plan and provide input for the interlocking data structure.
[0099] Although the present invention has been described in detail through the preferred embodiments above, it should be understood that the above description should not be considered as a limitation of the present invention. Various modifications and substitutions to the present invention will be apparent to those skilled in the art after reading the above description. Therefore, the scope of protection of the present invention should be defined by the appended claims.
Claims
1. A method for extracting and instantiating station plan information based on DXF format, characterized in that, Includes the following steps: S1. Based on the principles of computer interlocking station interlocking chart compilation and combined with the existing equipment types in the station plan, design signal equipment controls and their attributes; S2. The ENTITIES module reads the DXF file and obtains the type, coordinates, and attributes of each device in the station signal plan based on the graphic object code of the DXF file. S3. Based on the equipment type and corresponding coordinates and rotation attributes extracted in step S2, call the different types of equipment controls designed in S1 to draw the signal, turnout and axle counter at the corresponding coordinate positions to form the initial station map. S4. Based on the initial station map, generate sections according to each axle position using a graphical position algorithm, and connect the turnouts in the station map to form a continuous and complete station map. S5. Based on the equipment type and attributes extracted in step S2, obtain the names of each signal equipment element named after the equipment name, use them as the names and attributes of the corresponding controls in the station diagram, and call the text control to place the names and attributes above the corresponding signal equipment to complete the drawing of the station diagram. S6. When it is necessary to modify the station layout plan, the signaling equipment is manually operated to improve the attributes that cannot be directly obtained from the station layout plan, providing input for the interlocking data structure.
2. The method for extracting and instantiating station plan information based on DXF format as described in claim 1, characterized in that, The signal equipment controls include signal controller controls, turnout controls, axle counter controls, section controls, text controls, left and right directional arrow controls, button controls, indicator light controls, and platform controls.
3. The method for extracting and instantiating station plan information based on DXF format as described in claim 2, characterized in that, Step S2 further includes the following steps: S21. Read DXF format data and determine whether each line of data is an ENTITIES field. If it is not an ENTITIES field, read the next line of data. If it is an ENTITIES field, obtain each entity segment that conforms to the device type naming rules line by line. S22. Read the DXF format data line by line until the data with the ENDSEC field is read, then end the information extraction process.
4. The method for extracting and instantiating station plan information based on DXF format as described in claim 3, characterized in that, Step S21 includes the following cases: If the data in the row is the equipment type name corresponding to the signal machine entity or the turnout entity, then extract the equipment name corresponding to DXF group code 1, the equipment horizontal coordinate corresponding to group code 10, the equipment vertical coordinate corresponding to group code 20, and the equipment rotation attribute corresponding to group code 50. If the data in this row is the name of the equipment type corresponding to the axis counting entity, then extract the horizontal coordinate of the equipment corresponding to group code 10, the vertical coordinate of the equipment corresponding to group code 20, and the rotation attribute of the equipment corresponding to group code 50.
5. The method for extracting and instantiating station plan information based on DXF format as described in claim 4, characterized in that, Step S4 further includes the following steps: S41. For each axle counting element, draw a segment and set the segment name according to the coordinates of the axle and its adjacent devices; S42. For each turnout graphic element, draw the turnout and connect the axle counting device and the turnout device according to the direction of the turnout tip and its adjacent equipment. S43. Traverse the axle counts and turnouts in the station diagram, and complete the drawing of all sections and turnouts according to the drawing and connection methods in S41 and S42.
6. The method for extracting and instantiating station plan information based on DXF format as described in claim 5, characterized in that, For each axis counting element, step S41 further includes the following steps: S411. For each axle counting element, search for axle counting devices and turnout devices within the first specified range to the right of its coordinates; S412. If the nearest device to the right of the axle counting element is an axle counting device, then the area between these two axle counting elements is a segment. The segment control is called to draw the segment. The starting and ending coordinates of the segment are the coordinates of the two axle counting elements, respectively. Then, S413 is executed. If the nearest device to the right of the axle counting element is not an axle counting device, then S411 is returned. S413. Within the second specified range between the two counting axes, search from left to right for text elements that satisfy the segment naming rules, and determine whether the text element is within the range of the segment. If it is, use the text element as the name attribute of the segment formed by the two counting axes, and return to S411. If the text element is not within the range of the segment, continue searching until a text element is found within the second specified range as the name attribute of the segment, and then return to S411.
7. The method for extracting and instantiating station plan information based on DXF format as described in claim 6, characterized in that, For each axle element, the first specified range is: the difference between its ordinate and the axle coordinate is less than 5 units; for two axles, the second specified range is: the axle coordinate is between the axle coordinates of the two axles, and the difference between the ordinate and the axle coordinate is less than 5 units.
8. The method for extracting and instantiating station plan information based on DXF format as described in claim 5, characterized in that, For each turnout element, step S42 further includes the following steps: S421. For each turnout graphic element, search for the axle counting device and the turnout device within the third specified range on both its left and right sides. S422. If the device closest to the turnout element within the third specified range is an axle counting device, then connect the branch of the turnout represented by the turnout element to the axle counting device and execute S425; if the device closest to the turnout element within the third specified range is not an axle counting device, then continue to execute S423. S423. If the device closest to the turnout element within the third specified range is a turnout device, then connect the branch of the turnout represented by the turnout element to the middle of the two turnout devices, and execute S425; if the device closest to the turnout element within the third specified range is not a turnout device, then return to S421, continue searching within the third specified range on both sides of the next turnout element and determine whether the device closest to it is an axle counting device or a turnout device. S424. Locate the straight endpoint of the turnout in the reverse position within the fourth specified range. If the other endpoint of the extended straight line is connected to the reverse position of another turnout, connect the reverse branch of the turnout to the reverse branch of the turnout at the other endpoint of the extended straight line, and return to S421. If the other endpoint of the extended straight line is not connected to the reverse position of another turnout, execute S425. S425. Search for axle counting devices and turnout devices within the fifth specified range on both sides of the other end of the straight extension of each turnout in reverse position. If the device closest to the end is an axle counting device, extend the turnout in reverse position branch to the other end of the straight line and then connect it to the axle counting device, and return to S421; if the device closest to the end is not an axle counting device, execute S426. S426. Within the fifth specified range on both sides of the other end of the reverse straight extension of each turnout, if the nearest adjacent device to the other end of the reverse straight extension of each turnout is a turnout device, then connect the two turnouts according to the direction of the turnout tip and the opening direction, and then return to S421; if the nearest adjacent device to the other end of the reverse straight extension of each turnout is not a turnout device, then directly return to S421.
9. The method for extracting and instantiating station plan information based on DXF format as described in claim 8, characterized in that, For each turnout graphic element, the third specified range is: the difference between its ordinate and coordinate is less than 3 units; the fourth specified range is: the difference between its abscissa and coordinate is less than 1 unit, and the difference between its ordinate and coordinate is less than 5 units; the fifth specified range is: the difference between its ordinate and coordinate of the other end of its opposite straight line is less than 5 units.
10. The method for extracting and instantiating station plan information based on DXF format as described in claim 8, characterized in that, Step S422 includes the following situations: When the tip of the turnout is to the right, if the axle counting device is on the left side of the turnout, the front branch of the turnout is connected to the axle counting device; if the axle counting device is on the right side of the turnout, the rear branch of the turnout is connected to the axle counting device. When the tip of the turnout is to the left, if the axle counting device is on the left side of the turnout, then the branch of the turnout is connected to the axle counting device. If the axle counter is located to the right of the turnout, then the branch of the turnout in front of the turnout is connected to the axle counter.
11. The method for extracting and instantiating station plan information based on DXF format as described in claim 8, characterized in that, Step S423 includes the following situations: The first turnout points to the right, and the second turnout points in the same direction. If the second turnout is to the left of the first turnout, then connect the front branch of the first turnout to the rear branch of the second turnout; if the second turnout is to the right of the first turnout, then connect the rear branch of the first turnout to the front branch of the second turnout. The first turnout points to the right, and the second turnout points to the opposite direction. If the second turnout is to the left of the first turnout, then connect the front branch of the first turnout to the front branch of the second turnout; if the second turnout is to the right of the first turnout, then connect the rear branch of the first turnout to the rear branch of the second turnout. The first turnout points to the left, and the second turnout points in the same direction. If the second turnout is to the left of the first turnout, then connect the rear branch of the first turnout to the front branch of the second turnout; if the second turnout is to the right of the first turnout, then connect the front branch of the first turnout to the rear branch of the second turnout. The first turnout points to the left, and the second turnout points to the opposite direction. If the second turnout is to the left of the first turnout, then connect the rear branch of the first turnout to the rear branch of the second turnout; if the second turnout is to the right of the first turnout, then connect the front branch of the first turnout to the front branch of the second turnout. Wherein, the first turnout is each of the turnouts being drawn, and the second turnout is the turnout device closest to the first turnout.
12. The method for extracting and instantiating station plan information based on DXF format as described in claim 8, characterized in that, Step S426 includes the following situations: If the tips and opening directions of the first and third turnouts are the same, then the reverse branch of the first turnout is extended to the end point and then connected to the front branch of the third turnout. If the first turnout and the third turnout have different tips but the same opening direction, then extend the reverse branch of the first turnout to the end point and connect it with the post-turnout branch of the third turnout. Wherein, the first turnout is each of the turnouts being drawn, and the third turnout is the turnout device closest to the reverse straight end of the first turnout.