A rail transit shunting connection path generation method, program product, electronic device and storage medium
By constructing a topology model with strong binding between track and turnout states in a graph database, and utilizing a two-layer filtering mechanism and path weight screening, the problem of path generation lag when turnout states frequently switch is solved, and accurate, real-time and safe automatic switching of rail transit shunting paths is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHUHAI UNITECH POWER TECHNOLOGY CO LTD
- Filing Date
- 2026-06-23
- Publication Date
- 2026-07-24
AI Technical Summary
In existing technologies, when turnout states change frequently, the rail transit shunting route generation system responds slowly, which can easily lead to a disconnect between the turnout state and the current state when the route is generated.
A graph database is used to construct a topology model that strongly binds track and turnout states. A two-layer filtering mechanism is used to exclude faulty equipment, match turnout states with connection relationships, and select the optimal connecting path according to path weight, so as to realize automatic path switching when turnout states change.
It achieves accuracy, real-time performance, and safety in shunting routes, reduces ambiguity and disconnect between multiple branch paths, and improves the safety and efficiency of shunting operations.
Smart Images

Figure CN122443534A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of rail transit control technology, and more specifically, to a method for generating rail transit shunting connection paths, a program product, electronic equipment, and a storage medium. Background Technology
[0002] Rail transit shunting operations are a core component ensuring efficient station turnover and orderly vehicle dispatching. In rail transit shunting operations, the switch status is the sole control variable for track connectivity. When a switch is in one of three states—positioned, reversed, or faulty—the corresponding downstream tracks are completely different, and the shunting path must simultaneously meet the triple constraints of equipment availability, operational priority, and train safety interlocking. However, existing solutions generally employ static configuration or recursive queries of relational databases. When switch statuses change frequently (e.g., during the morning rush hour in a subway depot, a single set of throat switches can operate 30-40 times per hour), the system response lags significantly, easily leading to a disconnect where the switch status has changed by the time the path is generated. Summary of the Invention
[0003] The purpose of this application is to provide a method, program product, electronic device and storage medium for generating rail transit shunting connection paths, so as to solve the technical problem in the prior art that when the turnout state changes frequently, the system response is seriously delayed and the state of the turnout state has changed when the path is generated is easily disconnected.
[0004] In a first aspect, embodiments of this application provide a method for generating a shunting connection path for rail transit. This method can be executed by an electronic device, or by a component (such as a circuit, chip, or chip system) configured in the electronic device, or by a logic module or software capable of implementing all or part of the functions of the electronic device. This application does not limit this; the following description uses the execution of the method by an electronic device as an example.
[0005] The method for generating shunting connection paths in rail transit is applied to a rail transit dispatching system. The rail transit dispatching system deploys a graph database, which stores the first attribute information of track nodes, the second attribute information of turnout nodes, and directed connection relationships. The first attribute information includes the availability status of track nodes, the second attribute information includes the real-time status of turnout nodes, and the directed connection relationships include direct connections between track nodes and linkage relationships between track nodes and turnout nodes. The linkage relationships are bound to corresponding turnout status conditions, which are used to indicate different linkage relationships.
[0006] The method for generating rail transit shunting connection paths specifically includes: searching for candidate connection paths from a graph database based on the starting track node and the ending track node, and performing a two-layer filtering process during the search; if at least one candidate connection path is found, calculating the path weight corresponding to each candidate connection path based on the weight attributes corresponding to the directed connection relationships of each segment in the candidate connection path; and determining the target connection path from at least one candidate connection path based on the path weight.
[0007] The aforementioned dual-layer filtering includes: a first layer of filtering that excludes unavailable devices based on their availability and real-time status; and a second layer of filtering that selectively retains linkage relationships based on whether the switch status conditions bound to the linkage relationship are consistent with the real-time status of the switch node.
[0008] In the above scheme, the station tracks and turnouts are abstracted as track nodes and turnout nodes in a graph database. A static, direct connection relationship (i.e., the direct connection between track nodes) is established, bound to the turnout status, creating a dynamic linkage relationship (i.e., the linkage relationship between track nodes and turnout nodes). A two-layer filtering mechanism (i.e., first-layer filtering and second-layer filtering) is used to eliminate faulty equipment, match turnout status with connection relationships, and filter the optimal connecting path according to path weight, enabling automatic path switching when the turnout status changes. Since the turnout status and the linked path are strongly bound and correspond one-to-one, the connecting path can automatically switch after a status change, eliminating the need for manual configuration or system restart. Therefore, the method provided in this application can solve the problems of slow response, poor adaptability, and error-proneness in traditional shunting path planning.
[0009] In an optional implementation, the steps of searching for candidate connecting paths from the graph database based on the starting track node and the ending track node, and performing a two-layer filtering process during the search, specifically include: taking the starting track node as the current node, repeating the following steps until the current node is the ending track node to obtain candidate connecting paths: obtaining the directed connection relationships adjacent to the current node; performing a first layer of filtering on the adjacent directed connection relationships based on the available status or real-time status of the nodes pointed to by the adjacent directed connection relationships to obtain a first candidate connection relationship; determining the direct connection relationships in the first candidate connection relationships as the second candidate connection relationship; and performing a second layer of filtering on the linkage relationships in the first candidate connection relationships based on the turnout status conditions and real-time status bound to the linkage relationships in the first candidate connection relationships to obtain a second candidate connection relationship; and determining the node pointed to by the second candidate connection relationship as the new current node.
[0010] In the above scheme, by taking the starting track node as the current node, repeatedly executing the following steps: obtaining adjacent directed connections, filtering the first layer to obtain the first candidate connection, directly determining the direct connection as the second candidate connection and filtering the linked connection to obtain the second candidate connection, and updating the node pointed to by the second candidate connection to the current node, until the end track node is reached, the graph database native traversal search of candidate connected paths is fully realized, ensuring the accuracy and real-time performance of path generation.
[0011] In an optional implementation, the first layer of filtering is: excluding directed connections to the track node whose available state is disabled, and excluding directed connections to the turnout node whose real-time state is faulty.
[0012] The above scheme defines the specific rules for the first layer of filtering, thereby eliminating faulty tracks, tracks blocked by construction, and faulty switches from the source. This reduces the generation of illegal, invalid, or safety-risk shunting routes due to the use of unavailable equipment, and improves the safety of shunting operations.
[0013] In an optional implementation, the second layer of filtering is to retain the linkage state where the bound turnout state condition is consistent with the real-time state of the pointed turnout node.
[0014] The above scheme defines the specific rules for the second layer of filtering, thereby achieving a one-to-one binding between turnout conditions and connecting paths, which reduces ambiguity of multi-branch paths, state disconnection, and incorrect connection problems, and ensures that a single turnout state corresponds to only one valid path branch.
[0015] In an optional implementation, the step of calculating the path weight of each candidate connected path based on the weight attributes corresponding to the directed connection relationships of each segment in the candidate connected path specifically includes: summing up the multiple weight attributes corresponding to the candidate connected paths to obtain the path weight of each candidate connected path.
[0016] In the above scheme, the path weight of each candidate connected path is obtained by accumulating the weight attributes of the directed connection relationships of each segment in the candidate connected path. The passage cost of the entire path is quantified into a comparable value, providing a unified quantitative basis for subsequent path ranking. This allows the path selection process to be objectively calculated and compared based on the total weight, improving the automation level of path generation.
[0017] In an optional implementation, the step of determining the target connecting path from at least one candidate connecting path based on the path weight specifically includes: selecting the candidate connecting path with the smallest path weight as the target connecting path.
[0018] In the above scheme, by selecting the candidate connecting path with the smallest path weight as the target connecting path, the path with the lowest overall cost is automatically selected from multiple candidate connecting paths. Since the weight of the positioning linkage relationship is lower than that of the inverse linkage relationship, this mechanism naturally favors the selection of the path with a higher proportion of positioning paths, thereby ensuring the safety and efficiency priority principle of shunting operations without manual intervention.
[0019] In an optional implementation, the step of determining the target connecting path from at least one candidate connecting path based on the path weight specifically includes: when there are multiple candidate connecting paths with the smallest path weight, selecting the candidate connecting path with the fewest turnout operation times and / or the shortest passage time as the target connecting path.
[0020] In the above scheme, when there are multiple candidate connecting paths with the lowest path weight, the path with the fewest turnout operations and / or the shortest passage time is further selected, realizing secondary selection in the case of multiple equivalent paths, and improving the precision and practicality of path selection.
[0021] In an optional implementation, the direct connection relationship has a first weight value, and the linkage relationship includes a positioning linkage sub-relationship and an inverted linkage sub-relationship. The positioning linkage sub-relationship is bound to a positioning state condition and has a second weight value, and the inverted linkage sub-relationship is bound to an inverted state condition and has a third weight value, and the second weight value is less than the third weight value.
[0022] The above scheme defines the weight values of direct connection, positioning linkage sub-relationship, and reverse positioning linkage sub-relationship, so that the system automatically favors the positioning linkage path when calculating the total path weight. This mechanism ensures that the positioning path is selected first, and at the same time provides a unified weight configuration standard for different turnout types.
[0023] In an optional implementation, before searching for candidate connecting paths from the graph database based on the starting track node and the ending track node, and performing double-layer filtering during the search process, the method for generating rail transit shunting connecting paths further includes: constructing track nodes, turnout nodes, and directed connections in the graph database; performing topology integrity verification on the constructed track nodes, turnout nodes, and directed connections; wherein, the topology integrity verification includes at least one of the following: isolated node detection, turnout state-relationship consistency verification, and redundant path detection.
[0024] In the above scheme, before path generation, track nodes, turnout nodes and directed connections are constructed in the graph database, and topology integrity checks such as isolated node detection, turnout status-relationship consistency verification, and redundant path detection are performed to ensure the quality and consistency of the basic topology network and avoid path generation anomalies caused by modeling errors. Furthermore, subsequent line modifications only require adding or deleting nodes and relationships without modifying code or restarting the system, which greatly reduces operation and maintenance costs.
[0025] Secondly, embodiments of this application provide a device for generating rail transit shunting connection paths. This device is applied to a rail transit dispatching system. The rail transit dispatching system is equipped with a graph database. The graph database stores first attribute information of track nodes, second attribute information of turnout nodes, and directed connection relationships. The first attribute information includes the availability status of track nodes, the second attribute information includes the real-time status of turnout nodes, and the directed connection relationships include direct connections between track nodes and linkage relationships between track nodes and turnout nodes. The linkage relationships are bound to corresponding turnout status conditions, which are used to indicate different linkage relationships.
[0026] The device for generating rail transit shunting connection paths specifically includes: a search module, used to search for candidate connection paths from a graph database based on the starting track node and the ending track node, and to perform a two-layer filtering process during the search; a calculation module, used to calculate the path weight corresponding to each candidate connection path based on the weight attributes corresponding to the directed connection relationships of each segment in the candidate connection path if at least one candidate connection path is found; and a determination module, used to determine the target connection path from at least one candidate connection path according to the path weight.
[0027] The aforementioned dual-layer filtering includes: a first layer of filtering that excludes unavailable devices based on their availability and real-time status; and a second layer of filtering that selectively retains linkage relationships based on whether the switch status conditions bound to the linkage relationship are consistent with the real-time status of the switch node.
[0028] In the above scheme, the station tracks and turnouts are abstracted as track nodes and turnout nodes in a graph database. A static, direct connection relationship (i.e., the direct connection between track nodes) is established, bound to the turnout status, creating a dynamic linkage relationship (i.e., the linkage relationship between track nodes and turnout nodes). A two-layer filtering mechanism (i.e., first-layer filtering and second-layer filtering) is used to eliminate faulty equipment, match turnout status with connection relationships, and filter the optimal connecting path according to path weight, enabling automatic path switching when the turnout status changes. Since the turnout status and the linked path are strongly bound and correspond one-to-one, the connecting path can automatically switch after a status change, eliminating the need for manual configuration or system restart. Therefore, the method provided in this application can solve the problems of slow response, poor adaptability, and error-proneness in traditional shunting path planning.
[0029] In an optional implementation, the search module is specifically used to: take the starting track node as the current node, repeat the following steps until the current node is the ending track node, and obtain candidate connecting paths: obtain the directed connection relationships adjacent to the current node; perform a first-level filtering on the adjacent directed connection relationships based on the available status or real-time status of the nodes pointed to by the adjacent directed connection relationships to obtain a first candidate connection relationship; determine the direct connection relationship in the first candidate connection relationship as the second candidate connection relationship, and perform a second-level filtering on the linkage relationship in the first candidate connection relationship based on the turnout status conditions and real-time status bound to the linkage relationship in the first candidate connection relationship to obtain a second candidate connection relationship; and determine the node pointed to by the second candidate connection relationship as the new current node.
[0030] In the above scheme, by taking the starting track node as the current node, repeatedly executing the following steps: obtaining adjacent directed connections, filtering the first layer to obtain the first candidate connection, directly determining the direct connection as the second candidate connection and filtering the linked connection to obtain the second candidate connection, and updating the node pointed to by the second candidate connection to the current node, until the end track node is reached, the graph database native traversal search of candidate connected paths is fully realized, ensuring the accuracy and real-time performance of path generation.
[0031] In an optional implementation, the first layer of filtering is: excluding directed connections to the track node whose available state is disabled, and excluding directed connections to the turnout node whose real-time state is faulty.
[0032] The above scheme defines the specific rules for the first layer of filtering, thereby eliminating faulty tracks, tracks blocked by construction, and faulty switches from the source. This reduces the generation of illegal, invalid, or safety-risk shunting routes due to the use of unavailable equipment, and improves the safety of shunting operations.
[0033] In an optional implementation, the second layer of filtering is to retain the linkage state where the bound turnout state condition is consistent with the real-time state of the pointed turnout node.
[0034] The above scheme defines the specific rules for the second layer of filtering, thereby achieving a one-to-one binding between turnout conditions and connecting paths, which reduces ambiguity of multi-branch paths, state disconnection, and incorrect connection problems, and ensures that a single turnout state corresponds to only one valid path branch.
[0035] In an optional implementation, the above calculation module is specifically used to: sum up multiple weight attributes corresponding to the candidate connected paths to obtain the path weight of each candidate connected path.
[0036] In the above scheme, the path weight of each candidate connected path is obtained by accumulating the weight attributes of the directed connection relationships of each segment in the candidate connected path. The passage cost of the entire path is quantified into a comparable value, providing a unified quantitative basis for subsequent path ranking. This allows the path selection process to be objectively calculated and compared based on the total weight, improving the automation level of path generation.
[0037] In an optional implementation, the determination module is specifically used to: select the candidate connecting path with the smallest path weight as the target connecting path.
[0038] In the above scheme, by selecting the candidate connecting path with the smallest path weight as the target connecting path, the path with the lowest overall cost is automatically selected from multiple candidate connecting paths. Since the weight of the positioning linkage relationship is lower than that of the inverse linkage relationship, this mechanism naturally favors the selection of the path with a higher proportion of positioning paths, thereby ensuring the safety and efficiency priority principle of shunting operations without manual intervention.
[0039] In an optional implementation, the determination module is specifically used to: when there are multiple candidate connecting paths with the smallest path weight, select the candidate connecting path with the fewest turnout operation times and / or the shortest passage time as the target connecting path.
[0040] In the above scheme, when there are multiple candidate connecting paths with the lowest path weight, the path with the fewest turnout operations and / or the shortest passage time is further selected, realizing secondary selection in the case of multiple equivalent paths, and improving the precision and practicality of path selection.
[0041] In an optional implementation, the direct connection relationship has a first weight value, and the linkage relationship includes a positioning linkage sub-relationship and an inverted linkage sub-relationship. The positioning linkage sub-relationship is bound to a positioning state condition and has a second weight value, and the inverted linkage sub-relationship is bound to an inverted state condition and has a third weight value, and the second weight value is less than the third weight value.
[0042] The above scheme defines the weight values of direct connection, positioning linkage sub-relationship, and reverse positioning linkage sub-relationship, so that the system automatically favors the positioning linkage path when calculating the total path weight. This mechanism ensures that the positioning path is selected first, and at the same time provides a unified weight configuration standard for different turnout types.
[0043] In an optional implementation, the rail transit shunting connection path generation device provided in this application further includes: a construction module for constructing track nodes, turnout nodes, and directed connection relationships in a graph database; and a verification module for performing topology integrity verification on the constructed track nodes, turnout nodes, and directed connection relationships; wherein the topology integrity verification includes at least one of the following: isolated node detection, turnout state-relationship consistency verification, and redundant path detection.
[0044] In the above scheme, before path generation, track nodes, turnout nodes and directed connections are constructed in the graph database, and topology integrity checks such as isolated node detection, turnout status-relationship consistency verification, and redundant path detection are performed to ensure the quality and consistency of the basic topology network and avoid path generation anomalies caused by modeling errors. Furthermore, subsequent line modifications only require adding or deleting nodes and relationships without modifying code or restarting the system, which greatly reduces operation and maintenance costs.
[0045] Thirdly, embodiments of this application provide a computer program product, including computer program instructions, which, when read and executed by a processor, perform the method for generating rail transit shunting connection paths as described in the first aspect.
[0046] Fourthly, embodiments of this application provide an electronic device, including: a processor, a memory, and a bus; the processor and the memory communicate with each other via the bus; the memory stores computer program instructions executable by the processor, and the processor can execute the method for generating rail transit shunting connection paths as described in the first aspect by calling the computer program instructions.
[0047] Fifthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a computer, cause the computer to perform the method for generating rail transit shunting connection paths as described in the first aspect.
[0048] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, embodiments of this application are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0049] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 A schematic diagram illustrating a method for generating a rail transit shunting connection path provided in an embodiment of this application; Figure 2 This is a schematic diagram of the shunting topology in the throat area of a depot, provided in an embodiment of this application. Figure 3 A structural block diagram of a device for generating rail transit shunting connection paths provided in an embodiment of this application; Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0051] Rail transit shunting operations are a core component ensuring efficient station turnover and orderly vehicle dispatching. In rail transit shunting operations, the switch status is the sole control variable for track connectivity. When a switch is in one of three states—positioned, reversed, or faulty—the corresponding downstream tracks are completely different, and the shunting path must simultaneously meet the triple constraints of equipment availability, operational priority, and train safety interlocking. However, existing solutions generally employ static configuration or recursive queries of relational databases. When switch statuses change frequently (e.g., during the morning rush hour in a subway depot, a single set of throat switches can operate 30-40 times per hour), the system response lags significantly, easily leading to a disconnect where the switch status has changed by the time the path is generated.
[0052] In view of this, this application provides a method for generating shunting connection paths in rail transit. It constructs a dedicated topology model with strong binding between track and turnout states using a graph database, enabling dynamic management of the shunting topology and intelligent path generation, ensuring the uniqueness, safety, real-time performance, and optimality of shunting paths. Specifically, it abstracts station tracks and turnouts as graph database nodes, establishing a dynamic linkage relationship between static direct connections without turnouts and turnout states. A two-layer filtering mechanism is used to eliminate faulty equipment, match turnout states with connection relationships, and filter the optimal connection path according to path weight, enabling automatic path switching when turnout states change. This invention solves the problems of slow response, poor adaptability, and error susceptibility in traditional shunting path planning.
[0053] It should be noted that the method for generating rail transit shunting connection paths provided in this application embodiment is applicable to dynamic path planning, real-time shunting operation control, and safety interlocking verification scenarios involving track and turnout linkage within subway depots, national railway EMU depots, railway hub stations, and parking lots. It has the advantages of strong dynamic adaptability, accurate and safe paths, fast response speed, and simple operation and maintenance.
[0054] The solution provided in this application will be described in detail below with reference to the corresponding flowcharts. It is understood that the illustrative flowcharts provided in this application primarily use an electronic device as the execution subject to illustrate the method, but this application does not limit the execution subject of the method. For example, the electronic device in the illustrative flowchart can also be a chip, chip system, or processor that supports the electronic device in implementing the method, or it can be a logic module or software that can implement all or part of the functions of the electronic device.
[0055] Please refer to Figure 1 , Figure 1 This diagram illustrates a method for generating a rail transit shunting connection path according to an embodiment of this application. The method can, but is not limited to, be executed by an electronic device. Figure 3 The possible structure of this electronic device is shown below; for details, please refer to the following section. Figure 3 The explanation.
[0056] The method for generating rail transit shunting connection paths is applied to a rail transit dispatching system, which deploys a graph database. A rail transit dispatching system is a system used to manage shunting operations at rail transit stations. A graph database is a database system that uses nodes and relationships as basic storage units and supports native graph traversal. In this embodiment, the graph database is used to store the station topology network and equipment attributes, and to perform path search and filtering calculations.
[0057] One possible implementation is to abstract the physical equipment of the station into standardized graph nodes in the graph database China, such as track nodes and switch nodes.
[0058] Track nodes refer to nodes in a graph database used to abstractly represent each track within a depot. In one optional implementation, each track node has a set of attribute information, referred to as first attribute information. For example, the first attribute information may include an availability status (is_available), which indicates whether the track node is available for shunting, and may include states such as disabled due to fault / construction closure or normally available.
[0059] Furthermore, the first attribute information may also include a globally unique track code (track_code), track name (track_name), effective track length (track_length), and limit type (limit_type). The effective track length represents the length of the track node that can be effectively used for train or shunting operations, and its unit can be meters. The limit type indicates the types of vehicles or limit requirements allowed to pass through the track node, which may include general-purpose, EMU-only, locomotive-only, etc.
[0060] Optionally, the data types for the globally unique track code, track name, and boundary type can be strings, while the data types for availability status and effective track length can be integers. For example, an availability status of 0 (is_available = 0) indicates that the track node is faulty or disabled due to construction closure, while an availability status of 1 (is_available = 1) indicates that the track node is normally available.
[0061] A turnout node refers to a node in a graph database used to abstractly represent each set of turnouts within a railway yard. In one optional implementation, each turnout node has a set of attribute information, referred to as second attribute information. For example, the second attribute information may include a real-time status (switch_status), which represents the current actual position or operating mode of the turnout node, and may include states such as positional, reversed, and fault.
[0062] Furthermore, the second attribute information may also include, for example: a globally unique switch code (switch_code), a switch name (switch_name), a switch type (switch_type), the code of the track connected in the normal state (normal_track), and the code of the track connected in the reverse state (reverse_track). The switch type may include single turnouts, double turnouts, crossovers, etc.
[0063] Optionally, the data type of the globally unique turnout code, turnout name, turnout type, track code connected in the positioning state, and track code connected in the reversed state can be a string, while the data type of the real-time status can be an integer. For example, a real-time status of 0 (switch_status = 0) indicates positioning, a real-time status of 1 (switch_status = 1) indicates reversed position, and a real-time status of 2 (switch_status = 2) indicates a fault.
[0064] A directed connection refers to an edge in a graph database that connects two nodes (track node and track node, or track node and turnout node), and has directionality. In the embodiments of this application, a directed connection may include a direct connection between track nodes and a linkage relationship between track nodes and turnout nodes. A direct connection refers to a static directed relationship between track nodes without state constraints, while a linkage relationship refers to a dynamic directed relationship between track nodes and turnout nodes with state constraints.
[0065] It should be noted that the physical connectivity rules of the track depot, the mechanical linkage principle of the turnouts, and the train interlocking logic are the sole underlying basis for constructing the topological connection relationship in the embodiments of this application. Specifically, firstly, the two tracks in the turnout-free section are permanently and fixedly physically connected, unaffected by turnout operations; therefore, a static direct connection relationship without state constraints can be constructed.
[0066] Secondly, the turnout is a core switching device in rail transit, relying on its mechanical structure to achieve two unique guiding logics: positioning and reversal. When the turnout is in the positioning position, it is physically connected only to the preset positioning track; when the turnout is in the reversal position, it is physically connected only to the preset reversal track; in the event of a turnout failure, both sides are completely disconnected, resulting in a physical circuit break. Based on these mechanical conduction characteristics, the differentiated connection logic on both sides of the turnout can be abstracted into a dynamic linkage relationship with state condition constraints.
[0067] Based on the aforementioned underlying principles, this application defines two types of directed connection relationships: the first is a direct connection between track nodes (DIRECT_LINK) and a linkage relationship between track nodes and turnout nodes (SWITCH_LINK). The linkage relationship is bound to a corresponding turnout status condition, which is stored in the status field of the linkage relationship. This field indicates that different linkage relationships are valid only when the real-time status of the turnout node equals this value.
[0068] The first type of directed connection relationship (i.e., the direct connection between track nodes) is applicable to fixed connection scenarios without branch sections and is a static relationship without state constraints. For example, the relationship attributes of the direct connection relationship may include: path weight (default 1), travel time (seconds), and travel direction (0 = bidirectional, 1 = unidirectional).
[0069] An optional implementation method may include the following rules for creating direct connections: strictly following the physical adjacency relationships of the site construction plan and the site wiring diagram; belonging to the global static topology, unaffected by equipment status and operation mode, and valid for a long time; including attributes such as travel direction, travel time, and path weight for path cost calculation; establishing bidirectional relationships for bidirectional travel sections, and establishing only unidirectional relationships for unidirectional travel sections.
[0070] The second type of directed connection relationship (i.e., the linkage relationship between track nodes and turnout nodes) is a dynamic directed relationship with state constraints, including positional linkage sub-relationships and reverse linkage sub-relationships. For example, the positional linkage sub-relationship is only effective when switch_status = 0, and the reverse linkage sub-relationship is only effective when switch_status = 1.
[0071] An optional implementation can combine shunting operation safety regulations to configure differentiated weights for different connection modes, achieving a path selection rule that prioritizes positioning and optimizes safety. For directed connections, the weight of the positioning path can be lower than that of the reverse path; for example, the weight of the positioning path can be 1, and the weight of the reverse path can be 2. This way, when selecting paths in ascending order of total weight, the positioning path can be prioritized, conforming to industry standards that prioritize safety and efficiency in shunting operations.
[0072] The rules for creating positional linkage sub-relationships and inverse positional linkage sub-relationships are introduced below.
[0073] First, let's introduce the rules for creating the positioning linkage sub-relationship: a directional connection link is established only between the access track, the turnout, and the target track; the logic is only activated when the switch_status corresponding to the turnout node is 0 (i.e., in position); a low weight (e.g., 1) is uniformly configured as the preferred recommended path; outside of the positioning status (reversed or faulty), the positioning linkage sub-relationship is automatically logically disconnected and passage is prohibited.
[0074] The following are the rules for creating reverse linkage sub-relationships: associations are created only within a fixed combination of access track, turnout, and reverse target track; the logic is only activated when the switch_status corresponding to the turnout node is 1 (i.e., reverse); a higher weight (e.g., 2) is uniformly configured as a secondary alternative path; under location or fault conditions, the reverse linkage sub-relationship is forcibly disabled to prevent incorrect connections.
[0075] For example, the aforementioned rail transit dispatching system can also communicate with the interlocking system to obtain the real-time status of the equipment. The interlocking system refers to a dedicated control system in the rail transit signaling system used to control field equipment such as switches and signals, ensuring route safety and preventing train collisions. The interlocking system collects the switch and track status in real time and controls the switches according to interlocking logic rules.
[0076] In this embodiment, the interlocking system, as the data source for the real-time status of turnout nodes and the availability status of track nodes, can establish a real-time data synchronization interface with the graph database to push the status of field equipment incrementally or synchronize it to the graph database at regular intervals, ensuring that the status attributes in the graph database are consistent with the physical field.
[0077] Specifically, when the status of a turnout or track changes abruptly, the interlocking system can push the aforementioned abrupt event to the graph database for millisecond-level updates; the interlocking system can perform periodic verification, such as comparing the status every second to reduce data deviation; the interlocking system can lock the status of turnouts and tracks, for example, after the shunting route is locked, the corresponding turnout and track status can be temporarily prohibited from being changed, and automatically unlocked after the operation is completed.
[0078] like Figure 1 As shown in the embodiments of this application, the method for generating rail transit shunting connection paths may specifically include the following steps: S101: Based on the starting track node and the ending track node, search for candidate connecting paths from the graph database and perform double-layer filtering during the search process.
[0079] The starting track node refers to the graph node corresponding to the track where the shunting operation begins, and the ending track node refers to the graph node corresponding to the target track of the shunting operation. The candidate connecting path refers to the sequence of nodes from the starting track node to the ending track node, passing through several directed connections and satisfying the two-layer filtering conditions.
[0080] Two-layer filtering refers to judging the directed connections at each step during the path search process, excluding relationships with unavailable devices or mismatched states, and retaining relationships that meet the criteria for path extension. One optional implementation includes a first layer of filtering and a second layer of filtering.
[0081] The first layer of filtering is used to exclude unavailable equipment. It is a hard filter for equipment availability (a safety blocking layer). Its filtering is based on the availability status (is_available) of track nodes and the real-time status (switch_status) of turnout nodes. Specifically, it excludes directed connections to track nodes whose availability status is disabled, and it excludes directed connections to turnout nodes whose real-time status is faulty. In other words, when a directed connection points to a track node whose availability status is disabled, or to a turnout node whose real-time status is faulty, that directed connection is excluded and does not participate in path extension.
[0082] For example, traverse all nodes within the path and automatically remove tracks that are faulty, under construction, or manually disabled: if the availability status of a track node is 0, it is directly determined to be impassable, and the entire path containing that track node is blocked and removed; automatically block faulty switches: if the real-time status of a switch node is 2, block all entry and exit linkages of that switch node and prohibit it from being included in the path.
[0083] Therefore, the first layer of filtering described above can eliminate faulty equipment at the source and prevent the generation of illegal, invalid, or unsafe shunting routes.
[0084] The second layer of filtering, used for selectively retaining linkage relationships, is a strong matching filter (topology logic layer) between the turnout status and the linkage relationship. Its filtering is based on the turnout status condition `rel.status` bound to the linkage relationship and the real-time status `switch_status` of the turnout node. Specifically, linkage relationships where the bound turnout status condition matches the real-time status of the pointed-to turnout node are retained. That is, for linkage relationships, the linkage relationship is only retained if the bound turnout status condition equals the real-time status of the pointed-to turnout node; for direct connections, they are retained directly.
[0085] For example, for all SWITCH_LINK turnout linkage relationships in the path, mandatory verification is performed: the binding status field of the linkage relationship (i.e., the turnout status condition bound to the linkage relationship) must be strictly equal to the real-time running status of the current turnout node; for turnouts in the positioning state (status = 0), only positioning linkage relationships with a turnout status condition of 0 are allowed to be activated, and reverse linkage relationships are forcibly disconnected; for turnouts in the reverse state (status = 1), only reverse linkage relationships with a turnout status condition of 1 are allowed to be activated, and positioning linkage relationships are forcibly disconnected; DIRECT_LINK track direct connection static relationships have no status constraints and are allowed to proceed normally.
[0086] Therefore, the second layer of filtering described above can bind turnout conditions to connecting paths one by one, completely solving the problems of ambiguity in multi-branch paths, disconnection of states, and incorrect connection.
[0087] In step S101 above, the graph database traverses from the starting path node. Upon discovering an adjacent directed connection, the two layers of filtering described above are immediately executed. Only connections that pass both the first and second layers of filtering are allowed for path extension. This process is repeated until the ending path node is reached or further extension is impossible. The sequence of all nodes that can reach the ending path node constitutes the candidate connected paths.
[0088] It should be noted that the above-mentioned S101 belongs to the internal logic of the graph database, and its specific implementation method is determined by the algorithm inside the graph database. This application embodiment does not specifically limit it. The following is an example to describe one implementation method of the above-mentioned S101. In this implementation method, the starting track node is taken as the current node, and the following steps are repeated until the current node is the ending track node to obtain the candidate connecting path: Step 1), obtain the directed connections adjacent to the current node.
[0089] Starting from the current node, the graph database queries all directed connections originating from that node.
[0090] Step 2) Based on the available or real-time status of the nodes pointed to by the adjacent directed connections, perform the first layer of filtering on the adjacent directed connections to obtain the first candidate connection.
[0091] For the directed connection relationship found, check the status of the node it points to and perform the first layer of filtering: if the node it points to is a track node, check whether its available status is disabled, and if it is disabled, exclude the relationship; if the node it points to is a turnout node, check whether its real-time status is faulty, and if it is faulty, exclude the relationship; otherwise, retain the relationship as the first candidate connection relationship.
[0092] Step 3) Determine the direct connection in the first candidate connection relationship as the second candidate connection relationship, and perform a second layer of filtering on the linkage relationship in the first candidate connection relationship based on the turnout status conditions and real-time status bound to the linkage relationship in the first candidate connection relationship to obtain the second candidate connection relationship.
[0093] For direct connections in the first candidate connection relationships, they are directly identified as the second candidate connection relationships. For linked connections in the first candidate connection relationships, a second layer of filtering is performed: the switch status conditions bound to the linked connection are compared with the real-time status of the switch node to which it is pointed. If they are consistent, the linked connection is retained as the second candidate connection relationship; otherwise, it is excluded.
[0094] Step 4) Determine the node pointed to by the second candidate connection as the new current node.
[0095] Take the node pointed to by the second candidate connection as the new current node, and then return to sub-step 1) and repeat until the node pointed to by the second candidate connection is the end track node, and end the loop.
[0096] S102: If at least one candidate connected path is found, calculate the path weight corresponding to each candidate connected path based on the weight attribute corresponding to the directed connection relationship of each segment in the candidate connected path.
[0097] Weight attributes refer to the preset values on each directed connection relationship, which are used for path cost calculation; correspondingly, path weight refers to the weight of the candidate connected path determined based on the weight attributes of all directed connections on the candidate connected path.
[0098] For example, the direct connection relationship has a first weight value (e.g., 1), the linkage relationship includes the positioning linkage sub-relationship and the reverse positioning linkage sub-relationship, the positioning linkage sub-relationship is bound to the positioning state condition and has a second weight value (e.g., 1), the reverse positioning linkage sub-relationship is bound to the reverse positioning state condition and has a third weight value (e.g., 2), and the second weight value is less than the third weight value.
[0099] In one optional implementation, S102 may specifically include: The path weight of each candidate connecting path is obtained by summing up the multiple weight attributes corresponding to the candidate connecting paths.
[0100] In other words, once the graph database successfully finds at least one candidate connected path, for each candidate connected path, the system sums the weights of the directed connections it contains to obtain the path weight. For example, if a candidate connected path contains two location-linked connections (each with a weight of 1) and one direct connection (with a weight of 1), then the path weight = 1 + 1 + 1 = 3.
[0101] S103: Determine the target connecting path from at least one candidate connecting path based on the path weight.
[0102] In one optional implementation, S103 may specifically include: selecting the candidate connecting path with the smallest path weight as the target connecting path.
[0103] In other words, all candidate connecting paths are sorted in ascending order of path weight, and the candidate connecting path with the smallest path weight is selected as the target connecting path. The smaller the path weight, the fewer turnout operations are required, the more likely the positioning mode will be used, and the higher the safety and compliance of shunting operations.
[0104] One possible implementation is that if there is only one candidate connectivity path, then that path is the target connectivity path.
[0105] In another optional implementation, S103 may further include: When there are multiple candidate connecting paths with the lowest path weight, the candidate connecting path with the fewest turnout operation times and / or the shortest passage time is selected as the target connecting path.
[0106] In other words, when multiple candidate connecting paths with the lowest path weight exist, a secondary selection can be performed to determine the target connecting path based on the number of turnout operations and the passage time. For example, the candidate connecting path with the fewest turnout operations can be selected as the target connecting path; or, the candidate connecting path with the shortest passage time can be selected as the target connecting path; or, the candidate connecting path with both the fewest turnout operations and the shortest passage time can be selected as the target connecting path.
[0107] An alternative implementation may limit the path traversal depth (e.g., a maximum of 10 levels) to prevent the generation of topological loops and excessively long invalid paths.
[0108] It should be noted that if at least one candidate connection path is found after S101, the compliant topology path and total path weight will be returned, and the real-time status of the field equipment will be matched synchronously to achieve dynamic, safe, and optimal automatic generation of shunting connection paths. If no candidate connection path is found after S101, S102 and S103 can be skipped, and a circuit breaker warning will be returned along with alternative solutions.
[0109] Furthermore, prior to S101 above, a basic topology network can be pre-created and persisted to a graph database; subsequent line modifications only require adding or deleting nodes and relationships, without needing to reconstruct the topology. In other words, prior to S101 above, the method provided in this application embodiment may also include the following steps: Step 1) Construct track nodes, turnout nodes, and directed connections in the graph database.
[0110] For example, firstly, a dedicated graph database instance can be created and an indexing strategy can be configured: unique constraints and equivalent indexes can be created for track codes and turnout codes; a composite index can be created for availability status and track codes; and a full-text index can be created for equipment names. Secondly, based on the station track plan, track nodes can be created one by one and turnout nodes can be created one group by group, clearly defining the corresponding connecting track codes for positioning and reversal. Finally, direct connections between track nodes, positioning linkages between track nodes and turnout nodes, and reversal linkages between track nodes and turnout nodes can be established.
[0111] Step 2) Perform topology integrity verification on the constructed track nodes, turnout nodes, and directed connections.
[0112] For example, topology integrity verification includes at least one of the following: isolated node detection, turnout status-relationship consistency verification, and redundant path detection.
[0113] Orphan node detection refers to the process of examining the existing track and turnout nodes in a graph database to identify nodes without any directed connections. Orphan node detection allows for the timely discovery and correction of modeling omissions or errors after topology construction or line modifications, ensuring the integrity of the topology network.
[0114] Turnout status-relationship consistency verification refers to performing a consistency check on the turnout nodes and their associated linkages in the graph database. This ensures that the static attributes of a turnout node (positional connecting track code, reverse connecting track code) match the target track nodes pointed to by the positional and reverse linkages associated with that turnout node. For example, if the positional connecting track code of a turnout node points to track A, then there must exist a linkage relationship originating from that turnout node, bound to the positional status condition, and pointing to track A. Inconsistencies may lead to logical contradictions during path lookups. Turnout status-relationship consistency verification guarantees the logical self-consistency between the mechanical characteristics and topological relationships of the turnout.
[0115] Redundant path detection refers to examining the directed connections already established in a graph database to identify multiple unnecessary connections between the same pair of nodes. By detecting redundant paths, redundant relationships can be removed, maintaining the simplicity and efficiency of the topological model.
[0116] Furthermore, based on the above embodiments, when the dispatcher manually triggers the operation, the switch status changes abruptly, or the track availability changes, the path retrieval can be immediately re-executed, the connecting path can be automatically switched, and the updated results can be pushed. If no available path is found after the refresh, the system returns a circuit breaker prompt and provides alternative operation plans.
[0117] Furthermore, based on the above embodiments, high-frequency shunting routes can be cached for a short period of time, and the equipment can be directly reused if there is no state change within the validity period.
[0118] Furthermore, based on the above embodiments, after the path is generated, the matching between the real-time status of the turnout and the path can be automatically reverse-checked. If there is a deviation, the current path is immediately invalidated and a new search is performed. At the same time, a turnout operation sequence is generated, specifying the turning command to be executed for each group of turnouts, so as to realize the full closed-loop linkage of path generation, turnout operation, status verification, and control.
[0119] The following example illustrates the method for generating rail transit shunting connection paths in this application. Please refer to... Figure 2 , Figure 2 This is a schematic diagram of the shunting topology in the throat area of a depot, provided in an embodiment of this application. The diagram includes three tracks (1 outbound track, 2 shunting tracks, and 3 maintenance tracks) and one set of throat turnouts (No. 1 throat turnout, a single turnout). The database used is Neo4j.
[0120] Step 1) Configure constraint and index creation in the graph database.
[0121] Create a unique constraint for the track_code attribute (i.e., the globally unique track code) of the track node to ensure that each track code is globally unique; create a unique constraint for the switch_code attribute (i.e., the globally unique switch code) of the turnout node to ensure that each turnout code is globally unique; create a composite index for the track_code and is_available attributes (i.e., availability status) of the track node to accelerate queries based on track code and availability status.
[0122] Step 2), based on the station's route plan, create three track nodes for each track.
[0123] Create the "Outbound Line 1" node: Set track_code to "T00000000001", track_name to "Outbound Line 1", is_available to 1 (available), track_length to 500 meters, and limit_type to "General".
[0124] Create the "Shunting Line 2" node: Set track_code to "T00000000002", track_name to "Shunting Line 2", is_available to 1, track_length to 450 meters, and limit_type to "General".
[0125] Create the "Maintenance Line 3" node: Set track_code to "T00000000003", track_name to "Maintenance Line 3", is_available to 1, track_length to 400 meters, and limit_type to "High-speed train only".
[0126] Step 3) Create turnout nodes based on the station track layout plan.
[0127] Set switch_code to “S00000000001”, switch_name to “1# throat turnout”, switch_type to “single turnout”, switch_status to 0 (position), normal_track to “T00000000002” (shunting track 2), and reverse_track to “T00000000003” (maintenance track 3).
[0128] Step 4), establish the positioning linkage relationship, the reverse linkage relationship, and the stock direct connection relationship respectively.
[0129] For the positioning linkage relationship: match the nodes of track 1 of the outbound line (track_code = T00000000001), node 1# turnout (switch_code = S00000000001), and node 2 of the shunting line (track_code = T00000000002); create a directed relationship from track 1 of the outbound line to turnout 1#, with the relationship type being SWITCH_LINK, the status attribute set to 0 (positioning), and the weight attribute set to 1; create a directed relationship from turnout 1# to shunting line 2, with the relationship type being SWITCH_LINK, the status attribute set to 0, and the weight attribute set to 1.
[0130] For reverse linkage relationships: match node 1 of the outbound line, node 1# turnout, and node 3 of the maintenance line; create a directed relationship from track 1 of the outbound line to turnout 1#, with relationship type SWITCH_LINK, attribute status set to 1 (reverse position), and weight set to 2; create a directed relationship from turnout 1# to maintenance line 3, with relationship type SWITCH_LINK, attribute status set to 1, and weight set to 2.
[0131] For direct connection relationships: match nodes of shunting line 2 and maintenance line 3; create a directed relationship from shunting line 2 to maintenance line 3, with relationship type DIRECT_LINK, attribute weight set to 1, pass_time set to 3 seconds, and dir_type set to 0 (bidirectional passage).
[0132] Step 5) Use Cypher statements to perform two-layer filtering and weight sorting to find the optimal path.
[0133] Matches the path from the starting track node (parameter startTrack) to the ending track node (parameter endTrack). The relationship in the path can be DIRECT_LINK or SWITCH_LINK, and the maximum path length is 10 hops.
[0134] First, the first layer of filtering is performed: All nodes in the path are traversed using the ALL condition. For track nodes, their `is_available` must equal 1 (available); for switch nodes, their `switch_status` cannot equal 2 (faulty). Entire paths that do not meet the conditions are excluded. Second, the second layer of filtering is performed: For all relations in the path, if the relation type is `SWITCH_LINK`, the `status` attribute value of that relation must equal the `switch_status` value of the switch node it points to. Direct connections `DIRECT_LINK` are allowed unconditionally. Next, the `weight` attribute of each relation in the path is summed to obtain the total weight of the path. Finally, the paths are sorted and selected in ascending order of total weight, and `LIMIT1` is used to select the unique path with the smallest weight. The final result is the returned path and its total weight.
[0135] Step 6) supports dynamic updates of turnout status without modifying the topology.
[0136] For scenarios where the turnout is switched to the reverse position, match turnout node #1 and set its switch_status attribute to 1 (reverse position). After the graph database status is updated, when the query in step 5) is executed again, it will automatically adapt to the new status, retaining only the reverse position linkage relationship, thereby automatically switching to the new connection path.
[0137] For scenarios involving faulty turnout markings, the switch_status attribute of turnout node #1 is set to 2 (fault). At this point, the first-level filter blocks all connections to that turnout, and the query returns no available path, thus achieving a safety interlock.
[0138] Through steps 1) to 6) above, when the turnout is in the positioning state (switch_status=0), the generated path is: outbound line 1 → #1 throat turnout → shunting line 2 → maintenance line 3, with a total weight of 2; when the turnout is switched to the reverse position (switch_status=1), it automatically switches to the direct path: outbound line 1 → #1 throat turnout → maintenance line 3, with a total weight of 2; when the turnout is marked as faulty (switch_status=2), it automatically blocks all associated paths and returns no available path, thus achieving safety interlocking.
[0139] In summary, the method for generating rail transit shunting connection paths provided in this application has the following advantages compared with the prior art: 1. Strong dynamic adaptability: The turnout status and linkage relationship are strongly bound and correspond one-to-one. After the status changes, the connection path automatically switches without manual configuration or system restart. For high-frequency turnout switching scenarios in subway depots (30-40 times / hour during the morning rush hour), it can still maintain millisecond-level response. 2. Accurate and unambiguous path: A single turnout status corresponds to only one valid path. The dual-layer filtering mechanism automatically eliminates faulty equipment and illegal paths, preventing path confusion and shunting conflicts. 3. Fast response speed: The graph database natively supports topology traversal and path lookup. Compared with recursive CTE queries in relational databases, the path generation response speed is improved by 5-10 times, meeting the needs of real-time shunting scheduling. 4. Complete safety interlocking: The status locking mechanism prevents sudden changes in equipment status after path generation; the closed-loop verification mechanism ensures the consistency between the turnout status and the path; the automatic blocking mechanism for faulty equipment avoids safety risks from the source. 5. Excellent scalability and compatibility: Utilizing standardized node and relationship modeling, adding new equipment or upgrading existing stations only requires expanding the topology without affecting the original logic; compatible with various types of turnouts, including single-pole, double-pole, and crossover lines. 6. Low operation and maintenance costs: Abandoning hard coding and static configuration, equipment status and topology relationships are managed visually; line upgrades do not require code modification or system restarts, significantly reducing operation and maintenance costs.
[0140] It should be understood that Figures 1 to 2 The flowcharts or scene diagrams shown are for illustrative purposes only and are not intended to limit the embodiments of this application to the examples illustrated. In fact, those skilled in the art can interpret the embodiments based on... Figures 1 to 2 The examples in the document can be transformed into equivalent ways to obtain more implementations.
[0141] The above text combined Figures 1 to 2 This application describes in detail the method for generating rail transit shunting connection paths provided in the embodiments of this application. The apparatus involved in the embodiments of this application is described below.
[0142] Please refer to Figure 3 , Figure 3 This is a structural block diagram of a rail transit shunting connection path generation device provided in an embodiment of this application. The rail transit shunting connection path generation device 300 is applied to a rail transit dispatching system. The rail transit dispatching system deploys a graph database, which stores first attribute information of track nodes, second attribute information of turnout nodes, and directed connection relationships. The first attribute information includes the availability status of track nodes, the second attribute information includes the real-time status of turnout nodes, and the directed connection relationships include direct connections between track nodes and linkage relationships between track nodes and turnout nodes. The linkage relationships are bound to corresponding turnout status conditions, which are used to indicate different linkage relationships.
[0143] The rail transit shunting connection path generation device 300 specifically includes: a search module 301, used to search for candidate connection paths from a graph database based on the starting track node and the ending track node, and to perform double-layer filtering during the search process; a calculation module 302, used to calculate the path weight corresponding to each candidate connection path based on the weight attributes corresponding to the directed connection relationships of each segment in the candidate connection path if at least one candidate connection path is found; and a determination module 303, used to determine the target connection path from at least one candidate connection path according to the path weight.
[0144] The aforementioned dual-layer filtering includes: a first layer of filtering that excludes unavailable devices based on their availability and real-time status; and a second layer of filtering that selectively retains linkage relationships based on whether the switch status conditions bound to the linkage relationship are consistent with the real-time status of the switch node.
[0145] In the above scheme, the station tracks and turnouts are abstracted as track nodes and turnout nodes in a graph database. A static, direct connection relationship (i.e., the direct connection between track nodes) is established, bound to the turnout status, creating a dynamic linkage relationship (i.e., the linkage relationship between track nodes and turnout nodes). A two-layer filtering mechanism (i.e., first-layer filtering and second-layer filtering) is used to eliminate faulty equipment, match turnout status with connection relationships, and filter the optimal connecting path according to path weight, enabling automatic path switching when the turnout status changes. Since the turnout status and the linked path are strongly bound and correspond one-to-one, the connecting path can automatically switch after a status change, eliminating the need for manual configuration or system restart. Therefore, the method provided in this application can solve the problems of slow response, poor adaptability, and error-proneness in traditional shunting path planning.
[0146] Further, based on the above embodiments, the search module 301 is specifically used to: take the starting track node as the current node, repeatedly execute the following steps until the current node is the ending track node, and obtain candidate connecting paths: obtain the directed connection relationships adjacent to the current node; perform a first layer of filtering on the adjacent directed connection relationships according to the available state or real-time state of the nodes pointed to by the adjacent directed connection relationships to obtain a first candidate connection relationship; determine the direct connection relationship in the first candidate connection relationship as a second candidate connection relationship, and perform a second layer of filtering on the linkage relationship in the first candidate connection relationship according to the turnout state conditions and real-time state bound to the linkage relationship in the first candidate connection relationship to obtain a second candidate connection relationship; and determine the node pointed to by the second candidate connection relationship as the new current node.
[0147] In the above scheme, by taking the starting track node as the current node, repeatedly executing the following steps: obtaining adjacent directed connections, filtering the first layer to obtain the first candidate connection, directly determining the direct connection as the second candidate connection and filtering the linked connection to obtain the second candidate connection, and updating the node pointed to by the second candidate connection to the current node, until the end track node is reached, the graph database native traversal search of candidate connected paths is fully realized, ensuring the accuracy and real-time performance of path generation.
[0148] Furthermore, based on the above embodiments, the first layer of filtering is: excluding directed connections to the track node whose available state is disabled, and excluding directed connections to the turnout node whose real-time state is faulty.
[0149] The above scheme defines the specific rules for the first layer of filtering, thereby eliminating faulty tracks, tracks blocked by construction, and faulty switches from the source. This reduces the generation of illegal, invalid, or safety-risk shunting routes due to the use of unavailable equipment, and improves the safety of shunting operations.
[0150] Furthermore, based on the above embodiments, the second layer of filtering is: retaining the linkage state where the bound turnout state condition is consistent with the real-time state of the pointed turnout node.
[0151] The above scheme defines the specific rules for the second layer of filtering, thereby achieving a one-to-one binding between turnout conditions and connecting paths, which reduces ambiguity of multi-branch paths, state disconnection, and incorrect connection problems, and ensures that a single turnout state corresponds to only one valid path branch.
[0152] Furthermore, based on the above embodiments, the above calculation module is specifically used to: sum up multiple weight attributes corresponding to the candidate connected paths to obtain the path weight of each candidate connected path.
[0153] In the above scheme, the path weight of each candidate connected path is obtained by accumulating the weight attributes of the directed connection relationships of each segment in the candidate connected path. The passage cost of the entire path is quantified into a comparable value, providing a unified quantitative basis for subsequent path ranking. This allows the path selection process to be objectively calculated and compared based on the total weight, improving the automation level of path generation.
[0154] Furthermore, based on the above embodiments, the determining module 303 is specifically used to: select the candidate connecting path with the smallest path weight as the target connecting path.
[0155] In the above scheme, by selecting the candidate connecting path with the smallest path weight as the target connecting path, the path with the lowest overall cost is automatically selected from multiple candidate connecting paths. Since the weight of the positioning linkage relationship is lower than that of the inverse linkage relationship, this mechanism naturally favors the selection of the path with a higher proportion of positioning paths, thereby ensuring the safety and efficiency priority principle of shunting operations without manual intervention.
[0156] Furthermore, based on the above embodiments, the determining module 303 is specifically used to: when there are multiple candidate connecting paths with the smallest path weight, select the candidate connecting path with the fewest turnout operation times and / or the shortest passage time as the target connecting path.
[0157] In the above scheme, when there are multiple candidate connecting paths with the lowest path weight, the path with the fewest turnout operations and / or the shortest passage time is further selected, realizing secondary selection in the case of multiple equivalent paths, and improving the precision and practicality of path selection.
[0158] Furthermore, based on the above embodiments, the direct connection relationship has a first weight value, the linkage relationship includes a positioning linkage sub-relationship and an inverted linkage sub-relationship, the positioning linkage sub-relationship is bound to a positioning state condition and has a second weight value, the inverted linkage sub-relationship is bound to an inverted state condition and has a third weight value, and the second weight value is less than the third weight value.
[0159] The above scheme defines the weight values of direct connection, positioning linkage sub-relationship, and reverse positioning linkage sub-relationship, so that the system automatically favors the positioning linkage path when calculating the total path weight. This mechanism ensures that the positioning path is selected first, and at the same time provides a unified weight configuration standard for different turnout types.
[0160] Furthermore, based on the above embodiments, the rail transit shunting connection path generation device 300 provided in this application embodiment further includes: a construction module, used to construct track nodes, turnout nodes and directed connection relationships in a graph database; and a verification module, used to perform topology integrity verification on the constructed track nodes, turnout nodes and directed connection relationships; wherein, the topology integrity verification includes at least one of the following: isolated node detection, turnout state-relationship consistency verification, and redundant path detection.
[0161] In the above scheme, before path generation, track nodes, turnout nodes and directed connections are constructed in the graph database, and topology integrity checks such as isolated node detection, turnout status-relationship consistency verification, and redundant path detection are performed to ensure the quality and consistency of the basic topology network and avoid path generation anomalies caused by modeling errors. Furthermore, subsequent line modifications only require adding or deleting nodes and relationships without modifying code or restarting the system, which greatly reduces operation and maintenance costs.
[0162] Please refer to Figure 4 , Figure 4 This application provides a structural block diagram of an electronic device 400, which includes at least one processor 401, at least one communication interface 402, at least one memory 403, and at least one communication bus 404. The communication bus 404 enables direct communication between these components, the communication interface 402 facilitates signaling or data communication with other node devices, and the memory 403 stores machine-readable instructions executable by the processor 401. When the electronic device 400 is running, the processor 401 communicates with the memory 403 via the communication bus 404. When the machine-readable instructions are invoked by the processor 401, the aforementioned method for generating a rail transit shunting connection path is executed.
[0163] For example, the processor 401 in this embodiment of the application can read a computer program from the memory 403 via the communication bus 404 and execute the computer program to implement the following method: based on the starting track node and the ending track node, search for candidate connecting paths from the graph database and perform double-layer filtering during the search process; if at least one candidate connecting path is found, calculate the path weight corresponding to each candidate connecting path based on the weight attribute corresponding to the directed connection relationship of each segment in the candidate connecting path; and determine the target connecting path from at least one candidate connecting path according to the path weight.
[0164] The processor 401 comprises one or more, and can be an integrated circuit chip with signal processing capabilities. The processor 401 can be a general-purpose processor, including a Central Processing Unit (CPU), a Microcontroller Unit (MCU), a Network Processor (NP), or other conventional processors; it can also be a special-purpose processor, including a Neural-network Processing Unit (NPU), a Graphics Processing Unit (GPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. Furthermore, when there are multiple processors 401, some can be general-purpose processors, and others can be special-purpose processors.
[0165] The memory 403 includes one or more, which may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0166] Understandable. Figure 4 The structure shown is for illustrative purposes only; the electronic device 400 may also include components that are more advanced than those shown. Figure 4 The more or fewer components shown, or having the same Figure 4 The different configurations shown. Figure 4The components shown can be implemented using hardware, software, or a combination thereof. In the embodiments of this application, electronic device 400 can be, but is not limited to, physical devices such as desktop computers, laptops, smartphones, smart wearable devices, and in-vehicle devices, or virtual devices such as virtual machines. Furthermore, electronic device 400 is not necessarily a single device; it can be a combination of multiple devices, such as a server cluster, etc.
[0167] This application also provides a computer program product, including a computer program stored on a computer-readable storage medium. The computer program includes computer program instructions. When the computer program instructions are executed by a computer, the computer can perform the steps of the method for generating rail transit shunting connection paths described in the above embodiments, such as: S101: Searching for candidate connection paths from a graph database based on the starting track node and the ending track node, and performing a two-layer filtering process during the search. S102: If at least one candidate connection path is found, calculating the path weight corresponding to each candidate connection path based on the weight attributes corresponding to the directed connection relationships of each segment in the candidate connection path. S103: Determining the target connection path from at least one candidate connection path according to the path weight.
[0168] This application also provides a computer-readable storage medium that stores computer program instructions. When the computer program instructions are executed by a computer, the computer performs the method for generating rail transit shunting connection paths as described in the foregoing method embodiments.
[0169] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0170] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0171] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0172] It should be noted that if the function is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0173] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0174] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for generating a shunting connection path for rail transit, characterized in that, The method is applied to a rail transit dispatching system, which deploys a graph database. The graph database stores first attribute information of track nodes, second attribute information of turnout nodes, and directed connection relationships. The first attribute information includes the availability status of the track nodes, the second attribute information includes the real-time status of the turnout nodes, and the directed connection relationships include direct connections between track nodes and linkage relationships between track nodes and turnout nodes. Each linkage relationship is bound to a corresponding turnout status condition, which indicates different linkage relationships. The method includes: Based on the starting track node and the ending track node, candidate connecting paths are searched from the graph database, and a two-layer filtering is performed during the search process. The two-layer filtering includes: a first layer of filtering that excludes unavailable devices based on the available status and the real-time status, and a second layer of filtering that selectively retains the linkage relationship based on whether the switch status condition bound to the linkage relationship is consistent with the real-time status of the switch node. If at least one candidate connectivity path is found, then the path weight corresponding to each candidate connectivity path is calculated based on the weight attribute corresponding to the directed connection relationship of each segment in the candidate connectivity path. The target connecting path is determined from at least one of the candidate connecting paths based on the path weight.
2. The method for generating rail transit shunting connection paths according to claim 1, characterized in that, The process of searching for candidate connecting paths from the graph database based on the starting and ending track nodes, and performing a two-layer filtering process during the search, includes: Using the starting track node as the current node, repeat the following steps until the current node becomes the ending track node, thus obtaining the candidate connecting path: Obtain the directed connections adjacent to the current node; Based on the available state or real-time state of the nodes pointed to by the adjacent directed connections, the first layer of filtering is performed on the adjacent directed connections to obtain the first candidate connection. The direct connection in the first candidate connection relationship is determined as the second candidate connection relationship, and the linkage relationship in the first candidate connection relationship is filtered by the second layer according to the turnout status condition and the real-time status bound by the linkage relationship in the first candidate connection relationship to obtain the second candidate connection relationship. The node pointed to by the second candidate connection is determined as the new current node.
3. The method for generating rail transit shunting connection paths according to claim 2, characterized in that, The first layer of filtering is: excluding directed connections to the track node whose available state is disabled, and excluding directed connections to the turnout node whose real-time state is faulty. And / or, the second layer of filtering is: retaining the linkage state where the bound turnout state condition is consistent with the real-time state of the pointed turnout node.
4. The method for generating rail transit shunting connection paths according to claim 1, characterized in that, The step of calculating the path weight for each candidate connectivity path based on the weight attributes corresponding to the directed connection relationships of each segment in the candidate connectivity path includes: The path weight of each candidate connection path is obtained by summing up the multiple weight attributes corresponding to the candidate connection paths. Determining the target connectivity path from the at least one candidate connectivity path based on the path weight includes: The candidate connecting path with the smallest path weight is selected as the target connecting path.
5. The method for generating rail transit shunting connection paths according to claim 4, characterized in that, Determining the target connectivity path from the at least one candidate connectivity path based on the path weight includes: When there are multiple candidate connecting paths with the lowest path weight, the candidate connecting path with the fewest turnout operation times and / or the shortest passage time is selected as the target connecting path.
6. The method for generating rail transit shunting connection paths according to claim 4 or 5, characterized in that, The direct connection relationship has a first weight value, the linkage relationship includes a positioning linkage sub-relationship and an inverted linkage sub-relationship, the positioning linkage sub-relationship is bound to a positioning state condition and has a second weight value, the inverted linkage sub-relationship is bound to an inverted state condition and has a third weight value, and the second weight value is less than the third weight value.
7. The method for generating rail transit shunting connection paths according to any one of claims 1-5, characterized in that, Before searching for candidate connecting paths from the graph database based on the starting and ending track nodes, and performing a two-layer filtering process during the search, the method further includes: Construct the track nodes, turnout nodes, and directed connection relationships in the graph database; A topology integrity check is performed on the constructed track nodes, turnout nodes, and directed connection relationships; wherein the topology integrity check includes at least one of the following: isolated node detection, turnout state-relationship consistency check, and redundant path detection.
8. A computer program product, characterized in that, It includes computer program instructions, which, when read and executed by a processor, perform the method for generating rail transit shunting connection paths as described in any one of claims 1-7.
9. An electronic device, characterized in that, include: Processor, memory, and bus; The processor and the memory communicate with each other via the bus; The memory stores computer program instructions that can be executed by the processor, and the processor can execute the method for generating rail transit shunting connection paths as described in any one of claims 1-7 by calling the computer program instructions.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions, which, when executed by a computer, cause the computer to perform the method for generating rail transit shunting connection paths as described in any one of claims 1-7.