Facility collision risk alerting method, device, and storage medium

By fusing lidar point cloud data with visual data, cluster analysis and visual detection are performed, solving the problem of low accuracy in facility collision risk alarms caused by single-camera recognition, and achieving higher accuracy in risk alarms.

CN122157163APending Publication Date: 2026-06-05GUANGDONG POWER GRID MATERIALS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610350404.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-20
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing technologies, collision avoidance monitoring of facilities within the park uses a single camera for identification, which is greatly affected by lighting and occlusion, and cannot accurately obtain the distance and speed between the target and the facility, resulting in low accuracy of facility collision risk alarms.

Method used

By fusing LiDAR point cloud data and visual data, cluster analysis is performed. Based on the displacement of the cluster center coordinates, targets in the same frame are matched. Combined with the image recognition results of the visual detection module, alarms are triggered using the approach direction and distance change rate.

Benefits of technology

It improves the accuracy of facility collision risk warnings by achieving accurate target identification and precise determination of movement trends through multi-sensor fusion, thereby enhancing the accuracy of warnings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122157163A_ABST
    Figure CN122157163A_ABST
Patent Text Reader

Abstract

The application discloses a facility collision risk warning method and device and a storage medium, and relates to the technical field of data processing. The method clusters point cloud data to obtain a clustering cluster of each frame; based on the displacement of the cluster center coordinates of each clustering cluster in consecutive frames, the same frame target in the front and back frames is determined, and whether the frame target is located in the approaching direction is determined according to the displacement; when the Nth detection moment is reached, the image recognition result in the current frame is determined through a visual detection module, the camera view angle corresponding to the bounding box is matched with the azimuth angle corresponding to the frame target, the type label of the visual target in the matching successful bounding box is taken as the type label of the frame target, a tracking target is determined in the frame target according to the type label, and when the tracking target is located in the approaching direction and the distance change rate between the tracking target satisfies the warning condition, an alarm prompt is sent, and the accuracy of the facility collision risk warning is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, device and storage medium for facility collision risk alarm. Background Technology

[0002] As logistics operations in urban warehouse parks gradually increase, collisions between facilities such as light poles, signs, and fences and vehicles are becoming more frequent. Currently, collision avoidance monitoring of facilities in the parks mostly uses a single camera to identify the target category. However, the identification results are greatly affected by environmental factors such as lighting and occlusion, and it is impossible to accurately obtain the actual distance and speed between the target and the facility, making it difficult to judge the collision risk trend of the target, resulting in a low accuracy rate of risk alarms.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this application is to provide a facility collision risk alarm method, device, and storage medium, aiming to solve the technical problem of how to improve the accuracy of facility collision risk alarms.

[0005] To achieve the above objectives, this application proposes a facility collision risk alarm method, applied to a collision risk alarm device, the facility collision risk alarm method comprising:

[0006] After storing the point cloud data of each frame into the first grid, each data point is clustered based on the distance between the data points in the point cloud data of each frame and the neighboring data points in the adjacent first grid unit to obtain the cluster of each frame. Based on the displacement of the cluster center coordinates of each cluster in consecutive frames, the same frame target in consecutive frames is matched and determined, and whether the frame target is located in the approach direction is determined according to the displacement. When the Nth detection time is reached, the image recognition result in the current frame is determined by the visual detection module. The image recognition result includes the bounding box and type label of the visual target. Match the camera viewpoint corresponding to the bounding box with the azimuth angle corresponding to the frame target, and use the type label corresponding to the visual target within the successfully matched bounding box as the type label of the frame target; The tracking target is determined in the frame target based on the type label; An alarm is issued when the tracked target is located in the approach direction and the rate of change of the distance between the tracked target and the target meets the alarm conditions.

[0007] In one embodiment, before the step of storing the acquired point cloud data of each frame into a first grid, and then clustering each data point based on the distance between the data points in the point cloud data of each frame and the neighboring data points in the adjacent first grid cells to obtain the cluster of each frame, the method further includes: Polar coordinate data for each frame is collected using a lidar system, and the polar coordinate data includes azimuth and distance. The polar coordinate data is converted into Cartesian coordinates to obtain the candidate point cloud for each frame; The candidate point cloud of each frame is stored in the second grid, and the occurrence number of candidate data points in each second grid cell is accumulated; When the occurrence frequency is less than or equal to a preset threshold, the candidate data points in the second grid cell are saved as the point cloud data.

[0008] In one embodiment, the step of storing the acquired point cloud data of each frame into a first grid, and then clustering each data point based on the distance between the data points in the point cloud data of each frame and the neighboring data points in the adjacent first grid cells to obtain the cluster of each frame includes: After storing the point cloud data of each frame into the first grid, the grid coordinates of each data point are determined. Traverse unvisited data points and determine the current raster to which the current data point belongs; Search the neighboring grids of the current grid and determine the point distance between the current data point and the unvisited data point in the neighboring grid; If the distance between the points is less than a first preset distance threshold, then the unvisited data points are taken as the same cluster as the current data points to obtain a candidate cluster. The number of points in each candidate cluster is determined, and the candidate clusters with a number of points greater than a preset threshold are taken as the clusters.

[0009] In one embodiment, the step of matching and determining the same frame target in consecutive frames based on the displacement of the cluster center coordinates of each cluster in consecutive frames, and determining whether the frame target is located in the approach direction based on the displacement includes: Determine the cluster center coordinates of each cluster in each frame, and determine the cluster displacement between any two clusters in consecutive frames based on the cluster center coordinates of each cluster in consecutive frames. If the cluster displacement is less than a preset displacement threshold, then the two clusters are regarded as the same frame target; The velocity vector of the frame target is determined based on the displacement of the frame target in consecutive frames, wherein the displacement of the frame target in consecutive frames is the displacement of the cluster center coordinates of the cluster corresponding to the frame target in consecutive frames; Using the coordinates of the frame target as a position vector, the dot product of the position vector and the velocity vector is used to determine whether the frame target is located in the approach direction, wherein the coordinates of the frame target are the cluster center coordinates of the cluster corresponding to the frame target.

