Train distance early warning method based on CIR device data

CN122957288APending Publication Date: 2026-10-23天津七一二移动通信股份有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611456003.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-18
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0009]本发明旨在克服现有列车距离预警技术中存在的测距精度低、方向识别困难、站内误报频发以及信息孤岛等问题,提供一种基于CIR设备数据的列车距离预警方法

Benefits of technology

[0021]本发明产生的技术效果是:相较于现有技术,本发明具有以下的技术优势:1.测距精度显著提升,本发明摒弃了传统的基于GNSS坐标的欧氏距离计算方式,转而采用铁路系统固有的、精确到米的公里标体系进行线性距离测算。该方法直接反映列车在线路上的实际运行里程差,完全规避了因地形弯曲、地球曲率或信号遮挡引起的GNSS定位漂移问题,将距离计算误差控制在1米以内。而传统GNSS方案在隧道、山区或弯道等场景下,经纬度反算距离的投影误差可达数十米甚至上百米,本发明确保了预警触发阈值的准确性和可信度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122957288A_ABST
    Figure CN122957288A_ABST
Patent Text Reader

Abstract

A train distance early warning method based on CIR equipment data, a ground server receives a CIR equipment message, and writes into a distributed cache after analysis; preliminary screening of adjacent trains is carried out to obtain a candidate train set in geographical proximity; consistency verification of running direction is carried out to eliminate counter running trains; kilometer marker analysis and distance calculation are carried out; the linear running distance of adjacent trains running in the same direction and the current train is calculated; adjacent train classification and sorting are continued in the ground server; intelligent screening and simplification are carried out in the ground server; the queue stability judgment result is output; the early warning level is generated and adjusted according to the judgment result to obtain the current early warning level; global relationship aggregation is carried out in the ground server to generate a globally unique train pair relationship list for large screen display; early warning information broadcasting is carried out, and finally the train-ground collaborative closed loop of early warning information is completed to realize accurate perception and efficient response of train running safety situation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of rail transit safety monitoring technology, and in particular relates to a train distance early warning method based on CIR device data. Background Technology

[0002] With the continuous expansion of my country's railway network and the increasing density of train operations, ensuring train safety has become one of the core tasks of railway transportation management. To prevent rear-end collisions, side collisions, and other serious operational accidents, the existing railway system has widely deployed a variety of active safety protection devices, mainly including Automatic Train Protection (ATP), Locomotive Control and Monitoring System (LKJ), and Autonomous Emergency Braking (AEB).

[0003] The aforementioned systems typically rely on track circuits, transponders (Balise), Radio Block Centers (RBCs), or Global Positioning Systems (GPS / BeiDou) to obtain train position information and determine the safe separation between trains based on fixed block or quasi-moving block logic. When a potential collision risk is detected, the system will trigger audible and visual alarms or even forcibly apply braking to ensure safety. However, in practical applications, existing technical solutions still have several common technical bottlenecks and systemic limitations: First, the method of calculating the Euclidean distance between trains based on GNSS coordinates suffers from significant ranging errors in complex terrain environments. Because the relationship between the Earth's curvature and the railway line's alignment is not linear, especially in long curved sections, tunnel complexes, or viaduct areas, simply relying on latitude and longitude coordinates to calculate ground distances leads to large projection errors, making it difficult to meet the meter-level or even sub-meter-level positioning requirements for high-precision early warning systems. Such errors can trigger false alarms or missed alarms, affecting the system's reliability and dependability.

[0004] Secondly, existing systems generally lack efficient direction recognition mechanisms, making it impossible to accurately distinguish between trains traveling in the same direction and those traveling in opposite directions on the same track. In double-track or multi-track parallel sections, if nearby trains are selected solely based on spatial proximity while ignoring the direction of travel, oncoming trains are easily misjudged as potential rear-end collision targets, resulting in frequent false alarms. This "direction confusion" problem not only interferes with the driver's normal operation but also reduces dispatchers' trust in the early warning system.

[0005] Furthermore, when trains are densely packed within a station, even without operational conflicts between them, the small physical distance between trains can cause the standard distance warning logic to frequently trigger alarm signals, resulting in the so-called "false alarms within the station." Such false alarms severely impact system availability and user experience, and their long-term presence may lead to "alarm fatigue" among operators, causing them to overlook truly dangerous warning events.

[0006] Finally, most existing systems adopt a one-way information push architecture, meaning that control commands are only sent from ground equipment to the onboard terminal, lacking a two-way closed-loop information sharing mechanism. This makes it difficult for a single train to fully grasp the surrounding operational situation, and also prevents multi-train collaborative early warning and joint response, limiting the further improvement of overall safety protection capabilities.

[0007] To address the aforementioned issues, some patents have attempted to propose improvement solutions. For example, Chinese invention patent CN102632912A discloses a subway train collision avoidance warning system and method. This system utilizes the existing train traction power supply contact network as a carrier communication channel and incorporates a special phase-splitting device and coupler to achieve direct bidirectional data interaction between trains. While this solution alleviates to some extent the problems of traditional wireless communication's susceptibility to interference and increased latency due to reliance on ground relays, it still fails to fundamentally solve the two core pain points of carrier signal attenuation and noise coupling during long-distance transmission through the contact network. Furthermore, it relies on modifying the insulation sections of the contact network to form continuous signal transmission channels, resulting in high implementation complexity and hindering rapid deployment and large-scale application under existing complex line conditions.

