Safety distance early warning method and system based on video monitoring and storage medium

By analyzing target stability, mapping pixel coordinates to physical space coordinates, and generating dynamic safety distance thresholds, combined with multi-dimensional risk assessment and adaptive parameter adjustment, the problems of false alarms and missed alarms in existing video monitoring systems in complex industrial environments have been solved. This has enabled accurate assessment and adaptive optimization of safety risks, thereby improving the stability and reliability of the system.

CN122223920APending Publication Date: 2026-06-16ANHUI UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI UNIV OF SCI & TECH
Filing Date
2026-03-09
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing video-based safety distance alarm systems suffer from several problems in complex industrial environments, including fixed thresholds that are difficult to adapt to complex scenarios, insufficient stability of single-frame decision-making, lack of physical interpretability of distance judgment, and low alarm reliability, leading to frequent false alarms and missed alarms.

Method used

By introducing target stability analysis, mapping pixel coordinates to physical space coordinates, dynamic safe distance threshold generation, and multi-dimensional risk assessment, combined with parameter adaptive adjustment mechanism, we can achieve target stability judgment, accurate modeling of distance relationships, and multi-dimensional assessment of risk status, thereby optimizing alarm strategies.

Benefits of technology

It improves the stability and reliability of video monitoring systems in complex industrial environments, reduces false alarm rates, enables accurate assessment and adaptive optimization of safety risks, and enhances the system's engineering interpretability and long-term operational stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122223920A_ABST
    Figure CN122223920A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of video intelligent monitoring and industrial safety control, and discloses a safety distance early warning method and system based on video monitoring and a storage medium. The method acquires real-time video data of a monitoring area, identifies target objects in video frames by using a target detection algorithm, and outputs target categories, detection frame positions and detection confidence degrees; stability analysis is performed according to the output of the target detection algorithm; the actual physical distance between targets is calculated; a dynamic safety distance threshold value is generated according to the target categories and the relative motion state between the targets; the actual physical distance is compared with the dynamic safety distance threshold value, and a comprehensive risk score is calculated in combination with target stability and scene risk level; consistency determination of the comprehensive risk score is performed in a continuous time window, and an alarm output is triggered; and the weight parameters and the score alarm threshold value are iteratively updated by using a parameter self-adaptive adjustment mechanism. The application improves the stability of system operation and the consistency of alarm determination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent video monitoring and industrial safety control technology, specifically to a method, system, and storage medium for early warning of safe distances based on video monitoring. Background Technology

[0002] In industrial settings such as mining, machining, automated production lines, and warehousing and logistics, personnel often work alongside large equipment, transportation vehicles, or automated devices in the same workspace, posing significant safety risks. To prevent accidents caused by personnel accidentally entering hazardous areas or abnormally approaching equipment, an increasing number of industrial sites are adopting video surveillance-based safety assistance systems. These systems provide 24 / 7 monitoring of work areas and trigger alarms when personnel approach hazardous areas, thereby reducing the probability of accidents. Existing technologies for monitoring the safe distance between personnel and equipment primarily include various implementations based on infrared sensors, lidar, ultrasonic sensors, and video surveillance systems. Among these, video surveillance-based solutions offer advantages such as low deployment costs, wide coverage, and the ability to simultaneously identify multiple targets, and have gradually become an important technological approach in the field of industrial safety monitoring.

