A dynamic threshold self-adaptive judgment method and system for construction safety monitoring
Patent Information
- Application Number
- CN202610884065.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-18
- Publication Date
- 2026-10-30
AI Technical Summary
该处理方式在画面清晰、目标尺度稳定、作业动作单一的场景中能够完成基础预警,但在轨道交通车辆段风水电安装、风管支吊架安装、升降车高位检修等连续施工场景中,作业人员经常处于离地8米以上位置,安全带、挂钩和人体躯干边缘在远距离画面中占用像素少,并且会随人员弯腰、转身、攀爬、进入支吊架遮挡区或移出摄像头主视角而发生短时消失;
通过将现场反馈结果、便携端接收结果和总控端复核结果写回反馈马尔科夫状态图,并参与下一轮动态阈值更新,使报警后状态变化能够进入判定过程,相对缓解遮挡误报、处置后重复报警和真实风险被短时打断的问题;
Smart Images

Figure CN123016320A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent monitoring technology for construction safety, and more specifically, to a dynamic threshold adaptive determination method and system for construction safety monitoring. Background Technology
[0002] In the field of construction safety monitoring, existing video early warning systems mainly revolve around "timely alarm after identifying dangerous conditions". The processing link is generally that the camera collects construction images, and then the edge computing device or the back-end platform identifies targets such as personnel, safety helmets, safety belts, ladders, lifting vehicles and working heights. Based on the detection confidence, the number of consecutive hit frames, the relative position of the target box or manually set thresholds, it is determined whether to trigger local sound and light alarms, mobile terminal reminders and central control room prompts. This processing method can complete basic early warning in scenarios with clear images, stable target scale, and simple operation actions. However, in continuous construction scenarios such as the installation of ventilation, water and electricity systems in rail transit vehicle depots, the installation of duct supports and hangers, and the high-level maintenance of elevator cars, workers are often at a height of more than 8 meters above the ground. Safety belts, hooks, and the edges of the human torso occupy fewer pixels in distant images and will disappear briefly when workers bend over, turn around, climb, enter the area obstructed by supports and hangers, or move out of the camera's main view. At the same time, the construction site requires the edge device to complete real-time identification on a low-power device and output the results synchronously to the on-site audio-visual equipment, portable receiving terminal and central control video terminal, and cannot rely on manual frame-by-frame verification for a long time; Under the above conditions, if the single identification result or fixed frame segment statistical result is still directly used as the basis for alarm, the system cannot determine the source of the status change after an alarm: the risk is eliminated after the personnel put on the safety belt again, the equipment frame is lost due to the duct obstruction, the repeated push after the central control terminal confirms that it is invalid, and the same person continues to violate the rules in the same high-level area. In the next round of identification, these will be processed under the same threshold conditions, which will manifest as repeated alarms at the obstruction position, continued alarms after effective handling, real violations being interrupted by short-term obstruction, and the central control review result being unable to change the subsequent judgment at the edge end. The root cause of these phenomena is that the existing alarm chain only treats the feedback results as prompts or records, and does not transform the on-site handling results, remote reception results, and central control review results after the alarm into the basis for subsequent threshold updates. The technical problem this application aims to solve is: how to incorporate the multi-terminal feedback results after an alarm into the dynamic threshold judgment process during construction safety monitoring, so that the next round of safety status judgment can distinguish between the continuation of real risks, the completion of handling, false alarms due to obstruction, and repeated alarms. Summary of the Invention
[0003] To overcome the aforementioned deficiencies in the prior art, embodiments of the present invention provide a dynamic threshold adaptive determination method and system for construction safety monitoring. This method involves linking personnel, protective equipment, work equipment, obstructed targets, and multi-terminal feedback results as sample records according to frame numbers, constructing a feedback state diagram based on a Markov model and determining the current state chain, and then performing projective subgradient updates on the determination thresholds for safety helmets, safety belts, and high-altitude operations in conjunction with the feedback samples, thereby solving the problems mentioned in the background art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a dynamic threshold adaptive determination method for construction safety monitoring, comprising: S1. Acquire construction monitoring video stream, construction area number, target detection results and feedback records. For personnel targets, protective equipment targets, work equipment targets, obstruction targets and feedback results under the same personnel number, link them by frame number to generate sample records containing personnel number, frame number, area number, target category, target location, detection confidence value, adjacency relationship and feedback mark. S2. Based on the sample records, the changes in the work position, the appearance status of protective equipment, the adjacency status of work equipment, the duration of occlusion, and the feedback markers of the same personnel number in adjacent frames are encoded as state nodes. Adjacent state nodes are connected in order of frame number, and the number of transitions between state nodes, the distribution of detection confidence values, and the distribution of feedback markers are counted to generate a feedback Markov state diagram. S3. Based on the feedback Markov state diagram and the sample records in the current frame segment, perform forward recursion and backward backtracking on the state nodes of the current personnel number, calculate the path belonging value of each state node in the current frame segment, and select the state node sequence with the first path belonging value as the current state chain. S4. Based on the current state chain, extract the historical detection confidence values with feedback markers under the same state node, and use the safety helmet judgment threshold, safety belt judgment threshold and high-altitude operation judgment threshold as variables to be updated. The sum of the counts corresponding to the effective risk sample being judged as normal, the sample being handled and continuing to alarm, and the invalid sample being reviewed and alarming again is the loss amount. Perform projection subgradient update on the variables to be updated to generate the current dynamic threshold record. S5. Based on the current dynamic threshold record, the current state chain, and the sample record in the current frame segment, determine the high-altitude operation status, protective equipment wearing status, and suspected obstruction status of the current personnel number, generate the current safety judgment record, and write the on-site feedback result, portable terminal receiving result, and central control terminal verification result corresponding to the current safety judgment record back to the feedback Markov state diagram.
[0005] In a preferred embodiment, S1 includes: S1-1. Based on the construction monitoring video stream and target detection results, read the top left corner x-coordinate, top left corner y-coordinate, frame width, frame height, target category and detection confidence value of each detection box in each frame. Use the top left corner x-coordinate plus half the frame width as the frame center x-coordinate and the top left corner y-coordinate plus half the frame height as the frame center y-coordinate to generate a detection box record with the frame center coordinate. S1-2. Based on the detection box record, pair up the detection boxes with the same target category in two adjacent frames, calculate the sum of the square difference between the horizontal coordinates of the two detection boxes in each pair and the square difference between the vertical coordinates of the boxes, and write the pair with the smallest sum into the same target number to generate the target trajectory record. S1-3. Based on the target trajectory record and construction area number, write the protective equipment target whose center coordinates fall within the outer frame of the personnel target in the same frame into the personnel number. Write the work equipment target and the obstructing target with the smallest sum of the square difference between the horizontal coordinate difference of the frame center and the square difference between the vertical coordinate difference of the frame center and the personnel target in the same frame into the personnel number. Then, merge the area of the overlapping area of the two frames, the size relationship of the vertical coordinate of the target frame center, and the feedback record according to the personnel number and frame number to generate a sample record.
[0006] In a preferred embodiment, in S2, the generation of the feedback Markov state diagram includes the following steps: S2-1. Based on the sample records, read the personnel target positions of two adjacent frames according to the personnel number and frame number. Subtract the horizontal coordinate of the center of the previous frame from the horizontal coordinate of the center of the next frame to obtain the horizontal displacement value. Subtract the vertical coordinate of the center of the previous frame from the vertical coordinate of the center of the next frame to obtain the vertical displacement value. Record the number of target categories of protective equipment targets written to the personnel number as the equipment occurrence value. Record the area of the overlapping area between the two frames of the working equipment target and the personnel target as the equipment adjacency value. Record the number of frames in which the occluded target is continuously written to the personnel number as the occlusion continuation value. Generate status field records. S2-2. Based on the status field records and feedback markers, the horizontal displacement value, vertical displacement value, equipment appearance value, equipment adjacency value, occlusion continuation value and feedback marker under the same personnel number and frame number are concatenated into status nodes in a fixed field order. Status nodes with the same field value are merged into the same node number to generate a node table. S2-3. According to the node table, read the numbers of two adjacent nodes in the order of frame number of the same personnel number, take the previous node number as the starting node and the next node number as the ending node, accumulate the number of connections of the same starting node and the same ending node as the number of transitions, write the detection confidence value under the starting node into the confidence value sequence in ascending order of value, count the feedback flag under the starting node according to effective risk, handling completed, and review invalid, and generate state transition edges. S2-4. Based on the state transition edges, divide the number of transitions of each endpoint node under the same starting node by the sum of all transitions of that starting node to obtain the Markov transition probability. Then, merge the node table, state transition edges, Markov transition probabilities, confidence value sequence, and feedback flag count to generate a feedback Markov state diagram.
[0007] In a preferred embodiment, S3 includes: S3-1. Based on the feedback Markov state diagram and the sample records in the current frame segment, read the horizontal displacement value, vertical displacement value, equipment appearance value, equipment adjacency value, occlusion continuation value and feedback flag of the current personnel number in each frame, and read the state nodes with the same field value or the smallest field value difference in the feedback Markov state diagram as candidate state nodes for the frame, and generate a candidate node table. S3-2. Based on the candidate node table, calculate the sum of field differences between each candidate state node and the sample record in the same frame. Add the absolute values of the lateral displacement value difference, longitudinal displacement value difference, equipment occurrence value difference, equipment adjacency value difference, occlusion continuation value difference, and feedback mark difference to obtain the node observation cost. Subtract the valid risk count from the invalid verification count under the candidate state node to obtain the feedback correction value. Add the node observation cost and the feedback correction value to obtain the total node cost.
[0008] In a preferred embodiment, S3 further includes: S3-3. Based on the total cost of the nodes and the Markov transition probabilities in the feedback Markov state graph, perform forward recursion on the candidate state nodes in frame number order. Add the cumulative cost of the candidate state nodes in the previous frame, the total cost of the candidate state nodes in the current frame, and the negative logarithmic Markov transition probabilities of the corresponding state transition edges. Take the candidate state node in the previous frame with the lowest sum as the source node of the candidate state nodes in the current frame, and write the lowest sum as the cumulative cost of the candidate state nodes in the current frame to generate the source node table.
[0009] In a preferred embodiment, S3 further includes: S3-4. Based on the source node table, starting from the candidate state node with the lowest cumulative cost in the last frame of the current frame segment, backtrack frame by frame according to the source node to the first frame of the current frame segment to obtain the backtracking state chain. Calculate the field mutation value and feedback conflict value for each adjacent state node in the backtracking state chain. Add the field mutation value, feedback conflict value, and missing state transition edge value to obtain the link cost. Replace the candidate state nodes that reduce the link cost frame by frame until the total link cost after this round of replacement is not lower than the total link cost of the previous round. Output the sequence of state nodes with the lowest total link cost as the current state chain.
[0010] In a preferred embodiment, S4 includes: S4-1. Based on the current state chain and the feedback Markov state diagram, read the historical sample records according to the state node number in the current state chain, write the historical sample records marked as effective risks into the risk sample set, write the historical sample records marked as completed handling into the handling sample set, write the historical sample records marked as invalid for review into the invalid sample set, and extract the confidence values of safety helmet detection, safety belt detection, and high-altitude operation detection respectively to generate threshold sample records; S4-2. Based on the threshold sample records, the safety helmet judgment threshold, safety belt judgment threshold, and high-altitude operation judgment threshold are respectively taken as variables to be updated. For each variable to be updated, the number of samples with a confidence value less than the variable to be updated in the risk sample set, the number of samples with a confidence value greater than or equal to the variable to be updated in the disposal sample set, and the number of samples with a confidence value greater than or equal to the variable to be updated in the invalid sample set are counted. The three sample counts are added together to generate the misjudgment count of the variable to be updated.
[0011] In a preferred embodiment, S4 further includes: S4-3. Based on the misjudgment count, calculate the misjudgment count after increasing the confidence value interval and the misjudgment count after decreasing the confidence value interval for each variable to be updated. Take the direction of decreasing the misjudgment count as the projection subgradient update direction. Limit the updated variable to be updated to between the minimum and maximum historical detection confidence values of the same detection type. Generate a current dynamic threshold record containing the safety helmet judgment threshold, the safety belt judgment threshold, and the high-altitude operation judgment threshold.
[0012] In a preferred embodiment, S5 includes: S5-1. Based on the current dynamic threshold record, the current state chain, and the sample record in the current frame segment, read the safety helmet detection confidence value, safety belt detection confidence value, high-altitude operation detection confidence value, and occlusion continuation value according to the current personnel number. Write the frame number of the high-altitude operation detection confidence value that is greater than or equal to the high-altitude operation judgment threshold into the high-altitude operation frame segment. Write the frame number of the safety helmet detection confidence value that is less than the safety helmet judgment threshold in the high-altitude operation frame segment into the safety helmet abnormal frame segment. Write the frame number of the safety belt detection confidence value that is less than the safety belt judgment threshold in the high-altitude operation frame segment into the safety belt abnormal frame segment. Write the frame number of the occlusion continuation value that is greater than zero and the protective equipment detection confidence value that is less than the corresponding judgment threshold into the occlusion suspected frame segment. S5-2. Based on the high-altitude operation frame segment, safety helmet abnormality frame segment, safety belt abnormality frame segment, and suspected obstruction frame segment, merge consecutive frame segments with adjacent frame numbers under the same personnel number, generate a safety helmet risk item based on the intersection of the high-altitude operation frame segment and the safety helmet abnormality frame segment, generate a safety belt risk item based on the intersection of the high-altitude operation frame segment and the safety belt abnormality frame segment, and generate an obstruction to be reviewed item based on the intersection of the suspected obstruction frame segment and the safety helmet abnormality frame segment or the safety belt abnormality frame segment. Output the current safety judgment record containing personnel number, area number, risk item, item to be reviewed, start and end frame number, and corresponding judgment threshold. S5-3. Based on the on-site feedback results, portable terminal reception results, and central control terminal verification results corresponding to the current safety judgment record, write the on-site rectification completion as disposal completion, write the risk received by the portable terminal and confirmed by the central control terminal as valid risk, write the risk denied by the central control terminal as verification invalid, and update the feedback marker count, detection confidence value sequence, and state transition edge in the feedback Markov state diagram according to personnel number, area number, status node number, and start and end frame number.
[0013] A dynamic threshold adaptive judgment system for construction safety monitoring includes: The sampling module is used to acquire construction monitoring video streams, construction area numbers, target detection results and feedback records. It links personnel targets, protective equipment targets, work equipment targets, obstructed targets and feedback results under the same personnel number by frame number to generate sample records containing personnel number, frame number, area number, target category, target location, detection confidence value, adjacency relationship and feedback mark. The mapping module, based on sample records, encodes the changes in the work position of the same personnel number in adjacent frames, the appearance status of protective equipment, the adjacency status of work equipment, the duration of occlusion, and the feedback markers as state nodes. It connects adjacent state nodes in frame number order and counts the number of transitions between state nodes, the distribution of detection confidence values, and the distribution of feedback markers to generate a feedback Markov state map. The chain-finding module performs forward recursion and backward backtracking on the state nodes of the current personnel number based on the feedback Markov state diagram and the sample records in the current frame segment. It calculates the path belonging value of each state node in the current frame segment and selects the state node sequence with the first path belonging value as the current state chain. The threshold adjustment module extracts historical detection confidence values with feedback markers under the same state node based on the current state chain. It takes the safety helmet judgment threshold, safety belt judgment threshold, and high-altitude operation judgment threshold as variables to be updated, and uses the counts corresponding to valid risk samples being judged as normal, samples that have been dealt with and continue to alarm, and invalid samples that are reviewed and alarmed again as the loss amount. It performs projection subgradient update on the variables to be updated to generate the current dynamic threshold record. The judgment module determines the high-altitude operation status, protective equipment wearing status, and suspected obstruction status of the current personnel number based on the current dynamic threshold record, the current state chain, and the sample record in the current frame segment. It generates the current safety judgment record and writes the corresponding on-site feedback result, portable terminal reception result, and central control terminal verification result back to the feedback Markov state diagram.
[0014] The technical effects and advantages of this invention are as follows: By writing the on-site feedback results, portable terminal reception results, and central control terminal verification results back to the feedback Markov state diagram and participating in the next round of dynamic threshold updates, the state changes after the alarm can enter the judgment process, which relatively alleviates the problems of false alarms due to obstruction, repeated alarms after handling, and the short-term interruption of real risks. By linking personnel targets, protective equipment targets, work equipment targets, obstructed targets and feedback markers according to personnel number and frame number through sample records, the safety status determination no longer depends on the single frame detection result, which relatively improves the ability to inherit the status when small targets at a distance disappear for a short time. By using the feedback Markov state diagram to count the number of state node transitions, confidence value sequences, and feedback marker counts, and generating the current state chain accordingly, the position changes, equipment adjacency, and occlusion continuation in continuous construction actions can be included in the judgment, thereby relatively reducing the interference of state jumps on the early warning results. By updating the safety helmet judgment threshold, safety belt judgment threshold, and high-altitude operation judgment threshold through projection subgradient, the effective risks, completed handling, and invalid review samples jointly constrain the threshold values, thereby relatively improving the adaptability of fixed thresholds under different construction conditions. Attached Figure Description
[0015] Figure 1 This is a flowchart of the method steps of the present invention.
[0016] Figure 2 This is a schematic diagram of the system modules of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Refer to the instruction manual appendix Figure 1-2 The present invention provides a dynamic threshold adaptive determination method for construction safety monitoring, comprising: S1. Acquire construction monitoring video stream, construction area number, target detection results and feedback records. For personnel targets, protective equipment targets, work equipment targets, obstruction targets and feedback results under the same personnel number, link them by frame number to generate sample records containing personnel number, frame number, area number, target category, target location, detection confidence value, adjacency relationship and feedback mark. In this embodiment, S1 is used to organize the target detection results in the construction monitoring video stream into sample records that can be read in subsequent mapping, link finding, and threshold adjustment. During processing, the position field of each detection frame is first converted into the frame center coordinates, then the target numbering is continued according to the same type of detection frames in adjacent frames, and finally the protective equipment targets, work equipment targets, occlusion targets, and feedback results are linked to the corresponding personnel numbers and frame numbers. This process includes the following steps: In S1-1, the frame number, construction area number, and target detection results for each frame in the construction monitoring video stream are read. The target detection results include at least personnel targets, protective equipment targets, work equipment targets, and obstructing targets. Personnel targets are the detection frames for construction workers; protective equipment targets include safety helmet detection frames and safety belt detection frames; work equipment targets include detection frames for ladders, hoists, scaffolding, or high-altitude work platforms; and obstructing targets include detection frames for air ducts, supports, railings, or components obstructing the torso, head, or protective equipment of construction workers. For each detection frame, the upper left corner x-coordinate, upper left corner y-coordinate, frame width, frame height, target category, and detection confidence value are read. The upper left corner... The x-coordinate is obtained by adding half the frame width to the x-coordinate. The y-coordinate is obtained by adding half the frame height to the top left y-coordinate. The right boundary is obtained by adding the frame width to the top left x-coordinate. The bottom boundary is obtained by adding the frame height to the top left y-coordinate. A detection box record is generated using the frame number, construction area number, target category, detection confidence value, top left x-coordinate, top left y-coordinate, frame width, frame height, frame center x-coordinate, frame center y-coordinate, right boundary, and bottom boundary. This record is used by S1-2 to continue the target numbering. If a frame does not have a target detection result, an empty detection box record containing only the frame number and construction area number is generated. If a detection box lacks a frame width or frame height, the detection box is not written into the detection box record. In S1-2, detection box records are read sequentially by frame number, and detection boxes of the same target category in adjacent frames are paired up. For each pair, the square of the difference between the x-coordinate of the frame center of the subsequent frame and the x-coordinate of the frame center of the preceding frame is calculated, and the square of the difference between the y-coordinate of the frame center of the subsequent frame and the y-coordinate of the frame center of the preceding frame is also calculated. The two squared values are added together to obtain the pairing distance value. Subsequently, all pairs under the same target category are sorted in ascending order of pairing distance value, and the target numbers are written sequentially. Each previous frame detection box only extends to one subsequent frame detection box, and each subsequent frame detection box only inherits from one previous frame detection box. When two pairs of detection frames share the same detection frame from the previous frame or the same detection frame from the next frame, the pair with the higher ranking is retained, and the pair with the lower ranking is discarded. Detection frames in the next frame that do not inherit the target number from the previous frame generate new target numbers. This generates a target trajectory record containing the target number, frame number, construction area number, target category, detection confidence value, and detection frame position fields, which is used by S1-3 to perform intra-frame attachment according to personnel number. If the current frame is the first frame of the construction monitoring video stream, each detection frame in the first frame is written with a new target number. If a target category in two adjacent frames has no detection frame in the next frame, then no continuation record is generated for that target category in that frame. In S1-3, the target number corresponding to the personnel target is first read from the target trajectory record as the personnel number, and the protective equipment target in the same frame is read. When the horizontal coordinate of the center of the protective equipment target is greater than or equal to the horizontal coordinate of the upper left corner of the personnel target and less than or equal to the right boundary of the personnel target, and the vertical coordinate of the center of the protective equipment target is greater than or equal to the vertical coordinate of the upper left corner of the personnel target and less than or equal to the lower boundary of the personnel target, the protective equipment target is written into the personnel number. When there are multiple detection boxes for the same personnel number, the same frame, and the same protective equipment category, the detection box with the highest detection confidence value is retained. When the detection confidence values are the same, the detection box with the smaller pairing distance value with the personnel target is retained. Then, the working equipment target and the occlusion target in the same frame are read, and the pairing distance value between them and the personnel target is calculated respectively. The working equipment target with the smallest pairing distance value and the occlusion target with the smallest pairing distance value are written into the personnel number. When there is no working equipment target or occlusion target in the same frame, the corresponding field is written as a null value, and the subsequent equipment adjacency value or occlusion continuation value is treated as zero. The area of the overlapping region of two frames is calculated as follows: take the larger value of the left boundary of the two frames as the left side of the overlap. The overlapping right boundary is determined by taking the smaller of the two right boundaries as the overlapping right boundary, the larger of the two top boundaries as the overlapping top boundary, and the smaller of the two bottom boundaries as the overlapping bottom boundary. When the overlapping right boundary is greater than the overlapping left boundary and the overlapping bottom boundary is greater than the overlapping top boundary, the difference between the overlapping right and left boundaries is multiplied by the difference between the overlapping bottom and top boundaries to obtain the area of the overlapping region. Otherwise, the area of the overlapping region is written as zero. The relative sizes of the target box center ordinates are written according to the image coordinate system, with the target box with the smaller ordinate being written as the upper coordinate and the target box with the larger ordinate as the lower coordinate. Targets with the same vertical coordinate are written as "same position"; feedback records are written to the corresponding frame number according to personnel number and feedback occurrence frame number. Feedback records include on-site feedback results, portable terminal reception results, and central control terminal verification results; when there are multiple feedback results in the same frame, feedback markers are written in the order of central control terminal verification results, on-site feedback results, and portable terminal reception results; frame numbers for which no feedback results were received are written as "no feedback"; sample records are generated by merging personnel number, frame number, area number, target category, target location, detection confidence value, adjacency relationship, and feedback markers for S2 encoding status nodes to read; Through processing steps S1-1 to S1-3, the detection frames in the construction monitoring video stream are converted into sample records with personnel numbers and frame numbers. Personnel targets, protective equipment targets, work equipment targets, occlusion targets, and feedback results are all associated with the same personnel number. Subsequently, S2 can directly read changes in work position, the appearance status of protective equipment, the adjacency status of work equipment, the duration of occlusion, and feedback markers. In practical applications: During the installation of air ducts in rail transit depots, when the edge computing terminal detects a construction worker, safety helmet, safety belt, hoist, and air duct occlusion target in frame 120, it first calculates the center coordinates of each detection frame. Then, the detection frames with the same target category and the lowest pairing distance value in frames 120 and 119 are continued to have the same target number. Subsequently, the safety helmet and safety belt whose center coordinates fall within the outer frame of the personnel target are written into the personnel number, and the hoist and air duct occlusion target closest to the personnel target are written into the personnel number. The results received by the portable terminal or the verification results of the central control terminal are written into the corresponding frame number, forming a sample record for the feedback Markov state diagram to read.
[0019] S2. Based on the sample records, the changes in the work position, the appearance status of protective equipment, the adjacency status of work equipment, the duration of occlusion, and the feedback markers of the same personnel number in adjacent frames are encoded as state nodes. Adjacent state nodes are connected in order of frame number, and the number of transitions between state nodes, the distribution of detection confidence values, and the distribution of feedback markers are counted to generate a feedback Markov state diagram. In this embodiment, S2 is used to convert the sample records generated by S1 into a feedback Markov state diagram, so that the position changes, equipment appearances, equipment adjacencies, occlusion continuations, and feedback results of the same personnel number during the construction process can be stored according to state nodes and state transition edges. During processing, the inter-frame change field is first extracted from the sample records, then the field is written as a state node. Subsequently, the number of transitions, confidence value sequences, and feedback marker counts between adjacent state nodes are counted. Finally, the Markov transition probability is calculated for S3 to read when generating the current state chain. This implementation process includes the following steps: In S2-1, a state field representing the change in adjacent frames for the same personnel number is extracted from the sample record. During processing, the personnel target positions in adjacent frames of the sample record are read in order of personnel number and frame number. The horizontal displacement value is obtained by subtracting the horizontal coordinate of the frame center of the personnel target in the previous frame from the horizontal coordinate of the frame center of the personnel target in the subsequent frame. The vertical displacement value is obtained by subtracting the vertical coordinate of the frame center of the personnel target in the previous frame from the vertical coordinate of the frame center of the personnel target in the subsequent frame. The protective equipment target with the personnel number written in the subsequent frame is read, and the number of categories is counted after deduplication to obtain the equipment occurrence value. When both the safety helmet target and the safety belt target are written with the personnel number, the equipment occurrence value is 2; when only one category is written, the equipment occurrence value is 1; when neither is written, the equipment occurrence value is 0. The working equipment target with the personnel number written in the subsequent frame is read, and the area of the overlapping region between the two frames of the working equipment target and the personnel target is written as the equipment adjacency value. If no working equipment is written in the subsequent frame... When a target is encountered, the device adjacency value is written as 0. When reading the occlusion target with the personnel number written in the next frame, if the current frame has an occlusion target written and the previous frame also has an occlusion target written, the occlusion continuation value of the previous frame is incremented by 1 to obtain the occlusion continuation value of the current frame. If the current frame has an occlusion target written and the previous frame did not have an occlusion target written, the occlusion continuation value is written as 1. If the current frame does not have an occlusion target written, the occlusion continuation value is written as 0. The lateral and longitudinal displacement values are divided by the height of the personnel target frame in the next frame, and the quotient is taken as an integer. The device adjacency value is divided by the area of the personnel target frame in the next frame, and the quotient is taken as an integer. These are used as the field values for writing to the status node. If the height or area of the personnel target frame is 0, the status field record for that frame is not written to the node table, and the original sample record is retained for subsequent manual review or re-detection. The status field record is generated from the personnel number, frame number, lateral displacement value, longitudinal displacement value, equipment appearance value, device adjacency value, occlusion continuation value, and feedback flag, for the S2-2 encoded status node to read. In S2-2, status fields under the same personnel number and frame number are written into status nodes that can be merged and counted. During processing, the status field record and the feedback flag under the corresponding frame number are read. The feedback flag includes valid risk, handling completed, invalid review, and no feedback. When no feedback result is received from the field, the portable terminal, or the central control terminal, the feedback flag is written as no feedback. Status fields are concatenated in the order of lateral displacement value, longitudinal displacement value, equipment occurrence value, equipment adjacency value, occlusion continuation value, and feedback flag to form status nodes. Status nodes with the same field value are merged into the same node number, and status nodes with different field values are merged into the same node number. The status node with the value is written to a different node number; the node table includes at least the node number, horizontal displacement value, vertical displacement value, equipment appearance value, equipment adjacency value, occlusion continuation value, feedback flag, personnel number set, and frame number set; when the new status node has the same field value as an existing node in the node table, the personnel number and frame number are appended to the existing node number; when there is no node with the same field value in the node table, a new node number is generated; through this process, continuous numerical differences caused by pixel scale, personnel distance, and screen ratio are written as integer fields under the same scale, avoiding the generation of a new status node for each frame; In S2-3, state transition edges are formed according to the frame number sequence of the same personnel number, and the detection confidence value and feedback flag are attached to the starting node. During processing, the frame number sequence corresponding to the personnel number is read from the node table according to the personnel number, and the numbers of two adjacent nodes are read in ascending order of frame number. The node number of the previous frame is written as the starting node, and the node number of the next frame is written as the ending node. When the connection with the same starting node and ending node reappears, the transition count of that connection is incremented by 1. When the connection between the starting node and the ending node appears for the first time, a new state transition edge is added, and the transition count is written as 1. The safety helmet detection confidence value and seat belt detection value under the frame number corresponding to the starting node are read. Confidence values and high-altitude operation detection confidence values are written into confidence value sequences according to detection type; each confidence value sequence is stored in ascending order of value for S4 to read historical detection confidence values; the feedback flag under the frame number corresponding to the starting node is read. When the feedback flag is valid risk, the valid risk count is incremented by 1; when the feedback flag is completed, the completed count is incremented by 1; when the feedback flag is invalid, the invalid count is incremented by 1; when the feedback flag is no feedback, the above three types of counts are not incremented; a state transition edge is generated from the starting node, ending node, number of transitions, confidence value sequence, valid risk count, completed count, and invalid count for S2-4 to calculate and read the Markov transition probability; In S2-4, state transition edges are converted into feedback Markov state graphs so that state transition relationships can be used as the basis for path calculation in S3. During processing, state transition edges are merged according to the starting node, and the sum of the transition counts of all state transition edges under the same starting node is counted. For each ending node under the same starting node, the transition count of the state transition edge corresponding to the ending node is divided by the sum of the total transition counts of the starting node to obtain the Markov transition probability from the starting node to the ending node. If a starting node does not have a state transition edge, the Markov transition probability of the starting node is not calculated, and S3 will read the starting node. It is handled as a missing transition; if there is no state transition edge between two candidate state nodes, no Markov transition probability is generated, and the missing value of the state transition edge in S3 is used in the link cost calculation. After the calculation is completed, the node table, state transition edge, Markov transition probability, confidence value sequence stored by detection type and feedback tag count are merged to generate a feedback Markov state graph. Each node in the feedback Markov state graph records the state field, and each state transition edge records the number of transitions, Markov transition probability, confidence value sequence and feedback tag count, which are used for forward recursion, backward backtracking and dynamic threshold update in S4. Through processing steps S2-1 to S2-4, the sample records are transformed into a feedback Markov state graph with state nodes, state transition edges, and feedback statistics. This ensures that changes in the construction state are no longer expressed solely by single-frame detection results, but rather by the positional changes of the same personnel number across consecutive frames, equipment appearance, equipment adjacency, occlusion continuation, and feedback results. Subsequent step S3 uses Markov transition probabilities and feedback statistics to find the current state chain, and step S4 reads historical detection confidence values from the same state node and corrects the dynamic threshold. In practical applications: in the scenario of high-level ventilation duct installation in rail transit depots, the same construction worker walks from the ground to the lifting vehicle... When entering the duct obstruction area, S2 first calculates the lateral and longitudinal displacement values of the person between adjacent frames, and then writes the status of the safety helmet and safety belt, the overlap area between the lifting vehicle and the person target, the number of consecutive frames of duct obstruction, and the verification result of the central control terminal into a status node; when the same status node appears consecutively and transitions to the obstruction status node, the system accumulates the number of transitions of the corresponding state transition edge, and writes the safety helmet detection confidence value, safety belt detection confidence value, high-altitude operation detection confidence value, effective risk, handling completion, and verification invalid count into the feedback Markov state diagram, providing a data source for subsequent current state chain generation and dynamic threshold update.
[0020] S3. Based on the feedback Markov state diagram and the sample records in the current frame segment, perform forward recursion and backward backtracking on the state nodes of the current personnel number, calculate the path belonging value of each state node in the current frame segment, and select the state node sequence with the first path belonging value as the current state chain. In this embodiment, S3 is used to determine the current state chain for the current personnel number from the feedback Markov state diagram. During processing, the sample records in the current frame segment are first converted into candidate state nodes for each frame, then the total node cost between the candidate state nodes and the sample records is calculated. Subsequently, forward recursion is performed using Markov transition probabilities, and the current state chain is obtained by backtracking the source node and replacing the link cost. The current frame segment is the set of consecutive frame numbers for the same personnel number from the end frame of the previous round of judgment to the current processing frame. If the personnel number is missing in the middle frame number, the previous consecutive frame number is used as the end frame of the current frame segment, and the next current frame segment is formed after the missing frame number. This implementation process includes the following steps: In S3-1, state nodes that are close to the current frame's sample records are selected from the feedback Markov state diagram to reduce the calculation range of subsequent recursion. During processing, based on the sample records in the current frame segment, the lateral displacement value, longitudinal displacement value, equipment appearance value, equipment adjacency value, occlusion continuation value, and feedback flag of each frame are read according to personnel number and frame number. Among them, the feedback flag includes effective risk, completed handling, invalid review, and no feedback. For the current frame, the state node with the same lateral displacement value, longitudinal displacement value, equipment appearance value, equipment adjacency value, occlusion continuation value, and feedback flag is first searched in the node table of the feedback Markov state diagram, and the found state node is written into the candidate state node of the frame. If there is no state node with the same field values in the node table, then each of the nodes in the node table is processed. A state node calculates the sum of field differences, which is the sum of the absolute values of the differences in lateral displacement, longitudinal displacement, equipment occurrence, equipment adjacency, occlusion continuation, and feedback flags. The state node with the lowest sum of field differences is written into the candidate state node list for that frame. If there are multiple state nodes with the lowest sum of field differences, all parallel state nodes are written into the candidate state node list. The feedback flag difference is calculated according to the classification field; it is set to 0 when two feedback flags are the same and 1 when two feedback flags are different. A candidate node table is generated from the current personnel number, frame number, and candidate state nodes for S3-2 to read the total cost of the calculated node. If there are no state nodes in the feedback Markov state diagram, the field values recorded in the current frame sample are used to generate temporary state nodes, and the temporary state nodes are written into the candidate node table. In S3-2, the difference between candidate state nodes and the current frame sample record is calculated, and historical feedback results are incorporated into the candidate state node sorting. During processing, each candidate state node and its corresponding frame sample record are read one by one according to the candidate node table. The differences in lateral displacement, longitudinal displacement, equipment occurrence, equipment adjacency, occlusion continuation, and feedback marker values between the candidate state node and the corresponding frame sample record are calculated respectively. The absolute values of these differences are then added together to obtain the node observation cost. Subsequently, the effective risk count and the invalid review count under the candidate state node are read from the feedback Markov state diagram, and the invalid review count is then processed. The feedback correction value is obtained by subtracting the valid risk count from the invalid count. When the feedback correction value is less than zero, it means that the candidate state node corresponds to more valid risks in the historical record, and the cost of entering the current state chain is reduced. When the feedback correction value is greater than zero, it means that the candidate state node corresponds to more invalid reviews in the historical record, and the cost of entering the current state chain is increased. The node observation cost is added to the feedback correction value to obtain the total node cost, and the total node cost is written into the candidate node table. If the candidate state node is a temporary state node generated by S3-1, the valid risk count and the invalid review count are both treated as zero, and the feedback correction value is written as zero. In S3-3, the path cost of candidate state nodes is calculated in frame order, ensuring that the current state chain is simultaneously constrained by single-frame observations and Markov transition relationships. During processing, the candidate node table and the state transition edges in the feedback Markov state graph are read. For the first frame of the current frame segment, the cumulative cost of each candidate state node in the first frame is written as the total node cost of that candidate state node, and the source node is left empty. Starting from the second frame of the current frame segment, the candidate state nodes of the current frame and the candidate state nodes of the previous frame are read frame by frame. If a state transition edge exists in the feedback Markov state graph from a candidate state node of the previous frame to a candidate state node of the current frame, the Markov transition probability of that state transition edge is read, and the negative logarithm of the Markov transition probability is taken to obtain the negative logarithm Markov transition probability. The previous frame's candidate state node is then... The cumulative cost of the selected state node, the total node cost of the candidate state nodes in the current frame, and the negative log-Markov transition probability are added together to obtain the candidate recursive cost. If there is no corresponding state transition edge, the negative log-Markov transition probability is not calculated, and the combination is temporarily stored as a missing transition combination for S3-4 to calculate the missing value of the state transition edge. For the same candidate state node in the current frame, the candidate state node of the previous frame with the lowest candidate recursive cost is selected as the source node, and the lowest candidate recursive cost is written as the cumulative cost of the candidate state node in the current frame. If multiple candidate state nodes of the previous frame obtain the same candidate recursive cost, the candidate state node of the previous frame with the lower node observation cost is selected as the source node. A source node table is generated from the source node and cumulative cost of each candidate state node in the frame for S3-4 to backtrack and read. In S3-4, a process is used to eliminate abrupt changes, feedback conflicts, and missing transitions in the state chain based on the forward recursion result, enabling the output current state chain to accept subsequent dynamic threshold updates. During processing, based on the source node table, starting from the candidate state node with the lowest cumulative cost in the last frame of the current frame segment, the process backtracks frame by frame to the first frame of the current frame segment to obtain the backtracked state chain. Subsequently, the link cost is calculated for each adjacent state node in the backtracked state chain. The abrupt change value is the sum of the absolute values of the differences in lateral displacement, longitudinal displacement, equipment occurrence, equipment adjacency, and occlusion continuation values between two adjacent state nodes. The feedback conflict value is calculated based on the feedback flag; it is 0 if two feedback flags are the same, 1 if two feedback flags are different, and 0 if any feedback flag is not fed back. The missing state transition edge value is calculated based on the feedback Markov state diagram, where there is a state transition from the previous state node to the next state node. The value is 0 when a state transition edge exists and 1 when it does not. The link cost of the adjacent state node is obtained by adding the field mutation value, feedback conflict value, and missing state transition edge value. The total link cost of the backtracking state chain is used as the total link cost of the previous round. The candidate node table is read frame by frame from the first frame to the last frame of the current frame segment according to the frame number. For each frame, we try to replace it with other candidate state nodes in the same frame and recalculate the link cost of the adjacent state nodes before and after the frame. If the total link cost after replacement is lower than the total link cost before replacement, the replacement is retained; otherwise, the original state node is restored. After completing one scan from the first frame to the last frame, the total link cost of the current round is obtained. If the total link cost of the current round is lower than the total link cost of the previous round, the next round of replacement continues. If the total link cost of the current round is equal to or higher than the total link cost of the previous round, the process stops, and the sequence of state nodes with the lowest total link cost before stopping is output as the current state chain. Through processing S3-1 to S3-4, the sample records within the current frame segment are converted into a current state chain with minimum cumulative cost and low link cost. This current state chain originates from the actual displacement of the current personnel number in the construction monitoring video stream, equipment appearance, equipment adjacency, and occlusion continuation. It is also constrained by the historical transition probability and feedback count in the feedback Markov state diagram, allowing S4 to read historical detection confidence values under the same state node and perform dynamic threshold updates. In practical applications: when the same construction worker enters the duct occlusion area from the elevator platform, the safety belt detection frame disappears in some frames. S3 first... From the feedback Markov state diagram, candidate state nodes that are close to the current lateral displacement value, longitudinal displacement value, equipment appearance value, equipment adjacency value, and occlusion continuation value are extracted. Then, the initial path is determined by the total node cost and Markov transition probability. If a link in the initial path jumps directly from the elevator adjacency state to the no-equipment adjacency state, or from the effective risk state to the verification invalid state, S3-4 replaces the candidate state nodes in the same frame with the link cost, so that the current state chain is kept within the state change range of "elevator adjacency - occlusion continuation - equipment short-term absence", so that S4 can calculate the safety belt judgment threshold for this state chain.
[0021] S4. Based on the current state chain, extract the historical detection confidence values with feedback markers under the same state node, and use the safety helmet judgment threshold, safety belt judgment threshold and high-altitude operation judgment threshold as variables to be updated. The sum of the counts corresponding to the effective risk sample being judged as normal, the sample being handled and continuing to alarm, and the invalid sample being reviewed and alarming again is the loss amount. Perform projection subgradient update on the variables to be updated to generate the current dynamic threshold record. In this embodiment, S4 is used to generate the current dynamic threshold record based on the current state chain. During processing, the historical sample records corresponding to the current state chain are first read from the feedback Markov state diagram and divided into risk sample set, disposal sample set, and invalid sample set according to the feedback marker. Then, the misjudgment count is calculated based on the helmet detection confidence value, seat belt detection confidence value, and high-altitude operation detection confidence value, respectively. Finally, the helmet judgment threshold, seat belt judgment threshold, and high-altitude operation judgment threshold that can be read in the current frame segment are obtained through projection subgradient update. This implementation process includes the following steps: In S4-1, threshold samples with feedback results are extracted from historical data corresponding to the current state chain to avoid non-feedback samples participating in threshold updates. During processing, the state node number in the current state chain is read, and historical sample records with the same state node number and already marked with feedback are searched in the feedback Markov state diagram. Historical sample records marked as non-feedback are not written into the threshold sample record. Historical sample records marked as valid risks are written into the risk sample set, historical sample records marked as completed handling are written into the handling sample set, and historical sample records marked as invalid review are written into the invalid sample set. Among them, valid risk means that the central control terminal confirms that the risk corresponding to the current safety judgment record is established, and completed handling means that the on-site feedback result shows that the risk item has been rectified and the same personnel number no longer matches the corresponding risk item after rectification, and the review is invalid. This indicates that the central control unit denies the risk corresponding to the current safety judgment record. Subsequently, confidence values for safety helmet detection, safety belt detection, and high-altitude operation detection are extracted from the risk sample set, disposal sample set, and invalid sample set, respectively. The confidence value for safety helmet detection is taken from the safety helmet target detection confidence value written within the same frame for the same personnel number; the confidence value for safety belt detection is taken from the safety belt target detection confidence value written within the same frame for the same personnel number; and the confidence value for high-altitude operation detection is taken from the detection confidence value output by the high-altitude operation status detection within the same frame for the same personnel number. If the same detection type does not have a detection confidence value in the historical sample record, the historical sample record will not participate in the threshold calculation for that detection type, but will still be reserved for other detection types to read. Threshold sample records are generated from the status node number, feedback flag, detection type, and detection confidence value for S4-2 to calculate the misjudgment count. In S4-2, the threshold update problem is transformed into a process of minimizing misjudgments based on feedback results, ensuring that the adjustment direction of each judgment threshold is determined by historical feedback results. During processing, based on the threshold sample records, the safety helmet judgment threshold, safety belt judgment threshold, and high-altitude operation judgment threshold are respectively treated as variables to be updated. For the safety helmet judgment threshold, the safety helmet detection confidence value in the risk sample set is read and the number of samples less than the safety helmet judgment threshold is counted. The safety helmet detection confidence value in the disposal sample set is read and the number of samples greater than or equal to the safety helmet judgment threshold is counted. The safety helmet detection confidence value in the invalid sample set is read and the number of samples greater than or equal to the safety helmet judgment threshold is counted. The three sample counts are added together to obtain the misjudgment count for the safety helmet judgment threshold. The safety belt judgment threshold and the high-altitude operation judgment threshold are read in the same way, respectively, to obtain the safety... The system includes a false alarm count with a threshold and a false alarm count for high-altitude operations. If the confidence value of the risk sample set is less than that of the variable to be updated, it means that the confirmed risk will be judged as normal by the current variable to be updated. If the confidence value of the disposal sample set and the invalid sample set is greater than or equal to that of the variable to be updated, it means that samples that have been disposed of or invalidated will still trigger an alarm. The three counts are added together and written into the false alarm count of the corresponding variable to be updated, which is then read by S4-3 for projection subgradient update. If the risk sample set, disposal sample set, and invalid sample set corresponding to a variable to be updated are all empty, then the false alarm count for that variable to be updated is not calculated, and the corresponding threshold in the previous threshold record is used. If the previous threshold record does not exist, then the detection confidence value of the same detection type in the current frame segment is read, sorted in ascending order, and the middle value is taken as the threshold. If the number of samples is even, the average of the two middle values is taken. In S4-3, projective subgradient updates are performed on the variable to be updated within the historical detection confidence value range, generating the current dynamic threshold record for S5 to read. During processing, historical detection confidence values are read from the threshold sample record for each detection type, sorted in ascending order, and duplicate values are removed to form a confidence value sequence. The difference between two adjacent different historical detection confidence values is the confidence value interval. If the variable to be updated is equal to a historical detection confidence value in the confidence value sequence, adding a confidence value interval means updating the variable to the next adjacent historical detection confidence value, and deleting a confidence value interval means updating the variable to the previous adjacent historical detection confidence value. If the variable to be updated is not equal to a historical detection confidence value in the confidence value sequence, the variable to be updated is first written into the confidence value sequence and reordered in ascending order, and then the next adjacent value and the previous adjacent value are read. The misclassification count after adding a confidence value interval and the misclassification count after deleting a confidence value interval are calculated respectively. If the increased misclassification count is lower than the previous value, the error is considered to be correct. If the current misjudgment count is updated, the direction of increase is written as the projection subgradient update direction. If the misjudgment count after reduction is lower than the current misjudgment count, the direction of reduction is written as the projection subgradient update direction. If both the direction of increase and the direction of decrease reduce the misjudgment count and the reduced misjudgment counts are the same, the direction with the smaller distance from the variable to be updated is selected. If the distances are the same, or neither the direction of increase nor the direction of decrease reduces the misjudgment count, the variable to be updated remains unchanged. The updated variable to be updated must not be less than the minimum historical detection confidence value of the same detection type, and must not be greater than the maximum historical detection confidence value of the same detection type. If the update result exceeds the above range, the update result is written as the corresponding boundary value. After updating the safety helmet judgment threshold, safety belt judgment threshold, and high-altitude operation judgment threshold, a current dynamic threshold record is generated and the current personnel number, current state chain number, detection type, judgment threshold, and corresponding misjudgment count are written into it, so that S5 can judge the high-altitude operation status, protective equipment wearing status, and suspected occlusion status in the current frame segment. Through processing steps S4-1 to S4-3, the current dynamic threshold record is not generated by fixed empirical values, but is calculated jointly by historical detection confidence values and feedback flags under the current state chain. Valid risk samples drive the judgment threshold adjustment towards reducing missed detections, while completed processing samples and invalid review samples drive the judgment threshold adjustment towards reducing duplicate alarms. Projected subgradient updates limit each adjustment to the historical detection confidence value range of the same detection type, preventing the threshold from deviating from the data distribution of the current construction state chain. In practical applications: when the same construction worker is installing ductwork on the lifting vehicle, the safety belt detection frame may be affected by the ductwork. The obstruction disappears briefly multiple times. In the preceding feedback, some alarms are confirmed as valid risks by the central control terminal, while some alarms are invalidated due to duct obstruction. S4 reads the historical seat belt detection confidence value under the corresponding obstruction continuation state node in the current state chain, writes the valid risk samples, the completed handling samples, and the invalidated review samples into the corresponding sample sets, calculates the misjudgment count of the seat belt judgment threshold at different confidence value positions, and performs a projection subgradient update along the direction of decreasing misjudgment count to obtain the seat belt judgment threshold under the obstruction continuation state, so that S5 can distinguish between the actual absence of seat belts and the short-term low confidence value caused by obstruction in subsequent frames.
[0022] S5. Based on the current dynamic threshold record, the current state chain and the sample record in the current frame segment, determine the high-altitude operation status, protective equipment wearing status and suspected obstruction status of the current personnel number, generate the current safety judgment record, and write the on-site feedback result, portable terminal receiving result and central control terminal verification result corresponding to the current safety judgment record back to the feedback Markov state diagram. In this embodiment, S5 is used to determine the safety status of the current dynamic threshold record falling within the current frame segment, and write back the determined on-site feedback result, portable terminal reception result, and central control terminal verification result to the feedback Markov state diagram. During processing, firstly, based on the current dynamic threshold record, high-altitude operation frame numbers, protective equipment abnormality frame numbers, and suspected obstruction frame numbers are screened out from the current frame segment. Then, consecutive frame numbers are merged into risk items and items to be verified. Finally, based on the feedback result, the feedback marker count, detection confidence value sequence, and state transition edge are updated, enabling subsequent S3 and S4 to read the written-back feedback information. This implementation process includes the following steps: In S5-1, the detection confidence values within the current frame segment are converted into a set of safety status frame numbers based on the current dynamic threshold record. During processing, the safety helmet judgment threshold, safety belt judgment threshold, and high-altitude operation judgment threshold are read from the current dynamic threshold record according to the current personnel number. The safety helmet detection confidence value, safety belt detection confidence value, high-altitude operation detection confidence value, and occlusion continuation value are read frame by frame from the sample record within the current frame segment. The safety helmet detection confidence value originates from the safety helmet target detection confidence value written within the same frame for the same personnel number; the safety belt detection confidence value originates from the safety belt target detection confidence value written within the same frame for the same personnel number; and the high-altitude operation detection confidence value originates from the high-altitude operation status detection output within the same frame for the same personnel number. Frame numbers with high-altitude operation detection confidence values greater than or equal to the high-altitude operation judgment threshold are written into the high-altitude operation frame segment. Within the no-work frame segment, the frame number of the safety helmet detection confidence value being less than the safety helmet judgment threshold is written into the safety helmet abnormal frame segment, and the frame number of the safety belt detection confidence value being less than the safety belt judgment threshold is written into the safety belt abnormal frame segment. For suspected obstruction frames, the following are written according to the type of protective equipment: the frame number of the obstruction continuation value being greater than zero and the safety helmet detection confidence value being less than the safety helmet judgment threshold is written into the safety helmet obstruction suspected frame segment, and the frame number of the obstruction continuation value being greater than zero and the safety belt detection confidence value being less than the safety belt judgment threshold is written into the safety belt obstruction suspected frame segment. The safety helmet obstruction suspected frame segment and the safety belt obstruction suspected frame segment together constitute the obstruction suspected frame segment. If a frame lacks a safety helmet detection confidence value or a safety belt detection confidence value, the detection confidence value for that detection type is written as 0. If a frame lacks a high-altitude work detection confidence value, that frame is not written into the high-altitude work frame segment. If the obstruction continuation value is missing, it is treated as 0. In S5-2, discrete frame numbers are organized into a current safety judgment record that can be alarmed, reviewed, and written back. During processing, high-altitude operation frames, helmet anomaly frames, safety belt anomaly frames, and suspected obstruction frames are read separately. Consecutive frame numbers with a frame number difference of 1 under the same personnel number are merged into the same consecutive frame segment. Frame number differences greater than 1 are divided into two consecutive frame segments, each represented by its first and last frame numbers. Then, the intersection of frame numbers between the high-altitude operation frame segment and the helmet anomaly frame segment is calculated, and the corresponding consecutive frame segments are written as helmet risk items. The intersection of frame numbers between the high-altitude operation frame segment and the safety belt anomaly frame segment is calculated, and the corresponding consecutive frame segments are written as safety belt risk items. The intersection of frame numbers between the suspected obstruction frame segment and either the helmet anomaly frame segment or the safety belt anomaly frame segment is calculated, and the corresponding consecutive frame segments are written as obstruction items requiring review. When a frame number simultaneously hits both a risk item and an occlusion item awaiting review, the occlusion item awaiting review is written first. Only after the central control terminal returns the review result is it written as a valid risk or invalid review. For helmet and safety belt anomaly frame numbers that do not hit suspected occlusion frames, the corresponding risk item is written directly. The current safety judgment record includes at least the personnel number, area number, status node number, risk item, item awaiting review, start and end frame numbers, detection type, and corresponding judgment threshold. The status node number originates from the status node in the current status chain that has the same frame number, allowing S5-3 to write back the feedback Markov state diagram according to the status node number. If the high-altitude operation frame is empty, no helmet or safety belt risk item is generated for the current personnel number within the current frame. If both the risk item and the item awaiting review are empty, only the current frame is recorded as judged, without triggering feedback writing back. In S5-3, the feedback result corresponding to the current safety assessment record is written back to the feedback Markov state diagram, enabling subsequent state chain generation and dynamic threshold updates to read the state changes after feedback. During processing, the on-site feedback result, portable terminal reception result, and central control terminal review result corresponding to the current safety assessment record are read. If the current safety assessment record has been pushed and the portable terminal returns the reception time, the portable terminal reception result is written. If the on-site terminal returns the rectification completion time, and the same personnel number after rectification no longer matches the corresponding risk item in subsequent frame numbers, the corresponding feedback mark is written as "handling completed". If the portable terminal has received the feedback and the central control terminal confirms the risk is established, the corresponding feedback mark is written as "valid risk". If the central control terminal denies the establishment of the risk, the corresponding feedback mark is written as "review invalid". If the central control terminal does not return the review result and the on-site terminal does not return the rectification completion result, feedback is not provided. The flag remains unchanged without feedback, and the count of effective risks, completed actions, and invalid reviews is not increased. After the feedback flag is determined, the adjacent state nodes covered in the current state chain are read according to personnel number, area number, state node number, and start and end frame number. The feedback flag count under the corresponding state node is incremented by 1, and the confidence values of safety helmet detection, safety belt detection, and high-altitude operation detection under the corresponding frame number are written into the confidence value sequence according to the detection type. For the state transition edge formed by adjacent state nodes in the current state chain, if the state transition edge already exists in the feedback Markov state diagram, the transition count of the state transition edge is incremented by 1. If the state transition edge does not exist, a new state transition edge is added and the transition count is written as 1. Then, the Markov transition probabilities of each end node under the same starting node are recalculated to complete the update of the feedback Markov state diagram. Through processing in S5-1 to S5-3, the current dynamic threshold record is used for high-altitude operations, protective equipment wearing, and suspected occlusion detection in the current frame segment, and the multi-terminal feedback corresponding to the detection results is rewritten into the feedback Markov state diagram. Therefore, items pending review due to occlusion, valid risks confirmed by the central control terminal, completion results of on-site rectification, and invalid review results rejected by the central control terminal can all participate in the generation of the current state chain in S3 and the dynamic threshold update in S4. In practical applications: during duct installation work in rail transit depots, when the same construction worker enters a high-altitude operation state on a lift, the high-altitude operation detection confidence values in frames 220 to 238 are all greater than the high-altitude operation judgment. If the seatbelt detection confidence value in frames 224 to 231 is less than the seatbelt determination threshold, and the personnel number is continuously written into the duct obstruction target during this period, then S5 will write frames 224 to 231 as suspected seatbelt obstruction frames and generate obstruction to be reviewed items; if the central control terminal reviews and determines that the frame segment is caused by duct obstruction, S5 will write the corresponding feedback mark as invalid review and update the invalid review count and seatbelt detection confidence value sequence in the feedback Markov state diagram; if the central control terminal confirms that the seatbelt is not fastened, it will write it as a valid risk and update the number of transitions of the corresponding state transition edge so that the seatbelt determination threshold under the same obstruction continuation state can be adjusted according to the feedback results.
[0023] Furthermore, a dynamic threshold adaptive judgment system for construction safety monitoring includes: The sampling module is used to acquire construction monitoring video streams, construction area numbers, target detection results and feedback records. It links personnel targets, protective equipment targets, work equipment targets, obstructed targets and feedback results under the same personnel number by frame number to generate sample records containing personnel number, frame number, area number, target category, target location, detection confidence value, adjacency relationship and feedback mark. The mapping module, based on sample records, encodes the changes in the work position of the same personnel number in adjacent frames, the appearance status of protective equipment, the adjacency status of work equipment, the duration of occlusion, and the feedback markers as state nodes. It connects adjacent state nodes in frame number order and counts the number of transitions between state nodes, the distribution of detection confidence values, and the distribution of feedback markers to generate a feedback Markov state map. The chain-finding module performs forward recursion and backward backtracking on the state nodes of the current personnel number based on the feedback Markov state diagram and the sample records in the current frame segment. It calculates the path belonging value of each state node in the current frame segment and selects the state node sequence with the first path belonging value as the current state chain. The threshold adjustment module extracts historical detection confidence values with feedback markers under the same state node based on the current state chain. It takes the safety helmet judgment threshold, safety belt judgment threshold, and high-altitude operation judgment threshold as variables to be updated, and uses the counts corresponding to valid risk samples being judged as normal, samples that have been dealt with and continue to alarm, and invalid samples that are reviewed and alarmed again as the loss amount. It performs projection subgradient update on the variables to be updated to generate the current dynamic threshold record. The judgment module determines the high-altitude operation status, protective equipment wearing status, and suspected obstruction status of the current personnel number based on the current dynamic threshold record, the current state chain, and the sample record in the current frame segment. It generates the current safety judgment record and writes the corresponding on-site feedback result, portable terminal reception result, and central control terminal verification result back to the feedback Markov state diagram.
[0024] Working Principle: This solution first reads the detection results of personnel, safety helmets, safety belts, work equipment, and obstructions from the construction monitoring video. It then compiles the target position of the same person in consecutive frames, the presence of protective equipment, equipment adjacency, obstruction duration, and feedback results into sample records. These sample records are then encoded as state nodes, and the number of transitions, confidence value sequences, and feedback counts between adjacent state nodes are statistically analyzed to generate a feedback Markov state diagram. Subsequently, combining the sample records of the current frame segment, the solution finds the current state chain in the state diagram that best reflects the actual changes in the current person. Based on historical feedback samples under this state chain, the determination thresholds for safety helmets, safety belts, and high-altitude operations are updated through projection subgradients. Finally, the updated dynamic thresholds are used to determine whether the current person is engaged in high-altitude operations, whether there is any abnormality in protective equipment, or suspected obstruction. The results of on-site feedback, portable terminal reception, and central control terminal verification are written back to the state diagram, ensuring that the next round of determinations is further corrected by the feedback results. In the scenario of duct installation in rail transit depots, when construction workers are working on a lifting platform, cameras continuously collect the positions and confidence values of personnel, safety helmets, safety belts, the lifting platform, and obstructions in the ductwork. When a worker enters a high-altitude working state and the confidence value of the safety belt detection decreases, the system will not simply alarm based on a fixed threshold. Instead, it will consider whether the worker is currently close to the lifting platform, whether they are obstructed by the ductwork, how many frames the obstruction lasted, and the results of the central control review in similar historical situations to determine whether the situation is closer to a genuine lack of a safety belt or a short-term low confidence value caused by obstruction. If the central control confirms that the risk is valid, the system will record it as a valid risk, triggering a safety belt risk assessment more quickly in subsequent similar situations. If the central control confirms that it is a false alarm due to obstruction, the system will record it as invalid after review, reducing repeated alarms in subsequent similar obstruction situations.
[0025] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A dynamic threshold adaptive determination method for construction safety monitoring, characterized in that, include: S1. Acquire construction monitoring video stream, construction area number, target detection results and feedback records. For personnel targets, protective equipment targets, work equipment targets, obstruction targets and feedback results under the same personnel number, link them by frame number to generate sample records containing personnel number, frame number, area number, target category, target location, detection confidence value, adjacency relationship and feedback mark. S2. Based on the sample records, the changes in the work position, the appearance status of protective equipment, the adjacency status of work equipment, the duration of occlusion, and the feedback markers of the same personnel number in adjacent frames are encoded as state nodes. Adjacent state nodes are connected in order of frame number, and the number of transitions between state nodes, the distribution of detection confidence values, and the distribution of feedback markers are counted to generate a feedback Markov state diagram. S3. Based on the feedback Markov state diagram and the sample records in the current frame segment, perform forward recursion and backward backtracking on the state nodes of the current personnel number, calculate the path belonging value of each state node in the current frame segment, and select the state node sequence with the first path belonging value as the current state chain. S4. Based on the current state chain, extract the historical detection confidence values with feedback markers under the same state node, and use the safety helmet judgment threshold, safety belt judgment threshold and high-altitude operation judgment threshold as variables to be updated. The sum of the counts corresponding to the effective risk sample being judged as normal, the sample being handled and continuing to alarm, and the invalid sample being reviewed and alarming again is the loss amount. Perform projection subgradient update on the variables to be updated to generate the current dynamic threshold record. S5. Based on the current dynamic threshold record, the current state chain, and the sample record in the current frame segment, determine the high-altitude operation status, protective equipment wearing status, and suspected obstruction status of the current personnel number, generate the current safety judgment record, and write the on-site feedback result, portable terminal receiving result, and central control terminal verification result corresponding to the current safety judgment record back to the feedback Markov state diagram.
2. The dynamic threshold adaptive determination method for construction safety monitoring according to claim 1, characterized in that: S1 includes: S1-1. Based on the construction monitoring video stream and target detection results, read the top left corner x-coordinate, top left corner y-coordinate, frame width, frame height, target category and detection confidence value of each detection box in each frame. Use the top left corner x-coordinate plus half the frame width as the frame center x-coordinate and the top left corner y-coordinate plus half the frame height as the frame center y-coordinate to generate a detection box record with the frame center coordinate. S1-2. Based on the detection box record, pair up the detection boxes with the same target category in two adjacent frames, calculate the sum of the square difference between the horizontal coordinates of the two detection boxes in each pair and the square difference between the vertical coordinates of the boxes, and write the pair with the smallest sum into the same target number to generate the target trajectory record. S1-3. Based on the target trajectory record and construction area number, write the protective equipment target whose center coordinates fall within the outer frame of the personnel target in the same frame into the personnel number. Write the work equipment target and the obstructing target with the smallest sum of the square difference between the horizontal coordinate difference of the frame center and the square difference between the vertical coordinate difference of the frame center and the personnel target in the same frame into the personnel number. Then, merge the area of the overlapping area of the two frames, the size relationship of the vertical coordinate of the target frame center, and the feedback record according to the personnel number and frame number to generate a sample record.
3. The dynamic threshold adaptive determination method for construction safety monitoring according to claim 2, characterized in that: In S2, the generation of the feedback Markov state diagram includes the following steps: S2-1. Based on the sample records, read the personnel target positions of two adjacent frames according to the personnel number and frame number. Subtract the horizontal coordinate of the center of the previous frame from the horizontal coordinate of the center of the next frame to obtain the horizontal displacement value. Subtract the vertical coordinate of the center of the previous frame from the vertical coordinate of the center of the next frame to obtain the vertical displacement value. Record the number of target categories of protective equipment targets written to the personnel number as the equipment occurrence value. Record the area of the overlapping area between the two frames of the working equipment target and the personnel target as the equipment adjacency value. Record the number of frames in which the occluded target is continuously written to the personnel number as the occlusion continuation value. Generate status field records. S2-2. Based on the status field records and feedback markers, the horizontal displacement value, vertical displacement value, equipment appearance value, equipment adjacency value, occlusion continuation value and feedback marker under the same personnel number and frame number are concatenated into status nodes in a fixed field order. Status nodes with the same field value are merged into the same node number to generate a node table. S2-3. According to the node table, read the numbers of two adjacent nodes in the order of frame number of the same personnel number, take the previous node number as the starting node and the next node number as the ending node, accumulate the number of connections of the same starting node and the same ending node as the number of transitions, write the detection confidence value under the starting node into the confidence value sequence in ascending order of value, count the feedback flag under the starting node according to effective risk, handling completed, and review invalid, and generate state transition edges. S2-4. Based on the state transition edges, divide the number of transitions of each endpoint node under the same starting node by the sum of all transitions of that starting node to obtain the Markov transition probability. Then, merge the node table, state transition edges, Markov transition probabilities, confidence value sequence, and feedback flag count to generate a feedback Markov state diagram.
4. The dynamic threshold adaptive determination method for construction safety monitoring according to claim 3, characterized in that: S3 includes: S3-1. Based on the feedback Markov state diagram and the sample records in the current frame segment, read the horizontal displacement value, vertical displacement value, equipment appearance value, equipment adjacency value, occlusion continuation value and feedback flag of the current personnel number in each frame, and read the state nodes with the same field value or the smallest field value difference in the feedback Markov state diagram as candidate state nodes for the frame, and generate a candidate node table. S3-2. Based on the candidate node table, calculate the sum of field differences between each candidate state node and the sample record in the same frame. Add the absolute values of the lateral displacement value difference, longitudinal displacement value difference, equipment occurrence value difference, equipment adjacency value difference, occlusion continuation value difference, and feedback mark difference to obtain the node observation cost. Subtract the valid risk count from the invalid verification count under the candidate state node to obtain the feedback correction value. Add the node observation cost and the feedback correction value to obtain the total node cost.
5. The dynamic threshold adaptive determination method for construction safety monitoring according to claim 4, characterized in that: S3 further includes: S3-3. Based on the total cost of the nodes and the Markov transition probabilities in the feedback Markov state graph, perform forward recursion on the candidate state nodes in frame number order. Add the cumulative cost of the candidate state nodes in the previous frame, the total cost of the candidate state nodes in the current frame, and the negative logarithmic Markov transition probabilities of the corresponding state transition edges. Take the candidate state node in the previous frame with the lowest sum as the source node of the candidate state nodes in the current frame, and write the lowest sum as the cumulative cost of the candidate state nodes in the current frame to generate the source node table.
6. The dynamic threshold adaptive determination method for construction safety monitoring according to claim 5, characterized in that: S3 further includes: S3-4. Based on the source node table, starting from the candidate state node with the lowest cumulative cost in the last frame of the current frame segment, backtrack frame by frame according to the source node to the first frame of the current frame segment to obtain the backtracking state chain. Calculate the field mutation value and feedback conflict value for each adjacent state node in the backtracking state chain. Add the field mutation value, feedback conflict value, and missing state transition edge value to obtain the link cost. Replace the candidate state nodes that reduce the link cost frame by frame until the total link cost after this round of replacement is not lower than the total link cost of the previous round. Output the sequence of state nodes with the lowest total link cost as the current state chain.
7. The dynamic threshold adaptive determination method for construction safety monitoring according to claim 6, characterized in that: S4 includes: S4-1. Based on the current state chain and the feedback Markov state diagram, read the historical sample records according to the state node number in the current state chain, write the historical sample records marked as effective risks into the risk sample set, write the historical sample records marked as completed handling into the handling sample set, write the historical sample records marked as invalid for review into the invalid sample set, and extract the confidence values of safety helmet detection, safety belt detection, and high-altitude operation detection respectively to generate threshold sample records; S4-2. Based on the threshold sample records, the safety helmet judgment threshold, safety belt judgment threshold, and high-altitude operation judgment threshold are respectively taken as variables to be updated. For each variable to be updated, the number of samples with a confidence value less than the variable to be updated in the risk sample set, the number of samples with a confidence value greater than or equal to the variable to be updated in the disposal sample set, and the number of samples with a confidence value greater than or equal to the variable to be updated in the invalid sample set are counted. The three sample counts are added together to generate the misjudgment count of the variable to be updated.
8. The dynamic threshold adaptive determination method for construction safety monitoring according to claim 7, characterized in that: S4 further includes: S4-3. Based on the misjudgment count, calculate the misjudgment count after increasing the confidence value interval and the misjudgment count after decreasing the confidence value interval for each variable to be updated. Take the direction of decreasing the misjudgment count as the projection subgradient update direction. Limit the updated variable to be updated to between the minimum and maximum historical detection confidence values of the same detection type. Generate a current dynamic threshold record containing the safety helmet judgment threshold, the safety belt judgment threshold, and the high-altitude operation judgment threshold.
9. The dynamic threshold adaptive determination method for construction safety monitoring according to claim 8, characterized in that: S5 includes: S5-1. Based on the current dynamic threshold record, the current state chain, and the sample record in the current frame segment, read the safety helmet detection confidence value, safety belt detection confidence value, high-altitude operation detection confidence value, and occlusion continuation value according to the current personnel number. Write the frame number of the high-altitude operation detection confidence value that is greater than or equal to the high-altitude operation judgment threshold into the high-altitude operation frame segment. Write the frame number of the safety helmet detection confidence value that is less than the safety helmet judgment threshold in the high-altitude operation frame segment into the safety helmet abnormal frame segment. Write the frame number of the safety belt detection confidence value that is less than the safety belt judgment threshold in the high-altitude operation frame segment into the safety belt abnormal frame segment. Write the frame number of the occlusion continuation value that is greater than zero and the protective equipment detection confidence value that is less than the corresponding judgment threshold into the occlusion suspected frame segment. S5-2. Based on the high-altitude operation frame segment, safety helmet abnormality frame segment, safety belt abnormality frame segment, and suspected obstruction frame segment, merge consecutive frame segments with adjacent frame numbers under the same personnel number, generate a safety helmet risk item based on the intersection of the high-altitude operation frame segment and the safety helmet abnormality frame segment, generate a safety belt risk item based on the intersection of the high-altitude operation frame segment and the safety belt abnormality frame segment, and generate an obstruction to be reviewed item based on the intersection of the suspected obstruction frame segment and the safety helmet abnormality frame segment or the safety belt abnormality frame segment. Output the current safety judgment record containing personnel number, area number, risk item, item to be reviewed, start and end frame number, and corresponding judgment threshold. S5-3. Based on the on-site feedback results, portable terminal reception results, and central control terminal verification results corresponding to the current safety judgment record, write the on-site rectification completion as disposal completion, write the risk received by the portable terminal and confirmed by the central control terminal as valid risk, write the risk denied by the central control terminal as verification invalid, and update the feedback marker count, detection confidence value sequence, and state transition edge in the feedback Markov state diagram according to personnel number, area number, status node number, and start and end frame number.
10. A dynamic threshold adaptive determination system for construction safety monitoring, used to implement the dynamic threshold adaptive determination method for construction safety monitoring as described in any one of claims 1-9, characterized in that, include: The sampling module is used to acquire construction monitoring video streams, construction area numbers, target detection results and feedback records. It links personnel targets, protective equipment targets, work equipment targets, obstructed targets and feedback results under the same personnel number by frame number to generate sample records containing personnel number, frame number, area number, target category, target location, detection confidence value, adjacency relationship and feedback mark. The mapping module, based on sample records, encodes the changes in the work position of the same personnel number in adjacent frames, the appearance status of protective equipment, the adjacency status of work equipment, the duration of occlusion, and the feedback markers as state nodes. It connects adjacent state nodes in frame number order and counts the number of transitions between state nodes, the distribution of detection confidence values, and the distribution of feedback markers to generate a feedback Markov state map. The chain-finding module performs forward recursion and backward backtracking on the state nodes of the current personnel number based on the feedback Markov state diagram and the sample records in the current frame segment. It calculates the path belonging value of each state node in the current frame segment and selects the state node sequence with the first path belonging value as the current state chain. The threshold adjustment module extracts historical detection confidence values with feedback markers under the same state node based on the current state chain. It takes the safety helmet judgment threshold, safety belt judgment threshold, and high-altitude operation judgment threshold as variables to be updated, and uses the counts corresponding to valid risk samples being judged as normal, samples that have been dealt with and continue to alarm, and invalid samples that are reviewed and alarmed again as the loss amount. It performs projection subgradient update on the variables to be updated to generate the current dynamic threshold record. The judgment module determines the high-altitude operation status, protective equipment wearing status, and suspected obstruction status of the current personnel number based on the current dynamic threshold record, the current state chain, and the sample record in the current frame segment. It generates the current safety judgment record and writes the corresponding on-site feedback result, portable terminal reception result, and central control terminal verification result back to the feedback Markov state diagram.