[0008] Therefore, the industry urgently needs a new train spacing early warning solution that can guarantee extremely low latency while also possessing high ranging accuracy, strong direction discrimination capability, intelligent false alarm suppression mechanism, and efficient information distribution capability. This invention is proposed against this backdrop, aiming to provide a lightweight, highly robust, and easily deployable technical architecture to address the growing safety monitoring needs of modern railway transportation. Summary of the Invention

[0009] This invention aims to overcome the problems of low ranging accuracy, difficulty in direction identification, frequent false alarms within stations, and information silos in existing train distance warning technologies, and provides a train distance warning method based on CIR device data. Specifically, this invention addresses the following four key technical challenges: 1. How to achieve high-precision dynamic monitoring of the actual running distance between trains without relying on high-cost sensors or multi-source fusion algorithms, avoiding spatial projection errors introduced by using GNSS coordinate calculations; 2. How to design a direction identification mechanism with extremely low computational overhead, capable of quickly and accurately distinguishing between trains running in the same and opposite directions, eliminating interfering vehicles from the opposite direction, and improving the accuracy of nearby target screening; 3. How to construct an intelligent exemption judgment logic that can automatically avoid unnecessary warning triggers when trains enter the station area, effectively reducing the frequency of false alarms caused by dense parking, and improving warning accuracy and user acceptance; 4. How to establish an efficient and stable warning information dissemination channel, realizing the full-network broadcasting and proactive push of warning information between the ground data center and all online trains, constructing a closed-loop safety monitoring system for vehicle-ground collaboration.

[0010] This invention receives and parses messages reported by CIR devices, extracts key information fields, searches for nearby trains using the current train's GPS coordinates, eliminates reverse trains by combining the odd / even digits of the last train number, accurately calculates linear distances using kilometer markers, and simplifies the target by selecting the three closest trains in the preceding set and the one closest train in the following set. Simultaneously, it triggers station exemption judgments to avoid false alarms within the station. Finally, after hierarchical early warning and global aggregation and deduplication, the data is broadcast to each train terminal via UDP, realizing real-time calculation of train spacing, intelligent early warning, and closed-loop control of train-ground collaboration.

[0011] The technical solution adopted in this invention is: a train distance warning method based on CIR device data, which is implemented based on a ground server and CIR devices in the train. The steps are as follows: Step 1, data acquisition and cache update: the ground server receives CIR device messages, parses them and writes them into the distributed cache; Step 2: Based on the cached results of Step 1, perform preliminary screening of nearby trains on the ground server. Using the current train as the center, initiate a spatial range search based on its GPS coordinates to obtain a set of geographically nearby candidate trains. Step 3: After obtaining the set of nearby candidate trains in Step 2, verify the consistency of the running direction: by batch querying the train numbers, extract the last digit of each train number, and judge it according to the fixed correspondence between the up and down directions and the parity of the train number in the railway operation rules. If the last digit is odd, it is determined to be the down direction, and if it is even, it is determined to be the up direction. In this way, candidate trains that are opposite to the current train's running direction are eliminated, thereby realizing the consistency verification of the running direction. Step 4: After removing the reverse trains in Step 3, the kilometer markers are parsed and the distance is calculated on the ground server. The kilometer marker strings of the retained trains are converted into a unified metric unit, and the linear running distance between the current train and the adjacent trains traveling in the same direction is calculated. Step 5: After the calculation in step 4, continue to classify and sort nearby trains on the ground server, determine the relative position of the preceding and following trains based on the size of the kilometer marker values, and sort similar targets in ascending order of distance. Step 6: After sorting in Step 5, intelligent filtering and simplification are performed on the ground server. The three closest trains in the preceding train set and the one closest train in the following train set are selected as the final list of nearby trains for the current train, and the remaining targets are removed. The most representative nearby train targets are selected to reduce the subsequent processing load. Step 7: After filtering and simplification in Step 6, perform station status detection and exemption determination: determine whether an exemption is triggered based on the station position and running status of the nearest preceding train, determine the stability of the preceding train queue based on the speed consistency between the current train and each preceding train, and output the queue stability determination result. Step 8: After the determination in Step 7, the warning level is generated. If the station exemption is triggered, the warning level is determined to be the lowest warning level. If the station exemption is not triggered, the distance to the nearest preceding vehicle is compared with the preset multi-level distance threshold to determine the initial warning level. Then, the initial warning level is adjusted according to the queue stability determination result in Step 7 to obtain the current warning level. Step 9: After the warning level is determined in Step 8, global relationship aggregation is performed on the ground server to summarize all train calculation results, standardize the pairing order and remove duplicates, and generate a globally unique list of train pair relationships for display on the large screen. Step 10: After steps 1 to 9 above, the warning information is broadcast, and the warning information of this train and neighboring trains is encapsulated into UDP data packets and pushed in batches by the ground server to the CIR devices of each train, thus completing the closed loop of train-ground coordination of warning information and realizing accurate perception and efficient response to the train operation safety situation.

