Train number searching method suitable for one station and two stations

By reconstructing data relationships and establishing indexes in the CTC system, and combining them with signal status records, the problems of delay and calculation deviation in finding train numbers at stations with two yards were solved. This enabled timely and accurate tracking of train information and logical consistency of route sequences, improving the intelligence and reliability of the system.

CN121947586APending Publication Date: 2026-05-01SIGNAL & COMM RES INST OF CHINA ACAD OF RAILWAY SCI +3
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SIGNAL & COMM RES INST OF CHINA ACAD OF RAILWAY SCI
Filing Date
2026-04-03
Publication Date
2026-05-01

Smart Images

  • Figure CN121947586A_ABST
    Figure CN121947586A_ABST
Patent Text Reader

Abstract

The invention discloses a train number searching method suitable for one station and two stations, and belongs to the technical field of railway train dispatching. In order to solve the problems of train number search failure, inaccurate calculation of the number of idle intervals of long and short routes and inconsistent trigger logic of an existing CTC system at an irregular position, a data relationship is reconstructed in a starting stage of an autonomous machine, and a'port-route-station track 'index and a long and short route associated index are established; enhancing a characteristic state of the recording signal machine so as to distinguish shunting and train operation; and designing a recursive search process comprising a plurality of irregular position search units. According to the method and the system, the timeliness and the accuracy of train number searching are remarkably improved, the accuracy of idle interval calculation and the consistency of train receiving and departure triggering logic are ensured, and the automation reliability of driving command under a complex station type is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

A method for finding train numbers applicable to stations with one station and two airports Technical Field

[0001] This invention relates to the field of railway traffic dispatching, and in particular to a method for finding train numbers applicable to stations with one station and two yards, which is integrated into the station autonomous machine subsystem of the CTC system. Background Technology

[0002] The train number is the prerequisite and basis for triggering the route sequence in the Centralized Train Control (CTC) system. According to the "Technical Conditions for Centralized Train Control Systems," the train number is a crucial foundational information for the CTC system to achieve dispatching command, train operation tracking, and automatic route arrangement, and must be timely and accurate. When automatically arranging train routes, the CTC system needs to perform train attribute checks and route sequence updates based on the train number. As shown in Figure 1, the station's automated control system generates a route sequence based on the central phase plan and triggers the operation at an appropriate time based on the train number lookup result. Its train number lookup logic is to recursively search for train numbers in the receiving direction based on static configuration data and dynamic station status (mainly the already arranged receiving and departure routes, etc.) on the arrival and departure tracks in the inter-station section and the rear station. For example, the train runs from left to right, with station A as the target station. The search order for the train number in the route sequence belonging to the downlink port X of station A is as follows: search the BA inter-station section, search the departure route of station B to the open port SN, search the receiving route of station B to the departure port SN; search the CB inter-station section; search the departure route of station C to SN... until the farthest station D configured in station A. Through this search, the autonomous machine can obtain and display the train number, train attributes, and the number of available intervals from the train's real-time position to the entrance, which are used for route sequence triggering and train number consistency verification.

[0003] Existing technologies for finding train numbers at stations with two tracks typically employ the following approach: starting from the station's arrival / departure port, the search is recursively performed at regular locations within the inter-station intervals, scheduled departure routes, and scheduled arrival routes of subsequent stations. This approach, based on static configuration data and dynamic station conditions, searches at regular locations such as the train number windows associated with inter-station intervals and the train number windows associated with arrival / departure tracks within the station, ensuring a simple and efficient search logic.

[0004] However, the existing technology has the following drawbacks: First, the search process is strictly limited to "already scheduled train routes", which requires the route to be completely locked and the signal to be open. This makes it impossible to handle irregular positions such as when a train has just entered the route (the first and / or second route object is occupied, and the signal is still open or has just been closed) or has already entered the route (the signal is closed, and the route object is occupied). This causes a delay in train search and thus affects the timely triggering of the route sequence.

[0005] Secondly, under the constraint of "regular position", the scheme cannot effectively handle routes with sections without branching points. In particular, when the train number jumps to the train number window of a section without branching points, it cannot accurately track the train number, affecting the accuracy of the calculation of the number of vacant sections.

[0006] Thirdly, in the special station type of a station with two yards, the existing scheme cannot correctly handle the inclusion relationship between long and short routes and the jumps of train numbers in irregular positions. This leads to a discrepancy between the number of idle sections calculated by the automatic control system and the actual transportation situation, and causes inconsistencies in the triggering logic of the arrival and departure route sequence. For example, consider a train traveling from a station with two yards to a target station. At the target station, there is a through-train plan with 5 sections between stations. The train's departure route at the station with two yards is "I-15G-via 3G-SF" (departing from arrival / departure track I-15G, passing through the switch to 3G, and then from 3G through the switch to the SF port, a long departure route). The triggering condition for the target station is that the number of idle sections is less than or equal to 6. When the train stops at track I-15G and the departure route is fully open, the departure route is calculated as one idle section. Adding the 5 sections between stations, there are a total of 6 idle sections, which meets the triggering condition. The target station then arranges the departure route according to the through-train plan. During the process of arranging departure routes at the target station, the train departs from a station with two yards and enters the departure throat area, with the train number jumping to the "1 / 27G" non-switching section train number window. At this time, the real-time operation status of the train does not meet the constraints of "arranged receiving and departure routes" and "regular position," causing the target station to fail to trigger the planned receiving route sequence, resulting in inconsistent triggering logic for the planned receiving and departure route sequences at the same station. In addition, when the train is at two different positions, I-15G and 3G, the target station calculates 6 available sections in both cases, failing to distinguish between long and short routes, which is inconsistent with the actual transportation situation.

[0007] Therefore, a train number lookup method is needed that can adapt to complex station layouts with one station and two yards and cover all train operation scenarios. This method can solve problems such as train number lookup failures in irregular locations, deviations in long and short route calculations, and inconsistencies in triggering logic in existing technologies. This will improve the timeliness, accuracy, and business consistency of route sequence triggering in the CTC system. Summary of the Invention

