Railway construction video risk source identification method based on deep learning

CN122694221APending Publication Date: 2026-09-04STARDUST TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611170147.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-04
Publication Date
2026-09-04

AI Technical Summary

Technical Problem

[0004]然而,现有检测方法仅根据施工对象的当前状态判断风险,难以结合对象尺寸、动作状态和历史运动轨迹预测其未来占用空间,因而无法提前识别机械转动、材料吊运或人员移动可能形成的空间侵入风险

Benefits of technology

[0016]The beneficial effects of this invention are as follows: By acquiring continuous construction videos and construction constraint data of railway construction sections, this invention correlates the changes in the movement of construction objects with line closures, overhead contact line power supply, and construction protection status to determine the current construction stage, enabling risk assessment to adapt to changes in safety requirements at different construction stages. By extracting the rail structure from the continuous construction videos, a track-following coordinate system is established based on the rail centerline and preset track gauge. The train clearance, overhead contact line safety distance, and construction protection boundary are mapped to a unified track space, generating a stage risk constraint field corresponding to the current construction stage, avoiding reliance solely on fixed areas in the video footage for risk assessment. Furthermore, a deep learning model is used to identify construction objects, their movement states, and trajectories. Combined with object dimensions, the space that may be occupied within a preset time period is predicted, forming a dynamic risk envelope. Further analysis of the overlap between the dynamic risk envelope and the stage risk constraint field, as well as the relative movement relationships between different construction objects, calculates the overall risk value. Based on the overall risk value and a preset risk threshold, risk events are determined, and the main risk source is identified from the relevant construction objects, resulting in a risk source identification result containing the risk object and its corresponding location. This achieves early judgment of potential construction risks and location of the main risk source.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122694221A_ABST
    Figure CN122694221A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of construction risk identification, in particular to a railway construction video risk source identification method based on deep learning, which determines the current construction stage by acquiring continuous construction videos and construction constraint data of the railway construction section; extracts the rail structure in the video, establishes a line follow-up coordinate system according to the rail center line and the preset track gauge, maps the train limit, the contact net safety distance and the construction protection boundary to the coordinate system, and generates a stage risk constraint field; identifies the construction object, action state and motion trajectory through a deep learning model, predicts the occupied space of the object in a future preset period according to the object size, and generates a dynamic risk envelope; calculates the overall risk value according to the overlapping relationship between the dynamic risk envelope and the stage risk constraint field and the relative motion relationship between the construction objects, determines the risk event, and further determines the main risk source and its corresponding position, thereby realizing the advance identification of potential risks in railway construction and the positioning of the main risk source.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of construction risk identification technology, and more particularly to a method for identifying risk sources in railway construction videos based on deep learning. Background Technology

[0002] Railway line maintenance, equipment installation, material hoisting, and overhead contact line repair are typically carried out in long, narrow sections of railway lines with dense equipment. The construction site simultaneously contains construction personnel, machinery, tools and materials, rail structures, overhead contact lines, and safety protection facilities, all of which are in continuous motion and operational connection. Construction safety risks are easily generated when construction objects encroach on the train clearance, approach the safety range of the overhead contact line, cross the construction protection boundary, or form dangerous relative movements with other construction objects.

[0003] Currently, railway construction sites primarily rely on manual inspections, video surveillance, and image recognition-based safety detection methods for risk monitoring. Some detection methods identify construction personnel, machinery, and materials, and use fixed electronic fences within video feeds to determine whether construction objects have entered pre-defined areas. These methods can identify visible anomalies such as the lack of protective equipment, personnel crossing boundaries, and machinery intrusion.

[0004] However, existing detection methods assess risk based solely on the current state of the construction object, making it difficult to predict its future space occupation by combining the object's size, operational status, and historical movement trajectory. Consequently, they cannot identify in advance the space intrusion risks that may arise from mechanical rotation, material hoisting, or personnel movement. In scenarios where multiple objects are operating simultaneously, existing methods typically only output abnormal objects or risk areas, making it difficult to distinguish between the construction object causing the risk and the objects affected by it. Furthermore, it is difficult to identify the primary risk source with the greatest impact on the overall risk, resulting in incomplete risk warnings. Summary of the Invention

[0005] To address the aforementioned problems, this invention provides a method for identifying risk sources in railway construction videos based on deep learning.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A method for identifying risk sources in railway construction videos based on deep learning includes the following steps: Obtain continuous construction videos and construction constraint data of the railway construction section, and determine the current construction stage based on the changes in the movement of the construction object, as well as the status of line closure, overhead contact line power supply, and construction protection. Extract the rail structure from the continuous construction video, establish a track follow-up coordinate system based on the rail centerline and preset track gauge, and map the traffic clearance, catenary safety distance and construction protection boundary corresponding to the current construction stage to the track follow-up coordinate system to generate a stage risk constraint field; The construction object, action state, and movement trajectory are identified by a deep learning model. The construction object is mapped to the line's follow-up coordinate system, and a dynamic risk envelope for a future preset time period is generated based on the object size, action state, and movement trajectory. The overall risk value is calculated based on the overlap between the dynamic risk envelope and the stage risk constraint field, as well as the relative motion between the construction objects. Risk events are determined based on the overall risk value and the preset risk threshold, and the main risk sources are determined based on the dynamic risk envelope and the stage risk constraint field, thus obtaining the risk source identification results.

[0007] Furthermore, determining the current construction stage includes the following steps: Extract the action status, action occurrence time, and action transition sequence of the construction object according to the preset time window to form an action change sequence; Based on the correspondence between construction stages and key actions in the construction plan, the matching degree between the action change sequence and each construction stage is calculated to determine the candidate construction stage. Based on the status of line closure, overhead contact line power supply, and construction protection, candidate construction stages that do not meet safety rules are eliminated, and the remaining candidate construction stage with the highest matching degree is determined as the current construction stage.

[0008] Furthermore, the step of extracting the rail structure from the continuous construction video and establishing a track-following coordinate system based on the rail centerline and the preset track gauge includes the following steps: Extract the edges of the paired extending rails from the continuous construction video and perform curve fitting to obtain the center lines of the left and right rails; Multiple sets of corresponding sampling points are selected along the center lines of the left and right rails. Based on the image distance between each set of sampling points and the preset track gauge, the scale transformation relationship of different line positions is determined, and the line center line is fitted based on the midpoint of each set of sampling points. Using the reference point on the centerline of the track as the origin, the arc length along the centerline of the track, the normal distance from the target to the centerline of the track, and the height of the target relative to the rail surface are used as the longitudinal coordinate, the lateral coordinate, and the height coordinate, respectively, to establish the track following coordinate system.