[0012] The data acquisition and cache update method described in step 1 is as follows: The ground server receives standardized protocol messages reported by the CIR equipment of the train via UDP protocol, decodes the byte stream and parses the protocol frames, and distributes the messages to different processing branches according to the frame type field, extracting the locomotive number, train number, kilometer marker, speed, latitude and longitude, and timestamp fields; based on this, the locomotive number is used as the key and the structured state object is used as the value to write into the distributed cache, and the cache expiration time is set to ensure data timeliness, thereby providing a real-time train status data foundation for spatial search, direction verification, and distance calculation in subsequent steps.

[0013] The method for preliminary screening of nearby trains in step 2 is as follows: Based on the real-time cached data constructed in step 1, with the current train's GPS coordinates as the center and a preset radius as the search radius, the geospatial index service is invoked on the ground server to perform a range query, and a list of locomotive numbers of all online trains within a circular area with the current train's GPS coordinates as the center and a preset radius as the radius is obtained as a candidate train set.

[0014] The method for verifying the consistency of the running direction in step 3 is as follows: Based on the candidate train set, batch query the train number corresponding to each candidate train, extract the last digit of each train number, and judge according to the fixed correspondence between the up and down directions and the parity of the train number in the railway operation rules. If the last digit is odd, it is determined to be the down direction, and if it is even, it is determined to be the up direction. Based on this, candidate trains that are opposite to the current train running direction are eliminated, and only trains running in the same direction are retained to participate in the subsequent distance calculation.

[0015] The method for kilometer marker resolution and distance calculation in step 4 is as follows: After completing the direction filtering, the kilometer marker strings of the reserved trains are retrieved in batches from the cache on the ground server. The kilometer marker strings contain the line number, mileage number and direction identifier. They are converted into integer values ​​in meters according to a unified resolution rule. Based on this, the absolute value of the difference between the kilometer marker values ​​of the current train and each candidate train is calculated as the actual linear running distance between the two trains, so as to avoid the terrain projection error introduced by the Euclidean distance calculation based on GNSS coordinates.

[0016] The method for classifying and sorting neighboring trains in step 5 is as follows: based on the relationship between the kilometer marker values, trains with kilometer markers greater than the current train are divided into the preceding train set and trains with kilometer markers less than the current train are divided into the following train set on the ground server, and the preceding train set and the following train set are arranged in ascending order of distance respectively.

[0017] The intelligent filtering and simplification method described in step 6 is as follows: After completing the classification and distance sorting of neighboring vehicles, the three closest trains in the preceding vehicle set and the one closest train in the following vehicle set are extracted respectively as the final neighboring vehicle list of the current train, and the remaining targets are removed, thereby minimizing the processing load of subsequent early warning judgment and information push links while retaining key risk information.

[0018] The method for station status detection and exemption determination in step 7 is as follows: query the station section database to determine whether the nearest preceding train is in the station. If so, make a dynamic determination based on its speed data: when the nearest preceding train decelerates or stops, an exemption is triggered; when the nearest preceding train does not decelerate, no exemption is granted. When the exemption conditions in the station are not met, calculate the speed difference between the selected preceding trains and the current train. If each speed difference is less than the preset value in the ground server, it is determined to be a stable queue.

[0019] The method for generating the warning level in step 8 is as follows: After completing the station status detection and exemption determination in step 7, if an exemption within the station is triggered, the warning level is determined to be the lowest warning level; if the exemption determination is not triggered, the linear running distance of the nearest preceding train is obtained, and it is compared with the preset multi-level distance thresholds one by one to determine the initial warning level corresponding to the current train; if step 7 determines it to be a stability queue, the initial warning level is reduced by one level to obtain the current warning level; if the initial warning level is already the lowest warning level, it remains unchanged.

[0020] The method for global relationship aggregation described in step 9 is as follows: Global relationship aggregation includes summarizing the calculation results of the neighboring train relationships of all individual trains on the ground server. For each pair of train relationships, it is standardized into a pairing identifier with the preceding train number first and the following train number last, and stored in a hash set to achieve automatic deduplication, generating a globally unique list of train pair relationships for display on the dispatch center's large screen. The method for broadcasting early warning information described in step 10 is as follows: Early warning information broadcasting includes encapsulating the local status of each train and the early warning information of neighboring trains into UDP data packets conforming to the CIR communication protocol specification. The ground server then uses an asynchronous non-blocking I / O method to push the data packets in batches to the IP addresses and ports reported and stored in the distributed cache when the CIR devices of each train are registered and online, according to a preset broadcast cycle. The data packets are pushed repeatedly in each broadcast cycle, so that the data packets lost in the previous broadcast cycle are resent in the next broadcast cycle. Each UDP data packet also carries a sequence number that increases cyclically in the range of 0 to 255 with the broadcast cycle, so that the train CIR devices can identify packet loss based on the continuity of the sequence number, thus completing the closed-loop push of early warning information between the train and the ground.