[0008] To address the shortcomings of existing technologies, this invention discloses a method for finding train numbers applicable to stations with one station and two yards. The technical solution is as follows, and the method includes the following steps: Step S1: Data Reconstruction and Index Establishment: During the automatic machine startup phase, the station's basic configuration data is read and processed. By performing an index establishment operation, a long chain of data links for efficient retrieval is constructed. The basic configuration data includes at least port data, track data, and interlocking route table data. The index establishment operation includes: establishing a "port-departure route" index pointing to all departure routes for each departure port; establishing a "receiving route-port" index pointing to all receiving routes for each receiving port; and establishing a long chain of data links for each... A "Arrival / Departure Track - Receiving Route" index is established for each arrival / departure track, pointing to all its receiving routes; the inclusion relationship between routes is identified, and a one-way association index is established between a long route and its contained short routes; Step S2: Station object status recording: For signal objects, in addition to recording their current status characteristic value and status transition time, the status characteristic value of their previous characteristic state and the time of transition to that previous characteristic state are also recorded; the status characteristic value is used to distinguish between train permission signals, shunting permission signals, and closed states; Step S3: Train number lookup based on index and status records: In response to the route sequence to be triggered, the train number lookup process is recursively executed from the receiving port of the target station to the subsequent stations; the lookup process It consists of multiple search units executed sequentially or conditionally, including: an interval search unit: searching for train numbers in the associated train number window of the inter-station interval; an open departure route search unit: using the "port-departure route" index, searching for whether there is a fully locked and open departure route under the specified departure port of the rear station, and searching for train numbers on the track to which the found route belongs; an open receiving route search unit: when no train number is found on the track of the open departure route, using the "arrival / departure track-receiving route" index, searching for a fully locked and open receiving route to that track, and jumping to the entry port of that receiving route to continue the recursive search; and a first irregular position. The first search unit is used to search for train numbers within a departure route area that meets the conditions of "the first and / or second object of the route is occupied, the remaining objects are locked, the departure signal is open or has just been closed and was a train signal before it was closed"; the second irregular position search unit is used to search for train numbers within a departure route area that meets the conditions of "the departure signal is closed, there is an object occupying the route, and the occupied section is the starting section of the continuous occupied section closest to the departure port direction within the route"; the third irregular position search unit is used to search for train numbers in the adjacent section outside the entrance or in the train number window of the receiving route associated with the "the first and / or second object of the route is occupied, the remaining objects are locked, and the entrance signal is open or has just been closed";The fourth irregular location search unit is used to search for train numbers in the approach section or route train number window outside the entrance of a receiving route that meets the conditions of "entry signal closed, and there is an object occupying the route".

[0009] This invention also discloses a train number lookup system applicable to stations with one station and two yards, integrated into the station self-regulatory machine of the CTC system, used to implement the above-mentioned method. The system is characterized by comprising: a data preprocessing and indexing module: used to read the station's basic configuration data when the system starts, and execute the data relationship reconstruction and index establishment operation described in step S1 to generate a data link index structure that can be quickly queried; an object status management module: used to monitor and record the status of station objects in real time, specifically executing the recording function of the current status and previous characteristic status of signal objects described in step S2; and a train number lookup execution module: connected to the data preprocessing and indexing module and the object status management module, used to receive route sequence trigger requests, and according to the process described in step S3, call the corresponding lookup unit logic, and with the support of the indexing module and the assistance of status recording information, perform recursive train number lookup at regular and irregular positions, and output the lookup results and related information on the number of idle intervals. Beneficial Effects

[0010] 1. Significantly improves train schedule search efficiency and system processing capacity.

[0011] By performing in-depth preprocessing of basic configuration data during the autonomous machine startup phase, a long chain of data links and indexes is established, from "port - departure route - arrival / departure track - receiving route," transforming train number lookup from inefficient full-domain data traversal to efficient targeted relationship querying. This significantly reduces real-time computing overhead and provides performance assurance for the system to respond promptly to route triggering demands and handle instantaneous scenarios.

[0012] 2. Enable accurate and timely location of trains in irregular positions.

[0013] By adding the recording of the previous characteristic state of the signal object, the system can accurately trace and determine the previous train route within a short time window after the signal is closed, thus reliably distinguishing between train operation and shunting operation. Combined with specially designed irregular position search units such as "just entered" and "already entered", the problem of train number search failure or delay in scenarios such as trains entering the throat area of ​​the route is completely solved, ensuring continuous tracking of train number information.

[0014] 3. Ensure the consistency and accuracy of the path sequence triggering logic.

[0015] By covering the entire process of train search from inter-station operation to station operation, the system enables the receiving and departure (or planned) route sequences to be triggered based on the same set of accurate and timely train information, fundamentally eliminating the logical contradiction of inconsistent triggering times for receiving and departure route sequences at the same station.

[0016] 4. Resolve the calculation error of the number of vacant sections under the complex station type of one station and two fields.

[0017] By establishing an association index between long and short routes and dynamically determining the status of the associated short route upon successful search, an innovative calculation rule was implemented that counts an open short sub-route as an idle section when the train is located in a non-track section of a long route. This ensures that the calculation result of the number of idle sections accurately reflects the actual position of the train in the long route, perfectly matching the actual situation at the transportation site, and providing a precise basis for triggering routes based on location.

[0018] 5. Enhance the overall intelligence and reliability of the system.

[0019] The combined application of the above-mentioned technologies not only improves the performance of the single train search function, but also enhances the CTC system's autonomous machine's environmental perception, analysis and decision-making, and train control capabilities in complex station types through data preprocessing, state enhancement memory, and intelligent search decision-making, significantly improving the automation level and safety reliability of train dispatching. Attached Figure Description

[0020] Figure 1 is a schematic diagram of the station type and recursive direction of the existing train number search logic.

[0021] Figure 2 is a schematic diagram of the station data association relationship (port-departure route, track-receiving route) in an embodiment of the present invention.

[0022] Figure 3 is a flowchart of the establishment of the unidirectional association relationship between long and short paths in an embodiment of the present invention.

[0023] Figure 4 is a flowchart of the complete train number search process of the present invention (including initialization and real-time search). Detailed Implementation Example 1

[0024] Example 1 provides a specific implementation of a train number lookup method applicable to stations with one station and two yards. As shown in Figure 4, the overall process includes two stages: initial data preparation and real-time train number lookup.

