Rapid association method and device for track data and map data, equipment and medium

By constructing RTree index and grid structure, the labor cost and data fragmentation problems in the association of trajectory data and map data are solved, efficient matching and cost saving are achieved, and it is suitable for automatic assisted navigation and automatic driving scene simulation.

CN118535663AActive Publication Date: 2024-08-23SHANGHAI ZIRCON TECH CO LTD

Patent Information

Application Number
CN202410550156.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-06
Publication Date
2024-08-23
Estimated Expiration
2044-05-06

AI Technical Summary

Technical Problem

In the existing technology, the correlation method between trajectory data and map data requires manual division of urban road element packages, resulting in increased manpower and maintenance costs. Moreover, dividing map data by city as a unit will cause data fragmentation when matched with trajectory data, affecting the matching effect. .

Method used

By constructing an RTree index for map data and a grid structure for trajectory data, the grid structure and index tree are traversed to establish the association between trajectory points and road elements, improving matching efficiency and avoiding data fragmentation.

Benefits of technology

It achieves rapid matching of trajectory data and map data, saves computing resources and costs, and improves the preparation efficiency for automatic assisted navigation and automatic driving scene simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535663A
    Figure CN118535663A
Patent Text Reader

Abstract

The invention provides a rapid association method, device and equipment for track data and map data and a storage medium, the rapid association method for the track data and the map data comprises the steps of preprocessing the track data and the map data, and the preprocessing of the map data comprises the step of constructing an RTree index based on road elements in the map data; the step of preprocessing the trajectory data comprises the substeps of constructing a grid structure based on the trajectory data; traversing each to-be-queried track point in the same grid structure, and querying whether a road element object matched with the to-be-queried track point exists in road element objects matched with other track points in the same grid structure; if not, traversing child nodes of the RTree index from a root node of the RTree index, and taking the road element object recorded by the leaf node as a road element object associated with the track point to be queried; according to the invention, the matching efficiency of the trajectory data and the map data can be improved, and the trajectory can be quickly associated to the map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of autonomous driving technology, and in particular to a method, device, electronic device and storage medium for quickly associating trajectory data with map data. Background Art

[0002] As the development of autonomous driving technology is getting faster and faster, map data is becoming more and more important to vehicles. At the same time, there are more and more vehicles with autonomous driving capabilities, and the amount of vehicle action trajectory data generated is also tens of thousands. If the trajectory can be quickly associated with the map, it is possible to use the route recording function in the automatic assisted navigation system to extract map data for navigation preparation based on the path taken in the past. In addition, when analyzing problems in autonomous driving, map data can be quickly extracted to prepare for simulation of specific scenarios. Commercial data analysis can also be performed to extract map data to analyze the correlation between energy consumption and actual scenarios. However, due to the large amount of data in high-precision maps themselves, its volume has reached tens of millions. And the trajectory data in the field of autonomous driving can also reach tens of millions. Therefore, matching two data sources of tens of millions is also a great challenge for data query. If computing resources are increased and computers are added to complete matching queries, the cost will increase significantly. In related technologies, in order to achieve matching between trajectory data and map data, the map data is first divided into cities, and the trajectory data belonging to this city is matched. However, this method requires manual division of urban road element packages in advance and maintenance of each urban road element package, which increases manpower and maintenance costs. Furthermore, dividing the map data into cities and then matching it with the trajectory data will cause the trajectory data to be split, affecting the matching effect between the trajectory data and the map data. Summary of the invention

[0003] The present invention provides a method, device, electronic device and storage medium for quickly associating trajectory data with map data, so as to solve the defects of the traditional method for associating trajectory data with map data, namely, increasing manpower and maintenance costs, and dividing map data into cities and then matching with trajectory data will cause the trajectory data to be split, thus affecting the matching effect of trajectory data and map data.

[0004] The present invention provides a method for quickly associating trajectory data with map data, comprising:

[0005] Preprocessing the trajectory data and the map data, wherein the preprocessing of the map data includes constructing an RTree index based on the road elements in the map data, the RTree index includes a root node, a child node, and a leaf node, there is a geometric covering relationship between the root node, the child node, and the leaf node, and each leaf node is used to record a road element object; preprocessing the trajectory data includes constructing a grid structure based on the trajectory data;