[0021] The technical effects of this invention are as follows: Compared with existing technologies, this invention has the following technical advantages: 1. Significantly improved ranging accuracy. This invention abandons the traditional Euclidean distance calculation method based on GNSS coordinates and instead adopts the inherent kilometer-scale system of the railway system, accurate to the meter, for linear distance measurement. This method directly reflects the actual mileage difference of the train on the line, completely avoiding the GNSS positioning drift problem caused by terrain curvature, Earth curvature, or signal obstruction, and controlling the distance calculation error to within 1 meter. In contrast, the projection error of traditional GNSS solutions in scenarios such as tunnels, mountains, or curves can reach tens or even hundreds of meters when calculating the distance from latitude and longitude. This invention ensures the accuracy and reliability of the early warning trigger threshold.

[0022] 2. Highly efficient and reliable direction recognition: This invention proposes a direction recognition mechanism based on "train number parity determination," which quickly determines the up or down direction of the train by utilizing the parity of the last digit of the train number. This method does not require complex vector calculations or angle analysis, and its time complexity is only O(1), significantly reducing computational resource consumption. Compared with traditional methods, this mechanism does not rely on dynamic trajectory fitting or instantaneous velocity vector estimation, fundamentally eliminating the possibility of direction misjudgment caused by positioning drift or data jitter. The direction determination result is deterministic and unique, demonstrating superior accuracy and robustness compared to traditional methods in engineering practice.

[0023] 3. The false alarm rate is significantly reduced and the judgment is more refined. By introducing "station dynamic exemption and train queue stability coordination," this invention can intelligently identify the stopping or slowing state of a train within the station area and distinguish between two operating states: safe operation in the same direction and dangerous approach. For station scenarios, once the nearest preceding train is detected to be within the preset station operating section and showing a deceleration or stopping trend, this method will automatically skip the warning level judgment process; if it is accelerating or not decelerating, it will not be exempted and will continue to execute the subsequent warning judgment, effectively avoiding the risk of missed alarms during the acceleration phase of leaving the station. For section operation scenarios, by calculating the current train and the... The system monitors the real-time speed differences between multiple preceding trains. When all speed differences are less than a preset threshold, the train is determined to be in a stable convoy operation state. The initial warning level is automatically reduced by one level, but not lower than the minimum safety threshold, effectively avoiding excessive alarms triggered solely based on physical distance. Traditional warning methods have a consistently high false alarm rate in station areas and stable operating scenarios, severely impacting the trust of drivers and passengers in warning information. This invention eliminates such false alarms from the source of the judgment logic. Verified in a classic hub station scenario, it can eliminate invalid warnings in all non-actual conflict scenarios within the station, significantly improving the practicality and user experience of this method.

[0024] 4. Resource load optimization is reasonable. The neighbor vehicle filtering strategy designed in this invention separately extracts the three closest trains from the preceding train set and the one closest train from the following train set. After classifying and sorting neighbor vehicles by distance, by retaining only the three closest preceding trains and one closest following train, the number of targets to be processed in a single warning decision is reduced from all trains within the geographically proximate range (which can reach dozens in a typical scenario) to no more than 4. Data transmission volume and front-end rendering load are reduced by more than 90%. This strategy not only significantly reduces network transmission overhead and terminal display pressure, but also helps drivers focus on the limited number of targets that are most likely to pose operational risks, avoiding information overload.

[0025] 5. Excellent overall performance: This invention adopts a high-performance architecture design of "multi-level caching + parallel computing + streaming aggregation," combined with batch operation and asynchronous communication technology, supporting concurrent processing of thousands of trains. Real-world test data shows that, under typical hardware configurations, the time for a single calculation is less than 100 milliseconds, meeting the stringent real-time requirements of railway systems and demonstrating good scalability and engineering feasibility.

[0026] 6. Information closed-loop ensures safety. This invention constructs a complete two-way information sharing channel between the train and the ground. On one hand, warning results, after global aggregation and deduplication, can be gathered in real time and displayed on the dispatch center's large screen for management personnel to conduct global situational awareness. On the other hand, warning information is proactively pushed to the CIR equipment of each train via the UDP protocol with millisecond-level latency, enabling drivers to promptly grasp changes in the surrounding operating environment. In contrast, traditional systems mostly adopt a one-way command issuance architecture, lacking information exchange between trains and forming "information silos." This invention achieves closed-loop transmission and coordinated response of warning information, significantly enhancing the initiative and timeliness of driving safety assurance.

[0027] 7. This invention is applicable to various railway transportation environments, including but not limited to high-speed railways, conventional trunk railways, heavy-haul freight lines, and intercity rail transit systems. In the current context of promoting the intelligent and digital transformation of railways, the technical solution provided by this invention can effectively support safety situational awareness throughout the entire train operation process, assisted driving decision support, and global visual monitoring in the dispatching and command center, possessing broad application prospects and significant engineering practical value. In particular, this invention can maintain stable and reliable performance under complex geographical conditions such as tunnels, mountainous areas, and curves where GNSS signals are limited or prone to geometric errors, compensating for the shortcomings of traditional GNSS-based positioning technologies. Furthermore, this invention can also serve as an important component of next-generation train control systems, meeting the safety interval management needs of advanced operating modes such as moving block, virtual formation, and autonomous operation, exhibiting good compatibility and expansion potential. Attached Figure Description

