Locomotive crossing gate determination system and implementation method

By combining real-time positioning and track data, the locomotive crossing judgment system can achieve high-precision dynamic identification of the crossing ahead, solving the problems of insufficient communication redundancy and all-weather adaptability in the existing technology for crossing safety management, and improving the safety and efficiency of train operation.

CN121375900BActive Publication Date: 2026-06-05天津七一二移动通信股份有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
天津七一二移动通信股份有限公司
Filing Date
2025-12-25
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

The existing rail transit system suffers from insufficient communication redundancy, poor all-weather adaptability, and insufficient dynamic prediction capability in the safety management of level crossings, resulting in risks such as incomplete signal coverage, response delays, and delayed driver judgment.

Method used

Design a locomotive crossing identification system that combines real-time locomotive positioning information, track structure data, and running direction characteristics. Through monitoring filtering, position parsing, distance calculation, area judgment, direction recognition, and dynamic scanning units, it achieves high-precision and dynamic identification of the crossing ahead. It is developed using JAVA technology and based on the Spring Boot and Spring Data JPA framework, deployed on the Linux Ubuntu system, and supports data communication via HTTP and WebSocket protocols.

Benefits of technology

Without relying on fixed signal equipment, it can achieve real-time identification and dynamic judgment of the level crossing ahead, improving the safety and efficiency of train operation. It is adaptable to multi-directional, multi-section, and multi-type level crossing environments, has good adaptability to operating direction and track structure, and supports real-time response in high-frequency positioning data processing and multi-task concurrent scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121375900B_ABST
    Figure CN121375900B_ABST
Patent Text Reader

Abstract

The application discloses a locomotive crossing judgment system and implementation method, and belongs to the technical field of rail transit operation safety. The system comprises a value-keeping filtering unit, a position analysis unit, a distance calculation unit, a region judgment unit, a direction identification unit, an interval matching unit and a dynamic scanning unit. Through real-time analysis of locomotive positioning data, combined with line direction and region attribute, spatial interval matching and direction shunting are carried out, the current running direction is identified, and based on the dynamic scanning mechanism, subsequent crossings are traversed, and a judgment function is called to realize crossing state confirmation. The system introduces a logic fuse mechanism to improve the discrimination stability under abnormal scenes. Compared with the traditional scheme relying on fixed signals or manual observation, the system has good real-time performance, adaptability and engineering deployment efficiency, and can be widely applied to railway and urban rail transit safety auxiliary judgment scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of rail transit operation safety technology, specifically to a locomotive crossing judgment system and implementation method, applicable to the safety early warning and control of crossings for rail vehicles such as railway locomotives and urban rail transit locomotives. Background Technology

[0002] Currently, rail transit systems mainly rely on two traditional architectures for safety management at level crossings: one is a warning and control system based on fixed signal facilities, and the other is a driving assistance method based on human visual judgment.

[0003] Fixed signaling infrastructure typically relies on trackside signals, level crossing warning lights, and other equipment to transmit information. This method depends on a single signal link for communication and is susceptible to equipment failure, line interruptions, or severe weather (such as rain, fog, snow, etc.), potentially leading to incomplete signal coverage or response delays. Furthermore, this approach is mostly statically deployed and struggles to dynamically adapt to changes in train operating conditions.

[0004] The manual visual judgment method relies on the driver's observation and experience of the level crossing ahead. In situations with high train speeds, poor visibility, or complex operating environments, there is a risk of delayed or missed judgments. Furthermore, this method lacks systematic dynamic risk analysis and automatic early warning capabilities, and is highly dependent on the driver's reaction time and operational accuracy.

[0005] Therefore, existing solutions still have room for improvement in terms of communication redundancy, all-weather adaptability, and dynamic prediction capabilities. To address these issues, there is an urgent need for a system solution that integrates technologies such as real-time positioning, direction determination, and path recognition to achieve proactive perception and intelligent judgment of upcoming level crossings, providing auxiliary decision-making support for train operation and improving overall operational safety and efficiency. Summary of the Invention

