Foreign matter detection method and safety guarantee system for test line

By installing lidar at the end of the test track and performing voxelization processing, trains and foreign objects can be identified and distinguished, thus solving the safety protection problem in the test track operating section and improving the safety of the subway train test track.

CN122067232APending Publication Date: 2026-05-19ZHUZHOU CSR TIMES ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHUZHOU CSR TIMES ELECTRIC CO LTD
Filing Date
2024-11-19
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies have failed to effectively protect against foreign objects in the operating section of subway train test tracks, posing safety hazards, especially threats to pedestrians and equipment.

Method used

A lidar unit is fixed at the end of the test track. It scans and acquires background point cloud data, performs voxelization processing, identifies and distinguishes between trains and foreign objects, and uses an edge computing processor to detect foreign objects and issue safety warnings.

Benefits of technology

It effectively protects the test track operating area, reduces personal and property losses, and improves the safety of the test track.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122067232A_ABST
    Figure CN122067232A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the field of subway operation safety guarantee, and discloses a foreign matter detection method for a test line, and the method comprises the steps: obtaining a plurality of background grid units, obtaining actual measurement point cloud data through a laser radar, and carrying out the voxelization processing of the actual measurement point cloud data, and obtaining a plurality of actual measurement grid units. And for the background grid units and the actually-measured grid units with the same voxel subscripts, when the point cloud points of the actually-measured grid units are greater than or equal to the point cloud points of the background grid units, determining the actually-measured grid units as target grid units. And clustering the point clouds of the target grid units to obtain a target object. And comparing the preset identification parameter of the target object with a preset train range, and when the preset identification parameter of the target object is not in the preset train range, determining that the target object is a foreign object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of subway operation safety assurance, and in particular to a foreign object detection method and safety assurance system for a test track. Background Technology

[0002] When subway trains are being tested on the test track, the distance from the train to the end of the track can be significantly misjudged by manual visual estimation. This could lead to excessive traction or delayed braking, causing the train to overshoot its stop and derail. Furthermore, during operation on the test track, unexpected obstacles such as pedestrians may encroach on the track's boundaries. These situations seriously threaten the safety of test personnel and cause unnecessary property damage.

[0003] To address the aforementioned needs, patent application CN216636497U, entitled "Safety Early Warning System for Test Track Operations," proposes a safety early warning scheme for train test tracks based on millimeter-wave radar ranging and speed measurement. This scheme only addresses end-point protection of the test track and does not cover related protective functions for the operating sections of the test track. Summary of the Invention

[0004] The purpose of this invention is to provide at least one method for detecting foreign objects on a test line, which can at least solve the relevant protection functions of the test line operating section.

[0005] To address the aforementioned technical problems, at least one embodiment of this application provides a foreign object detection method for a test track, wherein a lidar is fixed at the end of the test track, and the lidar is used to scan the test track under conditions where there are no trains and no foreign objects to obtain background point cloud data, including:

[0006] A number of background grid cells are acquired and measured point cloud data is acquired through the lidar; wherein, the background grid cells are obtained by voxelizing the background point cloud data, and each background grid cell has a voxel subscript, which is used to identify the position of the background grid cell in the coordinate system of the lidar.

[0007] The measured point cloud data is voxelized to obtain several measured grid cells; wherein each measured grid cell has a voxel subscript, and the voxel subscript of the measured grid cell is used to identify the position of the measured grid cell in the coordinate system of the lidar;

[0008] For the background mesh unit and the measured mesh unit with the same voxel subscript, if the number of point cloud points of the measured mesh unit is greater than or equal to the number of point cloud points of the background mesh unit, the measured mesh unit is determined to be the target mesh unit.

[0009] Cluster the point clouds of each target grid cell to obtain the target object;

[0010] When the preset identification parameters of the target object are not within the preset train range, the target object is determined to be a foreign object; wherein, the preset train range is determined based on the distribution area of ​​the train in the coordinate system of the lidar;

[0011] When the preset identification parameters of the target object are within the preset train range, the target object is determined to be a train object.

[0012] At least one embodiment of this application also provides a test track safety assurance system, including a track-end node device and an on-board node device. The track-end node device is installed at the end of the test track, and the on-board node device is installed on the train. The track-end node includes:

[0013] Edge computing processor;

[0014] A signal transmitting device for sending foreign object detection results to the vehicle-mounted node device; and

[0015] LiDAR used for collecting background point cloud data and measured point cloud data;

[0016] The edge computing processor is electrically connected to the lidar and the signal transmitting device, respectively, and is configured to process the background point cloud data and the measured point cloud data using the foreign object detection method of the test line described in any of the above embodiments, obtain the foreign object detection result, and send the foreign object detection result to the signal transmitting device.

[0017] The vehicle-mounted node device includes:

[0018] A signal receiving device for receiving the foreign object detection results; and

[0019] A safety alert device used to issue safety alert information based on the foreign object detection results;

[0020] The signal receiving device is connected to the signal transmitting device, and the safety warning device is electrically connected to the signal receiving device.

[0021] At least one embodiment of this application also provides a foreign object detection device for a test track, wherein a lidar is fixed to the end of the test track, and the lidar is used to scan the test track under conditions where there are no trains and no foreign objects to obtain background point cloud data, including:

[0022] The measured point cloud acquisition module is used to acquire a number of background grid cells and to acquire measured point cloud data through the lidar; wherein, the background grid cells are obtained by voxelizing the background point cloud data, and each background grid cell has a voxel subscript, which is used to identify the position of the background grid cell in the coordinate system of the lidar.

[0023] The measured grid acquisition module is used to perform voxelization processing on the measured point cloud data to obtain a plurality of measured grid units; wherein, each measured grid unit has a voxel subscript, and the voxel subscript of the measured grid unit is used to identify the position of the measured grid unit in the coordinate system of the lidar;

[0024] The target mesh determination module is used to determine the measured mesh unit as the target mesh unit when the number of point cloud points of the measured mesh unit is greater than or equal to the number of point cloud points of the background mesh unit and the measured mesh unit with the same voxel subscript.

[0025] The target grid clustering module is used to cluster the point clouds of each target grid cell to obtain the target object;

[0026] The foreign object identification module is used to determine that the target object is a foreign object when the preset identification parameters of the target object are not within a preset train range; wherein, the preset train range is determined according to the distribution area of ​​the train in the coordinate system of the lidar;

[0027] The train object recognition module is used to determine that the target object is a train object when the preset recognition parameters of the target object are within the preset train range.

[0028] At least one embodiment of this application also provides an electronic device, including: 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, the instructions being executed by the at least one processor to enable the at least one processor to perform the foreign object detection method of the test line described above.

[0029] At least one embodiment of this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described foreign object detection method for a test line.

[0030] The foreign object detection method for test tracks provided in the embodiments of this application involves fixing a lidar at the end of the test track. Before the test, the lidar scans the test track under conditions of no trains and no foreign objects to obtain background point cloud data. The background point cloud data is then voxelized to obtain several background grid cells. Each background grid cell has a voxel subscript, which is used to identify the position of the background grid cell in the lidar's coordinate system. A background grid cell is a spatial region in the lidar's coordinate system. This spatial region may or may not contain point clouds. The number of point clouds in a background grid cell that contains point clouds may also be different. The number of point clouds in a background grid cell is the number of point clouds belonging to that background grid cell. During testing, several background grid cells and measured point cloud data were acquired via LiDAR. The measured point cloud data was voxelized to obtain several measured grid cells, each with a voxel index. The voxel index of the measured grid cell identifies its position in the LiDAR coordinate system. When the voxel index of a measured grid cell is the same as that of a background grid cell, it indicates that the measured grid cell and the background grid cell are located in the same area in the LiDAR coordinate system, representing the same location under different road conditions in the test track environment. For background and measured grid cells with the same voxel index, if the number of points in the measured grid cell's point cloud is greater than or equal to the number of points in the background grid cell's point cloud, it indicates that the environmental location recorded by the measured grid cell may have an object present compared to a road condition without trains or foreign objects. This object could be a train or a foreign object. These measured grid cells are then identified as target grid cells. The point clouds of each target grid cell are then clustered to obtain the target objects. The system compares the preset identification parameters of the target object with a preset train range. These preset identification parameters, such as width and height, are used to identify and determine the train's location. The preset train range is determined in advance based on the train's distribution area in the lidar coordinate system. If the target object's preset identification parameters are not within this range, it indicates that the object is not in the area where trains typically operate, and the target object is identified as a foreign object. Conversely, if the target object's preset identification parameters are within the preset train range, it indicates that the object is in the area where trains typically operate, and the target object is identified as a train object. Therefore, protection can be implemented in the test track operating area. When a foreign object is detected, appropriate adjustments or warnings can be issued, thus achieving protection of the test track operating area. Attached Figure Description

