A method for generating an on-track job boundary crossing identification based on a railway dynamic electronic fence
By acquiring railway operation plans and combining them with the characteristics of railway linear engineering to generate dynamic electronic fences, the problems of static and insufficient accuracy of existing electronic fences have been solved, achieving high-precision and flexible operation safety management and closed-loop control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING JINGTIANWEI TECH DEV CO LTD
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-02
AI Technical Summary
In current railway operations, the generation of electronic fences requires manual input, cannot be dynamically adjusted according to the work plan, lacks accuracy, and cannot be deeply integrated with the linear engineering characteristics of railways, resulting in safety hazards and a lack of closed-loop management.
By obtaining electronic work orders from the railway safety production management system and generating dynamic electronic fences based on the characteristics of railway linear engineering, and using centimeter-level precision coordinate transformation and multi-source positioning fusion verification, the location of workers is monitored in real time and boundary crossing alarms are triggered.
It enables dynamic generation and adjustment of electronic fences, improving accuracy and flexibility, ensuring operational safety, preventing boundary crossings, and achieving closed-loop management from planning to handling.
Abstract
Description
Technical Field
[0001] This invention relates to the field of railway safety production management technology, specifically to a method for identifying track crossings based on dynamic electronic fence generation. Background Technology
[0002] With the continuous densification and increasing operational density of my country's railway network, track inspections, equipment maintenance, and construction windows are frequent, and workers are often in the environment of high-speed trains. Traditional manual protection methods suffer from problems such as delayed response, blind spots, and lax management, which can easily lead to personal safety accidents. High-precision positioning-based electronic fences can serve as the core of this "technical prevention" measure, enabling automatic monitoring and boundary-crossing warnings of workers' activity areas through geographical boundary settings. Currently, in railway field operations, electronic fences mostly use preset static coordinate points to delineate fixed areas, relying on manual input of work mileage ranges, and cannot be dynamically adjusted according to daily work plans. This type of solution has three major drawbacks:
[0003] Poor flexibility: unable to adapt to actual scenarios such as temporary expansion of work sites and segmented operations;
[0004] Insufficient accuracy: Based on ordinary GPS (meter-level) positioning, the fence boundary is blurry, which easily leads to false alarms or missed alarms;
[0005] Lack of linkage with work plan: The fence setting is disconnected from the work order, making it difficult to achieve an automatic closed loop of "plan is fence".
[0006] Although some systems have attempted to introduce RTK positioning, they have not been deeply integrated with the characteristics of railway linear engineering (such as kilometer markers, line types, tracks, turnouts, and other line features), resulting in the fence generation still appearing crude. Summary of the Invention
[0007] In view of this, the purpose of this invention is to provide a method for identifying track crossings based on the generation of dynamic electronic fences for railway operations, in order to solve the problems of existing fence generation technology, which requires manual input for each plan and cannot be dynamically generated and adjusted according to the plan, as well as the low accuracy of the generated fences, leading to safety hazards for track operations.
[0008] To achieve the above objective, the method includes the following steps:
[0009] Step 1: Structured parsing of work plan: Automatically obtain the electronic work order of the day from the track safety production management system, and extract the work type, start and end mileage, track switch number, work line and work time window from the electronic work order of the day;
[0010] Step 2, Electronic Fence Generation: Identify section operations and station operations based on the operation type. For section operations, use a coordinate transformation algorithm to convert the kilometer markers in the start and end mileage of the operation into WGS-84 plane coordinates. Based on the operation line and the offset of the line centerline that needs to be extended outward by a set distance for operations adjacent to the operating line, generate the fence boundary to obtain the electronic fence. For station operations, use a coordinate transformation algorithm to convert the railway coordinate information in the station collected by the drone on-site into WGS-84 plane coordinates, and combine the track turnout number to generate the fence boundary to obtain the electronic fence.
[0011] Step 3, Dynamic Fence Activation and Expansion: Based on the operation time window, add time constraints to the electronic fence to form a dynamic electronic fence with dual temporal and spatial constraints;
[0012] Step 4, Multi-source positioning fusion verification: Real-time comparison of personnel location with the boundary of the dynamic electronic fence. If personnel cross the boundary, an audible and visual alarm is triggered and an alarm is pushed to the management platform.
[0013] The beneficial effects are as follows: The dynamic fence generation method in this invention directly obtains the electronic work order of the day and adds the acquisition of the operation time window to generate a dynamic electronic fence. Therefore, even after the plan changes, the method of this invention can promptly obtain the corresponding work order and generate the electronic fence. Thus, this invention overcomes the problem that existing electronic fences are only static and require manual adjustment when changed. Furthermore, this invention rationally utilizes the characteristics of railway linear engineering when generating the electronic fence, applying different characteristics for section and station operations to fully consider the characteristics of railway linear engineering and closely integrate the fence logic with the actual site conditions. The method of this invention also uses a centimeter-level electronic map when establishing the fence, improving the accuracy of the generated electronic fence. Moreover, after generating an accurate electronic fence, this invention uses the generated electronic fence based on multi-source positioning fusion verification to warn of boundary violations during track work, eliminating the situation of "paper fences, offline boundary violations" and realizing safe management of track work.
[0014] Further, in step 2, converting the kilometer markers in the start and end mileage of the operation into WGS-84 plane coordinates using a coordinate transformation algorithm includes: calculating the position of the kilometer markers in the start and end mileage of the operation in WGS-84 plane coordinates using a direct query mode or a dynamic difference mode coordinate calculation method;
[0015] The direct query mode involves matching the GPS coordinate database of the route using SQL.
[0016] The dynamic difference mode uses known mileages on both sides of the start and end mileages and the coordinates corresponding to those known mileages to allocate coordinate differences according to the mileage ratio.
[0017] The method of the present invention can obtain accurate coordinate information in the above two ways. It can be used directly after the corresponding mapping coordinate library is stored. Alternatively, it can be achieved by interpolation using "the known mileage on both sides of the start and end mileage and the coordinates corresponding to the known mileage". That is, the start and end mileage points to be calculated are between the two known coordinates used. Therefore, the accuracy of the obtained coordinate data can be guaranteed when "interpolation" is used.
[0018] Furthermore, in step 2, the coordinate transformation algorithm is used to convert the railway coordinate information collected by the UAV on site into WGS-84 plane coordinates. This includes: collecting the coordinate data of turnout points, track points, and track segment endpoints using BeiDou positioning from the UAV on site, projecting and calibrating the coordinate data to calibrate it to the railway centerline, and then dividing the railway line collected by the UAV into sections and marking the track turnouts using the calibrated points.
[0019] After obtaining coordinates that meet the accuracy requirements, the method of this invention obtains accurate railway coordinate information within the station through projection calibration and reasonable application of railway linear engineering features, thereby ensuring that the electronic fence logic conforms to the actual site conditions and improving the accuracy of generating the electronic fence.
[0020] Further, in step 2, the projection calibration is as follows:
[0021] P_calibrated = P_original + (P_centerline - P_original) × k;
[0022] Where P_calibrated is the calibrated point position, P_original is the original acquisition point position, P_centerline is the railway centerline reference point position, and k is the dynamic weighting coefficient, which is adjusted based on the curvature of the railway centerline.
[0023] This formula describes a coordinate projection calibration algorithm based on dynamic weights. Its core purpose is to more accurately "attach" or "project" the original coordinates (P_original) collected by equipment (such as LiDAR, dynamic inspection vehicle) onto the known railway centerline (P_centerline). This algorithm can eliminate errors caused by vehicle shaking, sensor noise or positioning drift in track geometry detection and point cloud data processing.
[0024] Furthermore, in step 2, the process of segmenting and marking the railway lines and turnouts by calibrating the points collected by the UAV includes: determining the spatial topological relationship between turnout points and track points using the Haversine formula and the spatial topological constraint equation of the relationship between points and line segments; and dynamically segmenting the track lines and identifying turnouts using the point projection ratio formula for line segments and the dynamic segmentation threshold adjustment model.
[0025] In this invention, by determining the spatial topological relationship between turnout points and track points, and by dynamically segmenting the track and identifying turnouts, track turnouts can be separated and marked with corresponding numbers.
[0026] Furthermore, in step 2, the spatial topological constraint equation for the dependency relationship between points and line segments is:
[0027] (P x -P 1x (P) 2y -P 1y )-(P y -P 1y (P) 2x -P 1x )=0;
[0028] min(P 1x ,P 2x )≤P x ≤max(P 1x ,P 2x );
[0029] min(P 1y ,P 2y )≤P y ≤max(P 1y ,P 2y );
[0030] Among them, (P) 1x ,P 1y ) and (P 2x ,P 2y (P) represents the coordinates of the two endpoints of the track segment. x ,P y ) represents the coordinates of the turnout point.
[0031] In this invention (P) x -P 1x (P) 2y -P 1y )-(P y -P 1y (P) 2x -P 1xThe formula )=0 is a cross product criterion that constrains the straight line collinear with the turnout point and one endpoint to be parallel to the straight line containing the track segment. Furthermore, this invention incorporates further constraints on the coordinate range of the turnout point. Therefore, based on the above-mentioned spatial topological constraint equation of this invention, the turnout point is accurately located on the track segment.
[0032] Furthermore, in step 4, the real-time comparison of personnel positions with the boundary of the dynamic electronic fence, and the triggering of an audible and visual alarm and the push of an alarm to the control platform if personnel cross the boundary, includes: comparing personnel positions with the boundary of the dynamic electronic fence in real time according to the Beidou positioning terminal; if personnel intrude into the adjacent line or exceed the work endpoint, an audible and visual alarm is triggered and an alarm is pushed to the control platform.
[0033] The method of this invention uses a Beidou positioning terminal to realize the monitoring and identification process. In the identification process, it not only considers the "line crossing" method of adjacent lines, but also the "point crossing" method of the work endpoint, thus ensuring better safety management.
[0034] Furthermore, in step 4, a ray intersection algorithm is used to determine whether a person has intruded into an adjacent line or exceeded the work endpoint. The ray intersection algorithm is as follows: the number of intersections between the horizontal ray to the right of the person's coordinate point and the polygonal edge formed by the electronic fence is calculated. If the number of intersections is odd, then the person is inside the electronic fence.
[0035] The cross-intersection algorithm can determine the relationship between a point and a polygon. In this invention, the algorithm can determine whether a person is inside the polygon formed by the boundary of the electronic fence. Therefore, based on this ray cross-intersection algorithm, it is possible to accurately determine whether a person has intruded into the adjacent line or exceeded the work endpoint.
[0036] Furthermore, in step 4, when the difference between the coordinates of the person's coordinates and the coordinates of the vertices of the polygon formed by the electronic fence is less than a set threshold, the person's coordinates are on the vertices of the polygon, and if the number of intersections is odd, then the person is inside the electronic fence.
[0037] This invention takes into account that when a person's coordinates are at a vertex, since a vertex is the intersection of two edges, the intersection of the ray and the polygon at this point may be counted as two intersections or one intersection, which may affect the accuracy of the conclusion. Therefore, this invention sets a threshold to consider points smaller than the threshold as points falling on the vertex. In order to make a safer judgment and ensure the accuracy of the result, this invention determines this situation as follows: if the number of intersections is odd, then the person is inside the electronic fence.
[0038] Furthermore, in step 4, when calculating the number of intersections between the horizontal ray to the right of the personnel's coordinate point and the polygonal edge formed by the electronic fence, the calculated intersections are evaluated for point equivalence. Points that are evaluated as equivalent are merged into the same point and recorded as one intersection point.
[0039] The method of this invention can merge very close points into one point, reducing data redundancy and ensuring the accuracy of the results.
[0040] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described in detail below. Detailed Implementation
[0041] The technical solution of the present invention will be clearly and completely described below with reference to specific embodiments. However, those skilled in the art should understand that the embodiments described below are only for illustrating the present invention and should not be regarded as limiting the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0042] Example of a method for identifying track crossings based on dynamic electronic fences for railway operations
[0043] The dynamic fence generation method in this invention directly obtains the electronic work order of the day and adds the acquisition of the operation time window to generate a dynamic electronic fence. Therefore, even after the plan changes, the method of this invention can promptly obtain the corresponding work order and generate the electronic fence. Thus, this invention overcomes the problem that existing electronic fences are only static and require manual adjustment when changed. Furthermore, this invention rationally utilizes the characteristics of railway linear engineering when generating the electronic fence, applying different characteristics for section and station operations to fully consider the characteristics of railway linear engineering and closely integrate the fence logic with the actual site conditions. The method of this invention also uses a centimeter-level electronic map when establishing the fence, improving the accuracy of the generated electronic fence. Moreover, after generating an accurate electronic fence, this invention uses multi-source positioning fusion verification to apply the generated electronic fence to warn of boundary violations during track work, preventing the situation of "paper fences, offline boundary violations," and achieving safe management of track work. Specifically, this implementation method includes the following steps:
[0044] Step 1: Structured analysis of the work plan.
[0045] The system automatically retrieves the daily electronic work order from the track safety production management system and extracts structured parameters such as the start and end mileage of the operation (e.g., K120+300~K121+500), track switch number, operation line (up / down), operation type, and risk level.
[0046] Step 2: Electronic fence generation.
[0047] In this embodiment, the method of generating the electronic fence differs depending on whether the operation is within a section or within a station.
[0048] Interval:
[0049] Based on the existing centimeter-level electronic map, a coordinate transformation algorithm is used to convert kilometer marker coordinates to WGS-84 plane coordinates in real time. Combined with the line centerline offset (e.g., extending 2 meters outwards for work on adjacent operating lines), strip or polygonal fence boundaries are generated. The electronic fence is further differentiated according to the work order's scope. This is to prevent workers from accidentally entering adjacent lines and causing safety accidents in complex railway line environments where the work area cannot be accurately distinguished from the work area on this line. The implementation scheme for generating electronic fences for section work in this embodiment is as follows:
[0050] 1) Use a dual-mode coordinate calculation algorithm to calculate the coordinate information of the work order.
[0051] Direct query mode: Precisely matches the GPS coordinate database of the route using SQL.
[0052] Dynamic interpolation mode: Employs a linear interpolation method based on the maximum-minimum mileage point.
[0053] △coordinates = (target mileage - minimum mileage) / (maximum mileage - minimum mileage) × △known coordinates;
[0054] In this formula, the known coordinate △ represents the difference between the coordinates corresponding to the maximum mileage and the coordinates corresponding to the minimum mileage, and the coordinate △ represents the difference between the coordinates corresponding to the target mileage and the coordinates corresponding to the minimum mileage. Then, based on the known coordinates corresponding to the minimum mileage, the coordinates corresponding to the target mileage can be obtained.
[0055] Suppose a straight railway line:
[0056] K100+000 (point A, minimum mileage): coordinates (1000, 2000), K101+000 (point B, maximum mileage): coordinates (1100, 2100), find the coordinates of K100+300 (point P, target mileage):
[0057] Calculate the ratio: (Target mileage - Minimum mileage) / (Maximum mileage - Minimum mileage) = (100300 - 100000) / (101000 - 100000) = 300 / 1000 = 0.3;
[0058] Calculate coordinates:
[0059] X P =1000+0.3×(1100−1000)=1000+30=1030;
[0060] Y P=2000+0.3×(2100−2000)=2000+30=2030;
[0061] Result: The coordinates of K100+300 are (1030, 2030).
[0062] This embodiment utilizes known mileage information on both sides of the target mileage, and based on the high accuracy of linear interpolation, the result obtained is also accurate.
[0063] 2) Spatiotemporal fusion fence generation.
[0064] An intelligent activation mechanism dynamically binds to the operation time window, linking to railway linear characteristic parameters such as line type, gradient, and curve. A high-precision coordinate offset algorithm is employed, using a spherical coordinate calculation with an Earth radius of 6,371,008.8 meters. High-precision offset Δcoordinate = f(azimuth, angular distance) is achieved through orthogonal offset of azimuth angles, with longitude and latitude offsets ≤ 0.00001° (approximately 1.11 cm).
[0065] The system innovatively adopts a closed topology structure of "start point-left buffer-end point-right buffer-start point," automatically handling the problem of repeated endpoints of line segments. When three consecutive points are collinear, it automatically backtracks to calculate the azimuth angle of the third point and binds it to railway line characteristics (automatically extending the adjacent line protection by 2 meters for up / down work areas). It integrates a slope compensation algorithm to automatically adjust the vertical offset on sections with a 30‰ slope. For curved sections, chord length correction technology is used to ensure a smooth transition of the fence boundary at curves with an R=500 meter radius. Fence generation is automatically linked to the work plan and supports dynamic reconstruction based on work orders / temporary changes. The entire generation process is traceable, meeting the closed-loop requirements of railway safety management: "plan-fence-alarm-response."
[0066] Internal:
[0067] The track turnout numbers are extracted from the electronic work orders. Based on high-precision railway coordinate information collected by drones within the station, a coordinate transformation algorithm is used to convert them into WGS-84 plane coordinates in real time. Combined with key coordinate information such as turnout tips and insulating joints collected on-site, a precise fence boundary is generated through data processing and analysis algorithms. The implementation scheme for generating electronic fences for station operations in this embodiment is as follows:
[0068] The coordinates of key points such as turnout tips / insulating joints were collected on-site using BeiDou high-precision positioning. The collected coordinates were then projected and calibrated to the railway centerline. The algorithm is as follows:
[0069] P_calibrated = P_original + (P_centerline - P_original) × k;
[0070] The dynamic weighting coefficient k is automatically adjusted based on the curvature of the line (k=1.0 for straight segments and k=0.8-1.2 for curved segments).
[0071] P_original (Original Acquisition Point): The coordinates of the point directly measured by the sensor. Due to vibrations (such as head-nodding or head-shaking vibrations) or positioning errors during dynamic measurements, this point may not be on the actual centerline of the track.
[0072] P_centerline (centerline reference point): A pre-established, high-precision point on the railway design centerline or reference line.
[0073] (P_centerline - P_original) (Correction Vector): This is a tension vector pointing towards the centerline, indicating how far and in which direction the current measurement point needs to move to the standard centerline.
[0074] k (dynamic weighting coefficient): This is the most critical part, as it determines the weights of trusting the raw data (sensors) and the pre-designed centerline.
[0075] The purpose of this dynamic weighting coefficient k is to adapt to different line conditions (straight lines or curves) in order to achieve the best calibration effect.
[0076] When k=1.0 (straight line segment), the centerline data is fully trusted, i.e., P_calibrated = P_original + (P_centerline - P_original) = P_centerline. Because the track geometry is simple and stable on straight lines, the algorithm will completely correct the acquisition points to the design centerline. This effectively filters out random noise and minor fluctuations in straight line segment measurements, making the data smooth and accurate.
[0077] When k = 0.8-1.2 (curved segment), the algorithm seeks a balance between "sensor measurement" and "design centerline". Specifically, k < 1.0 (e.g., 0.8) means that if the measured data of the curved segment is of high quality (high signal-to-noise ratio), or in order to retain the true track deviation (e.g., the actual track does deviate from the design line), the algorithm will reduce the correction force towards the centerline and retain more of the original measurement value. k > 1.0 (e.g., 1.2) means that in the case of sharp bends or curved segments with large changes in superelevation, the sensor is easily affected by centrifugal force and vibration, resulting in a large deviation. In this case, the weight is increased to force the point to be pulled towards the centerline to prevent the data from jumping drastically.
[0078] Curvature adjustment: The algorithm reads the curvature of the line at the current mileage point in real time. The greater the curvature (the sharper the bend), the more the k value adjustment strategy tends to stabilize the data (usually k is increased appropriately to suppress noise, or dynamically adjusted according to the specific algorithm logic).
[0079] The system automatically corrects the deviation between the calibrated coordinates and the original centerline, and uses the calibrated points to segment and mark the tracks and turnouts of the railway line collected by the UAV.
[0080] The spatial topological relationship between turnout points and track points is determined using the Haversine formula and the spatial topological constraint equation of the point-line segment dependency relationship. The track lines are dynamically segmented and turnouts are identified using the point-line segment projection ratio formula and the dynamic segmentation threshold adjustment model. This enables the segmentation and marking of track turnouts on railway lines collected by UAVs. The implementation method in this embodiment is as follows:
[0081] 1) Haversine spherical distance formula:
[0082] ;
[0083] Where: R = 6371008.8 meters (Earth's radius). , For two points, latitude (radians) Due to latitude difference, It measures the difference in longitude. The accuracy is down to the centimeter level, and it is used to calculate the distance between turnout points and track points.
[0084] 2) Formula for the projection ratio of a point onto a line segment:
[0085] ;
[0086] Where: P1 and P2 are the coordinates of the endpoints of the line segment, P is the coordinates of the point to be projected, and 0≤u≤1 indicates the relative position of the projected point on the line segment. This is used to determine the insertion position of the turnout point within the track segment.
[0087] 3) Spatial topological constraint equations:
[0088] Cross product test:
[0089] (P x -P 1x (P) 2y -P 1y )-(P y -P 1y (P) 2x -P 1x )=0;
[0090] Range constraints:
[0091] min(P1x ,P 2x )≤P x ≤max(P 1x ,P 2x );
[0092] min(P 1y ,P 2y )≤P y ≤max(P 1y ,P 2y );
[0093] The spatial topological constraint equations in this embodiment are used to determine the dependency relationship between points and line segments, ensuring that turnout points are accurately located on track segments. Where (P 1x ,P 1y ) and (P 2x ,P 2y (P) represents the coordinates of the two endpoints of the track segment. x ,P y () represents the coordinates of the turnout point. In this embodiment, (P) x -P 1x (P) 2y -P 1y )-(P y -P 1y (P) 2x -P 1x The equation )=0 is a cross product criterion that constrains the straight line collinear with the turnout point and one end point to be parallel to the straight line containing the track segment. It also incorporates further constraints on the coordinate range of the turnout point. Therefore, based on the above spatial topological constraint equation, it is guaranteed that the turnout point is accurately located on the track segment.
[0094] 4) Dynamic segmentation threshold adjustment model:
[0095] ;
[0096] in The segmentation threshold is defined in this embodiment. A rule is defined to dynamically switch the data processing granularity based on the line curvature, that is, to automatically adjust the segmentation accuracy according to the line curvature and balance the calculation efficiency and positioning accuracy.
[0097] When the curvature is greater than 0.001, it represents a curved segment (including transition curves and circular curves), entering high-precision mode; when the curvature is less than or equal to 0.001, it represents a straight segment (or a very small curve in a super-high transition segment, usually considered a straight line), entering standard mode. 5cm (high-precision mode): In curved segments, a data point is divided every 5 centimeters (or processed once), which can precisely capture changes in the trajectory's direction and versine deviation. 10cm (standard mode): In straight segments, a data point is divided every 10 centimeters. Straight segments have stable geometry, and data changes are gradual, requiring less density. Therefore, this model in this embodiment achieves a balance between computational power and accuracy.
[0098] 5) Algorithm for generating unique identifiers for line segments:
[0099] ORGID = Station Name + Track Number + Segment ID + Hash Check Code;
[0100] This embodiment uses SHA-256 hashing to ensure the uniqueness of line segments throughout their entire lifecycle, and supports historical version backtracking and dynamic updates.
[0101] In this embodiment, 1) the Haversine spherical distance formula and 3) the spatial topological constraint equation are used to determine the spatial topological relationship between turnout points and track points;
[0102] In this embodiment, point 2) projection ratio formula on line segment and dynamic segmentation threshold adjustment model 4) are used for dynamic line segmentation and turnout identification;
[0103] In this embodiment, the line segment unique identifier generation algorithm (5) is used to ensure the traceability of data throughout its entire lifecycle.
[0104] Using the above algorithm, track switches can be separated and labeled with corresponding numbers. An electronic fence is then dynamically generated based on the track switch numbers entered in the electronic work order; the algorithm is consistent with that of the inter-regional spatiotemporal fusion fence.
[0105] Step 3: Activate and expand the dynamic fence.
[0106] Based on the work order plan, track turnout number, and work time window, a dynamic electronic fence with centimeter-level precision is automatically generated, forming an intelligent protection boundary with dual constraints of "space + time".
[0107] Step 4: Multi-source localization fusion verification.
[0108] Relying on the BeiDou positioning terminal, the system compares the personnel's location with the fence boundary in real time. Once the boundary is crossed (including intrusion into adjacent lines or exceeding the work endpoint), an audible and visual alarm is immediately triggered, and an alarm is pushed to the management platform. The implementation scheme of this embodiment is as follows:
[0109] An alarm is triggered by determining whether a person's coordinates (point P) are within the electronic fence. The algorithm is as follows:
[0110] Core algorithm: Improved ray crossing algorithm.
[0111] Point P is inside the polygon, which is equivalent to the number of intersections of the horizontal ray from P to the right with the polygon's sides being mod2=1 (an odd number of intersections).
[0112] Boundary condition handling:
[0113] Vertex determination: |P x -V x ∣<ε∧∣P y -V y |<ε(ε=2e -10 );
[0114] Parallel processing of edges: |V 1x -V 2x |<ε (perpendicular side) or |V 1y -V 2y |<ε (horizontal edge);
[0115] Among them (P) x ,P y (V) represents the coordinates of point P, (V) x V y (V) represents the coordinates of vertex V on the polygon. 1x V 1y ) and (V 2x V 2y ) represents the coordinates of two points on the polygon.
[0116] The key formulas for intersection calculation include the formula for horizontal edge intersection and the logic for processing vertical edges, as detailed below:
[0117] Formula for intersection of horizontal edges:
[0118] ;
[0119] Vertical edge processing logic:
[0120] If P x ∈[V minx V maxx And P y ≥min(V 1y V 2y );
[0121] The floating-point precision control model includes precision threshold setting and point equivalence determination, as detailed below:
[0122] Precision threshold setting: ;
[0123] Among them (P) x ,Py (V) represents the coordinates of point P, (V) x V y (V) represents the coordinates of vertex V on the polygon. 1x V 1y ) and (V 2x V 2y V represents the coordinates of two points on the polygon. minx V maxx This represents the minimum and maximum X-coordinates of a point on the polygon.
[0124] Point equivalence determination:
[0125] ;
[0126] Where △x and △y represent the coordinate difference between the intersection points.
[0127] Special scene processing algorithms:
[0128] Concave polygon processing: Adaptive adjustment technique for edge traversal order is used to ensure correct ray intersection count at concave points;
[0129] Determining the extension of the horizontal edge:
[0130] like This triggers a special counting rule, where (P) x ,P y (V) represents the coordinates of point P, (V) ix V iy ) represents the coordinates of a point on a concave polygon.
[0131] pass Threshold control enables nanometer-level boundary determination, solving the accuracy loss problem of traditional algorithms in floating-point calculations. It innovatively handles special scenarios such as vertical edges, horizontal edges, and concave polygons, and ensures 100% scene coverage through adaptive counting rules.
[0132] The method in this embodiment has the following advantages:
[0133] (1) High precision: The fence boundary error is ≤10cm, effectively distinguishing the work area of this line from that of the adjacent line.
[0134] Overcoming the shortcomings of existing technologies: Existing technologies generate electronic fences with low accuracy, with errors potentially reaching the meter level or even greater. In complex railway line environments, they cannot accurately distinguish between the work areas of this line and adjacent lines, which can easily lead to workers accidentally entering adjacent lines and causing safety accidents.
[0135] Specific technical solutions support this invention: During the electronic fence generation process, based on a pre-constructed centimeter-level electronic map, a precise coordinate transformation algorithm is used to convert kilometer marker coordinates into WGS-84 planar coordinates. For section operations, geometric calculations are performed in conjunction with the offset of the track centerline; for station operations, high-precision railway coordinate information collected by drones is used, combined with key coordinate information such as turnout tips and insulating joints collected on-site, to generate precise fence boundaries through data processing and analysis algorithms.
[0136] Technical effects achieved: Through these technical means, the fence boundary error is controlled within a range of less than or equal to 10cm, which can accurately delineate the work areas of this line and adjacent lines, greatly improving the safety of the operation and reducing the risk of accidents such as collisions caused by accidentally entering adjacent lines.
[0137] (2) Strong dynamism: Supports automatic reconstruction of fences by day, by work order, and by temporary changes, realizing "one-time planning, automatic fence formation".
[0138] Overcoming the shortcomings of existing technologies: Most existing electronic fences are statically set up, making it difficult to adjust them in a timely manner according to changes in the work plan once set up. When the work date, work order content, or other temporary changes occur, the fence needs to be manually reset, which is inefficient and prone to errors.
[0139] Specific technical solution support: This invention employs dynamic fence activation and expansion technology. Based on the work mileage and time window in the work order plan, a dynamic fence generation algorithm is used to automatically generate a dynamic electronic fence with centimeter-level accuracy. This fence can automatically reconstruct the fence range and time constraints according to changes in the work plan, such as by day, by work order, or temporary changes.
[0140] Technical benefits achieved: The system enables convenient "one-time planning, automatic fencing" operation, improving the flexibility and response speed of the fencing. It eliminates the need for frequent manual intervention, adapts promptly to adjustments in work plans, ensures accurate protection in various work scenarios, and improves operational efficiency and management level.
[0141] (3) Deep business integration: It is bound to the characteristics of railway linear engineering (line, gradient, curve), and the fence logic conforms to the actual site conditions.
[0142] Overcoming the shortcomings of existing technologies: Existing electronic fence generation technologies often do not fully consider the special characteristics of railway linear engineering, such as row type, slope, curves, etc., resulting in the fence logic not matching the actual site conditions and failing to provide effective protection for workers.
[0143] Specific technical solutions support this approach: During the structured parsing phase of the work plan, this invention extracts information such as the work row type from the electronic work order. In the electronic fence generation process, for section operations, the fence boundary is generated based on the actual conditions of the track and the work requirements, combined with the offset of the track centerline; for station operations, the fence is generated based on the track turnout number and key coordinate information collected on-site. These processes fully consider the characteristics of railway linear engineering, ensuring that the fence logic is closely integrated with the actual site conditions.
[0144] Technical benefits achieved: The generated electronic fence can better adapt to the complex environment of railway lines and meet the actual needs of on-site operations. For example, in curved sections, the fence range can be reasonably adjusted according to the radius and arc length of the curve; in areas with large slopes, factors such as the walking safety of workers can be taken into account, providing more precise and effective protection for workers.
[0145] (4) Closed-loop management: The entire process from planning to fencing, early warning, and handling is recorded online to prevent “paper fences and offline overstepping of boundaries”.
[0146] Overcoming the shortcomings of existing technologies: Existing technologies often suffer from a lack of closed-loop processes in engineering operation management. Planning, fence setting, early warning, and handling may be independent of each other, lacking effective information sharing and coordination mechanisms. This can easily lead to a situation where "fences are on paper, but violations are not detected and dealt with in real-world operations."
[0147] Specific technical support: This invention obtains work information through structured parsing of work plans, generates electronic fences, and uses multi-source positioning fusion verification technology to compare personnel positions with fence boundaries in real time. Once boundary crossing is detected, an audible and visual alarm is immediately triggered and an alert is pushed to the management platform. The entire process, from plan formulation, fence generation, early warning triggering to the implementation of response measures, is recorded and traced online.
[0148] Technical benefits achieved: A closed-loop management system was implemented throughout the entire process, from planning to handling. Managers can monitor the work site in real time through the management platform, promptly identifying and addressing boundary violations. Online record-keeping also provides strong evidence for accident investigations and accountability, improving the standardization and safety of work management.
[0149] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.
Claims
1. A method for identifying trackside work boundary violations based on railway dynamic electronic fence generation, characterized in that, Includes the following steps: Step 1: Structured parsing of work plan: Automatically obtain the electronic work order of the day from the track safety production management system, and extract the work type, start and end mileage, track switch number, work line and work time window from the electronic work order of the day; Step 2, Electronic Fence Generation: Identify section operations and station operations based on the operation type. For section operations, use a coordinate transformation algorithm to convert the kilometer markers in the start and end mileage of the operation into WGS-84 plane coordinates. Based on the operation line and the offset of the line centerline that needs to be extended outward by a set distance for operations adjacent to the operating line, generate the fence boundary to obtain the electronic fence. For station operations, use a coordinate transformation algorithm to convert the railway coordinate information in the station collected by the drone on-site into WGS-84 plane coordinates, and combine the track turnout number to generate the fence boundary to obtain the electronic fence. Step 3, Dynamic Fence Activation and Expansion: Based on the operation time window, add time constraints to the electronic fence to form a dynamic electronic fence with dual temporal and spatial constraints; Step 4, Multi-source positioning fusion verification: Real-time comparison of personnel location with the boundary of the dynamic electronic fence. If personnel cross the boundary, an audible and visual alarm is triggered and an alarm is pushed to the management platform.
2. The method for identifying boundary violations in upstream operations according to claim 1, characterized in that, In step 2, converting the kilometer markers in the start and end mileage of the operation into WGS-84 plane coordinates using a coordinate transformation algorithm includes: calculating the position of the kilometer markers in the start and end mileage of the operation in WGS-84 plane coordinates using a direct query mode or a dynamic difference mode coordinate calculation method; The direct query mode involves matching the GPS coordinate database of the route using SQL. The dynamic difference mode uses known mileages on both sides of the start and end mileages and the coordinates corresponding to those known mileages to allocate coordinate differences according to the mileage ratio.
3. The method for identifying boundary violations in upstream operations according to claim 1, characterized in that, In step 2, the coordinate transformation algorithm is used to convert the railway coordinate information collected by the UAV on site into WGS-84 plane coordinates. This includes: collecting the coordinate data of turnout points, track points, and track segment endpoints using BeiDou positioning from the UAV on site, projecting and calibrating the coordinate data to calibrate it to the railway centerline, and then dividing the railway line collected by the UAV into sections and marking the track turnouts using the calibrated points.
4. The method for identifying boundary violations in upstream operations according to claim 3, characterized in that, In step 2, the projection calibration is as follows: P_calibrated = P_original + (P_centerline - P_original) × k; Where P_calibrated is the calibrated point position, P_original is the original acquisition point position, P_centerline is the railway centerline reference point position, and k is the dynamic weighting coefficient, which is adjusted based on the curvature of the railway centerline.
5. The method for identifying boundary crossings in upstream operations according to claim 3, characterized in that, In step 2, the railway line collected by the UAV is segmented and track turnouts are marked by calibrated points. This includes: determining the spatial topological relationship between turnout points and track points using the Haversine formula and the spatial topological constraint equation of the relationship between points and line segments; and dynamically segmenting the track line and identifying turnouts using the point projection ratio formula on the line segment and the dynamic segmentation threshold adjustment model.
6. The method for identifying boundary violations in upstream operations according to claim 5, characterized in that, In step 2, the spatial topological constraint equation for the membership relationship between points and line segments is: (P x -P 1x )(P 2y -P 1y )-(P y -P 1y )(P 2x -P 1x )=0; min(P 1x ,P 2x )≤P x ≤max(P 1x ,P 2x ); min(P 1y ,P 2y )≤P y ≤max(P 1y ,P 2y ); Among them, (P) 1x ,P 1y ) and (P 2x ,P 2y (P) represents the coordinates of the two endpoints of the track segment. x ,P y ) represents the coordinates of the turnout point.
7. The method for identifying boundary violations in upstream operations according to claim 1, characterized in that, In step 4, the real-time comparison of personnel location with the boundary of the dynamic electronic fence, and the triggering of an audible and visual alarm and the push of an alarm to the control platform if personnel cross the boundary, includes: comparing personnel location with the boundary of the dynamic electronic fence in real time according to the Beidou positioning terminal, and triggering an audible and visual alarm and pushing an alarm to the control platform if personnel intrude into the adjacent line or exceed the work endpoint.
8. The method for identifying boundary violations in upstream operations according to claim 7, characterized in that, In step 4, a ray intersection algorithm is used to determine whether a person has intruded into an adjacent line or exceeded the work endpoint. The ray intersection algorithm is as follows: the number of intersections between the horizontal ray to the right of the person's coordinate point and the polygonal edge formed by the electronic fence is calculated. If the number of intersections is odd, the person is inside the electronic fence.
9. The method for identifying boundary violations in upstream operations according to claim 8, characterized in that, In step 4, when the difference between the coordinates of the person's coordinates and the coordinates of the vertices of the polygon formed by the electronic fence is less than a set threshold, the person's coordinates are on the vertex of the polygon. If the number of intersections is odd, the person is inside the electronic fence.
10. The method for identifying boundary violations in upstream operations according to claim 8, characterized in that, In step 4, when calculating the number of intersections between the horizontal ray to the right of the personnel's coordinate point and the polygonal edge formed by the electronic fence, the calculated intersections are evaluated for point equivalence. Points that are evaluated as equivalent are merged into the same point and recorded as one intersection point.