[0010] In one embodiment, after the step of matching the camera viewpoint corresponding to the bounding box with the azimuth angle corresponding to the frame target, and using the type label corresponding to the visual target within the successfully matched bounding box as the type label of the frame target: Store the coordinates of the frame target in consecutive frames; When the N+1th preset detection time is reached, if the visual detection module fails to identify the current frame, then within the preset time limit, the type label corresponding to each cluster in the current frame is determined according to the distance between the coordinates of the cluster center of each cluster in the current frame and the coordinates of the frame target in the previous frame. The type label corresponding to each cluster is used as the type label of the frame target corresponding to each cluster.

[0011] In one embodiment, after the step of matching and determining the same frame target in consecutive frames based on the displacement of the cluster center coordinates of each of the clusters in consecutive frames, the method further includes: If the current frame does not match the target of the previous frame in the historical frame, then the number of unmatched frames of the historical frame target is incremented. When the number of unmatched frames of the historical frame target is greater than or equal to a preset frame count threshold, the data of the historical frame target is deleted.

[0012] In one embodiment, after the step of accumulating the number of unmatched frames of the historical frame target if the current frame does not match a historical frame target in the previous frame, the method further includes: If a new frame target appears in the current frame, then the historical coordinates of the historical frame target whose number of unmatched frames is less than the preset frame number threshold are obtained; The type label of the new frame target is determined based on the distance between the coordinates of the new frame target and the historical coordinates.

[0013] In one embodiment, the step of determining the type label of the new frame target based on the distance between the coordinates of the new frame target and the historical coordinates includes: If the distance between the coordinates of the new frame target and the historical coordinates is less than a second preset distance threshold, then the type label of the historical frame target is used as the type label of the new frame target; If the distance between the coordinates of the new frame target and the historical coordinates is greater than or equal to a second preset distance threshold, then at the detection time, the type label of the new frame target is determined by the image recognition result of the visual detection module.

[0014] In addition, to achieve the above objectives, this application also proposes a facility collision risk alarm device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the facility collision risk alarm method as described above.

