Line track query method and terminal

By constructing a tree-like index structure for route trajectory querying, the problem of low query efficiency in existing technologies is solved, enabling rapid matching of travel route trajectories and improving the efficiency of carpooling and ridesharing services.

CN115269760BActive Publication Date: 2026-03-17XIAMEN MEIYA PICO INFORMATION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-08
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies for route tracking are inefficient, especially as the amount of data increases, resulting in excessively long computation times. They are unable to efficiently match drivers and passengers with similar travel routes and time periods.

Method used

A tree-like index structure is constructed using binary encoded values. This structure is used to retrieve route trajectory data, replacing the existing GeoHash value comparison query method and enabling fast retrieval.

Benefits of technology

The tree-indexed query method reduces computation time and improves the efficiency of route trajectory query, enabling rapid matching of travel route trajectories, and is suitable for carpooling and ridesharing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115269760B_ABST
    Figure CN115269760B_ABST
Patent Text Reader

Abstract

This invention discloses a route trajectory query method and terminal. The method obtains the binary encoding value corresponding to a latitude and longitude map and constructs a tree-like index structure based on the binary encoding value. It receives second route trajectory data, performs binary encoding on the second route trajectory data to obtain a third binary encoding value corresponding to the second route trajectory data, and searches for target route trajectory data corresponding to the second route trajectory data from the tree-like index structure based on the third binary encoding value. Unlike existing technologies that rely on GeoHash value comparison for querying, this method searches for matching route trajectories by retrieving the tree-like index structure, enabling rapid retrieval of relevant route trajectories, reducing computation time, and thus improving the efficiency of route trajectory querying.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of spatial data processing technology, and in particular to a method and terminal for querying route trajectories. Background Technology

[0002] As people's living standards improve, private cars have become an essential part of daily life. The explosive growth in private car ownership is beyond the reach of urban transportation infrastructure. However, private cars often have low passenger capacity, leading to inefficient resource utilization and exacerbating urban traffic problems. Although people now have private cars for transportation, travel time has not decreased, and their quality of life has not improved.

[0003] Matching drivers and passengers with similar travel routes and time periods to encourage carpooling can improve vehicle utilization and reduce urban traffic congestion. Current technology for checking if a route passes through a specific area typically involves converting two-dimensional trajectory points into one-dimensional GeoHash codes, gridding the map, and then determining if the GeoHash matches the data within the searched area. However, this method becomes increasingly computationally time-consuming and inefficient as the amount of data grows. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a route trajectory query method and terminal that can improve the efficiency of route trajectory query.

[0005] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0006] A method for querying route trajectory includes the following steps:

[0007] Obtain the binary encoded values ​​corresponding to the latitude and longitude map, and construct a tree-like index structure based on the binary encoded values;

[0008] Receive the second route trajectory data;

[0009] The second route trajectory data is binary encoded to obtain the third binary encoded value corresponding to the second route trajectory data;

[0010] Based on the third binary code value, the target route trajectory data corresponding to the second route trajectory data is searched from the tree index structure.

[0011] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows:

[0012] A route tracking terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps:

[0013] Obtain the binary encoded values ​​corresponding to the latitude and longitude map, and construct a tree-like index structure based on the binary encoded values;

[0014] Receive the second route trajectory data;

[0015] The second route trajectory data is binary encoded to obtain the third binary encoded value corresponding to the second route trajectory data;

[0016] Based on the third binary code value, the target route trajectory data corresponding to the second route trajectory data is searched from the tree index structure.

[0017] The beneficial effects of this invention are as follows: It obtains the binary encoded values ​​corresponding to latitude and longitude maps, constructs a tree-like index structure based on these binary encoded values, receives second route trajectory data, performs binary encoding on the second route trajectory data to obtain the corresponding third binary encoded value, and searches for the corresponding target route trajectory data from the tree-like index structure based on the third binary encoded value. This achieves spatial retrieval based on a tree structure. When querying route trajectories, unlike existing technologies that rely on GeoHash value comparisons, it searches for matching route trajectories by retrieving the tree-like index structure. This enables rapid retrieval of relevant route trajectories, reduces computation time, and thus improves the efficiency of route trajectory queries. Attached Figure Description