[0009] Furthermore, the process of mapping the traffic clearance, overhead contact line safety distance, and construction protection boundary corresponding to the current construction stage to the line's servo coordinate system to generate a stage risk constraint field includes: Based on the safety rules corresponding to the current construction stage, the outline of the traffic clearance, the location and safety distance of the overhead contact line and the construction protection points are extracted and transformed into the track follow-up coordinate system to obtain the corresponding constraint boundary coordinate set. The line-following coordinate space is divided into grids, and the shortest distance and internal / external positional relationship between each grid and each constraint boundary coordinate set are calculated to obtain the grid constraint characteristics. Based on the safety rules corresponding to the current construction stage, the grid constraint features are converted into constraint types and risk weights, and written into the corresponding grid to generate a stage risk constraint field.

[0010] Furthermore, the step of identifying the construction object, its action state, and its trajectory using a deep learning model, and mapping the construction object to the line's following coordinate system, includes: Continuous construction video frames are input into the Mask R-CNN multi-task model, multi-scale image features are extracted through the ResNet backbone network and feature pyramid, and candidate object regions are determined through the region generation network. The candidate object regions are classified and bounding box regression is performed to obtain the category and location of the construction object. The object contour is extracted by mask branching, and the key points of human joints and moving parts of construction machinery are extracted by key point branching. The same construction object in adjacent video frames is associated with the object category, contour overlap and feature distance. The motion state is determined by the key point angle, displacement direction and movement speed to obtain the image motion trajectory. The object outline, key points, and image motion trajectory are transformed into the line follow coordinate system to obtain the spatial position, object size, action status, and motion trajectory of the construction object.

[0011] Furthermore, the generation of a dynamic risk envelope for a future preset time period based on object size, action state, and motion trajectory includes: Extract the trajectory points of the construction object within the current time window, calculate the motion speed, direction of motion, and acceleration, and determine the motion mode of the object in combination with the motion state; The future time period is divided according to the preset time interval. Based on the current position, speed, acceleration and movement mode of the construction object, the position and attitude of the object at the preset future time are calculated. Based on the object size and object outline, the object occupancy space is constructed at each predicted location, and the object occupancy space is expanded according to the motion speed and trajectory prediction error to obtain the risk envelope at each future time. By connecting the risk envelopes of adjacent future moments in chronological order, a dynamic risk envelope containing the predicted time, spatial range, and direction of motion is obtained.

[0012] Furthermore, the step of calculating the object's position and attitude at a preset future time based on the object's current position, speed, acceleration, and motion mode includes: Fit the trajectory points and key points within the current time window to determine the current position, speed, acceleration, attitude angle, and attitude change rate of the construction object; Based on the movement mode of the construction object, the construction object is divided into stationary object, translational object, rotational object, or a combination of translation and rotational object; Calculate the position of the translating object at each preset future time based on the current position, direction of motion, speed of motion, and acceleration; calculate the attitude of the rotating object at each preset future time based on the current attitude angle, direction of attitude change, and speed of attitude change. The position and orientation changes of the combined translation and rotation objects are superimposed, and the calculation results are corrected according to the object size, joint range of motion, or mechanical range of motion to obtain the object position and orientation at each preset future time.

[0013] Furthermore, based on the overlap between the dynamic risk envelope and the stage risk constraint field, as well as the relative motion relationships between the construction objects, the overall risk value is calculated as follows: According to the predicted time sequence, the dynamic risk envelope of each construction object is matched with the stage risk constraint field to determine the overlapping constraint grids, the earliest overlap time, and the number of overlapping grids. The constraint overlap risk value of each construction object is determined based on the proportion of the number of overlapping grids to the number of grids covered by the dynamic risk envelope, the risk weight of the overlapping grids, and the earliest overlap time. Based on the positions of different construction objects at each predicted time, calculate the minimum relative distance, relative speed and the time when the minimum relative distance is reached between the objects, and determine the relative motion risk value of the objects. The risk values ​​of overlapping constraints and relative motion of objects are normalized and weighted according to the risk weights corresponding to the current construction stage to obtain the overall risk value.

[0014] Furthermore, the risk sources identified based on the dynamic risk envelope and stage-specific risk constraint field include: Construction objects whose dynamic risk envelope overlaps with the constraint grid, as well as construction objects whose predicted distance from other construction objects is less than the preset safety distance, are identified as candidate risk sources. Based on the safety rules corresponding to the current construction phase, the action status and movement trajectory of each candidate risk source are adjusted to a safe state, and the corresponding dynamic risk envelope is regenerated. By recalculating the constraint overlap risk value, the object relative motion risk value, and the overall risk value using the adjusted dynamic risk envelope, the decrease in the overall risk value before and after the adjustment is determined as the risk contribution value of the corresponding candidate risk source. The candidate risk source with the largest risk contribution value is identified as the main risk source.

[0015] Furthermore, the risk source identification results include the main risk source, the threatened object, and the corresponding location.

[0016] The beneficial effects of this invention are as follows: By acquiring continuous construction videos and construction constraint data of railway construction sections, this invention correlates the changes in the movement of construction objects with line closures, overhead contact line power supply, and construction protection status to determine the current construction stage, enabling risk assessment to adapt to changes in safety requirements at different construction stages. By extracting the rail structure from the continuous construction videos, a track-following coordinate system is established based on the rail centerline and preset track gauge. The train clearance, overhead contact line safety distance, and construction protection boundary are mapped to a unified track space, generating a stage risk constraint field corresponding to the current construction stage, avoiding reliance solely on fixed areas in the video footage for risk assessment. Furthermore, a deep learning model is used to identify construction objects, their movement states, and trajectories. Combined with object dimensions, the space that may be occupied within a preset time period is predicted, forming a dynamic risk envelope. Further analysis of the overlap between the dynamic risk envelope and the stage risk constraint field, as well as the relative movement relationships between different construction objects, calculates the overall risk value. Based on the overall risk value and a preset risk threshold, risk events are determined, and the main risk source is identified from the relevant construction objects, resulting in a risk source identification result containing the risk object and its corresponding location. This achieves early judgment of potential construction risks and location of the main risk source. Attached Figure Description

[0017] Figure 1 This is a flowchart of the steps of a method for identifying risk sources in railway construction videos based on deep learning, as described in this invention.

[0018] Figure 2 This is a flowchart illustrating the steps in this invention to calculate the overall risk value based on the overlap between the dynamic risk envelope and the stage risk constraint field, as well as the relative motion relationship between the construction objects.

[0019] Figure 3 This is a flowchart of the steps in this invention to determine the risk source based on the dynamic risk envelope and the stage risk constraint field. Detailed Implementation

[0020] Please see Figures 1-3 As shown, this invention relates to a method for identifying risk sources in railway construction videos based on deep learning.