[0028] Figure 1 This is a flowchart of the method for implementing the present invention. Detailed Implementation

[0029] The following detailed description, in conjunction with the aforementioned method architecture and processing flow, provides a specific implementation of the train distance warning method software invention. It should be understood that the following description is merely illustrative and should not be construed as limiting the scope of protection of this invention. Those skilled in the art can make appropriate adjustments and substitutions to the implementation without departing from the spirit of this invention.

[0030] Example 1: As Figure 1As shown, a train distance warning method based on CIR device data is described below. The main train is a currently running train, denoted as Train A, with locomotive number SS9-0001 and train number K1024. The complete processing flow from receiving raw data to pushing warning information is described in detail below.

[0031] The software implementing this method is deployed on a ground server, configured with a dedicated network interface to receive and forward CIR device messages. The data reception function listens on a preset port through a UDP adapter in the Spring framework, continuously receiving hexadecimal format data streams actively reported by the online train CIR devices, proceeding to step 1.

[0032] Step 1: Data Acquisition and Caching. CIR messages are received and written to the cache. On the ground server, the data parsing and caching function decodes the received byte stream, converting it into a readable Hex string, and calls a dedicated parsing utility class to complete protocol frame parsing. The data is then distributed based on the frame type field. Type 01 represents a comprehensive information frame, containing locomotive number and train number; Type 03 represents a kilometer marker information frame, containing kilometer marker, speed, latitude and longitude, etc. For comprehensive information frames, the locomotive number and train number are extracted, and the train-locomotive mapping in the cache is updated. For kilometer marker information frames, the kilometer marker, speed, latitude and longitude, and timestamp fields are extracted, assembled into a structured data object, and synchronously written to the distributed cache using the locomotive number as the key and the structured status object as the value. A cache expiration time is also set to ensure data timeliness. Through this real-time data access and cache update mechanism, the latest status information of all online trains on the entire line is always available, laying the data foundation for subsequent spatial search, direction verification, and distance calculation.

[0033] Step 2, Proximity Search: This step searches for nearby trains based on GPS coordinates. The software implementing this method periodically triggers aggregation calculation tasks via a timer; in this embodiment, the scheduling period is set to 1 second. This task first obtains a list of locomotive numbers for all currently online trains and then performs calculations independently on each train using parallel streaming, achieving high concurrency processing. Taking train A as an example, the latest GPS coordinates of train A are first obtained from the cache, for example, 117.23°E, 39.12°N. Then, the spatial index service is called to perform a range query centered on these coordinates. The search radius is preset to 50 kilometers, a value dynamically configured based on the line's maximum operating speed and warning response time. This query obtains a list of locomotive numbers for all online trains within the circular area, successfully reducing the processing scope of subsequent calculations from hundreds of online trains globally to about 20 geographically nearby candidate trains, significantly reducing the subsequent computational load.

[0034] Step 3, direction verification, determining the direction by the odd or even number of the last digit of the train number, and eliminating trains traveling in the opposite direction; the software on the ground server queries the train number corresponding to each train in batches from the cache based on the candidate train locomotive number list, extracts the last digit of each train number, and makes a judgment based on the fixed correspondence between the up and down directions and the parity of the train number in the railway operation rules. Train A's train number is K1024, and the last digit is 4, which is an even number, so it is determined to be in the up direction; after comparing the candidate trains one by one, all down direction trains with an odd last digit are eliminated, and only up direction trains running in the same direction are retained for subsequent distance calculation. This step completes the direction screening through a simple number comparison with a time complexity of O(1), with extremely low computational overhead, and effectively avoids the problem of false alarms where oncoming trains are mistakenly judged as rear-end collision targets.

[0035] Step 4: Kilometer marker calculation, parsing the kilometer markers, and calculating the linear distance; batch retrieving the kilometer marker strings of reserved trains from the cache. The railway kilometer marker string format is a combination of line number, mileage number, and direction indicator. For example, 125.300-U indicates the uphill direction at 125 km + 300 m on this railway line. Each kilometer marker string is converted to an integer value in meters according to a unified parsing rule; for example, 125.300-U is converted to 125300 meters. The kilometer marker value for train A is 312500 meters, i.e., at K312+500. After parsing, each candidate train obtains its corresponding integer kilometer marker value. Based on this, the absolute value of the difference between the kilometer marker values ​​of train A and each candidate train is calculated as the actual linear running distance between the two trains. Since the kilometer marker directly corresponds to the precise mileage position of the train on the line, this distance value is completely unaffected by external factors such as terrain curvature, curve radius, or GNSS signal obstruction. The distance measurement error does not exceed 1 meter, which is far superior to the traditional Euclidean distance scheme based on latitude and longitude coordinates. In this calculation, the train closest to train A among the candidate trains traveling in the same direction is designated as train B. Its locomotive number is SS9-0007, train number is K1026, and its kilometer marker is 314700 meters, which is K314+700. The difference between train B and train A is 2200 meters, indicating that train B is located 2200 meters ahead of train A.

