IP Library Granted Patent US 12,511,333
Granted Patent B2
US 12,511,333 · App. 18/685,182 · Granted Dec 30, 2025

Trajectory query method and apparatus

Inventors: Fang Wang (Hangzhou, CN); Jiong Xie (Beijing, CN); Ailin Zhang (Hangzhou, CN)
Assignee: HANGZHOU ALICLOUD FEITIAN INFORMATION TECHNOLOGY CO., LTD.
G06F16/909G06F16/908
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,511,333
App. No.
18/685,182
Granted
Dec 30, 2025
Kind
B2
Abstract

Provided in the present application are a trajectory query method and apparatus. The trajectory query method comprises: acquiring a trajectory query request, which comprises query information of a plurality of types; according to query information of a service type in the query information of the plurality of types, determining a query range of metadata used as a digest of a trajectory, then determining a plurality of pieces of candidate metadata that are within the query range, and determining, from the plurality of pieces of candidate metadata, target metadata that matches the query information of the plurality of types; and acquiring a target trajectory according to the target metadata. By means of the present application, the trajectory query speed can be increased.

Claims (96)

1 . A trajectory query method, implemented by one or more computing devices, comprising:

acquiring a trajectory query request, wherein the trajectory query request comprises query information of a plurality of types, and the query information of the plurality of types comprises query information of a service type, wherein different trajectories correspond to query information of different service types;

determining a query range of metadata according to the query information of the service type, wherein the metadata is configured for describing a trajectory and is a digest of the trajectory, the trajectory is a collection of points generated by movement of a moving object;

determining a plurality of pieces of candidate metadata that are within the query range, and determining, from the plurality of pieces of candidate metadata, target metadata that matches the query information of the plurality of types; and

acquiring a target trajectory according to the target metadata.

2 . The method according to claim 1 , wherein the metadata comprises an object identifier of a moving object to which the trajectory belongs and/or spatiotemporal information of the trajectory; and the query information of the plurality of types comprises a reference object identifier and/or a reference spatiotemporal range; and

the determining, from the plurality of pieces of candidate metadata, the target metadata that matches the query information of the plurality of types comprises:

determining, from the plurality of pieces of candidate metadata, candidate metadata with an object identifier identical to the reference object identifier as the target metadata; and/or,

determining, from the plurality of pieces of candidate metadata, candidate metadata with spatiotemporal information intersecting with the reference spatiotemporal range as the target metadata.

3 . The method according to claim 2 , wherein the spatiotemporal information comprises a bounding rectangle of the trajectory, and the reference spatiotemporal range comprises a reference spatial position range; and

the determining, from the plurality of pieces of candidate metadata, the target metadata that matches the query information of the plurality of types comprises:

determining a spatial position range of an area formed by a bounding rectangle of each trajectory;

respectively determining whether the spatial position range of the area formed by the bounding rectangle of each trajectory intersects with the reference spatial position range; and

if the spatial position range of the area formed by the bounding rectangle of a certain trajectory is determined to be intersected with the reference spatial position range, determining that candidate metadata to which the bounding rectangle of the certain trajectory belongs is the target metadata.

4 . The method according to claim 3 , wherein the spatiotemporal information further comprises bounding rectangles of respective sub-trajectories, and the respective sub-trajectories are a plurality of trajectory segments obtained by segmenting the trajectory; and

the determining that the candidate metadata to which the bounding rectangle of the certain trajectory belongs is the target metadata comprises:

respectively determining spatial position ranges of areas formed by bounding rectangles of respective sub-trajectories corresponding to the certain trajectory;

determining whether the spatial position range of the area formed by the bounding rectangle of at least one sub-trajectory intersects with the reference spatial position range; and

if the spatial position range of the area formed by the bounding rectangle of the at least one sub-trajectory is determined to be intersected with the reference spatial position range, determining that candidate metadata to which the bounding rectangle of the at least one sub-trajectory belongs is the target metadata.