[0006] Traversing each to-be-queried track point in the same grid structure, querying whether there is a road element object matching the to-be-queried track point from the road element objects matched by other track points in the same grid structure;

[0007] If it does not exist, traverse its child nodes starting from the root node of the RTree index until a leaf node that can geometrically cover the trajectory point to be queried is reached, and the road element object recorded in the leaf node is used as the road element object associated with the trajectory point to be queried;

[0008] Traverse different grid structures until the trajectory points in all grid structures are associated with the road element objects.

[0009] According to a method for quickly associating trajectory data with map data provided by the present invention, the RTree index is constructed based on the road elements in the map data, comprising:

[0010] Construct the bounding box corresponding to each road element;

[0011] The bounding box corresponding to each road element is inserted into the RTree index space until all road elements are inserted, thereby obtaining an Rtree index.

[0012] According to a method for quickly associating trajectory data with map data provided by the present invention, inserting the bounding box corresponding to each road element into the RTree index space comprises:

[0013] If there is a leaf node in the RTree index space that can geometrically cover the bounding box corresponding to the inserted road element, and the number of bounding boxes corresponding to the road elements covered by the leaf node is less than the preset leaf node capacity, the bounding box corresponding to the road element is directly inserted into the leaf node.

[0014] According to a method for quickly associating trajectory data with map data provided by the present invention, the step of inserting the bounding box corresponding to each road element into the RTree index space further includes:

[0015] If all existing leaf nodes in the RTree index space cannot geometrically cover the bounding box corresponding to the inserted road element, and the number of bounding boxes covered by the leaf node with the largest intersection area with the bounding box corresponding to the road element is less than the preset leaf node capacity; then the bounding box parameters of the leaf node with the largest intersection area with the bounding box corresponding to the road element are expanded, and the bounding box parameters of the parent node corresponding to the leaf node are synchronously updated until the root node is updated;

[0016] The bounding box corresponding to the road element is inserted into the leaf node of the expanded bounding box parameter.

[0017] According to a method for quickly associating trajectory data with map data provided by the present invention, the step of inserting the bounding box corresponding to each road element into the RTree index space further includes:

[0018] If the existing leaf nodes in the RTree index space can geometrically cover the bounding boxes corresponding to the inserted road elements, and the number of road element bounding boxes covered by the leaf nodes that can geometrically cover the bounding boxes corresponding to the inserted road elements is not less than the preset leaf node capacity; then split the leaf nodes, retain the bounding boxes corresponding to the road elements in the original leaf nodes whose sum of bounding box areas is greater than half of the bounding box area of ​​the leaf nodes themselves in the original leaf nodes, and update the bounding box parameters of the original leaf nodes; regenerate new leaf nodes with the bounding boxes corresponding to the remaining road elements, and update the bounding box parameters of the parent nodes of the original leaf nodes in sequence until the root node is updated.

[0019] A method for quickly associating trajectory data with map data provided by the present invention also includes:

[0020] If there is no intersection between the existing leaf node in the RTree index space and the bounding box corresponding to the inserted road element, a new leaf node is constructed and the bounding box corresponding to the road element is used as the bounding box of the leaf node.

[0021] According to a method for quickly associating trajectory data with map data provided by the present invention, constructing a grid structure based on the trajectory data includes:

[0022] Convert the geographic coordinates of each track point in the track data into geodetic coordinates;

[0023] The coordinate points in the geodetic coordinate system of the trajectory points are divided by preset values ​​respectively to obtain a grid structure of the trajectory points. The preset values ​​are determined according to a preset grid structure size, and the trajectory points falling in the same grid structure are regarded as a group of trajectory points.

[0024] The present invention also provides a device for quickly associating trajectory data with map data, comprising:

[0025] A preprocessing module, used for preprocessing the trajectory data and the map data, wherein the preprocessing of the map data includes constructing an RTree index based on the road elements in the map data, the RTree index includes a root node, a child node and a leaf node, there is a geometric covering relationship between the root node, the child node and the leaf node, and each leaf node is used to record a road element object; the preprocessing of the trajectory data includes constructing a grid structure based on the trajectory data;

[0026] The first query module is used to traverse each to-be-queried track point in the same grid structure, and query whether there is a road element object matching the to-be-queried track point from the road element objects matched by other track points in the same grid structure;

