Trajectory database creation method and apparatus, query method, vehicle, medium

By constructing a spatial location-based R-tree index and binding trajectory points, a trajectory database is generated, which solves the problem of time-consuming trajectory point and lane binding and enables rapid extraction of road or trajectory features and multiple query functions.

CN116842111BActive Publication Date: 2026-08-25MOMENTA (SUZHOU) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210290373.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-23
Publication Date
2026-08-25
Estimated Expiration
2042-03-23

AI Technical Summary

Technical Problem

Existing technologies are time-consuming in the process of binding trajectory points and lanes, and the binding results cannot be reused, resulting in a large memory read and write time and an inability to extract road or trajectory features by location.

Method used

By constructing a location-based R-tree index, a map database is generated, and trajectory points are bound to road center points. Map information is recorded in the trajectory database, supporting location-based queries.

Benefits of technology

It enables rapid extraction of road or trajectory features, reduces memory requirements, supports multiple query functions, and the binding results are reusable, saving update time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116842111B_ABST
    Figure CN116842111B_ABST
Patent Text Reader

Abstract

The application discloses a trajectory database creation method and device, a query method, a vehicle, a medium and equipment, and belongs to the field of data processing. The method comprises the following steps: constructing an index based on a spatial position for each road center point in a base map, obtaining first related field information about each road center point, and generating a map database; constructing an index based on a spatial position for each trajectory point, and obtaining second related field information; binding each trajectory point in each trajectory with a road center point in the base map, and filling the second related field information of each trajectory point based on the map database; and generating a trajectory database by using the second related field information of each trajectory point and the first related field information in the map database. According to the application, the content in the trajectory database can be changed according to specified conditions, without the need to read into memory or regenerate the database, so that time is saved, the result can be reused, and the features of roads or trajectories can be quickly extracted according to positions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, and in particular to a method, apparatus, query method, vehicle, medium and equipment for creating a trajectory database. Background Technology

[0002] In the process of extracting rule-based empirical speed, it is necessary to bind trajectory points and lanes. Each binding requires reading trajectory data and base map data of a specified area into memory for processing. The time consumed by memory read and write alone accounts for half of the total speed extraction time, which is very time-consuming. Furthermore, the amount of memory required by the processing computer depends on the size of the map tile division. Moreover, it is not possible to extract road or trajectory features by location. After each data update, the binding operation needs to be re-performed, resulting in the binding results being unusable. Summary of the Invention

[0003] To address the issues of time-consuming experience speed extraction processes, inability to extract road or trajectory features by location, and unusable binding results, this application primarily provides a trajectory database creation method, apparatus, query method, vehicle, medium, and equipment.

[0004] In a first aspect, embodiments of this application provide a method for creating a trajectory database, which includes:

[0005] For each road center point in the base map, construct a spatial location-based index to obtain the first R-tree ID corresponding to each road center point, and construct the first related field information corresponding to the first R-tree ID to generate a map database;

[0006] Obtain the first number of trajectories in a road segment, and get the package name of each trajectory and the second number of trajectory points in each trajectory;

[0007] For each trajectory point, construct an index based on spatial location to obtain the second R-tree ID corresponding to each trajectory point, and construct the second related field information corresponding to the second R-tree ID;

[0008] Each trajectory point in each trajectory is bound to the road center point in the base map, and the second relevant field information of each trajectory point is populated based on the map database; and

[0009] A trajectory database is generated by using the second relevant field information of each trajectory point and the first relevant field information in the map database.

[0010] Secondly, embodiments of this application provide a trajectory database creation apparatus, which includes:

[0011] The map database generation module is used to build a spatial location-based index for each road center point in the base map, obtain the first R-tree ID corresponding to each road center point, and build the first related field information corresponding to the first R-tree ID to generate the map database.

[0012] The trajectory point acquisition module is used to acquire the first number of trajectories in a road segment, and obtain the package name of each trajectory and the second number of trajectory points in each trajectory;