[0025] I. Data preparation for the initialization phase, which corresponds to steps S1 and S2, is completed in one go when the autonomous machine system starts up.

[0026] Step S1: Data Relationship Reconstruction and Index Establishment: The self-regulatory machine reads and parses the following three types of basic data tables from the configuration file: (1) Stock Channel Data Table: Obtain the stock channel ID and its attributes (such as whether it is the departure line).

[0027] (2) Port data table: Get the port ID and its direction (receive / depart).

[0028] (3) Interlocking route table: Obtain the ID of each train route, the sequence of track sections included, the ID of the starting and ending signal, and the associated track ID.

[0029] The specific algorithm for index construction is as follows: (I) Constructing the "Port-Departure Route" index (see the left side of Figure 2): Traverse the interlocking route table. For each route, find the corresponding departure port ID in the port data table based on its terminal signal ID. Create a hash table departure_route_map with port ID as the key and a list of values ​​to append and store all departure route IDs that terminate at that port.

[0030] (ii) Constructing the "Arrival / Departure Track - Receiving Route" index (see right side of Figure 2): Traverse the interlocking route table. For each route, obtain the terminal track ID from its associated track data. If the track is an arrival / departure track, append the route ID to the hash table `arrival_route_map` using that track ID as the key. This index enables a fast mapping from a track to all receiving routes terminating at that track.

[0031] (III) Constructing a "Long-Short Route Association Index" (see Figure 3): Traverse the interlocking route table and analyze the track segment sequence of each route (denoted as Route A). Traverse the route table again to find another route (denoted as Route B) that satisfies the following conditions: all track segments of Route B are a continuous subset of the Route A sequence, and the start or end point of Route B is an arrival / departure track in the Route A sequence. If found, store the ID of Route B (Short Route) in the hash table long_short_route_map, using the ID of Route A (long route) as the key. This index is a one-way association.

[0032] (iv) Constructing the "Receiving Route-Port" Index: Traverse the interlocking route table. For each route, find the corresponding receiving port ID in the port data table based on its originating signal ID. Create a hash table `arrival_port_map` with the route ID as the key and the corresponding receiving port ID as the value. This index is used to quickly locate the entry port of the found receiving route during recursive search, so as to continue jumping to further stations for searching.

[0033] The specific working process is as follows: During the startup phase of the autonomous machine, the station's basic configuration data is read and processed. By performing index building operations, a long chain of data links for efficient retrieval is constructed. The basic configuration data includes at least port data, track data, and interlocking route table data. The core of data relationship reconstruction and index building is to transform the station's autonomous machine from a passive and temporary data consumer into an active and intelligent data organizer. Through in-depth preprocessing during the startup phase, a dedicated data structure optimized for train search business is constructed.

[0034] The automated control system reads basic configuration data during startup because this data defines the station's physical topology and logical rules, serving as the "digital map" upon which all subsequent train control operations (including train lookup and route triggering) rely. Specifically, the automated control system sequentially reads and parses the following structured data tables from pre-installed storage devices: track data table (obtaining unique track identifiers, arrival / departure tracks, mainline attributes, platform information, etc., to identify valid train stopping locations), port data table (obtaining unique port identifiers, arrival / departure directions, assigned sections, and block types, to determine traffic flow direction and find the starting point), and interlocking route table (obtaining unique route identifiers, included serialized track circuit objects, terminal signals, intermediate turnout positions, associated tracks, etc., to define all legal paths for a train to move from one point to another). The principle behind this reading is sequential I / O operations and data structure parsing during system initialization. The effect is to load and transform external, static configuration information into object models in the automated control system's memory that can be directly manipulated by the program. While existing technologies also read this data, they treat it only as an isolated pool of information. Each time a train is searched, it requires a "needle in a haystack" kind of condition matching and traversal search through a massive number of scattered objects. This is one of the fundamental reasons for the low efficiency and inability to cope with complex real-time scenarios.

[0035] This invention, building upon this loading process, proactively executes a series of index building operations. Essentially, it pre-calculates and solidifies the key relationships between data objects based on the business logic of train number lookup, constructing a directly navigable relationship network. This is not simply data grouping, but a deep reconstruction based on business semantics.

[0036] The construction process of the "port-departure route" index is as follows: traverse all route objects and identify the port corresponding to their terminal signal; using the port ID as the key, store the list of all departure route IDs, including that route ID, as the value in an efficient data structure (such as a hash table or index tree). Its positioning principle is direct key-value access. When it is necessary to find a train number at a certain departure port (e.g., port SN), the automated machine does not need to traverse hundreds of routes throughout the station and check whether each terminal matches the SN, as in existing technologies. Instead, it directly uses the port SN as the key to query the index hash table, instantly obtaining a clear and finite list of route IDs (e.g., possibly containing only 3-5 feasible departure routes). The judgment criteria are then simplified to: only the dynamic status (whether it is fully locked, whether the signal is open) of each route in this small list needs to be checked. This is equivalent to building a "dedicated highway" for the high-frequency operation of "finding a route from a port," abandoning the original "off-road path" of blindly searching on the data plain.

[0037] Similarly, the construction of the "Arrival / Departure Track - Receiving Route" index uses the track ID as the key to reverse-associate a list of all receiving route IDs terminating on that track. The principle is to establish a goal-oriented reverse mapping. When it is known that a train may originate from a certain track (e.g., a departure route is found in the "Open Departure Route Search Unit" but there are no trains on that track), and it is necessary to trace its receiving source, the system directly queries this index using the track ID as the key, immediately obtaining all possible receiving routes, thus quickly jumping to the correct receiving port to continue the recursive search. This solves the problem of inefficient full-domain reverse search required when searching for routes from the track in the prior art.