[0027] A second query module is used for, if it does not exist, traversing its child nodes from the root node of the RTree index until a leaf node that can geometrically cover the trajectory point to be queried is reached, and taking the road element object recorded in the leaf node as the road element object associated with the trajectory point to be queried;

[0028] A module is established to traverse different grid structures until the trajectory points in all grid structures are associated with the road element objects.

[0029] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for quickly associating trajectory data with map data described in any one of the above items is implemented.

[0030] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for quickly associating trajectory data with map data as described in any one of the above items is implemented.

[0031] The present invention provides a method, device, electronic device and storage medium for quickly associating trajectory data with map data. The method preprocesses the trajectory data and the map data, wherein the preprocessing of the map data includes constructing an RTree index based on the road elements in the map data, the RTree index includes a root node, a child node and a leaf node, and there is a geometric covering relationship between the root node, the child node and the leaf node, and each leaf node is used to record a road element object; the preprocessing of the trajectory data includes constructing a grid structure based on the trajectory data; traversing each trajectory point to be queried in the same grid structure, querying whether there is a road element object matched to other trajectory points in the same grid structure. Find the road element object that matches the trajectory point to be queried; if it does not exist, traverse its child nodes starting from the root node of the RTree index until traversing to a leaf node that can geometrically cover the trajectory point to be queried, and use the road element object recorded in the leaf node as the road element object associated with the trajectory point to be queried; traverse different grid structures until the trajectory points in all grid structures establish an association relationship with the road element object, which can improve the matching efficiency of trajectory data and map data, can quickly associate the trajectory with the map, save computing resources and costs, and will not cause fragmentation of the trajectory data, which is beneficial for the automatic assisted navigation system to extract map data to prepare for navigation and autonomous driving scene simulation. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 It is a schematic diagram of the flow of the method for quickly associating trajectory data with map data provided by the present invention;

[0034] Figure 2 This is one of the schematic diagrams of constructing an RTree index scenario provided by the present invention;

[0035] Figure 3 This is the second schematic diagram of the RTree index construction scenario provided by the present invention;

[0036] Figure 4 This is the third schematic diagram of the RTree index construction scenario provided by the present invention;

[0037] Figure 5 This is the fourth schematic diagram of the RTree index construction scenario provided by the present invention;

[0038] Figure 6 It is a schematic diagram of a grid structure provided by the present invention;

[0039] Figure 7 It is a query schematic diagram of a single coordinate point provided by the present invention;

[0040] Figure 8 It is a structural schematic diagram of a device for quickly associating trajectory data with map data provided by the present invention;

[0041] Fig. 9 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] Figure 1 A flowchart of a method for quickly associating trajectory data with map data provided by an embodiment of the present invention, such as Figure 1As shown, the method for quickly associating trajectory data with map data provided by an embodiment of the present invention includes:

[0044] Step 101, preprocessing the trajectory data and the map data, wherein the preprocessing of the map data includes constructing an RTree index based on the road elements in the map data, the RTree index includes a root node, a child node and a leaf node, there is a geometric covering relationship between the root node, the child node and the leaf node, and each leaf node is used to record a road element object; the preprocessing of the trajectory data includes constructing a grid structure based on the trajectory data;

[0045] In the embodiment of the present invention, the RTree index is a spatial index, which is often used to store and query spatial objects. The characteristic of the RTree index is that it can efficiently query the location of objects in a multi-dimensional space.

[0046] Step 102, traversing each to-be-queried trajectory point in the same grid structure, and querying whether there is a road element object matching the to-be-queried trajectory point from the road element objects matched to other trajectory points in the same grid structure;

[0047] In the embodiment of the present invention, the to-be-queried trajectory points in the same grid structure are matched with the matched road element objects first, and the adjacent trajectory points are matched with the road element areas, so as to improve the matching efficiency.

[0048] Step 103: If it does not exist, traverse its child nodes starting from the root node of the RTree index until a leaf node that can geometrically cover the trajectory point to be queried is reached, and the road element object recorded in the leaf node is used as the road element object associated with the trajectory point to be queried;

[0049] Step 104: traverse different grid structures until the trajectory points in all grid structures are associated with the road element objects.