[0031] One or more embodiments are illustrated by way of example with reference to the accompanying drawings, and these illustrative descriptions do not constitute a limitation on the embodiments.

[0032] Figure 1 This is a flowchart of a foreign object detection method for a test line provided in one embodiment of this application;

[0033] Figure 2 This is a schematic diagram of a test line scenario in existing technology. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been provided in the various embodiments of this application to help readers better understand this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.

[0035] To facilitate understanding of the embodiments of this application, relevant content regarding test line protection will be introduced first.

[0036] When subway trains are being tested on the test track, if the distance between the train and the end of the test track deviates significantly from the distance as visually observed, the train may derail due to excessive traction or untimely braking. Furthermore, during testing, subway trains may encounter unexpected obstacles such as moving pedestrians encroaching on the track's boundaries. These situations seriously threaten the personal safety of test personnel and cause unnecessary property damage.

[0037] To address the aforementioned needs, the patent application CN216636497U, entitled "Test Track Operation Safety Early Warning System," proposes a train test track safety early warning scheme based on millimeter-wave radar ranging and speed measurement. To implement this scheme, signal transmitting base stations need to be pre-installed at specific locations; simultaneously, ranging and speed measurement functions need to be implemented at designated locations; finally, this scheme only addresses protection at the end of the test track and does not cover related protection functions within the test track's operating section.

[0038] To address the aforementioned technical problem of the lack of protection for the test line, this invention proposes a foreign object detection method for the test line. The implementation details of the foreign object detection method for the test line in this embodiment are described below. The following implementation details are provided for ease of understanding and are not essential for implementing this solution.

[0039] Example 1:

[0040] The foreign object detection method for the test line in this embodiment can be applied to electronic devices with communication, computing, and data storage capabilities. Its specific process can be as follows: Figure 1 As shown, it includes:

[0041] Step 110: Obtain a number of background grid cells and acquire measured point cloud data through the lidar; wherein, the background grid cells are obtained by voxelizing the background point cloud data, and each background grid cell has a voxel subscript, which is used to identify the position of the background grid cell in the coordinate system of the lidar.

[0042] Specifically, a lidar is fixed at the end of the test track. The lidar is used to scan the test track under conditions where there are no trains or foreign objects to obtain background point cloud data. The measured point cloud data and the background point cloud data are acquired by the lidar at the same location. The measured point cloud data can be obtained by superimposing several frames of point clouds acquired by the lidar, and the background point cloud data can also be obtained by superimposing several frames of point clouds acquired by the lidar. The lidar points in the point cloud are distributed in the lidar's coordinate system. The lidar's coordinate system has the X-axis pointing towards the direction of the oncoming train, the Y-axis pointing to the left when facing the oncoming train, and the Z-axis pointing away from the ground.

[0043] Using preset discrete lengths Δx, Δy, and Δz, voxelization is performed on the laser points in the background point cloud data to obtain background mesh elements. For coordinates (x... p ,y p ,z p The laser point, whose background mesh cell voxel subscript (l) p ,m p ,n p )for:

[0044]

[0045] Where "[]" represents the rounding down operator. Voxelization divides the coordinate system of the LiDAR containing the background point cloud data into multiple cubic regions, i.e., background grid cells. The X-axis is defined by the minimum and maximum values ​​of all LiDAR points in the background point cloud data, the Y-axis by the minimum and maximum values ​​of all LiDAR points in the background point cloud data, and the Z-axis by the minimum and maximum values ​​of all LiDAR points in the background point cloud data. The region enclosed by the boundaries of the X, Y, and Z axes is divided into background grid cells. The background grid cells distributed for each LiDAR point in the background point cloud data are calculated, using l p ,m p ,n p The voxel subscript indicates the position of the background grid cell where the laser point is located. The voxel subscript is used to identify the position of the background grid cell in the coordinate system of the lidar.

[0046] Step 120: Voxelize the measured point cloud data to obtain a plurality of measured grid cells; wherein, each measured grid cell has a voxel subscript, and the voxel subscript of the measured grid cell is used to identify the position of the measured grid cell in the coordinate system of the lidar.

[0047] Specifically, using preset discrete lengths Δx, Δy, and Δz, the laser points in the measured point cloud data are voxelized to obtain the measured mesh elements. For coordinates (x... n ,y n ,z n The laser points of the measured point cloud data, and the voxel subscripts of the measured grid cells (l) n ,m n ,n n )for:

[0048]

[0049] Where "[]" represents the floor function. Voxelization divides the coordinate system of the lidar containing the measured point cloud data into multiple cubic regions, i.e., measured grid cells. The X-axis boundary is defined by the minimum and maximum values ​​of all lidar points in the measured point cloud data; the Y-axis boundary is defined by the minimum and maximum values ​​of all lidar points in the measured point cloud data; and the Z-axis boundary is defined by the minimum and maximum values ​​of all lidar points in the measured point cloud data. Measured grid cells are then divided within the regions bounded by the boundaries on the X, Y, and Z axes. The measured grid cells distributed for each lidar point in the measured point cloud data are calculated, using l n ,m n ,n n The voxel subscript indicates the position of the measured grid cell containing the laser point in the coordinate system of the lidar.

[0050] Step 130: For the background mesh unit and the measured mesh unit with the same voxel subscript, if the number of point cloud points of the measured mesh unit is greater than or equal to the number of point cloud points of the background mesh unit, the measured mesh unit is determined as the target mesh unit.

[0051] Specifically, since the background point cloud data and the measured point cloud data are acquired by the same LiDAR at the same location, and the acquisition area is the same, the same object in the acquisition area is located at the same position in both the LiDAR coordinate system of the background point cloud data and the LiDAR coordinate system of the measured point cloud data. Because the measured point cloud data and the background point cloud data use the same preset discrete lengths Δx, Δy, and Δz, the division of background grid cells and measured grid cells in the LiDAR coordinate system is the same. Therefore, laser points at the same location in the LiDAR coordinate system are distributed in background grid cells and measured grid cells with the same voxel subscript. The background point cloud data is obtained by scanning the test track under road conditions without trains or foreign objects. For inherent objects in the road conditions, such as test track tracks and signs, there are corresponding laser points in both the background point cloud data and the measured point cloud data. For trains and / or foreign objects, there are no corresponding laser points in the background point cloud data, but there may be corresponding laser points in the measured point cloud data. Therefore, when trains and / or foreign objects are collected in real time, the number of laser points in the measured point cloud data is greater than the number of laser points in the background point cloud data.

[0052] To determine the location of the train and / or foreign object, the point cloud counts of background and measured grid cells with the same voxel subscript are compared. When the point cloud count of the measured grid cell is greater than or equal to the point cloud count of the background grid cell, it indicates that the measured grid cell may have captured the laser points corresponding to the train and / or foreign object. Therefore, its point cloud count is greater than that of the background grid cell that did not capture the train and / or foreign object. The measured grid cell is then identified as the target grid cell, which is the cell to be analyzed subsequently.

[0053] Step 140: Cluster the point clouds of each target grid cell to obtain the target object.

[0054] Specifically, since the laser points corresponding to objects such as trains and / or foreign objects may be distributed in different measured grid cells, in order to comprehensively analyze the type of the object, the point clouds of all target grid cells are clustered. The point clouds of target grid cells can be processed by a density-based clustering algorithm with noise to obtain the target object.

[0055] Step 150: When the preset identification parameters of the target object are not within the preset train range, the target object is determined to be a foreign object; wherein, the preset train range is determined based on the distribution area of ​​the train in the coordinate system of the lidar.

[0056] Specifically, to analyze the type of the target object, the preset identification parameters of the target object are analyzed. These preset identification parameters are used to distinguish between trains and foreign objects. Since trains and foreign objects differ in shape and motion state, the preset identification parameters can be parameters related to shape and motion state, such as width, height, area, direction of movement, and speed. The preset train range is determined based on the distribution area of ​​train-type target objects in the lidar coordinate system. The range of its preset identification parameters, i.e., the preset train range, is determined based on this distribution area. When the preset identification parameters of the target object are not within the preset train range, it indicates that the distribution area of ​​the target object in the lidar coordinate system differs from that of train-type target objects, thus identifying the target object as a foreign object. In this case, a warning signal can be generated.

[0057] Step 160: When the preset identification parameters of the target object are within the preset train range, the target object is determined to be a train object.