[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the facility collision risk alarm method described above.

[0016] This application provides a facility collision risk alarm method. After storing the point cloud data of each frame into a first grid, each data point is clustered based on the distance between it and its neighboring data points in the first grid cell, resulting in a cluster for each frame. Based on the displacement of the cluster center coordinates of each cluster in consecutive frames, the same frame target in consecutive frames is matched and determined, and the frame target is determined to be located in the approach direction based on the displacement. At the Nth detection time, the image recognition result in the current frame is determined by a visual detection module. The image recognition result includes the bounding box and type label of the visual target. The camera viewpoint corresponding to the bounding box is matched with the azimuth angle corresponding to the frame target, and the type label corresponding to the visual target within the successfully matched bounding box is used as the type label of the frame target. The tracking target is determined in the frame target based on the type label. When the tracking target is located in the approach direction and the rate of change of distance between the tracking target and the tracking target meets the alarm conditions, an alarm is issued.

[0017] The above method improves the accuracy of facility collision risk alarms by fusing lidar point cloud and visual data, accurately identifying targets and assigning type labels to targets using both visual and radar data, and triggering alarms based on both approach direction and distance change rate. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart illustrating an embodiment of the facility collision risk alarm method of this application; Figure 2 This is a flowchart illustrating Embodiment 2 of the facility collision risk alarm method in this application. Figure 3 This is a flowchart illustrating Embodiment 3 of the facility collision risk alarm method provided in this application; Figure 4 This is a flowchart illustrating Embodiment 4 of the facility collision risk alarm method in this application. Figure 5 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the facility collision risk alarm method in this application embodiment.

[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not intended to limit this application.

[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific embodiments. It should be noted that all actions involving the acquisition of signals, information, or data in this application are performed in accordance with the relevant data protection laws and regulations of the country where the application is located, and with authorization from the owner of the corresponding device.

[0024] As logistics operations in urban warehouse parks gradually increase, collisions between facilities such as light poles, signs, and fences and vehicles are becoming more frequent. Currently, collision avoidance monitoring of facilities in the parks mostly uses a single camera to identify the target category. However, the identification results are greatly affected by environmental factors such as lighting and occlusion, and it is impossible to accurately obtain the actual distance and speed between the target and the facility, making it difficult to judge the collision risk trend of the target, resulting in a low accuracy rate of risk alarms.

[0025] In view of the above problems, this application proposes a facility collision risk alarm method. The method involves storing the point cloud data of each frame into a first grid, then clustering each data point based on the distance between the data points in the point cloud data of each frame and the neighboring data points in the adjacent first grid cells to obtain a cluster for each frame. Based on the displacement of the cluster center coordinates of each cluster in consecutive frames, the method matches and determines the same frame target in consecutive frames, and determines whether the frame target is located in the approach direction based on the displacement. At the Nth detection time, the visual detection module determines the image recognition result in the current frame, which includes the bounding box and type label of the visual target. The method matches the camera viewpoint corresponding to the bounding box with the azimuth angle corresponding to the frame target, and uses the type label corresponding to the visual target within the successfully matched bounding box as the type label of the frame target. The method determines the tracking target in the frame target based on the type label. When the tracking target is located in the approach direction and the rate of change of distance between the tracking target and the tracking target meets the alarm conditions, an alarm is issued.

[0026] The above method improves the accuracy of facility collision risk alarms by fusing lidar point cloud and visual data, accurately identifying targets and assigning type labels to targets using both visual and radar data, and triggering alarms based on both approach direction and distance change rate.

[0027] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or facility collision risk alarm device capable of performing the above functions. The following description uses a facility collision risk alarm device as an example to illustrate this embodiment and the subsequent embodiments.

[0028] The facility collision risk warning device includes a lidar unit and a visual detection module. The lidar unit is used to collect point cloud data, and the visual detection module is used to identify visual targets in the monitoring area. The facility collision risk warning device can be installed on the facility to detect whether there is a collision risk between the facility and the detected targets such as vehicles or pedestrians.

[0029] Based on this, the first embodiment of this application provides a facility collision risk warning method, referring to... Figure 1 In this embodiment, the facility collision risk alarm method includes steps S10 to S60: Step S10: After storing the point cloud data of each frame into the first grid, cluster each data point based on the distance between the data points in the point cloud data of each frame and the neighboring data points in the adjacent first grid unit to obtain the cluster of each frame.

[0030] It should be noted that point cloud data is a set of three-dimensional coordinate data, including x, y, and z coordinates, obtained through LiDAR acquisition and processing. The first grid is a set of two-dimensional grid cells divided into fixed-size physical spaces by the LiDAR. Rasterization reduces the computational complexity of point cloud data. Each grid cell corresponds to a sub-region of the physical space. The first grid cell is the smallest independent grid unit constituting the first grid, and each grid cell has a unique spatial index used to locate the spatial region to which a data point belongs. Neighboring data points refer to the adjacent grid cells of a data point within the first grid cell, such as point cloud data points within an 8-neighborhood or a 4-neighborhood.

[0031] Understandably, the raw point cloud data collected by LiDAR consists of a large number of unrelated discrete spatial coordinates, and a single point cannot represent actual physical targets such as vehicles and pedestrians within the park. Clustering uses spatial proximity to group discrete points belonging to the same physical target into clusters, so that each cluster uniquely corresponds to an actual target to be monitored, such as a truck or a pedestrian, thus realizing the transformation of data points into actual monitoring targets.

[0032] Optionally, step S10 above includes steps S11 to S15: Step S11: After storing the point cloud data of each frame into the first grid, determine the grid coordinates of each data point.

[0033] The raster coordinates of a data point are the index identifier of the first raster cell to which the data point belongs. They can be represented by rows and columns and are used to locate the spatial position of the data point in the first raster, corresponding one-to-one with the physical spatial coordinates of the data point.

[0034] For example, all raw point cloud data acquired by the LiDAR in the current frame are mapped and stored in a pre-divided first grid according to their horizontal coordinates in physical space, i.e., x and y coordinates. The first grid is a two-dimensional mesh structure containing grid cells of fixed size. Then, for each data point stored in the first grid, its grid coordinates are calculated based on its physical space coordinates and the parameters of the first grid. For example, the calculation formula could be: Raster column coordinates = int(data point x-coordinate / raster cell side length), raster row coordinates = int(data point y-coordinate / raster cell side length), where int represents integer rounding. The calculated raster coordinates are then bound to the corresponding data points, and an initial unvisited state marker is added to all data points, completing all data preparation before clustering.

[0035] Step S12: Traverse the unvisited data points and determine the current grid to which the current data point belongs.

[0036] It should be noted that the current grid is the first grid cell to which the traversed unvisited data point belongs. For example, all point cloud data points marked as unvisited in the current frame are traversed, the currently unvisited data point is selected during the traversal, defined as the current data point, and the state of the current data point is marked as visited instead of unvisited. Based on the grid coordinates already bound to the current data point, the first grid cell to which it belongs is determined, and the first grid cell is defined as the current grid.

[0037] Step S13: Search the neighboring grids of the current grid and determine the point distance between the unvisited data points in the neighboring grids and the current data point.

[0038] Centered on the current grid, retrieve all first grid cells within its preset neighborhood, i.e., the aforementioned neighboring grids. Traverse all neighboring grids and select all data points that are not visited as candidate neighboring points for this clustering. For each candidate neighboring point, calculate the Euclidean distance between the candidate neighboring point and the current data point based on their physical spatial coordinates, which is then used as the aforementioned point distance.

[0039] Step S14: If the distance between the points is less than the first preset distance threshold, the unvisited data points are taken as the same cluster as the current data points to obtain a candidate cluster.

[0040] The first preset distance threshold is a pre-set distance judgment value used to distinguish whether two data points belong to the same physical target. If the distance between two data points is less than the first preset distance threshold, they are determined to belong to the same physical target.

[0041] The point distance between each candidate neighbor point calculated above and the current data point is compared one by one with a first preset distance threshold. If the point distance of a candidate neighbor point is less than the first preset distance threshold, it is determined that the candidate neighbor point and the current data point belong to the same physical target. The status of the candidate neighbor point is marked as visited, and it is added to the cluster corresponding to the current data point. The above steps S12 to S14 are repeated for the candidate neighbor point, which is used as the new current data point. Its grid is located, neighboring grids are searched and the point distance is calculated. Unvisited data points whose point distance is less than the first preset distance threshold are added to the cluster set. When there are no new unvisited data points that meet the conditions to be added, the current round of cluster expansion is stopped. The cluster set containing multiple spatially neighboring data points formed at this time is the above-mentioned candidate cluster.

[0042] Step S15: Determine the number of points in each candidate cluster, and select the candidate clusters with a number of points greater than a preset threshold as the clusters.

[0043] Traverse all candidate clusters generated in step S14 in the current frame, count the number of point cloud data points contained in each candidate cluster, compare the number of points in each candidate cluster with a preset number threshold, select candidate clusters with a number of points greater than the preset number threshold as the final cluster, and use the cluster as the valid target of the point cloud data in the current frame, and determine candidate clusters with a number of points less than or equal to the preset number threshold as noise point clusters.

[0044] The above steps first complete the spatial positioning and status marking of data points using grid coordinates. Then, starting from unvisited points, recursive aggregation of spatially nearby points is achieved through neighbor grid retrieval and Euclidean distance determination. Finally, noise points are filtered out by a point quantity threshold to obtain an effective cluster representing the actual physical target.

[0045] Step S20: Based on the displacement of the cluster center coordinates of each cluster in consecutive frames, match and determine the same frame target in consecutive frames, and determine whether the frame target is located in the approach direction based on the displacement.

[0046] It should be noted that the cluster center coordinates are the arithmetic mean of the physical spatial coordinates of all point cloud data points within each cluster. The displacement of the cluster center coordinates in consecutive frames refers to the Euclidean distance between the cluster center coordinates of two clusters in the xy horizontal plane between consecutive frames, representing the spatial difference between the two clusters in the horizontal plane. For example, the displacement calculation formula can be: Where d is the displacement, and This indicates the coordinates of the cluster centers in the next frame. and This indicates the coordinates of the cluster center in the previous frame.

[0047] For example, the displacement between each cluster in the previous and next frames is calculated first, and the frame target representing the same physical target is determined by matching with a preset displacement threshold. Then, the motion characteristics of the frame target are analyzed based on the displacement to determine whether it is located in the approaching motion direction toward the facility.

[0048] Based on this, step S20 above includes steps S21 to S23: Step S21: Determine the cluster center coordinates of each cluster in each frame, and determine the cluster displacement between any two clusters in consecutive frames based on the cluster center coordinates in consecutive frames.

[0049] Step S22: If the cluster displacement is less than a preset displacement threshold, then the two clusters are regarded as the same frame target.

[0050] For example, assuming the current frame is frame t, determine the coordinates of the cluster centers of the clusters in frame t. , ) and the cluster center coordinates of the clusters in frame t-1 ( , Let set A represent all clusters in frame t, and set B represent all clusters in frame t-1. Pair each cluster Ai in set A with each cluster Bj in set B to form all possible (Ai, Bj) pairings. For each (Ai, Bj) pair, calculate the cluster displacement dij between the cluster centers using the Euclidean distance formula. If the cluster displacement dij is less than a preset displacement threshold, determine that Ai and Bj are the same target in the same frame, and assign the same target identifier to that target.

[0051] Optionally, if the cluster displacements between Ai and multiple Bj are all less than a preset displacement threshold, the group with the smallest cluster displacement can be selected as the same frame target; if the cluster Ai in the previous frame does not have a corresponding cluster Bj in the previous frame that satisfies the displacement condition described in step S22 above, then Ai is determined to be a newly appearing frame target; if Bj does not have a corresponding Ai that satisfies the displacement condition described in step S22 above, then Bj is determined to be a frame target that has disappeared.

[0052] Step S23: Determine the velocity vector of the frame target based on the displacement of the frame target in consecutive frames, wherein the displacement of the frame target in consecutive frames is the displacement of the cluster center coordinates of the cluster corresponding to the frame target in consecutive frames.

[0053] The velocity vector is the rate of change of the displacement of a frame target over time within consecutive frames, including direction and magnitude. For example, for a matched target in the same frame, the coordinates of its cluster center in frame t are extracted (…). , ) and the cluster center coordinates of frame t-1 ( , ), calculate the coordinate difference to obtain the displacement of the target in consecutive frames: Δx= Δy= Read the frame acquisition frequency Δt of the lidar, and calculate the velocity vector (vx=Δx / Δt, vy=Δy / Δt) based on the displacement of the target in the continuous frames and the frame acquisition frequency. vx and vy together represent the motion direction and velocity magnitude of the target in the frame.

[0054] Step S24: Using the coordinates of the frame target as a position vector, determine whether the frame target is located in the approach direction based on the dot product of the position vector and the velocity vector, wherein the coordinates of the frame target are the cluster center coordinates of the cluster corresponding to the frame target.

[0055] It should be noted that the approach direction is determined based on the spatial relationship between the velocity vector and the position vector of the frame target, and the core determination logic is whether the dot product of the position vector and the velocity vector is less than 0.

[0056] For example, assuming the facility where the collision risk identification device is installed is taken as the origin, the coordinates of the cluster center of the cluster corresponding to the above frame target in the current frame are determined ( , Let be the position vector, and calculate the dot product of the position vector and the velocity vector, dot = ×vx+ ×vy. If the dot product is less than 0, it indicates that the frame target's motion direction is towards the facility, meaning the angle between the position vector and the velocity vector is >90°. The frame target is determined to be approaching the facility, posing a collision risk. If the dot product is greater than or equal to 0, it indicates that the frame target's motion direction is away from the facility. The frame target is determined to be away from the facility, posing no collision risk.

[0057] The above steps first calculate the displacement of clusters in consecutive frames, then match targets in the same frame using displacement thresholds, then calculate the velocity vector based on displacement and time difference, and finally determine the approach direction by the dot product of the position vector and the velocity vector. This achieves continuous cross-frame tracking of the target and quantification of its motion characteristics, providing a basis for determining whether there is a collision trend for risk warnings.

[0058] Step S30: When the Nth detection time is reached, the image recognition result in the current frame is determined by the visual detection module. The image recognition result includes the bounding box and type label of the visual target.

[0059] It should be noted that the Nth detection time is a pre-set visual detection trigger time node, referring to the time point when the visual detection module is triggered to work after the LiDAR completes point cloud data acquisition and processing. The visual detection module is used to acquire images of the park scene and identify visual targets within them, including a target recognition model and a camera. Preferably, deep learning models such as YOLO and RKNN, as well as RGB-D or binocular depth cameras, can be used to construct the aforementioned visual detection model. In other embodiments, the user can also self-train the model according to the application scenario or use a pre-trained target recognition model. Visual targets are physical targets identified by the visual detection module in the image, such as vehicles and pedestrians.

[0060] For example, assuming a visual detection is triggered every 5 frames of radar data, as the LiDAR continuously acquires and processes point cloud data, it counts the generated radar frames. When the frame count reaches a multiple of 5 (N times), it determines that the Nth detection moment has arrived, triggering the visual detection module's working instruction and initiating the current visual detection process. Upon receiving the working instruction, the visual detection module acquires real-time images of the current park scene through its camera and performs preprocessing to ensure the real-time images conform to the input format of the target recognition model. The preprocessed real-time images are then input into the target recognition model, which outputs the image recognition result of the visual target. The image recognition result includes at least the bounding box coordinates, confidence score, and category label of the visual target.

[0061] Step S40: Match the camera viewpoint corresponding to the bounding box with the azimuth angle corresponding to the frame target, and use the type label corresponding to the visual target within the successfully matched bounding box as the type label of the frame target.

[0062] The camera viewpoint is the horizontal azimuth angle of the visual target relative to the camera, calculated from the bounding box of the visual target. It is expressed as an angle value and shares the same spatial reference dimension as the azimuth angle of the frame target.

[0063] For example, for each visual target to be matched, the camera viewing angle is calculated based on its bounding box pixel coordinates and camera hardware parameters: First, the horizontal center pixel coordinate of the bounding box is determined as cx = (x1 + x2) / 2, where x1 is the pixel coordinate of the left side of the bounding box and x2 is the pixel coordinate of the right side of the bounding box; based on the camera hardware parameters, the pixel coordinates are converted into a horizontal azimuth angle, resulting in the camera viewing angle = horizontal center reference angle - ((cx - horizontal pixel resolution / 2) / (horizontal pixel resolution / 2) × (horizontal field of view / 2)). Here, horizontal pixel resolution represents the number of pixels in a single frame image captured by the camera in the horizontal direction; horizontal field of view represents the range of the scene that the camera can capture in the horizontal direction. The horizontal center reference angle is usually 0, meaning that the horizontal center pixel position of the image captured by the camera is defined as the 0-degree reference point of the angular coordinate system. In other embodiments, it can also be other initial settings.

[0064] The azimuth angle of a frame target refers to the horizontal spatial angle of the frame target relative to the lidar or camera, as sensed by the lidar. The arctangent radians of the cluster center coordinates of the corresponding cluster of the frame target relative to the lidar origin can be calculated. This arctangent radian value is then converted into an angle value and normalized to the range of 0~360° to obtain the azimuth angle of the frame target.

[0065] After obtaining the camera viewpoints corresponding to the aforementioned visual targets, each frame target is traversed, and the angle difference between the azimuth angle of each frame target and the camera viewpoints of all visual targets is calculated. If the angle difference between a frame target and a certain visual target is less than or equal to a preset angle matching threshold, the frame target and the visual target are determined to be the same physical target. The type label of the visual target is then mapped to the corresponding frame target, and the type label of the frame target is updated, thus completing the category definition of the frame target. The preset angle matching threshold is a critical value used to determine whether a frame target and a visual target are the same physical target. Preferably, the preset angle matching threshold can be set to 0~30°.

[0066] Optionally, for frame targets that fail to match, their type can be kept in an undefined state and they can re-participate in matching at the (N+1)th detection time; for visual targets that fail to match, they can be regarded as invalid targets and discarded.

[0067] Step S50: Determine the tracking target in the frame target according to the type label.

[0068] Step S60: When the tracking target is located in the approach direction and the rate of change of distance between the tracking target and the tracking target meets the alarm conditions, an alarm prompt is issued.

[0069] Tracking targets are specific types of targets selected from all frame targets that require focused monitoring, such as vehicles or pedestrians. Users can select the type of tracking target based on the application scenario, and then determine the tracking target by matching that type with the type label of the frame target.

[0070] After identifying the target, the system obtains the approach direction determination result of the target and the rate of change of distance between the target and the facility where the collision risk identification device is installed in consecutive frames. If the target is located in the approach direction and its corresponding rate of change of distance is greater than a preset rate threshold, it is determined that the alarm condition is met, and an alarm is issued.

[0071] Optionally, the alarm notification may include triggering the audible and visual alarms at the park facilities, such as a constantly lit red warning light and / or a continuous buzzer. Alarm information, such as the target identifier, target location, approach speed, alarm time, and real-time image of the tracked target, may also be encapsulated and pushed to the park management platform.

[0072] In this embodiment, discrete point cloud data is transformed into effective clusters through raster clustering, filtering noise while realizing the concrete extraction of physical targets from raw data, providing standardized intra-frame target units for subsequent analysis. Then, based on the coordinate displacement of the cluster center, the clusters of consecutive frames are matched to identify targets in the same frame and determine their approach direction, realizing continuous dynamic tracking of targets across frames. Subsequently, the visual detection module is triggered at a fixed frequency to obtain image recognition results, and the camera viewpoint corresponding to the visual target bounding box is matched with the azimuth angle of the frame target to complete the mapping of type labels and the updating of frame target types, realizing the fusion of radar and vision sensors, and solving the problem that a single perception method cannot accurately define the target category. Finally, vehicle-type tracking targets are filtered out from the frame targets according to the type labels, eliminating non-core monitoring objects, which greatly improves the targeting of subsequent risk assessment. Ultimately, the transformation from discrete perception data to accurate tracking targets with category and motion trend attributes is realized, improving the accuracy of alarm judgment.

[0073] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Before step S10, the facility collision risk alarm method further includes steps S70 to S100: Step S70: Collect polar coordinate data for each frame using a lidar, the polar coordinate data including azimuth and distance.

[0074] Step S80: Convert the polar coordinate data into Cartesian coordinates to obtain the candidate point cloud for each frame.

[0075] The lidar scans the monitoring area at a fixed frame rate, and all spatial point data from a single complete scan are used as a frame of polar coordinate data. Each frame of polar coordinate data includes the azimuth angle θ and distance r corresponding to each spatial point, i.e., the angle value of the radar scan and the straight-line distance from the radar to that spatial point. Taking the installation position of the lidar as the origin of the two-dimensional Cartesian coordinate system, the direction directly in front of the radar is the positive x-axis, and the horizontal direction perpendicular to the x-axis is the positive y-axis. The formulas for converting polar coordinates to Cartesian coordinates are defined as: x = r × cos(θ); y = r × sin(θ). For each spatial point, the polar coordinates are converted to Cartesian coordinates according to the above formulas to obtain the x and y coordinates of that point. All spatial points that have undergone coordinate conversion in a single frame are integrated into a point cloud set to obtain the aforementioned candidate point cloud.

[0076] Step S90: Store the candidate point cloud of each frame into the second grid, and accumulate the number of occurrences of candidate data points in each second grid unit.

[0077] Step S100: When the number of occurrences is less than or equal to a preset threshold, the candidate data points in the second grid cell are saved as the point cloud data.

[0078] The second grid is a two-dimensional mesh structure built to filter static background points. It has the same spatial dimensions as the first grid, both being xy-horizontal planes. It is used to rasterize and store candidate point clouds and count the frequency of point occurrences. The second grid cell is the smallest independent grid unit that constitutes the second grid, used to locate candidate data points and accumulate their occurrence counts in consecutive frames.

[0079] For example, all candidate data points in each frame of the candidate point cloud are traversed, and the index of the second raster cell to which it belongs is calculated based on its x and y coordinates. The candidate data point is then mapped and stored in the corresponding second raster cell. For each second raster cell, the number of times the candidate data points appear in that second raster cell across multiple consecutive frames of the candidate point cloud is continuously accumulated. If the number of occurrences of a certain second raster cell is less than or equal to a preset threshold, the candidate data points in that second raster cell are determined to be dynamic target points and are retained. If the number of occurrences of a certain second raster cell is greater than the preset threshold, the candidate data points in that cell are determined to be static background points and are filtered out and discarded.

[0080] It is understandable that static background points within the park, such as fixed facilities like the ground, light poles, signs, and walls, will continuously appear in the same second grid cell in the candidate point cloud across consecutive frames, and their occurrence count will quickly accumulate and exceed a threshold. On the other hand, the positions of dynamic target points, such as vehicles or pedestrians, will change with each frame and will not continuously appear in the same second grid cell. Therefore, by counting the occurrence counts of candidate data points in the second grid cell, data points of static targets can be filtered out, eliminating invalid data interference from fixed facilities within the park and improving the accuracy of subsequent clustering and recognition.

[0081] Based on the above embodiments of this application, in the third embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 After step S40, the facility collision risk alarm method further includes steps S110 to S130: Step S110: Store the coordinates of the frame target in consecutive frames.

[0082] In step S120, when the N+1th preset detection time is reached, if the visual detection module fails to identify the current frame, then within the preset time limit, the type label corresponding to each cluster in the current frame is determined based on the distance between the cluster center coordinates of each cluster in the current frame and the coordinates of the frame target in the previous frame.

[0083] Step S130: Use the type label corresponding to each cluster as the type label of the frame target corresponding to each cluster.

[0084] In this embodiment, all frame targets that have completed type label mapping in step S40 are acquired, and the coordinates of all frame targets are stored in the order of radar frame acquisition time. When the radar frame count reaches the N+1th preset detection time, the visual detection module is triggered to work, and the recognition result of the visual detection module is acquired in real time. If the visual detection module fails to recognize the current frame, such as no valid visual target, empty recognition result, or confidence level below the threshold, it first checks whether the time from the last successful completion of type mapping by visual detection to the current time is within a preset time limit. If it has not exceeded the preset time limit, the coordinates of the frame target that was successfully identified and completed the type labeling in the last time are acquired within the preset time limit, and the distance between the coordinates of the frame target at the last time the type was labeled and the coordinates of the cluster center of each cluster in the current frame is calculated. If the distance between a certain cluster and a certain frame target in the current frame is less than a preset distance threshold, and neither of them matches other objects, it is determined that the two are the same physical target, and the type label of the frame target is directly assigned to the cluster of the current frame as the type label of the frame target corresponding to the cluster of the current frame.

[0085] In the above embodiment, when visual detection and recognition fails at the (N+1)th detection time but within the valid time, the historical type label is carried over to the current frame cluster by matching the distance between the current frame cluster coordinates and the historical frame target coordinates. Finally, the type label of the cluster is assigned to the corresponding frame target. When target type recognition is interrupted due to temporary failure of visual detection caused by environmental or equipment factors, tracking can be quickly resumed through position matching, avoiding target loss and ensuring the continuity and effectiveness of frame target tracking.

[0086] Based on the above embodiments of this application, in the fourth embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 After step S20, the facility collision risk alarm method further includes steps S140-S150: Step S140: If the current frame does not match the historical frame target in the previous frame, then the number of unmatched frames of the historical frame target is accumulated.

[0087] Step S150: When the number of unmatched frames of the historical frame target is greater than or equal to a preset frame number threshold, delete the data of the historical frame target.

[0088] For example, all historical frame targets stored in the previous frame are obtained, and the target identifier and cluster center coordinates of each historical frame target are extracted. Based on the displacement between the cluster center coordinates of each cluster in the current frame and the cluster center coordinates of the historical frame targets in the previous frame, the same frame target in the current frame and the previous frame are matched and determined. If the displacement between the cluster center coordinates of each cluster in the current frame and the cluster center coordinates of the historical frame targets in the previous frame is greater than a preset displacement threshold, it is determined that the current frame has not matched a historical frame target in the previous frame, and the number of unmatched frames for each unmatched historical frame target is accumulated. A preset frame count threshold is obtained. If the number of unmatched frames for an unmatched historical frame target is greater than or equal to the preset threshold, it is determined that the historical frame target has left the monitoring area, and the data of the historical frame target is deleted. If the number of unmatched frames for an unmatched historical frame target is less than the preset threshold, it is determined that the historical frame target is temporarily occluded, and the data is temporarily retained for matching in the next frame to ensure the continuity of target tracking.

[0089] The above steps complete the target matching between previous and subsequent frames by shifting the cluster center. The number of unmatched historical frame targets is accumulated, and then the target is determined to have disappeared by using a preset frame number threshold. All redundant data of the targets that have been confirmed to have disappeared is deleted, which avoids the overload of computing power or storage of the embedded platform due to data redundancy, and at the same time prevents the disappearance of targets from interfering with subsequent risk assessment.

[0090] Optionally, after step S140 above, the facility collision risk alarm method further includes steps S160-S170: Step S160: If a new frame target appears in the current frame, then obtain the historical coordinates of the historical frame target whose number of unmatched frames is less than the preset frame number threshold.

[0091] Step S170: Determine the type label of the new frame target based on the distance between the coordinates of the new frame target and the historical coordinates.

[0092] If a frame target in the current frame, after matching, is not associated with any historical frame target, then that frame target is treated as a new frame target. All historical frame targets are retrieved, and those with fewer than a preset frame count of unmatched frames are selected. The cluster center coordinates and corresponding type label of each historical frame target in its most recent frame are extracted. Each new frame target in the current frame is traversed, its cluster center coordinates are extracted, and the distance between the cluster center coordinates of the new frame target and the cluster center coordinates of the aforementioned historical frame targets is calculated. Based on this distance, it is determined whether the new frame target is a recovered frame target after occlusion.

[0093] Optionally, if the distance between the coordinates of the new frame target and the historical coordinates is less than a second preset distance threshold, the new frame target is determined to be a historical frame target that reappeared after temporary occlusion, and the type label of the historical frame target is used as the type label of the new frame target.

[0094] Optionally, if the distance between the coordinates of the new frame target and the historical coordinates is greater than or equal to the second preset distance threshold, the new frame target is determined to be a brand new target that has entered the monitoring area for the first time. When the detection time is reached, the type label of the new frame target is determined by the image recognition result of the visual detection module.

[0095] In this embodiment, when a new frame target appears in the current frame, valid historical frame targets that have not reached the preset frame number threshold are first screened out and their historical coordinates are extracted. Then, by matching the distance between the coordinates of the new frame target and the historical coordinates, it is determined whether the new frame target is a historical target that is temporarily occluded. If the match is successful, the historical type label is directly used, without having to trigger visual detection repeatedly. This reduces the triggering frequency of visual detection, improves the continuity of type recognition and algorithm efficiency, and further optimizes the integrity of frame target tracking.

[0096] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the facility collision risk alarm method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0097] This application provides a facility collision risk alarm device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to execute the facility collision risk alarm method in the above embodiment 1.

[0098] The following is for reference. Figure 5 The diagram illustrates a structural schematic suitable for implementing a facility collision risk alarm device according to embodiments of this application. The facility collision risk alarm device in embodiments of this application may include, but is not limited to, fixed terminals such as facility collision risk alarm devices. Figure 5 The facility collision risk alarm device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.

[0099] like Figure 5As shown, the facility collision risk alarm device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The random access memory 1004 also stores various programs and data required for the operation of the facility collision risk alarm device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the facility collision risk alarm device to communicate wirelessly or wiredly with other devices to exchange data. Although the facility collision risk alarm device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented alternatively.

[0100] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0101] The facility collision risk alarm device provided in this application, employing the facility collision risk alarm method in the above embodiments, can solve the technical problem of how to improve the accuracy of facility collision risk alarms. Compared with the prior art, the beneficial effects of the facility collision risk alarm device provided in this application are the same as those of the facility collision risk alarm method provided in the above embodiments, and other technical features in this facility collision risk alarm device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0102] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0103] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0104] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the facility collision risk alarm method in the above embodiments.