5 . The method according to claim 2 , wherein the metadata comprises temporal information and spatial position information of the trajectory; the reference spatiotemporal range comprises a reference spatial position range and a reference temporal range; and

the determining, from the plurality of pieces of candidate metadata, the candidate metadata with the spatiotemporal information intersecting with the reference spatiotemporal range as the target metadata comprises:

according to temporal information of a trajectory in each piece of candidate metadata, respectively determining a temporal range corresponding to each piece of candidate metadata;

respectively determining whether the temporal range corresponding to each piece of candidate metadata intersects with the reference temporal range, and if the temporal range corresponding to a certain candidate metadata is determined to be intersected with the reference temporal range, determining a spatial position range corresponding to the certain candidate metadata according to the spatial position information of the trajectory in the certain candidate metadata; and

determining whether the spatial position range corresponding to the certain candidate metadata intersects with the reference spatial position range, and if the spatial position range corresponding to the certain candidate metadata is determined to be intersected with the reference spatial position range, determining that the certain candidate metadata is the target metadata.

6 . The method according to claim 2 , wherein the metadata comprises temporal information of the trajectory; and the reference spatiotemporal range comprises a reference temporal range; and

the determining, from the plurality of pieces of candidate metadata, the candidate metadata with the spatiotemporal information intersecting with the reference spatiotemporal range as the target metadata comprises:

according to temporal information of a trajectory in each piece of candidate metadata, respectively determining a temporal range corresponding to each piece of candidate metadata; and

respectively determining whether the temporal range corresponding to each piece of candidate metadata intersects with the reference temporal range, and if the temporal range corresponding to a certain candidate metadata is determined to be intersected with the reference temporal range, determining that the certain candidate metadata is the target metadata.

7 . The method according to claim 1 , wherein the acquiring the target trajectory according to the target metadata comprises:

determining a query type corresponding to the query information of the plurality of types;

according to the query type, searching, from a corresponding relationship established in advance between query types and acquisition manners, a target acquisition manner corresponding to the determined query type; and

acquiring, according to the target metadata, the target trajectory by utilizing the target acquisition manner.

8 . The method according to claim 7 , wherein the metadata comprises an object identifier of a moving object to which the trajectory belongs and temporal information of the trajectory;

the determining the query type corresponding to the query information of the plurality of types comprises:

determining that the query type is a direct acquisition type if the query information of the plurality of types comprises a reference temporal range and a reference object identifier; and

the acquiring, according to the target metadata, the target trajectory by utilizing the target acquisition manner comprises:

processing the target metadata by utilizing an identifier generation manner set in advance, to obtain a target metadata identifier; and

according to the target metadata identifier, searching, from a corresponding relationship established in advance between metadata identifiers and trajectories, the target trajectory corresponding to the target metadata identifier.

9 . The method according to claim 7 , wherein the metadata comprises spatial position information of the trajectory;

the determining the query type corresponding to the query information of the plurality of types comprises:

determining that the query type is a filtering acquisition type if the query information of the plurality of types comprises a reference spatial position range; and

the acquiring, according to the target metadata, the target trajectory by utilizing the target acquisition manner comprises:

processing the target metadata by utilizing an identifier generation manner set in advance, to obtain a target metadata identifier;

according to the target metadata identifier, searching, from a corresponding relationship established in advance between metadata identifiers and trajectories, candidate trajectories corresponding to the target metadata identifier; and

determining, from a plurality of searched candidate trajectories, the target trajectory whose position relationship with the reference spatial position range reaches a specified position relationship.

10 . The method according to claim 1 , prior to the acquiring the trajectory query request, further comprising:

for each trajectory having been stored, generating metadata used for describing the trajectory;

serializing each piece of metadata respectively, and inserting serialized metadata into a corresponding trajectory, to obtain a processed trajectory;