[0038] The "long and short route association index," crucial for scenarios involving two stations, is constructed by identifying and establishing topological inclusion relationships between routes. The autonomous machine analyzes the object sequence of each route. If it finds that a route (long route, such as "I-15G-via 3G-SF") completely includes all track sections and turnout positions required by another route (short route, such as "3G-SF"), and the start or end point of the short route is an arrival / departure track (3G) in the middle of the long route, then a one-way association record is established pointing from the long route ID to the short route ID. This index is revolutionary. In existing technology, when a train is running on a non-track section of a long route (such as the throat section "1 / 27G" without turnouts), the system cannot perceive the association between this position and the short route "3G-SF," thus incorrectly treating the entire long route as an indivisible "black box," either failing to calculate the available space or making incorrect calculations. By establishing an association index using this invention, the autonomous system can immediately query the associated short routes when a train is located in an irregular position on a long route, and then check the status of the short routes. If the short route is open, it can be counted as a valid "idle section" in the total count. This allows the system to accurately distinguish the different spatial intervals in actual transportation due to the different positions of trains on track I-15G and track 3G (or the throat area in between), thus fundamentally correcting the core defect pointed out in the appendix that "the calculated number of idle sections does not match the actual transportation value".

[0039] In summary, step S1 is not simply data preparation, but a business-oriented data engineering process. It reconstructs the raw, flat configuration data into a three-dimensional, networked "business knowledge graph" by pre-computing and establishing three core indexes: "port-departure route," "track-receiving route," and "long-short route." This graph transforms each recursive jump in subsequent train lookups from time-consuming global computation into efficient local queries and relationship following. This not only makes it possible to handle instantaneous scenarios with extremely high real-time requirements, such as "just entered" and "already entered," but also provides a crucial data foundation for solving the specific technical challenge of accurately calculating idle intervals under the complex topology of a station with two yards. This fully demonstrates the significant progress and creativity of this invention in data processing concepts and implementation methods compared to existing technologies.

[0040] Step S2: Station Object Status Record: Create a dynamic status record structure for each signal object in the station. This structure contains the following fields: string signal_id; / / Unique identifier of the signal StateEnum current_state; / / Current state: enumeration value {TRAIN_GREEN,SHUNTING_WHITE, CLOSED} long current_state_time; / / System timestamp (milliseconds) for entering the current state StateEnum previous_state; / / Previous characteristic state long previous_state_time; / / Timestamp for entering the previous characteristic state}

[0041] When the system starts, it synchronizes the current state of all signals from the interlocking system and initializes the above-mentioned objects.

[0042] For signal objects, in addition to recording their current state characteristic values ​​and state transition times, the system also records the state characteristic values ​​of their previous characteristic state and the time it took to transition to that previous characteristic state. These state characteristic values ​​are used to distinguish between train permission signals, shunting permission signals, and closed states. This step is a key enhancement technology designed to solve the problem of accurately locating train numbers in irregular location scenarios such as "the train has just entered the route." Its core lies in constructing a state model with short-term historical memory for key station objects (especially departure signals that function as both trains and shunting machines), thereby overcoming the limitations of existing technologies that rely solely on the instantaneous state of the object for logical judgment.

[0043] In a CTC (Centralized Traffic Control) system, the status of signals (especially departure signals) is the direct basis for determining the nature of a route and the train's operational intention. Current solutions only record and rely on the signal's "current state characteristic value" (such as "open green light," "open white light," or "closed") and the start time of that state. However, at critical transition moments in train operation, the current state alone is insufficient to accurately interpret the scenario. For example, when a train wheel has just entered the first section of a route, the interlocking system will immediately close the signal for safety reasons. At this time, the signal's "current state" is exactly the same as the state after shunting operations, both being "closed." If only this is used for judgment, the automatic control unit cannot distinguish whether it is "a train has just entered" or "a shunting operation has ended," causing the train number lookup logic to fail or be delayed in the extremely short time after a train enters due to the inability to confirm the route nature.

[0044] To address this, the present invention additionally records the "previous characteristic state" of the signal object. This includes two key data elements: first, the characteristic value of the previous characteristic state itself (such as "train permission signal - green light" or "shunting permission signal - white light"), and second, the timestamp of the transition from the previous characteristic state to the current state. The principle of this technique is to introduce a dimension of historical backtracking capability into the state machine model. The specific working process is as follows: the autonomous machine monitors the signal state changes in real time. Whenever the state characteristic value changes (such as from "open green light" to "closed"), the system not only updates the current state record but also archives and stores the state before the change and the time of the change as the "previous characteristic state." This record has a short time sensitivity, typically covering a critical decision window period (e.g., 2-4 seconds) after the state change.

[0045] The function and effect of this record are crucial, directly serving the accurate judgment of the newly added "just entered" search unit in step S3. Taking the "just entered departure route search unit" as an example, one of its triggering conditions is that "the departure signal is still open or has just been closed." The judgment of "just closed" depends not only on the duration of the closure (e.g., less than 2 seconds), but more importantly, on confirming the nature of the signal before closure. At this time, the automatic control unit queries the "previous characteristic state" record of the signal. If it finds that the previous characteristic state was a "train permission signal," it can immediately determine that the closure was a normal protective action caused by the train entering, thus confirming that the route is a valid train route, and the train number should be searched in this area. Conversely, if the previous characteristic state was a "shunting permission signal," it can be determined that it is a shunting operation, and the train number search logic should not process it. This mechanism precisely solves the core requirement of "needing to shield shunting operation scenarios" pointed out in the appendix, ensuring that the train number search service strictly serves the train schedule.

[0046] The connection between steps S1 and S3 lies in the fact that the data index established by S1 provides the "spatial path" for searching, while the state history provided by S2 provides the "temporal context" and "logical basis" for accurate judgment. The combination of these two allows the search logic of S3 to not only know "where to search" (through the index), but also accurately determine "under what circumstances to search there and whether the found path is valid" (through the state record). For example, without the historical state record of S2, even if the search unit of S3 attempts to handle the scenario of "the signal has just been turned off," it cannot reliably distinguish between trains and shunting, leading to logical confusion or erroneous triggering.

[0047] Therefore, step S2 is not simply an expansion of data records, but a creative solution designed to address the ambiguity of specific instantaneous scenarios. By endowing the signal device with the ability to remember the most recent critical state transition, the autonomous machine can still correctly trace and understand the previous moment's operational intent within a short time window after the signal is closed. This fills the gap in existing technology for judging irregular location scenarios where "the signal is closed but the train has not changed," providing an indispensable logical basis for the entire method to achieve timely, accurate, and consistent train number lookup. This significantly improves the system's intelligence level and decision reliability in complex and dynamic operating environments.