[0050] The traditional method of matching trajectory data with map data is to first divide the map data into cities, and then match the trajectory data belonging to the city. However, this method requires manual division of urban road element packages in advance and maintenance of each urban road element package, which increases manpower and maintenance costs. In addition, dividing the map data into cities and then matching it with the trajectory data will cause the trajectory data to be split, affecting the matching effect of trajectory data and map data.

[0051] The present invention provides a method for quickly associating trajectory data with map data, wherein the trajectory data and the map data are preprocessed, wherein the preprocessing of the map data includes constructing an RTree index based on road elements in the map data, wherein the RTree index includes a root node, a child node, and a leaf node, wherein there is a geometric covering relationship between the root node, the child node, and the leaf node, and each leaf node is used to record a road element object; the preprocessing of the trajectory data includes constructing a grid structure based on the trajectory data; traversing each trajectory point to be queried in the same grid structure, querying whether there is a road element object that matches the trajectory point to be queried from the road element objects that have been matched to other trajectory points in the same grid structure The road element object matching the query trajectory point is found; if it does not exist, traverse its child nodes starting from the root node of the RTree index until a leaf node that can geometrically cover the trajectory point to be queried is traversed, and the road element object recorded in the leaf node is used as the road element object associated with the trajectory point to be queried; traverse different grid structures until the trajectory points in all grid structures are associated with the road element objects, which can improve the matching efficiency of trajectory data and map data, can quickly associate the trajectory with the map, save computing resources and costs, and will not cause fragmentation of the trajectory data, which is beneficial for the automatic assisted navigation system to extract map data to prepare for navigation and autonomous driving scene simulation.

[0052] Based on any of the above embodiments, constructing an RTree index based on the road elements in the map data includes:

[0053] Step 201: construct a bounding box corresponding to each road element;

[0054] Step 202: insert the bounding box corresponding to each road element into the RTree index space until all road elements are inserted, thereby obtaining an Rtree index.

[0055] In the embodiment of the present invention, inserting the bounding box corresponding to each road element into the RTree index space includes:

[0056] If there is a leaf node in the RTree index space that can geometrically cover the bounding box corresponding to the inserted road element, and the number of bounding boxes corresponding to the road elements covered by the leaf node is less than the preset leaf node capacity, the bounding box corresponding to the road element is directly inserted into the leaf node.

[0057] like Figure 2 As shown, for each road element in the high-precision map, a bounding box (bbox) is constructed to determine the maximum x, maximum y, minimum x, and minimum y of the bounding box coordinates;

[0058] Insert the bbox of each road element in the RTree index space in turn. The insertion of any road element meets the following four scenarios, and the capacity of each leaf node in the RTree index space is 4.

[0059] The inserted object satisfies two conditions in the existing leaf node at the same time. The first condition is that the bbox of the leaf node can cover x and the leaf node capacity is less than 4. The insertion operation is directly executed to record the road element object under the corresponding leaf node.

[0060] In the embodiment of the present invention, inserting the bounding box corresponding to each road element into the RTree index space further includes:

[0061] If all existing leaf nodes in the RTree index space cannot geometrically cover the bounding box corresponding to the inserted road element, and the number of bounding boxes covered by the leaf node with the largest intersection area with the bounding box corresponding to the road element is less than the preset leaf node capacity; then the bounding box parameters of the leaf node with the largest intersection area with the bounding box corresponding to the road element are expanded, and the bounding box parameters of the parent node corresponding to the leaf node are synchronously updated until the root node is updated;

[0062] The bounding box corresponding to the road element is inserted into the leaf node of the expanded bounding box parameter.

[0063] like Figure 3 As shown, the inserted object satisfies a condition in the existing leaf node, that is, the capacity of the leaf node is less than 4, and the bbox of the leaf node is expanded and the bbox of the leaf node is updated. Figure 3 P2 of P2, and if P2 has a parent node, the bbox of the parent node of P2 is updated in sequence until the root node is updated to complete the object insertion.

[0064] In the embodiment of the present invention, inserting the bounding box corresponding to each road element into the RTree index space further includes:

[0065] If the existing leaf nodes in the RTree index space can geometrically cover the bounding boxes corresponding to the inserted road elements, and the number of road element bounding boxes covered by the leaf nodes that can geometrically cover the bounding boxes corresponding to the inserted road elements is not less than the preset leaf node capacity; then split the leaf nodes, retain the bounding boxes corresponding to the road elements in the original leaf nodes whose sum of bounding box areas is greater than half of the bounding box area of ​​the leaf nodes themselves in the original leaf nodes, and update the bounding box parameters of the original leaf nodes; regenerate new leaf nodes with the bounding boxes corresponding to the remaining road elements, and update the bounding box parameters of the parent nodes of the original leaf nodes in sequence until the root node is updated.