[0018] Figure 1 This is a flowchart illustrating the steps of a route trajectory query method according to an embodiment of the present invention;

[0019] Figure 2 This is a schematic diagram of the structure of a route trajectory query terminal according to an embodiment of the present invention;

[0020] Figure 3 This is a flowchart illustrating the target route trajectory data query process in the route trajectory query method of this invention.

[0021] Figure 4 This is a schematic diagram of the stored trajectory identifier in the route trajectory query method of this invention. Detailed Implementation

[0022] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0023] Please refer to Figure 1 This invention provides a method for querying route trajectories, including the following steps:

[0024] Obtain the binary encoded values ​​corresponding to the latitude and longitude map, and construct a tree-like index structure based on the binary encoded values;

[0025] Receive the second route trajectory data;

[0026] The second route trajectory data is binary encoded to obtain the third binary encoded value corresponding to the second route trajectory data;

[0027] Based on the third binary code value, the target route trajectory data corresponding to the second route trajectory data is searched from the tree index structure.

[0028] As can be seen from the above description, the beneficial effects of the present invention are as follows: It obtains the binary encoded value corresponding to the latitude and longitude map, constructs a tree-like index structure based on the binary encoded value, receives second route trajectory data, performs binary encoding on the second route trajectory data to obtain the corresponding third binary encoded value, and searches for the corresponding target route trajectory data from the tree-like index structure based on the third binary encoded value. This achieves spatial retrieval based on a tree structure. When querying route trajectories, unlike the prior art which uses GeoHash value comparison for querying, it searches for matching route trajectories by retrieving the tree-like index structure, enabling rapid retrieval of relevant route trajectories, reducing computation time, and thus improving the efficiency of route trajectory querying.

[0029] Furthermore, the binary encoded value includes a first binary encoded value and a second binary encoded value;

[0030] The step of obtaining the binary encoded value corresponding to the latitude and longitude map and constructing a tree-like index structure based on the binary encoded value includes:

[0031] Obtain the first binary code value corresponding to the latitude and longitude map, and construct a tree-like index structure based on the first binary code value;

[0032] Receive the first route trajectory data and generate a trajectory identifier corresponding to the first route trajectory data;

[0033] The first route trajectory data is binary encoded to obtain the second binary encoded value corresponding to the first route trajectory data, and the key value corresponding to the trajectory identifier is generated based on the second binary encoded value.

[0034] The trajectory identifier is stored in the tree index structure based on the key value.

[0035] As described above, this method saves the route trajectory that the current driver needs to execute to a tree index structure, making it easier to query directly in the tree index structure later.

[0036] Further, obtaining the first binary code value corresponding to the latitude and longitude map, and constructing a tree-like index structure based on the first binary code value includes:

[0037] The first binary code value corresponding to the latitude and longitude map is calculated according to a preset code length range, wherein the preset code length range includes the first preset code length;

[0038] Generate parent and child nodes based on the first binary encoding value according to the preset encoding length range;

[0039] Determine the target first binary code value of the first preset code length, and split the target first binary code value according to the preset time granularity to obtain the split target first binary code value;

[0040] Leaf nodes are generated based on the split target first binary encoded value;

[0041] A tree-like index structure is obtained based on the parent node, the child node, and the leaf node.

[0042] As described above, when constructing a tree-like index structure, splitting the target first binary code value according to a preset time granularity can narrow the matching range when matching route trajectories, thereby improving the efficiency of route trajectory query.

[0043] Further, the step of binary encoding the first route trajectory data to obtain the second binary encoded value corresponding to the first route trajectory data includes:

[0044] Each latitude and longitude point in the first route trajectory data is binary encoded according to the first preset encoding length to obtain an initial second binary encoding value.

[0045] The initial second binary code value is deduplicated to obtain the second binary code value corresponding to the first route trajectory data.

[0046] As described above, since trajectory data is constructed by collecting a large number of continuous latitude and longitude points to form a line, some latitude and longitude points will be close to each other and in the same area, and their generated binary code values ​​will be the same. By deduplicating the initial second binary code value, the second binary code value corresponding to the first line trajectory data can be obtained, which can reduce unnecessary calculations and thus improve processing efficiency.

[0047] Furthermore, the first route trajectory data includes the first execution time corresponding to the first route trajectory data;

[0048] The step of generating the key value corresponding to the trajectory identifier based on the second binary encoded value includes:

[0049] Generate the key value corresponding to the trajectory identifier based on the first execution time and the second binary encoded value.

[0050] As described above, a key value corresponding to the trajectory identifier is generated based on the first execution time and the second binary encoding value. By introducing time, it is easier to query the matching route trajectory in the future.

[0051] Further, storing the trajectory identifier into the tree index structure based on the key value includes:

[0052] The target leaf node is determined from the tree index structure based on the key value;

[0053] The trajectory identifier is stored in the set pointed to by the target leaf node.

[0054] As described above, the trajectory identifier is stored in the set pointed to by the target leaf node. When matching route trajectory data later, the corresponding route trajectory data can be obtained through the trajectory identifier.

[0055] Further, the step of searching for the target route trajectory data corresponding to the second route trajectory data from the tree index structure based on the third binary encoded value includes:

[0056] Based on the third binary code value, search for the target trajectory identifier corresponding to the third binary code value in the tree index structure;

[0057] The corresponding target first route trajectory data is obtained based on the target trajectory identifier.

[0058] As described above, the first route trajectory data is the route trajectory data that the driver needs to execute, and the second route trajectory data is the route trajectory data that other passengers need to execute. Based on the third binary code value, the target trajectory identifier corresponding to the third binary code value is searched from the tree index structure. The corresponding target first route trajectory data is obtained according to the target trajectory identifier, so that the route trajectory passing through the same area can be quickly and accurately queried, which is convenient for application in ride-sharing and carpooling scenarios.

[0059] Furthermore, the second route trajectory data includes the latitude and longitude of the starting point and the latitude and longitude of the ending point;

[0060] The step of binary encoding the second route trajectory data to obtain the third binary encoded value corresponding to the second route trajectory data includes:

[0061] Determine a first range of latitude and longitude within a preset range for the starting point and a second range of latitude and longitude within a preset range for the ending point;

[0062] The latitude and longitude of the first range and the latitude and longitude of the second range are respectively binary encoded to obtain the first range binary encoded value corresponding to the first range latitude and longitude and the second range binary encoded value corresponding to the second range latitude and longitude.

[0063] As described above, binary encoding is performed on the latitude and longitude of the starting point and the ending point within a preset range, thereby enabling the search for route trajectories that match the passenger's starting point and ending point within the preset range.

[0064] Furthermore, the second route trajectory data also includes a second execution time;

[0065] The step of searching for the target trajectory identifier corresponding to the third binary encoded value from the tree index structure based on the third binary encoded value includes:

[0066] Determine whether the second execution time is less than or equal to a preset time range. If so, determine the third execution time based on the second execution time. Then, search for the first target trajectory identifier corresponding to the first range binary code value in the tree index structure based on the first range binary code value, the second execution time, and the third execution time.

[0067] Based on the second range binary encoded value, the second execution time, and the third execution time, search the tree index structure for the second target trajectory identifier corresponding to the second range binary encoded value;

[0068] The target trajectory identifier is determined based on the first target trajectory identifier and the second target trajectory identifier.