[0048] II. Train search during real-time operation, step S3: Train search based on index and status record: This stage is triggered by the route sequence. The search process follows the logic shown in Figure 4. The implementation details of each search unit are as follows.

[0049] The search process triggers and executes logic by starting a recursive search from the vehicle receiving port of the sequence when the autonomous machine has a route sequence to be triggered.

[0050] First, execute the interval lookup unit: query all train windows associated with intervals between stations outside the target port.

[0051] If no train is found, the open departure route search unit is executed: the departure_route_map is queried based on the port ID, and only the obtained list of limited routes is traversed to check if there is a route with a status of "fully locked and signal open". If found, the train is searched for in the associated track train number window for that route.

[0052] If no open route is found in step 2, or no train number is found on the track, then the first irregular position search unit and the second irregular position search unit are executed sequentially.

[0053] If step 2 finds an open route but there are no cars on the track, then the open receiving route search unit is executed: query the arrival_route_map according to the track ID, locate the receiving route and jump to its entry port, and recursively execute this process.

[0054] Key Judgment Logic of Irregular Position Search Unit First Irregular Position Search Unit (Departure Direction): Condition Check: Confirm that the status of a departure route is: (a) the first or second section is occupied; (b) the subsequent section is locked; (c) the signal status is open or meets the "just closed" condition.

[0055] "Just closed" determination implementation: current_state == CLOSED && (now - current_state_time)<THRESHOLD && previous_state == TRAIN_GREEN. Here, THRESHOLD is a preset threshold, which can be set to 2000 milliseconds, for example.

[0056] Search range: Search in the "route train window" associated with this route and the train window of the departure track.

[0057] The implementation logic of the special calculation rule for the number of free intervals: When a train is successfully located in the irregular location search unit or the "open departure route search unit", and the long_short_route_map confirms that the route is a long route (denoted as L) passing through the central arrival and departure track, the system performs the following steps to calculate the precise number of free intervals: Basic interval number acquisition: First, obtain the fixed number of free intervals (denoted as N_base) between the target station's receiving port and the currently successfully found rear station's departure port (if the train is on the departure route) or arrival port (if the train is on the receiving route). This value is determined based on the inter-station topology configuration; Short route status check and calculation: Obtain the short route (denoted as S) associated with the long route L, with the central track as the starting and ending point, through the long_short_route_map. Check the dynamic status of the short route S. If and only if the short route S is in a "fully locked and signal open" state, a special calculation rule is triggered. The special rule applies: "Count the short route S as one free section." Specifically, the number of free sections N_total = N_base + 1 is calculated. Here, "+1" is a logical counting unit, representing one passable space unit occupied by the short route S within the long route L, regardless of how many physical track sections the short route S actually contains. The final output N_total is the precise number of free sections used to determine the triggering timing of the route sequence. If the short route S does not meet the open condition, this rule is not applied, and the number of sections is calculated in the conventional way. Example: Taking the scenario described in the background technology as an example, the triggering condition for the target station is "number of free sections ≤ 6". When the train is located on track I-15G (the starting point of the long route) at a station with two yards, the associated short route "3G-SF" is not open, and the number of free sections is calculated as 6 (5 inter-station sections + the long route itself). When a train enters the throat section "1 / 27G" without branch lines, if the short route "3G-SF" is already open, this rule applies: N_total = 5 (inter-station section) + 1 (short route "3G-SF") = 6. At this point, the system can distinguish between when the train is in I-15G and when it is in the throat section; although the calculated value is the same (6), the calculation logic and physical meaning are different. More importantly, when the train continues to operate in the section occupying the short route "3G-SF," the short route status may change to "occupied" or "locked but signal off," and this rule no longer applies. N_total will change, thus dynamically and accurately reflecting the train's actual position and ensuring that the triggering logic is consistent with the actual transportation situation.

[0058] The implementation logic of the second irregular position search unit (departure direction): This unit is used to find trains that have entered a relatively deep position in the departure route. Its core judgment, "the occupied section is the starting section of the continuous occupied section closest to the departure port direction within the route," is implemented as follows: The system checks each track section in the route sequentially from the end (departure port) towards the beginning (track). When the first occupied section is found, and there are one or more consecutive occupied or locked sections after it (towards the track), the first occupied section is determined as the "starting section." This logic ensures that the search is for the actual running front line occupied by the train, closest to the departure direction.

[0059] The specific working process and principle of this step are as follows: In response to the route sequence to be triggered, the train search process is recursively executed from the receiving port of the target station to the subsequent stations; the search process consists of multiple search units executed in sequence or by conditional jump.

[0060] This step is not a single query action, but a dynamic, intelligent, scenario-driven recursive decision-making process. This process makes full use of the "business knowledge graph" index built in step S1 and the "historical context" status records provided in step S2 to solve the problem of finding train services across all scenarios, from regular locations to irregular locations, and from standard stations to complex station types with one station and two yards.

[0061] Its basic working principle is a state-oriented hierarchical progressive search. The process starts from the receiving port of the target station and, in the opposite direction of train operation, tracks the possible positions of the train station by station and scene by scene, like a "detective". The process is initiated by the sequence of routes to be triggered, and its ultimate goal is not only to find the train number, but also to obtain the key parameter used to determine the timing of route triggering - the precise number of available intervals.

[0062] The workflow and unit collaboration principle of the search process are as follows: First, the "interval search unit" is executed, which is the first layer of the search logic, corresponding to the normal scenario where the train is running in the inter-station block section. If not found, it indicates that the train may have entered or is about to enter the station area, and the process enters the detailed search stage within the station.

[0063] At this point, using the "port-departure route" index established by S1, the "open departure route search unit" is executed. The automated machine no longer traverses all routes at the rear station, but instead directly obtains a limited number of candidate departure routes through the departure port index of the adjacent station, and quickly checks if any of these routes are "fully locked and with the signal open." If found, the train number is searched for on the corresponding departure track. This step efficiently handles the orderly scenario where the train has already stopped and is ready to depart on the track. If there is a train on the track, the search is successful; if there is no train on the track, the "open receiving route search unit" is triggered.