[0066] like Figure 4 , Figure 5 As shown in the figure, the inserted object meets one condition in the existing leaf node, that is, the bbox of the leaf node can cover w, and the leaf node capacity is insufficient. The leaf node is split, that is, the sum of the bbox areas of the objects in the existing leaf nodes is greater than 50% of the area of ​​the leaf node's own bbox, that is, P1. The split is completed to form a new leaf, and the bbox value of P1 is updated. The remaining objects construct a new leaf node P5, and the parent nodes are updated in turn to create new nodes Q1 and Q2 as shown in the figure below, completing the insertion of w.

[0067] In the embodiment of the present invention, inserting the bounding box corresponding to each road element into the RTree index space further includes:

[0068] If there is no intersection between the existing leaf node in the RTree index space and the bounding box corresponding to the inserted road element, a new leaf node is constructed and the bounding box corresponding to the road element is used as the bounding box of the leaf node.

[0069] Based on any of the foregoing embodiments, constructing a grid structure based on the trajectory data includes:

[0070] Convert the geographic coordinates of each track point in the track data into geodetic coordinates;

[0071] The coordinate points in the geodetic coordinate system of the trajectory points are divided by preset values ​​respectively to obtain a grid structure of the trajectory points. The preset values ​​are determined according to a preset grid structure size, and the trajectory points falling in the same grid structure are regarded as a group of trajectory points.

[0072] In the embodiment of the present invention, Figure 6 As shown, each track point in the track data is converted into the geodetic coordinate system. The coordinates x and y of each track point in the geodetic coordinate system are divided by 10 respectively, and the size of the grid structure is controlled within the meter range. The result after division (new x, new y) is the grid structure of the original coordinate point. The grids belonging to the same grid are considered to be the same group.

[0073] In an embodiment of the present invention, the trajectory points of each track data are classified into groups based on the size of the grid structure. For example, assume that the track trace is a point sequence {p1, p2, p3, ..., pn}. Each track point uses the grid method to obtain a gridID, expressed as {p1->grid1, p2->grid1, p3->grid2, ..., pn->gridm}, and queries are performed in sequence to query the corresponding road element objects. Taking the grid structure as a unit, traverse the track points belonging to each gridID in the same group. Each track point first queries the road element object in the gridID cache. If no result is found, traverse the child nodes of the track point to be queried from the root node of RTree until the leaf node is traversed. The road element object recorded in the leaf node is recorded in the road element cache corresponding to the gridID. Taking the query of a single coordinate point as an example, query which area of ​​P1, P2, P3, and P4 the single coordinate point falls in. If a hit is found, continue to query in its child nodes until the leaf node is found. Figure 7 As shown, since the trajectory point to be queried intersects with P3 and P4, traversing the coordinate points in sequence will find which data matches the F and G data in P3 or the H and J data in P4, and the hit data will be returned. If no data is hit, it will be returned that the query has no results.

[0074] If the trajectory point matches the road element object, that is, the trajectory point is covered by the bbox geometry of the road element object, an association relationship will be established between the trajectory point to be queried and the road element object. Otherwise, no result will be found in the search, indicating that the map data is missing, and a map data improvement reminder will be sent to the user.

[0075] The method for quickly associating trajectory data with map data provided by the embodiment of the present invention can greatly save memory by constructing RTree indexes only for road element objects. Generally speaking, the ratio of road element objects to lane element objects is 1:5, and the ratio of road element objects to lane element objects is 1:7. By adopting the embodiment of the present invention, 10% of memory resources can be saved in terms of cost when constructing RTree indexes.

[0076] The following is a description of a device for quickly associating track data with map data provided by the present invention. The device for quickly associating track data with map data described below and the method for quickly associating track data with map data described above can be referred to each other.

[0077] Figure 8 A schematic diagram of a device for quickly associating trajectory data with map data provided by an embodiment of the present invention, such as Figure 8 As shown, the apparatus for quickly associating trajectory data with map data provided by an embodiment of the present invention includes:

[0078] A preprocessing module 801 is used to preprocess the trajectory data and the map data, wherein the preprocessing of the map data includes constructing an RTree index based on the road elements in the map data, the RTree index includes a root node, a child node and a leaf node, there is a geometric covering relationship between the root node, the child node and the leaf node, and each leaf node is used to record a road element object; the preprocessing of the trajectory data includes constructing a grid structure based on the trajectory data;

[0079] The first query module 802 is used to traverse each to-be-queried track point in the same grid structure, and query whether there is a road element object matching the to-be-queried track point from the road element objects matched by other track points in the same grid structure;

[0080] The second query module 803 is used for, if it does not exist, traversing its child nodes from the root node of the RTree index until a leaf node that can geometrically cover the trajectory point to be queried is reached, and taking the road element object recorded in the leaf node as the road element object associated with the trajectory point to be queried;

[0081] The establishing module 804 is used to traverse different grid structures until the trajectory points in all grid structures are associated with the road element objects.

[0082] In the embodiment of the present invention, the preprocessing module 801 is configured as follows:

[0083] Construct the bounding box corresponding to each road element;

[0084] The bounding box corresponding to each road element is inserted into the RTree index space until all road elements are inserted, thereby obtaining an Rtree index.

[0085] The step of inserting the bounding box corresponding to each road element into the RTree index space includes:

[0086] If there is a leaf node in the RTree index space that can geometrically cover the bounding box corresponding to the inserted road element, and the number of bounding boxes corresponding to the road elements covered by the leaf node is less than the preset leaf node capacity, the bounding box corresponding to the road element is directly inserted into the leaf node.

[0087] Alternatively, if all existing leaf nodes in the RTree index space cannot geometrically cover the bounding box corresponding to the inserted road element, and the number of bounding boxes covered by the leaf node with the largest intersection area with the bounding box corresponding to the road element is less than the preset leaf node capacity; then the bounding box parameters of the leaf node with the largest intersection area with the bounding box corresponding to the road element are expanded, and the bounding box parameters of the parent node corresponding to the leaf node are synchronously updated until the root node is updated;

[0088] The bounding box corresponding to the road element is inserted into the leaf node of the expanded bounding box parameter.

[0089] Alternatively, if the existing leaf nodes in the RTree index space can geometrically cover the bounding boxes corresponding to the inserted road elements, and the number of road element bounding boxes covered by the leaf nodes that can geometrically cover the bounding boxes corresponding to the inserted road elements is not less than the preset leaf node capacity; then the leaf nodes are split, and the bounding boxes corresponding to the road elements in the original leaf nodes whose sum of bounding box areas is greater than half of the bounding box area of ​​the leaf nodes themselves are retained in the original leaf nodes, and the bounding box parameters of the original leaf nodes are updated; the bounding boxes corresponding to the remaining road elements are regenerated into new leaf nodes, and the bounding box parameters of the parent nodes of the original leaf nodes are updated in sequence until the root node is updated.

[0090] Alternatively, if there is no intersection between the existing leaf node in the RTree index space and the bounding box corresponding to the inserted road element, a new leaf node is constructed and the bounding box corresponding to the road element is used as the bounding box of the leaf node.

[0091] In the embodiment of the present invention, the preprocessing module 801 is further configured to:

[0092] Convert the geographic coordinates of each track point in the track data into geodetic coordinates;

[0093] The coordinate points in the geodetic coordinate system of the trajectory points are divided by preset values ​​respectively to obtain a grid structure of the trajectory points. The preset values ​​are determined according to a preset grid structure size, and the trajectory points falling in the same grid structure are regarded as a group of trajectory points.

[0094] The present invention provides a device for quickly associating trajectory data with map data, which pre-processes the trajectory data and the map data, wherein the pre-processing of the map data includes constructing an RTree index based on the road elements in the map data, the RTree index includes a root node, a child node and a leaf node, and there is a geometric covering relationship between the root node, the child node and the leaf node, and each leaf node is used to record a road element object; the pre-processing of the trajectory data includes constructing a grid structure based on the trajectory data; traversing each trajectory point to be queried in the same grid structure, querying whether there is a road element object that matches the trajectory point to be queried from the road element objects that have been matched to other trajectory points in the same grid structure. The road element object matching the query trajectory point is found; if it does not exist, traverse its child nodes starting from the root node of the RTree index until a leaf node that can geometrically cover the trajectory point to be queried is traversed, and the road element object recorded in the leaf node is used as the road element object associated with the trajectory point to be queried; traverse different grid structures until the trajectory points in all grid structures are associated with the road element objects, which can improve the matching efficiency of trajectory data and map data, can quickly associate the trajectory with the map, save computing resources and costs, and will not cause fragmentation of the trajectory data, which is beneficial for the automatic assisted navigation system to extract map data to prepare for navigation and autonomous driving scene simulation.