[0036] Step 5: Classify and sort. Determine the front and rear trains based on the kilometer markers and sort them by distance. On the ground server, determine the front and rear positions of each candidate train relative to the current train based on the size of the kilometer marker values. If the kilometer marker value is greater than the current train, it is classified as the front train set (i.e., located in front of the current train). If the kilometer marker value is less than the current train, it is classified as the rear train set (i.e., located behind the current train). The front train set and the rear train set are then sorted in ascending order by distance.

[0037] Step 6, Intelligent Simplification: The ground server extracts the three closest trains from the preceding train set and the one closest train from the following train set to form the final list of nearest neighbor trains for train A. All other nearest neighbor targets are removed. Train A originally had over 20 geographically nearest candidates; after directional filtering, 15 trains traveling in the same direction were retained. After the above extraction process, only 4 trains remained: three preceding trains and one following train. This strategy reduces the number of processing objects in subsequent early warning determination, data aggregation, and information push stages by more than 70%, effectively reducing the overall processing load while ensuring that no key targets most likely to pose operational risks are missed.

[0038] Step 7: Station Exemption Determination. The station status detection and dynamic exemption determination process is invoked on the ground server. A station section database is pre-built in memory. This database uses the line code as an index and records the starting and ending kilometer markers of each station along each line. The data comes from the railway track maintenance ledger, and the speed difference is pre-configured with a preset value of 3 km / h. First, the nearest preceding train, train B, is extracted from the list of trains near train A. Then, the line code of the line where train A is located is obtained. Using the railway line and the current kilometer marker value of train B (313200) as query conditions, a binary search is performed in the station section database to determine whether train B is within any station section.

[0039] Scenario 1: If train B is in the station and meets the conditions for deceleration or stopping, and train B is currently in the station section and its speed is decreasing, the system determines that it is in a deceleration and stopping state, triggers the station exemption, and determines the warning level to the lowest warning level to avoid unnecessary alarms caused by dense stops in the station.

[0040] Scenario 2: If train B is in the station but does not decelerate, for example, if train B is in the same section of the station but its speed is increasing, the system will determine that it has not decelerated and will not grant exemption. The system will continue to execute the warning level determination in step 8 to prevent the risk of missed alarms during the train departure and start-up phase.

[0041] In this embodiment, train B is located at K313+200. A query shows it is not within the station section, so the station exemption condition is not met, and the system enters the queue stability assessment. The system extracts the real-time speeds of the three preceding trains and train A retained in step 6, and calculates the absolute value of the speed difference between each preceding train and train A. If all speed differences are less than the preset value of 3 km / h in the ground server, it is determined to be a stable queue operation state, which is used for downgrading in step 8 after determining the initial warning level; if the initial warning level is already the lowest warning level, it is not downgraded. Conversely, if any speed difference is greater than or equal to the preset value, the queue operation is determined to be unstable, and a queue stability assessment result indicating no downgrading is output. In this embodiment, all speed differences are less than the preset value, which is considered a stable queue operation state, and a queue stability assessment result indicating a downgrade is output, then step 8 continues.

[0042] Step 8: Generate a warning level and compare distances with thresholds. Obtain the linear running distance of the nearest preceding train. The distance between train A and train B is 2200 meters. Compare this distance with preset multi-level distance thresholds one by one to determine the initial warning level. In this embodiment, three levels of distance thresholds are preset, divided from high to low as follows: the highest level corresponds to a distance less than or equal to 5 kilometers; the second level corresponds to a distance greater than 5 kilometers and less than or equal to 10 kilometers; the third level corresponds to a distance greater than 10 kilometers. The distance between train A and train B is 2200 meters, which falls into the highest level range of less than or equal to 5 kilometers. In this embodiment, step 7 has already output the queue stability judgment result, so the initial warning level is reduced by one level, resulting in the current warning level of train A being the second level. Write this warning level and the corresponding preceding train information into the cache. The preceding train information includes fields such as locomotive number, train number, kilometer marker, and distance, and marks it as the current warning status of train A.

[0043] Step 9: Global aggregation and deduplication, summarizing pairings, and generating a global list. The data aggregation and publishing function is invoked to collect the calculation results of single-car proximity relationships for all trains from the cache, including train A and all other trains on the line. For each single-car relationship record, for example, if the nearest train ahead of train A is train B, a standardized pairing identifier is constructed, following the rule of always concatenating the strings with the preceding train number first and the following train number last, for example, K1026-K1024. All pairing identifiers are stored in a hash set for automatic deduplication. Then, all deduplicated train pairs are sorted in ascending order of distance, and the top N pairs are extracted. In this embodiment, N is set to 100, but this value can be flexibly configured according to the large screen display capacity. The sorted and deduplicated results are serialized into JSON format and written to a dedicated cache key on the large screen. The front-end large screen pulls this data in real time via API, allowing dispatch center managers to perform visual monitoring of the overall train operation status. This deduplication mechanism ensures the uniqueness of the global relationship list, avoiding the problem of duplicate data display caused by the superposition of single-car calculation results.