[0069] As described above, only routes that match both the starting point and the ending point are determined as the final target route, thus achieving accurate route trajectory queries. In addition, when querying a route, all route trajectory data within the allowed matching time range can be retrieved, making the route trajectory data more consistent with reality and more reasonable.

[0070] Please refer to Figure 2 Another embodiment of the present invention provides a route trajectory query terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements each step of the above-described route trajectory query method.

[0071] The route trajectory query method and terminal described above are applicable to scenarios requiring route trajectory queries, such as carpooling or ridesharing services. The following detailed implementation methods illustrate these methods:

[0072] Example 1

[0073] Please refer to Figure 1 , Figures 3-4 The method for querying route trajectory in this embodiment includes the following steps:

[0074] S1. Obtain the binary encoded values ​​corresponding to the latitude and longitude map, and construct a tree-like index structure based on the binary encoded values, such as... Figure 3 As shown, it specifically includes:

[0075] The binary encoded value includes a first binary encoded value and a second binary encoded value;

[0076] In one alternative implementation, if the binary encoded value is selected as a GeoHash value, then the first binary encoded value is the first GeoHash value, and the second binary encoded value is the second GeoHash value.

[0077] S11. Obtain the first binary code value corresponding to the latitude and longitude map, and construct a tree-like index structure based on the first binary code value, specifically including:

[0078] S111. Calculate the first binary code value corresponding to the latitude and longitude map according to the preset code length range, wherein the preset code length range includes the first preset code length;

[0079] Wherein, the first preset encoding length is the maximum value in the preset encoding length range. In this embodiment, the preset encoding length range is 3 to 6, so the first preset encoding length is 6.

[0080] Specifically, calculate the first GeoHash value, which has a length range of 3 to 6 digits, corresponding to the latitude and longitude map;

[0081] S112. Generate parent and child nodes based on the first binary encoding value according to the preset encoding length range;

[0082] The preset encoding length range further includes a second preset encoding length, a third preset encoding length, and a fourth preset encoding length; the second preset encoding length is 5, the third preset encoding length is 4, and the fourth preset encoding length is 3.

[0083] Specifically, the first GeoHash value is used to generate parent and child nodes in descending order of its encoding length;

[0084] For example, the first GeoHash value with a length of the fourth preset encoding length is used as the parent node, the first GeoHash value with a length of the third preset encoding length is used as the first-level child node under the parent node, the first GeoHash value with a length of the second preset encoding length is used as the second-level child node under the parent node, and the first GeoHash value with a length of the first preset encoding length is used as the third-level child node under the parent node.

[0085] S113. Determine the target first binary code value of the first preset code length, and split the target first binary code value according to the preset time granularity to obtain the split target first binary code value;

[0086] The preset time granularity is 24 hours.

[0087] For example, if the target first GeoHash value with a length of 6 is determined to be wx4eek, the target first GeoHash value wx4eek is split into 24 equal parts to obtain the split target first GeoHash values, namely wx4eek-01, wx4eek-02, ..., wx4eek-24.

[0088] S114. Generate leaf nodes based on the split target first binary code value;

[0089] For example, continuing the example above, we can treat wx4eek-01, wx4eek-02, ..., wx4eek-24 as leaf nodes under the child node wx4eek;

[0090] S115. Obtain a tree-like index structure based on the parent node, the child node, and the leaf node;

[0091] In this embodiment, the tree index structure is an R-Tree index structure;

[0092] S12. Receive the first route trajectory data and generate a trajectory identifier (TrackID) corresponding to the first route trajectory data, such as... Figure 3 As shown;

[0093] The first route trajectory data includes the first execution time corresponding to the first route trajectory data; in the carpooling or ridesharing business scenario, the first route trajectory data is the route trajectory data that the driver currently needs to execute;

[0094] S13. Encode the first route trajectory data into binary to obtain a second binary code value corresponding to the first route trajectory data, and generate a key value corresponding to the trajectory identifier based on the second binary code value, such as... Figure 3 As shown, it specifically includes:

[0095] S131. Encode each latitude and longitude point in the first route trajectory data into binary according to the first preset encoding length to obtain an initial second binary encoding value;

[0096] Specifically, each latitude and longitude point in the first route trajectory data is binary encoded using an offline method to obtain an initial second GeoHash value of length 6;

[0097] S132. Deduplication is performed on the initial second binary code value to obtain the second binary code value corresponding to the first line trajectory data;

[0098] S133. Generate a key value corresponding to the trajectory identifier based on the first execution time and the second binary encoding value;

[0099] For example, if the first execution time is 8:00 AM and the second GeoHash value is wx4eek, then the generated key value is wx4eek-08;

[0100] In another optional implementation, it is determined whether the first execution time is less than or equal to a preset time range. If so, a fifth execution time is determined based on the first execution time, and a key value corresponding to the trajectory identifier is generated based on the first execution time, the fourth execution time, and the second binary encoding value. If not, a sixth execution time is determined based on the first execution time, and a key value corresponding to the trajectory identifier is generated based on the first execution time, the sixth execution time, and the second binary encoding value.

[0101] The preset time range can be set according to the actual situation. In this embodiment, the preset time range is 10.

[0102] For example, assuming the first execution time is 8:05, and 5 is less than 10, then the fifth execution time is determined to be 7, and the key values ​​corresponding to the trajectory identifier are generated as wx4eek-08 and wx4eek-07, as follows. Figure 4 As shown; assuming the first execution time is 8:11, and 11 is greater than 10, then the fifth execution time is determined to be 9:00, and the key values ​​corresponding to the trajectory identifier are generated as wx4eek-08 and wx4eek-09;

[0103] S14. Based on the key value, store the trajectory identifier into the tree index structure, such as... Figure 3 As shown, it specifically includes:

[0104] S141. Determine the target leaf node from the tree index structure based on the key value;

[0105] S142. Store the trajectory identifier in the set pointed to by the target leaf node;

[0106] For example, continuing the example above, the trajectory identifier is stored in the set pointed to by the target leaf node wx4eek-08;

[0107] S2, Receive the second route trajectory data;

[0108] The second route trajectory data includes the latitude and longitude of the starting point, the latitude and longitude of the ending point, and the second execution time; in carpooling or ridesharing scenarios, the second route trajectory data is the route trajectory data that needs to be determined to determine whether it overlaps with the first route trajectory data.

[0109] S3. Encode the second route trajectory data into binary to obtain the third binary encoded value corresponding to the second route trajectory data, such as... Figure 3 As shown, it specifically includes:

[0110] S31. Determine the first range of latitude and longitude within the preset range of the starting point latitude and longitude, and the second range of latitude and longitude within the preset range of the ending point latitude and longitude;

[0111] In this embodiment, the preset range is within a radius of 1km;

[0112] Specifically, in practical applications, other locations within a preset range of a certain location can be considered to be in the same area as that location. Therefore, the first range of latitude and longitude within a 1km radius of the starting point and the second range of latitude and longitude within a 1km radius of the ending point are determined.

[0113] The first range of latitude and longitude and the second range of latitude and longitude include multiple latitude and longitude coordinates;

[0114] S32. Encode the latitude and longitude of the first range and the latitude and longitude of the second range into binary to obtain the first range binary code value corresponding to the latitude and longitude of the first range and the second range binary code value corresponding to the latitude and longitude of the second range.

[0115] S4. Based on the third binary encoding value, search for the target route trajectory data corresponding to the second route trajectory data from the tree index structure, specifically including:

[0116] S41. Based on the third binary code value, search for the target trajectory identifier corresponding to the third binary code value in the tree index structure, such as... Figure 3 As shown, it specifically includes:

[0117] S411. Determine whether the second execution time is less than or equal to a preset time range. If so, determine the third execution time based on the second execution time, and search for the first target trajectory identifier corresponding to the first range binary code value in the tree index structure based on the first range binary code value, the second execution time, and the third execution time.