[0105] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or flash memory, optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, radio frequency (RF), etc., or any suitable combination thereof.

[0106] The aforementioned computer-readable storage medium may be included in the facility collision risk alarm device; or it may exist independently and not be installed in the facility collision risk alarm device.

[0107] The aforementioned computer-readable storage medium carries one or more programs that, when executed by the facility collision risk alarm device, enable the facility collision risk alarm device to write computer program code for performing the operations of this application in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, or as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0108] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0109] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0110] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described facility collision risk alarm method, thereby solving the technical problem of how to improve the accuracy of facility collision risk alarms. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the facility collision risk alarm method provided in the above embodiments, and will not be repeated here.

[0111] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the facility collision risk alarm method described above.

[0112] The computer program product provided in this application solves the technical problem of how to improve the accuracy of facility collision risk warnings. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the facility collision risk warning method provided in the above embodiments, and will not be repeated here.

[0113] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for warning of facility collision risk, characterized in that, The facility collision risk warning method, applied to a collision risk warning device, includes: After storing the point cloud data of each frame into the first grid, each data point is clustered based on the distance between the data points in the point cloud data of each frame and the neighboring data points in the adjacent first grid unit to obtain the cluster of each frame. Based on the displacement of the cluster center coordinates of each cluster in consecutive frames, the same frame target in consecutive frames is matched and determined, and whether the frame target is located in the approach direction is determined according to the displacement. When the Nth detection time is reached, the image recognition result in the current frame is determined by the visual detection module. The image recognition result includes the bounding box and type label of the visual target. Match the camera viewpoint corresponding to the bounding box with the azimuth angle corresponding to the frame target, and use the type label corresponding to the visual target within the successfully matched bounding box as the type label of the frame target; The tracking target is determined in the frame target based on the type label; An alarm is issued when the tracked target is located in the approach direction and the rate of change of the distance between the tracked target and the target meets the alarm conditions.