[0021] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0022] This invention includes a method for identifying risk sources in railway construction videos based on deep learning, comprising the following steps: S1. Obtain continuous construction videos and construction constraint data of the railway construction section, and determine the current construction stage based on the changes in the movement of the construction object, as well as the status of line closure, catenary power supply, and construction protection. The continuous construction video refers to a sequence of video frames continuously captured by fixed cameras, mobile cameras, or cameras mounted on construction machinery located in the railway construction area. The construction constraint data includes the construction plan, line closure status, overhead contact line power supply status, construction protection deployment information, line structure parameters, and safety rules corresponding to different construction stages.

[0023] Changes in actions are primarily used to assess construction progress, such as key actions like machinery arrival, material hoisting, equipment installation, and site cleanup, and their sequence of transitions, rather than for directly assessing risks. By considering both video actions and construction constraints simultaneously, it's possible to avoid judging construction stages solely based on planned construction times or single actions, ensuring that subsequent safety rules correspond to the actual construction conditions on site.

[0024] S2. Extract the rail structure from the continuous construction video, establish a track follow-up coordinate system based on the rail centerline and preset track gauge, and map the traffic clearance, catenary safety distance and construction protection boundary corresponding to the current construction stage to the track follow-up coordinate system to generate a stage risk constraint field. The rail structure includes at least the edges of the left and right rails, their extension direction, and the position of the rail surface. The preset track gauge is the actual designed distance between the two rails of the current construction line, used to convert the pixel distance in the video into the actual spatial distance. The track-following coordinate system is a spatial coordinate system established according to the extension direction and curvature of the track, wherein the longitudinal position is represented by the arc length along the centerline of the track, the lateral position is represented by the normal distance from the construction object to the centerline of the track, and the height position is represented by the distance of the construction object relative to the rail surface.

[0025] Specifically, paired extended rail edges are extracted and curve-fitted to obtain the centerlines of the left and right rails. Multiple sets of corresponding sampling points are selected along these centerlines. Based on the image distance between each set of sampling points and the preset track gauge, the scale transformation relationship for different track positions is determined. The midpoint of each set of corresponding sampling points is taken and fitted to obtain the track centerline. In practical applications, the camera's installation height, shooting angle, and calibration parameters can be combined to correct the impact of video perspective changes on spatial position conversion. The stage risk constraint field is equivalent to a spatial risk map that changes with the track structure and construction stage, where each grid records its corresponding safety restrictions and risk level.

[0026] By establishing a line-following coordinate system, the pixel distances at different distances in the video can be uniformly converted into the actual line spatial distances; by generating a stage risk constraint field, spatial deviations caused by using fixed video electronic fences can be avoided, and the risk boundaries can be adjusted according to the safety rules corresponding to the current construction stage.

[0027] S3. Identify construction objects, action states, and motion trajectories through a deep learning model, map the construction objects to the line's following coordinate system, and generate a dynamic risk envelope for a future preset time period based on the object size, action state, and motion trajectory. It should be noted that the construction objects include construction personnel, construction machinery, tools, and construction materials. The action state is used to characterize the current actions performed by the construction objects, such as personnel moving, bending over, and carrying; construction machinery translating, lifting, rotating, or stopping; and materials being hoisted, moved, or placed. The dynamic risk envelope refers to the continuous spatial range that the construction objects may occupy or affect within a preset future time period.

[0028] Based on the scale transformation relationship determined in S2, the object contour, key points, and motion trajectory are transformed into the track-following coordinate system. For construction objects moving along the track surface, the spatial coordinates can be determined based on the contact position between the contour and the track surface; for moving parts such as robotic arms that are higher than the track surface, their height position can be determined by combining the key points of the moving parts, the object dimensions, and the camera calibration parameters.

[0029] Further, trajectory points within the current time window are extracted, and the movement speed, direction, and acceleration of the construction object are calculated. Combined with the motion state, it is determined whether the motion is static, translational, rotational, or a combination of translation and rotation. The object's position and attitude at future times are calculated according to preset time intervals. At each predicted position, the object's occupied space is constructed based on its size and outline, and expanded outwards according to the movement speed and trajectory prediction error. The object's occupied space at adjacent predicted times is connected in chronological order to obtain a dynamic risk envelope.

[0030] S4. Calculate the overall risk value based on the overlap between the dynamic risk envelope and the stage risk constraint field, as well as the relative motion relationship between the construction objects. Specifically, following the predicted time sequence, the dynamic risk envelope of each construction object is matched with the stage risk constraint field to determine the overlapping constraint grids, the earliest overlap time, and the number of overlapping grids. Based on the proportion of overlapping grids to the total number of grids covered by the dynamic risk envelope, the risk weight of the overlapping grids, and the earliest overlap time, the constraint overlap risk value for the corresponding construction object is determined. A higher overlap ratio, a higher risk weight for the constraint grids, or a earliest overlap time closer to the current time result in a higher constraint overlap risk value.

[0031] Simultaneously, based on the positions of different construction objects at each predicted time, the relative distance and relative velocity between any two construction objects are calculated to determine the minimum relative distance within a preset time period and the time when the minimum relative distance is reached. When the relative distance between two construction objects continues to decrease, and the predicted minimum relative distance is less than the corresponding safe distance, a relative motion risk value for the objects is generated.

[0032] The risk values ​​of constraint overlap and relative motion of each construction object are normalized and weighted according to the risk weights corresponding to different constraint types under the current construction stage to obtain the overall risk value. The overall risk value is used to comprehensively characterize the risk level of spatial intrusion or object motion conflict in the current construction scenario within a preset time period in the future, thereby avoiding the generation of risk alarms based on a single object or a single abnormal condition.

[0033] S5. Determine risk events based on the overall risk value and preset risk thresholds, and determine the main risk sources based on the dynamic risk envelope and stage risk constraint field to obtain the risk source identification results.

[0034] Specifically, the corresponding trigger action is determined based on the earliest time the main risk source enters the constraint grid or the time when it reaches the minimum relative distance with other objects; the facilities corresponding to the overlapping constraint areas or the construction objects that form dangerous relative motion with the main risk source are identified as threatened objects; the corresponding line position is determined based on the longitudinal coordinates of the corresponding overlapping position or minimum relative distance position in the line follow-up coordinate system, and finally the risk source identification results including the main risk source, threatened objects and corresponding positions are obtained.

[0035] This solution establishes a continuous processing flow by defining construction phases, unifying line space, predicting future space occupancy, calculating overall risks, and tracing back to the main risk sources. This allows for the analysis of construction objects, line safety boundaries, and construction status in the video under unified spatial and temporal conditions. It can not only determine whether there are risks in the current construction scenario but also identify risk development trends in advance. Furthermore, it can identify the main risk source with the greatest impact on risk events from multiple related construction objects, providing clear object and location information for on-site risk management.