[0058] Specifically, when the preset identification parameters of the target object are within the preset train range, it indicates that the distribution area of ​​the target object in the coordinate system of the lidar is approximately the distribution area of ​​the train type target object in the coordinate system of the lidar, and the target object is determined to be a train object.

[0059] In this embodiment, the foreign object detection method for the test track involves fixing a lidar at the end of the test track. Before the test, the lidar scans the test track under conditions of no trains and no foreign objects to obtain background point cloud data. The background point cloud data is then voxelized to obtain several background grid cells. Each background grid cell has a voxel subscript, which is used to identify the position of the background grid cell in the lidar's coordinate system. A background grid cell is a spatial region in the lidar's coordinate system. This spatial region may or may not contain point clouds. The number of point clouds in a background grid cell that contains point clouds may also be different. The number of point clouds in a background grid cell is the number of point clouds belonging to that background grid cell. During testing, several background grid cells and measured point cloud data were acquired via LiDAR. The measured point cloud data was voxelized to obtain several measured grid cells, each with a voxel index. The voxel index of the measured grid cell identifies its position in the LiDAR coordinate system. When the voxel index of a measured grid cell is the same as that of a background grid cell, it indicates that the measured grid cell and the background grid cell are located in the same area in the LiDAR coordinate system, representing the same location under different road conditions in the test track environment. For background and measured grid cells with the same voxel index, if the number of points in the measured grid cell's point cloud is greater than or equal to the number of points in the background grid cell's point cloud, it indicates that the environmental location recorded by the measured grid cell may have an object present compared to a road condition without trains or foreign objects. This object could be a train or a foreign object. These measured grid cells are then identified as target grid cells. The point clouds of each target grid cell are then clustered to obtain the target objects. The system compares the preset identification parameters of the target object with a preset train range. These preset identification parameters, such as width and height, are used to identify and determine the train's location. The preset train range is determined in advance based on the train's distribution area in the lidar coordinate system. If the target object's preset identification parameters are not within this range, it indicates that the object is not in the area where trains typically operate, and the target object is identified as a foreign object. Conversely, if the target object's preset identification parameters are within the preset train range, it indicates that the object is in the area where trains typically operate, and the target object is identified as a train object. Therefore, protection can be implemented in the test track operating area. When a foreign object is detected, appropriate adjustments or warnings can be issued, thus achieving protection of the test track operating area.

[0060] In one embodiment, the method further includes:

[0061] Based on the position of the target object in the coordinate system of the lidar, the distance between the target object and the end of the test track is detected to obtain the target distance.

[0062] In this embodiment, to facilitate the staff's response and obtain the positions of each laser point of the target object, the origin of the lidar coordinate system is used as the position of the lidar located at the end of the test track. The distance between the laser point of the target object and the origin is calculated to obtain the target distance. The laser point closest to the end of the test track can be selected for distance calculation. Alternatively, one laser point can be selected from all the laser points of the target object to calculate the target distance. The point cloud corresponding to the test track is distributed in the XOY plane of the lidar coordinate system. The extension path of the test track is parallel to the X-axis, and the test track is in the positive direction of the X-axis. The X-axis coordinate value of the target object is greater than 0. To improve the accuracy of the target distance calculation, the X-axis coordinate values ​​of each laser point of the target object are sorted from smallest to largest. The laser point in the [N′ / 10] range is selected for distance calculation, and the X-axis coordinate value of this laser point is taken as the target distance. The laser points sorted in [N′ / 10] are chosen because there may be laser points that do not belong to the train and / or foreign objects that are clustered into the target object. The more point cloud points contained in the target object, the greater the possibility of this happening. These interfering laser points are generally located at the edge of the target object. Therefore, choosing laser points sorted in [N′ / 10] can minimize the influence of interfering laser points.

[0063] In one embodiment, the step of determining the measured mesh cell as the target mesh cell when the point cloud point count of the measured mesh cell is greater than or equal to the point cloud point count of the background mesh cell and the measured mesh cell with the same voxel subscript includes:

[0064] Calculate the number of laser points whose distance from the center position of the measured grid cell is within a preset distance range to obtain the point cloud point count of the measured grid cell;

[0065] When the number of point cloud points of the measured grid cell is greater than the first occupancy threshold, the measured grid cell is determined to be in an occupied state.

[0066] For the background grid cell and the measured grid cell with the same voxel subscript, when the measured grid cell is in the occupied state and the background grid cell is in the vacant state, the measured grid cell is determined to be the target grid cell; wherein, the background grid cell with a point cloud point count less than the second occupancy threshold is in the vacant state.

[0067] In this embodiment, to improve the screening speed of target grid cells, after dividing the background grid cells, each background grid cell is voxel-marked, and the number of laser points belonging to the background grid cell is counted to obtain the point cloud count of the background grid cell. The state of the background grid cell is marked according to the point cloud count. When the point cloud count is less than a second occupancy threshold, the background grid cell is marked as being in an empty state; when the point cloud count is greater than the second occupancy threshold, the background grid cell is marked as being in an occupied state. An empty background grid cell indicates that there are no laser points in the background grid cell when there are no foreign objects and no trains running on the test track. An occupied background grid cell indicates that there are laser points in the background grid cell when there are no foreign objects and no trains running on the test track. In the actual measurement phase, the center position of each measured grid cell is obtained, and the distance between the laser point and the center position of the measured grid cell is calculated. When this distance is within a preset distance range, it indicates that the laser point belongs to the measured grid cell. The number of laser points belonging to the measured grid cell is counted to obtain the point cloud count of the measured grid cell. When the number of point cloud points in a measured grid cell exceeds the first occupancy threshold, the measured grid cell is determined to be in an occupied state. The first and second occupancy thresholds can be the same or different. An empty measured grid cell indicates that no laser points exist in that measured grid cell during safety assurance procedures in the measurement phase. An occupied measured grid cell indicates that laser points exist in that background grid cell during safety assurance procedures in the measurement phase. Background grid cells and measured grid cells with the same voxel subscript belong to the same acquisition area in the test track environment. When the measured grid cell is in the occupied state and the background grid cell is in the empty state, it indicates that there are no objects in the acquisition area under conditions of no foreign objects and no train operation, but objects exist during safety assurance procedures in the measurement phase. This measured grid cell is then identified as the target grid cell. The objects acquired by this measured grid cell are analyzed to determine whether the object belongs to a train or a foreign object.

[0068] In this embodiment, the center position of the measured mesh cell can be determined based on the voxel subscript. Each measured mesh cell is traversed, and the center position of the measured mesh cell is calculated based on its voxel subscript. The formula for calculating the center position of the measured mesh cell is as follows:

[0069]

[0070] In the formula, (l ni ,m ni ,n ni (x) represents the voxel subscript of the measured mesh element. ni ,y ni ,z ni) represents the center position of the measured mesh element, Δx is the preset discrete length on the X-axis, Δy is the preset discrete length on the Y-axis, and Δz is the preset discrete length on the Z-axis. min y min z min This refers to a portion of the detection area's boundary in the measured point cloud data, specifically the boundary closest to the origin along the X, Y, and Z axes. The coordinates of each laser point in the measured point cloud data are iterated through, and statistics are compiled to satisfy xx... ni |≤Δx、|yy ni |≤Δy and |zz ni The number of laser points with |≤Δz is used to obtain the center position (x ni ,y ni ,z ni The number of point cloud points in the measured grid cell.

[0071] The number of point clouds in the background mesh unit is obtained by counting the number of laser points whose distance from the center position of the background mesh unit is within a preset distance range. The center position of the background mesh unit can be determined based on its voxel subscript. By traversing each background mesh unit, the center position of the background mesh unit is calculated based on the voxel subscript of the background mesh unit. The formula for calculating the center position of the background mesh unit is as follows:

[0072]

[0073] In the formula, (l pi ,m pi ,n pi (x) represents the voxel subscript of the background mesh cell. pi ,y pi ,z pi ) represents the center position of the background grid cell, Δx is the preset discrete length on the X-axis, Δy is the preset discrete length on the Y-axis, and Δz is the preset discrete length on the Z-axis. min y min z min This refers to a portion of the detection region's boundary in the background point cloud data, specifically the boundary closest to the origin along the X, Y, and Z axes. The coordinates of each laser point in the background point cloud data solution are iterated through, and statistics are compiled to satisfy xx... pi |≤Δx、|yy pi |≤Δy and |zz pi The number of laser points with |≤Δz is used to obtain the center position (x pi ,y pi ,z pi The number of point clouds in the background grid cells.

[0074] In one embodiment, the step of determining the target object as a foreign object when the preset identification parameters of the target object are not within a preset train range includes:

[0075] Based on the distribution of the target object in the coordinate system of the lidar, calculate the width, height, and center position of the target object;

[0076] When the width of the target object is not within the preset width range and / or the height of the target object is not within the preset height range and / or the center position of the target object is not within the track of the test line, the target object is determined to be a foreign object.

[0077] The step of determining the target object as a train object when the preset identification parameters of the target object are within the preset train range includes:

[0078] When the width of the target object is within the preset width range, the height of the target object is within the preset height range, and the center position of the target object is within the track area of ​​the test track, the target object is determined to be the train object; wherein the preset train range includes the preset width range, the preset height range, and the track area of ​​the test track.

[0079] In this embodiment, the preset identification parameters are at least one of the target object's width, height, and center position. The preset train range includes a preset width range, a preset height range, and the test track area. When the target object's width is not within the preset width range, it indicates that the target object's width does not conform to the width of a train object, and / or, when the target object's height is not within the preset height range, it indicates that the target object's height does not conform to the height of a train object, and / or, when the target object's center position is not within the test track area, the target object is determined to be a foreign object and may not be moving along the test track. When at least one of the three preset identification parameters of the target object does not conform to the corresponding preset train range, the target object is not a train object and may be a foreign object. When the target object's width is within the preset width range, the target object's height is within the preset height range, and the target object's center position is within the test track area, it indicates that the target object conforms to the conditions of a train object when considering the width, height, and center position, and the target object is determined to be the train object.

[0080] In this embodiment, the minimum value of the laser point on the target object in the X-axis direction is x′. min The maximum value in the X-axis direction is x′ max The minimum value in the Y-axis direction is y′. min The maximum value in the Y-axis direction is y′ max The minimum value in the Z-axis direction is z′.min The maximum value in the Z-axis direction is z′ max The width of the target object is y′ max -y′ min The height of the target object is z′ max -z′ min The center position of the target object is (x0, y0), where, The center position (x0, y0) satisfies the following formula:

[0081]

[0082] In the formula, δ is a preset coefficient, with a value range of 0.5 ≤ δ < 0.8. Due to the calculation method of the center coordinates and the scanning of different train models by different types of lidar, the returned points may be missing to varying degrees. This could be because the lower half of the train is painted black, causing more energy absorption of the laser beam. The returned laser beam will then be less intense, resulting in a significant loss of laser points in the measured point cloud data of that part of the train. The value of the preset coefficient δ can be dynamically adjusted depending on the train model to be inspected on-site.

[0083] In one embodiment, the step of voxelizing the measured point cloud data to obtain a plurality of measured grid cells includes:

[0084] Obtain the position of each laser point in the measured point cloud data;

[0085] Delete the laser points whose positions are not in the preset boundary area from the measured point cloud data to obtain a preliminary filtered point cloud;

[0086] Remove laser points whose positions are not in the track area of ​​the test track and whose distance from the test track is not within the detection height range from the preliminary screening point cloud to obtain the measured point cloud of interest;

[0087] The measured point cloud of interest is voxelized to obtain several measured mesh elements.

[0088] In this embodiment, the laser points in the measured point cloud data reflect different objects and locations in the test track environment. The objects for which safety measures are set are mainly trains and foreign objects near the test track. To improve the voxelization speed, detection areas, i.e., preset boundary areas, are set according to the possible locations of trains and foreign objects. Boundaries are set on the X, Y, and Z axes respectively. For example, on the X-axis, the boundary closest to the origin is set. min The boundary x closest to the origin max Set the boundary y-axis closest to the origin. min The boundary y closest to the origin maxSet the boundary z on the Z-axis that is closest to the origin. min The boundary z closest to the origin max This results in six boundaries forming a preset boundary area. The location of laser points in the measured point cloud data is checked against this preset boundary area; laser points outside this area are deleted, resulting in a preliminary filtered point cloud. For targeted detection of the train's operating section, the track area of ​​the test track traversed by the train is also checked. The test track area is, for example, the distance between the left and right tracks of the test track. The location of laser points in the preliminary filtered point cloud is checked against this test track area. If a laser point is not located between the left and right tracks, it is deleted from the preliminary filtered point cloud. The train's height and the distance between the highest point of the train and the left / right track can be predetermined. To ensure safety near the train, laser points whose distance from the test track is outside the detection height range are deleted. The detection height range is greater than the train's height to ensure comprehensive safety detection of the train. Laser points whose locations are not within the test track area and whose distance from the test track is not within the detection height range are removed from the initial point cloud. The measured point cloud of interest is obtained, and then voxelized to obtain several measured mesh cells, thus reducing the voxelized area.

[0089] To ensure that the voxel indices of the measured mesh cells at the same location correspond to the voxel indices of the background mesh cells, the process of voxelizing the background point cloud data to obtain the background mesh cells includes the following steps:

[0090] Obtain the position of each laser point in the background point cloud data;

[0091] Delete the laser points whose positions are not in the preset boundary area from the background point cloud data to obtain the initial filtered point cloud;

[0092] Remove laser points whose positions are not in the track area of ​​the test track and whose distance from the test track is not within the detection height range from the initial screening point cloud to obtain the background point cloud of interest.

[0093] The background point cloud of interest is voxelized to obtain several background mesh units.

[0094] In this embodiment, the same preset boundary region is set for the background point cloud data, for example, the boundary x closest to the origin is set on the X-axis. min The boundary x closest to the origin max Set the boundary y-axis closest to the origin. min The boundary y closest to the origin maxSet the boundary z on the Z-axis that is closest to the origin. min The boundary z closest to the origin max Delete laser points that are not within the preset boundary area from the background point cloud data. Since the positions of the left and right tracks of the test track are fixed and the height of the train is also known in advance, the track area and detection height range of the test track in the background point cloud data processing are set to the same values ​​as the track area and detection height range in the actual point cloud data processing. This allows for voxelization processing of the same area, with background mesh units and actual mesh units with the same voxel subscript corresponding to the same location area.

[0095] In one embodiment, the construction rules for the background mesh cells include:

[0096] The left track point set representing the left track and the right track point set representing the right track are selected from the background point cloud data; the test track includes the left track and the right track;

[0097] In the first plane of the coordinate system of the lidar, the left track point set and the right track point set are fitted to obtain the left track straight line equation and the right track straight line equation; the first plane is located in the plane where the test line is located;

[0098] The test track is projected onto the second plane of the lidar's coordinate system to obtain the test track projection equation; the second plane is perpendicular to the first plane and parallel to the test track.

[0099] Based on the equations of the left and right tracks, laser points between the left and right tracks are selected from the background point cloud data to obtain a preliminary background point cloud.

[0100] Based on the test track projection equation, laser points higher than the test track are selected from the preliminary background point cloud to obtain the background point cloud of interest.

[0101] The background point cloud of interest is voxelized to obtain the background mesh unit.

[0102] In this embodiment, to more accurately determine the background grid cells distributed on the test track, feature extraction is performed on the test track in three-dimensional space, and the parameters of the test track in the XOY and XOZ planes of the lidar coordinate system are calculated. The test track includes a left track and a right track. The left track point set P, representing the left track, is selected from the background point cloud data. L and the right orbit point set P representing the right orbit RSince the coordinate system of the lidar uses the direction facing the oncoming train as the X-axis, the left-hand direction as the Y-axis when facing the oncoming train, and the direction away from the ground as the Z-axis, the plane where the test track is located is usually in the XOY plane or a plane parallel to the XOY plane. We will take the plane where the test track is located as the first plane. If the first plane is the XOY plane, then on the XOY plane, using the left track point set P... L Fit the equation of the left track line, using the right track point set P R Fit the equation of the right-side straight line. From the left-side track point set P... L Select laser points that conform to the equation of the left-side straight line, and start from the right-side track point set P. R Laser points conforming to the equation of the right track are selected, and these two groups of laser points are projected onto the second plane of the lidar coordinate system. The second plane is perpendicular to the first plane; for example, if the first plane is the XOY plane, the second plane can be the XOZ plane. The projection of these two groups of laser points onto the XOZ plane is approximated as a straight line. The projection equation of the test track is obtained by fitting these two groups of laser points. To filter laser points related to train safety, the region between the left and right tracks is determined based on the equations of the left and right tracks. Laser points between the left and right tracks are selected from the background point cloud data to obtain a preliminary background point cloud. Then, the region that the highest point the train might pass through is selected in the height direction. Laser points higher than the test track (i.e., those higher than the projection line corresponding to the test track projection equation in the Z-axis direction) are selected from the preliminary background point cloud to obtain the background point cloud of interest. The background point cloud of interest is then voxelized to obtain background mesh elements.