processing each piece of metadata respectively according to a preset identifier generation manner, to obtain a metadata identifier of the metadata; and

establishing a corresponding relationship between the processed trajectories and the metadata identifiers.

11 . A computing device, comprising:

a memory and a processor,

wherein the memory is used for storing computer-executable instructions, and the processor is used for executing the computer-executable instructions to perform operations of:

acquiring a trajectory query request, wherein the trajectory query request comprises query information of a plurality of types, and the query information of the plurality of types comprises query information of a service type, wherein different trajectories correspond to query information of different service types;

determining a query range of metadata according to the query information of the service type, wherein the metadata is configured for describing a trajectory and is a digest of the trajectory, the trajectory is a collection of points generated by movement of a moving object;

determining a plurality of pieces of candidate metadata that are within the query range, and determining, from the plurality of pieces of candidate metadata, target metadata that matches the query information of the plurality of types; and

acquiring a target trajectory according to the target metadata.

12 . A non-transitory computer-readable storage medium, which stores computer-executable instructions, wherein the computer-executable instructions, when executed by a processor, implement the steps of the trajectory query method of claim 1 .

13 . The computing device according to claim 11 , wherein the metadata comprises an object identifier of a moving object to which the trajectory belongs and/or spatiotemporal information of the trajectory; and the query information of the plurality of types comprises a reference object identifier and/or a reference spatiotemporal range; and

wherein the processor is used for executing the computer-executable instructions to perform further operations of:

determining, from the plurality of pieces of candidate metadata, candidate metadata with an object identifier identical to the reference object identifier as the target metadata; and/or,

determining, from the plurality of pieces of candidate metadata, candidate metadata with spatiotemporal information intersecting with the reference spatiotemporal range as the target metadata.

14 . The computing device according to claim 13 , wherein the spatiotemporal information comprises a bounding rectangle of the trajectory, and the reference spatiotemporal range comprises a reference spatial position range; and

wherein the processor is used for executing the computer-executable instructions to perform further operations of:

determining a spatial position range of an area formed by a bounding rectangle of each trajectory;

respectively determining whether the spatial position range of the area formed by the bounding rectangle of each trajectory intersects with the reference spatial position range; and

if the spatial position range of the area formed by the bounding rectangle of a certain trajectory is determined to be intersected with the reference spatial position range, determining that candidate metadata to which the bounding rectangle of the certain trajectory belongs is the target metadata.

15 . The computing device according to claim 14 , wherein the spatiotemporal information further comprises bounding rectangles of respective sub-trajectories, and the respective sub-trajectories are a plurality of trajectory segments obtained by segmenting the trajectory; and

wherein the processor is used for executing the computer-executable instructions to perform further operations of:

respectively determining spatial position ranges of areas formed by bounding rectangles of respective sub-trajectories corresponding to the certain trajectory;

determining whether the spatial position range of the area formed by the bounding rectangle of at least one sub-trajectory intersects with the reference spatial position range; and

if the spatial position range of the area formed by the bounding rectangle of the at least one sub-trajectory is determined to be intersected with the reference spatial position range, determining that candidate metadata to which the bounding rectangle of the at least one sub-trajectory belongs is the target metadata.

16 . The computing device according to claim 13 , wherein the metadata comprises temporal information and spatial position information of the trajectory; the reference spatiotemporal range comprises a reference spatial position range and a reference temporal range; and

wherein the processor is used for executing the computer-executable instructions to perform further operations of:

according to temporal information of a trajectory in each piece of candidate metadata, respectively determining a temporal range corresponding to each piece of candidate metadata;

respectively determining whether the temporal range corresponding to each piece of candidate metadata intersects with the reference temporal range, and if the temporal range corresponding to a certain candidate metadata is determined to be intersected with the reference temporal range, determining a spatial position range corresponding to the certain candidate metadata according to the spatial position information of the trajectory in the certain candidate metadata; and

