Method and apparatus for large scale spatial trajectory collision detection
Patent Information
- Application Number
- CN202511317810.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-16
- Publication Date
- 2026-10-27
AI Technical Summary
[0040]由上述技术方案可知,本申请提供一种大规模空间轨迹碰撞检测方法及装置,通过对待检测空间中的每条轨迹数据进行采样,计算采样点之间的位移和时间差,得到轨迹向量,将待检测空间划分为多个立方体网格子区域,并将网格子区域与轨迹向量关联,构建空间索引区,将待检测空间的时间轴划分为多个时间片段,并将时间片段与轨迹向量关联,构建时间索引区,在空间索引区内进行第一并行碰撞检测,得到空间上的潜在碰撞风险轨迹对,进而在每个空间子区域内,基于时间分段进行第二并行碰撞检测,缩小潜在碰撞轨迹对的范围,对最终得到的碰撞轨迹对进行轨迹模型预测,预测结果考虑运动学参数进行碰撞预警,由此能够提高运动物体轨迹碰撞检测的效率和准确性。
Smart Images

Figure CN122990116A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, specifically to a method and apparatus for large-scale spatial trajectory collision detection. Background Technology
[0002] With the rapid development of aerospace, unmanned aerial vehicles, intelligent transportation and other fields, the demand for real-time collision warning of massive spatial trajectory data is becoming increasingly urgent. However, traditional trajectory collision detection technology faces multiple technical bottlenecks and is unable to meet the high requirements of current and future applications.
[0003] First, low computational efficiency is one of the main bottlenecks of traditional technologies. Traditional algorithms mostly use point-by-point comparisons, requiring distance calculations for the positions of every two trajectories at every time point. When processing trajectory data exceeding millions of records, the computational complexity increases exponentially, resulting in extremely low detection efficiency and failing to meet the needs of real-time early warning. Although some technologies have attempted to introduce optimization techniques such as spatial indexing (e.g., R-trees, quadtrees) or time segmentation, these one-dimensional improvements fail to fully consider the spatiotemporal relationship and lack parallel computing mechanisms, thus the actual improvement in detection efficiency remains limited.
[0004] Secondly, the lag in early warning is also a major problem with traditional technologies. Methods based on discrete point sampling cannot capture potential collision risks between continuous trajectories in a timely manner. Because they only focus on static positional relationships and ignore kinematic characteristics (such as velocity and acceleration), traditional methods may miss up to 15%-20% of collision risks within the sampling interval, resulting in delayed early warnings and failing to provide timely and effective protection for the safety of moving objects.
[0005] Furthermore, low resource utilization is a significant drawback of traditional trajectory collision detection technology. Existing algorithms generally employ a serial detection mode, with utilization rates of less than 40% for multi-core CPUs, GPUs, and distributed computing resources. This inefficient resource utilization method struggles to meet the requirements of low-latency early warning, especially when processing large-scale trajectory data, where resource bottlenecks become particularly pronounced.
[0006] With the rapid development of satellite communications, drone logistics, autonomous driving, and other fields, higher demands are being placed on the real-time performance and accuracy of large-scale space trajectory collision warning. There is an urgent need for a large-scale space trajectory collision detection and warning method to improve the efficiency and accuracy of moving object trajectory collision detection. Summary of the Invention
[0007] To address the problems in the prior art, this application provides a method and apparatus for large-scale spatial trajectory collision detection, which can improve the efficiency and accuracy of collision detection of moving objects.
[0008] To solve at least one of the above problems, this application provides the following technical solution:
[0009] Firstly, this application provides a large-scale spatial trajectory collision detection method, including:
[0010] Receive a list of trajectory data in the space to be detected, sample each trajectory at fixed time intervals, determine the corresponding trajectory sampling points, calculate the displacement and time difference between the trajectory sampling points, and obtain the trajectory vector within each time interval, wherein the trajectory vector includes direction information and velocity information;
[0011] According to the preset three-dimensional mesh division algorithm, the space to be detected is divided into multiple cubic mesh sub-regions of equal size. A unique identifier is assigned to each mesh sub-region, and a mapping relationship between the mesh sub-region and the trajectory vector is established to determine the corresponding spatial index area. The time axis of the space to be detected is divided into multiple time segments, a unique identifier is assigned to each time segment, and a mapping relationship between the time segment and the trajectory vector is established to determine the corresponding time index area.
[0012] Within the spatial index area, parallel collision detection is performed on each of the grid sub-regions of the space to be detected to determine the corresponding first potential collision risk trajectory pair. Parallel collision detection is then performed on the first potential collision risk trajectory pair according to the time segment of the time index area to determine the corresponding second potential collision trajectory pair. The second potential collision trajectory pair is then accurately spatially distanced according to a preset kinematic trajectory prediction model to determine the corresponding spatial distance prediction value. The spatial distance prediction value is then thresholded to determine the corresponding collision risk, and a risk warning is issued.
[0013] Further, the step of receiving a list of trajectory data in the space to be detected, sampling each trajectory at fixed time intervals, and determining the corresponding trajectory sampling points includes:
[0014] Receive a list of trajectory data in the space to be detected, wherein the list of trajectory data includes name, time and spatial coordinates;
[0015] A multinomial fitting algorithm is used to smooth each trajectory data in the trajectory data list, and the trajectory data at missing time points are predicted and supplemented to determine the corresponding continuous trajectory.
[0016] Each continuous trajectory is sampled at fixed time intervals to determine the corresponding trajectory sampling points.
[0017] Further, the calculation of the displacement and time difference between the trajectory sampling points to obtain the trajectory vector within each time interval includes:
[0018] Obtain the spatial coordinates and timestamps of adjacent trajectory sampling points, determine the corresponding displacement vector based on the coordinate difference of the spatial coordinates, and determine the corresponding time difference based on the timestamp difference of the timestamps;
[0019] Based on the displacement vectors and time differences of multiple continuous trajectory sampling points, the corresponding acceleration and jerk are determined, wherein the acceleration is calculated by the second-order difference of the displacement vector, and the jerk is calculated by the third-order difference of the displacement vector.
[0020] The acceleration and the jerk are introduced into a preset trajectory vector model to determine the corresponding trajectory vector, which includes direction information and velocity information.
[0021] Further, establishing the mapping relationship between the grid sub-region and the trajectory vector, and determining the corresponding spatial index region, includes:
[0022] The range of the grid sub-region it covers is determined based on the starting and ending coordinates of the trajectory vector;
[0023] The trajectory vector and all covered grid sub-regions are associated according to the range of the grid sub-region to determine the corresponding spatial index mapping relationship. The spatial index mapping relationship is optimized according to the preset octree index structure to determine the corresponding spatial index area.
[0024] Further, the step of dividing the time axis of the space to be detected into multiple time segments, assigning a unique identifier to each time segment, establishing a mapping relationship between the time segments and the trajectory vector, and determining the corresponding time index area includes:
[0025] The time axis of the space to be detected is divided into multiple time segments, and an overlap factor is set between adjacent time segments. The overlap factor is used to cover the trajectory data of the boundary time points.
[0026] Each time segment is assigned a unique identifier. The time segment to which the trajectory vector belongs is determined based on the time attribute of the trajectory vector. A mapping relationship between time segments and trajectory vectors is established. Based on the mapping relationship between time segments and trajectory vectors, a time index is constructed using a B-tree structure to determine the corresponding time index area.
[0027] Further, within the spatial index area, parallel collision detection is performed on each of the grid sub-regions of the space to be detected to determine the corresponding first potential collision risk trajectory pair, and parallel collision detection is performed on the first potential collision risk trajectory pair according to the time segment of the time index area to determine the corresponding second potential collision trajectory pair, including:
[0028] Within the spatial index area, trajectory vectors within the same or adjacent grid sub-regions of the space to be detected are compared, and parallel coarse screening is performed based on the initial distance and velocity difference vectors to determine the corresponding first potential collision risk trajectory pairs;
[0029] For the first potential collision risk trajectory pair, parallel collision detection is performed according to the time segment of the time index area using the sliding time window algorithm to determine the corresponding second potential collision trajectory pair.
[0030] Further, the step of calculating the precise spatial distance between the second potential collision trajectory pair based on a preset kinematic trajectory prediction model to determine the corresponding predicted spatial distance includes:
[0031] Based on the preset kinematic trajectory prediction model, the positions of the two trajectories in the second potential collision trajectory pair at the target time point are predicted, and the corresponding predicted position coordinates are determined.
[0032] The predicted spatial distance between the two trajectories at the target time point is calculated based on the predicted location coordinates.
[0033] Secondly, this application provides a large-scale space trajectory collision detection device, comprising:
[0034] The trajectory vector approximation module is used to receive a list of trajectory data in the space to be detected, sample each trajectory at fixed time intervals, determine the corresponding trajectory sampling points, calculate the displacement and time difference between the trajectory sampling points, and obtain the trajectory vector in each time interval, wherein the trajectory vector includes direction information and velocity information;
[0035] The time-space partitioning module is used to divide the space to be detected into multiple cubic grid sub-regions of equal size according to a preset three-dimensional grid partitioning algorithm, assign a unique identifier to each grid sub-region, establish a mapping relationship between the grid sub-region and the trajectory vector, determine the corresponding spatial index area, divide the time axis of the space to be detected into multiple time segments, assign a unique identifier to each time segment, establish a mapping relationship between the time segment and the trajectory vector, and determine the corresponding time index area;
[0036] The parallel secondary fine-grained trajectory prediction module is used to perform parallel collision detection on each of the grid sub-regions of the space to be detected within the spatial index area, determine the corresponding first potential collision risk trajectory pair, perform parallel collision detection on the first potential collision risk trajectory pair according to the time segment of the time index area, determine the corresponding second potential collision trajectory pair, perform accurate spatial distance calculation on the second potential collision trajectory pair according to the preset kinematic trajectory prediction model, determine the corresponding spatial distance prediction value, perform threshold judgment on the spatial distance prediction value to determine the corresponding collision risk, and perform risk warning.
[0037] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the large-scale spatial trajectory collision detection method.
[0038] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the large-scale spatial trajectory collision detection method described above.
[0039] Fifthly, this application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the large-scale spatial trajectory collision detection method described above.
[0040] As can be seen from the above technical solution, this application provides a large-scale spatial trajectory collision detection method and apparatus. By sampling each trajectory data in the space to be detected, calculating the displacement and time difference between sampling points to obtain trajectory vectors, the space to be detected is divided into multiple cubic grid sub-regions, and the grid sub-regions are associated with trajectory vectors to construct a spatial index region. The time axis of the space to be detected is divided into multiple time segments, and the time segments are associated with trajectory vectors to construct a time index region. A first parallel collision detection is performed in the spatial index region to obtain potential collision risk trajectory pairs in space. Then, in each spatial sub-region, a second parallel collision detection is performed based on time segments to narrow down the range of potential collision trajectory pairs. The final collision trajectory pairs are predicted by trajectory models, and the prediction results are used to provide collision warnings considering kinematic parameters. This can improve the efficiency and accuracy of collision detection of moving object trajectories. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is one of the flowcharts illustrating the large-scale spatial trajectory collision detection method in the embodiments of this application;
[0043] Figure 2 This is a structural diagram of the large-scale spatial trajectory collision detection device in the embodiments of this application;
[0044] Figure 3 This is a schematic diagram of the structure of the electronic device in the embodiments of this application.
[0045] Figure label:
[0046] Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver storage unit 9144, antenna 9111, speaker 9131, microphone 9132. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0048] The acquisition, storage, use, and processing of data in this application all comply with the relevant provisions of national laws and regulations.
[0049] Considering the booming development of satellite communication, drone logistics, autonomous driving, and other fields, higher demands are placed on the real-time performance and accuracy of large-scale spatial trajectory collision early warning. Traditional trajectory collision detection technologies suffer from low computational efficiency, delayed warnings, and low resource utilization, failing to meet the requirements for real-time and accurate trajectory prediction. This application provides a large-scale spatial trajectory collision detection method and apparatus. By sampling each trajectory data point in the detection space and calculating the displacement and time difference between sampling points to obtain trajectory vectors, the detection space is divided into multiple cubic grid sub-regions. These sub-regions are then associated with the trajectory vectors to construct a spatial index region. The time axis of the detection space is divided into multiple time segments, and these time segments are associated with the trajectory vectors to construct a time index region. A first parallel collision detection is performed within the spatial index region to obtain potential collision risk trajectory pairs in space. Subsequently, a second parallel collision detection is performed within each spatial sub-region based on time segments to narrow down the range of potential collision trajectory pairs. The final collision trajectory pairs are then used for trajectory model prediction. The prediction results are used to provide collision warnings considering kinematic parameters, thereby improving the efficiency and accuracy of moving object trajectory collision detection.
[0050] To improve the efficiency and accuracy of collision detection for moving objects, this application provides an embodiment of a large-scale spatial trajectory collision detection method, see [link to embodiment]. Figure 1 The large-scale spatial trajectory collision detection method specifically includes the following:
[0051] Step S101: Receive a list of trajectory data in the space to be detected, sample each trajectory at fixed time intervals, determine the corresponding trajectory sampling points, calculate the displacement and time difference between the trajectory sampling points, and obtain the trajectory vector in each time interval, wherein the trajectory vector includes direction information and velocity information;
[0052] Optionally, in this embodiment, receiving a list of trajectory data in the space to be detected includes:
[0053] Receive a list of trajectory data containing name, time, x, y, and z, where:
[0054] Name: Used to uniquely identify the trajectory of different moving objects;
[0055] Time: The timestamp used to record the trajectory points;
[0056] Spatial coordinates (x, y, z): represent the position of an object in three-dimensional space, in meters or other units of length.
[0057] Optionally, in this embodiment, since the original trajectory data may contain noise, jitter, or missing data, directly using it for collision detection may lead to misjudgment or missed detection. Therefore, firstly, the received trajectory data is subjected to format verification and integrity checks to remove abnormal data, such as duplicate timestamps or coordinate values outside the reasonable range. Next, given the relatively smooth nature of the trajectory and its ability to be vectorized and predicted within a short time, algorithms such as multinomial fitting or Kalman filtering are used to smooth the trajectory data and predict and supplement missing time point data to obtain more continuous and accurate trajectory data.
[0058] Specifically, polynomial fitting approximates the trajectory points using the least squares method, eliminating measurement noise or jitter; while Kalman filtering uses a motion model to dynamically correct the trajectory.
[0059] Smoothing reduces noise interference in trajectory analysis, improving the accuracy of trajectory representation. Predictive supplementation ensures the continuity of the trajectory in the time dimension, avoiding missed collisions due to missing data.
[0060] Optionally, in this embodiment, a fixed sampling interval (such as 1 second or 5 seconds) is set to extract sampling points from the smoothed continuous trajectory.
[0061] The selection of the sampling interval needs to balance computational efficiency and accuracy: too large an interval will result in the loss of details, while too small an interval will increase the computational load. By discretizing the continuous trajectory into a sequence of equally spaced sampling points, a foundation is provided for subsequent vectorized modeling.
[0062] Optionally, in this embodiment, after the above sampling, the trajectory between adjacent sampling points is approximated as a vector. By calculating the displacement and time difference between adjacent sampling points, the trajectory vector within each time period is obtained, thereby realizing the vectorized representation of the trajectory, which facilitates subsequent rapid calculation and analysis.
[0063] Specifically, for each pair of adjacent sampling points A and B, the system obtains their spatial coordinates (x_A, y_A, z_A) and (x_B, y_B, z_B), as well as their timestamps t_A and t_B.
[0064] Calculate the displacement vector: ΔP = (x_B - x_A, y_B - y_A, z_B - z_A), which represents the direction and distance of the object's movement during that time period.
[0065] Calculate the time difference: Δt = t_B - t_A, which represents the time taken for the displacement.
[0066] Specifically, given distance and time, velocity V can be calculated. To more accurately describe the motion of an object, the system further calculates acceleration and jerk (i.e., the rate of change of acceleration, also known as jerk).
[0067] Acceleration A: Calculated by second-order difference of the displacement vector. The system selects three consecutive sampling points A, B, and C, calculates their displacement changes over two time periods, and then determines the rate of change of velocity, i.e., acceleration.
[0068] Jerk J: Calculated by third-order difference of the displacement vector. The system selects four consecutive sampling points to calculate the rate of change of acceleration, reflecting the degree of "rapid" motion of the object.
[0069] These higher-order motion parameters can more precisely characterize the motion characteristics of an object, especially suitable for high-speed or highly maneuverable objects (such as drones and missiles). The purpose of this step is to enhance the expressive power of the trajectory vector, so that it not only includes velocity and direction information, but also reflects the complex motion behaviors of the object such as acceleration, deceleration, and turning, providing richer dynamic basis for subsequent collision prediction.
[0070] After completing the above calculations, the system inputs parameters such as displacement vector, time difference, velocity, acceleration, and jerk into a preset trajectory vector model to construct a complete trajectory vector. The vector model is as follows:
[0071]
[0072] Where P0 is the initial position, Δt is the time difference, V is the velocity (calculated from the displacement vector and the time difference), A is the acceleration, and J is the jerk.
[0073] The resulting trajectory vector contains rich velocity and direction information. This direction and velocity information supports rapid distance estimation (such as vector cross multiplication), providing an efficient basis for judgment in subsequent detection phases.
[0074] The effects of this step are as follows:
[0075] Improved computational efficiency: Vectorized approximation transforms continuous trajectory comparisons into discrete vector operations, avoiding redundancy in point-by-point calculations. The introduction of higher-order motion features (acceleration, jerk) reduces prediction errors and minimizes redundant calculations in the refinement phase.
[0076] Accuracy assurance: Smoothing and missing data prediction compensate for the deficiencies of the original data, ensuring trajectory continuity. Higher-order terms in the vector model improve the accuracy of motion state description, reducing missed detections and false alarms.
[0077] Step S102: Divide the space to be detected into multiple cubic grid sub-regions of equal size according to the preset three-dimensional grid division algorithm, assign a unique identifier to each grid sub-region, establish a mapping relationship between the grid sub-region and the trajectory vector, determine the corresponding spatial index area, divide the time axis of the space to be detected into multiple time segments, assign a unique identifier to each time segment, establish a mapping relationship between the time segment and the trajectory vector, and determine the corresponding time index area;
[0078] Optionally, in this embodiment, in order to perform indexing within the target area to achieve fast collision detection, we construct a spatial index area, a temporal index area, and a spatiotemporal correlation index area.
[0079] Optionally, in this embodiment, a spatial index area is established.
[0080] A three-dimensional mesh partitioning method is adopted, dividing the entire detection space into multiple equal-sized cubic meshes as spatial sub-regions. A unique identifier is assigned to each spatial sub-region, establishing a mapping relationship between the sub-region and trajectory data. The trajectory objects contained within each spatial sub-region are recorded. Simultaneously, the vectorized approximation of trajectory information is associated with the corresponding spatial sub-region. Based on the mapping relationship, the spatial index is optimized through a pre-defined octree index structure, forming an efficient spatial index area that supports fast querying and retrieval.
[0081] First, the spatial partitioning method is as follows: the three-dimensional space is divided into a cubic grid with side length s, and the origin of the grid is (x0, y0, z0). Then, the grid coordinates of any spatial point P(x, y, z) are:
[0082] Grid Index
[0083] Grid Index
[0084] Grid Index
[0085] Unique identifier for the grid: ID = i + j × N x +k×N x ×N y , where N x and N y These represent the number of grid cells in the x and y directions, respectively.
[0086] Next, each trajectory vector is associated with all the grid sub-regions it covers, forming a mapping relationship of "trajectory vector → grid sub-region".
[0087] Based on the starting and ending coordinates of the trajectory vector obtained in step S101 above, all the grid sub-regions it passes through are calculated to form a coverage area. The trajectory vector is associated with all the covered grid sub-regions (each grid sub-region has a unique identifier), and the trajectory vector information within each grid sub-region is recorded. An octree index structure is used to organize the mapping relationship, dividing the space into a hierarchical cube, where each node represents a spatial region, and the leaf nodes store the specific trajectory vector data.
[0088] Octree indexing enables efficient retrieval of trajectory vectors within a specific spatial region, reducing unnecessary computation. Furthermore, octrees support dynamic insertion and deletion, adapting to real-time changes in trajectory data. Their hierarchical structure reduces memory consumption and enhances the feasibility of large-scale data processing.
[0089] Optionally, in this embodiment, a time index area is established.
[0090] Based on actual application requirements and the time span of trajectory data, the time axis is divided into multiple time segments, such as 1 minute or 5 minutes per segment. A unique identifier is assigned to each time segment, establishing a mapping relationship between time segments and trajectory data, and recording the vectorized approximate trajectory information of each trajectory object within each time segment.
[0091] Specifically, after dividing the time into multiple time segments, the overlap time between adjacent segments is set, and the overlap factor δ is set to ensure that the trajectory data at the boundary time point is completely covered by at least one segment.
[0092] T seg =[t k -δ,t k+1 +δ],δ=0.2·Δt
[0093] Here, δ is the overlap factor, which solves the problem of missed boundary collision detection.
[0094] Specifically, after the aforementioned time segmentation, the trajectory vectors are assigned to their respective time segments based on their time attributes (such as timestamps), and a mapping relationship between the segments and the trajectory vectors is established. A B-tree structure is used to organize the mapping relationship between time segments and trajectory vectors, leveraging the balancing properties of B-trees to achieve efficient time range queries.
[0095] B-tree indexes support logarithmic time complexity queries, enabling rapid location of trajectory data within specific time periods. The overlap factor design ensures that trajectory data at boundary time points is detected across multiple segments, eliminating missed detections caused by time segmentation.
[0096] Next, after constructing the spatial and temporal indexes, this step can also associate the spatial index with the temporal index through hash mapping or tree structure to form a spatiotemporal joint key (spatial grid ID + time segment ID);
[0097] The spatiotemporal joint index described above allows for precise correlation of a small number of candidate trajectories that may collide in both space and time (such as pairs of aircraft in the same grid with overlapping time windows).
[0098] Understandably, in scenarios with smaller data volumes or strong spatiotemporal coupling (such as low-speed object monitoring using fixed sensors), directly using a time-series composite index may be simpler. However, for large-scale, highly dynamic trajectories (such as tens of thousands of satellites or millions of autonomous vehicles), a step-by-step indexing strategy has significant advantages in terms of efficiency and scalability.
[0099] Step S102 above decomposes the collision detection task of large-scale trajectory data into spatial and temporal subtasks through spatial partitioning, temporal segmentation, and multiple indexing, reducing the algorithm complexity from O(n^2) to O(n^2). 2 The computational complexity is reduced to nearly O(nlogn). The optimized design of spatial index (octree) and temporal index (B-tree), combined with the introduction of the overlap factor, ensures the comprehensiveness and efficiency of detection, laying a solid foundation for subsequent parallel computing and accurate collision warning.
[0100] Step S103: Within the spatial index area, perform parallel collision detection on each of the grid sub-regions of the space to be detected to determine the corresponding first potential collision risk trajectory pair. Perform parallel collision detection on the first potential collision risk trajectory pair according to the time segment of the time index area to determine the corresponding second potential collision trajectory pair. Perform precise spatial distance calculation on the second potential collision trajectory pair according to the preset kinematic trajectory prediction model to determine the corresponding spatial distance prediction value. Perform threshold judgment on the spatial distance prediction value to determine the corresponding collision risk and issue a risk warning.
[0101] Optionally, in this embodiment, during the coarse detection stage, each parallel computing unit performs a preliminary collision risk assessment on trajectory vector pairs located in the same or adjacent spatial partitions and within the same time segment, based on spatial and temporal indices. For example, it compares whether the shortest distance between two trajectory vectors is less than a coarse collision warning threshold. If it is less than the threshold, the pair of trajectory vectors is marked as potentially posing a collision risk and proceeds to the fine detection stage; otherwise, it is considered that there is no collision risk and is removed from subsequent fine detection calculations. This stage of parallel computing can significantly reduce the number of trajectory pairs requiring precise collision detection, improving the overall efficiency of the algorithm.
[0102] Specifically, the coarse screening is performed in parallel.
[0103] The first level of parallelism involves allocating coarse detection tasks based on spatial partitioning. Trajectory collision coarse detection tasks for different spatial sub-regions are distributed to different computing nodes or threads for parallel execution. Each computing node or thread is responsible for handling trajectory collision coarse detection within one or more spatial sub-regions. Within the spatial index region, trajectory vectors within the same or adjacent grid sub-regions are coarsely screened by comparing initial distance and velocity difference vectors to obtain the first potential collision risk trajectory pairs. The initial distance is obtained by calculating the spatial distance between the two trajectories at the starting time point; the velocity difference vector is obtained by calculating the velocity difference vector between the two trajectories using the vectorized approximation of the trajectories.
[0104] In the second level of parallelism, within each spatial sub-region, for the first potential collision risk trajectory pairs selected in the coarse screening stage, the system further performs parallel detection along the time dimension. Using a sliding time window algorithm, the trajectory data is divided into time segments, and the coarse collision detection tasks for different time segments are further distributed to multiple computing units for parallel processing. The positional relationships of trajectory pairs are compared in parallel, and trajectory pairs that may collide within a specific time period are selected and marked as second potential collision trajectory pairs. Through time segmentation and parallel processing, the scope of potential collision trajectory pairs is further refined, improving detection accuracy.
[0105] To illustrate the coarse screening process using a specific example, suppose that within a time segment ΔT, if the following conditions are met, then two trajectories are considered to have a potential collision risk: Trajectory vectors based on vectorized approximation. and And the spatial distance d0 between the starting points of the two trajectories, assuming and They are respectively:
[0106]
[0107] Calculate the velocity difference vector:
[0108] The rough judgment criteria are:
[0109]
[0110] in D threshold This is the distance threshold for coarse detection.
[0111] Optionally, in this embodiment, during the fine detection stage, for trajectory pairs that may pose a collision risk as identified by the coarse detection, the parallel computing unit further employs a more precise collision detection algorithm for detailed calculations.
[0112] For example, by considering the kinematic parameters of the trajectories (such as velocity and acceleration) and the prediction model, and combining them with the time dimension, the possible collision times and locations of the two trajectories in the future can be accurately calculated to determine whether there is a real risk of collision. This process also employs parallel computing, further reducing computation time and ensuring timely output of collision warning results.
[0113] The prediction model comprehensively considers motion parameters such as the historical position, velocity, and acceleration of the trajectory to calculate the predicted position coordinates of each trajectory at the target time point, achieving accurate prediction of the future position of the trajectory. At the same time, by introducing kinematic features, the accuracy of trajectory prediction is improved, providing a reliable basis for subsequent distance calculation.
[0114] To illustrate the fine screening process using a specific example, for the trajectory pairs selected by the coarse detection, at each time point t, the precise trajectory coordinates A obtained through the prediction model are... t (x a,t ,y a,t ,z a,t ) and B t (x b,t ,y b,t ,z b,t ), calculate the precise distance according to the spatial distance formula, Then compare them again.
[0115] By calculating the precise spatial distance of the trajectory at each time point, it is determined whether it is less than a preset collision warning threshold. If it is less than the threshold, a collision warning signal is issued, and detailed information such as the name, time, and spatial location of the trajectory object involved in the collision warning is recorded.
[0116] Different risk levels are set according to the threshold size, as shown in the following formula.
[0117]
[0118] Ds represents the risk distance, and Δt represents the time to collision. These parameters can be set differently depending on the type of moving vehicle.
[0119] This step employs a progressive refinement strategy combining coarse screening and fine exploration, incorporating kinematic models to ensure high accuracy of the early warning results. Multiple indexes and a parallel architecture support rapid response, meeting real-time early warning requirements. Dynamic thresholds and risk grading mechanisms adapt to the needs of different application scenarios. It is suitable for various highly dynamic and complex scenarios such as satellites, drones, and autonomous driving.
[0120] The beneficial effects of this solution after the above steps S101-S103 are as follows:
[0121] High efficiency: By simplifying the trajectory representation through vectorization and combining spatial partitioning, temporal segmentation and multi-level parallel computing, the large-scale trajectory collision detection task is decomposed into multiple sub-tasks to be executed in parallel, which greatly reduces the amount of computation and detection time, significantly improves detection efficiency, and can meet the real-time early warning needs of application scenarios such as satellites, drones, and automobiles.
[0122] Accuracy: By leveraging the smoothness and predictability of trajectories for vectorized approximation and supplementary prediction data, and employing a progressive refinement strategy of coarse detection + fine detection, the accuracy of collision warning is improved while ensuring computational efficiency, and false alarms and missed alarms are reduced.
[0123] Versatility: The algorithm and device of this solution are applicable to various moving objects with spatial trajectories, such as satellites, drones, and automobiles, and have a wide range of applications and good versatility.
[0124] Scalability: The rules for spatial partitioning and temporal segmentation can be flexibly adjusted according to actual application scenarios. The multi-level parallel computing architecture facilitates the addition of computing resources to adapt to the needs of trajectory data processing of different scales, and has strong scalability.
[0125] This example demonstrates how this embodiment constructs a spatiotemporal index, employs a two-stage fine-grained parallel computing approach of coarse-fine screening within the spatiotemporal index region for rapid large-scale trajectory prediction, and achieves accurate and fast trajectory collision detection by comparing the vectorized representation of the trajectory.
[0126] As described above, the large-scale spatial trajectory collision detection method provided in this application can obtain trajectory vectors by sampling each trajectory data in the space to be detected, calculating the displacement and time difference between sampling points, dividing the space to be detected into multiple cubic grid sub-regions, associating the grid sub-regions with the trajectory vectors to construct a spatial index area, dividing the time axis of the space to be detected into multiple time segments, associating the time segments with the trajectory vectors to construct a time index area, performing a first parallel collision detection in the spatial index area to obtain potential collision risk trajectory pairs in space, and then performing a second parallel collision detection based on time segments in each spatial sub-region to narrow the range of potential collision trajectory pairs, performing trajectory model prediction on the finally obtained collision trajectory pairs, and considering kinematic parameters in the prediction results to provide collision warnings, thereby improving the efficiency and accuracy of collision detection of moving object trajectories.
[0127] In one embodiment of the large-scale spatial trajectory collision detection method of this application, it may further include the following:
[0128] Step S201: Receive a list of trajectory data in the space to be detected, wherein the list of trajectory data includes name, time and spatial coordinates;
[0129] Step S202: Use a polynomial fitting algorithm to smooth each trajectory data in the trajectory data list, and predict and supplement the trajectory data at missing time points to determine the corresponding continuous trajectory.
[0130] Step S203: Sample each continuous trajectory at fixed time intervals to determine the corresponding trajectory sampling points.
[0131] Optionally, in this embodiment, receiving a list of trajectory data in the space to be detected includes:
[0132] Receive a list of trajectory data containing name, time, x, y, and z.
[0133] Name: Used to uniquely identify the trajectory of different moving objects;
[0134] Time: The timestamp used to record the trajectory points;
[0135] Spatial coordinates (x, y, z): represent the position of an object in three-dimensional space, in meters or other units of length.
[0136] Optionally, in this embodiment, since the original trajectory data may contain noise, jitter, or missing data, directly using it for collision detection may lead to misjudgment or missed detection. Therefore, firstly, the received trajectory data is subjected to format verification and integrity checks to remove abnormal data, such as duplicate timestamps or coordinate values outside the reasonable range. Next, given the relatively smooth nature of the trajectory and its ability to be vectorized and predicted within a short time, algorithms such as multinomial fitting or Kalman filtering are used to smooth the trajectory data and predict and supplement missing time point data to obtain more continuous and accurate trajectory data.
[0137] Specifically, polynomial fitting approximates the trajectory points using the least squares method, eliminating measurement noise or jitter; while Kalman filtering uses a motion model to dynamically correct the trajectory.
[0138] Smoothing reduces noise interference in trajectory analysis, improving the accuracy of trajectory representation. Predictive supplementation ensures the continuity of the trajectory in the time dimension, avoiding missed collisions due to missing data.
[0139] Optionally, in this embodiment, a fixed sampling interval (such as 1 second or 5 seconds) is set to extract sampling points from the smoothed continuous trajectory.
[0140] The selection of the sampling interval needs to balance computational efficiency and accuracy: too large an interval will result in the loss of details, while too small an interval will increase the computational load. By discretizing the continuous trajectory into a sequence of equally spaced sampling points, a foundation is provided for subsequent vectorized modeling.
[0141] Through step S203, this embodiment smooths the original trajectory data and extracts sampling point data, laying a solid data foundation for the vectorized representation of the subsequent trajectory data.
[0142] In one embodiment of the large-scale spatial trajectory collision detection method of this application, it may further include the following:
[0143] Step S301: Obtain the spatial coordinates and timestamps of adjacent trajectory sampling points, determine the corresponding displacement vector based on the coordinate difference of the spatial coordinates, and determine the corresponding time difference based on the timestamp difference of the timestamps;
[0144] Step S302: Determine the corresponding acceleration and jerk based on the displacement vector and time difference of multiple continuous trajectory sampling points, wherein the acceleration is calculated by the second-order difference of the displacement vector and the jerk is calculated by the third-order difference of the displacement vector.
[0145] Step S303: Introduce the acceleration and the jerk into a preset trajectory vector model to determine the corresponding trajectory vector, wherein the trajectory vector includes direction information and velocity information.
[0146] Optionally, in this embodiment, after the above sampling, the trajectory between adjacent sampling points is approximated as a vector. By calculating the displacement and time difference between adjacent sampling points, the trajectory vector within each time period is obtained, thereby realizing the vectorized representation of the trajectory, which facilitates subsequent rapid calculation and analysis.
[0147] Specifically, for each pair of adjacent sampling points A and B, the system obtains their spatial coordinates (x_A, y_A, z_A) and (x_B, y_B, z_B), as well as their timestamps t_A and t_B.
[0148] Calculate the displacement vector: ΔP = (x_B - x_A, y_B - y_A, z_B - z_A), which represents the direction and distance of the object's movement during that time period.
[0149] Calculate the time difference: Δt = t_B - t_A, which represents the time taken for the displacement.
[0150] Specifically, given distance and time, velocity V can be calculated. To more accurately describe the motion of an object, the system further calculates acceleration and jerk (i.e., the rate of change of acceleration, also known as jerk).
[0151] Acceleration A: Calculated by second-order difference of the displacement vector. The system selects three consecutive sampling points A, B, and C, calculates their displacement changes over two time periods, and then determines the rate of change of velocity, i.e., acceleration.
[0152] Jerk J: Calculated by third-order difference of the displacement vector. The system selects four consecutive sampling points to calculate the rate of change of acceleration, reflecting the degree of "rapid" motion of the object.
[0153] These higher-order motion parameters can more precisely characterize the motion characteristics of an object, especially suitable for high-speed or highly maneuverable objects (such as drones and missiles). The purpose of this step is to enhance the expressive power of the trajectory vector, so that it not only includes velocity and direction information, but also reflects the complex motion behaviors of the object such as acceleration, deceleration, and turning, providing richer dynamic basis for subsequent collision prediction.
[0154] After completing the above calculations, the system inputs parameters such as displacement vector, time difference, velocity, acceleration, and jerk into a preset trajectory vector model to construct a complete trajectory vector. The vector model is as follows:
[0155]
[0156] Where P0 is the initial position, Δt is the time difference, V is the velocity (calculated from the displacement vector and the time difference), A is the acceleration, and J is the jerk.
[0157] The resulting trajectory vector contains rich velocity and direction information. This direction and velocity information supports rapid distance estimation (such as vector cross multiplication), providing an efficient basis for judgment in subsequent detection phases.
[0158] In step S303, this embodiment obtains the trajectory vector by mathematical calculation of the sampling points, providing an efficient basis for judgment in the subsequent detection stage.
[0159] In one embodiment of the large-scale spatial trajectory collision detection method of this application, it may further include the following:
[0160] Step S401: Determine the range of the grid sub-region covered by the trajectory vector based on the starting coordinates and ending coordinates of the trajectory vector;
[0161] Step S402: Associate the trajectory vector with all covered grid sub-regions according to the range of the grid sub-regions, determine the corresponding spatial index mapping relationship, optimize the spatial index mapping relationship according to the preset octree index structure, and determine the corresponding spatial index area.
[0162] Optionally, in this embodiment, each trajectory vector is associated with all the grid sub-regions it covers to form a mapping relationship of "trajectory vector → grid sub-region".
[0163] Based on the starting and ending coordinates of the trajectory vector, all grid sub-regions it passes through are calculated to form a coverage area. The trajectory vector is then associated with all covered grid sub-regions (each grid sub-region has a unique identifier), and the trajectory vector information within each grid sub-region is recorded. An octree index structure is used to organize the mapping relationship, dividing the space into hierarchical cubes, where each node represents a spatial region, and the leaf nodes store the specific trajectory vector data.
[0164] Octree indexing enables efficient retrieval of trajectory vectors within a specific spatial region, reducing unnecessary computation. Furthermore, octrees support dynamic insertion and deletion, adapting to real-time changes in trajectory data. Their hierarchical structure reduces memory consumption and enhances the feasibility of large-scale data processing.
[0165] Through step S402, this embodiment successfully constructs the spatial index relationship between the grid sub-region and the trajectory vector, laying the foundation for efficient trajectory retrieval and improved collision detection efficiency.
[0166] In one embodiment of the large-scale spatial trajectory collision detection method of this application, it may further include the following:
[0167] Step S501: Divide the time axis of the space to be detected into multiple time segments and set the overlap factor between adjacent time segments. The overlap factor is used to cover the trajectory data of the boundary time points.
[0168] Step S502: Assign a unique identifier to each time segment, determine the time segment to which the trajectory vector belongs based on its time attribute, establish a mapping relationship between time segments and trajectory vectors, construct a time index using a B-tree structure based on the mapping relationship between time segments and trajectory vectors, and determine the corresponding time index area.
[0169] Optionally, in this embodiment, based on actual application requirements and the time span of the trajectory data, the time axis is divided into multiple time segments, such as 1 minute, 5 minutes, etc., as one time segment. A unique identifier is assigned to each time segment, a mapping relationship between the time segment and the trajectory data is established, and the vectorized approximate trajectory information of each trajectory object within each time segment is recorded.
[0170] Specifically, after dividing the time into multiple time segments, the overlap time between adjacent segments is set, and the overlap factor δ is set to ensure that the trajectory data at the boundary time point is completely covered by at least one segment.
[0171] T seg =[t k -δ,t k+1 +δ],δ=0.2·Δt
[0172] Here, δ is the overlap factor, which solves the problem of missed boundary collision detection.
[0173] Specifically, after the aforementioned time segmentation, the trajectory vectors are assigned to their respective time segments based on their time attributes (such as timestamps), and a mapping relationship between the segments and the trajectory vectors is established. A B-tree structure is used to organize the mapping relationship between time segments and trajectory vectors, leveraging the balancing properties of B-trees to achieve efficient time range queries.
[0174] B-tree indexes support logarithmic time complexity queries, enabling rapid location of trajectory data within specific time periods. The overlap factor design ensures that trajectory data at boundary time points is detected across multiple segments, eliminating missed detections caused by time segmentation.
[0175] Through step S502, this embodiment successfully divided each time segment to construct a time index area, laying the foundation for efficient trajectory retrieval and improved collision detection efficiency.
[0176] In one embodiment of the large-scale spatial trajectory collision detection method of this application, it may further include the following:
[0177] Step S601: Within the spatial index area, the trajectory vectors within the same or adjacent grid sub-regions of the space to be detected are compared, and parallel coarse screening is performed based on the initial distance and velocity difference vectors to determine the corresponding first potential collision risk trajectory pairs;
[0178] Step S602: For the first potential collision risk trajectory pair, perform parallel collision detection according to the time segment of the time index area using the sliding time window algorithm to determine the corresponding second potential collision trajectory pair.
[0179] Optionally, in this embodiment, this step is the coarse detection stage, which employs a two-stage parallel detection.
[0180] Specifically, the first level of parallelism involves allocating coarse detection tasks based on spatial partitioning. Trajectory collision coarse detection tasks for different spatial sub-regions are distributed to different computing nodes or threads for parallel execution. Each computing node or thread is responsible for handling trajectory collision coarse detection within one or more spatial sub-regions. Within the spatial index region, for trajectory vectors within the same or adjacent grid sub-regions, the first potential collision trajectory pairs are coarsely screened by comparing the initial distance and velocity difference vector. The initial distance is obtained by calculating the spatial distance between the two trajectories at the starting time point; the velocity difference vector is obtained by calculating the velocity difference vector between the two trajectories using the vectorized approximation of the trajectories.
[0181] In the second level of parallelism, within each spatial sub-region, for the first potential collision risk trajectory pairs selected in the coarse screening stage, the system further performs parallel detection along the time dimension. Using a sliding time window algorithm, the trajectory data is divided into time segments, and the coarse collision detection tasks for different time segments are further distributed to multiple computing units for parallel processing. The positional relationships of trajectory pairs are compared in parallel, and trajectory pairs that may collide within a specific time period are selected and marked as second potential collision trajectory pairs. Through time segmentation and parallel processing, the scope of potential collision trajectory pairs is further refined, improving detection accuracy.
[0182] To illustrate the coarse screening process using a specific example, suppose that within a time segment ΔT, if the following conditions are met, then two trajectories are considered to have a potential collision risk: Trajectory vectors based on vectorized approximation. and And the spatial distance d0 between the starting points of the two trajectories, assuming and They are respectively:
[0183]
[0184] Calculate the velocity difference vector:
[0185] The rough judgment criteria are:
[0186]
[0187] in D threshold This is the distance threshold for coarse detection.
[0188] Trajectory pairs that do not meet the threshold range are identified as potential collision pairs. Parallel computation in this stage can significantly reduce the number of trajectory pairs requiring accurate collision detection, thus improving the overall efficiency of the algorithm.
[0189] Through step S602, this embodiment successfully performs rapid trajectory screening through a two-stage coarse screening, identifying trajectory pairs with potential collision risks and laying the foundation for subsequent fine screening to confirm the collision probability.
[0190] In one embodiment of the large-scale spatial trajectory collision detection method of this application, it may further include the following:
[0191] Step S701: Predict the positions of the two trajectories in the second potential collision trajectory pair at the target time point according to the preset kinematic trajectory prediction model, and determine the corresponding predicted position coordinates;
[0192] Step S702: Calculate the predicted spatial distance between the two trajectories at the target time point based on the predicted position coordinates.
[0193] Optionally, in this embodiment, during the fine detection stage, for trajectory pairs that may pose a collision risk as identified by the coarse detection, the parallel computing unit further employs a more precise collision detection algorithm for detailed calculations.
[0194] For example, by considering the kinematic parameters of the trajectories (such as velocity and acceleration) and the prediction model, and combining them with the time dimension, the possible collision times and locations of the two trajectories in the future can be accurately calculated to determine whether there is a real risk of collision. This process also employs parallel computing, further reducing computation time and ensuring timely output of collision warning results.
[0195] The prediction model comprehensively considers motion parameters such as the historical position, velocity, and acceleration of the trajectory to calculate the predicted position coordinates of each trajectory at the target time point, achieving accurate prediction of the future position of the trajectory. At the same time, by introducing kinematic features, the accuracy of trajectory prediction is improved, providing a reliable basis for subsequent distance calculation.
[0196] To illustrate the fine screening process using a specific example, for the trajectory pairs selected by the coarse detection, at each time point t, the precise trajectory coordinates A obtained through the prediction model are... t (x a,t ,y a,t ,z a,t) and B t (x b,t ,y b,t ,z b,t ), calculate the precise distance according to the spatial distance formula, Then compare them again.
[0197] By calculating the precise spatial distance of the trajectory at each time point, it is determined whether it is less than a preset collision warning threshold. If it is less than the threshold, a collision warning signal is issued, and detailed information such as the name, time, and spatial location of the trajectory object involved in the collision warning is recorded.
[0198] Through step S702, this embodiment successfully obtains the distance prediction value of the trajectory through fine screening, laying the foundation for subsequent distance comparison and risk warning.
[0199] To improve the efficiency and accuracy of collision detection for moving objects, this application provides an embodiment of a large-scale spatial trajectory collision detection device for implementing all or part of the aforementioned large-scale spatial trajectory collision detection method. See [link to embodiment]. Figure 2 The large-scale spatial trajectory collision detection device specifically includes the following components:
[0200] The trajectory vector approximation module 10 is used to receive a list of trajectory data in the space to be detected, sample each trajectory at fixed time intervals, determine the corresponding trajectory sampling points, calculate the displacement and time difference between the trajectory sampling points, and obtain the trajectory vector in each time interval, wherein the trajectory vector includes direction information and velocity information;
[0201] The time-space partitioning module 20 is used to divide the space to be detected into multiple cubic grid sub-regions of equal size according to a preset three-dimensional grid partitioning algorithm, assign a unique identifier to each grid sub-region, establish a mapping relationship between the grid sub-region and the trajectory vector, determine the corresponding spatial index area, divide the time axis of the space to be detected into multiple time segments, assign a unique identifier to each time segment, establish a mapping relationship between the time segment and the trajectory vector, and determine the corresponding time index area;
[0202] The parallel secondary fine-grained trajectory prediction module 30 is used to perform parallel collision detection on each of the grid sub-regions of the space to be detected within the spatial index area, determine the corresponding first potential collision risk trajectory pair, perform parallel collision detection on the first potential collision risk trajectory pair according to the time segment of the time index area, determine the corresponding second potential collision trajectory pair, perform accurate spatial distance calculation on the second potential collision trajectory pair according to the preset kinematic trajectory prediction model, determine the corresponding spatial distance prediction value, perform threshold judgment on the spatial distance prediction value to determine the corresponding collision risk, and perform risk warning.
[0203] As described above, the large-scale spatial trajectory collision detection device provided in this application embodiment can obtain trajectory vectors by sampling each trajectory data in the space to be detected, calculating the displacement and time difference between sampling points, dividing the space to be detected into multiple cubic grid sub-regions, associating the grid sub-regions with the trajectory vectors to construct a spatial index area, dividing the time axis of the space to be detected into multiple time segments, associating the time segments with the trajectory vectors to construct a time index area, performing a first parallel collision detection in the spatial index area to obtain potential collision risk trajectory pairs in space, and then performing a second parallel collision detection based on time segments in each spatial sub-region to narrow down the range of potential collision trajectory pairs, performing trajectory model prediction on the finally obtained collision trajectory pairs, and considering kinematic parameters in the prediction results to provide collision warnings, thereby improving the efficiency and accuracy of collision detection of moving object trajectories.
[0204] To further illustrate this solution, this application also provides a specific application example of using the aforementioned large-scale spatial trajectory collision detection device to implement a large-scale spatial trajectory collision detection method, which specifically includes the following:
[0205] This first embodiment demonstrates a large-scale, rapid, parallel detection system for spatial trajectory collision early warning, comprising:
[0206] Data receiving unit: responsible for receiving a list of trajectory data containing name, time, x, y, and z.
[0207] Example data:
[0208] SAT001,2028-07-15T12:30:45.123Z,6371.23,1254.87,421.56
[0209] SAT002,2028-07-15T12:30:45.456Z,6370.98,1255.01,421.61
[0210] Data preprocessing and vectorization unit: preprocesses the received data, including format verification and outlier removal. It also utilizes the characteristics of trajectory smoothing, vectorizable approximation, and prediction to smooth the trajectory data, predict and supplement missing data, and perform vectorized approximation.
[0211] Spatial partitioning unit: Divide the spatial region into multiple spatial sub-regions and establish a mapping relationship between the spatial sub-regions and trajectory data and its vectorized approximate information.
[0212] Time segmentation unit: Divide the time axis into multiple time segments and establish a mapping relationship between time segments and trajectory data and its vectorized approximate information.
[0213] Index building unit: Constructs spatial index, time index and spatiotemporal joint index respectively to realize fast retrieval of trajectory data and its vectorized approximate information.
[0214] Parallel computing and collision detection unit: Employs a multi-level parallel computing strategy for coarse and fine detection processing. The first level of parallelism allocates coarse detection tasks based on spatial partitioning, while the second level further processes the data within the spatial sub-regions based on time segmentation. Finally, it performs fine detection on the potential collision trajectory pairs selected by the coarse detection. When the spatial distance between the detected trajectory objects is less than a preset threshold, a collision warning signal is issued.
[0215] Early warning output unit: Used to display or output collision warning information, including detailed information such as the name of the trajectory object involved in the collision warning, time, and spatial location.
[0216] This second embodiment demonstrates a code example for parallel execution during the coarse exploration phase:
[0217]
[0218]
[0219] This third example demonstrates a code example for parallel execution during the refinement phase:
[0220]
[0221]
[0222] From a hardware perspective, in order to improve the efficiency and accuracy of collision detection of moving object trajectories, this application provides an embodiment of an electronic device for implementing all or part of the aforementioned large-scale spatial trajectory collision detection method. The electronic device specifically includes the following components:
[0223] The system comprises a processor, memory, a communications interface, and a bus; wherein the processor, memory, and communications interface communicate with each other via the bus; the communications interface is used to realize information transmission between the large-scale spatial trajectory collision detection method and core business systems, user terminals, and related databases and other related devices; the logic controller can be a desktop computer, tablet computer, or mobile terminal, etc., and this embodiment is not limited to these. In this embodiment, the logic controller can be implemented with reference to the embodiments of the large-scale spatial trajectory collision detection method in the present embodiment, and the contents of the embodiments of the large-scale spatial trajectory collision detection method are incorporated herein, and repeated details will not be described again.
[0224] It is understood that the user terminal may include smartphones, tablet computers, network set-top boxes, portable computers, desktop computers, personal digital assistants (PDAs), in-vehicle devices, smart wearable devices, etc. Among these, the smart wearable devices may include smart glasses, smartwatches, smart bracelets, etc.
[0225] In practical applications, parts of the large-scale spatial trajectory collision detection method can be executed on the electronic device side as described above, or all operations can be completed in the client device. The choice can be made based on the processing power of the client device and the limitations of the user's usage scenario. This application does not impose any limitations on this. If all operations are completed in the client device, the client device may further include a processor.
[0226] The aforementioned client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission. The server may include a server on the task scheduling center side; in other implementation scenarios, it may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster consisting of multiple servers, or a distributed server structure.
[0227] Figure 3 This is a schematic block diagram illustrating the system configuration of the electronic device 9600 according to an embodiment of this application. Figure 3 As shown, the electronic device 9600 may include a central processing unit 9100 and a memory 9140; the memory 9140 is coupled to the central processing unit 9100. It is worth noting that... Figure 3 This is an example; other types of structures can also be used to supplement or replace this structure to achieve telecommunications functions or other functions.
[0228] In one embodiment, the large-scale spatial trajectory collision detection method functionality can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following control:
[0229] Step S101: Receive a list of trajectory data in the space to be detected, sample each trajectory at fixed time intervals, determine the corresponding trajectory sampling points, calculate the displacement and time difference between the trajectory sampling points, and obtain the trajectory vector in each time interval, wherein the trajectory vector includes direction information and velocity information;
[0230] Step S102: Divide the space to be detected into multiple cubic grid sub-regions of equal size according to the preset three-dimensional grid division algorithm, assign a unique identifier to each grid sub-region, establish a mapping relationship between the grid sub-region and the trajectory vector, determine the corresponding spatial index area, divide the time axis of the space to be detected into multiple time segments, assign a unique identifier to each time segment, establish a mapping relationship between the time segment and the trajectory vector, and determine the corresponding time index area;
[0231] Step S103: Within the spatial index area, perform parallel collision detection on each of the grid sub-regions of the space to be detected to determine the corresponding first potential collision risk trajectory pair. Perform parallel collision detection on the first potential collision risk trajectory pair according to the time segment of the time index area to determine the corresponding second potential collision trajectory pair. Perform precise spatial distance calculation on the second potential collision trajectory pair according to the preset kinematic trajectory prediction model to determine the corresponding spatial distance prediction value. Perform threshold judgment on the spatial distance prediction value to determine the corresponding collision risk and issue a risk warning.
[0232] As described above, the electronic device provided in this application sample each trajectory data in the space to be detected, calculates the displacement and time difference between sampling points to obtain a trajectory vector, divides the space to be detected into multiple cubic grid sub-regions, associates the grid sub-regions with the trajectory vectors to construct a spatial index area, divides the time axis of the space to be detected into multiple time segments, associates the time segments with the trajectory vectors to construct a time index area, performs a first parallel collision detection in the spatial index area to obtain potential collision risk trajectory pairs in space, and then performs a second parallel collision detection based on time segments in each spatial sub-region to narrow the range of potential collision trajectory pairs, performs trajectory model prediction on the finally obtained collision trajectory pairs, and considers kinematic parameters in the prediction results to provide collision warning, thereby improving the efficiency and accuracy of collision detection of moving object trajectories.
[0233] In another embodiment, the large-scale spatial trajectory collision detection method can be configured separately from the central processing unit 9100. For example, the large-scale spatial trajectory collision detection method can be configured as a chip connected to the central processing unit 9100, and the large-scale spatial trajectory collision detection method function can be implemented through the control of the central processing unit.
[0234] like Figure 3 As shown, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily need to include these components. Figure 3 All components shown; in addition, the electronic device 9600 may also include Figure 3For components not shown, please refer to existing technologies.
[0235] like Figure 3 As shown, the central processing unit 9100, sometimes also referred to as a controller or operating control, may include a microprocessor or other processor device and / or logic device, which receives inputs and controls the operation of various components of the electronic device 9600.
[0236] The memory 9140 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It may store the aforementioned failure-related information, and also store a program for executing that information. The central processing unit 9100 may execute the program stored in the memory 9140 to perform information storage or processing, etc.
[0237] Input unit 9120 provides input to central processing unit 9100. Input unit 9120 may be, for example, a keypad or touch input device. Power supply 9170 provides power to electronic device 9600. Display 9160 displays images and text. Display may be, for example, an LCD display, but is not limited thereto.
[0238] The memory 9140 can be a solid-state memory, such as a read-only memory (ROM), random access memory (RAM), a SIM card, etc. It can also be a memory that retains information even when power is off, can be selectively erased, and contains more data; examples of this type of memory are sometimes referred to as EPROMs. The memory 9140 can also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142 for storing application programs and function programs or processes for executing the operation of the electronic device 9600 via the central processing unit 9100.
[0239] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for the electronic device's communication functions and / or for performing other functions of the electronic device (such as messaging applications, address book applications, etc.).
[0240] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 is coupled to the central processing unit 9100 to provide input signals and receive output signals, which is the same as in a conventional mobile communication terminal.
[0241] Based on different communication technologies, multiple communication modules 9110 can be configured in the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby realizing typical telecommunications functions. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. Furthermore, the audio processor 9130 is also coupled to a central processing unit 9100, enabling on-device recording via the microphone 9132 and on-device playback of stored sound via the speaker 9131.
[0242] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the large-scale spatial trajectory collision detection method with a server or client as the execution subject in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the large-scale spatial trajectory collision detection method with a server or client as the execution subject in the above embodiments. For example, when the processor executes the computer program, it implements the following steps:
[0243] Step S101: Receive a list of trajectory data in the space to be detected, sample each trajectory at fixed time intervals, determine the corresponding trajectory sampling points, calculate the displacement and time difference between the trajectory sampling points, and obtain the trajectory vector in each time interval, wherein the trajectory vector includes direction information and velocity information;
[0244] Step S102: Divide the space to be detected into multiple cubic grid sub-regions of equal size according to the preset three-dimensional grid division algorithm, assign a unique identifier to each grid sub-region, establish a mapping relationship between the grid sub-region and the trajectory vector, determine the corresponding spatial index area, divide the time axis of the space to be detected into multiple time segments, assign a unique identifier to each time segment, establish a mapping relationship between the time segment and the trajectory vector, and determine the corresponding time index area;
[0245] Step S103: Within the spatial index area, perform parallel collision detection on each of the grid sub-regions of the space to be detected to determine the corresponding first potential collision risk trajectory pair. Perform parallel collision detection on the first potential collision risk trajectory pair according to the time segment of the time index area to determine the corresponding second potential collision trajectory pair. Perform precise spatial distance calculation on the second potential collision trajectory pair according to the preset kinematic trajectory prediction model to determine the corresponding spatial distance prediction value. Perform threshold judgment on the spatial distance prediction value to determine the corresponding collision risk and issue a risk warning.
[0246] As described above, the computer-readable storage medium provided in this application sample each trajectory data in the space to be detected, calculates the displacement and time difference between sampling points to obtain a trajectory vector, divides the space to be detected into multiple cubic grid sub-regions, and associates the grid sub-regions with the trajectory vectors to construct a spatial index area. It also divides the time axis of the space to be detected into multiple time segments and associates the time segments with the trajectory vectors to construct a time index area. A first parallel collision detection is performed in the spatial index area to obtain potential collision risk trajectory pairs in space. Then, a second parallel collision detection is performed in each spatial sub-region based on time segmentation to narrow down the range of potential collision trajectory pairs. The final collision trajectory pairs are then used for trajectory model prediction. The prediction results take kinematic parameters into account for collision warning, thereby improving the efficiency and accuracy of collision detection of moving object trajectories.
[0247] Embodiments of this application also provide a computer program product capable of implementing all steps of the large-scale spatial trajectory collision detection method with a server or client as the execution subject in the above embodiments. When executed by a processor, this computer program / instruction implements the steps of the large-scale spatial trajectory collision detection method. For example, the computer program / instruction implements the following steps:
[0248] Step S101: Receive a list of trajectory data in the space to be detected, sample each trajectory at fixed time intervals, determine the corresponding trajectory sampling points, calculate the displacement and time difference between the trajectory sampling points, and obtain the trajectory vector in each time interval, wherein the trajectory vector includes direction information and velocity information;
[0249] Step S102: Divide the space to be detected into multiple cubic grid sub-regions of equal size according to the preset three-dimensional grid division algorithm, assign a unique identifier to each grid sub-region, establish a mapping relationship between the grid sub-region and the trajectory vector, determine the corresponding spatial index area, divide the time axis of the space to be detected into multiple time segments, assign a unique identifier to each time segment, establish a mapping relationship between the time segment and the trajectory vector, and determine the corresponding time index area;
[0250] Step S103: Within the spatial index area, perform parallel collision detection on each of the grid sub-regions of the space to be detected to determine the corresponding first potential collision risk trajectory pair. Perform parallel collision detection on the first potential collision risk trajectory pair according to the time segment of the time index area to determine the corresponding second potential collision trajectory pair. Perform precise spatial distance calculation on the second potential collision trajectory pair according to the preset kinematic trajectory prediction model to determine the corresponding spatial distance prediction value. Perform threshold judgment on the spatial distance prediction value to determine the corresponding collision risk and issue a risk warning.
[0251] As described above, the computer program product provided in this application sample each trajectory data in the detection space, calculates the displacement and time difference between sampling points to obtain a trajectory vector, divides the detection space into multiple cubic grid sub-regions, associates the grid sub-regions with the trajectory vectors to construct a spatial index area, divides the time axis of the detection space into multiple time segments, associates the time segments with the trajectory vectors to construct a time index area, performs a first parallel collision detection in the spatial index area to obtain potential collision risk trajectory pairs in space, and then performs a second parallel collision detection based on time segments in each spatial sub-region to narrow the range of potential collision trajectory pairs, performs trajectory model prediction on the finally obtained collision trajectory pairs, and considers kinematic parameters in the prediction results to provide collision warning, thereby improving the efficiency and accuracy of collision detection of moving object trajectories.
[0252] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0253] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0254] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0255] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0256] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.
Claims
1. A large-scale spatial trajectory collision detection method, characterized in that, The method includes: Receive a list of trajectory data in the space to be detected, sample each trajectory at fixed time intervals, determine the corresponding trajectory sampling points, calculate the displacement and time difference between the trajectory sampling points, and obtain the trajectory vector within each time interval, wherein the trajectory vector includes direction information and velocity information; According to the preset three-dimensional mesh division algorithm, the space to be detected is divided into multiple cubic mesh sub-regions of equal size. A unique identifier is assigned to each mesh sub-region, and a mapping relationship between the mesh sub-region and the trajectory vector is established to determine the corresponding spatial index area. The time axis of the space to be detected is divided into multiple time segments, a unique identifier is assigned to each time segment, and a mapping relationship between the time segment and the trajectory vector is established to determine the corresponding time index area. Within the spatial index area, parallel collision detection is performed on each of the grid sub-regions of the space to be detected to determine the corresponding first potential collision risk trajectory pair. Parallel collision detection is then performed on the first potential collision risk trajectory pair according to the time segment of the time index area to determine the corresponding second potential collision trajectory pair. The second potential collision trajectory pair is then accurately spatially distanced according to a preset kinematic trajectory prediction model to determine the corresponding spatial distance prediction value. The spatial distance prediction value is then thresholded to determine the corresponding collision risk, and a risk warning is issued.
2. The large-scale spatial trajectory collision detection method according to claim 1, characterized in that, The process of receiving a list of trajectory data in the space to be detected, sampling each trajectory at fixed time intervals, and determining the corresponding trajectory sampling points includes: Receive a list of trajectory data in the space to be detected, wherein the list of trajectory data includes name, time and spatial coordinates; A multinomial fitting algorithm is used to smooth each trajectory data in the trajectory data list, and the trajectory data at missing time points are predicted and supplemented to determine the corresponding continuous trajectory. Each continuous trajectory is sampled at fixed time intervals to determine the corresponding trajectory sampling points.
3. The large-scale spatial trajectory collision detection method according to claim 1, characterized in that, The calculation of the displacement and time difference between the trajectory sampling points to obtain the trajectory vector within each time interval includes: Obtain the spatial coordinates and timestamps of adjacent trajectory sampling points, determine the corresponding displacement vector based on the coordinate difference of the spatial coordinates, and determine the corresponding time difference based on the timestamp difference of the timestamps; Based on the displacement vectors and time differences of multiple continuous trajectory sampling points, the corresponding acceleration and jerk are determined, wherein the acceleration is calculated by the second-order difference of the displacement vector, and the jerk is calculated by the third-order difference of the displacement vector. The acceleration and the jerk are introduced into a preset trajectory vector model to determine the corresponding trajectory vector, which includes direction information and velocity information.
4. The large-scale spatial trajectory collision detection method according to claim 1, characterized in that, The process of establishing the mapping relationship between the grid sub-region and the trajectory vector, and determining the corresponding spatial index region, includes: The range of the grid sub-region it covers is determined based on the starting and ending coordinates of the trajectory vector; The trajectory vector and all covered grid sub-regions are associated according to the range of the grid sub-region to determine the corresponding spatial index mapping relationship. The spatial index mapping relationship is optimized according to the preset octree index structure to determine the corresponding spatial index area.
5. The large-scale spatial trajectory collision detection method according to claim 1, characterized in that, The process of dividing the time axis of the space to be detected into multiple time segments, assigning a unique identifier to each time segment, establishing a mapping relationship between the time segments and the trajectory vector, and determining the corresponding time index area includes: The time axis of the space to be detected is divided into multiple time segments, and an overlap factor is set between adjacent time segments. The overlap factor is used to cover the trajectory data of the boundary time points. Each time segment is assigned a unique identifier. The time segment to which the trajectory vector belongs is determined based on the time attribute of the trajectory vector. A mapping relationship between time segments and trajectory vectors is established. Based on the mapping relationship between time segments and trajectory vectors, a time index is constructed using a B-tree structure to determine the corresponding time index area.
6. The large-scale spatial trajectory collision detection method according to claim 1, characterized in that, Within the spatial index area, parallel collision detection is performed on each of the grid sub-regions of the space to be detected to determine the corresponding first potential collision risk trajectory pair. Parallel collision detection is then performed on the first potential collision risk trajectory pair according to the time segment of the time index area to determine the corresponding second potential collision trajectory pair, including: Within the spatial index area, trajectory vectors within the same or adjacent grid sub-regions of the space to be detected are compared, and parallel coarse screening is performed based on the initial distance and velocity difference vectors to determine the corresponding first potential collision risk trajectory pairs; For the first potential collision risk trajectory pair, parallel collision detection is performed according to the time segment of the time index area using the sliding time window algorithm to determine the corresponding second potential collision trajectory pair.
7. The large-scale spatial trajectory collision detection method according to claim 1, characterized in that, The step of performing precise spatial distance calculation on the second potential collision trajectory pair according to the preset kinematic trajectory prediction model to determine the corresponding spatial distance prediction value includes: Based on the preset kinematic trajectory prediction model, the positions of the two trajectories in the second potential collision trajectory pair at the target time point are predicted, and the corresponding predicted position coordinates are determined. The predicted spatial distance between the two trajectories at the target time point is calculated based on the predicted location coordinates.
8. A large-scale spatial trajectory collision detection device, characterized in that, The device includes: The trajectory vector approximation module is used to receive a list of trajectory data in the space to be detected, sample each trajectory at fixed time intervals, determine the corresponding trajectory sampling points, calculate the displacement and time difference between the trajectory sampling points, and obtain the trajectory vector in each time interval, wherein the trajectory vector includes direction information and velocity information; The time-space partitioning module is used to divide the space to be detected into multiple cubic grid sub-regions of equal size according to a preset three-dimensional grid partitioning algorithm, assign a unique identifier to each grid sub-region, establish a mapping relationship between the grid sub-region and the trajectory vector, determine the corresponding spatial index area, divide the time axis of the space to be detected into multiple time segments, assign a unique identifier to each time segment, establish a mapping relationship between the time segment and the trajectory vector, and determine the corresponding time index area; The parallel secondary fine-grained trajectory prediction module is used to perform parallel collision detection on each of the grid sub-regions of the space to be detected within the spatial index area, determine the corresponding first potential collision risk trajectory pair, perform parallel collision detection on the first potential collision risk trajectory pair according to the time segment of the time index area, determine the corresponding second potential collision trajectory pair, perform accurate spatial distance calculation on the second potential collision trajectory pair according to the preset kinematic trajectory prediction model, determine the corresponding spatial distance prediction value, perform threshold judgment on the spatial distance prediction value to determine the corresponding collision risk, and perform risk warning.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the large-scale spatial trajectory collision detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the large-scale spatial trajectory collision detection method according to any one of claims 1 to 7.