[0003] In existing video-based security monitoring systems, target detection algorithms are typically used to identify people, equipment, or other dangerous targets in the video footage, and the presence of a security risk is determined based on pixel distances or preset warning zones in the image. When a target enters the preset zone or the distance between targets is less than a fixed threshold, the system triggers an alarm. However, this approach still has the following shortcomings in practical applications: 1. Existing technologies mostly use fixed safety distance thresholds for risk assessment, ignoring the differences in safety distance requirements under different target types, different operating states, and different work scenarios. This makes it difficult to achieve refined management of complex working conditions and is prone to false alarms or missed alarms in actual use. 2. Existing systems typically make alarm decisions based on single-frame detection results, lacking a mechanism for continuous analysis of targets over time. When targets are briefly occluded, the image shakes, or detection fluctuates, false alarms are easily triggered, resulting in insufficient system stability. 3. Most solutions only use the "distance between targets" as the basis for alarms, lacking the ability to comprehensively assess the target's motion state, target stability, and the risk level of the scene, making it difficult to accurately reflect and quantify safety risks; 4. Existing video monitoring systems mostly determine distance based on image pixel scale, without establishing a stable and reliable mapping relationship between pixel coordinates and physical space coordinates. This results in significant deviations in distance measurement results for the same system at different installation locations or camera angles, lacking engineering interpretability. 5. Existing safety alarm systems generally lack adaptive adjustment capabilities and cannot automatically correct parameters based on false alarms during actual operation. After long-term operation, the system performance is difficult to maintain in an ideal state, resulting in high maintenance costs.

[0004] Therefore, in complex industrial environments, how to reliably determine target stability, accurately model distance relationships, conduct multi-dimensional assessments of risk states, and adaptively optimize alarm strategies while ensuring the coverage advantages of video monitoring has become a key technical problem that urgently needs to be solved in this field. Summary of the Invention

[0005] To address the common technical problems in existing video-based safety distance alarm systems, such as fixed thresholds being difficult to adapt to complex scenarios, insufficient stability of single-frame decisions, lack of physical interpretability in distance judgment, and low alarm reliability, this invention provides a video-based safety distance early warning method, system, and storage medium.

[0006] To achieve the above objectives, the present invention provides the following technical solution: This invention discloses a method for early warning of safe distance based on video monitoring, comprising the following steps: S1. Acquire real-time video data of the monitored area, use target detection algorithms to identify target objects in video frames, and output the target category, detection box position, and detection confidence. S2. Based on the output of the target detection algorithm, perform stability analysis on the targets in consecutive video frames; S3. Based on the camera calibration parameters, construct the mapping relationship between the image pixel coordinate system and the physical space coordinate system, convert the pixel coordinates of the target into physical space coordinates, and calculate the actual physical distance between the targets; S4. Generate dynamic safety distance thresholds based on target category and relative motion between targets; S5. Compare the actual physical distance with the dynamic safety distance threshold, and perform weighted fusion based on target stability and scene risk level to calculate a comprehensive risk score; S6. Perform a consistency determination on the comprehensive risk score over a continuous time window. When the score continuously exceeds a preset score alarm threshold within the time window, trigger an alarm output. S7. Based on historical alarm records, calculate the false alarm rate and missed alarm rate, and use the parameter adaptive adjustment mechanism to iteratively update the weight parameters of step S5 and the scoring alarm threshold of step S6.

[0007] As a further improvement to the above scheme, step S2 includes the following specific steps for performing stability analysis on the target: The positional offset features of the target between adjacent video frames are obtained; the positional offset features include at least one of the target's center offset rate, the proportion of overlapping areas between adjacent frames, and the target pixel area change rate. When the positional offset feature is less than a preset stability threshold within multiple consecutive frames, the target is determined to be in a stable state.

[0008] As a further improvement to the above scheme, in step S2, the target's center offset rate is used as the position offset feature, and the calculation formula is as follows: ; In the formula, The center offset rate of the current frame t; The coordinates of the target center in the current frame t; The coordinates of the target center in the previous frame t-1; and These are the image width and height, respectively. Define the objective stability function And calculate Offset variance within the frame window : ; ; In the formula, Let i be the center offset rate of the i-th frame; for indivual The average value, The length of the time window; When satisfied Not less than the stability threshold and Not greater than the offset variance threshold At that time, the target is determined to be a stable target.

[0009] As a further improvement to the above scheme, step S3, the calculation process of the actual physical distance between targets, includes: Based on the camera's intrinsic and extrinsic parameters, construct the homography matrix under the single-plane assumption: Based on the homography matrix The physical space coordinates of the targets are solved using inverse mapping, and the actual physical distance between the targets is calculated: ; In the formula, The actual physical distance between target 1 and target 2; and These are the physical space coordinates of target 1 and target 2, respectively.