[0013] The trajectory point field information acquisition module is used to build a spatial location-based index for each trajectory point, obtain the second R-tree ID corresponding to each trajectory point, and construct the second related field information corresponding to the second R-tree ID;

[0014] The trajectory point field filling module is used to bind each trajectory point in each trajectory to the road center point in the base map, and fill in the second relevant field information of each trajectory point based on the map database; and

[0015] The trajectory database generation module is used to generate a trajectory database by utilizing the second relevant field information of each trajectory point and the first relevant field information of the map database.

[0016] Thirdly, this application provides a trajectory database, which is created using the trajectory database creation method in Scheme 1.

[0017] Fourthly, embodiments of this application provide a method for querying trajectory data using the trajectory database in Scheme 3, which includes:

[0018] Input the coordinates or R-tree ID of the starting point and the ending point to search for one or more first trajectory points adjacent to the starting point within a specified range of the starting point and one or more second trajectory points adjacent to the ending point within a specified range of the ending point.

[0019] Based on the set of first package names corresponding to one or more first trajectory points and the set of second package names corresponding to one or more second trajectory points, obtain the set of third package names, where the set of third package names is the intersection of the set of first package names and the set of second package names;

[0020] The trajectory data is obtained based on the number of trajectories in the third package name set and the trajectory point IDs of the starting and ending trajectory points for each trajectory.

[0021] Fifthly, embodiments of this application provide a vehicle, wherein the vehicle includes the trajectory database creation device of Scheme 2.

[0022] Sixthly, embodiments of this application provide a computer-readable storage medium storing computer instructions. When the computer instructions are executed, they cause the computer to perform the trajectory database creation method in Scheme 1 or the trajectory data query method in Scheme 4.

[0023] In a seventh aspect, embodiments of this application provide a computer device including a processor and a memory. The memory stores computer instructions, which, when executed by the processor, implement the trajectory database creation method in Scheme 1 or the trajectory data query method in Scheme 4.

[0024] The technical solution of this application embodiment generates a map database by calculating and recording map data. Then, when the trajectory points are bound to the road centerline, the map information corresponding to the trajectory (such as lateral offset, projection distance, directional angle offset, etc.) is also added to the fields of the trajectory database, establishing a trajectory database based on spatial location and supporting field SQL queries. This location-based trajectory database can easily implement a variety of functions, supporting coordinate queries, trajectory ID or road ID queries, and queries based on limited conditions at any time. It can also modify the contents of the trajectory database according to specified conditions without having to read everything into memory or regenerate the database, and can quickly extract the features of roads or trajectories. Attached Figure Description

[0025] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description exemplarily illustrate some embodiments of this application.

[0026] Figure 1 This is a schematic diagram of a specific implementation of a trajectory database creation method according to this application;

[0027] Figure 2 This is a schematic diagram of a specific embodiment of a trajectory database creation device according to this application;

[0028] Figure 3 This is a schematic diagram of a specific implementation of a trajectory data query method using a trajectory database according to this application.

[0029] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0030] The embodiments of this application will now be described in detail with reference to the accompanying drawings, so that the advantages and features of this application can be more easily understood by those skilled in the art, thereby making a clearer and more explicit definition of the scope of protection of this application.

[0031] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0032] In this application, the base map refers to the layer placed at the bottom of multiple layers during the map drawing process, which constitutes the basic framework of the base map. The base map contains many geographical features that identify geographical locations, such as transportation, roads, landforms, etc.

[0033] In this application, the road center point refers to a series of location points on the base map used to mark roads. The road center point is collected from the location points on the center line of each road.

[0034] Extracting empirical speed or other map and trajectory information requires loading map and trajectory data into memory for processing, which is very time-consuming. To address this issue, this application proposes the concept of a trajectory database, in which multiple trajectory databases can query each other. Queries can be performed using location (geographic query) and ID (SQL query). Geographic queries support nearest-neighbor queries, i.e., querying the locations of trajectory points and lane points near a given point; geographic queries also support bounding box queries, i.e., inputting the coordinates and side length of a point can retrieve the information of that point within the trajectory database; SQL queries can be performed according to the order of IDs.

