Railway electronic fence calculation method and system based on track coordinates
By building an electronic fence based on track coordinates and collecting the coordinates of construction personnel and locomotives through edge computing servers, the problem of inaccurate position judgment of construction personnel in existing train warning technology is solved, and accurate warning of construction personnel and improvement of construction efficiency are achieved.
Patent Information
- Application Number
- CN202510562033.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-09-26
AI Technical Summary
Existing train warning technology cannot accurately determine the location of construction workers, resulting in untimely or unnecessary evacuation, increasing safety risks and reducing construction efficiency. In addition, inconsistent speed control strategies of drivers affect the stability and efficiency of train operation.
An electronic fence is built based on track coordinates. The coordinates of construction workers and locomotives are collected through the edge computing server to determine whether the construction workers are within the fenced area. Early warning information is sent and communication is combined with the LoRa wireless protocol and GSM-R network to ensure stable communication and equipment endurance.
It achieves accurate early warning for construction workers, avoids unnecessary alarm interference, improves construction efficiency, ensures construction safety and efficiency, and ensures the continuity and effectiveness of communication.
Smart Images

Figure CN120697818A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a railway electronic fence calculation method based on track coordinates, and also relates to a corresponding railway electronic fence calculation system, belonging to the technical field of railway construction protection. Background Art
[0002] Ensuring the safety of trackside workers and improving efficiency are crucial issues in railway transportation systems. Train warning technology, through real-time monitoring of train operating conditions and the surrounding environment, can proactively identify potential risks and issue alerts, thereby preventing accidents. Track coordinates, as key information that accurately describes train location and track spatial data, provide a crucial basis for accurate train warnings.
[0003] In existing technology, secondary radar-based train warning is a common solution. This solution equips trains with interrogating radars and ground-based response radars in construction areas. High-speed trains continuously transmit information such as position and distance in the form of pulses. Ground-based devices receive this information and issue approaching train warnings. Simultaneously, the ground-based devices relay the construction site location to the train's onboard devices, enabling the driver to make decisions about braking and deceleration. However, this technology has significant drawbacks. First, after receiving this information, ground-based construction workers face the dilemma of whether to evacuate the work area and how far to evacuate. The lack of clear warning area demarcations makes it difficult for workers to quickly and accurately determine the safety of their location, potentially leading to untimely or unnecessary evacuations, increasing safety risks and reducing construction efficiency. Second, after the onboard device displays the construction site information to the driver, the driver must independently determine the speed control strategy, which requires a high level of experience and responsiveness. Furthermore, different drivers may adopt different speed control measures, making it difficult to establish a unified and effective train control standard, potentially impacting the stability and efficiency of train operations.
[0004] With the continuous development of railway construction, trackside construction scenarios are becoming increasingly complex, and the working environments of construction workers are becoming more diverse, placing higher demands on the accuracy and adaptability of train warning technology. Traditional warning methods rely on information exchange between trains and ground-based devices, overly relying on the driver's subjective judgment, and are unable to fundamentally address the issues of protecting construction workers and improving construction efficiency. Therefore, there is an urgent need for a technical solution that can accurately construct warning zones based on track coordinates, automatically determine whether construction workers are in danger zones, and issue timely alerts. Summary of the Invention
[0005] The primary technical problem to be solved by the present invention is to provide a railway electronic fence calculation method based on track coordinates.
[0006] Another technical problem to be solved by the present invention is to provide a railway electronic fence calculation system based on track coordinates.
[0007] In order to achieve the above technical objectives, the present invention adopts the following technical solutions:
[0008] According to a first aspect of an embodiment of the present invention, a method for calculating a railway electronic fence based on track coordinates is provided, comprising:
[0009] S1: Construct track vector diagram and basic data modeling;
[0010] S2: Establish a rectangular coordinate system and construct an electronic fence area based on the track vector diagram;
[0011] S3: The edge computing server collects the coordinates of the construction workers and the locomotive to determine whether the coordinates of the construction workers are within the electronic fence area. If the construction workers are not within the electronic fence area, the monitoring is maintained. If the construction workers are within the electronic fence area, the edge computing server sends an early warning message to the construction workers' handheld terminal until the construction workers leave the electronic fence area.
[0012] Preferably, in step S1, constructing the track vector diagram and basic data modeling includes the following steps:
[0013] S11: Coordinate collection points are evenly arranged at preset intervals along the track extension direction to form a discrete coordinate point set P = {P1, P2, ... P n};
[0014] S12: For adjacent coordinate points P i With P i+1 , connected to form track segment L i =(P i ,P i+1 ), its geometric form is represented by a straight line segment in two-dimensional space, all track segments L i The set of orbital vectors is denoted as L = {L1, L2, ... L m}; where m is the total number of track segments;
[0015] S13: Convert the track vector diagram into an SHP format file to form basic data modeling.
[0016] Preferably, in step S2, establishing a rectangular coordinate system and constructing an electronic fence area according to the track vector diagram includes the following steps:
[0017] First, continuously collect the coordinates M and N of two close points on the track in front of the train head, and determine the coordinate displacement of the train head The locomotive head displacement direction is the train's travel direction;
[0018] Next, select any three consecutive points A(x a ,ya )、B(x b ,y b ) and C(x c ,y c ) as the basic unit of analysis;
[0019] Then, set the warning distance to r; set the first warning point B1 to be on one side of the bisector of ∠ABC; set the second warning point B2 to be on the other side of the bisector of ∠ABC; take the x-axis direction as the east direction, and take point B(x b ,y b ) The known point G in the east direction is used as the azimuth reference, and the azimuth is taken as counterclockwise;
[0020] Next, using the line segment equation and the two-point equation, we can obtain the general formula parameters a1 and b1 of the equation of line segment AB, and the general formula parameters a2 and b2 of the equation of line segment BC.
[0021] According to the angle formula, ∠ABG and ∠CBG are obtained; the slope k is obtained using the positions of the first warning point B1 and the second warning point B2;
[0022] According to the point-slope equation, we can get the equation of line segment B1B2; b ,y b ) is the center of the circle and the warning distance r is the radius, and point B(x b ,y b )'s circular coordinate equation;
[0023] Point B(x b ,y b ) intersects with the equation of line segment B1B2 to obtain the first warning point B1(x b1 ,y b1 ) and the second warning point B2(x b2 ,y b2 );
[0024] Finally, the track warning points in the direction of the train's advance are connected in sequence according to the direction of the train's travel, and the area surrounded by the set of line segments is the electronic fence area.
[0025] Preferably, for a track with bifurcated intersections, if there are n bifurcated intersections, then 2n warning points are solved each time. In this case, the electronic fence area is the union of the warning areas in front of the train in each bifurcated track.
[0026] Preferably, in step S3, the edge computing server determines whether the coordinates of the construction personnel are within the electronic fence area, including the following steps:
[0027] S31: Set up an edge computing server at the construction site to maintain continuous communication with the wearable devices carried by construction workers;
[0028] S32: The locomotive communicates with the edge computing server and sends the locomotive coordinates to the edge computing server;
[0029] S33: The edge computing server determines whether the construction worker's coordinates are within the electronic fence area based on the algorithm in step S2; if the construction worker is not within the electronic fence area, the server maintains monitoring; if the construction worker is within the electronic fence area, the server sends an early warning message to the construction worker's handheld terminal until the construction worker leaves the electronic fence area.
[0030] Preferably, the edge computing server is a mobile server that can complete device migration and deployment in a short time.
[0031] Preferably, the edge computing server communicates with the construction workers' wearable devices using the LoRa wireless protocol to ensure communication stability and device endurance.
[0032] Preferably, the locomotive establishes a communication link with the edge computing server through the GSM-R network to ensure smooth information exchange between the locomotive and the edge computing server.
[0033] According to a second aspect of an embodiment of the present invention, a railway electronic fence calculation system based on track coordinates is provided, comprising a processor and a memory; wherein the memory is coupled to the processor and is used to store a computer program, and when the computer program is executed by the processor, the processor implements the above method.
[0034] Compared with the prior art, the present invention fully considers the complexity of the ground construction site and the diversity of construction workers, and constructs an accurate electronic fence warning area by analyzing the train head position coordinates, travel direction and track vector diagram. The present invention can quickly and efficiently determine the warning range of the specified distance in front of the train and on both sides, and achieve accurate warning by judging whether the coordinates of the construction workers are within the fence, which not only ensures the safety of the construction workers, but also avoids unnecessary alarm interference and improves construction efficiency. At the same time, the present invention ensures the continuity and effectiveness of communication by building an edge computing server at the construction site and enabling the edge computing server to communicate with wearable devices and locomotives respectively through two communication methods (i.e., LoRa wireless protocol and GSM-R network). BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is a flow chart of a railway electronic fence calculation method based on track coordinates in the first embodiment of the present invention;
[0036] Figure 2 A schematic diagram of an orbital coordinate algorithm in the first embodiment of the present invention;
[0037] Figure 3 This is a schematic diagram of a train approach warning generated based on track coordinates in the first embodiment of the present invention;
[0038] Figure 4 This is a schematic structural diagram of a railway electronic fence calculation system based on track coordinates in the second embodiment of the present invention. DETAILED DESCRIPTION
[0039] The technical content of the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0040] First embodiment
[0041] like Figure 1 As shown, the first embodiment of the present invention provides a railway electronic fence calculation method based on track coordinates, which includes at least the following steps:
[0042] S1: Construct track vector diagram and basic data modeling.
[0043] S2: Establish a rectangular coordinate system and construct an electronic fence area based on the track vector diagram.
[0044] S3: The edge computing server collects the coordinates of the construction workers and the locomotive to determine whether the coordinates of the construction workers are within the electronic fence area. If the construction workers are not within the electronic fence area, the monitoring is maintained. If the construction workers are within the electronic fence area, the edge computing server sends an early warning message to the construction workers' handheld terminal until the construction workers leave the electronic fence area.
[0045] This method converts the physical track into a digital model containing precise spatial positions and topological relationships by collecting discrete coordinate points along the track and generating a set of track segments. This solves the problem of structured representation of complex track shapes (straight lines, curves, and bifurcations). This step ensures track shape fitting accuracy through uniform or encrypted acquisition strategies (such as reducing point spacing in curved segments). Combined with the SHP file format, this step enables standardized storage of spatial data and attribute information. This provides a precise geometric prototype containing key information such as track direction and bifurcation points for subsequent warning area calculations. This allows the warning area to strictly conform to the actual track layout, with errors controlled within an acceptable engineering range (e.g., curve segment chord length error ≤ 1%), laying the data foundation for full-scenario track safety warnings.
[0046] Based on real-time train parameters (position, speed, direction) and a track vector diagram, mathematical modeling is used to dynamically define the warning range at a specified distance in front of the train and on both sides, solving the problem of accurately generating warning areas in complex scenarios. This invention integrates parameters such as construction worker reaction time and train braking distance to dynamically adjust the warning distance with train speed. The angle bisector principle and circle equation are combined to solve the warning coordinates of a single track point (error ≤ 0.01 meters). A smooth warning boundary is formed through continuous connection (parallelism error of straight segments <1°, curvature matching of curved segments >99%), ensuring that the warning area has no blind spots or redundancy and responds in real time to changes in train motion and track morphology.
[0047] In one embodiment of the present invention, constructing the track vector diagram and basic data modeling in step S1 includes the following steps:
[0048] S11: Coordinate collection points are evenly distributed along the track extension direction at preset intervals (e.g., 0.5 to 5 meters) to form a discrete coordinate point set P = {P1, P2, ... P n}; where each coordinate point P i Including longitude and latitude coordinates (x i ,y i ).
[0049] S12: For adjacent coordinate points P i With P i+1 , connected to form track segment L i =(P i ,P i+1 ), its geometric form is represented by a straight line segment in two-dimensional space, all track segments L i The set of orbital vectors is denoted as L = {L1, L2, ... L m}; where m is the total number of track segments.
[0050] S13: Convert the track vector diagram into an SHP format file to form basic data modeling.
[0051] In one embodiment of the present invention, coordinate points are collected at preset intervals (0.5 to 5 meters) along the track, and adjacent points are connected to form track segments, discretizing the continuous track into computable geometric units. This solves the problem of structuring track spatial data. This process enables digital modeling of track morphology, accurately representing straight segments through segment collection, and accurately fitting curved segments (for example, the error is less than 0.05 meters when collecting data at 5-meter intervals for a 500-meter radius curve). This provides a basic unit for subsequent geometric analysis, enabling the algorithm to effectively identify and process the spatial characteristics of complex track environments (such as switch areas), ensuring the geometric accuracy and reliability of warning area calculations.
[0052] SHP files store the coordinates of each line segment's start and end points. Index files quickly index geometric data, while attribute files record information such as the track type (mainline, siding, turnout area, etc.), mileage range, and permitted speed. Parsing SHP files with GIS software reveals the track's spatial topology, including key information such as line segment connections, bifurcation point locations (such as turnout center coordinates), and curve parameters (such as curvature radius and tangent direction).
[0053] For bifurcated tracks, the SHP file uses multi-segment features to represent different branch paths, each of which contains an independent sequence of coordinate points. For example, the track vector diagram of a turnout area consists of main track segments and side track segments, which intersect at the turnout center point, forming a tree-like track network model.
[0054] In one embodiment of the present invention, Figure 2 As shown, in step S2, a rectangular coordinate system is established, and the electronic fence area is constructed according to the track vector diagram, including the following steps:
[0055] First, during the train's travel, the coordinates of two adjacent points on the track in front of the train are continuously collected, M and N, and the train's coordinate displacement is determined. The locomotive head displacement direction is the traveling direction of the train.
[0056] Next, select any three consecutive points A(x a ,y a )、B(x b ,y b ) and C(x c ,y c ) is used as the basic analysis unit, where point B(x b ,y b ) is the midpoint, and line segment BA and line segment BC constitute the basic geometric unit of track turning.
[0057] Then, the warning distance is set to r; the first warning point B1 is set to be located on one side of the bisector of ∠ABC; and the second warning point B2 is set to be located on the other side of the bisector of ∠ABC.
[0058] Next, we introduce the rectangular coordinate system and take the x-axis as the east direction, and take point B (x b ,y b ) The known point G in the east direction is used as the azimuth reference, and the azimuth is selected in the counterclockwise direction.
[0059] Next, the equation of line segment BG is:
[0060] yy b =0
[0061] Let the equation of line segment AB be:
[0062] a1x+b1y+c1=0
[0063] Where a1, b1, and c1 are the general parameters of the equation of line segment AB;
[0064] Let the equation of line segment BC be:
[0065] a²x+b²y+c²=0
[0066] Where a2, b2, and c2 are the general parameters of the equation of line segment BC;
[0067] Next, A(x a ,y a ) and B(x b ,y b ) into the two-point equation:
[0068]
[0069] B(x b ,y b ) and C(x c ,y c ) into the two-point equation:
[0070]
[0071] Arranging the above two two-point equations, we get:
[0072] and
[0073] Next, substitute line segments BG and AB into the angle formula to obtain:
[0074]
[0075] Substituting line segments BG and BC into the angle formula, we get:
[0076]
[0077] Next, according to cos∠ABG and cos∠CBG, we can get ∠ABG and ∠CBG;
[0078] Next, since the warning point B1 is on the bisector of ∠ABC,
[0079]
[0080] And because the warning point B2 is on the other side of the bisector of ∠ABC, so:
[0081] ∠B2BG=180°+∠B1BG
[0082] Next, according to ∠B1BG and ∠B2BG, we can get the slope k. The calculation formula of the slope k is:
[0083] k=tan∠B1BG
[0084] The slope k and point B (x B ,y B ) into the point-slope equation to obtain the equation for line segment B1B2:
[0085] yy b =k(xx b )
[0086] Next, according to the warning distance r and B(x b ,y b ), with B(x b ,y b ) as the center, we get point B(x b ,y b ) is:
[0087] (xx b ) 2 +(yy b ) 2 =r 2
[0088] Intersecting the equation of the circle coordinates with the equation of the line segment B1B2 yields:
[0089]
[0090] After solving, we get:
[0091] and
[0092] Substitute the result into the first warning point B1 and the second warning point B2 to obtain the first warning point B1(x b1 ,y b1 ), the second warning point B2(x b2 ,y b2 ).
[0093] Finally, if Figure 3 As shown, the track warning points in the train's forward direction are connected in sequence according to the train's travel direction, and the area surrounded by the line segment set is the electronic fence area, that is, the train front warning area.
[0094] Preferably, for a track with bifurcated intersections, if there are n bifurcated intersections, then the number of warning points solved each time is 2n. In this case, the electronic fence area is the union of the warning areas in front of the train in each bifurcated track.
[0095] In step S2, the present invention calculates the azimuth of the train's direction of travel by frequently collecting coordinates of the train's head and adjacent points ahead, providing core motion parameters for spatial positioning of the warning area. This step ensures that the warning area always extends along the train's actual direction of travel, avoiding boundary shifts caused by directional misjudgments. This meets the real-time tracking requirements of high-speed trains, improves the dynamic adaptability of the warning area, and provides a precise directional reference for subsequent distance calculations and boundary generation.
[0096] Combining the Railway Technical Management Regulations with field data, the system dynamically calculates both the trackside and forward warning distances, balancing safety protection with construction efficiency. This parameter setting not only addresses train braking distances and personnel evacuation requirements, but also compensates for calculation errors through a safety margin, avoiding the "over-protection" or "under-protection" of fixed-distance warnings and significantly improving on-site operation efficiency.
[0097] For the midpoint of the track, the coordinates of adjacent points are used to establish a line segment equation. The angle bisector direction is solved using the angle formula. The outer warning coordinates are derived from the intersection of the circle equation and the line equation, solving the problem of accurately mathematically locating the trackside safety boundary. This derivation process introduces a local coordinate system to simplify the calculation, ensuring that the warning coordinates are strictly located at a safe distance outside the track (e.g., 3-5 meters), with an error control of millimeters. This provides standardized endpoint data for the generation of continuous warning areas, ensuring a smooth transition of warning boundaries at complex track turns and meeting safety regulations.
[0098] The warning coordinates of single track points are connected sequentially along the travel direction, and the boundaries of curved segments are processed through spline interpolation to form a continuous warning area covering the distance ahead of the train. This solves the problem of expanding from discrete points to spatial regions, making the warning area parallel to the track for straight segments and arc-shaped for curved segments, with smooth and non-jaggy boundaries, completely covering the potential danger area ahead of the train and meeting the requirements for warning range integrity in engineering applications.
[0099] For bifurcated structures like switches, the system independently generates warning zones for each path and then calculates the union, addressing the issue of warning integrity in multi-branch track environments. It also employs spatial geometry techniques, such as the scanline algorithm, to merge these zones, ensuring seamless connection of warning zones at bifurcated points, avoiding omissions or overlaps. This ensures that all possible danger zones are fully covered in real time when a train is traveling through a switch, enhancing safety and protection capabilities in complex track environments.
[0100] Based on real-time train parameters (position, speed, direction) and a track vector diagram, this invention dynamically defines the warning range at a specified distance ahead of the train and on both sides through mathematical modeling, solving the problem of accurately generating warning areas in complex scenarios. By integrating parameters such as construction worker reaction time and train braking distance, the warning distance is dynamically adjusted with train speed. The angle bisector principle and circle equation are combined to solve the warning coordinates of a single track point, and a smooth warning boundary is formed through continuous connection. This ensures that the warning area has no blind spots or redundancy and responds in real time to changes in train motion and track morphology.
[0101] In step S3, the edge computing server determines whether the construction worker's coordinates are within the electronic fence area, including the following steps:
[0102] S31: Set up an edge computing server at the construction site to maintain continuous communication with the wearable devices carried by construction workers.
[0103] The edge computing server is a mobile server equipped with high-performance batteries and clean energy charging modules, allowing it to maintain stable operation for extended periods of time even without an external power source. Its highly insulated design effectively protects against dust, rain, and minor impacts during daily use, enabling reliable deployment in complex and harsh construction environments, such as deep tunnels, high above bridges, and in mines.
[0104] In terms of device interconnection, the edge computing server and the construction workers' wearable devices communicate using the LoRa wireless protocol, establishing a low-power wide-area network communication architecture. The LoRa wireless protocol is based on advanced spread-spectrum communication principles and utilizes unlicensed frequency bands to achieve an ultra-high link budget. Compared to traditional communication protocols, it has stronger signal transmission capabilities and can easily penetrate a variety of obstacles, ensuring stable and uninterrupted connections even in underground construction areas and steel-structured buildings with severe signal obstruction. The server's built-in intelligent scheduling algorithm can flexibly adjust the communication cycle based on construction intensity. In different operating scenarios, it can not only ensure the timeliness of positioning data but also control device power consumption at a low level, significantly improving the battery life of wearable devices and edge computing servers, and reducing the trouble of frequent charging and operation and maintenance of equipment.
[0105] Compared with existing technologies, traditional construction safety monitoring systems require the installation of independent positioning servers on each construction locomotive, resulting in high equipment investment costs. However, the mobile edge computing server adopts a "one-to-many" architecture, allowing a single device to cover a larger construction area and support the simultaneous access of a large number of wearable devices and locomotives, significantly reducing the equipment cost per project. Furthermore, the system is equipped with a convenient rapid transition device that can complete equipment migration and deployment in a short period of time. It also uses a high-precision positioning module to quickly complete coordinate calibration, ensuring that the server is always at the center of construction personnel activities, truly realizing an intelligent communication network with rapid device connection and real-time data transmission.
[0106] S32: The locomotive communicates with the edge computing server and sends the locomotive coordinates to the edge computing server.
[0107] The locomotive establishes a communication link with the edge computing server via the GSM-R network, a dedicated railway network specifically designed for locomotive communications and positioning. The GSM-R network utilizes advanced communication technology and an optimized network architecture, offering strong signal coverage and anti-interference capabilities, ensuring continuous and stable communication in complex and changing environments.
[0108] Whether in tunnels or mountainous areas where signals are easily obstructed, the GSM-R network, with its unique signal enhancement technology and intelligent switching mechanism, ensures uninterrupted and delay-free data transmission. When a locomotive is in a tunnel, pre-deployed tunnel-specific base stations and signal relay equipment relay signals, ensuring unimpeded information exchange between the locomotive and the edge computing server. In areas with complex terrain, such as mountainous areas, the network system automatically adjusts the signal frequency band and transmission power to bypass terrain obstacles and accurately capture the locomotive's positioning information. The locomotive's built-in communication module is deeply compatible with the GSM-R network, quickly and accurately packaging the locomotive's real-time coordinate information and sending it to the edge computing server. Furthermore, the network's redundant design and automatic fault recovery further enhance communication reliability. Even if a local network anomaly occurs, the system can quickly switch to a backup link, ensuring stable transmission of locomotive coordinate data and providing a solid data foundation for subsequent safety monitoring and early warning.
[0109] S33: The edge computing server determines whether the construction worker's coordinates are within the electronic fence area based on the algorithm in step S2; if the construction worker is not within the electronic fence area, the server maintains monitoring; if the construction worker is within the electronic fence area, the server sends an early warning message to the construction worker's handheld terminal until the construction worker leaves the electronic fence area.
[0110] Specifically, after receiving the coordinate data of construction workers and the coordinate information sent by the locomotive, the edge computing server will make a real-time assessment of the safety status of the construction workers and the locomotive based on a pre-set algorithm. This algorithm comprehensively considers multiple factors, including the actual layout of the construction site, the range of construction workers' activities, and the locomotive's trajectory, to construct a precise safety assessment model. The system divides the construction area into electronic fences. The boundaries of the electronic fences are not simply geometric divisions, but are combined with construction process requirements, equipment operating radius, and historical accident data to ensure that the division of the fenced areas is scientific and reasonable, ensuring both construction progress and maximum personnel safety.
[0111] When the edge computing server receives the data, it immediately initiates a determination process to determine whether the construction worker's coordinates are within the geo-fence area. If the worker is not within the geo-fence area, the server continuously monitors their location and tracks the locomotive's operating status to ensure that both maintain a safe distance. If a construction worker enters the geo-fence area, the server quickly triggers an early warning mechanism. First, it sends an early warning message via the locomotive's onboard terminal to the construction worker's handheld device. This warning information uses various forms, such as sound, light, and vibration, to ensure that the worker is immediately aware of the danger. Simultaneously, the server also synchronizes the early warning information to the construction safety management platform. Platform managers can view the on-site situation in real time through a visual interface and take further intervention measures based on the actual situation, such as remotely controlling the locomotive to slow down or suspend operations, until the worker leaves the geo-fence area. This effectively prevents safety accidents such as collisions between the locomotive and the worker, establishing a solid safety barrier for the construction site.
[0112] Second embodiment
[0113] Based on the above method, the second embodiment of the present invention provides a railway electronic fence calculation system based on track coordinates. Figure 4 As shown, the system includes one or more processors 41 and a memory 42. The memory 42 is used to store one or more programs, which, when executed by the processor 41, implement the railway electronic fence calculation method in the above embodiment.
[0114] The processor is used to control the overall operation of the system to complete all or part of the steps of the above method. The processor can be a central processing unit (CPU), a graphics processing unit (GPU), a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a digital signal processing (DSP) chip, etc. The memory is used to store various types of data to support operations in the system. These data may include, for example, instructions for any application or method operating on the system, as well as application-related data. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, etc.
[0115] In an exemplary embodiment, the system can be implemented by a computer chip or entity, or by a product having certain functions, for executing the above method and achieving the same technical effect as the above method. A typical embodiment is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, an in-vehicle human-computer interaction device, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0116] In another exemplary embodiment, the present invention further provides a computer-readable storage medium including program instructions, which, when executed by a processor, implement the steps of the method described in any of the above embodiments. For example, the computer-readable storage medium may be the aforementioned memory including the program instructions, which may be executed by a processor to perform the above method and achieve the same technical effects as the above method.
[0117] It should be noted that the above embodiments are merely examples, and the technical solutions of the various embodiments may be combined and are all within the scope of protection of the present invention.
[0118] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature identified as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, "plurality" means two or more, unless otherwise specifically defined.
[0119] The above describes in detail the method and system for calculating railway electronic fences based on track coordinates provided by the present invention. For those skilled in the art, any obvious modification to this invention without departing from the essence of this invention would constitute an infringement of the present invention's patent rights and would incur corresponding legal liability.
Claims
1. A railway electronic fence calculation method based on track coordinates, characterized in that The steps include: S1: Construct track vector diagram and basic data modeling; S2: Establish a rectangular coordinate system and construct an electronic fence area based on the track vector diagram; S3: The edge computing server collects the coordinates of the construction workers and the locomotive to determine whether the coordinates of the construction workers are within the electronic fence area. If the construction workers are not within the electronic fence area, the monitoring is maintained. If the construction workers are within the electronic fence area, the edge computing server sends an early warning message to the construction workers' handheld terminal until the construction workers leave the electronic fence area.
2. The railway electronic fence calculation method according to claim 1, characterized in that The step S1 of constructing the track vector diagram and basic data modeling includes the following steps: S11: Coordinate collection points are evenly arranged at preset intervals along the track extension direction to form a discrete coordinate point set P = {P1, P2, ... P n }; S12: For adjacent coordinate points P i With P i+1 , connected to form track segment L i =(P,P i+1 ), its geometric form is represented by a straight line segment in two-dimensional space, all track segments L i The set of orbital vectors is denoted as L = {L1, L2, ... L m }; where m is the total number of track segments; S13: Convert the track vector diagram into an SHP format file to form basic data modeling.
3. The railway electronic fence calculation method according to claim 2, characterized in that The step S2 in which a rectangular coordinate system is established and an electronic fence area is constructed according to the track vector diagram includes the following steps: First, continuously collect the coordinates M and N of two close points on the track in front of the train head, and determine the coordinate displacement of the train head The locomotive head displacement direction is the train's travel direction; Next, select any three consecutive points A(x a ,y a )、B(x b ,y b ) and C(x c ,y c ) as the basic unit of analysis; Then, set the warning distance to r; set the first warning point B1 to be on one side of the bisector of ∠ABC; set the second warning point B2 to be on the other side of the bisector of ∠ABC; take the x-axis direction as the east direction, and take point B(x b ,y b ) The known point G in the east direction is used as the azimuth reference, and the azimuth is taken as counterclockwise; Next, using the line segment equation and the two-point equation, we can obtain the general formula parameters a1 and b1 of the equation of line segment AB, and the general formula parameters a2 and b2 of the equation of line segment BC. According to the angle formula, ∠ABG and ∠CBG are obtained; using the positions of the first warning point B1 and the second warning point B2, the slope k is obtained; According to the point-slope equation, we can get the equation of line segment B1B2; b ,y b ) is the center of the circle and the warning distance r is the radius, and point B(x b ,y b )'s circular coordinate equation; Point B(x b ,y b ) intersects with the equation of line segment B1B2 to obtain the first warning point B1(x b1 ,y b1 ) and the second warning point B2(x b2 ,y b2 ); Finally, the track warning points in the direction of the train's advance are connected in sequence according to the direction of the train's travel, and the area surrounded by the set of line segments is the electronic fence area.
4. The railway electronic fence calculation method according to claim 3, characterized in that For a track with bifurcated intersections, if there are n bifurcated intersections, the number of warning points to be solved each time is 2n. In this case, the electronic fence area is the union of the warning areas in front of the train in each bifurcated track.
5. The railway electronic fence calculation method according to claim 3, characterized in that In step S3, the edge computing server determines whether the construction worker's coordinates are within the electronic fence area, including the following steps: S31: Set up an edge computing server at the construction site to maintain continuous communication with the wearable devices carried by construction workers; S32: The locomotive communicates with the edge computing server and sends the locomotive coordinates to the edge computing server; S33: The edge computing server determines whether the construction worker's coordinates are within the electronic fence area based on the algorithm in step S2; if the construction worker is not within the electronic fence area, the server maintains monitoring; if the construction worker is within the electronic fence area, the server sends an early warning message to the construction worker's handheld terminal until the construction worker leaves the electronic fence area.
6. The railway electronic fence calculation method according to claim 5, characterized in that The edge computing server is a mobile server used to complete device migration and deployment in a short time.
7. The railway electronic fence calculation method according to claim 6, characterized in that The edge computing server communicates with the construction workers' wearable devices using the LoRa wireless protocol to ensure communication stability and device endurance.
8. The railway electronic fence calculation method according to claim 7, characterized in that The locomotive establishes a communication link with the edge computing server through the GSM-R network to ensure smooth information exchange between the locomotive and the edge computing server.
9. A railway electronic fence calculation system based on track coordinates, characterized in that It comprises a processor and a memory; wherein the memory is coupled to the processor and is used to store a computer program, and when the computer program is executed by the processor, the processor implements the railway electronic fence calculation method according to any one of claims 1 to 8.