[0103] In this embodiment, the step of fitting the left track point set and the right track point set to obtain the left track line equation and the right track line equation includes: fitting the left track point set using a random sample consensus algorithm to obtain the initial left track line y = k1x + b1, and fitting the right track point set using a random sample consensus algorithm to obtain the initial right track line y = k2x + b2; optimizing the initial left track line y = k1x + b1 and the initial right track line y = k2x + b2 according to the track update formula to obtain the left track line equation and the right track line equation; wherein the track update formula is as follows:

[0104] Equation of the left rail line:

[0105] Equation of the right-hand rail line:

[0106] In the formula, f1(x) represents the equation of the left rail straight line, f2(x) represents the equation of the right rail straight line, k1 represents the slope of the initial left rail line, k2 represents the slope of the initial right rail line, b1 represents the intercept of the initial left rail line, b2 represents the intercept of the initial right rail line, and c represents the distance between the left and right rails, usually taken as 1.44 meters. Considering the presence of curves on the test track, the fitted initial left rail line / initial right rail line is a straight line, so a coefficient is set based on c / 2. This is the value of the distance between two points on the X-axis under the chord length formula, where the coefficient is greater than or equal to 1. This is because there is a curve and the fitted trajectory parameters are straight lines, so the parameters of the fitted trajectory in the XOY plane are dynamically adjusted.

[0107] In this embodiment, from the left track point set P L Select a laser point that satisfies the equation of the left-side track line y = f1(x), and start from the right-side track point set P. R Laser points that conform to the equation y = f2(x) of the right track are selected. The laser points selected from these two parts are used to fit the equation of the test line projection in the XOZ plane.

[0108] In this embodiment, the preliminary background point cloud can be obtained by removing points from the background point cloud data using a first removal condition, wherein the first removal condition removes laser points from the background point cloud data that do not satisfy the following formula:

[0109]

[0110] In the formula, α is a preset coefficient, and 1≤α≤2. This first elimination condition is used to select the point between the left and right tracks. Since there are trains of different models, during the operation, the protection range needs to consider not only the distance between the left and right tracks, but also the width of the train. The coefficient α is used to adjust the detection area according to the width of the train to adapt to the width of different train models actually used on site.

[0111] In this embodiment, the background point cloud of interest can be obtained by removing points from the background point cloud data / preliminary background point cloud using a second removal condition. The second removal condition removes laser points from the background point cloud data / preliminary background point cloud that do not satisfy the following formula:

[0112]

[0113] In the formula, β is a preset coefficient, β≥0.3. This second rejection condition is used to select laser points on the left / right track. Adjusting the height is used to adapt to various train models. The lowest point of the actual train's front end is a certain distance from the plane where the test track is located. The detection area is defined in the Z-axis direction, and the value selected by the laser point in the Z-axis direction is increased.

[0114] In one embodiment, a left track point set representing the left track and a right track point set representing the right track are selected from the background point cloud data; the test track includes the left track and the right track;

[0115] In the first plane of the coordinate system of the lidar, the left track point set and the right track point set are fitted to obtain the left track straight line equation and the right track straight line equation; the first plane is located in the plane where the test line is located;

[0116] The test track is projected onto the second plane of the lidar's coordinate system to obtain the test track projection equation; the second plane is perpendicular to the first plane and parallel to the test track.

[0117] Based on the equations of the left and right tracks, laser points between the left and right tracks are selected from the background point cloud data to obtain a preliminary background point cloud.

[0118] Based on the test track projection equation, laser points higher than the test track are selected from the preliminary background point cloud to obtain the background point cloud of interest.

[0119] The background point cloud of interest is voxelized to obtain the background mesh unit;

[0120] A number of background grid cells are acquired and measured point cloud data is acquired through the lidar; wherein, the background grid cells are obtained by voxelizing the background point cloud data, and each background grid cell has a voxel subscript, which is used to identify the position of the background grid cell in the coordinate system of the lidar.

[0121] Obtain the position of each laser point in the measured point cloud data;

[0122] Delete the laser points whose positions are not in the preset boundary area from the measured point cloud data to obtain a preliminary filtered point cloud;

[0123] Remove laser points whose positions are not in the track area of ​​the test track and whose distance from the test track is not within the detection height range from the preliminary screening point cloud to obtain the measured point cloud of interest;

[0124] The measured point cloud of interest is voxelized to obtain several measured mesh units;

[0125] Calculate the number of laser points whose distance from the center position of the measured grid cell is within a preset distance range to obtain the point cloud point count of the measured grid cell;

[0126] When the number of point cloud points of the measured grid cell is greater than the first occupancy threshold, the measured grid cell is determined to be in an occupied state.

[0127] For background grid cells and measured grid cells with the same voxel subscript, when the measured grid cell is in the occupied state and the background grid cell is in the empty state, the measured grid cell is determined to be the target grid cell; wherein, the background grid cell with a point cloud point count less than the second occupancy threshold is in the empty state.

[0128] Cluster the point clouds of each target grid cell to obtain the target object;

[0129] Based on the position of the target object in the coordinate system of the lidar, the distance between the target object and the end of the test track is detected to obtain the target distance;

[0130] Based on the distribution of the target object in the coordinate system of the lidar, calculate the width, height, and center position of the target object;

[0131] When the width of the target object is not within the preset width range and / or the height of the target object is not within the preset height range and / or the center position of the target object is not within the track of the test line, the target object is determined to be a foreign object.

[0132] The step of determining the target object as a train object when the preset identification parameters of the target object are within the preset train range includes:

[0133] When the width of the target object is within a preset width range, the height of the target object is within a preset height range, and the center position of the target object is within the track area of ​​the test track, the target object is determined to be the train object; wherein the preset train range includes the preset width range, the preset height range, and the track area of ​​the test track; wherein the preset train range is determined based on the distribution area of ​​the train in the coordinate system of the lidar;

[0134] When the preset identification parameters of the target object are within the preset train range, the target object is determined to be a train object.