[0006] To overcome the shortcomings of existing level crossing detection schemes in terms of real-time performance, stability, and adaptability to complex tracks, this invention provides a locomotive level crossing detection system and its implementation method. This system can achieve high-precision, dynamic identification of upcoming level crossings by combining real-time locomotive positioning information, track structure data, and running direction characteristics, without relying on fixed signaling equipment, thereby improving train operation safety.

[0007] To achieve the above objective, the technical solution of the present invention is: a locomotive crossing judgment system, comprising a guarded filtering unit, a position parsing unit, a distance calculation unit, a region judgment unit, a direction recognition unit, a section matching unit, and a dynamic scanning unit. The guarded filtering unit is used to perform structured processing on the crossing database, filter out manned crossings with protective significance, and generate a set of crossing information objects. The position parsing unit is used to receive and parse the latitude and longitude data reported by the locomotive's Beidou positioning, convert it into floating-point coordinates, and extract line attributes based on the line data. The distance calculation unit is used to calculate the distance based on the locomotive's current position and the distance between each crossing. The system calculates the preset distance at the level crossing coordinates and generates a distance data list. The area judgment unit identifies the current line type of the locomotive and whether it is in a special area, and outputs the corresponding marker. The direction recognition unit identifies the current running direction of the locomotive and the line direction, and triggers mirror marking and recalculation of the section start point when the direction changes. The section matching unit determines the starting level crossing for dynamic scanning by combining the locomotive's position and direction status. The dynamic scanning unit traverses the set of level crossing information objects in sequence and calls the judgment function one by one to perform condition matching. If the condition is met, the target level crossing is returned. If no match is found, the circuit breaker mechanism is triggered and the default result is output.

[0008] Furthermore, the system runs on a server platform, is developed using JAVA technology, and is built on the Spring Boot and Spring Data JPA technology framework. The crossroads information object collection and related judgment data are stored in a MySQL database. The system communicates with terminal devices via HTTP and WebSocket protocols and is deployed on a Linux Ubuntu operating system environment. The server platform includes a primary server and a backup server, and the primary / backup switchover is controlled by keepalived to maintain continuous execution of data interaction and logical judgments in the event of server failure.

[0009] A method for determining locomotive crossings includes the following steps:

[0010] A) Basic data preparation steps: After the system starts, load the intersection database data, filter unattended and unprotected intersections, generate a set of intersection information objects, parse the coordinates of the left and right endpoints of the intersection, the direction markings and special area markings, calculate the kilometer mark value based on the starting point and mileage fields of the line, and construct the sorted intersection sequence.

[0011] B) Real-time positioning processing steps: The system receives latitude and longitude positioning data reported by Beidou, converts it into double-precision floating-point coordinates, and determines the main change axis in combination with the line direction type to verify the validity of the coordinates;

[0012] C) Running direction diversion step: Determine the running direction based on the reported direction parameters and trajectory change trend. If it is downward, proceed to step D; if it is upward, proceed to step E. Update the mirror status marker and recalculate the interval matching starting point when switching directions.

[0013] D) Downlink processing steps: Perform intersection identification processing in the downlink direction;

[0014] E) Uplink processing steps: Perform uplink intersection identification processing;

[0015] F) Result return and post-processing steps: Generate a data packet containing key intersection information, identification result type, distance, kilometer marker, and location marker and send it to the terminal device, and record the judgment context for log analysis and subsequent cache optimization.

[0016] Further, step D of the present invention includes:

[0017] D01) Special area judgment steps: Determine whether it is in a special area. If so, execute special processing logic.

[0018] D02) Route direction type determination steps: For non-special routes, determine the route direction type: If it is a vertical route, traverse subsequent intersections in the direction of decreasing latitude and execute step D04; if it is a horizontal route, traverse subsequent intersections in the direction of increasing longitude and execute step D04.

[0019] D03) Interval matching step: Determine the current positioning status relative to the intersection sequence to determine the starting scan point;

[0020] D04) Dynamic scanning steps: Traverse the intersections from the starting point backward, call the judgment function nextCross() one by one to judge. If the condition is met, return to the intersection. Otherwise, continue traversing until the end and trigger the circuit breaker mechanism to return to the nearest intersection that meets the interval rules.

[0021] D05) Result encapsulation step: Encapsulate the recognition result and send it through the communication interface.

[0022] Further, step E of the present invention includes:

[0023] E01) Special Area Judgment Step: Determine whether the current location is in a special area. If so, execute the preset special processing logic.

[0024] E02) Route direction type determination steps: Determine the direction type of the current route. If it is a vertical route, traverse the subsequent intersections in the direction of increasing latitude and execute step E04; if it is a horizontal route, traverse the subsequent intersections in the direction of decreasing longitude and execute step E04.

[0025] E03) Interval matching steps: Determine the position status of the current location relative to the intersection list, and determine the scan start point by combining the mirror status markers;

[0026] E04) Dynamic scanning steps: Traverse the intersections from the starting point in reverse and mirror order, and call the judgment function nextCross() one by one to judge the validity. If the preset conditions are met, return to the intersection; otherwise, continue traversing until the end of the sequence and trigger the circuit breaker mechanism to return to the nearest intersection that meets the interval rules.

[0027] E05) Result encapsulation step: Encapsulate the identified intersection information into a standard data format and send it to the terminal device through a preset communication interface.

[0028] The beneficial effects of this invention are: This system is based on the synergy of multiple technologies such as spatial interval matching, directional attribute recognition, dynamic scanning judgment, data preprocessing and logic circuit breaking mechanism, which can realize real-time recognition and dynamic judgment of the intersection ahead without relying on fixed signal equipment.

[0029] This system is adaptable to multi-directional, multi-segment, and multi-type level crossing environments, possessing excellent adaptability to operating directions and track structures, and can improve the accuracy and consistency of identification under complex track structures. Through a unified data structure, thread pool concurrency mechanism, and mirror judgment logic design, the system can support high-frequency positioning data processing, enhancing real-time response capabilities in multi-task concurrent scenarios.

[0030] Compared to traditional solutions based on manual visual inspection or fixed equipment, this invention enables rapid deployment and flexible expansion, possessing high practicality and engineering promotion value. It is applicable to various application environments such as railways and urban rail transit for level crossing protection and assisted driving decision-making scenarios. By centrally processing and distributing the level crossing judgment results and distance information through a server, this invention can directly apply the level crossing recognition results to the graded voice and vibration prompts of onboard terminals and ground work terminals. This allows the approach status of the level crossing to be presented intuitively in a way that changes with distance, improving the safety warning effect during locomotive operation and ground work. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of the system composition structure of the present invention;

[0032] Figure 2 This is a flowchart of the method for implementing the present invention;

[0033] Figure 3 This is a schematic diagram of an embodiment of the present invention. Detailed Implementation

[0034] like Figure 1 As shown, a locomotive crossing judgment system is developed using JAVA technology, employing the mainstream technology frameworks of Spring Boot and Spring Data JPA. Data is persistently stored in a MySQL database, and communication protocols include HTTP and WebSocket. The program is deployed in a Linux Ubuntu operating system environment, with the server located in the locomotive depot's computer room. Handheld terminals are installed in various work areas, and vehicle-mounted terminals are installed in the locomotives. The system and server platform are deployed between a primary server and a backup server. A keepalived high-availability switching mechanism ensures a hot standby switchover between the primary and backup servers, guaranteeing continued normal operation after a failure and enabling continuous and stable data interaction and logical judgment. Other modules of this invention and the server platform are deployed on the primary and backup servers. Services are automatically started upon power-up to ensure automatic startup after the computer room is powered on, working in conjunction with the handheld and vehicle-mounted terminals to form a highly reliable and real-time data exchange and judgment system.

[0035] To adapt to high-frequency positioning data and multi-threaded request scenarios, the system's internal judgment modules (including location parsing, distance calculation, interval matching, and dynamic scanning) support asynchronous calls and thread pool mechanisms, enabling concurrent processing of multiple locomotive positioning streams or real-time commands. This significantly improves the system's throughput and response speed, ensuring that the judgment logic maintains high real-time performance and high reliability even in complex operating environments.