[0035] This application first records data based on the base map and constructs a spatial index using the R-tree algorithm. Each road center point in the base map has a corresponding R-tree ID that can be queried in the map database. During the binding process between trajectory points and road center points in the base map, various calculated data are entered into the trajectory database. This saves time during future updates and allows for rapid extraction of road or trajectory features. Based on the trajectory database, training data related to experience-based guide lines can be quickly generated, supporting rapid, lightweight, digitally driven iteration. It also supports the generation of second-stage lane-level binding features for digitally driven speed limits. For example, the time required to generate speed limit data each time is reduced from one hour to two minutes. The requirements for computer memory are significantly reduced; only a database stored on the hard drive needs to be maintained, avoiding a large amount of repetitive calculations.

[0036] The technical solutions of this application and how they solve the aforementioned technical problems will be described in detail below with specific embodiments. The specific embodiments described below can be combined with each other to form new embodiments. The same or similar ideas or processes described in one embodiment may not be repeated in other embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0037] Figure 1 This paper illustrates a specific implementation of a method for creating and using a trajectory database according to this application.

[0038] exist Figure 1 In the specific implementation shown, a trajectory database creation method mainly includes:

[0039] Step S101: Construct a spatial location-based index for each road center point in the base map, obtain the first R-tree ID corresponding to each road center point, and construct the first related field information corresponding to the first R-tree ID to generate a map database.

[0040] In this embodiment, since the base map is generated first, a spatial index is constructed based on the R-tree algorithm, and the corresponding first R-tree ID represents the spatial location of the base map data. The first relevant field information provides the data foundation for subsequent filling into the trajectory database.

[0041] In one specific embodiment of this application, the first related field information includes a road ID field corresponding to the first R-tree ID, a first geographical location field, an orientation coordinate field, and / or a road center point curvature field.

[0042] In this embodiment, based on the center point of each road, the road ID, R-tree ID, horizontal and vertical coordinates, direction coordinates, and curvature corresponding to the center point are recorded in the generated map database, providing a data foundation for filling the trajectory database later.

[0043] exist Figure 1 In the specific implementation shown, a trajectory database creation method further includes:

[0044] Step S102: Obtain the first number of trajectories in a road segment, and obtain the package name of each trajectory and the second number of trajectory points in each trajectory.

[0045] In this embodiment, a road segment may contain multiple trajectories, each consisting of several trajectory points. Therefore, the first and second quantities are determined based on the road length and the interval between trajectory points. Each trajectory corresponds to a package name, and a package name contains several trajectory points.

[0046] exist Figure 1 In the specific implementation shown, a trajectory database creation method further includes:

[0047] Step S103: Construct a spatial location-based index for each trajectory point to obtain the second R-tree ID corresponding to each trajectory point, and construct the second related field information corresponding to the second R-tree ID.

[0048] In this embodiment, a spatial index is constructed for each trajectory point using the R-tree algorithm to obtain a second R-tree ID corresponding to each trajectory point, representing the spatial location of the trajectory point. The second related field information provides a data foundation for subsequent input into the trajectory database.

[0049] In one specific embodiment of this application, the second related field information includes a timestamp field corresponding to the second R-tree ID, a second geographic location field, a package name field, a trajectory point curvature field, a trajectory point velocity field, and / or a trajectory point acceleration field.

[0050] In this embodiment, the corresponding velocity value, acceleration, curvature, etc. can be calculated based on the attributes of each trajectory point to obtain the second related field information, and then recorded by creating fields.