2. The facility collision risk alarm method as described in claim 1, characterized in that, Before the step of storing the acquired point cloud data of each frame into the first grid, and clustering each data point based on the distance between the data points in the point cloud data of each frame and the neighboring data points in the adjacent first grid cell to obtain the cluster of each frame, the method further includes: Polar coordinate data for each frame is collected using a lidar system, and the polar coordinate data includes azimuth and distance. The polar coordinate data is converted into Cartesian coordinates to obtain the candidate point cloud for each frame; The candidate point cloud of each frame is stored in the second grid, and the occurrence number of candidate data points in each second grid cell is accumulated; When the occurrence frequency is less than or equal to a preset threshold, the candidate data points in the second grid cell are saved as the point cloud data.

3. The facility collision risk alarm method as described in claim 1, characterized in that, The step of storing the acquired point cloud data of each frame into the first grid, and then clustering each data point based on the distance between the data points in the point cloud data of each frame and the neighboring data points in the adjacent first grid cells to obtain the cluster of each frame includes: After storing the point cloud data of each frame into the first grid, the grid coordinates of each data point are determined. Traverse unvisited data points and determine the current raster to which the current data point belongs; Search the neighboring grids of the current grid and determine the point distance between the current data point and the unvisited data point in the neighboring grid; If the distance between the points is less than a first preset distance threshold, then the unvisited data points are taken as the same cluster as the current data points to obtain a candidate cluster. The number of points in each candidate cluster is determined, and the candidate clusters with a number of points greater than a preset threshold are taken as the clusters.