[0064] The "Open Receiving Route Lookup Unit" is a crucial logical jump hub. It utilizes the "Arrival / Departure Track - Receiving Route" index established by S1 to quickly locate potential open receiving routes by working backward from the departure track. Once found, the process jumps to the entry port of that receiving route, and from there restarts the entire recursive search process. This simulates the reverse backtracking of the train operation chain, effectively extending the search scope to more distant stations.

[0065] If the "Open Departure Route Search Unit" does not find an open route, it means that the train may be in a dynamic process where a route has been arranged but the signal is about to close or has already closed. At this time, the process enters the irregular position search sequence, which is a core addition of this invention to address the deficiencies of the prior art.

[0066] The "First Irregular Position Search Unit" is specifically designed to handle the instantaneous scenario of "a train just entering the departure route". Its judgment criteria are a complex logic model: (1) the occupancy of the starting section of the route indicates that the train has started moving; (2) the locking of the remaining sections indicates that the route is still valid; (3) the key is whether the signal is "open or just closed", among which the determination of "just closed" depends heavily on the record in step S2 - by querying the "previous characteristic state" and transition time of the signal, it is confirmed as a "train signal" and the closing time is extremely short (e.g., <2 seconds). This accurately distinguishes between train entry and shunting operations. In this unit, the search scope is extended to the "route train number window" that may be associated with the departure route itself, covering the "vacuum period" when the train number may not have jumped to the track or departed due to communication delays.

[0067] If the train is not found in the first unit, the process proceeds to the "second irregular position search unit," which handles scenarios where the train has already entered the departure route. In this case, the signal will be closed, and the judgment is based on the occupancy pattern within the turning route: an occupied section exists, and this section is close to the train's location, with a continuous locked section ahead. This ensures that the train being tracked is one that is currently moving, rather than a remaining section of the route.

[0068] For the receiving direction, a "third" and a "fourth irregular position search unit" are also set up. Their principle is similar to that of the corresponding unit for the departure direction. They handle the scenarios of just entering and already entering the receiving route, respectively. The search position covers the approach section outside the station entrance and the route train number window. They are triggered in the recursive search link when no open receiving route is found at a certain port.

[0069] The deep collaboration with S1 and S2 is reflected in: 1. Efficiency and real-time performance: S1's index transforms each search unit (especially the "open" unit) from a full traversal to a targeted query, greatly reducing the amount of computation and winning a valuable time window for handling instantaneous scenarios with extremely high real-time requirements, such as "just pushed in".

[0070] 2. Judgment accuracy: The status record of S2 provides key logical judgment basis for irregular units (especially the first and third units), enabling the system to accurately distinguish between train roll-in and shunting, and ensuring that the search action is triggered only in the correct business scenario.

[0071] 3. Solving the core challenge – accurate calculation of the number of idle sections: This is one of the most significant technical effects of this invention. When a train is found in an irregular position unit, and the route is a long route passing through the central arrival / departure track, the system will call the "long-short route association index" established by S1. Through this index, it immediately queries whether the long route contains a short route with the central track as the starting and ending point. If the short route is in a "fully locked and signal open" state, it is counted as an idle section. This rule completely solves the problem pointed out in the appendix that "when the train is located at I-15G and 3G, the number of idle sections calculated by the target station is 6, which fails to distinguish between long and short routes and does not match the actual transportation situation." It enables the calculation of the number of idle sections to dynamically reflect the actual spatial position occupied by the train in the long route, achieving a high degree of consistency between the location triggering logic and the actual transportation situation.

[0072] Step S3 is a highly integrated and intelligent decision-making system. Through meticulously designed multiple search units and their strict execution sequence and jump logic, supported by S1 and S2, it achieves seamless coverage of all train operation positions (regular and irregular) and the entire process (approaching, pressing in, entering). Ultimately, it ensures the timeliness (covering instantaneous scenarios), accuracy (relying on historical states and precise calculations), and business consistency of train number lookup (unified train arrival and departure triggering logic, and accurate calculation of idle intervals), fundamentally overcoming the inherent shortcomings of existing technical solutions in complex scenarios such as one station with two yards.

[0073] This embodiment selects and organically combines three key steps: "reconstruction and indexing of data relationships", "station object status recording" and "train number lookup based on index and status records". It constructs a complete and collaborative solution, aiming to systematically solve the core problems of existing technologies in complex station types such as one station with two yards, such as delayed train number lookup, inaccurate calculation of the number of idle intervals, and inconsistent train arrival and departure triggering logic.

[0074] First, by deeply preprocessing and indexing the basic configuration data during the startup phase, scattered data is transformed into a relational network with clear business semantics. This not only provides an efficient "navigation map" for all subsequent search actions, but more importantly, it explicitly models the inclusion relationship between long and short routes, laying a unique and crucial data foundation for accurately calculating the number of idle intervals at different positions of a train on a long route. Furthermore, by adding historical records of the previous characteristic state to the signal object, the system is provided with a basis for distinguishing between instantaneous scenarios such as train arrivals and shunting operations, filling the logical gap in the critical time window of "signal closed but train number not changed." Finally, supported by the reconstructed data foundation and enhanced state judgment capabilities, a recursive search process is designed, in which multiple search units are executed collaboratively according to a strict logical order and conditional jump rules. This process not only covers regular locations such as inter-station sections and tracks within stations, but also innovatively adds a new search unit for irregular locations such as "just entered" and "already entered". By calling the long and short route association index and status history, it achieves accurate and fast positioning of train numbers and dynamic and accurate calculation of the number of empty sections in complex scenarios.

[0075] This method forms a closed-loop workflow in the autonomous machine. After the initialization phase (S1, S2) is completed, the system enters the ready state. When a route sequence request is triggered, the current train search process (S3) is started. This process is executed recursively according to predetermined logic, and its output is as follows: a) If a train is successfully found in a certain search unit, a success result containing the train number, train attributes, and the exact number of available intervals (N_total) is output for use by the autonomous machine's route triggering logic; b) If no train is found after recursively traversing to the configured farthest station, a search failure signal is output. After a search failure, the autonomous machine can suspend the automatic triggering of the route sequence and allow the dispatcher to intervene or wait for the next cycle triggering attempt.