determining whether the spatial position range corresponding to the certain candidate metadata intersects with the reference spatial position range, and if the spatial position range corresponding to the certain candidate metadata is determined to be intersected with the reference spatial position range, determining that the certain candidate metadata is the target metadata.

17 . The computing device according to claim 13 , wherein the metadata comprises temporal information of the trajectory; and the reference spatiotemporal range comprises a reference temporal range; and

wherein the processor is used for executing the computer-executable instructions to perform further operations of:

according to temporal information of a trajectory in each piece of candidate metadata, respectively determining a temporal range corresponding to each piece of candidate metadata; and

respectively determining whether the temporal range corresponding to each piece of candidate metadata intersects with the reference temporal range, and if the temporal range corresponding to a certain candidate metadata is determined to be intersected with the reference temporal range, determining that the certain candidate metadata is the target metadata.

18 . The computing device according to claim 11 , wherein the processor is used for executing the computer-executable instructions to perform further operations of:

determining a query type corresponding to the query information of the plurality of types;

according to the query type, searching, from a corresponding relationship established in advance between query types and acquisition manners, a target acquisition manner corresponding to the determined query type; and

acquiring, according to the target metadata, the target trajectory by utilizing the target acquisition manner.

19 . The computing device according to claim 18 , wherein the metadata comprises an object identifier of a moving object to which the trajectory belongs and temporal information of the trajectory; and

wherein the processor is used for executing the computer-executable instructions to perform further operations of:

determining that the query type is a direct acquisition type if the query information of the plurality of types comprises a reference temporal range and a reference object identifier; and

processing the target metadata by utilizing an identifier generation manner set in advance, to obtain a target metadata identifier; and

according to the target metadata identifier, searching, from a corresponding relationship established in advance between metadata identifiers and trajectories, the target trajectory corresponding to the target metadata identifier.

20 . The computing device according to claim 18 , wherein the metadata comprises spatial position information of the trajectory; and

wherein the processor is used for executing the computer-executable instructions to perform further operations of:

determining that the query type is a filtering acquisition type if the query information of the plurality of types comprises a reference spatial position range; and

processing the target metadata by utilizing an identifier generation manner set in advance, to obtain a target metadata identifier;

according to the target metadata identifier, searching, from a corresponding relationship established in advance between metadata identifiers and trajectories, candidate trajectories corresponding to the target metadata identifier; and

determining, from a plurality of searched candidate trajectories, the target trajectory whose position relationship with the reference spatial position range reaches a specified position relationship.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 30, 2026
From: HANGZHOU ALICLOUD FEITIAN INFORMATION TECHNOLOGY CO., LTD.
To: CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PRIVATE LIMITED
Reel/Frame 075366/0376 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 21, 2024
From: WANG, FANG; XIE, JIONG; ZHANG, AILIN
To: HANGZHOU ALICLOUD FEITIAN INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 067473/0899 →
Priority Claims (1)
CN 202111285663.9 · Nov 2, 2021 · national
Continuity (1)
Related Publication 20250139171A1 · May 1, 2025
References Cited (9)
US 20170124115A1 · Duan · 2017 [cited by examiner]
CN 103106280 · 2013 [cited by applicant]
CN 110837606 · 2020 [cited by applicant]
CN 112836001 · 2021 [cited by applicant]
CN 113312361 · 2021 [cited by applicant]
CN 113742548 · 2021 [cited by applicant]
KR 20180109378 · 2018 [cited by applicant]
X. Guan et al., ST-Hash: An efficient spatiotemporal index for massive trajectory data in a NoSQL database, 2017 25th International Conference on Geoinformatics, 2017 [retrieved Apr. 18, 2025]. Retrieved from the Intern… [cited by examiner]
English Translation of International Search Report for International PCT Patent Application No. PCT/CN2022/127513 mailed Jul. 12, 2022 (3 pages). [cited by applicant]