[0010] As a further improvement to the above scheme, in step S4, the formula for generating the dynamic safety distance threshold is: ; In the formula, This is a dynamic safety distance threshold; Adjustment coefficient for target type; This is the established basic safety distance; The target relative velocity; The relative acceleration of the target; and This is the dynamic amplification factor for the safety distance.

[0011] As a further improvement to the above scheme, in step S5, the formula for calculating the comprehensive risk score is as follows: ; In the formula, The actual physical distance between the two targets; This is a dynamic safety distance threshold; The preset maximum relative speed; The preset maximum relative acceleration; For the target stability in the current frame t; For the duration of risk; , , , These are the weights for target physical distance risk, target relative motion risk, target stability risk, and scenario risk, respectively.

[0012] As a further improvement to the above scheme, in step S6, an exponential sliding filter is used to process the comprehensive risk score: ; In the formula, The overall risk score for the current frame t. For comprehensive risk scoring The result after exponential sliding filter processing; The overall risk score for the previous frame t-1 The result after exponential sliding filter processing; The exponential smoothing coefficient, 0 < <1; An alarm will be triggered only if the following conditions are met: ; In the formula, The preset scoring alarm threshold; The length of the continuous time window for alarm triggering.

[0013] As a further improvement to the above scheme, in step S7, the false alarm rate is defined according to the statistical window. With false alarm rate Calculate the adjustment amount The adjustment formula for the weighting parameters is: ; ; The adjustment formula for the scoring alarm threshold is: ; In the formula, and These are the risk factor weight vectors for the updated frame t+1 and the current frame t, respectively, including the target physical distance risk for the current frame t. Risk of relative motion of the target Target stability risk Weighting of scenario risks ; The learning rate parameter; For risk assessment loss function; Let L be the gradient of the loss function L with respect to each risk weight; and These are the risk score alarm thresholds for the updated frame t+1 and the current frame t, respectively. Update the step size coefficient for the threshold; and These are the estimated missed alarm rate and the estimated false alarm rate for the current frame t, respectively.

[0014] This invention also discloses a safe distance early warning system based on video monitoring, characterized in that it applies the safe distance early warning method based on video monitoring as described above; the early warning system includes: The video acquisition module is used to acquire real-time video data of the monitored area; The target detection module is used to identify target objects in video frames using target detection algorithms, and outputs the target category, detection box position, and detection confidence score. The target stability analysis module is used to perform stability analysis on targets in consecutive video frames based on the output of the target detection algorithm. The distance mapping module is used to construct the mapping relationship between the image pixel coordinate system and the physical space coordinate system based on the camera calibration parameters, convert the pixel coordinates of the target into physical space coordinates, and calculate the actual physical distance between the targets. The dynamic safety threshold generation module is used to generate dynamic safety distance thresholds based on the target category and the relative motion state between targets. The risk assessment module is used to compare the actual physical distance with the dynamic safety distance threshold, and to perform weighted fusion based on target stability and scene risk level to calculate a comprehensive risk score. The alarm control module is used to perform a consistency judgment on the comprehensive risk score over a continuous time window. When the score continuously exceeds a preset alarm threshold within the time window, an alarm output is triggered. The parameter adaptive adjustment module is used to statistically analyze the false alarm rate and missed alarm rate based on historical alarm records, and to iteratively update the weight parameters in the risk assessment module and the scoring alarm thresholds in the alarm control module using the parameter adaptive adjustment mechanism.

[0015] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the video monitoring-based safe distance early warning method as described above.

[0016] Compared with the prior art, the beneficial effects of the present invention are: This invention introduces a target stability analysis mechanism to evaluate the motion state of a target in continuous video frames, avoiding interference from factors such as short-term occlusion, camera shake, and detection fluctuations on alarm decisions. By establishing a mapping relationship between pixel coordinates and physical space coordinates, it achieves accurate calculation of the actual physical distance between personnel and equipment, improving the reliability of video ranging results in engineering applications. By constructing a dynamic safety distance threshold model based on target type and relative motion state, it can automatically adjust the protection distance according to actual risk changes, enhancing its adaptability to complex working conditions. By integrating multi-dimensional information such as target distance, target stability, and scene risk level, it establishes a multi-factor collaborative risk assessment model, achieving a technological upgrade from "distance-triggered" alarms to "risk assessment" alarms.