[0135] In this embodiment, the first plane is the XOY plane, and the second plane can be the XOZ plane. A random sampling consensus algorithm is used to fit the left track point set to obtain the initial left track line y = k1x + b1, and the same algorithm is used to fit the right track point set to obtain the initial right track line y = k2x + b2. The initial left track line y = k1x + b1 and the initial right track line y = k2x + b2 are then optimized according to the track update formula to obtain the equations for the left and right tracks. From the left track point set P... L Select a laser point that satisfies the equation of the left-side track line y = f1(x), and start from the right-side track point set P. R Laser points conforming to the equation y = f2(x) of the right-hand track are selected. These two sets of selected laser points are then fitted to obtain the projection equation of the test track in the XOZ plane. The preliminary background point cloud can be obtained by removing points from the background point cloud data using the first removal condition. The background point cloud of interest can be obtained by removing points from the background point cloud data / preliminary background point cloud using the second removal condition. Boundaries are set on the X, Y, and Z axes respectively. For example, on the X-axis, the boundary closest to the origin is set x. min The boundary x closest to the origin max Set the boundary y-axis closest to the origin. min The boundary y closest to the origin max Set the boundary z on the Z-axis that is closest to the origin. min The boundary z closest to the origin max Thus, there are 6 boundaries that enclose the preset boundary region. Statistically, this satisfies xx. ni |≤Δx、|yy ni |≤Δy and |zz ni The number of laser points with |≤Δz is used to obtain the center position (x ni ,y ni ,z ni The number of point clouds in the measured grid cells. Statistically satisfying |xx pi |≤Δx、|yy pi |≤Δy and |zz pi The number of laser points with |≤Δz is used to obtain the center position (x pi ,y pi ,z piThe number of point cloud points in the background grid unit. When the measured grid unit is in the occupied state and the background grid unit is in the empty state, it indicates that there is no object in the acquisition area under road conditions without foreign objects and no train operation, but there is an object when safety is ensured during the actual measurement, and the measured grid unit is determined to be the target grid unit. The X-axis coordinate values ​​of each laser point of the target object are sorted from smallest to largest, and the laser point in the sorted order [N′ / 10] is selected for distance calculation, and the X-axis coordinate value of the laser point is taken as the target distance. When at least one of the three preset recognition parameters of the target object does not meet the corresponding preset train range, it indicates that the target object is not a train object, but may be a foreign object object.

[0136] Example 2:

[0137] The foreign object detection method for the test line in this embodiment can be applied to electronic devices with communication, computing, and data storage capabilities. Its specific process includes:

[0138] Step 210: Point cloud acquisition. Acquire two frames of laser point cloud data and overlay them.

[0139] Step 220: Calculate the three-dimensional orbital parameters, specifically the parameters of the orbit in the XOY and XOZ planes.

[0140] Step 220 specifically includes:

[0141] Step 221: First, calculate the parameters of the track in the XOY plane. The track consists of two rails. A certain number of left-side track points are manually selected from the point cloud to form the point set P. L The equation of the straight line y = k1x + b1 of the left track in the XOY plane is fitted; similarly, a certain number of right track points are manually selected from the point cloud to form the point set P. R The equation of the straight line y = k²x + b² on the right-hand track in the XOY plane is fitted. The fitting method can be the Random Sample Consensus (RANSAC) algorithm.

[0142] Step 222: Finally, the slopes of both tracks are taken as k = (k1 + k2) / 2. Further considering the track gauge of approximately 1.44 meters, the equations of the two tracks in the XOY plane are updated as follows:

[0143] Left:

[0144] right:

[0145] The track gauge is 1.44 meters, and the theoretical distance between the two side tracks and the centerline is 0.72 meters. However, considering the presence of curves and the fact that the fitted track parameters are for a straight line, a coefficient is added to the 0.72. Here, the value of the distance between two points on the X-axis is 1 under the chord length formula. Since this value is greater than or equal to 1, the solution is to dynamically adjust the parameters of the fitted track in the XOY plane because there is a curve and the fitted track parameters are straight.

[0146] Step 223: Calculate the parameters of the track in the XOZ plane. The test track is a straight track, therefore the projections of the left and right tracks onto the XOZ plane approximately coincide as the same straight line, which can be represented as z = k3x + b3. Therefore, from P... L Select all points from P that satisfy the equation y = f1(x) on the left side of the trajectory. R Select all points that satisfy the equation y = f2(x) on the right side. Use these points to fit the equation, and you will get the equation of the straight line z = k3x + b3.

[0147] Step 230, Region of Interest Setting. Preset parameter x. max x min y max y min z max z min Remove points from the point cloud that cannot simultaneously satisfy x min ≤x≤x max y min ≤y≤y max and z min ≤z≤z max point.

[0148] Based on the results in "4.1.1.2.2 Calculation of Three-Dimensional Track Parameters", the detection area is further delineated. Specifically, points that do not simultaneously meet the following two conditions are removed from the point cloud:

[0149]

[0150] Where α and β are preset parameters, and 1≤α≤2, β≥0.3. The first formula selects points between two tracks and points on the tracks. Due to the existence of different vehicle models, the protection range during operation is not only the track width but should also include the vehicle width. α is used to adjust the detection area to adapt to the width of different vehicle models actually used on site. The Z-value adjustment is because, for various vehicle models, the actual lowest point of the vehicle's front end is a certain distance from the track surface, so the threshold for selecting the Z-value is increased when defining the detection area. (The last sentence is a repetition of the previous one and can be omitted.) It is the chord length formula, which increases the threshold for selecting the Z value of the detection area.

[0151] Step 240, Voxelization of Point Cloud. Preset discrete lengths Δx, Δy, and Δz, and perform voxelization on the point cloud. For a 3D point with coordinates (x, y, z), its voxel subscripts (l, m, n) are:

[0152]

[0153] Here, "[]" represents the floor function. Point cloud voxelization involves dividing the XYZ coordinate system of the point cloud into multiple cubic regions, with the boundaries representing the minimum and maximum x, y, and z values ​​of all point cloud points. It calculates which cubic region each point cloud point belongs to, using l, m, and n to represent the indices of the cubic region. This step is primarily for subsequent state labeling of different cubic regions, as point cloud points themselves only have XYZ coordinate attributes and cannot be used for feature or label extraction. Dividing the point cloud into smaller regions facilitates feature extraction.

[0154] Step 250, Voxel Marking. Voxels have three states: vacant, occupied, and target. Initially, all voxels are marked as vacant. 3D point cloud background reconstruction involves collecting two frames of point cloud data at the end of the test track, ensuring the entire track is free of foreign objects and vehicles. These frames are then overlaid, and the point cloud is voxelized (divided into many small cubic regions). Voxel marking categorizes these regions as vacant, occupied, or target. A vacant state means that when there are no foreign objects or vehicles on the test track, this cubic region contains no point cloud data. In the real-time safety assurance described in later chapters, the current point cloud data is received in real-time and subjected to the same voxelization. Because the LiDAR sensor in the solution is fixed on the ground, if point cloud data appears in the cubic region at the same location, it indicates... The issue is either an intrusion of a foreign object or the presence of a vehicle in the area. The "occupied" state means that even when there are no other foreign objects or vehicles on the entire line, point cloud points still exist in the cubic area. This indicates that the area contains existing infrastructure on the test track, such as tracks, sleepers, and signal lights. In subsequent real-time safety protection, the real-time point cloud data, after being voxelized in the same way, does not require further processing to determine whether it is an intrusion of a foreign object or point cloud points returned from a vehicle. The "target" state is used for subsequent real-time safety protection. This means that a cubic area that was originally in an "occupied" state in the 3D point cloud background reconstruction now appears as a point cloud in the real-time point cloud. All these areas showing "abnormalities" are marked as the target state.

[0155] For each voxel, perform the following processing. For brevity, it is denoted as (l) i ,mi ,n i Let's take a voxel as an example. The center coordinates of this voxel (x...) i ,y i ,z i )for

[0156]

[0157] Set point count thresholds N1 and N2, where N2 ≥ N1. If a voxel contains at least N1 points, it is marked as occupied. Otherwise, if the voxel contains fewer than N1 points, coordinate c is counted. If the number of points is at least N2, the voxel is marked as occupied. The counted coordinates simultaneously satisfy |xx i |≤Δx、|yy i |≤Δy and |zz i The formula for calculating the number of points |≤Δz means that the point cloud points being counted are not limited to those within the current voxel. Taking the x-axis as an example, a circle is drawn with the center point xi as the center and the distance Δx of the voxel on the x-axis as the radius. Points within this circle all satisfy the requirement. Therefore, points in adjacent voxels that also satisfy the condition will also be counted. Thus, it is possible to count points that simultaneously satisfy |xx i |≤Δx、|yy i |≤Δy and |zz i The case where |≤Δz has more points than the voxel itself.

[0158] In the application phase, 3D point clouds from LiDAR are collected in the edge computing platform for 3D point cloud detection. After detection, the results are sent to the vehicle-mounted node, which receives the results and generates different prompts via a voice broadcast device. Prior to this, at the end of the test track, under conditions where there are no other foreign objects and no vehicles are running, two frames of point clouds are collected, superimposed, and then voxelized (i.e., divided into many small cubic regions). Voxel labels are used to classify the states as occupied, occupied, and target states. Real-time safety assurance involves using point cloud data collected in real-time from a fixed LiDAR installed in the same location during actual operation to complete region of interest extraction and voxelization. Track fitting is omitted in real-time safety assurance because the track does not move (there are no switches at the end), the LiDAR itself does not move, and the track parameters do not change. Specifically, this includes:

[0159] Step a, for the 3D point cloud. This includes steps a1, a2, a3, and a4. Step a1 is the same as setting the region of interest in step 230. The point cloud used for these operations is a real-time point cloud, which is compared with the reconstructed 3D point cloud background. Step a2, voxelization of the point cloud, is the same as in step 240.

[0160] Step a3, voxel marking, is the same as step 250. The difference is that in step a3, N1 = 1 and N2 = 2. If a voxel is in an empty state in step 250's "voxel marking" but in an occupied state in step a3, then that voxel is marked as the target state. All voxels are processed sequentially. In step 250, N2 ≥ N1 can be any value, adjusted according to the model of the installed radar, the density of the point cloud, the number of point cloud points contained in a single frame of point cloud data, etc. The specific parameter values ​​are clearly defined here. Step 250 involves collecting two frames of point cloud data at the end of the test track beforehand, ensuring the entire track is free of other foreign objects and no vehicles are running, and marking the voxels after voxelization; here, the voxels are marked after voxelization of the real-time collected point cloud. The empty state above is the initial state; the point clouds marked as occupied each day are in an empty state. Step 250 The voxels used in the 3D background reconstruction of the pre-collected point cloud are used in step a3. Step a3 uses voxels in the real-time point cloud. Since the LiDAR is stationary, the two voxels theoretically have the same subscript, meaning they represent the same area in reality. Because the voxels used for marking in the two steps are not the same, step 250 is collected under the condition that there are no foreign objects or vehicles on the track. In this case, the voxel is occupied, meaning there are no point cloud points returning in this area. In the real-time point cloud, this voxel is found to be occupied, meaning there is a point cloud. Theoretically, this means there is something here, or at least there is a suspected foreign object in this area. That is the target area. All target areas are collected and processed by clustering algorithms to determine which area is indeed an obstacle or train, or possibly noise generated by the LiDAR.

[0161] Step a4, Point Cloud Clustering. Obtain the point cloud consisting of points from all voxels labeled as target states, and perform clustering. Clustering uses the density-based spatial clustering of applications with noise (DBSCAN) algorithm. The target type obtained from clustering may be a subway train or an obstacle.

[0162] Step a5, Distance Calculation. For each target, i.e., the clustered object, sort its point cloud by x-coordinate from smallest to largest. Let the number of points contained in the target be N′. Take the x-coordinate of the point at position [N′ / 10] in the clustered object as the distance of the target from the end of the test track. After the object is clustered, the minimum x-coordinate among all the point cloud points in the object is the distance of the object from the lidar. The lidar coordinate system has the X-axis pointing forward, and the lidar is installed at the end of the test track. Therefore, this x-coordinate can represent the distance of the object from the end of the test track. The [N′ / 10] point is chosen because there may be points that do not belong to the object that are included in the cluster. The more points contained in the object, the greater the possibility. Generally, these points are located at the edge of the object, so the [N′ / 10] point is chosen to minimize this influence. The lidar is installed at the end of the test track. The test track is a finite-length line within each vehicle section used to debug the vehicle's condition, such as... Figure 2 The earthen barrier shown prevents vehicles from passing, and there are no railway tracks behind it.

[0163] Step a6, Target Type Identification. For a given target, let its maximum and minimum coordinates in the x, y, and z directions be x′ respectively. max 、x′ min y′ max y′ min 、z′ max 、z′ min .

[0164] A target is considered a train if both of the following conditions are met simultaneously; otherwise, the target is considered an obstacle.

[0165] ""

[0166] (1) Target width (y-axis dimension) max -y min ) and height (z-axis dimension z) max -z min Within the preset range;

[0167] (2) Calculate the center coordinates (x0, y0) of the target:

[0168]

[0169] The center point (x0, y0) satisfies:

[0170]

[0171] Here, δ is a preset coefficient, optional, 0.5≤δ<0.8. Due to the calculation method of the center coordinates and the varying degrees of missing points returned by different vehicle models and LiDAR scanners, the returned points may be affected. For example, the lower half might be coated with black paint, causing more energy absorption of the laser beam, resulting in insufficient intensity upon return and significant data loss in that area from the LiDAR scan. Therefore, this coefficient is also a dynamically adjusted threshold, depending on the vehicle model used on-site. These two conditions define an object with a cross-sectional dimension within the preset range and a center point between the left and right tracks as a train.

[0172] Step b, Early Warning Prompt. After completing the detection task, the edge computing platform of the roadside node sends the detection results to the onboard node on the subway train via a wireless network through the signal transmitting device. The detection results include the target type and the distance between the target and the end of the test track. The signal receiving device of the onboard node receives the detection results sent by the signal transmitting device of the roadside node and controls the voice broadcasting device to generate different prompt voices. The prompt voices contain the target type and the distance information between the target and the end of the test track. When the target type is a train, the distance is the distance between the train and the stop, and it is necessary to prevent the train from running off the stop; when the target type is an obstacle, it is necessary to prevent collision accidents.

[0173] In this embodiment, the number of required equipment is reduced by installing a lidar device at the end of the test track to achieve train-to-end distance measurement, eliminating the need for pre-installed base stations. The introduction of lidar detection technology identifies obstacles within the train and operating section, and performs boundary violation judgments, improving the safety protection of the train test track and providing an effective measure for early warning and handling of abnormal boundary violations within the operating section.

[0174] In this embodiment, a LiDAR-based subway test track safety system identifies intruding obstacles on the test track to prevent collisions, and simultaneously acquires the distance of the train relative to the end of the test track to prevent the train from overshooting the stop. Roadside nodes are deployed at the end of the subway test track, each including a signal transmitting device, an edge computing platform, and LiDAR. Onboard nodes are deployed on the subway train, including signal receiving devices and voice broadcasting devices. During train testing, the edge computing platform of the roadside nodes processes the point cloud acquired by the LiDAR. First, the region of interest for detection is determined based on a predefined safety clearance. Then, target detection is performed, acquiring the distance of the target relative to the end of the test track and determining the target type. The target types are subway trains and obstacles. After completing the detection task, the roadside nodes send the detection results to the onboard nodes on the subway train via a wireless network. The detection results include the target type and the target's distance from the end of the test track. The signal receiving device of the onboard node receives the detection results sent by the signal transmitting device of the roadside node, and the voice broadcasting device generates different prompt voices.

[0175] In this embodiment, the x, y, and z axes of the lidar coordinate system point in front of, to the left of, and above the lidar, respectively. A roadside node is deployed at the end of the subway test track, comprising a signal transmitting device, an edge computing platform, and a lidar. The lidar is installed facing the track direction, meaning the x-axis of the lidar coordinate system is approximately parallel to the track direction. Onboard nodes are deployed on the subway train, including signal receiving equipment and voice broadcasting equipment.

[0176] In this embodiment, the method, based on existing safety protection measures at the end of the test track, adds early warning safety assurance measures for abnormal accidents such as foreign object intrusion within the test track operating section, thereby improving the safety of subway train test track operation. Compared with patent CN216636497U "Test Track Operation Safety Early Warning System", this solution does not require the pre-installation of base stations. Furthermore, it introduces lidar detection technology to identify obstacles within the train and operating section, achieving early warning and protection against foreign object intrusion while simultaneously measuring the distance between the train and the end of the test track.

[0177] Example 3:

[0178] The test track safety system of this embodiment can be applied to electronic devices with communication, computing, and data storage capabilities. It includes a track-end node device and a vehicle-mounted node device. The track-end node device is installed at the end of the test track, and the vehicle-mounted node device is installed on the train. The track-end node includes:

[0179] Edge computing processor;

[0180] A signal transmitting device for sending foreign object detection results to the vehicle-mounted node device; and

[0181] LiDAR used for collecting background point cloud data and measured point cloud data;

[0182] The edge computing processor is electrically connected to the lidar and the signal transmitting device, respectively, and is configured to process the background point cloud data and the measured point cloud data using the foreign object detection method of the test line described above, obtain the foreign object detection result, and send the foreign object detection result to the signal transmitting device.

[0183] The vehicle-mounted node device includes:

[0184] A signal receiving device for receiving the foreign object detection results; and

[0185] A safety alert device used to issue safety alert information based on the foreign object detection results;

[0186] The signal receiving device is connected to the signal transmitting device, and the safety warning device is electrically connected to the signal receiving device.

[0187] In this embodiment, a lidar installed at the end of the test track collects background point cloud data and measured point cloud data. This data is used to construct background grid cells, which are then voxel-marked to indicate whether they are in an empty state. During train operation protection, the lidar collects measured point cloud data and sends it to an edge computing processor. The edge computing processor processes the measured point cloud data using the aforementioned foreign object detection method for the test track, obtaining a foreign object detection result. The result, indicating whether the target object is a train or a foreign object, is sent to the signal transmitting device. It can also send the target distance between the target object and the end of the test track to the signal transmitting device. The signal transmitting device then sends the foreign object detection result to the train's signal receiving device. The signal receiving device then sends the result to a safety warning device, which can be a voice broadcast device. The voice broadcast device generates different warning voices, each containing information about whether the target object is a train or a foreign object, and the target distance between the target object and the end of the test track. When the target object is a train, the distance is the distance between the train and the stop, and it is necessary to prevent the train from running out of the stop; when the target object is a foreign object, it is necessary to prevent collision accidents.

[0188] Example 4:

[0189] Another embodiment of this application relates to a foreign object detection device for a test track. The implementation details of the foreign object detection device for the test track in this embodiment are described in detail below. The following implementation details are provided for ease of understanding and are not necessary for implementing this solution. In the foreign object detection device for the test track in this embodiment, a lidar is fixed at the end of the test track. The lidar is used to scan the test track under conditions where there are no trains and no foreign objects to obtain background point cloud data. It includes a measured point cloud acquisition module, a measured grid acquisition module, a target grid determination module, a target grid clustering module, a foreign object recognition module, and a train object recognition module.

[0190] The measured point cloud acquisition module is used to acquire a number of background grid cells and to acquire measured point cloud data through the lidar; wherein, the background grid cells are obtained by voxelizing the background point cloud data, and each background grid cell has a voxel subscript, which is used to identify the position of the background grid cell in the coordinate system of the lidar.

[0191] The measured grid acquisition module is used to perform voxelization processing on the measured point cloud data to obtain a plurality of measured grid units; wherein, each measured grid unit has a voxel subscript, and the voxel subscript of the measured grid unit is used to identify the position of the measured grid unit in the coordinate system of the lidar;

[0192] The target mesh determination module is used to determine the measured mesh unit as the target mesh unit when the number of point cloud points of the measured mesh unit is greater than or equal to the number of point cloud points of the background mesh unit and the measured mesh unit with the same voxel subscript.

[0193] The target grid clustering module is used to cluster the point clouds of each target grid cell to obtain the target object;

[0194] The foreign object identification module is used to determine that the target object is a foreign object when the preset identification parameters of the target object are not within a preset train range; wherein, the preset train range is determined according to the distribution area of ​​the train in the coordinate system of the lidar;

[0195] The train object recognition module is used to determine that the target object is a train object when the preset recognition parameters of the target object are within the preset train range.

[0196] It is worth mentioning that all modules involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed in this application; however, this does not mean that other units are absent in this embodiment.

[0197] Example 5:

[0198] Another embodiment of this application relates to an electronic device, including: 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, the instructions being executed by the at least one processor to enable the at least one processor to perform the foreign object detection method for the test line in the above embodiments.

[0199] The memory and processor are connected via a bus, which can include any number of interconnecting buses and bridges, connecting various circuits of one or more processors and memories. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be described further herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by the processor is transmitted over the wireless medium via an antenna, which further receives data and transmits it to the processor.

[0200] The processor manages the bus and general processing, and also provides various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory is used to store data used by the processor during operation.

[0201] Example 6:

[0202] Another embodiment of this application relates to a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the method embodiments described above.

[0203] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0204] Those skilled in the art will understand that the above embodiments are specific embodiments for implementing this application, and in practical applications, various changes can be made to them in form and detail without departing from the spirit and scope of this application.