[0095] Fig. 9 An example of a physical structure diagram of an electronic device is shown in FIG. Fig. 9As shown, the electronic device may include: a processor (processor) 910, a communication interface (CommunicationsInterface) 920, a memory (memory) 930 and a communication bus 940, wherein the processor 910, the communication interface 920, and the memory 930 communicate with each other through the communication bus 940. The processor 910 can call the logic instructions in the memory 930 to execute a method for quickly associating trajectory data with map data, the method comprising: preprocessing the trajectory data and the map data, wherein the preprocessing of the map data comprises constructing an RTree index based on the road elements in the map data, the RTree index comprises a root node, a child node and a leaf node, there is a geometric covering relationship between the root node, the child node and the leaf node, and each leaf node is used to record a road element object; preprocessing the trajectory data comprises constructing a grid structure based on the trajectory data; traversing each trajectory point to be queried in the same grid structure, querying whether there is a road element object matching the trajectory point to be queried from the road element objects matched by other trajectory points in the same grid structure; if not, traversing its child nodes starting from the root node of the RTree index until traversing to a leaf node that can geometrically cover the trajectory point to be queried, and taking the road element object recorded in the leaf node as the road element object associated with the trajectory point to be queried; traversing different grid structures until an association relationship is established between the trajectory points in all grid structures and the road element objects.

[0096] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when executed by a processor to execute the method for quickly associating trajectory data with map data provided by the above methods, the method comprising: preprocessing the trajectory data and the map data, wherein the preprocessing of the map data comprises constructing an RTree index based on the road elements in the map data, the RTree index comprising a root node, a child node and a leaf node, there being a geometric covering relationship between the root node, the child node and the leaf node, and each leaf node being used to record a road element object; preprocessing the trajectory data comprises constructing a grid structure based on the trajectory data; traversing each trajectory point to be queried in the same grid structure, querying whether there is a road element object matching the trajectory point to be queried from the road element objects matched by other trajectory points in the same grid structure; if not, traversing its child nodes starting from the root node of the RTree index until traversing to a leaf node that can geometrically cover the trajectory point to be queried, and taking the road element object recorded in the leaf node as the road element object associated with the trajectory point to be queried; traversing different grid structures until an association relationship is established between the trajectory points in all grid structures and the road element objects.

[0097] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0098] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.