[0118] Specifically, it is determined whether the number of minutes in the second execution time is less than or equal to a preset time range. If so, a third execution time is determined based on the number of clock cycles in the second execution time. The first target trajectory identifier corresponding to the first range binary code value is searched in the tree index structure based on the first range binary code value, the second execution time, and the third execution time. If not, a fourth execution time is determined based on the number of clock cycles in the second execution time. The first target trajectory identifier corresponding to the first range binary code value is searched in the tree index structure based on the first range binary code value, the second execution time, and the fourth execution time.

[0119] For example, if the second execution time is 8:05, and there exists a first range GeoHash value wx4eek where the minute count 5 is less than 10, then the third execution time is determined to be 7:00. The corresponding first target trajectory identifier can be found in the R-Tree index structure using wx4eek-08 and wx4eek-07. If the second execution time is 8:15, and the minute count 15 is greater than 10, then the third execution time is determined to be 9:00. The corresponding first target trajectory identifier can be found in the R-Tree index structure using wx4eek-08 and wx4eek-09.

[0120] In another optional implementation, the first target trajectory identifier is deduplicated;

[0121] S412. Based on the second range binary code value, the second execution time, and the third execution time, search the tree index structure for the second target trajectory identifier corresponding to the second range binary code value;

[0122] In another optional implementation, the second target trajectory identifier is deduplicated;

[0123] S413. Determine the target trajectory identifier based on the first target trajectory identifier and the second target trajectory identifier;

[0124] Specifically, the intersection of the first target trajectory identifier and the second target trajectory identifier is determined as the target trajectory identifier, that is, only the first route trajectory data through which both the start and end points of the second route trajectory data are considered as the target first route trajectory data;

[0125] In another optional implementation, if the target trajectory identifier is empty, the preset range is expanded, and the execution step S31 is returned based on the expanded preset range;

[0126] For example, after expanding the preset range to 2km, return to step S31;

[0127] S42. Obtain the corresponding target first route trajectory data based on the target trajectory identifier;

[0128] This invention uses GeoHash encoding to create a grid of latitude and longitude maps and constructs an R-Tree index structure. The main route trajectory data (i.e., the first route trajectory data) is then converted into corresponding GeoHash values ​​using GeoHash encoding. Based on these GeoHash values, the trajectory identifier of the main route trajectory data is inserted into the set pointed to by the corresponding leaf node in the R-Tree index structure. When passenger route trajectory data (i.e., the second route trajectory data) is received, it is similarly converted into corresponding GeoHash values ​​using GeoHash encoding. The R-Tree index structure is then searched for GeoHash values ​​within a specified range. If a corresponding trajectory identifier is found, the main route trajectory data corresponding to that identifier is considered to be on the same route as the passenger route trajectory data. This method improves the efficiency of route trajectory queries.

[0129] Example 2

[0130] Please refer to Figure 2 This embodiment of a route trajectory query terminal includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of the route trajectory query method in Embodiment 1.

[0131] In summary, the present invention provides a route trajectory query method and terminal, which calculates a first binary code value corresponding to a latitude and longitude map according to a preset code length range, wherein the preset code length range includes a first preset code length; generates parent nodes and child nodes based on the first binary code value according to the preset code length range; determines a target first binary code value of the first preset code length, and splits the target first binary code value according to a preset time granularity to obtain a split target first binary code value; generates leaf nodes based on the split target first binary code value; obtains a tree index structure based on the parent nodes, the child nodes, and the leaf nodes; and receives... The second route trajectory data is then binary encoded to obtain a third binary encoding value corresponding to the second route trajectory data. Based on the third binary encoding value, the target route trajectory data corresponding to the second route trajectory data is searched from the tree index structure. When constructing the tree index structure, the target first binary encoding value is split according to a preset time granularity, which can narrow the matching range when matching route trajectories. Instead of querying by comparing GeoHash values ​​as in the existing technology, the matching route trajectory is found by searching the tree index structure, which can quickly retrieve relevant route trajectories, reduce calculation time, and thus improve the efficiency of route trajectory query.