4. The facility collision risk alarm method as described in claim 1, characterized in that, The step of matching and determining the same frame target in consecutive frames based on the displacement of the cluster center coordinates of each cluster in consecutive frames, and determining whether the frame target is located in the approach direction based on the displacement, includes: Determine the cluster center coordinates of each cluster in each frame, and determine the cluster displacement between any two clusters in consecutive frames based on the cluster center coordinates of each cluster in consecutive frames. If the cluster displacement is less than a preset displacement threshold, then the two clusters are regarded as the same frame target; The velocity vector of the frame target is determined based on the displacement of the frame target in consecutive frames, wherein the displacement of the frame target in consecutive frames is the displacement of the cluster center coordinates of the cluster corresponding to the frame target in consecutive frames; Using the coordinates of the frame target as a position vector, the dot product of the position vector and the velocity vector is used to determine whether the frame target is located in the approach direction, wherein the coordinates of the frame target are the cluster center coordinates of the cluster corresponding to the frame target.

5. The facility collision risk alarm method as described in claim 1, characterized in that, After the step of matching the camera viewpoint corresponding to the bounding box with the azimuth angle corresponding to the frame target, and using the type label corresponding to the visual target within the successfully matched bounding box as the type label of the frame target: Store the coordinates of the frame target in consecutive frames; When the N+1th preset detection time is reached, if the visual detection module fails to identify the current frame, then within the preset time limit, the type label corresponding to each cluster in the current frame is determined according to the distance between the coordinates of the cluster center of each cluster in the current frame and the coordinates of the frame target in the previous frame. The type label corresponding to each cluster is used as the type label of the frame target corresponding to each cluster.