[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for quickly associating trajectory data with map data, characterized in that: include: Preprocessing the trajectory data and the map data, wherein the preprocessing of the map data includes constructing an RTree index based on the road elements in the map data, the RTree index includes a root node, a child node, and a leaf node, there is a geometric covering relationship between the root node, the child node, and the leaf node, and each leaf node is used to record a road element object; preprocessing the trajectory data includes constructing a grid structure based on the trajectory data; Traversing each to-be-queried track point in the same grid structure, querying whether there is a road element object matching the to-be-queried track point from the road element objects matched by other track points in the same grid structure; If it does not exist, traverse its child nodes starting from the root node of the RTree index until a leaf node that can geometrically cover the trajectory point to be queried is reached, and the road element object recorded in the leaf node is used as the road element object associated with the trajectory point to be queried; Traverse different grid structures until the trajectory points in all grid structures are associated with the road element objects.

2. A method for quickly associating trajectory data with map data according to claim 1, characterized in that: The step of constructing an RTree index based on the road elements in the map data comprises: Construct the bounding box corresponding to each road element; The bounding box corresponding to each road element is inserted into the RTree index space until all road elements are inserted, thereby obtaining an Rtree index.

3. A method for quickly associating trajectory data with map data according to claim 1, characterized in that: The step of inserting the bounding box corresponding to each road element into the RTree index space comprises: If there is a leaf node in the RTree index space that can geometrically cover the bounding box corresponding to the inserted road element, and the number of bounding boxes corresponding to the road elements covered by the leaf node is less than the preset leaf node capacity, the bounding box corresponding to the road element is directly inserted into the leaf node.

4. A method for quickly associating trajectory data with map data according to claim 3, characterized in that: The inserting the bounding box corresponding to each road element into the RTree index space also includes: If all existing leaf nodes in the RTree index space cannot geometrically cover the bounding box corresponding to the inserted road element, and the number of bounding boxes covered by the leaf node with the largest intersection area with the bounding box corresponding to the road element is less than the preset leaf node capacity; then the bounding box parameters of the leaf node with the largest intersection area with the bounding box corresponding to the road element are expanded, and the bounding box parameters of the parent node corresponding to the leaf node are synchronously updated until the root node is updated; The bounding box corresponding to the road element is inserted into the leaf node of the expanded bounding box parameter.

5. A method for quickly associating trajectory data with map data according to claim 3, characterized in that: The step of inserting the bounding box corresponding to each road element into the RTree index space further includes: If the existing leaf nodes in the RTree index space can geometrically cover the bounding boxes corresponding to the inserted road elements, and the number of road element bounding boxes covered by the leaf nodes that can geometrically cover the bounding boxes corresponding to the inserted road elements is not less than the preset leaf node capacity; then split the leaf nodes, retain the bounding boxes corresponding to the road elements in the original leaf nodes whose sum of bounding box areas is greater than half of the bounding box area of ​​the leaf nodes themselves in the original leaf nodes, and update the bounding box parameters of the original leaf nodes; regenerate new leaf nodes with the bounding boxes corresponding to the remaining road elements, and update the bounding box parameters of the parent nodes of the original leaf nodes in sequence until the root node is updated.

6. A method for quickly associating trajectory data with map data according to claim 1, characterized in that: The step of inserting the bounding box corresponding to each road element into the RTree index space further includes: If there is no intersection between the existing leaf node in the RTree index space and the bounding box corresponding to the inserted road element, a new leaf node is constructed and the bounding box corresponding to the road element is used as the bounding box of the leaf node.

7. A method for quickly associating trajectory data with map data according to claim 1, characterized in that: The constructing a grid structure based on the trajectory data comprises: Convert the geographic coordinates of each track point in the track data into geodetic coordinates; The coordinate points in the geodetic coordinate system of the trajectory points are divided by preset values ​​respectively to obtain a grid structure of the trajectory points. The preset values ​​are determined according to a preset grid structure size, and the trajectory points falling in the same grid structure are regarded as a group of trajectory points.

8. A device for quickly associating trajectory data with map data, characterized in that: include: A preprocessing module, used for preprocessing the trajectory data and the map data, wherein the preprocessing of the map data includes constructing an RTree index based on the road elements in the map data, the RTree index includes a root node, a child node and a leaf node, there is a geometric covering relationship between the root node, the child node and the leaf node, and each leaf node is used to record a road element object; the preprocessing of the trajectory data includes constructing a grid structure based on the trajectory data; The first query module is used to traverse each to-be-queried track point in the same grid structure, and query whether there is a road element object matching the to-be-queried track point from the road element objects matched by other track points in the same grid structure; A second query module is used for, if it does not exist, traversing its child nodes from the root node of the RTree index until a leaf node that can geometrically cover the trajectory point to be queried is reached, and taking the road element object recorded in the leaf node as the road element object associated with the trajectory point to be queried; A module is established to traverse different grid structures until the trajectory points in all grid structures are associated with the road element objects.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method for quickly associating trajectory data with map data as described in any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for quickly associating trajectory data with map data as claimed in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Candidate road section screening method based on grid segmentation and grid segmentation method

    CN110275929A

  • Track indexing and querying method and system based on inverted sorting index and prefix tree

    CN112579921A

  • Index construction method and device, track query method and device, equipment and readable medium

    CN113312346A

  • Track database creation method and device, query method, vehicle and medium

    CN116842111A

  • Track querying method and device, storage medium, and computer program product

    WO2023005771A1

Cited By

  • Specific object accompanying analysis method based on large-scale trajectory data

    CN121151801A

  • A specific object accompanying analysis method based on large-scale trajectory data

    CN121151801B