[0036] Further, in step S1, determining the current construction stage includes the following steps: Extract the action status, action occurrence time, and action transition sequence of the construction object according to the preset time window to form an action change sequence; Based on the correspondence between construction stages and key actions in the construction plan, the matching degree between the action change sequence and each construction stage is calculated to determine the candidate construction stage. Based on the status of line closure, overhead contact line power supply, and construction protection, candidate construction stages that do not meet safety rules are eliminated, and the remaining candidate construction stage with the highest matching degree is determined as the current construction stage.

[0037] In some embodiments, the continuous construction video and construction constraint data are first synchronized in time, and the continuous construction video is divided according to a preset time window. Video frames within each time window are input into a pre-trained 3D convolutional neural network model. The model extracts contour changes, position changes, and local motion features of the construction object through 3D convolution, identifying the object's category, location, and action state. Action states with an action confidence level reaching a preset threshold and continuously maintained for a preset number of frames are defined as valid action states, and the moment this action state first appears is defined as the action occurrence time. The same construction object in adjacent video frames is associated based on object category, positional overlap, and feature similarity. Its valid action states are arranged chronologically to form an action change sequence containing the action state, action occurrence time, and action transition order.

[0038] Furthermore, a correspondence between construction stages and key actions is established based on the construction plan, specifying the key action category, sequence, and duration range for each construction stage. The sequence of action changes is compared with the key actions corresponding to each construction stage. The stage matching degree is determined based on the hit rate of key actions, the consistency of action sequence, and the consistency of action duration. Construction stages with a stage matching degree reaching a preset matching threshold are identified as candidate construction stages.

[0039] To make the matching process during construction phases calculable, the degree of action hit, the degree of consistency in action sequence, and the degree of consistency in action duration are denoted as H, O, and T, respectively. The matching degree of the k-th construction phase is determined by the following formula: ; in, Let be the matching degree of the k-th construction stage; This is the ratio of the number of identified key actions to the total number of key actions in this phase. The longest order-preserving matching ratio between the sequence of action changes and the preset sequence of actions; The percentage of actions whose duration falls within a preset time range; and The weights are non-negative. In this embodiment, they can be 0.5, 0.3, and 0.2 respectively, and 0.60 can be set as the candidate stage matching threshold.

[0040] The system retrieves the line closure status, overhead contact line power supply status, and construction protection status corresponding to the current time window, and compares them with the safety rules corresponding to each candidate construction stage. These safety rules define the permissible line closure status, overhead contact line power supply status, and construction protection deployment status for different construction stages. Candidate construction stages that do not meet the corresponding safety rules are excluded, and the remaining candidate construction stage with the highest stage matching degree is determined as the current construction stage.

[0041] For example, when the sequence of actions includes rail cutting, old rail separation, and old rail hoisting, this sequence has the highest degree of matching with the old rail removal stage. If the current line closure and construction protection status simultaneously meet the safety rules corresponding to the old rail removal stage, then the old rail removal stage is determined as the current construction stage. By jointly judging the sequence of actions and the construction constraint status, the construction stage can be avoided by determining the construction stage based solely on a single action or the construction schedule time, providing a stage basis for subsequently invoking the corresponding safety rules.

[0042] Furthermore, the step of extracting the rail structure from the continuous construction video and establishing a track-following coordinate system based on the rail centerline and the preset track gauge includes the following steps: Extract the edges of the paired extending rails from the continuous construction video and perform curve fitting to obtain the center lines of the left and right rails; Multiple sets of corresponding sampling points are selected along the center lines of the left and right rails. Based on the image distance between each set of sampling points and the preset track gauge, the scale transformation relationship of different line positions is determined, and the line center line is fitted based on the midpoint of each set of sampling points. Using the reference point on the centerline of the track as the origin, the arc length along the centerline of the track, the normal distance from the target to the centerline of the track, and the height of the target relative to the rail surface are used as the longitudinal coordinate, the lateral coordinate, and the height coordinate, respectively, to establish the track following coordinate system.

[0043] Specifically, firstly, lens distortion correction, grayscale normalization, and edge enhancement are performed on continuous construction video frames to extract candidate edge points with continuous extension characteristics. Based on the continuity, extension direction, and paired distribution relationship of the rail edges, non-rail edges such as sleepers and cables are excluded, and inner and outer edge points belonging to the same rail are paired. The midpoint of the corresponding positions of the inner and outer edges is taken as the rail center point. Abnormal center points are eliminated using a random sampling consensus algorithm, and then spline curves are used for fitting to obtain the center lines of the left and right rails.

[0044] Multiple sets of sampling points are selected along the centerlines of the left and right rails at preset sampling intervals. For straight sections, corresponding sampling points on the left and right sides can be selected based on the same image height; for curved sections, corresponding sampling points are selected along the normal to the direction of the track extension. The image distance between each set of corresponding sampling points is calculated and compared with the preset track gauge in the construction constraint data to determine the scale transformation relationship between the pixel distance corresponding to the track position and the actual distance. The scale transformation relationship of adjacent track positions is interpolated to obtain a scale transformation relationship that changes continuously along the direction of the track extension, in order to correct the difference in distance scale caused by video perspective.

[0045] The scaling coefficients at the sampling points corresponding to the i-th group can be calculated using the following formula: ; in, is the scale transformation coefficient at the i-th sampling point, in meters per pixel; G is the preset track gauge, in meters; The distance between corresponding sampling points on the left and right sides is expressed in pixels. Adjacent k_i are scaled using piecewise linear interpolation to form a scale function that continuously varies along the longitudinal direction of the line, thereby converting the image position to the actual spatial position of the line.

[0046] Furthermore, the midpoint of the corresponding sampling points on the left and right sides of each group is taken as the center sampling point of the line, and curve fitting is performed on the center sampling point of the line according to the line extension order to obtain the line centerline. A sampling point with a known line position on the line centerline is selected as the reference point and set as the origin of the coordinate system; the arc length calculated from the reference point along the line centerline is used as the longitudinal coordinate, the normal distance from the target point to the line centerline is used as the transverse coordinate, and the vertical distance of the target point relative to the rail surface jointly determined by the left and right rails is used as the height coordinate, thereby establishing the line follow-up coordinate system.

[0047] The horizontal coordinates can be assigned different symbols depending on whether the target is located to the left or right of the track centerline, while the vertical coordinates change continuously with the curvature of the track centerline, and the height direction is perpendicular to the track surface. This method converts pixel positions in the video into uniform track spatial positions, reducing the impact of track curvature and video perspective changes on distance judgment.

