Query method and system based on track index structure
By constructing a Probabilistic Mobility R-Tree (PMR-Tree), the problems of short-sighted splitting strategies and simplistic motion models in dynamic object indexes are solved, enabling efficient and accurate predictive queries while reducing update costs and computational complexity.
Patent Information
- Application Number
- CN202511700047.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-03-03
AI Technical Summary
Existing technologies for indexing dynamic objects suffer from short-sighted splitting strategies, high computational complexity due to simplified motion models, and high costs associated with updating motion state changes, making it difficult to meet the demands for high real-time performance and high accuracy.
The Probabilistic Maneuvering R-Tree (PMR-Tree) construction method is adopted. By modeling the motion uncertainty of objects as a probabilistic maneuvering boundary region (PMBR), the node splitting strategy and motion model are optimized, the update cost is reduced, and the query efficiency is improved.
It achieves efficient predictive queries, improves query performance through pruning strategies, supports accurate description of complex motions, and updates only the probability distribution when the motion state changes, avoiding index reconstruction.
Smart Images

Figure CN121599054A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer spatiotemporal data processing, and in particular to a technology for efficient predictive querying of large-scale dynamically moving objects. Background Technology
[0002] Currently, indexing dynamic objects primarily relies on extensions of traditional spatial indexes (such as R-trees). While traditional spatial indexing methods perform excellently when handling static data, they suffer from significant performance degradation due to the need for frequent deletion and re-insertion operations to update the positions of continuously moving objects, resulting in substantial maintenance overhead. To address this issue, academia has proposed advanced techniques, such as Time-Parameterized R-trees (TPR trees). The core idea is to represent the object's position as a function of time (i.e., motion vector parameterization), thereby directly encoding the object's continuous motion trajectory into the index structure. This reduces the index update frequency to some extent and enables predictive queries.
[0003] However, in demanding scenarios such as autonomous driving that require high real-time performance and accuracy, existing technologies, represented by TPR trees, still have the following three core shortcomings:
[0004] 1. The "short-sightedness" of the splitting strategy: When splitting nodes, the main optimization goal of the existing index is to minimize the overlap of bounding boxes at the current time (t=0). This strategy ignores the movement trend of objects, which may lead to severe overlap of bounding boxes after splitting in a very short period of time in the future. This makes predictive queries for future time periods (such as "collision detection in the next 5 seconds") perform poorly because they cannot be effectively pruned.
[0005] 2. Limitations and Complexity of Motion Models: Existing technologies generally employ uniform linear motion models. This is overly simplistic for vehicles that frequently accelerate, decelerate, and turn in the real world. On the other hand, using higher-order polynomials to describe nonlinear motion makes the calculation of bounding boxes and the determination of overlap extremely complex, resulting in excessively high computational costs and making it difficult to meet the low-latency requirements of real-time systems.
[0006] 3. High update cost for motion state changes: When an object's motion vector (velocity or direction) changes, even a minor adjustment, an expensive update operation must be performed in the index. This operation may trigger a chain of adjustments from leaf nodes to the root node, constituting a serious performance bottleneck in scenarios with heavy traffic and frequent state changes.
[0007] Therefore, existing technologies have irreconcilable contradictions in terms of index construction strategies, motion model adaptability, and update efficiency. There is an urgent need for a new trajectory indexing method to support future predictions of complex dynamic worlds at a lower cost and with greater accuracy. Summary of the Invention
[0008] This application addresses the technical problems existing in the prior art by providing a query method based on a trajectory index structure, including the following steps:
[0009] S1. Construct a probabilistic maneuver R-tree, including:
[0010] S11. Initialize and define data unit: Receive the dynamic object to be inserted and model its motion uncertainty as PMBR. The PMBR consists of multiple motion units, each of which includes a motion trajectory function, a dynamic bounding box function, and a probability / expectation value.
[0011] S12. Select the insertion path: Insert the object into the leaf node that minimizes the increase in internal movement disorder. If the node overflows after insertion, execute the node splitting method based on future interaction scores and select the partitioning scheme that minimizes the probability of interaction between the two split nodes in the future time window.
[0012] S13. Insert an object at a leaf node;
[0013] S14, Node splitting;
[0014] S15, Update the PMBR of the ancestor node upwards.
[0015] S2. Receive the query request and return the query results.
[0016] Furthermore, step S2 is specifically as follows:
[0017] S21: Receive a query request, including the PMBR of the query object, the time window, and the probability threshold;
[0018] S22: Recursively search from the root node, using the node PMBR to calculate the maximum interaction score for pruning;
[0019] S23: Perform precise collision probability calculations on objects in unpruned leaf nodes;
[0020] S24: Returns all objects whose collision probability exceeds the threshold and their probability values.
[0021] Furthermore, the data structure of the PMBR is as follows:
[0022] PMBR = [MU1, MU2, ..., MU] n ]
[0023] Each of the mobile units includes:
[0024] Maneuver_Function: Input time t, output object position;
[0025] Bounding_Box(t): Input time t, output the smallest bounding box that encloses the object;
[0026] Probability: Indicates the probability or expected number of times the trajectory will be executed.
[0027] Furthermore, in the path selection strategy based on future entropy increments, the formula for calculating the internal maneuver entropy of node C is:
[0028]
[0029] Where, ∑ j<k ... represents the summation of all non-repeating maneuvering element pairs (j,k) in the PMBR of node C; P_j and P_k are the probabilities or expected values of maneuvering elements j and k; Overlap(...) is a function that calculates the overlap volume of two dynamic bounding boxes at time t.
[0030] Furthermore, in the node splitting strategy, the splitting scheme that minimizes the score is selected, and the future interaction score is defined as:
[0031]
[0032] Furthermore, the formula for calculating the maximum interaction score is:
[0033]
[0034] If Max_Score = 0, then prune the subtree.
[0035] Furthermore, the formula for calculating the precise collision probability is as follows:
[0036]
[0037] Where Pa,Pb are strict probability values, and the results are between 0 and 1.
[0038] Furthermore, when the motion state of an object changes, if the change belongs to a motor unit already set in its PMBR, only its probability distribution is updated, and the index structure reorganization is not triggered.
[0039] This invention also provides a query system based on a trajectory index structure, applied to the query method, comprising a probabilistic maneuvering R-tree construction unit and a query unit, wherein:
[0040] Probabilistic maneuvering R-tree building blocks, used to implement:
[0041] S11. Initialize and define data unit: Receive the dynamic object to be inserted and model its motion uncertainty as PMBR. The PMBR consists of multiple motion units, each of which includes a motion trajectory function, a dynamic bounding box function, and a probability / expectation value.
[0042] S12. Select the insertion path: Insert the object into the leaf node that minimizes the increase in internal movement disorder. If the node overflows after insertion, execute the node splitting method based on future interaction scores and select the partitioning scheme that minimizes the probability of interaction between the two split nodes in the future time window.
[0043] S13. Insert an object at a leaf node;
[0044] S14, Node splitting;
[0045] S15, Update the PMBR of the ancestor node upwards.
[0046] The query unit is used to receive query requests and return query results.
[0047] The present invention also provides an electronic device, comprising: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the polling method as described above.
[0048] In practical applications, the system and modules disclosed in this application can be deployed on a single target server, or each module can be deployed independently on different target servers. In particular, as needed, to provide more powerful computing capabilities, modules can also be deployed on cluster target servers.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] Efficient splitting strategy: By optimizing the interactions between nodes within future time windows, the pruning efficiency of predictive queries is significantly improved.
[0051] Flexible motion model: Supports multiple motion trajectory functions, which can accurately describe complex motion while controlling computational complexity.
[0052] Low-cost update mechanism: When the motion state changes within the predefined maneuver range, only the probability distribution needs to be updated, avoiding index reconstruction.
[0053] A unified probabilistic framework: using the PMBR data structure to uniformly handle the motion uncertainties of individual objects and groups of nodes.
[0054] Practical query method: Combining pruning strategies and precise calculations, query performance is significantly improved while ensuring accuracy.
[0055] To provide a clearer and more comprehensive understanding of this application, the specific embodiments of this application will be described in detail below with reference to the accompanying drawings. Attached Figure Description
[0056] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 This is a schematic diagram of an intersection scenario in an embodiment of this application.
[0058] Figure 2 This is a schematic diagram of the new PMR-Tree hierarchical structure formed in the embodiments of this application. Detailed Implementation
[0059] This invention introduces a novel index structure and query method based on probabilistic maneuver prediction, aiming to achieve a dynamic object indexing scheme that is more friendly to future queries, highly adaptable to nonlinear motion, and has lower update costs.
[0060] This invention differs fundamentally from traditional R-trees and their derivatives: the nodes of a PMR-Tree are an aggregation and summary of future spatiotemporal behaviors, while the nodes of a traditional R-tree are merely a geometric aggregation of the current static space.
[0061] The technical solution of the present invention is: a query method based on a trajectory index structure, comprising steps S1 and S2, wherein:
[0062] S1. Construct a probabilistic maneuver R-tree.
[0063] S2. Receive the query request and return the query results.
[0064] The technical solution of this application is described below with reference to various preferred embodiments.
[0065] S1. Construct a probabilistic maneuvering R-tree. This method builds a future-interaction-friendly index structure by dynamically inserting objects. The specific steps are as follows:
[0066] S11. Initialize and define data units: Receive the dynamic object to be inserted and model its motion uncertainty as a probabilistic maneuvering boundary region (PMBR). The PMBR consists of multiple maneuvering units (MUs), each MU including a motion trajectory function, a dynamic bounding box function, and a probability / expectation value, specifically:
[0067] It receives a new object O_new, which is constructed as a data structure representing a newly indexed physical entity with dynamic behavior. O_new is an instance of a Probabilistic Mobility Boundary Region (PMBR).
[0068] The uncertainty of its motion is modeled as a probabilistic maneuver boundary region (PMBR). A PMBR is a list of data that encapsulates all the major motion possibilities of a physical entity or a group of physical entities within a future preset time window. PMBR = [MU_1, MU_2, ..., MU_n], where each item is a maneuvering unit (MU).
[0069] A maneuvering unit (MU) is the smallest data unit that describes a specific, single future trajectory. Its data structure consists of the following three attribute fields:
[0070] (1) Maneuver_Function (Motion Trajectory Function): A deterministic time function that takes a time variable t (t≥0) as input and outputs the spatial coordinates of the center point of the physical entity at that moment. The function can be, but is not limited to:
[0071] Linear function: Linear(start_pos, velocity_vector), used to describe uniform linear motion.
[0072] Arc function: Arc(center, radius, start_angle, angular_velocity), used to describe uniform circular motion.
[0073] Polynomial function: Polynomial(coeffs_x,coeffs_y) is used to describe more complex acceleration / deceleration and curvilinear motion.
[0074] (2) Bounding_Box(t) (Dynamic Bounding Box Function): A time function derived from Maneuver_Function that takes a time variable t as input and outputs a minimum bounding box (AABB) that completely encloses the physical entity at that time.
[0075] (3) Probability (probability / expected value): A non-negative floating-point number. The design of this field is one of the key aspects of this invention; it efficiently processes two different levels of information in a unified format.
[0076] When the PMBR represents a single physical entity (such as O_new, located within a leaf node of the index tree), the Probability field indicates the true probability that the entity will execute the trajectory described by this MU, and the sum of the Probability fields of all MUs within the PMBR must be equal to 1.
[0077] When PMBR represents a node (i.e., a summary of a group of physical entities located within a non-leaf node), this field represents the expected number of physical entities performing that type of maneuver. Its value can be greater than 1, and the sum of this field for all MUs equals the total number of physical entities contained under that node.
[0078] S12. Selecting the insertion path: Based on the path selection strategy of future entropy increment, the object is inserted into the leaf node that minimizes the increase in internal movement disorder. If the node overflows after insertion, the node splitting method based on future interaction score is executed to select the partitioning scheme that minimizes the probability of interaction between the two nodes in the future time window.
[0079] This step starts from the root node and determines an optimal target leaf node L for the new object O_new. The selection criterion is no longer the traditional minimum area increase, but rather the path that minimizes the increase in future "internal motion disorder".
[0080] S12.1: Let the current node be N. If N is a leaf node, then L = N, and the process jumps to S13. If N is an intermediate node, execute S12.2.
[0081] S12.2: Calculate and select the child node with the smallest entropy increment.
[0082] For each child node C_i of the current intermediate node N, calculate the internal maneuver entropy increment ΔEntropy caused by adding O_new to C_i.
[0083] a. Entropy Setting: To quantify the degree of "chaos" or "unpredictability" of the internal behavior of a node, this invention sets an internal maneuver entropy. The internal maneuver entropy Entropy(C) of any node C is quantified as the expected self-collision integral of all maneuvering units within the PMBR of that node over the future time window [0,T]. Its calculation formula is as follows:
[0084]
[0085] Where, ∑ j<k... represents the summation of all non-repeating maneuvering element pairs (j,k) in the PMBR of node C; P_j and P_k are the probabilities or expected values of maneuvering elements j and k; Overlap(...) is a function that calculates the overlap volume of two dynamic bounding boxes at time t.
[0086] b. Calculation of entropy increment:
[0087] b1: Get the current entropy of child node C_i: Entropy(C_i).
[0088] b2: Perform a temporary probabilistic aggregation operation: cluster and merge the PMBR of C_i with the PMBR of O_new to generate a temporary Temp_PMBR, as follows:
[0089] Clustering operation: All MUs from C_i and O_new are grouped together based on "motion pattern similarity" (e.g., based on trajectory function type, velocity vector difference, trajectory spatiotemporal overlap, etc.).
[0090] Merge operation: Create a new macro MU for each group. The probability of the new MU is the sum of the probabilities of all the original MUs in the group; the bounding box(t) of the new MU is the union of the bounding boxes(t) of all the original MUs in the group at time t.
[0091] b3: Calculate the new entropy Entropy(Temp_PMBR) based on Temp_PMBR.
[0092] b4. Calculate the entropy increment:
[0093] ΔEntropy_i=Entropy(Temp_PMBR)-Entropy(C_i)
[0094] Where ΔEntropy_i represents the entropy increment of the i-th child node, Entropy(Temp_PMBR) is the new entropy calculated after temporary aggregation of C_i and O_new; Entropy(C_i) is the original entropy of C_i.
[0095] c. Selection: Select the child node C_best that minimizes ΔEntropy_i as the current node N for the next step. This selection ensures that the new object is grouped into a group most similar to its future behavior, thus maintaining the overall predictive clarity of the tree.
[0096] S12.3: Recursively descend, repeating S12.1 and S12.2 until a leaf node L is reached.
[0097] S13. Insert an object at a leaf node;
[0098] Add the new object O_new (i.e. its complete PMBR) as an entry to the entry list of the target leaf node L determined in S12.
[0099] S14, Node splitting;
[0100] If step S13 causes the number of entries in leaf node L to exceed the preset maximum capacity M, then this splitting step is executed. The node splitting strategy of the present invention completely abandons the "short-sighted" approach of optimizing the current spatial overlap in traditional R-trees, and instead optimizes the "interaction possibility" of the two new nodes after splitting in the future.
[0101] S14.1: Generate candidate splitting schemes
[0102] Take the M+1 entries in the overflow node L and generate multiple candidate split pairs (Group_1, Group_2) using at least one preset partitioning strategy (such as K-means clustering based on spatial location or classification based on dominant maneuver direction).
[0103] S14.2: Evaluate and select the splitting scheme with the lowest future interaction score.
[0104] For each candidate split pair (Group_1, Group_2), perform the following evaluation:
[0105] a. Construct temporary nodes: Perform probabilistic aggregation operations on the entries in Group_1 and Group_2 respectively (as before) to generate two temporary new nodes N1 and N2 and their corresponding PMBRs.
[0106] b. Calculate the future interaction score: This score measures the expected degree of interaction (collision) between the two new sibling nodes if this splitting scheme is adopted. The score is quantified as the expected collision integral of the two temporary nodes N1 and N2 within the future time window [0, T], and its calculation formula is as follows:
[0107]
[0108] Where, ∑ a∈N1,b∈N2 ... represents a double summation, where a traverses all maneuvering units of node N1 and b traverses all maneuvering units of node N2.
[0109] c. Selection: The candidate split pair that minimizes the Score is selected as the final split result, resulting in two new nodes, N1_final and N2_final. This selection criterion is crucial for building a "future query-friendly" index. Structurally, it ensures that groups of objects with unrelated behaviors are assigned to different child nodes, laying the foundation for efficient pruning in subsequent queries.
[0110] S14.3: Update the parent node to reflect the split.
[0111] In the parent node P of L, delete the entry pointing to L and insert two new entries pointing to N1_final and N2_final respectively. If this operation causes the parent node P to overflow, then recursively execute this S4 step on P. If L is the root node, then create a new root node with child nodes N1_final and N2_final.
[0112] S15, Update the PMBR of the ancestor node upwards.
[0113] Starting from the modified node (L in S3 or P, the parent node of the split node in S4), backtrack along the parent node path to the root node. At each node on the path, the probabilistic aggregation operation is re-executed, taking the latest PMBR of all its child nodes as input to generate the updated PMBR for that node itself.
[0114] This step ensures that higher-level nodes in the tree accurately reflect changes at the lower levels.
[0115] At this point, a new object has been successfully inserted into the PMR-Tree, and the tree structure and the PMBR of all nodes have been updated to the latest state. Thanks to the aforementioned "future-oriented" construction strategy, the entire tree structure is now ready for efficient predictive queries.
[0116] S2. Receive the query request and return the query results.
[0117] As a preferred implementation, the core advantage of this query method lies in its ability to effectively utilize the "future behavior summary" information encoded during the construction of the PMR-Tree, enabling large-scale and rapid pruning, thereby minimizing the costly computation of precise probabilities. It can efficiently identify physical entities with potential future interaction risks with the query object, specifically through the following method:
[0118] S21: Receive a query request, including the PMBR, time window, and probability threshold of the query object. The specific steps include:
[0119] S21.1: Receive query parameters
[0120] Receive a query request containing the following attribute fields:
[0121] O_query (query object): A probabilistic Mobility Boundary Region (PMBR) representing the query subject (e.g., an ambulance requesting emergency passage). Its structure is completely consistent with the PMBR defined in construction method S1.3, ensuring the uniformity of the system's data format.
[0122] [T_start,T_end](Time Window): A future time interval that defines the validity of the query.
[0123] P_threshold (probability threshold): A floating-point number between 0 and 1, used as a filter to filter out results with too low an interaction probability. That is, only objects with a calculated collision probability greater than this threshold will be returned, so that users or the system can focus on high-risk targets.
[0124] S21.2: Initialize the result set
[0125] Create an empty result list R_set to store the query results that meet the conditions. Each result will contain the identified object entity and its collision probability calculated with O_query.
[0126] S22: Recursively search from the root node, using the node PMBR to calculate the maximum interaction score for pruning, specifically including:
[0127] Starting from the root node of the PMR-Tree, the tree is traversed through a recursive depth-first search process. Its core principle lies in utilizing the tree's hierarchical structure and aggregation information to prune subtrees that do not contain any possible results, thereby avoiding unnecessary computation.
[0128] S22.1: Start the search
[0129] Call the recursive search function Search(Root, O_query, [T_start, T_end], P_threshold).
[0130] S22.2: Recursive search function Search(N,...)
[0131] This function takes a node N as input, and its internal logic is divided into two stages based on the node type:
[0132] First stage: If N is an intermediate node:
[0133] For each entry E_i in N (E_i points to a child node C_i and contains the aggregate PMBR of C_i):
[0134] Perform pruning: Calculate the maximum possible interaction score between O_query and entry E_i. This score represents the theoretical upper limit of interaction between O_query and the entire object group governed by its child node C_i, i.e., the maximum interaction score. It is calculated as the expected collision integral within the time window [T_start, T_end], and its calculation formula is as follows:
[0135]
[0136] If Max_Score = 0, where a iterates through all MUs of the query object O_query, and b iterates through all MUs of the PMBR of node entry E_i. In this calculation, P_a is the true probability from the query object, but P_b is the expected number from the node PMBR. Therefore, the result of Max_Score is not a strict probability, but a unitless score used to assess the “intensity” of the interaction, which can be regarded as a pruning heuristic.
[0137] Make a decision:
[0138] If Max_Score > 0: This indicates that the future trajectory of O_query overlaps with the macroscopic motion trend represented by child node C_i in space and time, suggesting that the subtree is likely to contain a single object that meets the final threshold condition. Therefore, continue the search by recursively calling Search(C_i,...) on child node C_i.
[0139] If Max_Score = 0: This means that O_query has absolutely no intersection with the entire spatiotemporal region covered by C_i throughout the entire query time window. No object under this subtree can collide with O_query. Therefore, this branch is pruned, and C_i is not recursively accessed.
[0140] S23: Perform precise collision probability calculations on objects in unpruned leaf nodes;
[0141] Second stage: If N is a leaf node.
[0142] As the search delves deeper into the leaf nodes, a precise evaluation of specific candidate objects begins. For each entry O_j in N (O_j is a specific physical entity object and its PMBR):
[0143] S231: Perform precise probability calculation: Calculate the pairwise collision probability between the query object O_query and a single physical object O_j. The specific calculation formula is as follows:
[0144]
[0145] The formula has the same structure as Max_Score, but the semantics are different. Here, P_a and P_b are both strict probabilities (the sum of their respective PMBRs is 1). Therefore, the result of Collision_Prob is a true collision probability with a clear physical meaning, between 0 and 1.
[0146] S232: Comparison with threshold:
[0147] If Collision_Prob > P_threshold: Object O_j is identified as a high-risk target. Add it and the calculated Collision_Prob value as a result item to the result set R_set.
[0148] S24: Returns all objects whose collision probability exceeds the threshold and their probability values.
[0149] Once the recursive search process in S22 has completely returned from the root node, R_set contains all objects whose collision probability with O_query exceeds P_threshold within the specified time window. Finally, the results in R_set can be sorted in descending order according to the Collision_Prob value and returned to the user. This allows end users (such as decision-making systems for autonomous driving) to prioritize and respond to the highest-risk potential threats.
[0150] The following uses a specific application scenario to illustrate the technical solution of this application. Taking a typical four-way intersection in urban traffic as the application scenario, it demonstrates how to use the construction and query methods of the Probabilistic Motor R-Tree (PMR-Tree) described in this invention to index the future trajectories of multiple vehicles and efficiently query potential collision risks.
[0151] Please see Figure 1 , Figure 1 The diagram illustrates an intersection scenario and four objects O1 to O4 to be inserted. O1's PMBR includes three possible maneuvering units: straight, left turn, and right turn. O2 includes two maneuvering units: left turn and straight. O3 includes two maneuvering units: straight and right turn. O4 includes one straight maneuvering unit.
[0152] Figure 2 This diagram illustrates the new PMR-Tree hierarchical structure formed after the splitting strategy according to the present invention. The original leaf node splits into two new leaf nodes, and the original node is promoted to an intermediate node.
[0153] System preset parameters:
[0154] The maximum capacity of the PMR-Tree node is M = 3; the prediction time window is [0,T], where T = 5 seconds; the coordinate system is (0,0) with the center of the intersection as the origin.
[0155] I. Construction of Probabilistic Maneuver R-Tree
[0156] Initial State:
[0157] Before receiving any object, the PMR-Tree is initialized and contains only one node, Node_Root. This node has both root (ROOT) and leaf (LEAF) type attributes, and its internal state is as follows: the entry list is empty [], the number of entries is 0, and the aggregated PMBR is null.
[0158] 1. Insert objects O1, O2, O3 in sequence
[0159] Insert object O1: A car located at the south entrance and ready to enter the intersection.
[0160] Initialization and Data Unit Definition: Receive the new object O1 to be inserted, a car located at the south entrance and ready to enter the intersection. According to its navigation intention and historical behavior, construct a complete PMBR for it. As Figure 1 shown, this PMBR is defined as O1.PMBR = [MU_1_1, MU_1_2, MU_1_3], where:
[0161] MU_1_1: Go straight through the intersection, Probability = 0.8.
[0162] MU_1_2: Turn left, Probability = 0.1.
[0163] MU_1_3: Turn right, Probability = 0.1.
[0164] Each of the above MUs also contains its Maneuver_Function movement trajectory function and Bounding_Box(t) dynamic bounding box function attributes.
[0165] Selection and Insertion: Selection: Since Node_Root is the only current leaf node, it is selected as the target. Insertion: Check the capacity. The current number of entries 0 < M = 3, and the node is not full. Insert O1 directly as an entry into Node_Root.
[0166] Upward Update: Since Node_Root is modified, its aggregated PMBR needs to be updated. The status of the Node_Root node is updated to: node type [ROOT, LEAF], number of entries 1, entry list [O1], and the aggregated PMBR is updated to a copy of O1.PMBR. At this time, the Probability field in the PMBR is still semantically a probability, and the sum is 1.
[0167] Insert object O2: A car located at the west entrance, preparing to turn left. Its PMBR is defined as O2.PMBR = [MU_2_1, MU_2_2], where the left-turn probability is the highest:
[0168] MU_2_1: Turn left (north), Probability = 0.7.
[0169] MU_2_2: Go straight (east), Probability = 0.3.
[0170] Selection and insertion: Node_Root is still the only leaf node and is not full (1 < M = 3). O2 is directly inserted into Node_Root.
[0171] Upward update: Perform a probabilistic aggregation operation on the PMBRs of all entries [O1, O2] in Node_Root to update the aggregated PMBR of Node_Root.
[0172] Clustering: Put all MUs from O1 and O2 together. Group them according to motion pattern similarity (such as the trajectory end region, main direction). Include:
[0173] Northward group: O1.MU_1_1 (go straight north, P = 0.8) and O2.MU_2_1 (turn left north, P = 0.7).
[0174] Eastward group: O1.MU_1_3 (turn right east, P = 0.1) and O2.MU_2_2 (go straight east, P = 0.3).
[0175] Westward group: O1.MU_1_2 (turn left west, P = 0.1).
[0176] Merge: Create new macro MUs for each group.
[0177] [[ID=3ONew MU_North: Expected_Value = 0.8 + 0.7 = 1.5. Bounding_Box(t) is the union of the bounding boxes of O1.MU_1_1 and O2.MU_2_1 at time t.
[0178] New MU_East: Expected_Value = 0.1 + 0.3 = 0.4.
[0179] New MU_West: Expected_Value = 0.1.
[0180] Update the aggregated PMBR of Node_Root to [New MU_North, New MU_East, New MU_West]. Note that the sum of the expected values 1.5 + 0.4 + 0.1 = 2.0, which is equal to the total number of objects under the node. The status of Node_Root node changes to: type [ROOT, LEAF], number of entries 2, entry list [O1, O2], and the aggregated PMBR is updated to the new aggregated PMBR as above.
[0181] Insert object O3: Another car located at the south entrance and also preparing to go straight. O3.PMBR =
[0182] [MU_3_1 (going straight, P = 0.9), MU_3_2 (turning right, P = 0.1)].
[0183] Insertion and selection: Node_Root is not full (2 < M = 3), and O3 is inserted into Node_Root. The number of node entries reaches 3, and the capacity is full.
[0184] Update upwards: Perform probabilistic aggregation again, and merge the PMBR of O3 into the aggregated PMBR of Node_Root. For example, the expected value of New MU_North will increase by 0.9 and become 2.4. The status of Node_Root node changes: type [ROOT, LEAF], number of entries 3, entry list [O1, O2, O3], and the aggregated PMBR is updated again. At this time, the sum of the expected values is 3.0.
[0185] 2. Insert object O4 and trigger node splitting
[0186] Insert object O4: A car located at the east entrance and preparing to go straight, such as Figure 1 . O4.PMBR =
[0187] [MU_4_1 (going straight west, P = 1.0)].
[0188] Insertion and selection: Node_Root is selected as the target leaf node, and an attempt is made to insert O4. After insertion, the number of entries in Node_Root becomes 4, exceeding the maximum capacity M = 3, triggering the S4 splitting step.
[0189] Execute splitting:
[0190] Generate candidate splitting schemes: Divide the four objects {O1, O2, O3, O4} in Node_Root. The system generates the following three schemes:
[0191] Scheme A (divide by "direction of arrival"): Group_1 = {O1, O3} (both cars come from the south, and the dominant maneuver is north), Group_2 = {O2, O4} (O2 comes from the west and O4 comes from the east).
[0192] Option B (divided according to a simple entry index order, without considering any spatiotemporal attributes): Group_1 = {O1, O2}, Group_2 = {O3, O4}.
[0193] Scheme C (divided according to the "future dominant trajectory"): Group_1 = {O1, O2, O3} (O1 and O3 go straight north, O2 turns left and also goes north, and the dominant motion vectors all point north), Group_2 = {O4} (the only object whose dominant motion vector points west).
[0194] Evaluation and Selection: Based on the evaluation criteria (future interaction score calculation) of the present invention, these three schemes are subjected to a detailed quantitative evaluation. The essence of this score is to measure the expected collision integral between the two new nodes after the split.
[0195] Evaluation Plan A:
[0196] Aggregation: Aggregate Group_1 = {O1, O3} to generate the PMBR of the temporary node N1_A. This PMBR will have a very strong "northward" macro MU (expected value close to 1.7), and the movement pattern is very simple. Aggregate Group_2 = {O2, O4} to generate the PMBR of N2_A, which mainly includes macro MUs of "turning left to the north", "going straight to the east", and "going straight to the west".
[0197] Calculate the future interaction score Score_A: Calculate the expected collision integral between N1_A and N2_A according to the formula. The trajectory of N1_A is mainly north-south. The trajectory of N2_A is mainly east-west (O4) with some turning (O2). The main interaction (spatiotemporal overlap) between the north-south and east-west traffic flows is limited to a small area in the center of the intersection and for a short period of time. Therefore, the integral interval where the Overlap function value is not zero is very short, and the calculated Score_A value will be relatively low.
[0198] Evaluation Option B:
[0199] Aggregation: Aggregate Group_1 = {O1, O2} to generate PMBR N1_B. This PMBR contains conflicting motion patterns (O1 to the north, O2 to the east). Aggregate Group_2 = {O3, O4} to generate PMBR N2_B, which also contains conflicting patterns (O3 to the north, O4 to the west).
[0200] The future interaction score, Score_B, is calculated by interacting the PMBR (including northward and eastward trends) of N1_B with the PMBR (including northward and westward trends) of N2_B. The northward components of N1_B and N2_B exhibit significant spatiotemporal overlap because they both follow the same path. This results in a very large overlap integral value. Therefore, the calculated Score_B will be significantly higher than Score_A.
[0201] Assessment Option C (based on "future dominant trajectory"):
[0202] Aggregation: Aggregate Group_1 = {O1, O2, O3} to generate an aggregated PMBR for the temporary node N1_C. This PMBR will represent a highly concentrated "northbound" traffic flow. Specifically:
[0203] The straight-ahead MU (P=0.8) from O1, the left-turn MU (P=0.7) from O2, and the straight-ahead MU (P=0.9) from O3 are clustered into a dominant, macroscopic "northbound" maneuvering unit (new MU_North), with an expected value as high as 0.8+0.7+0.9=2.4. The remaining low-probability maneuvers from O1, O2, and O3 (such as right turns and straight-ahead) form other macroscopic MUs with lower expected values. Ultimately, the PMBR of N1_C represents a converging northbound traffic flow. Aggregation of Group_2={O4} generates the aggregated PMBR of the temporary node N2_C. Since it has only one object, its PMBR is the PMBR of O4 itself, containing only one "westbound straight-ahead" maneuvering unit with an expected value of 1.0, exhibiting an extremely simple movement pattern.
[0204] Calculate the future interaction score Score_C: Calculate the expected collision integral between N1_C and N2_C according to the formula. This calculation is the interaction between the PMBR of N1_C (a strong northerly flow) and the PMBR of N2_C (a purely westerly flow).
[0205] Analysis of their spatiotemporal overlap: The spatiotemporal overlap area between all the dominant "northward" trajectories in N1_C and the "westward" trajectories in N2_C is limited to a rectangular area at the center of the intersection, and the duration of the overlap is very short.
[0206] Therefore, the integral interval where the Overlap function value is not zero is very limited, resulting in a very low Score_C value. It should be noted that the interaction integral contributed by the "merging" process between {O1,O3} and O2, which existed in scheme A, is considered an internal node interaction in scheme C because these three objects belong to the same group and is not included in Score_C. This makes Score_C fundamentally smaller than Score_A.
[0207] Selection: Through the quantitative evaluation of the three scenarios, it can be clearly obtained that Score_C < Score_A < Score_B. The splitting evaluation mechanism of the present invention does not rely on any heuristic rules, but automatically identifies Scenario C as the optimal solution through strict integral calculation of future spatio-temporal interactions. Therefore, the system selects Scenario C as the final splitting result, obtaining new nodes N1_final (including O1, O2, O3) and N2_final (including O4). This selection aggregates all objects with the same future main movement direction together, achieving the most thorough separation of "future behaviors" and creating the most favorable conditions for subsequent query pruning.
[0208] Updating the parent node: Since the root node is split, a new root node New_Root needs to be created. The identity of Node_Root disappears and is replaced by N1_final and N2_final. New_Root becomes an intermediate node, and its child nodes are N1_final and N2_final. Two entries are created in New_Root, respectively pointing to these two new leaf nodes, and their aggregated PMBR (i.e., the PMBR of N1_C and N2_C calculated for Scenario C before) is stored.
[0209] Update and completion: Update the path upward (here only the aggregated PMBR of New_Root needs to be updated by aggregating the PMBR of its two child nodes).至此,O4插入完毕,PMR-Tree构建完成了一个分裂周期。最终树结构如 Figure 2 所示。
[0210] II. Query method
[0211] Based on the final structure as Figure 2 所示, efficiently process a collision query request for an emergency vehicle.
[0212] Step1: Query initialization
[0213] Step1.1: Receive query parameters. The system receives an emergency query request, and its parameters are defined as follows:
[0214] 需要说明的是,原文中“至此,O4插入完毕,PMR-Tree构建完成了一个分裂周期。最终树结构如”这部分表述不太完整和准确,翻译时尽量忠实原文进行了翻译。The query object O_query is an ambulance O_ambulance entering the intersection from the east entrance. For simplicity, it is assumed that its intention is very clear: to travel west through the intersection at high speed in a straight line. Its PMBR is defined as: O_ambulance.PMBR = [MU_amb_1], where MU_amb_1 is traveling west in a straight line, and Probability = 1.0. The time window [T_start, T_end] = [0, 5] seconds. The probability threshold P_threshold = 0.1 (i.e., 10%), and only objects with a calculated collision probability exceeding 10% are considered high-risk targets.
[0215] Step 1.2: Initialize the result set by creating an empty result list R_set = [].
[0216] Step 2: Top-down recursive search and pruning
[0217] Step 2.1: Start the search. The system calls the recursive search function Search(New_Root, O_ambulance, [0, 5], 0.1), starting from the root node New_Root of the tree.
[0218] Step 2.2: Processing is performed at the intermediate node New_Root, which contains two entries pointing to leaf nodes N1_final and N2_final respectively. The algorithm will perform pruning judgment on each entry in turn.
[0219] First case: Process the entry pointing to N1_final (Entry_to_N1)
[0220] Perform pruning judgment: Calculate the maximum possible interaction score Max_Score between the query object O_ambulance and the entry Entry_to_N1 (i.e., the aggregate PMBR of N1_final).
[0221] Since the PMBR of O_ambulance has only one MU (MU_amb_1, westward, P=1.0), the aggregated PMBR of Entry_to_N1 represents the overall trend of {O1,O2,O3}, and its dominant macro MU is a "northbound" traffic flow with an expectation of up to 2.4.
[0222] Calculate the Overlap function: The ambulance's "westward" trajectory and N1_final's "northward" trajectory are spatially orthogonal. Their spatiotemporal overlap (Overlap function value greater than 0) can only occur in a very small area at the center of the intersection, and lasts for a very short time. Therefore, the integral result Max_Score is 0.
[0223] Decision made: Since Max_Score = 0, this clearly indicates that the future trajectory of the queried object O_ambulance has no intersection with the entire spatiotemporal region covered by the N1_final node. Therefore, the system will prune the N1_final subtree branch and no longer recursively access it. This means that precise calculations for the three objects O1, O2, and O3 are completely avoided.
[0224] The second scenario: Process the entry pointing to N2_final (Entry_to_N2).
[0225] a. Perform pruning judgment: Calculate the Max_Score between O_ambulance and entry Entry_to_N2 (i.e., the aggregate PMBR of N2_final).
[0226] Since the PMBR of O_ambulance is moving straight "west", the aggregated PMBR of Entry_to_N2 represents the movement of {O4}, which is also moving straight "west".
[0227] Calculate the Overlap function: Two vehicles start from the same entrance and travel westward along the same path, forming a typical overtaking scenario. If the speed of the ambulance (the following vehicle) is greater than O4 (the preceding vehicle), their dynamic bounding boxes (BBox(t)) will overlap within the time window until a rear-end collision is possible. Therefore, their trajectories have significant and continuous overlap in space and time. The Overlap function has a significant positive value in the integration interval, so Max_Score must be greater than 0.
[0228] b. Make a decision: Since Max_Score > 0, it indicates a potential interaction risk between O_ambulance and objects under the N2_final subtree. The system recursively calls Search(N2_final,...) on the child node N2_final.
[0229] Step 2.3: Process at leaf node N2_final
[0230] The search leads to the leaf node N2_final, which contains an entry: physical object O4.
[0231] Perform precise probability calculation: At this point, the algorithm switches from pruning judgment to precise calculation. The pairwise collision probability Collision_Prob between O_ambulance and O4 is calculated according to the formula. O_ambulance has only one MU, with a probability P_a = 1.0, and O4 also has only one MU, with a probability P_b = 1.0. Since this is a high-speed overtaking low-speed scenario, the overlap integral will precisely calculate the "volume" of the overlapping spatiotemporal bounding boxes of the two vehicles. This integral result is directly equal to the probability of a rear-end collision between the two vehicles. Assuming that based on their trajectory functions (the ambulance's speed is much greater than O4's), the calculated integral value is Collision_Prob = 0.95.
[0232] Comparison with threshold: The calculated result is compared with the preset threshold: 0.95 > P_threshold (0.1), so object O4 is identified as a high-risk target. The system adds the result {Object:O4,Collision_Prob:0.95} to the result set R_set.
[0233] Step 3: Return to the final result
[0234] The recursive search is complete. R_set = [{Object:O4,Collision_Prob:0.95}] contains all results that meet the conditions. The system returns this result to the requester. Based on this, the autonomous driving system or traffic management center can immediately identify that the ambulance O_ambulance has a 95% probability of rear-ending the vehicle O4 traveling normally ahead within the next 5 seconds, and can therefore take priority measures such as evasive action (e.g., O4 changing lanes in advance to yield) or warnings (e.g., issuing a slowdown warning to the ambulance).
[0235] This query process efficiently utilizes the PMR-Tree structure. By performing a single pruning check at the root node New_Root, the entire N1_final subtree (containing 3 objects) irrelevant to the query is successfully excluded, avoiding three costly and precise probability calculations. Computational resources are precisely directed to the N2_final subtree where the actual risk exists, ultimately accurately identifying the high-risk object O4 with a tail-collision risk. This fully demonstrates the significant efficiency advantage of this invention in handling predictive queries and its universality across various collision scenarios.
[0236] Based on the above embodiments, this application also provides a query system based on a trajectory index structure, applied to the query method, including a probabilistic maneuvering R-tree construction unit and a query unit, wherein:
[0237] Probabilistic maneuvering R-tree building blocks, used to implement:
[0238] S11. Initialize and define data unit: Receive the dynamic object to be inserted and model its motion uncertainty as PMBR. The PMBR consists of multiple motion units, each of which includes a motion trajectory function, a dynamic bounding box function, and a probability / expectation value.
[0239] S12. Select the insertion path: Insert the object into the leaf node that minimizes the increase in internal movement disorder. If the node overflows after insertion, execute the node splitting method based on future interaction scores and select the partitioning scheme that minimizes the probability of interaction between the two split nodes in the future time window.
[0240] S13. Insert an object at a leaf node;
[0241] S14, Node splitting;
[0242] S15, Update the PMBR of the ancestor node upwards.
[0243] The query unit is used to receive query requests and return query results.
[0244] This application embodiment also provides a storage medium storing a computer program, which is executed by a processor using the query method described above.
[0245] This application also provides an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the query method as described above.
[0246] It should be noted that those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, which may include, but is not limited to, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0247] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A query method based on a trajectory index structure, characterized in that, Including the following steps: S1. Construct a probabilistic maneuver R-tree, including: S11. Initialize and define data unit: Receive the dynamic object to be inserted and model its motion uncertainty as PMBR. The PMBR consists of multiple motion units, each of which includes a motion trajectory function, a dynamic bounding box function, and a probability / expectation value. S12. Select the insertion path: Insert the object into the leaf node that minimizes the increase in internal movement disorder. If the node overflows after insertion, execute the node splitting method based on future interaction scores and select the partitioning scheme that minimizes the probability of interaction between the two nodes in the future time window. S13. Insert an object at a leaf node; S14, Node splitting; S15, Update the PMBR of the ancestor node upwards. S2. Receive the query request and return the query results.
2. The query method as described in claim 1, characterized in that, The specific steps in S2 are as follows: S21: Receive a query request, including the PMBR of the query object, the time window, and the probability threshold; S22: Recursively search from the root node, using the node PMBR to calculate the maximum interaction score for pruning; S23: Perform precise collision probability calculations on objects in unpruned leaf nodes; S24: Returns all objects whose collision probability exceeds the threshold and their probability values.
3. The query method as described in claim 1, characterized in that, The data structure of the PMBR is as follows: PMBR = [MU1, MU2, ..., MU n ] Each of the mobile units includes: Maneuver_Function: Input time t, output object position; Bounding_Box(t): Input time t, output the smallest bounding box that encloses the object; Probability: Indicates the probability or expected number of times the trajectory will be executed.
4. The query method as described in claim 1, characterized in that, In the path selection strategy based on future entropy increments, the formula for calculating the internal maneuver entropy of node C is: Where, ∑ j<k ... represents the summation of all non-repeating maneuvering element pairs (j,k) in the PMBR of node C; P_j and P_k are the probabilities or expected values of maneuvering elements j and k; Overlap(...) is a function that calculates the overlap volume of two dynamic bounding boxes at time t.
5. The query method as described in claim 1, characterized in that: In the node splitting strategy, the splitting scheme that minimizes the score is selected, and the future interaction score is defined as:
6. The query method as described in claim 2, characterized in that, In step S22, the formula for calculating the maximum interaction score is: If Max_Score = 0, then prune the subtree.
7. The query method as described in claim 1, characterized in that, The formula for calculating the precise collision probability is: Where Pa,Pb are strict probability values, and the results are between 0 and 1.
8. The query method as described in claim 1, characterized in that, When the motion state of an object changes, if the change belongs to a motor unit that has been set in its PMBR, only its probability distribution is updated, and the index structure reorganization is not triggered.
9. A query system based on a trajectory index structure, applied to the query method described in claims 1-8, characterized in that, It includes probabilistic maneuvering R-tree construction units and query units, wherein: Probabilistic maneuvering R-tree building blocks, used to implement: S11. Initialize and define data unit: Receive the dynamic object to be inserted and model its motion uncertainty as PMBR. The PMBR consists of multiple motion units, each of which includes a motion trajectory function, a dynamic bounding box function, and a probability / expectation value. S12. Select the insertion path: Insert the object into the leaf node that minimizes the increase in internal movement disorder. If the node overflows after insertion, execute the node splitting method based on future interaction scores and select the partitioning scheme that minimizes the probability of interaction between the two nodes in the future time window. S13. Insert an object at a leaf node; S14, Node splitting; S15, Update the PMBR of the ancestor node upwards. The query unit is used to receive query requests and return query results.
10. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is in operation, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform a query method as described in any of claims 1-8.