[0076] Example 2 provides a train number lookup system applicable to stations with one station and two yards. As a physical and logical implementation of the aforementioned method, it is tightly integrated into the station autonomous machine of the CTC system. Through modular design, this system transforms abstract method steps into concrete, collaboratively operating functional units, jointly ensuring the efficiency, accuracy, and scenario completeness of train number lookup. The core of the system lies in the organic coordination of three professional modules and the precise transmission of data flow and control flow.

[0077] 1. Data Preprocessing and Indexing Module: This module serves as the system's "data engine" and "knowledge base builder," activated during the power-on or restart initialization phase of the autonomous machine. Its core task is to perform the data relationship reconstruction and index creation operations described in step S1. When the module is working, it first sequentially reads and parses the basic configuration data tables explicitly listed in the appendix materials from persistent storage, including: track data table (used to identify key attributes such as main lines and arrival / departure lines), port data table (used to determine the direction of train arrival and departure and the corresponding section), and most importantly, the interlocking route table (defining all legal train movement paths). Its working principle is not simple loading, but rather actively performing semantic analysis and relationship extraction.

[0078] The module traverses this data and executes innovative indexing algorithms: for example, it scans all routes, using the terminal signal of each route as a clue, and categorizes them under the corresponding departure port, thus building an efficient "port-departure route" hash index table in memory. Similarly, by analyzing the terminal tracks of routes, it establishes a reverse index of "arrival / departure track-receiving route". Crucially, the module's embedded topology analysis subroutine identifies relationships within route sequences, such as the case mentioned in the appendix where the long route "I-15G-via 3G-SF" contains the short route "3G-SF", and establishes a one-way association index of "long route ID -> short route ID". The module's output is not the raw data, but a highly structured "data link index structure" that can be directly used for fast relationship queries, providing millisecond-level data access capabilities for all subsequent search logic, fundamentally replacing inefficient global traversal.

[0079] 2. Object State Management Module: This module serves as the system's "state perception and memory center," responsible for real-time monitoring and recording of the dynamic changes of key station objects (primarily signal controllers). Its core function is to accurately execute the recording function described in step S2. Internally, the module maintains a detailed state model for each signal controller object. Whenever it receives signal controller state change information from the interlocking system, the module not only updates the object's "current state characteristic value" (such as "green light open," "closed") and "time of transition to the current state," but also performs a crucial operation: archiving and storing the previous state value and timestamp as the "previous characteristic state."

[0080] This design directly addresses the challenge of distinguishing between shunting and train operations. For example, when a departure signal that also functions as a shunting signal closes, the current "closed" state alone is insufficient to determine the cause. However, if the module records a "previous characteristic state" as a "train permission signal," it provides irrefutable evidence that a train has just entered the area. By providing a precise "state transition history" query interface, the module enables the train search logic to accurately determine intent in instantaneous scenarios, filling the logical gap in existing systems during the brief time window after a signal closes.

[0081] 3. Train Search Execution Module: This module is the "intelligent decision-making and execution core" of the system and is closely connected to the previous two modules. It receives trigger requests from the autonomous machine's route sequence management unit and allocates resources to complete tasks according to the complete process and execution logic defined in step S3.

[0082] Internally, the module encapsulates sub-logic programs corresponding one-to-one with the seven search units in step S3 (interval, open departure route, open receiving route, and the first to fourth irregular position search units). Its operation is a dynamic, condition-driven state machine: upon startup, it starts from the target port and first calls the "interval search unit" sub-logic; if this fails, it quickly locates the relevant route set by querying the "port-departure route" index provided by the data preprocessing and indexing module, and then calls the "open departure route search unit" sub-logic for checking; subsequent processes strictly follow the defined path, and when "no open route is found," it sequentially calls the "first" and "second" irregular position search unit sub-logic. In the logical judgments of these irregular units (such as judging "the signal has just closed"), the module queries the object state management module in real time for the signal's previous characteristic state and time as a key judgment criterion.

[0083] When a train number is successfully located in any irregular location unit, and a long route is involved, the module will query the "long-short route association index" established by the data preprocessing and indexing module to find the associated short route and verify its status. If the short route is open, a special calculation rule will be executed to count it as an idle segment. Finally, the module integrates all search and calculation results and outputs a complete search result containing the target train number and the precisely calculated number of idle segments for use by the route triggering logic.

[0084] 4. System Collaboration and Overall Effect: These three modules constitute a highly efficient and collaborative closed-loop system: the data preprocessing and indexing module provides a "static and efficient navigation map".

[0085] The object state management module provides "dynamic, memory-based perception capabilities".

[0086] The train search execution module acts as the "brain," utilizing the information provided by the former two modules and following a carefully designed algorithm process to execute specific search tasks.

[0087] Through the aforementioned modular and specialized division of labor and collaboration, the entire system achieves a solid engineering implementation of the essence of the invention's methodology—namely, improving efficiency through data preprocessing, ensuring accuracy through state memory, and covering all scenarios through process design. Ultimately, this enables the station's automated control system integrated with the system to reliably overcome the shortcomings of existing technologies and achieve timely, accurate, and consistent train number lookup and route sequence triggering in complex environments such as one station with two yards.

[0088] In summary, the complete train number lookup method and system provided by this invention systematically overcomes the key challenges faced by existing solutions in complex station types such as one station with two yards through three interconnected and complementary core technologies. First, by reconstructing data relationships and establishing indexes during the startup phase, the scattered static configurations are transformed into highly correlated business data links that can be directly used for rapid navigation. This not only fundamentally solves the efficiency bottleneck of full-domain traversal but also establishes an indispensable data foundation for accurately calculating the number of idle sections under long and short routes. Second, by enhancing the recording of station object states, the system endows the signal controllers with a brief historical state memory capability, enabling the system to accurately distinguish between train operations and shunting operations within the critical time window of "signal closed but train number not changed," providing a reliable logical basis for handling irregular location scenarios. Finally, based on the enhanced data and status support mentioned above, a recursive search process with multiple units working together in strict logic was designed. Innovatively, search units for irregular positions such as "just entered" and "already entered" were added, and special calculation rules for the idle interval under the association of long and short routes were embedded, achieving seamless coverage of the entire position and process of train operation.