[0044] In step 10, the warning broadcast is pushed via UDP to the CIR device terminals of each train; the warning information push is executed through an independent scheduling task. This task uses the same scheduling cycle as the aggregation calculation task described in step 2, which is also 1 second in this embodiment. When each train's CIR communication terminal registers online, it reports its IP address and port to the ground server. The ground server associates this with the locomotive number of the train and writes it into the distributed cache. The push task obtains the target address of each terminal accordingly. First, all registered active trains are queried, and online trains with real-time location data are selected. The status of these trains and the information of neighboring trains are loaded in batches. A data structure is assembled for each train. This structure includes the locomotive number, train number, warning level of the train itself, and key fields such as the locomotive number, train number, kilometer marker, and distance of up to four neighboring trains. Taking train A as an example, its data structure includes the status of train A itself, i.e., train number K1024, level 2 warning, kilometer marker 312500, and detailed data of four neighboring trains, i.e., three preceding trains and one following train. This data structure is encapsulated into UDP packets conforming to the CIR device communication protocol specification and sent asynchronously and non-blockingly to the corresponding IP address and port of each train's CIR terminal. The broadcast characteristic of the UDP protocol ensures millisecond-level latency for information push, meeting the real-time requirements of high-speed railway scenarios. Since the push task is executed cyclically according to the above fixed period, data packets lost in a single period are naturally resent by the push in the next period. At the same time, each UDP packet carries a sequence number that cyclically increases from 0 to 255 with the broadcast period. After the train CIR device receives a data packet, if the sequence numbers received in two consecutive periods do not satisfy the cyclical increasing relationship, it determines that the data packet of the corresponding period has been lost, and only the latest received data packet is used to ensure that the driver always receives the latest warning information. The number of successful and failed transmissions is also recorded, generating a push log for maintenance personnel to track and statistically analyze, ensuring the reliability and auditability of information push.

[0045] At this point, Train A has completed the entire processing flow from step 1 to step 10, which takes approximately 1 second to complete a full scheduling cycle. All trains on the entire line execute the above calculations in parallel using the same logic. Each train driver receives real-time information about the surrounding operating environment through the CIR device terminal, and the dispatch center monitors the overall safety situation in real time through a large screen, forming a complete train-ground collaborative safety early warning closed loop.

Claims

1. A train distance warning method based on CIR device data, characterized in that, Based on a ground server and CIR equipment in the train, the steps are as follows: Step 1: Data Acquisition and Cache Update. The ground server receives CIR device messages, parses them, and writes them into the distributed cache. Step 2: Based on the cached results of Step 1, perform preliminary screening of nearby trains on the ground server. Using the current train as the center, initiate a spatial range search based on its GPS coordinates to obtain a set of geographically nearby candidate trains. Step 3: After obtaining the set of nearby candidate trains in Step 2, verify the consistency of the running direction: by batch querying the train numbers, extract the last digit of each train number, and judge it according to the fixed correspondence between the up and down directions and the parity of the train number in the railway operation rules. If the last digit is odd, it is determined to be the down direction, and if it is even, it is determined to be the up direction. In this way, candidate trains that are opposite to the current train's running direction are eliminated, thereby realizing the consistency verification of the running direction. Step 4: After removing the reverse trains in Step 3, the kilometer markers are parsed and the distance is calculated on the ground server. The kilometer marker strings of the retained trains are converted into a unified metric unit, and the linear running distance between the current train and the adjacent trains traveling in the same direction is calculated. Step 5: After the calculation in step 4, continue to classify and sort nearby trains on the ground server, determine the relative position of the preceding and following trains based on the size of the kilometer marker values, and sort similar targets in ascending order of distance. Step 6: After sorting in Step 5, intelligent filtering and simplification are performed on the ground server. The three closest trains in the preceding train set and the one closest train in the following train set are selected as the final list of nearby trains for the current train, and the remaining targets are removed. The most representative nearby train targets are selected to reduce the subsequent processing load. Step 7: After filtering and simplification in Step 6, perform station status detection and exemption determination: determine whether an exemption is triggered based on the station position and running status of the nearest preceding train, determine the stability of the preceding train queue based on the speed consistency between the current train and each preceding train, and output the queue stability determination result. Step 8: After the determination in Step 7, the warning level is generated. If the station exemption is triggered, the warning level is determined to be the lowest warning level. If the station exemption is not triggered, the distance to the nearest preceding vehicle is compared with the preset multi-level distance threshold to determine the initial warning level. Then, the initial warning level is adjusted according to the queue stability determination result in Step 7 to obtain the current warning level. Step 9: After the warning level is determined in Step 8, global relationship aggregation is performed on the ground server to summarize all train calculation results, standardize the pairing order and remove duplicates, and generate a globally unique list of train pair relationships for display on the large screen. Step 10: After steps 1 to 9 above, the warning information is broadcast, and the warning information of this train and neighboring trains is encapsulated into UDP data packets and pushed in batches by the ground server to the CIR devices of each train, thus completing the closed loop of train-ground coordination of warning information and realizing accurate perception and efficient response to the train operation safety situation.

2. The train distance warning method based on CIR device data according to claim 1, characterized in that, The data acquisition and cache update method described in step 1 is as follows: The ground server receives standardized protocol messages reported by the CIR equipment of the train via UDP protocol, decodes the byte stream and parses the protocol frames, and distributes the messages to different processing branches according to the frame type field, extracting the locomotive number, train number, kilometer marker, speed, latitude and longitude, and timestamp fields; based on this, the locomotive number is used as the key and the structured state object is used as the value to write into the distributed cache, and the cache expiration time is set to ensure data timeliness, thereby providing a real-time train status data foundation for spatial search, direction verification, and distance calculation in subsequent steps.