[0017] Meanwhile, by setting up a continuous time consistency judgment mechanism and a parameter adaptive adjustment mechanism, this invention has the ability to suppress occasional interference, reduce false alarm rate and achieve long-term autonomous optimization, thereby achieving a more stable, reliable and intelligent safety protection effect in complex industrial environments. Attached Figure Description

[0018] Figure 1 This is a flowchart of the safe distance early warning method based on video monitoring in Embodiment 1 of the present invention. Detailed Implementation

[0019] 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.

[0020] Example 1 This embodiment provides a safety distance early warning method based on video monitoring. This method aims to address the technical pain points of traditional monitoring systems based on fixed distance thresholds in complex industrial environments (such as mining operations, machining, warehousing and logistics), which are prone to false alarms due to obstruction and vibration interference, and lack dynamic adaptability. Please refer to... Figure 1 The method includes the following steps, namely S1 to S7.

[0021] S1. Acquire real-time video data of the monitored area, use target detection algorithms to identify target objects in video frames, and output the target category, detection box position, and detection confidence.

[0022] In practical industrial applications, video capture equipment is typically deployed at high locations with open views, such as workshop aisles and areas where large equipment is operating. Object detection algorithms can employ existing deep learning vision models, such as the YOLO series or SSD. These algorithms can not only identify people and equipment but also output their two-dimensional pixel bounding boxes in the image, along with confidence scores indicating the reliability of the detection.

[0023] In this embodiment, the YOLOv5 network can be used to automatically identify personnel and equipment targets. The YOLOv5 network uses CSPDarknet as the backbone to acquire multi-scale features, achieves feature fusion at different levels through a PANet structure, and finally outputs detection candidate boxes at multiple scales through the Detect Head. The network output is as follows: ; in, For target category; , Center coordinates; , This refers to the bounding box dimensions; , where is the confidence level.

[0024] S2. Based on the output of the target detection algorithm, perform stability analysis on the targets in consecutive video frames.

[0025] Due to sudden changes in lighting, equipment obstruction, or camera jitter in industrial environments, single-frame detection results often exhibit jumps. This step uses temporal continuity analysis to filter out instantaneously drifting targets caused by these interferences, ensuring the reliability of subsequent ranging. The specific process of target stability analysis includes: The positional offset features of the target between adjacent video frames are obtained; the positional offset features include at least one of the target's center offset rate, the proportion of overlapping areas between adjacent frames, and the target pixel area change rate. When the positional offset feature is less than a preset stability threshold within multiple consecutive frames, the target is determined to be in a stable state.

[0026] In this embodiment, the target's center offset rate is used as the position offset feature, and the calculation formula is as follows: ; In the formula, The center offset rate of the current frame t; The coordinates of the target center in the current frame t; The coordinates of the target center in the previous frame t-1; and These are the image width and height, respectively. Define the objective stability function And calculate Offset variance within the frame window : ; ; In the formula, Let i be the center offset rate of the i-th frame; for indivual The average value, The time window length can be set to 3 to 5 frames and is used to measure the stability of the target trajectory in the time dimension. When satisfied Not less than the stability threshold and Not greater than the offset variance threshold At that time, the target is determined to be a stable target.

[0027] S3. Based on the camera calibration parameters, construct the mapping relationship between the image pixel coordinate system and the physical space coordinate system, convert the pixel coordinates of the target into physical space coordinates, and calculate the actual physical distance between the targets.