[0051] In one specific embodiment of this application, the package name field to which each trajectory point belongs is obtained based on the package name of each trajectory; the timestamp field and the second geographic location field corresponding to the second R-tree ID of each trajectory point are obtained using the timestamp attribute and the location attribute in each trajectory point; the velocity and acceleration of the trajectory point are calculated using the timestamp attribute and the location attribute in each trajectory point to obtain the velocity field and the acceleration field; and the curvature of each trajectory point is calculated based on the road ID and the location attribute corresponding to each trajectory point to obtain the curvature field.

[0052] In this embodiment, when acquiring a large number of trajectories, the package name of each trajectory can be obtained, and the package name information is recorded through a created package name field. Based on the timestamp and position attributes of each trajectory point, the velocity of the trajectory point can be calculated, and then based on the velocity and timestamp attributes of the trajectory point, the acceleration of the trajectory point can be calculated. The velocity and acceleration information of the trajectory point are recorded through created trajectory point velocity and trajectory point acceleration fields. During the process of binding the trajectory point to the road center point, the road ID of each trajectory point is recorded. Based on the position attribute and road ID of the trajectory point, the curvature of the trajectory point is calculated to obtain the second related field information, and the corresponding fields are created and recorded.

[0053] exist Figure 1 In the specific implementation shown, a trajectory database creation method further includes:

[0054] Step S104: Bind each trajectory point in each trajectory to the road center point in the base map, and fill in the second related field information of each trajectory point based on the map database.

[0055] In this embodiment, during the process of binding trajectory points with road center points, the road ID of each trajectory point and the nearest road center point to each trajectory point are recorded. There is only one nearest road center point for a trajectory point, but there are more than one trajectory point associated with a road center point. When a road center point is associated with a trajectory point, a trajectory point ID is recorded. The corresponding trajectory point can be easily and promptly queried based on the trajectory point ID.

[0056] In one specific embodiment of this application, each trajectory point in each trajectory is bound to the road center point in the base map, and the second related field information based on the map database is filled in for each trajectory point. This includes: when binding each trajectory point in each trajectory to the road center point in the base map, recording the road ID corresponding to each trajectory point and the trajectory point ID associated with the nearest road center point of each trajectory point; calculating the projection distance, lateral offset, and directional offset between each trajectory point and its nearest road center point based on the position attributes of each trajectory point and the position attributes of the nearest road center point, obtaining the projection distance field, lateral offset field, and directional offset field respectively, and filling the projection distance field, lateral offset field, and directional offset field into the second related field information.

[0057] In this embodiment, a trajectory point has only one nearest road center point, but a road center point can be associated with more than one trajectory point. Each time a road center point is associated with a trajectory point, a trajectory point ID is recorded to represent that trajectory point. The corresponding trajectory point can be easily and promptly retrieved based on the trajectory point ID. Information such as the projected distance, lateral offset, and directional angle offset between a trajectory point and its nearest road center point can be calculated based on the trajectory point's attributes and the corresponding information of the road center point, and recorded by creating corresponding fields. Along the direction of the road centerline, a trigonometric equation is constructed between the trajectory point and its nearest road center point to calculate the projected distance, lateral offset, and directional angle offset between each trajectory point and its nearest road center point. The second related field information for each trajectory point is then filled in by constructing corresponding fields.

[0058] exist Figure 1 In the specific implementation shown, a trajectory database creation method further includes:

[0059] Step S105: Generate a trajectory database using the second relevant field information of each trajectory point and the first relevant field information in the map database.

[0060] In this embodiment, the second relevant field information of each trajectory point is merged with the first relevant field information about each road center point recorded in the map database to obtain a trajectory database. This trajectory database records each relevant piece of information based on the road center point. This trajectory database can easily implement various functions, such as supporting on-demand querying of all trajectories passing near two or more coordinates, querying by trajectory or road ID, facilitating the extraction of trajectory features, and limiting query conditions; supporting on-demand writing and modification, allowing changes to the database content according to specified conditions without needing to load everything into memory or regenerate the database; and enabling rapid extraction of information within the trajectory database, directly generating GeoJSON data for convenient use by downstream personnel.