Claims

1. A method for detecting foreign objects on a test line, characterized in that, A lidar is fixed at the end of the test track. The lidar is used to scan the test track under conditions where there are no trains and no foreign objects to obtain background point cloud data. The method includes: A number of background grid cells are acquired and measured point cloud data is acquired through the lidar; wherein, the background grid cells are obtained by voxelizing the background point cloud data, and each background grid cell has a voxel subscript, which is used to identify the position of the background grid cell in the coordinate system of the lidar. The measured point cloud data is voxelized to obtain several measured grid cells; wherein each measured grid cell has a voxel subscript, and the voxel subscript of the measured grid cell is used to identify the position of the measured grid cell in the coordinate system of the lidar; For the background mesh unit and the measured mesh unit with the same voxel subscript, if the number of point cloud points of the measured mesh unit is greater than or equal to the number of point cloud points of the background mesh unit, the measured mesh unit is determined to be the target mesh unit. Cluster the point clouds of each target grid cell to obtain the target object; When the preset identification parameters of the target object are not within the preset train range, the target object is determined to be a foreign object; wherein, the preset train range is determined based on the distribution area of ​​the train in the coordinate system of the lidar; When the preset identification parameters of the target object are within the preset train range, the target object is determined to be a train object.

2. The foreign object detection method according to claim 1, characterized in that, The method further includes: Based on the position of the target object in the coordinate system of the lidar, the distance between the target object and the end of the test track is detected to obtain the target distance.