6. The facility collision risk alarm method as described in claim 1, characterized in that, After the step of matching and determining the same frame target in consecutive frames based on the displacement of the cluster center coordinates of each cluster in consecutive frames, the method further includes: If the current frame does not match the target of the previous frame in the historical frame, then the number of unmatched frames of the historical frame target is incremented. When the number of unmatched frames of the historical frame target is greater than or equal to a preset frame count threshold, the data of the historical frame target is deleted.

7. The facility collision risk alarm method as described in claim 6, characterized in that, After the step of accumulating the number of unmatched frames of the historical frame target if the current frame does not match the historical frame target, the method further includes: If a new frame target appears in the current frame, then the historical coordinates of the historical frame target whose number of unmatched frames is less than the preset frame number threshold are obtained; The type label of the new frame target is determined based on the distance between the coordinates of the new frame target and the historical coordinates.

8. The facility collision risk alarm method as described in claim 7, characterized in that, The step of determining the type label of the new frame target based on the distance between the coordinates of the new frame target and the historical coordinates includes: If the distance between the coordinates of the new frame target and the historical coordinates is less than a second preset distance threshold, then the type label of the historical frame target is used as the type label of the new frame target; If the distance between the coordinates of the new frame target and the historical coordinates is greater than or equal to a second preset distance threshold, then at the detection time, the type label of the new frame target is determined by the image recognition result of the visual detection module.

9. A facility collision risk alarm device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the facility collision risk warning method as claimed in any one of claims 1 to 8.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the facility collision risk alarm method as described in any one of claims 1 to 8.