[0048] Furthermore, the process of mapping the traffic clearance, overhead contact line safety distance, and construction protection boundary corresponding to the current construction stage to the line's servo coordinate system to generate a stage risk constraint field includes: Based on the safety rules corresponding to the current construction stage, the outline of the traffic clearance, the location and safety distance of the overhead contact line and the construction protection points are extracted and transformed into the track follow-up coordinate system to obtain the corresponding constraint boundary coordinate set. The line-following coordinate space is divided into grids, and the shortest distance and internal / external positional relationship between each grid and each constraint boundary coordinate set are calculated to obtain the grid constraint characteristics. Based on the safety rules corresponding to the current construction stage, the grid constraint features are converted into constraint types and risk weights, and written into the corresponding grid to generate a stage risk constraint field.

[0049] In some embodiments, the train clearance section, the spatial location of the overhead contact system and its safety distance threshold, and the location of construction protection points are first read from the safety rules of the current construction phase. The train clearance is a spatial outline that should remain unobstructed along the track direction; the overhead contact system safety boundary is a spatial boundary formed by extending outwards according to the corresponding safety distance, based on the overhead contact system line position and support parts; the construction protection boundary is formed by sequentially connecting protective signs, isolation facilities, or electronic protection points. The three types of boundaries are then transformed to the track-following coordinate system to obtain the constraint boundary coordinate sets. , where c represents the constraint type.

[0050] The coordinate space of the line tracking is discretized along the vertical, horizontal, and height directions. In this embodiment, the vertical grid length can be set to 0.25m, and the horizontal and height grid lengths can be set to 0.20m; the grid size can be increased accordingly when the camera is far away or the target size is large. The coordinates of the center of the j-th grid are used as the reference. For the calculation point, the nearest distance between it and the c-th type of constraint boundary is determined by the following formula: ; in, b is the shortest distance from the j-th grid to the c-th constraint boundary; The boundary points within the curve. Further determination is made by counting ray intersections or using the normal to the closed surface. Whether it is located inside or outside the constraint boundary is determined by negative values ​​to indicate inside the boundary and positive values ​​to indicate outside the boundary, forming the directed boundary distance.

[0051] For each grid, the constraint type, directed boundary distance, and risk weight are written. The risk weight ranges from 0 to 1 and is determined by the safety rules of the current construction stage; for example, the basic weights of the overhead contact line constraint, traffic clearance constraint, and construction protection constraint can be set to 1.0, 0.8, and 0.6, respectively. When the same grid corresponds to multiple constraints, the characteristics of each constraint are retained, and the largest risk weight is used as the main risk weight of that grid, thus forming a stage risk constraint field with multiple constraints superimposed.

[0052] By continuously writing boundary type, boundary distance, and stage risk weight into the spatial grid, it is possible not only to determine whether the dynamic risk envelope crosses the boundary, but also to determine the overlapping position, overlapping depth, and corresponding constraint type, thus avoiding binary boundary judgment based solely on a fixed image region.

[0053] Furthermore, the step of identifying the construction object, its action state, and its trajectory using a deep learning model, and mapping the construction object to the line's following coordinate system, includes: Continuous construction video frames are input into the Mask R-CNN multi-task model, multi-scale image features are extracted through the ResNet backbone network and feature pyramid, and candidate object regions are determined through the region generation network. The candidate object regions are classified and bounding box regression is performed to obtain the category and location of the construction object. The object contour is extracted by mask branching, and the key points of human joints and moving parts of construction machinery are extracted by key point branching. The same construction object in adjacent video frames is associated with the object category, contour overlap and feature distance. The motion state is determined by the key point angle, displacement direction and movement speed to obtain the image motion trajectory. The object outline, key points, and image motion trajectory are transformed into the line follow coordinate system to obtain the spatial position, object size, action status, and motion trajectory of the construction object.

[0054] In some embodiments, the Mask R-CNN multi-task model uses ResNet-50 as the backbone network and fuses construction object features at different resolutions through a feature pyramid. Training samples are extracted from railway construction videos at preset frame intervals, and the categories, detection boxes, pixel-level contours, and key points of the construction objects are labeled. Key points for personnel include shoulders, elbows, wrists, hips, knees, and ankles; key points for construction machinery include the machine base, shafts, connecting points of the movable arm, and the end effector. The samples are divided into training, validation, and test sets according to video segments, with a ratio of 8:1:1. The shorter side of the sample images is scaled to 800 pixels, and the longer side is limited to 1333 pixels. The images are then normalized and randomly enhanced with scaling ratios of 0.8–1.2, rotation angles of -5°–5°, and brightness ratios of 0.8–1.2. A feature extraction network was constructed using ResNet-50 and a feature pyramid. The anchor box size of the region generation network was set to 32, 64, 128, 256 and 512 pixels, and the aspect ratio was set to 0.5, 1 and 2. Samples with an intersection-union ratio (IU) of anchor boxes and ground truth detection boxes of not less than 0.7 were defined as positive samples, and samples with an IU of not more than 0.3 were defined as negative samples. Load the pre-training parameters, freeze the first two levels of the ResNet-50 network and train the region generation network, classification branch, bounding box branch, mask branch and keypoint branch for 10 training epochs, then unfreeze and train them together for 40 training epochs; use the stochastic gradient descent optimizer, set the batch size to 2, the momentum to 0.9, the weight decay coefficient to 0.0001, the first stage learning rate to 0.001, and the second stage learning rate to 0.0001.

[0055] The multi-task loss during model training is determined by the following formula: ; Where L is the total model loss; and These are object classification loss, bounding box regression loss, mask loss, and keypoint regression loss, respectively. and In this embodiment, the corresponding loss weights can be set to 1.0, 1.0, and 0.5, respectively. The training stopping condition is that the validation set loss no longer decreases for five consecutive training epochs.

[0056] During model inference, candidate objects with a detection confidence of at least 0.65 are retained, and non-maximum suppression with an intersection-union ratio (IU) threshold of 0.50 is used to remove duplicate detection boxes. For keypoints with a confidence of at least 0.60, their positions are retained for action determination; keypoints with insufficient confidence are compensated by interpolation based on the positions of the same keypoint in consecutive video frames.

[0057] Between adjacent video frames, an object association cost is established based on object category, mask cross-union ratio, appearance feature distance, and center point displacement. The mask cross-union ratio, appearance feature distance, and center point displacement are then combined with weights of 0.45, 0.35, and 0.20. Objects whose association cost meets a preset threshold are assigned the same object identifier, and their center points or track contact points are connected over time to form the image motion trajectory.

[0058] For construction workers, movement, bending, and carrying actions are identified based on the angles and displacement changes between human joints such as the shoulder, elbow, wrist, hip, and knee. For construction machinery, lifting, lowering, rotating, and stopping actions are identified based on the angles between key points at the root, pivot, and end effector of the robotic arm, as well as the direction and speed of the end effector displacement. An action state that is maintained continuously for five or more frames is considered the current valid action state.