[0036] To achieve intelligent identification and judgment of intersections, this system constructs a data processing and decision-making system composed of multiple functional modules, including a monitoring and filtering unit, a location analysis unit, a distance calculation unit, a region judgment unit, a direction recognition unit, a section matching unit, and a dynamic scanning unit. The monitoring and filtering unit performs structured processing on the level crossing database, filtering out manned level crossings with protective significance and generating a set of level crossing information objects. The location parsing unit receives and parses the latitude and longitude data reported by the locomotive's BeiDou positioning, converts it into floating-point coordinates, and extracts line attributes by combining it with line data. The distance calculation unit calculates a preset distance (Euclidean distance or mixed distance) based on the locomotive's current position and level crossing coordinates, and generates a distance data list. The area judgment unit identifies the line type of the locomotive and whether it is in a special area, and outputs corresponding markers. The direction recognition unit determines the current running direction and line direction, triggering mirror marking and recalculating the section start point when the direction changes. The section matching unit determines the starting level crossing for dynamic scanning based on the locomotive's position and direction status. The dynamic scanning unit sequentially traverses the level crossing information object set, calling the judgment function one by one for condition matching. If a match is found, the target level crossing is output; if not, a circuit breaker mechanism is triggered to output the default result. The above structures together construct a logically closed-loop data processing path, achieving efficient identification and judgment of the level crossing ahead.

[0037] The system of this invention consists of multiple functional modules, the functions of which are further described below. The connection between the units is based on a clear data input and output logic: the monitoring and filtering unit outputs a set of structured intersection information objects, which serve as the data entry point for subsequent units such as location resolution, distance calculation, and interval matching; the direction recognition unit outputs parameters including "running direction identifier (UP / DOWN, i.e., up / down)" to control the logical execution mode of the interval matching and dynamic scanning units; after the dynamic scanning unit completes the recognition, it outputs the intersection number, distance data, etc., and transmits them to the result encapsulation and return module to achieve a complete judgment closed loop.

[0038] After system initialization, the monitoring and filtering unit first performs structured processing on the server-side crossroads database, eliminating all unattended crossroads with no protective significance, and retaining only manned crossroads that provide early warning for locomotive operation safety. Through an entity class and transmission class attribute mapping mechanism, the fields in the original database are converted into a lightweight crossroads information object set (CrossInfo). This set serves as a unified data input interface for subsequent modules, used by the location parsing unit, distance calculation unit, interval matching unit, and dynamic scanning unit, ensuring that the entire judgment chain is processed based on a unified and standardized data format, thereby reducing the risk of data inconsistency or format confusion. This filtering unit is also responsible for parsing the geometric coordinates (left and right endpoint coordinates), direction markings, and special area markings (such as the Shahu Tunnel) of crossroads, providing the necessary foundation for subsequent special interval judgments, direction diversion, and interval matching.

[0039] The location resolution unit parses the longitude (lng) and latitude (lat) parameters continuously reported by the locomotive via BeiDou satellite, securely converting them from string format to double-precision floating-point coordinates. Simultaneously, it calculates the locomotive's line attribute information (such as mainline / branchline / special line) and section affiliation based on the locomotive depot's line information, providing a basis for subsequent judgments. This unit performs multiple checks while resolving coordinates, including coordinate validity and line matching accuracy, to ensure the integrity and reliability of the data entering the judgment process.

[0040] The distance calculation unit is used to convert the latitude and longitude difference into a straight-line Euclidean distance (or an adapted hybrid algorithm to handle complex terrain) based on the locomotive's current latitude and longitude position, direction of travel, track attributes, and coordinate parameters of all candidate level crossings. Combining this with the locomotive's speed, direction of travel, and lane attributes, it calculates the baseline distance to each level crossing. The distance calculation unit outputs a list of distance values ​​to subsequent modules, including candidate level crossing identifiers, calculated distances, and track / segment markings, for use by the area determination, section matching, or dynamic scanning units.

[0041] The area judgment unit includes a special area judgment module and a line type judgment module. It identifies the current operating section, including sections such as the Shahu Tunnel, main lines, or branch lines. If a locomotive is detected within a special area, the system automatically switches to the corresponding special judgment path to perform special section logic processing, improving judgment accuracy. The line type judgment module determines whether the line is a main line or a branch line based on its type, and uses this information as part of the subsequent scanning starting point and scanning conditions.