[0028] Traditional video surveillance often relies directly on pixel distances in images for judgment, which leads to perspective errors (objects appear larger when closer and smaller when farther away) and lacks engineering interpretability. This step transforms the two-dimensional image into a three-dimensional physical space by establishing a geometric mapping. The calculation process for the actual physical distance between targets includes: Based on the camera's intrinsic and extrinsic parameters, construct the homography matrix under the single-plane assumption: Based on the homography matrix The physical space coordinates of the targets are solved using inverse mapping, and the actual physical distance between the targets is calculated: ; In the formula, The actual physical distance between target 1 and target 2; and These are the physical space coordinates of target 1 and target 2, respectively.

[0029] S4. Generate a dynamic safety distance threshold based on the target category and the relative motion state between targets.

[0030] To adapt to complex operating conditions, the safety distance should not be static. When two targets (such as a person and a vehicle) approach each other at high speed, the system requires a longer response time. Therefore, the warning value of the safety distance should be increased in advance to achieve early warning. The formula for generating the dynamic safety distance threshold is: ; In the formula, This is a dynamic safety distance threshold; Adjustment coefficient for target type; This is the established basic safety distance; The target relative velocity; The relative acceleration of the target; and This is the dynamic amplification factor for the safety distance.

[0031] S5. Compare the actual physical distance with the dynamic safety distance threshold, and perform weighted fusion based on target stability and scene risk level to calculate a comprehensive risk score.

[0032] This step shifts the decision-making process from distance-triggered to risk-quantified, mapping information from different physical dimensions onto a unified dimensionless risk scoring scale. The formula for calculating the comprehensive risk score is: ; In the formula, The actual physical distance between the two targets; This is a dynamic safety distance threshold; The preset maximum relative speed; The preset maximum relative acceleration; For the target stability in the current frame t; For the duration of risk; , , , These are the weights for target physical distance risk, target relative motion risk, target stability risk, and scenario risk, respectively. As can be seen from the formula, distance... The closer to the threshold The larger the first value, the faster the relative speed; the larger the second value, the higher the overall risk score.

[0033] S6. Perform a consistency determination on the comprehensive risk score over a continuous time window. When the score continuously exceeds a preset score alarm threshold within the time window, trigger an alarm output.

[0034] To prevent occasional misjudgments from one or two frames from causing the alarm to sound erratically, this step introduces a time-series filtering mechanism. An exponential moving average filter is used to process the comprehensive risk score. ; In the formula, The overall risk score for the current frame t. For comprehensive risk scoring The result after exponential sliding filter processing; The overall risk score for the previous frame t-1 The result after exponential sliding filter processing; The exponential smoothing coefficient, 0 < <1; An alarm will be triggered only if the following conditions are met: ; In the formula, The preset scoring alarm threshold; The length of the continuous time window for alarm triggering can also be set to 3 to 5 frames to constrain the consistency of risk scores over time.

[0035] S7. Based on historical alarm records, calculate the false alarm rate and missed alarm rate, and use the parameter adaptive adjustment mechanism to iteratively update the weight parameters of step S5 and the scoring alarm threshold of step S6.

[0036] Traditional monitoring systems rely on repeated manual parameter tuning, resulting in high maintenance costs. This invention possesses self-learning capabilities, automatically correcting model biases based on long-term operational feedback from the field using machine learning methods such as gradient descent. It also defines the false alarm rate within a statistical window. With false alarm rate Calculate the adjustment amount The adjustment formula for the weighting parameters is: ; ; The adjustment formula for the scoring alarm threshold is: ; In the formula, and These are the risk factor weight vectors for the updated frame t+1 and the current frame t, respectively, including the target physical distance risk for the current frame t. Risk of relative motion of the target Target stability risk Weighting of scenario risks ; The learning rate parameter; For risk assessment loss function; Let L be the gradient of the loss function L with respect to each risk weight; and These are the risk score alarm thresholds for the updated frame t+1 and the current frame t, respectively. Update the step size coefficient for the threshold; and These are the estimated missed alarm rate and the estimated false alarm rate for the current frame t, respectively.