3. The train distance warning method based on CIR device data according to claim 1, characterized in that, The method for preliminary screening of nearby trains in step 2 is as follows: Based on the real-time cached data constructed in step 1, with the current train's GPS coordinates as the center and a preset radius as the search radius, the geospatial index service is invoked on the ground server to perform a range query, and a list of locomotive numbers of all online trains within a circular area with the current train's GPS coordinates as the center and a preset radius as the radius is obtained as a candidate train set.

4. The train distance warning method based on CIR device data according to claim 1, characterized in that, The method for verifying the consistency of the running direction in step 3 is as follows: Based on the candidate train set, batch query the train number corresponding to each candidate train, extract the last digit of each train number, and judge according to the fixed correspondence between the up and down directions and the parity of the train number in the railway operation rules. If the last digit is odd, it is determined to be the down direction, and if it is even, it is determined to be the up direction. Based on this, candidate trains that are opposite to the current train running direction are eliminated, and only trains running in the same direction are retained to participate in the subsequent distance calculation.

5. The train distance warning method based on CIR device data according to claim 1, characterized in that, The method for kilometer marker resolution and distance calculation in step 4 is as follows: After completing the direction filtering, the kilometer marker strings of the reserved trains are retrieved in batches from the cache on the ground server. The kilometer marker strings contain the line number, mileage number and direction identifier. They are converted into integer values ​​in meters according to a unified resolution rule. Based on this, the absolute value of the difference between the kilometer marker values ​​of the current train and each candidate train is calculated as the actual linear running distance between the two trains, so as to avoid the terrain projection error introduced by the Euclidean distance calculation based on GNSS coordinates.

6. The train distance warning method based on CIR device data according to claim 1, characterized in that, The method for classifying and sorting neighboring trains in step 5 is as follows: based on the relationship between the kilometer marker values, trains with kilometer markers greater than the current train are divided into the preceding train set and trains with kilometer markers less than the current train are divided into the following train set on the ground server, and the preceding train set and the following train set are arranged in ascending order of distance respectively.

7. The train distance warning method based on CIR device data according to claim 1, characterized in that, The intelligent filtering and simplification method described in step 6 is as follows: After completing the classification and distance sorting of neighboring vehicles, the three closest trains in the preceding vehicle set and the one closest train in the following vehicle set are extracted respectively as the final neighboring vehicle list of the current train, and the remaining targets are removed, thereby minimizing the processing load of subsequent early warning judgment and information push links while retaining key risk information.

8. The train distance warning method based on CIR device data according to claim 1, characterized in that, The method for station status detection and exemption determination in step 7 is as follows: query the station section database to determine whether the nearest preceding train is in the station. If so, make a dynamic determination based on its speed data: when the nearest preceding train decelerates or stops, an exemption is triggered; when the nearest preceding train does not decelerate, no exemption is granted. When the exemption conditions in the station are not met, calculate the speed difference between the selected preceding trains and the current train. If each speed difference is less than the preset value in the ground server, it is determined to be a stable queue.

9. A train distance warning method based on CIR device data according to claim 1, characterized in that, The method for generating the warning level in step 8 is as follows: after completing the station status detection and exemption determination in step 7, if an exemption within the station is triggered, the warning level is determined to be the lowest warning level; if the exemption determination is not triggered, the linear running distance of the nearest preceding train is obtained, and it is compared with the preset multi-level distance thresholds one by one to determine the initial warning level corresponding to the current train. If step 7 determines that the queue is stable, the initial warning level will be reduced by one level to obtain the current warning level. If the initial warning level is already the lowest warning level, it will remain unchanged.

10. A train distance warning method based on CIR device data according to claim 1, characterized in that, The method for global relationship aggregation described in step 9 is as follows: Global relationship aggregation includes summarizing the calculation results of the neighboring train relationships of all individual trains on the ground server. For each pair of train relationships, it is standardized into a pairing identifier with the preceding train number first and the following train number last, and stored in a hash set to achieve automatic deduplication, generating a globally unique list of train pair relationships for display on the dispatch center's large screen. The method for broadcasting early warning information described in step 10 is as follows: Early warning information broadcasting includes encapsulating the local status of each train and the early warning information of neighboring trains into UDP data packets conforming to the CIR communication protocol specification. The ground server then uses an asynchronous non-blocking I / O method to push the data packets in batches to the IP addresses and ports reported and stored in the distributed cache when the CIR devices of each train are registered and online, according to a preset broadcast cycle. The data packets are pushed repeatedly in each broadcast cycle, so that the data packets lost in the previous broadcast cycle are resent in the next broadcast cycle. Each UDP data packet also carries a sequence number that increases cyclically in the range of 0 to 255 with the broadcast cycle, so that the train CIR devices can identify packet loss based on the continuity of the sequence number, thus completing the closed-loop push of early warning information between the train and the ground.

Citation Information

Patent Citations

  • Anti-collision early-warning system and method for subway trains

    CN102632912A