[0042] The direction recognition unit is used to identify the locomotive's running direction (up / down) and track alignment attributes (such as horizontal / vertical), and outputs the direction identifier and status. When the running direction changes (e.g., turnaround, shunting), this unit updates the direction marker and triggers a recalculation of the section matching starting point to ensure that the judgment logic can be executed continuously and correctly after the up / down switching.

[0043] The interval matching unit maps the locomotive's current latitude and longitude position to the coordinate interval of the level crossing sequence, determining the starting position of the dynamic scan. This unit performs interval judgment based on the route (longitude or latitude main axis), the current direction of operation, and the order of the level crossing list, including judgment of normal intervals, intervals before the start point, intervals after the end point, and special sections, to determine which level crossing in the list to start scanning from.

[0044] The dynamic scanning unit starts from the starting position obtained by interval matching and traverses the candidate intersections one by one according to the running direction (up or down). For each candidate intersection, the judgment function nextCross() is called to judge its distance threshold, direction consistency, and area label validity. If an intersection meets all the judgment conditions, the scanning stops immediately and it is recognized as an intersection. If no valid intersection is found after traversing all candidate intersections, the circuit breaker mechanism (fallback mechanism) is triggered, and the nearest intersection that meets the interval rules is returned as the default result to avoid infinite scanning or waste of resources.

[0045] The system supports multiple locomotive terminals to send location data and requests concurrently through asynchronous calls and thread pool mechanisms, thereby achieving high concurrency and high real-time judgment services.

[0046] like Figure 2 As shown, a method for determining a locomotive crossing includes the following steps:

[0047] Step A: Basic Data Preparation

[0048] After system startup, data initialization is performed. Data on level crossings in the database is loaded and filtered, retaining only those that are manned and have protective or early warning significance. Their field structures are then converted into a lightweight object collection (CrossInfo objects). The geometric coordinates (left and right endpoint coordinates), direction markings, and special area markings of the level crossings are parsed. Kilometer marker calculation is then performed, generating a standard kilometer marker value for each level crossing based on the route starting point and the mileage field in the database. This value is used as an auxiliary attribute of the level crossing information object for subsequent sorting, direction determination, and result display. Finally, a sorted sequence of level crossings is constructed and cached in memory for subsequent fast retrieval.

[0049] Step B: Real-time location processing:

[0050] The system receives the longitude and latitude reported by the locomotive's Beidou satellite, converts them into double-precision floating-point coordinates, and determines the main axis of change (longitude or latitude) based on the current line direction type; it verifies the validity of the coordinates (e.g., non-empty, reasonable range, valid timestamp); if the verification fails, the current judgment process terminates, and the system waits for the next valid positioning data to be re-entered.

[0051] Step C: Direction of flow splitting:

[0052] Based on the direction parameters reported by the vehicle-mounted or handheld radio and the locomotive's current position and trajectory change trend, the system determines whether the current direction is upward or downward. If it is downward, proceed to step D; if it is upward, proceed to step E. This step also handles possible sudden direction changes during operation (such as shunting, turning back, etc.). The system updates the mirror status marker and recalculates the interval matching starting point through the direction recognition unit to ensure that the judgment logic remains continuous and effective after a direction change.

[0053] Step D: Downlink processing flow:

[0054] D01 determines whether it is in a special area (such as the Shahu Channel, special starting section, special ending section, etc.). If it is in a special area, the system switches to a special processing path, skips the standard interval matching logic, and calls the special processing sub-process.

[0055] For non-special routes, determine the route direction type: if it is a perpendicular route, traverse subsequent intersections in descending latitude and execute step D04; if it is a horizontal route, traverse subsequent intersections in ascending longitude and execute step D04.

[0056] D03 Interval Matching: The system determines the current position relative to the list of intersections (before the starting point / within the interval / beyond the end point, etc.). If it is before the starting point, the system starts scanning from the first intersection; if it is within the interval, the system starts scanning from the next intersection after the current position; if it has exceeded the end point, the system returns to the last intersection in the list as the result.

[0057] D04 Dynamic Scan: Iterates through subsequent intersections sequentially, calling the nextCross() function to evaluate each candidate intersection. If an intersection meets the criteria, it returns that intersection as the identification result; otherwise, it continues iterating until the end of the list. If no match is found after all iterations, a circuit breaker mechanism is triggered, returning the nearest intersection that meets the interval rules as the default result.