[0037] Example 2 This invention also discloses a safe distance early warning system based on video monitoring, characterized in that it applies the safe distance early warning method based on video monitoring as described in Example 1; the early warning system includes: The video acquisition module is used to acquire real-time video data of the monitored area; The target detection module is used to identify target objects in video frames using target detection algorithms, and outputs the target category, detection box position, and detection confidence score. The target stability analysis module is used to perform stability analysis on targets in consecutive video frames based on the output of the target detection algorithm. The distance mapping module is used to construct the mapping relationship between the image pixel coordinate system and the physical space coordinate system based on the camera calibration parameters, convert the pixel coordinates of the target into physical space coordinates, and calculate the actual physical distance between the targets. The dynamic safety threshold generation module is used to generate dynamic safety distance thresholds based on the target category and the relative motion state between targets. The risk assessment module is used to compare the actual physical distance with the dynamic safety distance threshold, and to perform weighted fusion based on target stability and scene risk level to calculate a comprehensive risk score. The alarm control module is used to perform a consistency judgment on the comprehensive risk score over a continuous time window. When the score continuously exceeds a preset alarm threshold within the time window, an alarm output is triggered. The parameter adaptive adjustment module is used to statistically analyze the false alarm rate and missed alarm rate based on historical alarm records, and to iteratively update the weight parameters in the risk assessment module and the scoring alarm thresholds in the alarm control module using the parameter adaptive adjustment mechanism.

[0038] Example 3 This embodiment provides a computer-readable storage medium storing a computer program thereon. When the program is executed by a processor, it implements the steps of the video monitoring-based safe distance early warning method as described in Embodiment 1.

[0039] The computer-readable storage medium may include flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage medium may be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, smart memory card, secure digital card, flash memory card, etc., provided on the computer device. Of course, the storage medium may include both internal storage units and external storage devices of the computer device. In this embodiment, the memory is typically used to store the operating system and various application software installed on the computer device. In addition, the memory can also be used to temporarily store various types of data that have been output or will be output.

[0040] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for early warning of safe distance based on video monitoring, characterized in that, Includes the following steps: S1. Acquire real-time video data of the monitored area, use target detection algorithms to identify target objects in video frames, and output the target category, detection box position, and detection confidence. S2. Based on the output of the target detection algorithm, perform stability analysis on the targets in consecutive video frames; S3. Based on the camera calibration parameters, construct the mapping relationship between the image pixel coordinate system and the physical space coordinate system, convert the pixel coordinates of the target into physical space coordinates, and calculate the actual physical distance between the targets; S4. Generate dynamic safety distance thresholds based on target category and relative motion between targets; S5. Compare the actual physical distance with the dynamic safety distance threshold, and perform weighted fusion based on target stability and scene risk level to calculate a comprehensive risk score; S6. Perform a consistency determination on the comprehensive risk score over a continuous time window. When the score continuously exceeds a preset score alarm threshold within the time window, trigger an alarm output. S7. Based on historical alarm records, calculate the false alarm rate and missed alarm rate, and use the parameter adaptive adjustment mechanism to iteratively update the weight parameters of step S5 and the scoring alarm threshold of step S6.

2. The safe distance early warning method based on video monitoring according to claim 1, characterized in that, Step S2, the specific process of performing stability analysis on the target includes: The positional offset features of the target between adjacent video frames are obtained; the positional offset features include at least one of the target's center offset rate, the proportion of overlapping areas between adjacent frames, and the target pixel area change rate. When the positional offset feature is less than a preset stability threshold within multiple consecutive frames, the target is determined to be in a stable state.

3. The safe distance early warning method based on video monitoring according to claim 2, characterized in that, In step S2, the target's center offset rate is used as the position offset feature, and the calculation formula is as follows: In the formula, The center offset rate of the current frame t; The coordinates of the target center in the current frame t; The coordinates of the target center in the previous frame t-1; and These are the image width and height, respectively. Define the objective stability function And calculate Offset variance within the frame window : In the formula, Let i be the center offset rate of the i-th frame; for indivual The average value; The length of the time window; When satisfied Not less than the stability threshold and Not greater than the offset variance threshold At that time, the target is determined to be a stable target.