[0061] Figure 2 This paper illustrates a specific embodiment of a trajectory database creation apparatus according to this application.

[0062] exist Figure 2 In the specific embodiment shown, a trajectory database creation device mainly includes:

[0063] The map database generation module 201 is used to construct a spatial location-based index for each road center point in the base map, obtain the first R-tree ID corresponding to each road center point, construct the first related field information corresponding to the first R-tree ID, and generate the map database.

[0064] The trajectory point acquisition module 202 is used to acquire a first number of trajectories in a road segment, and obtain the package name of each trajectory and a second number of trajectory points in each trajectory;

[0065] The trajectory point field information acquisition module 203 is used to construct a spatial location-based index for each trajectory point, obtain the second R-tree ID corresponding to each trajectory point, and construct the second related field information corresponding to the second R-tree ID;

[0066] The trajectory point field filling module 204 is used to bind each trajectory point in each trajectory to the road center point in the base map, and to fill each trajectory point with second related field information based on the map database; and

[0067] The trajectory database generation module 205 is used to generate a trajectory database by utilizing the second relevant field information of each trajectory point and the first relevant field information of the map database.

[0068] In this embodiment, the map database generation module in the trajectory database creation device records data on the base map and constructs a spatial index based on the R-tree algorithm. Each road center point on the base map has a corresponding R-tree ID that can be queried in the map database. The trajectory point acquisition module can acquire a large number of trajectory points as a basis for subsequent calculations. The trajectory point field information acquisition module calculates some relevant field information based on the attributes of the trajectory points. The trajectory point field filling module fills the trajectory data during the binding process between the trajectory points and the road center points on the base map. The trajectory database generation module enters the calculated data into the trajectory database, saving time during future updates and quickly extracting road or trajectory features. Based on the trajectory database, training data related to experience-based guide lines can be quickly generated, supporting rapid and lightweight iteration driven by digital technology. It can also support the generation of lane-level binding features for the second stage of digitally driven speed limits. For example, previously, generating speed limit data required an hour of processing time; now it only takes two minutes. The requirements for computer memory are significantly reduced, and only a database stored on the hard drive needs to be maintained, avoiding a large amount of repetitive calculations.

[0069] The trajectory database creation apparatus provided in this application can be used to execute the trajectory database creation method described in any of the above embodiments. Its implementation principle and technical effect are similar, and will not be repeated here.

[0070] In one specific embodiment of this application, the functional modules in the trajectory database creation device of this application can be directly in hardware, in software modules executed by a processor, or in a combination of both.

[0071] Software modules may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in this art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium.

[0072] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination thereof. A general-purpose processor can be a microprocessor, but alternatively, it can be any conventional processor, controller, microcontroller, or state machine. The processor can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors incorporating a DSP core, or any other such configuration. Alternatively, the storage medium can be integrated with the processor. The processor and storage medium can reside in an ASIC. The ASIC can reside in the user terminal. Alternatively, the processor and storage medium can reside as discrete components in the user terminal.

[0073] In another specific embodiment of this application, a trajectory database is provided, which utilizes the appendix to this application specification. Figure 1 The trajectory database is created using the method shown in any of the embodiments.

[0074] Figure 3 This paper illustrates a specific implementation of a trajectory data query method using a trajectory database according to this application.

[0075] exist Figure 3 In the specific embodiment shown, a method for querying trajectory data using a trajectory database includes:

[0076] Step S301: Input the coordinates or R-tree ID of the starting point and the ending point, and search for one or more first trajectory points adjacent to the starting point within a specified range of the starting point and one or more second trajectory points adjacent to the ending point within a specified range of the ending point.

[0077] Step S302: Based on the first package name set corresponding to one or more first trajectory points and the second package name set corresponding to one or more second trajectory points, obtain the third package name set, wherein the third package name set is the intersection of the first package name set and the second package name set;