[0058] D05 Result Encapsulation and Return: The identified intersection information, distance, trigger type and other location markers are encapsulated into a standard format and sent to the vehicle terminal, handheld device and dispatch platform through the communication interface;

[0059] Step E: Uplink Processing Flow

[0060] E01 determines whether it is in a special area (such as the entrance section of Shahu Channel, special starting point section, etc.). If so, the corresponding special processing logic is called.

[0061] For non-special routes, determine the route direction type: if it is a vertical route, proceed to step D04 using the latitude increment method; if it is a horizontal route, proceed to step D04 using the longitude decrement method.

[0062] E03 Interval Matching: The system determines the current position relative to the intersection list (before the starting point / within the interval / out of bounds, etc.), and combines the mirror status markers to determine the scanning starting point and direction;

[0063] E04 Dynamic Scan: Candidate intersections are traversed in reverse or mirror order, and the nextCross() function is called for each one. If an intersection meets the criteria, it is returned as the recognition result; otherwise, the traversal continues. If none of the candidates meet the criteria, the circuit breaker mechanism is triggered, and the default intersection is returned.

[0064] E05 Result Encapsulation and Return: The recognition result is encapsulated into a standard data packet and sent to the terminal device through the communication interface;

[0065] Step F: Result Return and Post-processing:

[0066] The system generates data packets containing key intersection information, identification result type, distance, kilometer markers, and location markers, and sends them to vehicle-mounted devices, handheld devices, and the dispatch platform via communication protocols for display or further processing. At the same time, it records the judgment context for cache optimization and log analysis. If the system is configured in asynchronous processing mode, the return process will not block the main thread.

[0067] Through the above steps, the server, based on the locomotive crossing judgment system of this invention, continuously updates the locomotive's running direction, the position of the crossing ahead, and the corresponding distance calculation results, and transmits the judgment results and distance information to the locomotive's onboard terminal and the ground-based handheld terminal in real time. When the distance between the locomotive and the target crossing enters the preset safety warning range, the server generates graded warning information according to the distance change status and sends corresponding prompt instructions to the terminal. The terminal, based on the received warning instructions, reminds relevant personnel using a combination of voice and vibration prompts. As the locomotive gradually approaches the crossing, the intensity of the prompts gradually changes, thereby achieving a collaborative warning application effect between the locomotive and ground terminals based on unified judgment by the server.

[0068] Figure 3 This paper demonstrates an application of the present invention in a typical railway crossing scenario, where a locomotive is continuously traveling on the main line with multiple branch crossings ahead. Based on the locomotive's current BeiDou positioning information and direction recognition results, combined with section matching logic and dynamic scanning algorithms, the system successfully identifies the approaching level crossings on the main line and excludes interfering crossings on lateral branch lines, accurately outputting the key crossing numbers and remaining distances. During this process, the system performs real-time filtering and mirroring of the crossing information, ensuring stable judgment results even in environments with alternating up and down traffic and complex path intersections, effectively supporting train operation safety early warning and dispatch command linkage.

[0069] In this embodiment, the server, based on the level crossing judgment system of the present invention, continuously judges the current running direction of the locomotive and the position of the level crossing ahead, and transmits the judgment results and corresponding distance information to the locomotive's onboard terminal and the ground-based handheld terminal in real time. For example, when the locomotive gradually approaches the target level crossing, the ground-based handheld terminal receives the warning information sent by the server and sequentially plays voice prompts such as "Locomotive ahead is approaching 3 kilometers," "Locomotive ahead is approaching 2 kilometers," and "Locomotive ahead is approaching 1 kilometer." As the distance between the locomotive and the level crossing shortens, the voice playback rhythm gradually accelerates, while the vibration prompt changes from weak to strong. The locomotive's onboard terminal simultaneously receives the corresponding warning information sent by the server and prompts the driver with voice prompts such as "Level crossing ahead is approaching 3 kilometers," "Level crossing ahead is approaching 2 kilometers," and "Level crossing ahead is approaching 1 kilometer." Similarly, the volume of the prompt sound and the vibration frequency gradually increase according to the degree of proximity, thereby realizing the collaborative level crossing approach warning application between the locomotive and the ground.