[0059] During coordinate mapping, the lowest point of the object mask or the key point in contact with the track surface is used as the planar positioning point, and the longitudinal and lateral coordinates are determined using the scale transformation relationship; the height coordinate is determined based on the projection height of the key point relative to the track surface, the camera calibration parameters, and the prior object size. The maximum span of the object mask in the three coordinate directions is taken as the object size, and the track coordinates of the same object at different times are connected in time to obtain the motion trajectory in the track follower coordinate system.

[0060] Furthermore, the generation of a dynamic risk envelope for a future preset time period based on object size, action state, and motion trajectory includes: Extract the trajectory points of the construction object within the current time window, calculate the motion speed, direction of motion, and acceleration, and determine the motion mode of the object in combination with the motion state; The future time period is divided according to the preset time interval. Based on the current position, speed, acceleration and movement mode of the construction object, the position and attitude of the object at the preset future time are calculated. Based on the object size and object outline, the object occupancy space is constructed at each predicted location, and the object occupancy space is expanded according to the motion speed and trajectory prediction error to obtain the risk envelope at each future time. By connecting the risk envelopes of adjacent future moments in chronological order, a dynamic risk envelope containing the predicted time, spatial range, and direction of motion is obtained.

[0061] In some embodiments, the motion trajectory within 2 seconds prior to the current moment is selected as the historical trajectory window, and Kalman filtering is used to eliminate positional abrupt changes caused by detection box jitter and short-term occlusion. The future preset time period can be set to 3 seconds, and the prediction time interval can be set to 0.2 seconds, thereby obtaining 15 future prediction times; for construction machinery with high movement speed, the prediction time interval can be shortened to 0.1 seconds.

[0062] The foundation space is established based on the type and size of the construction object. Construction workers can be represented by an ellipsoid enclosing their bodies, construction machinery can be represented by a combination of a body enclosure and enclosures for moving parts, and construction materials can be represented by a cuboid covering the material outline. At each predicted future location, the foundation space is translated and rotated according to the predicted posture to form the object space at the corresponding moment.

[0063] To cover the range of trajectory prediction errors and the additional effects of object movements, an extended distance that varies with the motion state is set outside the space occupied by the object. This extended distance is determined by the following formula: ; in, Let be the expansion distance of the i-th construction object at a future time t; The basic safety margin corresponding to the object category; The modulus for predicting velocity; The root mean square prediction error of the trajectory model within the historical window; and These are the speed correction factor and the error correction factor, respectively. In this embodiment, personnel and materials... It can be set to 0.15m, for construction machinery. It can be set to 0.30m. It can be set to 0.20s. It can be set to 1.0.

[0064] The object-occupied space at each prediction time is expanded outward according to ρ_i(t) to obtain a time-stamped risk envelope. Then, the corresponding contour points between risk envelopes of adjacent time times are connected to fill the sweep space that may be traversed between discrete time times, forming a dynamic risk envelope. The dynamic risk envelope retains the earliest arrival time and direction of motion corresponding to each spatial unit for subsequent calculation of risk urgency.

[0065] Furthermore, the step of calculating the object's position and attitude at a preset future time based on the object's current position, speed, acceleration, and motion mode includes: Fit the trajectory points and key points within the current time window to determine the current position, speed, acceleration, attitude angle, and attitude change rate of the construction object; Based on the movement mode of the construction object, the construction object is divided into stationary object, translational object, rotational object, or a combination of translation and rotational object; Calculate the position of the translating object at each preset future time based on the current position, direction of motion, speed of motion, and acceleration; calculate the attitude of the rotating object at each preset future time based on the current attitude angle, direction of attitude change, and speed of attitude change. The position and orientation changes of the combined translation and rotation objects are superimposed, and the calculation results are corrected according to the object size, joint range of motion, or mechanical range of motion to obtain the object position and orientation at each preset future time.

[0066] In some embodiments, a weighted second fitting is performed on the position points within the historical trajectory window, and the weight of trajectory points close to the current moment is increased. The current position, velocity, and acceleration are determined by the fitted curve. The same processing is performed on the angle sequence between the key points of the active part and the rotation fulcrum to determine the current attitude angle, angular velocity, and angular acceleration.

[0067] For a translational object, the position of the i-th construction object at future time t is calculated using the following formula: ; For a rotating object, the attitude angle of the i-th construction object at a future time t is calculated using the following formula: ; in, and These refer to the future position and attitude angle, respectively. and These are the current position, current velocity, and current acceleration, respectively. and These represent the current attitude angle, angular velocity, and angular acceleration, respectively; t is the time difference between the predicted future time and the current time. Position, velocity, and acceleration are all represented in the track-following coordinate system.

[0068] An object is classified as stationary if its translational speed is below 0.05 m / s and its attitude change rate is below 2° / s; it is classified as a translating object if its translational speed reaches 0.05 m / s and its attitude change rate is below 2° / s; it is classified as a rotating object if its translational speed is below 0.05 m / s and its attitude change rate reaches 2° / s; and it is classified as a combined translational and rotating object if both of these conditions are met. These thresholds can be adjusted based on the video sampling frequency and the type of construction machinery.

[0069] For objects combining translation and rotation, the future position is superimposed with the pose of key points calculated around the rotation pivot. Then, the prediction results are constrained according to the allowable range of motion of human joints or the maximum extension length, rotation angle, and movement speed given in the construction machinery manual; predicted positions that exceed the range of motion are truncated to the allowable boundary, and the trajectory prediction error at the corresponding moment is increased to avoid generating future poses that do not conform to the physical structure of the object.

[0070] Further, see Figure 2 Based on the overlap between the dynamic risk envelope and the stage risk constraint field, as well as the relative motion relationships between the construction objects, the overall risk value is calculated as follows: According to the predicted time sequence, the dynamic risk envelope of each construction object is matched with the stage risk constraint field to determine the overlapping constraint grids, the earliest overlap time, and the number of overlapping grids. The constraint overlap risk value of each construction object is determined based on the proportion of the number of overlapping grids to the number of grids covered by the dynamic risk envelope, the risk weight of the overlapping grids, and the earliest overlap time. Based on the positions of different construction objects at each predicted time, calculate the minimum relative distance, relative speed and the time when the minimum relative distance is reached between the objects, and determine the relative motion risk value of the objects. The risk values ​​of overlapping constraints and relative motion of objects are normalized and weighted according to the risk weights corresponding to the current construction stage to obtain the overall risk value.