3. The foreign object detection method according to claim 1, characterized in that, The step of determining the measured mesh unit as the target mesh unit when the point cloud point count of the measured mesh unit is greater than or equal to the point cloud point count of the background mesh unit and the measured mesh unit with the same voxel subscript includes: Calculate the number of laser points whose distance from the center position of the measured grid cell is within a preset distance range to obtain the point cloud point count of the measured grid cell; When the number of point cloud points of the measured grid cell is greater than the first occupancy threshold, the measured grid cell is determined to be in an occupied state. For the background grid cell and the measured grid cell with the same voxel subscript, when the measured grid cell is in the occupied state and the background grid cell is in the vacant state, the measured grid cell is determined to be the target grid cell; wherein, the background grid cell with a point cloud point count less than the second occupancy threshold is in the vacant state.

4. The foreign object detection method according to claim 1, characterized in that, The step of determining the target object as a foreign object when the preset identification parameters of the target object are not within the preset train range includes: Based on the distribution of the target object in the coordinate system of the lidar, calculate the width, height, and center position of the target object; When the width of the target object is not within the preset width range and / or the height of the target object is not within the preset height range and / or the center position of the target object is not within the track of the test line, the target object is determined to be a foreign object. The step of determining the target object as a train object when the preset identification parameters of the target object are within the preset train range includes: When the width of the target object is within the preset width range, the height of the target object is within the preset height range, and the center position of the target object is within the track area of ​​the test track, the target object is determined to be the train object; wherein the preset train range includes the preset width range, the preset height range, and the track area of ​​the test track.

5. The foreign object detection method according to claim 1, characterized in that, The steps of performing voxelization on the measured point cloud data to obtain several measured grid cells include: Obtain the position of each laser point in the measured point cloud data; Delete the laser points whose positions are not in the preset boundary area from the measured point cloud data to obtain a preliminary filtered point cloud; Remove laser points whose positions are not in the track area of ​​the test track and whose distance from the test track is not within the detection height range from the preliminary screening point cloud to obtain the measured point cloud of interest; The measured point cloud of interest is voxelized to obtain several measured mesh elements.

6. The foreign object detection method according to claim 1, characterized in that, The construction rules for the background mesh cells include: The left track point set representing the left track and the right track point set representing the right track are selected from the background point cloud data; the test track includes the left track and the right track; In the first plane of the coordinate system of the lidar, the left track point set and the right track point set are fitted to obtain the left track straight line equation and the right track straight line equation; the first plane is located in the plane where the test line is located; The test track is projected onto the second plane of the lidar's coordinate system to obtain the test track projection equation; the second plane is perpendicular to the first plane and parallel to the test track. Based on the equations of the left and right tracks, laser points between the left and right tracks are selected from the background point cloud data to obtain a preliminary background point cloud. Based on the test track projection equation, laser points higher than the test track are selected from the preliminary background point cloud to obtain the background point cloud of interest. The background point cloud of interest is voxelized to obtain the background mesh unit.

7. A test line safety assurance system, characterized in that, It includes a roadside node device and a vehicle-mounted node device. The roadside node device is installed at the end of the test track, and the vehicle-mounted node device is installed on the train. The roadside node includes: Edge computing processor; A signal transmitting device for sending foreign object detection results to the vehicle-mounted node device; and LiDAR used for collecting background point cloud data and measured point cloud data; The edge computing processor is electrically connected to the lidar and the signal transmitting device, respectively, and is configured to process the background point cloud data and the measured point cloud data using the foreign object detection method of the test line according to any one of claims 1 to 6, obtain the foreign object detection result, and send the foreign object detection result to the signal transmitting device; The vehicle-mounted node device includes: A signal receiving device for receiving the foreign object detection results; and A safety alert device used to issue safety alert information based on the foreign object detection results; The signal receiving device is connected to the signal transmitting device, and the safety warning device is electrically connected to the signal receiving device.

8. A foreign object detection device for a test line, characterized in that, A lidar unit is fixed at the end of the test track. The lidar is used to scan the test track under conditions where there are no trains or foreign objects to obtain background point cloud data, including: The measured point cloud acquisition module is used to acquire a number of background grid cells and to acquire measured point cloud data through the lidar; wherein, the background grid cells are obtained by voxelizing the background point cloud data, and each background grid cell has a voxel subscript, which is used to identify the position of the background grid cell in the coordinate system of the lidar. The measured grid acquisition module is used to perform voxelization processing on the measured point cloud data to obtain a plurality of measured grid units; wherein, each measured grid unit has a voxel subscript, and the voxel subscript of the measured grid unit is used to identify the position of the measured grid unit in the coordinate system of the lidar; The target mesh determination module is used to determine the measured mesh unit as the target mesh unit when the number of point cloud points of the measured mesh unit is greater than or equal to the number of point cloud points of the background mesh unit and the measured mesh unit with the same voxel subscript. The target grid clustering module is used to cluster the point clouds of each target grid cell to obtain the target object; The foreign object identification module is used to determine that the target object is a foreign object when the preset identification parameters of the target object are not within a preset train range; wherein, the preset train range is determined according to the distribution area of ​​the train in the coordinate system of the lidar; The train object recognition module is used to determine that the target object is a train object when the preset recognition parameters of the target object are within the preset train range.

9. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the foreign object detection method for the test line as described in any one of claims 1 to 6.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the foreign object detection method for the test line as described in any one of claims 1 to 6.