[0089] By comprehensively applying the aforementioned technical means, this invention successfully solves the three core defects pointed out in the background art: failure to find train numbers at irregular locations, deviations in calculating the number of available intervals for long and short routes, and inconsistencies in the triggering logic of train arrival and departure route sequences caused by these defects. In terms of efficiency, replacing inefficient traversal with indexed queries significantly improves the real-time performance of train number lookup, meeting the response requirements for instantaneous scenarios. Regarding accuracy, combining state history with refined search conditions ensures the precise accuracy of train number positioning and available interval calculation, closely matching actual transportation conditions. In terms of business consistency, it completely eliminates the contradictions in train arrival and departure triggering logic caused by train number lookup failures or calculation errors. Therefore, this invention significantly improves the automation, intelligence, and overall reliability of the route sequence triggering of the CTC system in a single-station, two-yard station, and has significant engineering application value.

[0090] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.

Claims

1. A method for finding train numbers applicable to stations with one station and two yards, applied to the station self-regulating machine of the CTC system, characterized in that, Includes the following steps: Step S1: Data Relationship Reconstruction and Index Establishment: During the autonomous machine startup phase, the station's basic configuration data is read and processed. An index establishment operation is performed to construct a long-chain data link for efficient retrieval. The basic configuration data includes at least port data, track data, and interlocking route table data. The index establishment operation includes: establishing a "port-departure route" index pointing to all departure routes for each departure port; establishing a "receiving route-port" index pointing to all receiving routes for each receiving port; establishing a "arrival / departure track-receiving route" index pointing to all receiving routes for each arrival / departure track; identifying the inclusion relationship between routes, and establishing a one-way association index between a long route and its included short routes, denoted as the long-short route association index. Step S2: Station Object Status Recording: For signal objects, in addition to recording their current status characteristic value and status transition time, the status characteristic value of their previous characteristic state and the time of transition to that previous characteristic state are also recorded; the status characteristic value is used to distinguish between train permission signals, shunting permission signals, and closed states; Step S3: Train Number Search Based on Index and Status Records: In response to the route sequence to be triggered, the train number search process is recursively executed from the receiving port of the target station to the rear stations; the search process consists of multiple search units executed sequentially or conditionally, including a section search unit, an open departure route search unit, an open receiving route search unit, and multiple irregular position search units for searching train numbers in irregular positions.

2. The method according to claim 1, characterized in that, In the search process of step S3, when calculating the number of free intervals in the trigger route sequence, if the route of the train is successfully found to be a long route through the central arrival / departure track, the following steps are performed: obtain the fixed number of free intervals from the receiving port of the target station to the corresponding port of the station behind the train, denoted as N_base; query the long and short route association index to obtain the short route associated with the long route, which starts and ends at the central arrival / departure track; if the short route is in a fully locked and signal-open state, calculate the final number of free intervals N_total = N_base + 1, where "+1" represents counting the short route as a logical free segment; otherwise, calculate the number of free intervals in the conventional way.

3. The method according to claim 1 or 2, characterized in that, In step S2, the "previous feature state" is used to help determine whether the train permission signal was previously opened before the currently closed signal, so as to distinguish between train routes and shunting routes and ensure that the train number lookup only serves the train operation plan.

4. The method according to claim 1, characterized in that, In step S3, the search unit includes: an interval search unit: searching for train numbers in the associated train number window of the inter-station interval; an open departure route search unit: using the "port-departure route" index, searching for whether there is a fully locked and open departure route under the specified departure port of the rear station, and searching for train numbers on the track to which the found route belongs; an open receiving route search unit: when no train number is found on the track of the open departure route, using the "arrival / departure track-receiving route" index, searching for a fully locked and open receiving route to that track, and jumping to the entry port of that receiving route to continue the recursive search; and a first irregular position search unit: used to find a location where "the first and / or second object of the route is occupied, the remaining objects are locked, and the departure signal is open or..." The system has four main components: a first, a second, and a third, a fourth, and a fifth. The first is a train number located in the area of ​​a departure route where the departure signal is closed and the route was previously occupied. The second is a non-standard location search unit where the departure signal is closed, there is an object occupying the route, and the occupied section is the starting section of the continuous occupied section closest to the departure port direction within the route. The third is a non-standard location search unit where the first and / or second object on the route is occupied, the remaining objects are locked, and the entrance signal is open or has just been closed. The fourth is a non-standard location search unit where the arrival signal is closed and the route is occupied.

5. The method according to claim 4, characterized in that, In step S3, in the first irregular position search unit, "departure signal has just been closed" is defined as the state transition time being within a preset threshold and the previous characteristic state being the train permission signal state.

6. The method according to claim 4, characterized in that, In step S3, the execution logic of the train search process is as follows: if the "interval search unit" does not find a train, it enters the "open departure route search unit"; if the "open departure route search unit" does not find a route that meets the conditions or does not find a train on the track, it enters the "first irregular position search unit" and the "second irregular position search unit" in sequence; if an open route is found in the "open departure route search unit" but there is no train on the track, it enters the "open receiving route search unit" for recursive jump; the "third irregular position search unit" and the "fourth irregular position search unit" are executed after determining that there is no open receiving route at the corresponding port during the recursive search process.

7. A train number lookup system applicable to stations with one station and two yards, integrated into the station self-regulating machine of the CTC system, used to implement the method according to any one of claims 1 to 6, characterized in that, The system includes: a data preprocessing and indexing module, used to read station basic configuration data when the system starts, and execute the data relationship reconstruction and index establishment operation described in step S1 to generate a data link index structure that can be quickly queried; an object status management module, used to monitor and record the status of station objects in real time, specifically executing the recording function of the current status and previous characteristic status of signal objects described in step S2; and a train search execution module, connected to the data preprocessing and indexing module and the object status management module, used to receive route sequence trigger requests, and according to the process described in step S3, call the corresponding search unit logic, and with the support of the data preprocessing and indexing module and the assistance of status recording information, perform recursive train search at regular and irregular positions, and output the search results and related information on the number of available intervals.

8. The system according to claim 7, characterized in that, The search unit logic integrated in the train search execution module corresponds one-to-one with each search unit defined in step S3, and works together according to the execution logic to complete the train search.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 6.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1 to 6.