[0132] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A line track query method, characterized by, The method comprises the steps of: calculating a first binary encoding value corresponding to a latitude and longitude map according to a preset encoding length range, wherein the preset encoding length range comprises a first preset encoding length; generating a parent node and a child node based on the first binary encoding value according to the preset encoding length range; determining a target first binary encoding value of the first preset encoding length, and splitting the target first binary encoding value according to a preset time granularity to obtain a split target first binary encoding value; generating a leaf node according to the split target first binary encoding value; obtaining a tree index structure according to the parent node, the child node, and the leaf node; receiving first line trajectory data and generating a trajectory identifier corresponding to the first line trajectory data; binary encoding the first line trajectory data to obtain a second binary encoding value corresponding to the first line trajectory data, and generating a key value corresponding to the trajectory identifier based on the second binary encoding value; storing the trajectory identifier into the tree index structure based on the key value; receiving second line trajectory data; binary encoding the second line trajectory data to obtain a third binary encoding value corresponding to the second line trajectory data; finding target line trajectory data corresponding to the second line trajectory data from the tree index structure based on the third binary encoding value.

2. The method of claim 1, wherein, The binary encoding of the first line trajectory data to obtain the second binary encoding value corresponding to the first line trajectory data comprises: binary encoding each latitude and longitude point in the first line trajectory data according to the first preset encoding length to obtain an initial second binary encoding value; de-duplicating the initial second binary encoding value to obtain the second binary encoding value corresponding to the first line trajectory data.

3. The method of claim 1, wherein, The first line trajectory data comprises a first execution time corresponding to the first line trajectory data; The generation of the key value corresponding to the trajectory identifier based on the second binary encoding value comprises: generating the key value corresponding to the trajectory identifier according to the first execution time and the second binary encoding value.

4. The method of claim 1, wherein, The storage of the trajectory identifier into the tree index structure based on the key value comprises: determining a target leaf node from the tree index structure according to the key value; storing the trajectory identifier into a set pointed to by the target leaf node.

5. The method of claim 1, wherein, The finding of the target line trajectory data corresponding to the second line trajectory data from the tree index structure based on the third binary encoding value comprises: finding a target trajectory identifier corresponding to the third binary encoding value from the tree index structure based on the third binary encoding value; obtaining corresponding target first line trajectory data according to the target trajectory identifier.

6. The method of claim 5, wherein, The second line trajectory data comprises a starting point latitude and longitude and an ending point latitude and longitude; The binary encoding of the second line trajectory data to obtain the third binary encoding value corresponding to the second line trajectory data comprises: determining a first range of longitude and latitude within a preset range of the starting point longitude and latitude and a second range of longitude and latitude within a preset range of the ending point longitude and latitude; performing binary coding on the first range of longitude and latitude and the second range of longitude and latitude respectively to obtain a first range binary coding value corresponding to the first range of longitude and latitude and a second range binary coding value corresponding to the second range of longitude and latitude.

7. The method of claim 6, wherein, The second line trajectory data further comprises a second execution time; The searching of the target trajectory identifier corresponding to the third binary coding value from the tree index structure based on the third binary coding value comprises: determining a third execution time according to the second execution time if the second execution time is less than or equal to a preset time range, searching a first target trajectory identifier corresponding to the first range binary coding value from the tree index structure according to the first range binary coding value, the second execution time and the third execution time; searching a second target trajectory identifier corresponding to the second range binary coding value from the tree index structure according to the second range binary coding value, the second execution time and the third execution time; determining a target trajectory identifier according to the first target trajectory identifier and the second target trajectory identifier.

8. A line track inquiry terminal comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to realize each step in the line trajectory query method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data processing method and equipment

    CN114357313A