Claims

1. A method for determining locomotive crossings, characterized in that, Includes the following steps: A) Basic data preparation steps: After the system starts, load the intersection data in the database, filter unattended and unprotected intersections, generate a set of intersection information objects, parse the coordinates of the left and right endpoints, direction marks and special area marks of the intersections, calculate the kilometer mark value according to the starting point of the line and the mileage field in the database, and construct the sorted intersection sequence. B) Real-time positioning processing steps: The system receives latitude and longitude positioning data reported by Beidou, converts it into double-precision floating-point coordinates, determines whether it is a vertical or horizontal line based on the line direction type, and verifies the validity of the coordinates. C) Direction diversion step: Based on the direction parameters reported by the locomotive on-board terminal and the locomotive's current position and trajectory change trend, determine whether it is going up or down. If it is going down, proceed to step D; if it is going up, proceed to step E. Update the mirror status mark and recalculate the starting scan point when switching directions. D) Downlink processing steps: D01) Special Area Judgment Step: Determine whether the locomotive is currently in a special area. If yes, execute the special processing logic; otherwise, execute step D02. D02) Route direction type determination steps: Determine the direction type of the current route: If it is a vertical route, then traverse the subsequent intersections in the direction of decreasing latitude and execute step D04; if it is a horizontal route, then traverse the subsequent intersections in the direction of increasing longitude and execute step D04. D03) Interval matching steps: Determine the current position of the locomotive relative to the intersection sequence and determine the scanning start point; D04) Dynamic scanning steps: Traverse the intersections from the starting scanning point backward, and call the judgment function nextCross() one by one to judge the validity. If the preset condition is met, return the intersection as the target intersection. Otherwise, continue traversing until the end of the sequence. If there is no intersection that meets the condition, trigger the circuit breaker mechanism and return the nearest intersection that meets the interval rules as the target intersection. D05) Result encapsulation step: Encapsulate the target intersection information into a standard data format; E) Uplink processing steps: Perform uplink intersection recognition processing; F) Result return and post-processing steps: The target level crossing information is sent to the locomotive's onboard terminal. When the distance between the locomotive and the target level crossing enters the preset safety warning range, the server generates graded warning information according to the distance change status and sends corresponding prompt instructions to the locomotive's onboard terminal. The terminal provides reminders in a combination of voice prompts and vibration prompts based on the received warning instructions.

2. The method for determining locomotive crossings according to claim 1, characterized in that, The uplink processing flow includes: E01) Special area judgment step: Determine whether the locomotive is currently in a special area. If yes, execute special processing logic; otherwise, execute step E02). E02) Route direction type determination steps: Determine the direction type of the current route. If it is a vertical route, traverse the subsequent intersections in the direction of increasing latitude and execute step E04; if it is a horizontal route, traverse the subsequent intersections in the direction of decreasing longitude and execute step E04. E03) Interval matching steps: Determine the current position of the locomotive relative to the list of level crossings, and recalculate the starting scan point based on the mirror status marker; E04) Dynamic scanning steps: Starting from the starting scanning point, traverse the intersections in reverse and mirror order, and call the judgment function nextCross() one by one to judge the validity. If the preset conditions are met, return the intersection as the target intersection. Otherwise, continue traversing until the end of the sequence. If there is no intersection that meets the conditions, trigger the circuit breaker mechanism and return the nearest intersection that meets the interval rules as the target intersection. E05) Result encapsulation steps: Encapsulate the target intersection information into a standard data format.

3. A locomotive crossing judgment system, characterized in that, This method is used to implement the locomotive crossing determination method according to any one of claims 1-2.

4. The locomotive crossing judgment system according to claim 3, characterized in that, The system runs on a server platform, is developed using JAVA technology, and is built on the Spring Boot and Spring Data JPA technology framework. The crossroads information object set and related judgment data are stored in a MySQL database. The system communicates with terminal devices via HTTP and WebSocket protocols and is deployed on a Linux Ubuntu operating system environment. The server platform includes a primary server and a backup server, and master-slave failover control is implemented through keepalived to maintain continuous execution of data interaction and logical judgments in the event of server failure.