[0071] In some embodiments, at the k-th future prediction time, the intersection operation is performed on the time-risk envelope coverage grid set of the i-th construction object and the stage risk constraint field to obtain an overlapping grid set. The ratio of the number of overlapping grids to the total number of time-risk envelope coverage grids is denoted as . The average value of the risk weights of the overlapping grids is denoted as... The first time the predictions overlap is denoted as . The constraint overlap risk value of the i-th construction object is determined by the following formula: ; in, To constrain overlapping risk values; To constrain the risk time decay parameter, this embodiment... It can be set to 3s; when the dynamic risk envelope does not overlap with any constraint mesh, Take 0.

[0072] For the i-th and j-th construction objects, calculate the shortest distance between the spaces occupied by the two objects at each time step, and determine the minimum relative distance within a preset future time period. The moment when the minimum relative distance is reached and normalized relative velocities along the directions of mutual approach. The risk value of relative motion of the object is determined by the following formula: ; in, The relative motion risk value of the object; The preset safety distance is determined based on the two object categories, object sizes, and the current construction stage; The relative motion time decay parameter can be set to 3s; The approach speed correction factor can be set to 0.20. This applies if the distance between objects does not continuously decrease, or if the minimum relative distance is not less than [a certain value]. ,but Take 0.

[0073] The risk values ​​of constraint overlap for all construction objects and the risk values ​​of relative motion for all object combinations are weighted and averaged to obtain the scene constraint risk R_c and the scene relative motion risk R_m. The overall risk value is then calculated using the following formula: ; in, This represents the overall risk value, ranging from 0 to 1. and These are the scene constraint risk weights and the scene relative motion risk weights, respectively. This embodiment can be set as follows: 0.65 The value is 0.35; during construction phases where there is significant overlap between personnel and machinery, the efficiency can be improved. By simultaneously incorporating overlap, constraint weights, earliest risk moment, minimum relative distance, and approach speed, the overall risk value can reflect the scope, severity, and urgency of the risk.

[0074] Further, see Figure 3 Risk sources, determined based on dynamic risk envelope and stage-specific risk constraint fields, include: Construction objects whose dynamic risk envelope overlaps with the constraint grid, as well as construction objects whose predicted distance from other construction objects is less than the preset safety distance, are identified as candidate risk sources. Based on the safety rules corresponding to the current construction phase, the action status and movement trajectory of each candidate risk source are adjusted to a safe state, and the corresponding dynamic risk envelope is regenerated. By recalculating the constraint overlap risk value, the object relative motion risk value, and the overall risk value using the adjusted dynamic risk envelope, the decrease in the overall risk value before and after the adjustment is determined as the risk contribution value of the corresponding candidate risk source. The candidate risk source with the largest risk contribution value is identified as the main risk source.

[0075] In some embodiments, the overall risk value is compared with a preset risk threshold. In comparison, in this embodiment It can be set to 0.60. When the overall risk value is not less than In real time, risk events are identified, and construction objects whose dynamic risk envelopes overlap with the constraint grid, as well as construction objects whose minimum predicted distance from other construction objects is less than the preset safety distance, are identified as candidate risk sources.

[0076] For each candidate risk source, the permissible actions, permissible range of motion, and maximum speed of that type of object are retrieved from the safety rules corresponding to the current construction stage to generate the safety status of the candidate risk source. For construction machinery, the safety status can be stopping movement, retracting moving parts, or moving in a direction away from the constraint boundary; for construction personnel, the safety status can be stopping movement or returning to the construction protection area; for construction materials, the safety status can be keeping them in the permissible placement area.

[0077] Each time, only the action state and trajectory of one candidate risk source are replaced with a safe state, while other construction objects and stage risk constraint fields remain unchanged. Then, the dynamic risk envelope of the candidate risk source is regenerated and the overall risk value is calculated. The risk contribution value of the candidate risk source and the main risk source are determined by the following formula: ; in, The risk contribution value of the i-th candidate risk source; The overall risk value before adjustment; This is the overall risk value recalculated only after adjusting the i-th candidate risk source to a safe state; The primary risk source is identified. When multiple candidate risk sources have the same risk contribution value, the candidate risk source that first generates constraint overlap or first reaches the minimum relative distance is selected first.

[0078] For example, the overall risk value for a certain time window is 0.84. After adjusting the moving parts of the construction machinery to stop and retract them, the overall risk value decreases to 0.25, with a risk contribution value of 0.59; only after moving nearby construction workers to safe positions, the overall risk value decreases to 0.67, with a risk contribution value of 0.17. Therefore, the construction machinery is identified as the primary risk source, while facilities that overlap with it or construction workers affected by its movement are identified as threatened objects. This method, by keeping the states of other objects unchanged, can distinguish between the primary triggering object and the affected object of the risk event.

[0079] Furthermore, the risk source identification results include the main risk source, the threatened object, and the corresponding location.

[0080] In some embodiments, the main risk source record includes object identifier, object category, and triggering action; the threatened object is a construction object that forms a dangerous relative movement with the main risk source, or a line facility corresponding to the overlapping constraint grid of the main risk source; the corresponding location is the position where the main risk source first enters the constraint grid, or the position of the midpoint of the line connecting the two construction objects when they reach the minimum relative distance. The longitudinal coordinate of this location in the line follow-up coordinate system is converted into line mileage, while the lateral coordinate and height coordinate are retained simultaneously.

[0081] The final output of the risk source identification result includes at least the main risk source, the threatened object, and its corresponding location. It may also include the overall risk value, risk type, earliest risk time, and corresponding video frame number, so as to retrieve continuous video before and after the risk occurs based on the line location. Through the above implementation process, continuous processing from construction phase identification, spatial constraint modeling, future motion prediction, overall risk quantification to main risk source backtracking is achieved.

[0082] The above embodiments are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A method for identifying risk sources in railway construction videos based on deep learning, characterized in that, Includes the following steps: Obtain continuous construction videos and construction constraint data of the railway construction section, and determine the current construction stage based on the changes in the movement of the construction object, as well as the status of line closure, overhead contact line power supply, and construction protection. Extract the rail structure from the continuous construction video, establish a track follow-up coordinate system based on the rail centerline and preset track gauge, and map the traffic clearance, catenary safety distance and construction protection boundary corresponding to the current construction stage to the track follow-up coordinate system to generate a stage risk constraint field; The construction object, action state, and movement trajectory are identified by a deep learning model. The construction object is mapped to the line's follow-up coordinate system, and a dynamic risk envelope for a future preset time period is generated based on the object size, action state, and movement trajectory. The overall risk value is calculated based on the overlap between the dynamic risk envelope and the stage risk constraint field, as well as the relative motion between the construction objects. Risk events are determined based on the overall risk value and the preset risk threshold, and the main risk sources are determined based on the dynamic risk envelope and the stage risk constraint field, thus obtaining the risk source identification results.