[0078] Step S303: Obtain trajectory data based on the number of trajectories in the third package name set and the trajectory point IDs of the starting and ending trajectory points for each trajectory.

[0079] In this implementation, while inputting the coordinates or R-tree IDs of the start and end points, a specified range for each start and end point is defined. Within this range, neighboring trajectory points are searched. The first trajectory point contains multiple trajectory points, and the second trajectory point also contains multiple trajectory points. Therefore, the corresponding first package name set contains multiple names, and the second package name set also contains multiple names. The intersection of the first and second package name sets yields a third package name set, where each package name is unique and corresponds to a trajectory. Trajectory data is obtained based on the road ID and road ID sequence of each trajectory point. When the same trajectory is found, different colors can be used to distinguish between different trajectories. Each road center point can be queried and identified in the trajectory database.

[0080] In one specific embodiment of this application, fields and their contents in the trajectory database are added, deleted, or modified according to user-specified conditions.

[0081] In this embodiment, the database content can be modified according to specified conditions without having to load everything into memory or regenerate the database, thus avoiding a large amount of repetitive calculations and saving time. The ability to add fields at any time makes the trajectory database scalable.

[0082] In one specific embodiment of this application, field information in the trajectory database is extracted and processed to output trajectory data in a specific data format.

[0083] In this embodiment, the specific data format is the GeoJSON data structure, which is a map data usage standard that can be easily used by downstream personnel of the project.

[0084] In another specific embodiment of this application, a vehicle is provided, wherein the vehicle includes the trajectory database creation apparatus of any embodiment. Optionally, the vehicle includes a processor and a memory, the processor and the memory being coupled, the vehicle being used to implement the appendix to this application specification. Figure 1 The trajectory database creation method or instruction manual in any of the embodiments shown Figure 3 Trajectory data query method in any of the embodiments shown.

[0085] In another specific embodiment of this application, a computer-readable storage medium is provided, which stores computer instructions that, when executed, cause a computer to perform the trajectory database creation method or trajectory data query method in any embodiment.

[0086] In another specific embodiment of this application, a computer device includes a processor and a memory, the memory storing computer instructions, which, when executed by the processor, implement the trajectory database creation method or trajectory data query method in any embodiment.

[0087] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0088] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0089] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for creating and querying a trajectory database, characterized in that, include: For each road center point in the base map, an index based on spatial location is constructed to obtain the first R-tree ID corresponding to each road center point, and the first related field information corresponding to the first R-tree ID is constructed to generate a map database; Obtain a first number of trajectories in a road segment, and obtain the package name of each trajectory and a second number of trajectory points in each trajectory; For each trajectory point, an index based on spatial location is constructed to obtain the second R-tree ID corresponding to each trajectory point, and second related field information corresponding to the second R-tree ID is constructed; Each trajectory point in each trajectory is bound to the center point of the road in the base map, and each trajectory point is filled with the second related field information based on the map database; as well as A trajectory database is generated using the second relevant field information of each trajectory point and the first relevant field information in the map database; Input the coordinates or R-tree ID of the starting point and the ending point, and search for one or more first trajectory points adjacent to the starting point within a specified range of the starting point and one or more second trajectory points adjacent to the ending point within a specified range of the ending point. A third set of package names is obtained based on the first set of package names corresponding to the one or more first trajectory points and the second set of package names corresponding to the one or more second trajectory points, wherein the third set of package names is the intersection of the first set of package names and the second set of package names; The trajectory data is obtained based on the number of trajectories in the third package name set and the trajectory point IDs of the starting and ending trajectory points for each trajectory.

2. The method for creating and querying a trajectory database according to claim 1, characterized in that, The first related field information includes a road ID field corresponding to the first R-tree ID, a first geographic location field, an orientation coordinate field, and / or a road center point curvature field.