4. The safe distance early warning method based on video monitoring according to claim 1, characterized in that, In step S3, the calculation process of the actual physical distance between targets includes: Based on the camera's intrinsic and extrinsic parameters, construct the homography matrix under the single-plane assumption: Based on the homography matrix The physical space coordinates of the targets are solved using inverse mapping, and the actual physical distance between the targets is calculated: In the formula, The actual physical distance between target 1 and target 2; and These are the physical space coordinates of target 1 and target 2, respectively.

5. The safe distance early warning method based on video monitoring according to claim 1, characterized in that, In step S4, the formula for generating the dynamic safety distance threshold is: In the formula, This is a dynamic safety distance threshold; Adjustment coefficient for target type; This is the established basic safety distance; The target relative velocity; The relative acceleration of the target; and This is the dynamic amplification factor for the safety distance.

6. The safe distance early warning method based on video monitoring according to claim 5, characterized in that, In step S5, the formula for calculating the comprehensive risk score is: In the formula, The actual physical distance between the two targets; This is a dynamic safety distance threshold; The preset maximum relative speed; The preset maximum relative acceleration; For the target stability in the current frame t; For the duration of risk; , , , These are the weights for target physical distance risk, target relative motion risk, target stability risk, and scenario risk, respectively.

7. The safe distance early warning method based on video monitoring according to claim 1, characterized in that, In step S6, an exponential sliding filter is used to process the comprehensive risk score: In the formula, The overall risk score for the current frame t. For comprehensive risk scoring The result after exponential sliding filter processing; The overall risk score for the previous frame t-1 The result after exponential sliding filter processing; The exponential smoothing coefficient, 0 < <1; An alarm will be triggered only if the following conditions are met: In the formula, The preset scoring alarm threshold; The length of the continuous time window for alarm triggering.

8. The safe distance early warning method based on video monitoring according to claim 1, characterized in that, In step S7, the false alarm rate is defined within the statistics window. With false alarm rate Calculate the adjustment amount The adjustment formula for the weighting parameters is: The adjustment formula for the scoring alarm threshold is: In the formula, and These are the risk factor weight vectors for the updated frame t+1 and the current frame t, respectively, including the target physical distance risk for the current frame t. Risk of relative motion of the target Target stability risk Weighting of scenario risks ; The learning rate parameter; For risk assessment loss function; Let L be the gradient of the loss function L with respect to each risk weight; and These are the risk score alarm thresholds for the updated frame t+1 and the current frame t, respectively. Update the step size coefficient for the threshold; and These are the estimated missed alarm rate and the estimated false alarm rate for the current frame t, respectively.

9. A safe distance early warning system based on video monitoring, characterized in that, The system employs the video monitoring-based safe distance early warning method as described in any one of claims 1 to 8; the early warning system comprises: The video acquisition module is used to acquire real-time video data of the monitored area; The target detection module is used to identify target objects in video frames using target detection algorithms, and outputs the target category, detection box position, and detection confidence score. The target stability analysis module is used to perform stability analysis on targets in consecutive video frames based on the output of the target detection algorithm. The distance mapping module is used to construct the mapping relationship between the image pixel coordinate system and the physical space coordinate system based on the camera calibration parameters, convert the pixel coordinates of the target into physical space coordinates, and calculate the actual physical distance between the targets. The dynamic safety threshold generation module is used to generate dynamic safety distance thresholds based on the target category and the relative motion state between targets. The risk assessment module is used to compare the actual physical distance with the dynamic safety distance threshold, and to perform weighted fusion based on target stability and scene risk level to calculate a comprehensive risk score. The alarm control module is used to perform a consistency judgment on the comprehensive risk score over a continuous time window. When the score continuously exceeds a preset alarm threshold within the time window, an alarm output is triggered. The parameter adaptive adjustment module is used to statistically analyze the false alarm rate and missed alarm rate based on historical alarm records, and to iteratively update the weight parameters in the risk assessment module and the scoring alarm thresholds in the alarm control module using the parameter adaptive adjustment mechanism.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the video monitoring-based safe distance early warning method as described in any one of claims 1 to 8.