2. The method for identifying risk sources in railway construction videos based on deep learning according to claim 1, characterized in that, Determining the current construction stage includes the following steps: Extract the action status, action occurrence time, and action transition sequence of the construction object according to the preset time window to form an action change sequence; Based on the correspondence between construction stages and key actions in the construction plan, the matching degree between the action change sequence and each construction stage is calculated to determine the candidate construction stage. Based on the status of line closure, overhead contact line power supply, and construction protection, candidate construction stages that do not meet safety rules are eliminated, and the remaining candidate construction stage with the highest matching degree is determined as the current construction stage.

3. The method for identifying risk sources in railway construction videos based on deep learning according to claim 1, characterized in that, The process of extracting the rail structure from the continuous construction video and establishing a track-following coordinate system based on the rail centerline and a preset track gauge includes the following steps: Extract the edges of the paired extending rails from the continuous construction video and perform curve fitting to obtain the center lines of the left and right rails; Multiple sets of corresponding sampling points are selected along the center lines of the left and right rails. Based on the image distance between each set of sampling points and the preset track gauge, the scale transformation relationship of different line positions is determined, and the line center line is fitted based on the midpoint of each set of sampling points. Using the reference point on the centerline of the track as the origin, the arc length along the centerline of the track, the normal distance from the target to the centerline of the track, and the height of the target relative to the rail surface are used as the longitudinal coordinate, the lateral coordinate, and the height coordinate, respectively, to establish the track following coordinate system.

4. The method for identifying risk sources in railway construction videos based on deep learning according to claim 3, characterized in that, The step of mapping the traffic clearance, catenary safety distance, and construction protection boundary corresponding to the current construction stage to the line's dynamic coordinate system to generate a stage risk constraint field includes: Based on the safety rules corresponding to the current construction stage, the outline of the traffic clearance, the location and safety distance of the overhead contact line and the construction protection points are extracted and transformed into the track follow-up coordinate system to obtain the corresponding constraint boundary coordinate set. The line-following coordinate space is divided into grids, and the shortest distance and internal / external positional relationship between each grid and each constraint boundary coordinate set are calculated to obtain the grid constraint characteristics. Based on the safety rules corresponding to the current construction stage, the grid constraint features are converted into constraint types and risk weights, and written into the corresponding grid to generate a stage risk constraint field.

5. The method for identifying risk sources in railway construction videos based on deep learning according to claim 1, characterized in that, The step of identifying construction objects, action states, and motion trajectories using a deep learning model, and mapping the construction objects to the line-following coordinate system, includes: Continuous construction video frames are input into the Mask R-CNN multi-task model, multi-scale image features are extracted through the ResNet backbone network and feature pyramid, and candidate object regions are determined through the region generation network. The candidate object regions are classified and bounding box regression is performed to obtain the category and location of the construction object. The object contour is extracted by mask branching, and the key points of human joints and moving parts of construction machinery are extracted by key point branching. The same construction object in adjacent video frames is associated with the object category, contour overlap and feature distance. The motion state is determined by the key point angle, displacement direction and movement speed to obtain the image motion trajectory. The object outline, key points, and image motion trajectory are transformed into the line follow coordinate system to obtain the spatial position, object size, action status, and motion trajectory of the construction object.

6. The method for identifying risk sources in railway construction videos based on deep learning according to claim 5, characterized in that, The process of generating a dynamic risk envelope for a future preset time period based on object size, action state, and motion trajectory includes: Extract the trajectory points of the construction object within the current time window, calculate the motion speed, direction of motion, and acceleration, and determine the motion mode of the object in combination with the motion state; The future time period is divided according to the preset time interval. Based on the current position, speed, acceleration and movement mode of the construction object, the position and attitude of the object at the preset future time are calculated. Based on the object size and object outline, the object occupancy space is constructed at each predicted location, and the object occupancy space is expanded according to the motion speed and trajectory prediction error to obtain the risk envelope at each future time. By connecting the risk envelopes of adjacent future moments in chronological order, a dynamic risk envelope containing the predicted time, spatial range, and direction of motion is obtained.

7. The method for identifying risk sources in railway construction videos based on deep learning according to claim 6, characterized in that, The calculation of the object's position and attitude at a preset future time based on the object's current position, speed, acceleration, and motion mode includes: Fit the trajectory points and key points within the current time window to determine the current position, speed, acceleration, attitude angle, and attitude change rate of the construction object; Based on the movement mode of the construction object, the construction object is divided into stationary object, translational object, rotational object, or a combination of translation and rotational object; Calculate the position of the translating object at each preset future time based on the current position, direction of motion, speed of motion, and acceleration; calculate the attitude of the rotating object at each preset future time based on the current attitude angle, direction of attitude change, and speed of attitude change. The position and orientation changes of the combined translation and rotation objects are superimposed, and the calculation results are corrected according to the object size, joint range of motion, or mechanical range of motion to obtain the object position and orientation at each preset future time.

8. The method for identifying risk sources in railway construction videos based on deep learning according to claim 4, characterized in that, Based on the overlap between the dynamic risk envelope and the stage risk constraint field, as well as the relative motion relationships between the construction objects, the overall risk value is calculated as follows: According to the predicted time sequence, the dynamic risk envelope of each construction object is matched with the stage risk constraint field to determine the overlapping constraint grids, the earliest overlap time, and the number of overlapping grids. The constraint overlap risk value of each construction object is determined based on the proportion of the number of overlapping grids to the number of grids covered by the dynamic risk envelope, the risk weight of the overlapping grids, and the earliest overlap time. Based on the positions of different construction objects at each predicted time, calculate the minimum relative distance, relative speed and the time when the minimum relative distance is reached between the objects, and determine the relative motion risk value of the objects. The risk values ​​of overlapping constraints and relative motion of objects are normalized and weighted according to the risk weights corresponding to the current construction stage to obtain the overall risk value.

9. The method for identifying risk sources in railway construction videos based on deep learning according to claim 8, characterized in that, The determination of risk sources based on dynamic risk envelope and stage risk constraint field includes: Construction objects whose dynamic risk envelope overlaps with the constraint grid, as well as construction objects whose predicted distance from other construction objects is less than the preset safety distance, are identified as candidate risk sources. Based on the safety rules corresponding to the current construction phase, the action status and movement trajectory of each candidate risk source are adjusted to a safe state, and the corresponding dynamic risk envelope is regenerated. By recalculating the constraint overlap risk value, the object relative motion risk value, and the overall risk value using the adjusted dynamic risk envelope, the decrease in the overall risk value before and after the adjustment is determined as the risk contribution value of the corresponding candidate risk source. The candidate risk source with the largest risk contribution value is identified as the main risk source.

10. The method for identifying risk sources in railway construction videos based on deep learning according to claim 1, characterized in that, The risk source identification results include the main risk source, the threatened object, and the corresponding location.