3. The method for creating and querying a trajectory database according to claim 1, characterized in that, The second related field information includes a timestamp field corresponding to the second R-tree ID, a second geographic location field, a package name field, a trajectory point curvature field, a trajectory point velocity field, and / or a trajectory point acceleration field.

4. The method for creating and querying a trajectory database as described in claim 3, characterized in that, Also includes: Based on the package name of each trajectory, obtain the package name field to which each trajectory point belongs; Using the timestamp attribute and location attribute in each trajectory point, the timestamp field and the second geographic location field corresponding to the second R-tree ID of each trajectory point are obtained; The velocity and acceleration of each trajectory point are calculated using the timestamp attribute and the position attribute in each trajectory point to obtain the trajectory point velocity field and the trajectory point acceleration field. The curvature of each trajectory point is calculated based on the road ID and location attribute corresponding to each trajectory point to obtain the trajectory point curvature field.

5. The method for creating and querying a trajectory database as described in claim 1, characterized in that, Each trajectory point in each trajectory is bound to the center point of the road in the base map, and the second related field information of each trajectory point is filled in based on the map database, including: When binding each trajectory point in each trajectory to the road center point in the base map, the road ID corresponding to each trajectory point and the trajectory point ID associated with the nearest road center point of each trajectory point are recorded. Based on the position attributes of each trajectory point and the position attributes of the nearest road center point, the projection distance, lateral offset, and directional offset between each trajectory point and its nearest road center point are calculated, and the projection distance field, lateral offset field, and directional offset field are obtained respectively. The projection distance field, the lateral offset field, and the directional offset field are then filled into the second related field information.

6. The method for creating and querying a trajectory database as described in claim 1, characterized in that, The user can add, delete, and / or modify fields and their contents in the trajectory database according to specified conditions.

7. The method for creating and querying a trajectory database as described in claim 1, characterized in that, The field information in the trajectory database is extracted and processed to output trajectory data in a specific data format.

8. A device for creating and querying a trajectory database, characterized in that, include: The map database generation module is used to construct a spatial location-based index for each road center point in the base map, obtain the first R-tree ID corresponding to each road center point, construct the first related field information corresponding to the first R-tree ID, and generate the map database. The trajectory point acquisition module is used to acquire a first number of trajectories in a road segment, and obtain the package name of each trajectory and a second number of trajectory points in each trajectory; The trajectory point field information acquisition module is used to construct a spatial location-based index for each trajectory point, obtain the second R-tree ID corresponding to each trajectory point, and construct the second related field information corresponding to the second R-tree ID; The trajectory point field filling module is used to bind each trajectory point in each trajectory to the center point of the road in the base map, and fill each trajectory point with the second related field information based on the map database; as well as The trajectory database generation module is used to generate a trajectory database using the second related field information of each trajectory point and the first related field information in the map database; Input the coordinates or R-tree ID of the starting point and the ending point, and search for one or more first trajectory points adjacent to the starting point within a specified range of the starting point and one or more second trajectory points adjacent to the ending point within a specified range of the ending point. A third set of package names is obtained based on the first set of package names corresponding to the one or more first trajectory points and the second set of package names corresponding to the one or more second trajectory points, wherein the third set of package names is the intersection of the first set of package names and the second set of package names; The trajectory data is obtained based on the number of trajectories in the third package name set and the trajectory point IDs of the starting and ending trajectory points for each trajectory.

9. A trajectory database, characterized in that, The trajectory database is created using the trajectory database creation and query method described in any one of claims 1-5.

10. A vehicle, characterized in that, The vehicle includes a trajectory database created using the trajectory database creation and query device as described in claim 8.

11. A computer-readable storage medium storing computer instructions, characterized in that, When the computer instructions are executed, they cause the computer to perform the method as described in any one of claims 1-7.

12. A computer device comprising a processor and a memory, the memory storing computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Data processing method and device, equipment and medium

    CN113641734A

  • Method for generating database using navigation trace information and system thereof

    KR1020080073975A