WO2023005771A1 - 轨迹查询方法、设备、存储介质及计算机程序产品 - Google Patents

轨迹查询方法、设备、存储介质及计算机程序产品 Download PDF

Info

Publication number
WO2023005771A1
WO2023005771A1 PCT/CN2022/106840 CN2022106840W WO2023005771A1 WO 2023005771 A1 WO2023005771 A1 WO 2023005771A1 CN 2022106840 W CN2022106840 W CN 2022106840W WO 2023005771 A1 WO2023005771 A1 WO 2023005771A1
Authority
WO
WIPO (PCT)
Prior art keywords
track
sub
query
processed
trajectory
Prior art date
Application number
PCT/CN2022/106840
Other languages
English (en)
French (fr)
Inventor
刘音沛
李飞飞
Original Assignee
阿里云计算有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里云计算有限公司 filed Critical 阿里云计算有限公司
Publication of WO2023005771A1 publication Critical patent/WO2023005771A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing

Definitions

  • the present application relates to the field of Internet data processing, and in particular to a trajectory query method, device, equipment, storage medium and computer program product.
  • the trajectory of a moving object has a relatively complex structure, so there will be a large computational overhead when performing trajectory query operations. For example, for the common trajectory intersection query, it is necessary to judge whether each line segment on the trajectory intersects with each line segment on the query one by one. At this time, the computational overhead of the data is large, which is not conducive to improving the quality and efficiency of the trajectory query.
  • the embodiment of the present application provides a trajectory query method, device, equipment, storage medium and computer program product.
  • a trajectory query method By performing multi-level division operation on the trajectory to be queried, at least one set of sub-trajectories is obtained, and then the trajectory query is performed based on the set of sub-trajectories and index information operation, which can filter out most of the data, reduce the number of trajectories for accurate judgment, and also reduce the calculation overhead of data, and improve the quality and efficiency of data query.
  • the embodiment of the present application provides a trajectory query method, including:
  • a track query operation is performed based on the track to be processed, at least one set of sub-tracks and the index information, and a query result corresponding to the track to be processed is obtained.
  • a trajectory query device including:
  • a first acquiring module configured to acquire a track to be processed and index information for analyzing and processing the track to be processed
  • the first dividing module is configured to divide the track to be processed, and obtain at least one sub-track set corresponding to the track to be processed, wherein the set of sub-tracks includes a plurality of sub-trajectories, and any two sub-tracks
  • the division parameters corresponding to the trajectory sets are different;
  • the first processing module is configured to perform a track query operation based on the track to be processed, at least one sub-track set and the index information, and obtain a query result corresponding to the track to be processed.
  • an embodiment of the present application provides an electronic device, including: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are stored by the The processor implements the trajectory query method shown in the first aspect above during execution.
  • an embodiment of the present invention provides a computer storage medium for storing a computer program, and the computer program enables a computer to implement the trajectory query method described in the first aspect above when executed.
  • an embodiment of the present invention provides a computer program product, including: a computer-readable storage medium storing computer instructions, when the computer instructions are executed by one or more processors, causing the one or more A processor executes the steps in the trajectory query method shown in the first aspect above.
  • an embodiment of the present invention provides a trajectory query method, including:
  • processing resources to perform the following steps: acquiring the track to be processed and index information for analyzing and processing the track to be processed; performing a division operation on the track to be processed to obtain at least the track corresponding to the process to be processed A set of sub-trajectories, wherein the set of sub-trajectories includes a plurality of sub-trajectories, and the division parameters corresponding to any two sets of sub-trajectories are different; performing trajectory based on the track to be processed, at least one set of sub-trajectories and the index information
  • the query operation is to obtain the query result corresponding to the track to be processed.
  • an embodiment of the present invention provides a trajectory query device, including:
  • the second determining module is configured to determine the processing resource corresponding to the track query service in response to the call track query request;
  • the second processing module is configured to use the processing resource to perform the following steps: acquire the track to be processed and index information for analyzing and processing the track to be processed; divide the track to be processed, and obtain the track that is related to the track to be processed. At least one set of sub-trajectories corresponding to the track to be processed, wherein the set of sub-trajectories includes a plurality of sub-trajectories, and the division parameters corresponding to any two sets of sub-trajectories are different; based on the track to be processed, at least one set of sub-trajectories A track query operation is performed with the index information to obtain a query result corresponding to the track to be processed.
  • the embodiment of the present application provides an electronic device, including: a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are stored by the
  • the processor implements the track query method shown in the sixth aspect above during execution.
  • an embodiment of the present invention provides a computer storage medium for storing a computer program, and the computer program enables a computer to implement the trajectory query method described in the sixth aspect above when executed.
  • an embodiment of the present invention provides a computer program product, including: a computer-readable storage medium storing computer instructions, when the computer instructions are executed by one or more processors, causing the one or more A processor executes the steps in the trajectory query method shown in the sixth aspect above.
  • At least one sub-track set of different division levels is obtained by performing a multi-level division operation on the track to be processed that requires a track query operation, and then based on at least one sub-track set, the track to be processed and the index
  • the track query operation is performed on the information to obtain the query results, which realizes the multi-layer refinement of the track to be processed, and then can filter out most of the index data based on at least one sub-track set of multi-layer refinement, reducing the need for accurate judgment
  • the number of trajectories will also reduce the data calculation overhead, improve the quality and efficiency of data query, and thus ensure the practicability of the method.
  • FIG. 1 is a schematic diagram of a scenario of a trajectory query method provided in an embodiment of the present application
  • FIG. 2 is a schematic flow diagram of a trajectory query method provided in an embodiment of the present application
  • FIG. 3 is a schematic flow diagram of dividing the track to be processed to obtain at least one set of sub-tracks corresponding to the track to be processed according to an embodiment of the present application;
  • FIG. 4 is a schematic flow diagram of performing a track query operation based on the track to be processed, at least one set of sub-tracks and the index information to obtain a query result corresponding to the track to be processed according to an embodiment of the present application;
  • FIG. 5 is a schematic flow diagram of performing a trajectory query operation based on the target sub-trajectory set and the intermediate node to obtain a query result corresponding to the trajectory to be processed provided by the embodiment of the present application;
  • FIG. 6 is a schematic flow diagram of a trajectory query method provided in an application embodiment of the present application.
  • FIG. 7 is a schematic flow diagram of another trajectory query method provided in the embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a trajectory query device provided in an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of electronic equipment corresponding to the track query device shown in FIG. 8;
  • FIG. 10 is a schematic structural diagram of another trajectory query device provided in the embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of an electronic device corresponding to the track query device shown in FIG. 10 .
  • the words “if”, “if” as used herein may be interpreted as “at” or “when” or “in response to determining” or “in response to detecting”.
  • the phrases “if determined” or “if detected (the stated condition or event)” could be interpreted as “when determined” or “in response to the determination” or “when detected (the stated condition or event) )” or “in response to detection of (a stated condition or event)”.
  • the trajectory of a moving object has a relatively complex structure, so there will be a large computational overhead when performing trajectory query operations.
  • the common track intersection query it is necessary to judge whether each line segment on the track intersects with each line segment on the query one by one.
  • the spatial relationship of the query trajectory is judged according to the index trajectory outsourcing frame.
  • the outsourcing frame judgment uses the trajectory outsourcing frame and the data outsourcing frame in the index information to compare to determine whether they intersect;
  • the precise trajectory judgment uses the precise trajectory points of the query trajectory and the precise trajectory points of the data in the index information to judge whether they intersect.
  • the calculation operation of the outer frame of the query track is performed to obtain the outer frame of the track, and then the track outer frame is compared with the index outer frame in the index information. If the track outer frame frame intersects with the index frame in the index information, then read out the precise data included in the index frame, read out the original track in the track frame, and then read the original track and the exact data contained in the index frame Data for intersection judgment.
  • the present embodiment provides a track query method, device and equipment, the execution subject of the method can be a track query device, and the track query device can be connected to a client by communication, as shown in accompanying drawing 1:
  • the client may be any computing device with a certain data transmission capability.
  • the basic structure of the client may include: at least one processor. The number of processors depends on the configuration and type of client.
  • the client may also include a memory, which may be volatile, such as RAM, or non-volatile, such as read-only memory (Read-Only Memory, ROM for short), flash memory, etc., or may also include two types.
  • An operating system Operating System, OS for short
  • one or more application programs, and program data may also be stored in the memory.
  • the client also includes some basic configurations, such as network card chip, IO bus, display components, and some peripheral devices.
  • peripheral devices may include, for example, a keyboard, mouse, stylus, printer, and the like.
  • Other peripheral devices are well known in the art and will not be described here.
  • the client may be a PC (personal computer) terminal, a handheld terminal (for example: a smart phone, a tablet computer) and the like.
  • a trajectory query device refers to a device that can provide trajectory query services in a network virtual environment, and usually refers to a device that uses the network for information planning and trajectory query operations.
  • the trajectory query device can be any device that can provide computing services, respond to service requests, and perform processing, for example: cluster servers, regular servers, cloud servers, cloud hosts, virtual centers, etc.
  • the composition of the trajectory query device mainly includes a processor, a hard disk, a memory, a system bus, etc., and is similar to a general-purpose computer architecture.
  • the client terminal may establish a network connection with the track query device, and the network connection may be a wireless or wired network connection.
  • the network standard of the mobile network can be 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+( Any one of LTE+), WiMax, 5G, etc.
  • the client may generate or obtain the track to be processed, where the number of tracks to be processed may be one or more.
  • this embodiment does not limit the specific implementation method for the client to generate or obtain the track to be processed.
  • the client is provided with an interactive interface, and the execution operation input by the user is obtained through the interactive interface, and the execution operation is generated to generate the track to be processed. track; or, a specific interface can be set on the client, and the track to be processed can be obtained through the specific interface.
  • the track to be processed can be uploaded to the track query device, so that the track query device can perform data analysis and processing on the uploaded track to be processed.
  • the track query device is used to receive the track to be processed uploaded by the client, and then the track query device can analyze and process the track to be processed. Specifically, it can determine the index information used for analyzing and processing the track to be processed.
  • the track to be processed can be divided to obtain at least one sub-track set corresponding to the track to be processed, wherein the set of sub-trajectories includes multiple sub-trajectories, the length of the sub-trajectories can be the same or different, and any two sets of sub-trajectories
  • the division parameters corresponding to each are different; after at least one sub-track set is obtained, a track query operation can be performed on the track to be processed, at least one sub-track set and index information, so that the query result corresponding to the track to be processed can be obtained.
  • the technical solution provided by this embodiment obtains at least one set of sub-trajectories at different division levels by performing multi-level division operations on the tracks to be processed that require track query operations, and then based on at least one set of sub-trajectories, tracks to be processed and index information Perform trajectory query operations to obtain query results, thus realizing multi-layer refinement of the trajectory to be processed, and then filtering out most of the index data based on at least one sub-trajectory set of multi-layer refinement, reducing the trajectory for accurate judgment At the same time, it will also reduce the data calculation overhead, improve the quality and efficiency of data query, and thus ensure the practicability of the method.
  • trajectory query method, device, and equipment provided by various embodiments of the present application are specifically described below through an exemplary application scenario.
  • Fig. 2 is a schematic flow diagram of a trajectory query method provided by the embodiment of the present application; referring to the accompanying drawing 2, the present embodiment provides a trajectory query method, the execution subject of the method may be a trajectory query device, it can be understood Yes, the track query device can be implemented as software, or a combination of software and hardware.
  • the trajectory query method may include:
  • Step S201 Obtain the track to be processed and index information for analyzing and processing the track to be processed.
  • Step S202 Perform a division operation on the track to be processed to obtain at least one set of sub-trajectories corresponding to the track to be processed, wherein the set of sub-trajectories includes multiple sub-trajectories, and any two sets of sub-trajectories correspond to different division parameters.
  • Step S203 Perform a track query operation based on the track to be processed, at least one sub-track set and index information, and obtain a query result corresponding to the track to be processed.
  • Step S201 Obtain the track to be processed and index information for analyzing and processing the track to be processed.
  • the track to be processed can be obtained, and the number of tracks to be processed can be one or more.
  • the track to be processed and the index used for analysis and processing of the track to be processed can be obtained information.
  • this embodiment does not limit the specific implementation of obtaining the track to be processed and index information, and those skilled in the art can set it according to specific application scenarios or application requirements, for example: the track to be processed can be generated by the track query device Yes, at this time, an interactive interface is provided on the track query device, and the execution operation input by the user on the interactive interface is acquired, and the track to be processed can be generated through the execution operation; or, the track to be processed can be sent to the track query device by a third device, At this time, the track to be processed can be stored in the third device, and the third device is connected to the track query device through communication, so that the track query device can obtain the track to be searched through the third device.
  • the index information can be stored in a preset area, and the index information can be obtained by visiting the preset area; or, the index information is stored in a third device, and the third device communicates with the trajectory query device, so that through the first Three devices obtain index information.
  • Step S202 Perform a division operation on the track to be processed to obtain at least one set of sub-trajectories corresponding to the track to be processed, wherein the set of sub-trajectories includes multiple sub-trajectories, and any two sets of sub-trajectories correspond to different division parameters.
  • the trajectory to be processed can be divided. Specifically, at least one division parameter for analyzing and processing the trajectory to be processed can be obtained first, and then based on at least A division parameter performs a division operation on the track to be processed, so that at least one sub-track set corresponding to the track to be processed can be obtained.
  • the obtained sub-trajectory set may include multiple sub-trajectories, different sub-trajectory sets may include different numbers of sub-trajectories, the lengths of the sub-trajectories in the same sub-trajectory set may be the same or different, and any two sub-trajectories
  • the division parameters corresponding to each set are different.
  • a track to be processed can be divided into two sub-trajectories.
  • the division parameter is 2, so that two sub-trajectories can be obtained, and the above two sub-trajectories can form a set of sub-trajectories.
  • a track to be processed can be divided into four sub-trajectories.
  • the division parameter is 4
  • four sub-trajectories can be obtained, and the above four sub-trajectories can constitute a set of sub-trajectories.
  • a track to be processed can be divided into eight sub-trajectories.
  • the division parameter is 8
  • eight sub-trajectories can be obtained, and the above-mentioned eight sub-trajectories can constitute a set of sub-trajectories.
  • the division parameter is 16, 32 or 64
  • different levels of division operations can be performed on the track to be processed, so that a set of sub-trajectories with different division granularity can be obtained, and at least Accurate reliability of acquisition for a collection of sub-trajectories.
  • Step S203 Perform a track query operation based on the track to be processed, at least one sub-track set and index information, and obtain a query result corresponding to the track to be processed.
  • a track query operation can be performed based on the track to be processed, at least one set of sub-tracks and the index information, so as to obtain a query result corresponding to the track to be processed.
  • the trajectory query operation may include at least one of the following: intersection query operation, inclusion query operation, previous query operation, and subsequent query operation. It can be understood that different trajectory query operations can correspond to different query results. For example, when the trajectory query operation is an intersection query operation, it can specifically query buildings or geographic locations that pass through a certain trajectory, and the obtained query results The result is the trajectory intersection query result.
  • the obtained query result is a trajectory inclusion query result.
  • the obtained query result is the track previous query result; when the track query operation is the subsequent query operation, the obtained query result is the track subsequent query result.
  • the trajectory query method obtained in this embodiment obtains at least one set of sub-trajectories at different division levels by dividing the track to be processed that requires a query operation, and then performs trajectory based on at least one set of sub-trajectories, the track to be processed, and index information.
  • Query operation to obtain query results, which realizes the multi-layer refinement of the track to be processed, and then can filter out most of the index data based on at least one sub-track set after multi-layer refinement, reducing the number of track bars for accurate judgment At the same time, it will also reduce the calculation cost of data, improve the quality and efficiency of data query, and then ensure the practicability of the method.
  • Fig. 3 is a schematic flow diagram of dividing the track to be processed and obtaining at least one sub-track set corresponding to the track to be processed provided by the embodiment of the present application;
  • the example provides an implementation method of obtaining at least one sub-track set corresponding to the track to be processed.
  • the track to be processed is divided into operations to obtain at least one set of sub-tracks corresponding to the track to be processed Can include:
  • Step S301 Obtain the query outsourcing box corresponding to the track to be processed.
  • Step S302 Determine at least one division parameter for performing division operation on the query enclosing frame.
  • Step S303 Use at least one segmentation parameter to segment the query outer box until the number of sub-trajectories obtained after segmentation is greater than the number of line segments in the sub-trajectories, and at least one sub-trajectory set corresponding to the track to be processed is obtained.
  • the track to be processed can be analyzed and processed to obtain the query outsourcing box corresponding to the track to be processed.
  • the track attributes corresponding to the track to be processed can be obtained first, and the track attributes can include: track length, track duration and track moving speed, and then The query enclosing box corresponding to the track to be processed can be determined based on the track midpoint, track duration, and track moving speed in the track attributes.
  • At least one division parameter for dividing the query outsourcing box can be determined, wherein the division parameter can be stored in a preset area, and at least one preset can be obtained by accessing the preset area Parameters, in some examples, at least one division parameter may include: 2, 4, 8, 16, 32, 64, etc., for example, when the division parameter is 2, when the query outsourcing frame is divided based on the above division parameters, A set of sub-trajectories can be obtained; when the division parameter is 4, another set of sub-trajectories can be obtained when the query outsourcing frame is divided based on the above-mentioned division parameters.
  • the number of division parameters used to divide the query enclosing frame is more.
  • At least one segmentation parameter can be used to perform a segmentation operation on the query outsourcing box.
  • the segmentation operation can be an average segmentation operation or an uneven segmentation operation.
  • the splitting operation can be stopped, so that at least one set of sub-trajectories corresponding to the track to be processed can be obtained. It can be understood that a set of sub-trajectories includes multiple sub-trajectories generated by one splitting operation, and different sub-trajectories Sets can correspond to different partition parameters.
  • At least one division parameter used to divide the query outsourcing frame is determined, and then the query outsourcing frame is segmented using at least one division parameter until The number of sub-trajectories obtained after segmentation is greater than the number of line segments in the sub-trajectories, and at least one sub-trajectory set corresponding to the track to be processed is obtained, which realizes the multi-layer refinement operation of the track to be processed, and then can be based on at least one sub-track Trajectory query operation is performed by trajectory collection, which is beneficial to improve the quality and efficiency of trajectory query operation.
  • Fig. 4 is a schematic flow diagram of a track query operation based on the track to be processed, at least one set of sub-tracks and index information provided by the embodiment of the present application to obtain a query result corresponding to the track to be processed; referring to Figure 4, in the track When the query operation includes an intersection query operation; in this embodiment, the track query operation is performed based on the track to be processed, at least one sub-track set and index information, and obtaining the query result corresponding to the track to be processed may include:
  • Step S401 Determine the track enclosing frame corresponding to the track to be processed.
  • Step S402 Based on the index information, determine the root node that intersects with the trajectory enclosing frame.
  • Step S403 Perform a track query operation based on at least one sub-track set and the root node, and obtain a query result corresponding to the track to be processed.
  • the track to be processed can be analyzed and processed to obtain a track enclosing frame corresponding to the track to be processed.
  • the track attributes corresponding to the track to be processed can be obtained first.
  • the track attributes can include: track length, track duration and track moving speed, and then The track enclosing frame corresponding to the track to be processed can be determined based on the track midpoint, track duration, and track moving speed in track attributes.
  • the index information can be analyzed and processed to determine the root node that intersects with the trajectory outsourcing frame.
  • the index information includes the root node, the root node outsourcing frame corresponding to the root node, and the A plurality of included intermediate nodes, an intermediate node enclosing frame corresponding to the intermediate nodes, leaf nodes included in the intermediate nodes, and a node enclosing frame corresponding to the leaf nodes.
  • the trajectory outsourcing box can be analyzed and compared with the root node outsourcing box corresponding to the root node in the index information, and the root node intersecting with the trajectory outsourcing box can be determined .
  • a track query operation can be performed based on at least one sub-track set and the root node, so that a query result corresponding to the track to be processed can be obtained.
  • performing a track query operation based on at least one sub-track set and a root node, and obtaining a query result corresponding to the track to be processed may include: obtaining intermediate nodes and leaf nodes included in the root node; based on the leaf nodes, at least The target sub-trajectory set is determined in a sub-trajectory set; the trajectory query operation is performed based on the target sub-trajectory set and intermediate nodes, and the query result corresponding to the track to be processed is obtained.
  • an intermediate node can include multiple leaf nodes, and different leaf nodes can correspond to different node outsourcing boxes, and at least one sub-track set corresponds to different division granularity, in order To improve the quality and efficiency of track query, the target sub-track set can be determined in at least one sub-track set based on the leaf nodes.
  • determining the target sub-trajectory set in at least one sub-trajectory set may include: obtaining the node enclosing frame corresponding to the leaf node and the track enclosing frame corresponding to the sub-trajectory in at least one sub-trajectory set; The node enclosing frame and the trajectory enclosing frame determine the target sub-trajectory set in at least one sub-trajectory set, wherein the similarity between the size of the track enclosing frame of the sub-trajectory in the target sub-trajectory set and the size of the node enclosing frame is greater than or equal to preset threshold.
  • the node enclosing box corresponding to the leaf node and the trajectory enclosing box corresponding to the sub-trajectories in at least one sub-trajectory set can be obtained, and then the node enclosing box and trajectory can be obtained
  • the outer frame is analyzed and processed, and the target sub-trajectory set is determined in at least one sub-trajectory set based on the analysis and processing results, and the size of the track outer frame of the sub-trajectory in the determined target sub-trajectory set is similar to the size of the node outer frame greater than or equal to the preset threshold.
  • the size of the node enclosing frame of a leaf node is F0, and at least one sub-trajectory set may include sub-trajectory set 1, sub-trajectory set 2, sub-trajectory set 3, sub-trajectory set 4 and sub-trajectory set 5, and sub-trajectory set 1
  • the size of the track enclosing frame corresponding to the sub-trajectories is F1
  • the size of the track enclosing frame corresponding to the sub-trajectories in the sub-trajectory set 2 is F2
  • the size of the track enclosing frame corresponding to the sub-trajectories in the sub-trajectory set 3 is F3
  • the size of the track enclosing frame corresponding to the sub-trajectories in the sub-trajectory set 4 is
  • the size of the trajectory enclosing frame corresponding to the neutron trajectory is F4
  • the specific acquisition method of the similarity is not limited to the above-mentioned implementation methods, and those skilled in the art can also use other methods to obtain the similarity between the size of the node enclosing frame and the size of the trajectory enclosing frame, as long as the node can be guaranteed The accuracy and reliability of the similarity between the size of the bounding box and the size of the track bounding box are obtained.
  • a target sub-track set may be determined in at least one sub-track set based on the above similarity.
  • the size relationship between the above similarities is S3 ⁇ S2 ⁇ S1 ⁇ S5 ⁇ S4, and then the sub-track set 4 corresponding to S4 can be determined as the target sub-track set, thus effectively ensuring the target sub-track set The accuracy and reliability of the determination.
  • the trajectory query operation can be performed based on the target sub-trajectory set and the intermediate nodes included in the root node, so that the query result corresponding to the track to be processed can be obtained, and the target sub-trajectory set based on the target sub-trajectory set can be effectively realized
  • Different levels of trajectory query operations are performed with intermediate nodes, which further improves the quality and efficiency of trajectory query quality.
  • Fig. 5 is a schematic flow diagram of obtaining the query result corresponding to the track to be processed based on the track query operation based on the target sub-track set and the intermediate node provided by the embodiment of the present application; on the basis of the above-mentioned embodiment, refer to the accompanying drawing 5 , this embodiment provides an implementation method for obtaining query results corresponding to the trajectories to be processed. Specifically, in this embodiment, the trajectory query operation is performed based on the target sub-trajectory set and intermediate nodes, and the corresponding trajectories corresponding to the trajectories to be processed are obtained
  • the query results can include:
  • Step S501 Among the intermediate nodes, determine the target intermediate nodes intersecting with the target sub-trajectory set.
  • Step S502 Obtain leaf nodes included in the target intermediate node.
  • Step S503 Perform trajectory query operation based on leaf nodes and target sub-trajectories, and obtain query results corresponding to the trajectory to be processed.
  • the intersection detection between each intermediate node and the target sub-trajectory set can be performed, so that the target intermediate node intersecting with the target sub-trajectory set can be determined among the intermediate nodes.
  • the outer frame of the intermediate node the outer frame of the trajectory of the sub-trajectories in the target sub-trajectory set can be analyzed and compared with the outer frame of the intermediate node, so that the target intermediate node intersecting with the set of target sub-trajectories can be determined among the intermediate nodes.
  • the leaf nodes included in the target intermediate node can be obtained, and then a trajectory query operation is performed on the leaf node and the target sub-trajectory set to obtain a query result corresponding to the trajectory to be processed.
  • the trajectory query operation is performed based on the leaf node and the target sub-trajectory set, and obtaining the query result corresponding to the track to be processed may include: among the leaf nodes included in the target intermediate node, determining the intersection with the target sub-trajectory set The first leaf node of ; perform a track query operation based on the first leaf node and the target sub-track set, and obtain a query result corresponding to the track to be processed.
  • the intersection detection can be performed on the target sub-trajectory set and the leaf nodes included in the target intermediate node, and then all the leaf nodes included in the target intermediate node can be Determine the first leaf node that intersects with the target sub-trajectory set, and then perform a trajectory query operation on the first leaf node and the target sub-trajectory set to obtain a query result corresponding to the track to be processed.
  • the trajectory query operation is performed based on the first leaf node and the target sub-trajectory set, and obtaining the query result corresponding to the track to be processed may include: obtaining the target trajectory point corresponding to the target sub-trajectory set; Among the nodes, a second leaf node intersecting with the target track point is determined; a track query operation is performed based on the second leaf node and the target track point, and a query result corresponding to the track to be processed is obtained.
  • precise trajectory query operations can be performed based on the first leaf node and the target sub-trajectory set.
  • target trajectory points corresponding to the target sub-trajectory set can be obtained, that is, the The actual point of the trajectory corresponding to the sub-trajectory in the target sub-trajectory set.
  • the target track point is intersected with the first leaf node to determine the second leaf node intersecting with the target track point in the first leaf node, that is, to determine the second leaf node intersecting with the actual track point in the index information .
  • the second leaf node and the target track point may be analyzed and processed to obtain a query result corresponding to the track to be processed.
  • performing a trajectory query operation based on the second leaf node and the target trajectory point, and obtaining the query result corresponding to the trajectory to be processed may include: obtaining at least one index data point corresponding to the second leaf node; Among the index data points, a target index data point corresponding to the target track point is determined; the target index data point is determined as a query result corresponding to the track to be processed.
  • At least one index data point corresponding to the second leaf node can be determined, that is, the index included in the second leaf node in the index information
  • the actual point of the track and then analyze and match the determined at least one index data point with the target track point, so as to determine the target index data point corresponding to the target track point in at least one index data, and then the target index data point can be determined
  • the trajectory query operation is realized.
  • the leaf nodes included in the target intermediate node are obtained, and the trajectory query operation is performed based on the leaf node and the target sub-trajectory set, and the Processing the query results corresponding to the trajectory can effectively realize the analysis and comparison between the target sub-trajectory set and the intermediate nodes and the leaf nodes included in the target intermediate node, so that most of the data can be filtered out, effectively reducing the need for accurate judgments At the same time, it will also reduce the data calculation overhead and improve the quality and efficiency of data query operations.
  • this application embodiment provides a trajectory query method, which can implement multi-level representation of the query trajectory during the trajectory query process, and then filter out large-scale data based on multi-level representation and index information Part of the data, so that the calculation overhead and the accuracy of trajectory judgment in the trajectory query operation can be balanced; specifically, as shown in accompanying drawing 6, the trajectory query method can include the following steps:
  • Step 1 Obtain the track Q to be queried and the index information for analyzing and processing the track to be processed.
  • the index information may include trajectory information, data point information, spatial range information, time information, and the like.
  • Step 2 Carry out a multi-layer refinement division operation on the track Q to be queried, and obtain at least one set of sub-trajectories corresponding to the track Q to be queried, wherein, the set of sub-trajectories can include multiple sub-trajectories, and any two sets of sub-trajectories respectively The corresponding partition parameters are different.
  • the trajectory Q to be queried is expressed as a trajectory outsourcing frame, and the trajectory outsourcing frame is divided into two sub-trajectories.
  • the lengths of the two sub-trajectories can be the same or different, and then can be respectively Generate smaller track enclosing frames corresponding to the two sub-trajectories.
  • the sizes of the track enclosing frames corresponding to the two sub-trajectories may be the same or different.
  • the division parameter may be 2.
  • At least one sub-track set representation may be obtained at different degrees of granularity for implementing track query operations.
  • Step 3 Perform a track query operation based on the track to be queried, at least one sub-track set and index information, and obtain a query result corresponding to the track to be processed.
  • trajectory query operation may include the following steps:
  • Step 31 Determine the track enclosing frame corresponding to the track Q to be queried.
  • Step 32 Compare the trajectory outsourcing box with the root node in the index information (R-tree or quadtree by default), if the trajectory outsourcing box intersects with the root node, you can add the intermediate nodes included in the root node to be matched queue.
  • Step 33 Determine a plurality of leaf nodes included in the intermediate nodes in the index information, determine the target sub-track set for track query operation based on the leaf nodes in at least one sub-track set, and determine the track of the sub-trajectories in the target sub-track set
  • the similarity between the size of the surrounding box and the size of the node's surrounding box is greater than or equal to a preset threshold.
  • Step 34 Obtain multiple sub-trajectories included in the target sub-trajectory set, and determine multiple sub-trajectory enclosing boxes corresponding to the multiple sub-trajectories.
  • Step 35 Analyzing and matching multiple sub-trajectory enclosing frames corresponding to multiple sub-trajectories with intermediate nodes, determining target intermediate nodes intersecting multiple sub-trajectory enclosing frames, and then determining multiple leaf nodes included in the target intermediate nodes.
  • the number of target intermediate nodes can be one or more.
  • the following operations can be performed: For an intermediate node in the queue, the intermediate node and the sub-trajectory Whether the outer frame intersects (that is, whether it intersects with one of the multiple sub-track outer frames), and if it intersects, the leaf nodes included in the intermediate node are added to the queue, thereby realizing the determination of a target intermediate node. The above operations are repeated until all target intermediate nodes intersecting with the outer bounding boxes of multiple sub-trajectories are determined.
  • Step 36 Analyzing and processing the multiple sub-trajectories, and determining actual track points corresponding to each of the multiple sub-trajectories.
  • Step 37 Analyzing and matching the actual track point with multiple leaf nodes, and determining the target leaf node intersecting with the actual track point.
  • Step 38 In the database, determine multiple index actual points corresponding to the target leaf node.
  • Step 39 Perform analysis and matching based on multiple index actual points and track actual points, and obtain query results corresponding to the track to be queried.
  • trajectory query method for a trajectory to be queried, before performing precise matching of trajectory data, by performing multi-level fine-grained division operations on the trajectory to be queried, a set of sub-trajectories at different levels can be obtained, and then it can be determined A hierarchical set of sub-trajectories adapted to the index information, and then analyze and match the set of sub-trajectories with the root nodes, intermediate nodes, and leaf nodes in the index information in sequence, so that most of the data can be filtered out, reducing the need for accurate judgments At the same time, it will also reduce the data calculation overhead, and achieve an effective balance between calculation overhead and trajectory query accuracy, thereby improving the quality and efficiency of data query.
  • FIG. 7 is a schematic flow chart of another trajectory query method provided by the embodiment of the present application; referring to the accompanying drawing 7, the present embodiment provides another trajectory query method, the execution subject of the method can be a trajectory query device, and can It should be understood that the track query device can be implemented as software, or a combination of software and hardware. Specifically, the trajectory query method may include:
  • Step S701 in response to calling the trace query request, determine the processing resource corresponding to the trace query service.
  • Step S702 Use the processing resources to perform the following steps: acquire the track to be processed and index information for analyzing and processing the track to be processed; divide the track to be processed to obtain at least one sub-track set corresponding to the track to be processed, wherein, The sub-trajectory set includes multiple sub-trajectories, and the division parameters corresponding to any two sub-trajectory sets are different; the trajectory query operation is performed based on the track to be processed, at least one sub-track set and index information, and the query result corresponding to the track to be processed is obtained .
  • the trajectory query method provided by the present invention can be executed on the cloud, where several computing nodes can be deployed, and each computing node has processing resources such as computing and storage.
  • each computing node has processing resources such as computing and storage.
  • multiple computing nodes can be organized to provide certain services.
  • one computing node can also provide one or more services.
  • the cloud can provide a service for completing the trajectory query method, which is called a trajectory query service.
  • a trajectory query service When the user needs to use the track query service, the track query service is called to trigger a request to the cloud to call the track query service, and the track to be processed may be carried in the request.
  • the cloud determines the computing node that responds to the request, and uses the processing resources in the computing node to perform the following steps: Obtain the track to be processed and the index information used to analyze and process the track to be processed; divide the track to be processed, and obtain the track to be processed Corresponding to at least one sub-track set, wherein the sub-track set includes multiple sub-trajectories, and any two sub-track sets have different corresponding division parameters; perform track query operations based on the track to be processed, at least one sub-track set, and index information , to obtain the query results corresponding to the track to be processed.
  • Fig. 8 is a schematic structural diagram of a track query device provided by the embodiment of the present application; referring to the accompanying drawing 8, the present embodiment provides a track query device, which can be used to execute the above-mentioned track query device shown in Fig. 2
  • the trajectory query method specifically, the trajectory query device may include: a first acquisition module 11, a first division module 12 and a first processing module 13:
  • the first acquiring module 11 is configured to acquire the track to be processed and index information for analyzing and processing the track to be processed.
  • the first division module 12 is configured to divide the track to be processed to obtain at least one sub-track set corresponding to the track to be processed, wherein the set of sub-trajectories includes a plurality of sub-trajectories, and any two sets of sub-trajectories correspond to the respective divisions The parameters are different.
  • the first processing module 13 is configured to perform a track query operation based on the track to be processed, at least one sub-track set and index information, and obtain a query result corresponding to the track to be processed.
  • the first division module 12 when the first division module 12 divides the track to be processed to obtain at least one set of sub-tracks corresponding to the track to be processed, the first division module 12 is used to perform: obtain the sub-track set corresponding to the track to be processed The query outsourcing box; determine at least one division parameter used to divide the query outsourcing box; use at least one division parameter to segment the query outsourcing box until the number of sub-trajectories obtained after segmentation is greater than that of the sub-trajectories The number of line segments is obtained to obtain at least one set of sub-trajectories corresponding to the trajectory to be processed.
  • the trajectory query operation includes at least one of the following: an intersection query operation, a containment query operation, a previous query operation, and a subsequent query operation.
  • the first processing module 13 when the trajectory query operation includes an intersection query operation; when the first processing module 13 performs a trajectory query operation based on the trajectory to be processed, at least one set of sub-trajectories and index information, and obtains a query result corresponding to the trajectory to be processed , the first processing module 13 is used to execute: determine the track enclosing frame corresponding to the track to be processed; based on the index information, determine the root node intersecting with the track enclosing frame; perform track query operation based on at least one sub-trajectory set and the root node , to obtain the query results corresponding to the track to be processed.
  • the first processing module 13 when the first processing module 13 performs a track query operation based on at least one sub-track set and the root node, and obtains a query result corresponding to the track to be processed, the first processing module 13 is configured to perform: obtaining the root node The intermediate nodes and leaf nodes included in; based on the leaf nodes, determine the target sub-track set in at least one sub-track set; perform track query operations based on the target sub-track set and intermediate nodes, and obtain query results corresponding to the tracks to be processed.
  • the first processing module 13 determines the target sub-trajectory set in at least one sub-trajectory set based on the leaf node
  • the first processing module 13 is used to perform: obtaining the node enclosing frame corresponding to the leaf node and at least A trajectory enclosing frame corresponding to a sub-trajectory in a sub-trajectory set; based on the node enclosing frame and the trajectory enclosing frame, determine the target sub-trajectory set in at least one sub-trajectory set, wherein the trajectory enclosing frame of the sub-trajectory in the target sub-trajectory set
  • the similarity between the size and the size of the bounding box of the node is greater than or equal to a preset threshold.
  • the first processing module 13 when the first processing module 13 performs a track query operation based on the target sub-track set and the intermediate node, and obtains a query result corresponding to the track to be processed, the first processing module 13 is used to execute: in the intermediate node , determine the target intermediate node intersecting with the target sub-trajectory set; obtain the leaf nodes included in the target intermediate node; perform a trajectory query operation based on the leaf node and the target sub-trajectory set, and obtain the query result corresponding to the track to be processed.
  • the first processing module 13 when the first processing module 13 performs a track query operation based on the leaf node and the target sub-track set, and obtains a query result corresponding to the track to be processed, the first processing module 13 is used to execute: at the target intermediate node Among the leaf nodes included in , determine the first leaf node that intersects with the target sub-track set; perform a track query operation based on the first leaf node and the target sub-track set, and obtain the query result corresponding to the track to be processed.
  • the first processing module 13 when the first processing module 13 performs a trajectory query operation based on the first leaf node and the target sub-trajectory set, and obtains a query result corresponding to the trajectory to be processed, the first processing module 13 is used to perform: obtaining the corresponding The target track point corresponding to the target sub-track set; in the first leaf node, determine the second leaf node intersecting with the target track point; perform track query operation based on the second leaf node and the target track point, and obtain the corresponding query results.
  • the first processing module 13 when the first processing module 13 performs a trajectory query operation based on the second leaf node and the target trajectory point, and obtains a query result corresponding to the trajectory to be processed, the first processing module 13 is configured to perform: obtaining At least one index data point corresponding to two leaf nodes; in the at least one index data point, determine the target index data point corresponding to the target track point; determine the target index data point as the query result corresponding to the track to be processed.
  • the device shown in FIG. 8 can execute the method of the embodiment shown in FIG. 1-FIG. 6 .
  • parts not described in detail in this embodiment refer to the related descriptions of the embodiment shown in FIG. 1-FIG. 6 .
  • the structure of the track query device shown in FIG. 8 can be realized as an electronic device, and the electronic device can be various devices such as a mobile phone, a tablet computer, and a server.
  • the electronic device may include: a first processor 21 and a first memory 22 .
  • the first memory 22 is used to store the program corresponding to the electronic device executing the trajectory query method provided in the embodiment shown in FIGS. 1-6 above, and the first processor 21 is configured to execute program of.
  • the program includes one or more computer instructions, wherein, when one or more computer instructions are executed by the first processor 21, the following steps can be realized:
  • a track query operation is performed based on the track to be processed, at least one sub-track set and index information, and a query result corresponding to the track to be processed is obtained.
  • the first processor 21 is also configured to execute all or part of the steps in the foregoing embodiments shown in FIGS. 1-6 .
  • the structure of the electronic device may further include a first communication interface 23 for the electronic device to communicate with other devices or a communication network.
  • an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by electronic devices, which includes programs for executing the trajectory query method in the method embodiments shown in FIGS. 1-6 above.
  • an embodiment of the present invention provides a computer program product, including: a computer-readable storage medium storing computer instructions, when the computer instructions are executed by one or more processors, causing the one or more processing The device executes the steps in the trajectory query method in the method embodiment shown in FIGS. 1-6 above.
  • Fig. 10 is a schematic structural diagram of another track query device provided by the embodiment of the present application; referring to the accompanying drawing 10, the present embodiment provides another track query device, which can execute the above-mentioned track query device shown in Fig. 7 Track query method, the track query device may include: a second determination module 31 and a second processing module 32:
  • the second determination module 31 is configured to determine the processing resource corresponding to the trace query service in response to the call trace query request;
  • the second processing module 32 is used to use processing resources to perform the following steps: obtain the track to be processed and the index information used for analyzing and processing the track to be processed; divide the track to be processed to obtain at least one sub-track corresponding to the track to be processed Trajectory set, wherein, the sub-trajectory set includes multiple sub-trajectories, and the division parameters corresponding to any two sub-trajectory sets are different; based on the track to be processed, at least one sub-track set and index information, the track query operation is performed to obtain the track to be processed corresponding query results.
  • the device shown in FIG. 10 can execute the method of the embodiment shown in FIG. 6-FIG. 7.
  • the parts not described in detail in this embodiment refer to the relevant description of the embodiment shown in FIG. 6-FIG. 7.
  • the structure of the track query device shown in FIG. 10 can be implemented as an electronic device, which can be various devices such as a mobile phone, a tablet computer, and a server.
  • the electronic device may include: a second processor 41 and a second memory 42 .
  • the second memory 42 is used to store the program corresponding to the electronic device executing the trajectory query method provided in the embodiment shown in FIGS. 6-7 above, and the second processor 41 is configured to execute program of.
  • the program includes one or more computer instructions, wherein, when the one or more computer instructions are executed by the second processor 41, the following steps can be realized:
  • processing resources to perform the following steps: obtaining the track to be processed and index information for analyzing and processing the track to be processed; performing a division operation on the track to be processed to obtain at least one sub-track set corresponding to the track to be processed, wherein the set of sub-trajectories includes multiple sub-trajectories, and any two sub-trajectory sets correspond to different division parameters; perform a track query operation based on the track to be processed, at least one set of sub-tracks and index information, and obtain the query result corresponding to the track to be processed.
  • the second processor 41 is also configured to execute all or part of the steps in the foregoing embodiments shown in FIGS. 6-7 .
  • the structure of the electronic device may further include a second communication interface 43 for the electronic device to communicate with other devices or a communication network.
  • an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by electronic devices, which includes programs for executing the trajectory checking method in the method embodiments shown in FIGS. 6-7 above.
  • an embodiment of the present invention provides a computer program product, including: a computer-readable storage medium storing computer instructions, when the computer instructions are executed by one or more processors, causing the one or more processing The device executes the steps in the trajectory query method in the method embodiment shown in FIGS. 6-7 above.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place , or can also be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without any creative effort.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means implementing A function specified in a process flow or processes and/or a block or blocks in a block diagram.
  • These computer program instructions may also be loaded onto a computer or other programmable device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide Steps for realizing the functions specified in the flow chart or flow charts and/or block diagram block or blocks.
  • a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • Memory may include non-permanent storage in computer-readable media, in the form of random access memory (RAM) and/or nonvolatile memory such as read-only memory (ROM) or flash RAM. Memory is an example of computer readable media.
  • RAM random access memory
  • ROM read-only memory
  • flash RAM flash random access memory
  • Computer-readable media including both permanent and non-permanent, removable and non-removable media, can be implemented by any method or technology for storage of information.
  • Information may be computer readable instructions, data structures, modules of a program, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Flash memory or other memory technology, Compact Disc Read-Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridge, tape magnetic disk storage or other magnetic storage device or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
  • computer-readable media excludes transitory computer-readable media, such as modulated data signals and carrier waves.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例提供了一种轨迹查询方法、设备、存储介质及计算机程序产品。方法包括:获取待处理轨迹和用于对待处理轨迹进行分析处理的索引信息;对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合,子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同;基于待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。本申请提供的技术方案,实现了对轨迹的多层次划分操作,获得多层精细化的至少一个子轨迹集合,基于子轨迹集合进行轨迹查询操作,可以过滤掉大部分的索引数据,减少了做精确判断的轨迹条数和数据计算开销,提高了轨迹查询操作的质量和效率。

Description

轨迹查询方法、设备、存储介质及计算机程序产品
本申请要求2021年07月28日递交的申请号为202110858897.1、发明名称为“轨迹查询方法、装置、设备、存储介质及计算机程序产品”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及互联网数据处理领域,尤其涉及一种轨迹查询方法、装置、设备、存储介质及计算机程序产品。
背景技术
移动对象的轨迹作为一类时空对象,由于其结构比较复杂,所以在进行轨迹查询操作时,会有较大的计算开销。例如,对于常见的轨迹相交查询,需要逐一判断轨迹上的每一条线段是否与查询上的每一条线段相交,此时,数据的计算开销大,不利于提高轨迹查询的质量和效率。
发明内容
本申请实施例提供一种轨迹查询方法、装置、设备、存储介质及计算机程序产品,通过对待查询轨迹进行多层次划分操作,获得至少一个子轨迹集合,而后基于子轨迹集合和索引信息进行轨迹查询操作,这样可以过滤掉大部分数据,减少了做精确判断的轨迹条数,同时也会降低数据的计算开销,提高了数据查询的质量和效率。
第一方面,本申请实施例提供了一种轨迹查询方法,包括:
获取待处理轨迹和用于对所述待处理轨迹进行分析处理的索引信息;
对所述待处理轨迹进行划分操作,获得与所述待处理轨迹相对应的至少一个子轨迹集合,其中,所述子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同;
基于所述待处理轨迹、至少一个子轨迹集合和所述索引信息进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果。
第二方面,本申请实施例提供了一种轨迹查询装置,包括:
第一获取模块,用于获取待处理轨迹和用于对所述待处理轨迹进行分析处理的索引信息;
第一划分模块,用于对所述待处理轨迹进行划分操作,获得与所述待处理轨迹相对应的至少一个子轨迹集合,其中,所述子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同;
第一处理模块,用于基于所述待处理轨迹、至少一个子轨迹集合和所述索引信息进 行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果。
第三方面,本申请实施例提供了一种电子设备,包括:存储器、处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现上述第一方面所示的轨迹查询方法。
第四方面,本发明实施例提供了一种计算机存储介质,用于储存计算机程序,所述计算机程序使计算机执行时实现上述第一方面所示的轨迹查询方法。
第五方面,本发明实施例提供了一种计算机程序产品,包括:存储有计算机指令的计算机可读存储介质,当所述计算机指令被一个或多个处理器执行时,致使所述一个或多个处理器执行上述第一方面所示的轨迹查询方法中的步骤。
第六方面,本发明实施例提供了一种轨迹查询方法,包括:
响应于调用轨迹查询请求,确定轨迹查询服务对应的处理资源;
利用所述处理资源执行如下步骤:获取待处理轨迹和用于对所述待处理轨迹进行分析处理的索引信息;对所述待处理轨迹进行划分操作,获得与所述待处理轨迹相对应的至少一个子轨迹集合,其中,所述子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同;基于所述待处理轨迹、至少一个子轨迹集合和所述索引信息进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果。
第七方面,本发明实施例提供了一种轨迹查询装置,包括:
第二确定模块,用于响应于调用轨迹查询请求,确定轨迹查询服务对应的处理资源;
第二处理模块,用于利用所述处理资源执行如下步骤:获取待处理轨迹和用于对所述待处理轨迹进行分析处理的索引信息;对所述待处理轨迹进行划分操作,获得与所述待处理轨迹相对应的至少一个子轨迹集合,其中,所述子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同;基于所述待处理轨迹、至少一个子轨迹集合和所述索引信息进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果。
第八方面,本申请实施例提供了一种电子设备,包括:存储器、处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现上述第六方面所示的轨迹查询方法。
第九方面,本发明实施例提供了一种计算机存储介质,用于储存计算机程序,所述计算机程序使计算机执行时实现上述第六方面所示的轨迹查询方法。
第十方面,本发明实施例提供了一种计算机程序产品,包括:存储有计算机指令的计算机可读存储介质,当所述计算机指令被一个或多个处理器执行时,致使所述一个或多个处理器执行上述第六方面所示的轨迹查询方法中的步骤。
本申请实施例提供的技术方案,通过对需要进行轨迹查询操作的待处理轨迹进行多层次划分操作,获得不同划分层次的至少一个子轨迹集合,而后基于至少一个子轨迹集合、待处理轨迹和索引信息进行轨迹查询操作,获得查询结果,这样实现了对待处理轨 迹的多层精细化,而后可以基于多层精细化的至少一个子轨迹集合来过滤掉大部分的索引数据,减少了做精确判断的轨迹条数,同时也会降低数据计算开销,提高了数据查询的质量和效率,进而保证了该方法的实用性。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的一种轨迹查询方法的场景示意图;
图2为本申请实施例提供的一种轨迹查询方法的流程示意图;
图3为本申请实施例提供的对所述待处理轨迹进行划分操作,获得与所述待处理轨迹相对应的至少一个子轨迹集合的流程示意图;
图4为本申请实施例提供的基于所述待处理轨迹、至少一个子轨迹集合和所述索引信息进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果的流程示意图;
图5为本申请实施例提供的基于所述目标子轨迹集合和所述中间节点进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果的流程示意图;
图6为本申请应用实施例提供的一种轨迹查询方法的流程示意图;
图7为本申请实施例提供的另一种轨迹查询方法的流程示意图;
图8为本申请实施例提供的一种轨迹查询装置的结构示意图;
图9为图8所示的轨迹查询装置所对应的电子设备的结构示意图;
图10为本申请实施例提供的另一种轨迹查询装置的结构示意图;
图11为图10所示的轨迹查询装置所对应的电子设备的结构示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在本申请实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请。在本申请实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义,“多种”一般包含至少两种,但是不排除包含至少一种的情况。
应当理解,本文中使用的术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
取决于语境,如在此所使用的词语“如果”、“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的商品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种商品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的商品或者系统中还存在另外的相同要素。
另外,下述各方法实施例中的步骤时序仅为一种举例,而非严格限定。
为了方便本领域技术人员理解本申请实施例提供的技术方案,下面对相关技术进行说明:
移动对象的轨迹作为一类时空对象,由于其结构比较复杂,所以在进行轨迹查询操作时,会有较大的计算开销。例如,对于常见的轨迹相交查询,需要逐一判断轨迹上的每一条线段与查询上的每一条线段是否相交。为了能够提高查询效率,通常需要对轨迹建立索引信息,在索引信息中使用索引轨迹外包框对轨迹进行表示。在进行轨迹查询时,依照索引轨迹外包框对查询轨迹的空间关系进行判断。
目前对于大多数的轨迹查询方法,实际上是两阶段的判断方法,即外包框判断+精确轨迹判断,外包框判断使用轨迹外包框和索引信息中的数据外包框进行比对,判断是否相交;精确轨迹判断使用查询轨迹的精确轨迹点和索引信息中数据的精确轨迹点进行判断,判断是否相交。
举例来说,给定一个查询轨迹和一个索引信息,对查询轨迹进行外包框的计算操作,获得轨迹外包框,之后,将轨迹外包框和索引信息中的索引外包框进行比对,如果轨迹外包框与索引信息中的索引外包框相交,则将索引外包框中所包括的精确数据读取出来,将轨迹外包框中的原始轨迹读出来,然后将原始轨迹和索引外包框中所包括的精确数据进行相交判断。
然而,由于轨迹外包框通常很大,无论是查询的轨迹外包框还是索引信息中的索引外包框都比较大,因此,在利用索引外包框进行轨迹查询操作时,能够过滤掉的索引轨迹的数量并不多,进而直接加大了需要做精确判断的轨迹条数,同时也会带来额外的计算开销。
为了解决上述技术问题,本实施例提供了一种轨迹查询方法、装置及设备,该方法 的执行主体可以为轨迹查询装置,轨迹查询装置可以通信连接有客户端,参考附图1所示:
其中,客户端可以是任何具有一定数据传输能力的计算设备,此外,客户端的基本结构可以包括:至少一个处理器。处理器的数量取决于客户端的配置和类型。客户端也可以包括存储器,该存储器可以为易失性的,例如RAM,也可以为非易失性的,例如只读存储器(Read-Only Memory,简称ROM)、闪存等,或者也可以同时包括两种类型。存储器内通常存储有操作系统(Operating System,简称OS)、一个或多个应用程序,也可以存储有程序数据等。除了处理单元和存储器之外,客户端还包括一些基本配置,例如网卡芯片、IO总线、显示组件以及一些外围设备等。可选地,一些外围设备可以包括,例如键盘、鼠标、输入笔、打印机等。其它外围设备在本领域中是众所周知的,在此不做赘述。可选地,客户端可以为PC(personal computer)终端、手持终端(例如:智能手机、平板电脑)等。
轨迹查询装置是指可以在网络虚拟环境中提供轨迹查询服务的设备,通常是指利用网络进行信息规划、轨迹查询操作的装置。在物理实现上,轨迹查询装置可以是任何能够提供计算服务,响应服务请求,并进行处理的设备,例如:可以是集群服务器、常规服务器、云服务器、云主机、虚拟中心等。轨迹查询装置的构成主要包括处理器、硬盘、内存、系统总线等,和通用的计算机架构类似。
在上述本实施例中,客户端可以与轨迹查询装置进行网络连接,该网络连接可以是无线或有线网络连接。若客户端与轨迹查询装置是通信连接,该移动网络的网络制式可以为2G(GSM)、2.5G(GPRS)、3G(WCDMA、TD-SCDMA、CDMA2000、UTMS)、4G(LTE)、4G+(LTE+)、WiMax、5G等中的任意一种。
在本申请实施例中,客户端可以生成或者获取待处理轨迹,其中,待处理轨迹的数量可以为一个或多个。具体的,本实施例对于客户端生成或者获取待处理轨迹的具体实现方式不做限定,例如:客户端上设置有交互界面,通过交互界面获取用户输入的执行操作,通过执行操作来生成待处理轨迹;或者,客户端上可以设置有特定接口,通过特定接口可以获取到待处理轨迹。在获取到待处理轨迹之后,可以将待处理轨迹上传至轨迹查询装置,以使得轨迹查询装置可以对所上传的待处理轨迹进行数据分析处理。
轨迹查询装置,用于接收客户端上传的待处理轨迹,而后,轨迹查询装置可以对待处理轨迹进行分析处理,具体的,可以确定用于对待处理轨迹进行分析处理的索引信息,为了提高轨迹查询的效率,可以对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合,其中,子轨迹集合中包括多个子轨迹,子轨迹的长度可以相同或者不同,且任意两个子轨迹集合各自对应的划分参数不同;在获取到至少一个子轨迹集合之后,可以对待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,从而可以获得与待处理轨迹相对应的查询结果。
本实施例提供的技术方案,通过对需要进行轨迹查询操作的待处理轨迹进行多层次划分操作,获得不同划分层次的至少一个子轨迹集合,而后基于至少一个子轨迹集合、待处理轨迹和索引信息进行轨迹查询操作,获得查询结果,这样实现了对待处理轨迹的多层精细化,而后可以基于多层精细化的至少一个子轨迹集合来过滤掉大部分的索引数据,减少了做精确判断的轨迹条数,同时也会降低数据计算开销,提高了数据查询的质量和效率,进而保证了该方法的实用性。
下面通过一个示例性的应用场景具体说明本申请各个实施例提供的轨迹查询方法、装置及设备。
图2为本申请实施例提供的一种轨迹查询方法的流程示意图;参考附图2所示,本实施例提供了一种轨迹查询方法,该方法的执行主体可以为轨迹查询装置,可以理解的是,该轨迹查询装置可以实现为软件、或者软件和硬件的组合。具体的,该轨迹查询方法可以包括:
步骤S201:获取待处理轨迹和用于对待处理轨迹进行分析处理的索引信息。
步骤S202:对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合,其中,子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同。
步骤S203:基于待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
下面对上述各个步骤进行详细说明:
步骤S201:获取待处理轨迹和用于对待处理轨迹进行分析处理的索引信息。
当存在轨迹查询需求时,则可以获取待处理轨迹,待处理轨迹的数量可以为一个或多个,为了能够实现轨迹查询操作,则可以获取待处理轨迹和用于对待处理轨迹进行分析处理的索引信息。具体的,本实施例对于获取待处理轨迹和索引信息的具体实现方式不做限定,本领域技术人员可以根据具体的应用场景或者应用需求进行设置,例如:待处理轨迹可以是轨迹查询装置所生成的,此时轨迹查询装置上设置有交互界面,获取用户在交互界面上输入的执行操作,通过执行操作可以生成待处理轨迹;或者,待处理轨迹可以是第三设备发送至轨迹查询装置的,此时,待处理轨迹可以存储在第三设备中,第三设备与轨迹查询装置通信连接,这样轨迹查询装置可以通过第三设备获取到待查询轨迹。
相类似的,索引信息可以存储在预设区域中,通过访问预设区域即可获取到索引信息;或者,索引信息存储在第三设备中,第三设备与轨迹查询装置通信连接,这样通过第三设备获取索引信息。
当然的,本领域技术人员也可以采用其他的方式来获取待处理轨迹和索引信息,只要能够保证对待处理轨迹和索引信息进行获取的准确可靠性即可,在此不再赘述。
步骤S202:对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合,其中,子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同。
在获取到待处理轨迹之后,为了能够提高轨迹查询的质量和效率,可以对待处理轨迹进行划分操作,具体的,可以先获取用于对待处理轨迹进行分析处理的至少一个划分参数,而后可以基于至少一个划分参数对待处理轨迹进行划分操作,从而可以获得与待处理轨迹相对应的至少一个子轨迹集合。其中,所获得的子轨迹集合中可以包括多个子轨迹,不同的子轨迹集合中可以包括不同数量的子轨迹,位于同一个子轨迹集合中子轨迹的长度可以相同或者不同,并且,任意两个子轨迹集合各自对应的划分参数不同。
举例来说,在获取到一个待处理轨迹,可以将一条待处理轨迹划分为两条子轨迹,此时,划分参数为2,从而可以获得两条子轨迹,上述两个子轨迹可以构成一个子轨迹集合。或者,在获取到一个待处理轨迹,可以将一条待处理轨迹划分为四条子轨迹,此时,划分参数为4时,从而可以获得四条子轨迹,上述四条子轨迹可以构成一个子轨迹集合。或者,在获取到一个待处理轨迹,可以将一条待处理轨迹划分为八条子轨迹,此时,划分参数为8时,从而可以获得八条子轨迹,上述八条子轨迹可以构成一个子轨迹集合。相类似的,在划分参数为16、32或者64时,可以对待处理轨迹进行不同层次的划分操作,从而可以获得不同划分粒度的子轨迹集合,有效地实现了对与待处理轨迹相对应的至少一个子轨迹集合进行获取的准确可靠性。
步骤S203:基于待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
在获取到待处理轨迹、至少一个子轨迹集合和索引信息之后,可以基于待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,从而可以获得与待处理轨迹相对应的查询结果。其中,轨迹查询操作可以包括以下至少之一:相交查询操作、包含查询操作、在前查询操作、在后查询操作。可以理解的是,不同的轨迹查询操作可以对应有不同的查询结果,例如:在轨迹查询操作为相交查询操作时,具体可以为需要查询经过某一轨迹的建筑物或者地理位置,所获得的查询结果为轨迹相交查询结果。在轨迹查询操作为包含查询操作时,具体可以为需要查询位于某一范围内的建筑物或者地理位置时,所获得的查询结果为轨迹包含查询结果。相类似的,在轨迹查询操作为在前查询操作时,所获得的查询结果为轨迹在前查询结果;在轨迹查询操作为在后查询操作时,所获得的查询结果为轨迹在后查询结果。
本实施例提供的轨迹查询方法,通过对需要进行查询操作的待处理轨迹进行划分操作,获得不同划分层次的至少一个子轨迹集合,而后基于至少一个子轨迹集合、待处理轨迹和索引信息进行轨迹查询操作,获得查询结果,这样实现了对待处理轨迹的多层精细化,而后可以基于多层精细化后的至少一个子轨迹集合来过滤掉大部分的索引数据, 减少了做精确判断的轨迹条数,同时也会降低了数据的计算开销,提高了数据查询的质量和效率,进而保证了该方法的实用性。
图3为本申请实施例提供的对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合的流程示意图;在上述实施例的基础上,参考附图3所示,本实施例提供了一种获得与待处理轨迹相对应的至少一个子轨迹集合的实现方式,具体的,本实施例中的对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合可以包括:
步骤S301:获取与待处理轨迹相对应的查询外包框。
步骤S302:确定用于对查询外包框进行划分操作的至少一个划分参数。
步骤S303:利用至少一个划分参数对查询外包框进行切分操作,直至切分后所获得的子轨迹的数量大于子轨迹中的线段数量,获得与待处理轨迹相对应的至少一个子轨迹集合。
在获取到待处理轨迹之后,可以对待处理轨迹进行分析处理,以获取与待处理轨迹相对应的查询外包框。在一些实例中,为了能够准确地获取到与待处理轨迹相对应的查询外包框,可以先获取待处理轨迹所对应的轨迹属性,轨迹属性可以包括:轨迹长度、轨迹时长和轨迹移动速度,而后可以基于轨迹属性中的轨迹中点、轨迹时长和轨迹移动速度来确定待处理轨迹所对应的查询外包框。
在获取到查询外包框之后,可以确定用于对查询外包框进行划分操作的至少一个划分参数,其中,划分参数可以存储在预设区域中,通过访问预设区域即可获取到至少一个预设参数,在一些实例中,至少一个划分参数可以包括:2、4、8、16、32、64等等,例如,在划分参数为2时,基于上述划分参数对查询外包框进行划分操作时,可以获得一个子轨迹集合;在划分参数为4时,基于上述划分参数对查询外包框进行划分操作时,可以获得另一个子轨迹集合。因此,在查询外包框中子轨迹的线段数量越多时,为了保证对查询外包框进行划分的精细粒度,则用于对查询外包框进行划分操作的划分参数的数量越多。
在获取到查询外包框和至少一个划分参数之后,可以利用至少一个划分参数对查询外包框进行切分操作,该切分操作可以为平均切分操作或者不平均切分操作,在切分后所获得的子轨迹的数量大于子轨迹中的线段数量时,则说明在对查询外包框进行切分操作时,能够获取到足够细粒度的子轨迹以及不同划分粒度所对应的子轨迹,此时则可以停止切分操作,从而可以获得与待处理轨迹相对应的至少一个子轨迹集合,可以理解的是,一个子轨迹集合中包括经过1次切分操作所生成的多个子轨迹,不同的子轨迹集合可以对应有不同的划分参数。
本实施例中,通过获取与待处理轨迹相对应的查询外包框,确定用于对查询外包框进行划分操作的至少一个划分参数,而后利用至少一个划分参数对查询外包框进行切分 操作,直至切分后所获得的子轨迹的数量大于子轨迹中的线段数量,获得与待处理轨迹相对应的至少一个子轨迹集合,实现了对待处理轨迹的多层精细化操作,进而可以基于至少一个子轨迹集合来进行轨迹查询操作,有利于提高轨迹查询操作的质量和效率。
图4为本申请实施例提供的基于待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,获得与待处理轨迹相对应的查询结果的流程示意图;参考附图4所示,在轨迹查询操作包括相交查询操作时;本实施例中的基于待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,获得与待处理轨迹相对应的查询结果可以包括:
步骤S401:确定与待处理轨迹相对应的轨迹外包框。
步骤S402:基于索引信息,确定与轨迹外包框相交的根节点。
步骤S403:基于至少一个子轨迹集合和根节点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
在获取到待处理轨迹之后,可以对待处理轨迹进行分析处理,以获取与待处理轨迹相对应的轨迹外包框。在一些实例中,为了能够准确地获取到与待处理轨迹相对应的轨迹外包框,可以先获取待处理轨迹所对应的轨迹属性,轨迹属性可以包括:轨迹长度、轨迹时长和轨迹移动速度,而后可以基于轨迹属性中的轨迹中点、轨迹时长和轨迹移动速度来确定待处理轨迹所对应的轨迹外包框。
在获取到索引信息之后,可以对索引信息进行分析处理,以确定与轨迹外包框相交的根节点,具体的,索引信息中包括根节点、与根节点相对应的根节点外包框、根节点中所包括的多个中间节点、与中间节点相对应的中间节点外包框、中间节点中所包括的叶子节点、与叶子节点相对应的节点外包框。为了能够准确地实现轨迹查询操作,在获取到轨迹外包框和索引信息之后,可以将轨迹外包框与索引信息中根节点相对应的根节点外包框进行分析比较,确定与轨迹外包框相交的根节点。
在确定与轨迹外包框相交的根节点之后,可以基于至少一个子轨迹集合和根节点进行轨迹查询操作,从而可以获得与待处理轨迹相对应的查询结果。在一些实例中,基于至少一个子轨迹集合和根节点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果可以包括:获取根节点中包括的中间节点和叶子节点;基于叶子节点,在至少一个子轨迹集合中确定目标子轨迹集合;基于目标子轨迹集合和中间节点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
其中,由于根节点中包括有多个中间节点,一个中间节点可以包括多个叶子节点,不同的叶子节点可以对应有不同的节点外包框,而至少一个子轨迹集合对应有不同的划分粒度,为了能够提高轨迹查询的质量和效率,则可以基于叶子节点在至少一个子轨迹集合中确定目标子轨迹集合。在一些实例中,基于叶子节点,在至少一个子轨迹集合中确定目标子轨迹集合可以包括:获取叶子节点所对应的节点外包框和至少一个子轨迹集合中子轨迹所对应的轨迹外包框;基于节点外包框和轨迹外包框,在至少一个子轨迹集 合中确定目标子轨迹集合,其中,目标子轨迹集合中子轨迹的轨迹外包框的大小与节点外包框的大小之间的相似度大于或等于预设阈值。
具体的,在获取到叶子节点和至少一个子轨迹集合之后,可以获取叶子节点所对应的节点外包框和至少一个子轨迹集合中子轨迹所对应的轨迹外包框,而后可以对节点外包框和轨迹外包框进行分析处理,并基于分析处理结果在至少一个子轨迹集合中确定目标子轨迹集合,所确定的目标子轨迹集合中子轨迹的轨迹外包框的大小与节点外包框的大小之间的相似度大于或等于预设阈值。
举例来说,叶子节点的节点外包框大小为F0,至少一个子轨迹集合可以包括子轨迹集合1、子轨迹集合2、子轨迹集合3、子轨迹集合4和子轨迹集合5,子轨迹集合1中子轨迹所对应的轨迹外包框大小为F1,子轨迹集合2中子轨迹所对应的轨迹外包框大小为F2,子轨迹集合3中子轨迹所对应的轨迹外包框大小为F3,子轨迹集合4中子轨迹所对应的轨迹外包框大小为F4,子轨迹集合5中子轨迹所对应的轨迹外包框大小为F5。
在获取到节点外包框大小和轨迹外包框大小之后,可以确定节点外包框大小和轨迹外包框大小之间的相似度,具体的,可以获取到相似度S1=F1/F0、S2=F2/F0、S3=F3/F0、S4=F4/F0和S5=F5/F0。可以理解的是,相似度的具体获取方式并不限于上述实现方式,本领域技术人员也可以采用其他的方式来获取节点外包框大小和轨迹外包框大小之间的相似度,只要能够保证对节点外包框大小和轨迹外包框大小之间的相似度进行获取的准确可靠性。
在获取到各个子轨迹集合中子轨迹的轨迹外包框大小与节点外包框大小之后的相似度之后,可以基于上述的相似度在至少一个子轨迹集合中确定目标子轨迹集合。例如,在上述相似度之间的大小关系为S3<S2<S1<S5<S4,而后可以将S4所对应的子轨迹集合4确定为目标子轨迹集合,从而有效地保证了对目标子轨迹集合进行确定的准确可靠性。
在确定目标子轨迹集合之后,可以基于目标子轨迹集合和根节点中所包括的中间节点进行轨迹查询操作,从而可以获得与待处理轨迹相对应的查询结果,有效地实现了基于目标子轨迹集合和中间节点进行不同层次的轨迹查询操作,进一步提高了轨迹查询质量的质量和效率。
图5为本申请实施例提供的基于目标子轨迹集合和中间节点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果的流程示意图;在上述实施例的基础上,参考附图5所示,本实施例提供了一种获得与待处理轨迹相对应的查询结果的实现方式,具体的,本实施例中的基于目标子轨迹集合和中间节点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果可以包括:
步骤S501:在中间节点中,确定与目标子轨迹集合相交的目标中间节点。
步骤S502:获取目标中间节点中所包括的叶子节点。
步骤S503:基于叶子节点和目标子轨迹集合进行轨迹查询操作,获得与待处理轨迹 相对应的查询结果。
在获取到中间节点之后,可以将各个中间节点与目标子轨迹集合进行相交检测,从而可以在中间节点中确定与目标子轨迹集合相交的目标中间节点,具体的,在获取到中间节点所对应的中间节点外包框之后,可以将目标子轨迹集合中子轨迹的轨迹外包框与中间节点外包框进行分析比较,从而可以在中间节点中确定与目标子轨迹集合相交的目标中间节点。
在获取到目标中间节点之后,可以获取目标中间节点中所包括的叶子节点,而后对叶子节点和目标子轨迹集合进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。在一些实例中,基于叶子节点和目标子轨迹集合进行轨迹查询操作,获得与待处理轨迹相对应的查询结果可以包括:在目标中间节点中所包括的叶子节点中,确定与目标子轨迹集合相交的第一叶子节点;基于第一叶子节点和目标子轨迹集合进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
具体的,在获取到目标中间节点包括的所有叶子节点之后,可以对目标子轨迹集合与目标中间节点中所包括的叶子节点进行相交检测,进而可以在目标中间节点中所包括的所有叶子节点中确定与目标子轨迹集合相交的第一叶子节点,而后对第一叶子节点和目标子轨迹集合进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。在一些实例中,基于第一叶子节点和目标子轨迹集合进行轨迹查询操作,获得与待处理轨迹相对应的查询结果可以包括:获取与目标子轨迹集合相对应的目标轨迹点;在第一叶子节点中,确定与目标轨迹点相交的第二叶子节点;基于第二叶子节点和目标轨迹点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
在获取到第一叶子节点和目标子轨迹集合之后,可以基于第一叶子节点和目标子轨迹集合进行精确的轨迹查询操作,具体可以获取与目标子轨迹集合相对应的目标轨迹点,即获取与目标子轨迹集合中子轨迹相对应的轨迹实际点。之后,将目标轨迹点与第一叶子节点进行相交检测,以在第一叶子节点中确定与目标轨迹点相交的第二叶子节点,即在索引信息中确定与轨迹实际点相交的第二叶子节点。在获取到第二叶子节点和目标轨迹点之后,可以对第二叶子节点和目标轨迹点进行分析处理,以获得与待处理轨迹相对应的查询结果。在一些实例中,基于第二叶子节点和目标轨迹点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果可以包括:获取与第二叶子节点相对应的至少一个索引数据点;在至少一个索引数据点中,确定与目标轨迹点相对应的目标索引数据点;将目标索引数据点确定为与待处理轨迹相对应的查询结果。
具体的,为了能够实现精确的轨迹查询操作,在获取到第二叶子节点之后,可以确定与第二叶子节点相对应的至少一个索引数据点,即索引信息中第二叶子节点中所包括的索引轨迹实际点,而后将所确定的至少一个索引数据点与目标轨迹点进行分析匹配,以在至少一个索引数据中确定与目标轨迹点相对应的目标索引数据点,进而可以将目标 索引数据点确定为与待处理数据相对应的查询结果,即实现了轨迹查询操作。
本实施例中,通过在中间节点中确定与目标子轨迹集合相交的目标中间节点,获取目标中间节点中所包括的叶子节点,并基于叶子节点和目标子轨迹集合进行轨迹查询操作,获得与待处理轨迹相对应的查询结果,有效地实现了可以通过目标子轨迹集合与中间节点、目标中间节点中所包括的叶子节点进行分析比较,从而可以过滤掉大部分数据,有效地减少了做精确判断的轨迹条数,同时也会降低数据计算开销,提高了数据查询操作的质量和效率。
具体应用时,本应用实施例提供了一种轨迹查询方法,该轨迹查询方法可以实现在轨迹查询过程中,对查询轨迹进行多层次的表示,而后基于多层次的表示和索引信息可以过滤掉大部分数据,从而可以平衡在轨迹查询操作中的计算开销和轨迹判断的精确度;具体的,参考附图6所示,轨迹查询方法可以包括以下步骤:
步骤1:获取待查询轨迹Q和用于对待处理轨迹进行分析处理的索引信息。
其中,索引信息中可以包括轨迹信息、数据点信息、空间范围信息、时间信息等等。
步骤2:对待查询轨迹Q进行多层精细化的划分操作,获得与待查询轨迹Q相对应的至少一个子轨迹集合,其中,子轨迹集合中可以包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同。
其中,在获取到待查询轨迹Q之后,将待查询轨迹Q表示为一个轨迹外包框,并将轨迹外包框切分成两条子轨迹,具体的,两条子轨迹的长度可以相同或者不同,而后可以分别产生与两个子轨迹相对应的更小的轨迹外包框,可以理解的是,两条子轨迹所对应的轨迹外包框的大小可以相同或者不同,此时,划分参数可以为2。而后可以继续将轨迹外包框切分成4条子轨迹、8条子轨迹、16条子轨迹、32条子轨迹...等等,直至切分后的子轨迹的数量大于子轨迹中所包括的线段数,从而可以获得用于实现轨迹查询操作的不同精细度的至少一个子轨迹集合表示。
步骤3:基于待查询轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
具体的,轨迹查询操作可以包括以下步骤:
步骤31:确定待查询轨迹Q所对应的轨迹外包框。
步骤32:将轨迹外包框与索引信息(默认为R树或者四叉树)中的根节点进行对比,如果轨迹外包框与根节点相交,则可以将根节点中所包括的中间节点加入待匹配队列。
步骤33:确定索引信息中的中间节点所包括的多个叶子节点,基于叶子节点在至少一个子轨迹集合中确定用于进行轨迹查询操作的目标子轨迹集合,目标子轨迹集合中子轨迹的轨迹外包框的大小与节点外包框的大小之间的相似度大于或等于预设阈值。
步骤34:获取目标子轨迹集合中包括的多个子轨迹,确定多个子轨迹相对应的多个子轨迹外包框。
步骤35:将多个子轨迹相对应的多个子轨迹外包框与中间节点进行分析匹配,确定与多个子轨迹外包框相交的目标中间节点,而后确定目标中间节点中所包括的多个叶子节点。
具体的,目标中间节点的数量可以为一个或多个,为了能够准确地确定与多个子轨迹外包框相交的目标中间节点,则可以执行以下操作:对于队列中的一个中间节点,中间节点和子轨迹外包框是否相交(即是否和多个子轨迹外包框中的其中一个相交),如果相交,就将这个中间节点中所包括的叶子节点加入队列,从而实现了对一个目标中间节点进行确定。一直循环上述操作,直至确定与多个子轨迹外包框相交的所有目标中间节点为止。
步骤36:对多个子轨迹进行分析处理,确定多个子轨迹各自对应的轨迹实际点。
步骤37:将轨迹实际点与多个叶子节点进行分析匹配,确定与轨迹实际点相交的目标叶子节点。
步骤38:在数据库中,确定与目标叶子节点相对应的多个索引实际点。
步骤39:基于多个索引实际点和轨迹实际点进行分析匹配,获得与待查询轨迹相对应的查询结果。
需要注意的是,依据上述的实现原理,还可以实现其他查询操作,例如:轨迹包含查询操作、轨迹在前查询操作、轨迹在后查询操作等等,只需要将上述实现步骤中的“相交检测”调整为“包含检测”、“在前检测”、“在后检测”,从而有效地提高了该轨迹查询方法的适用范围。
本应用实施例提供的轨迹查询方法,对于一条待查询轨迹,在进行轨迹数据的精确匹配之前,通过对待查询轨迹进行多层次的精细化划分操作,可以获得不同层次的子轨迹集合,而后可以确定与索引信息相适配的一个层次的子轨迹集合,而后将子轨迹集合与索引信息中的根节点、中间节点和叶子节点依次进行分析匹配,从而可以过滤掉大部分数据,减少了做精确判断的轨迹条数,同时也会降低数据计算开销,实现了对计算开销和轨迹查询精确度的有效平衡,进而提高了数据查询的质量和效率。
图7为本申请实施例提供的另一种轨迹查询方法的流程示意图;参考附图7所示,本实施例提供了另一种轨迹查询方法,该方法的执行主体可以为轨迹查询装置,可以理解的是,该轨迹查询装置可以实现为软件、或者软件和硬件的组合。具体的,该轨迹查询方法可以包括:
步骤S701:响应于调用轨迹查询请求,确定轨迹查询服务对应的处理资源。
步骤S702:利用处理资源执行如下步骤:获取待处理轨迹和用于对待处理轨迹进行分析处理的索引信息;对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合,其中,子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同;基于待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作, 获得与待处理轨迹相对应的查询结果。
具体的,本发明提供的轨迹查询方法可以在云端来执行,在云端可以部署有若干计算节点,每个计算节点中都具有计算、存储等处理资源。在云端,可以组织由多个计算节点来提供某种服务,当然,一个计算节点也可以提供一种或多种服务。
针对本发明提供的方案,云端可以提供有用于完成轨迹查询方法的服务,称为轨迹查询服务。当用户需要使用该轨迹查询服务的时候,调用该轨迹查询服务,以向云端触发调用该轨迹查询服务的请求,在该请求中可以携带有待处理轨迹。云端确定响应该请求的计算节点,利用该计算节点中的处理资源执行如下步骤:获取待处理轨迹和用于对待处理轨迹进行分析处理的索引信息;对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合,其中,子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同;基于待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
具体的,本实施例中的上述方法步骤的实现过程、实现原理和实现效果与上述图1-图6所示实施例的方法步骤的实现过程、实现原理和实现效果相类似,本实施例未详细描述的部分,可参考对图1-图6所示实施例的相关说明。
图8为本申请实施例提供的一种轨迹查询装置的结构示意图;参考附图8所示,本实施例提供了一种轨迹查询装置,该轨迹查询装置可以用于执行上述图2所示的轨迹查询方法,具体的,该轨迹查询装置可以包括:第一获取模块11、第一划分模块12和第一处理模块13:
第一获取模块11,用于获取待处理轨迹和用于对待处理轨迹进行分析处理的索引信息。
第一划分模块12,用于对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合,其中,子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同。
第一处理模块13,用于基于待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
在一些实例中,在第一划分模块12对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合时,该第一划分模块12用于执行:获取与待处理轨迹相对应的查询外包框;确定用于对查询外包框进行划分操作的至少一个划分参数;利用至少一个划分参数对查询外包框进行切分操作,直至切分后所获得的子轨迹的数量大于子轨迹中的线段数量,获得与待处理轨迹相对应的至少一个子轨迹集合。
在一些实例中,轨迹查询操作包括以下至少之一:相交查询操作、包含查询操作、在前查询操作、在后查询操作。
在一些实例中,在轨迹查询操作包括相交查询操作时;在第一处理模块13基于待处 理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,获得与待处理轨迹相对应的查询结果时,该第一处理模块13用于执行:确定与待处理轨迹相对应的轨迹外包框;基于索引信息,确定与轨迹外包框相交的根节点;基于至少一个子轨迹集合和根节点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
在一些实例中,在第一处理模块13基于至少一个子轨迹集合和根节点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果时,该第一处理模块13用于执行:获取根节点中包括的中间节点和叶子节点;基于叶子节点,在至少一个子轨迹集合中确定目标子轨迹集合;基于目标子轨迹集合和中间节点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
在一些实例中,在第一处理模块13基于叶子节点,在至少一个子轨迹集合中确定目标子轨迹集合时,该第一处理模块13用于执行:获取叶子节点所对应的节点外包框和至少一个子轨迹集合中子轨迹所对应的轨迹外包框;基于节点外包框和轨迹外包框,在至少一个子轨迹集合中确定目标子轨迹集合,其中,目标子轨迹集合中子轨迹的轨迹外包框的大小与节点外包框的大小之间的相似度大于或等于预设阈值。
在一些实例中,在第一处理模块13基于目标子轨迹集合和中间节点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果时,该第一处理模块13用于执行:在中间节点中,确定与目标子轨迹集合相交的目标中间节点;获取目标中间节点中所包括的叶子节点;基于叶子节点和目标子轨迹集合进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
在一些实例中,在第一处理模块13基于叶子节点和目标子轨迹集合进行轨迹查询操作,获得与待处理轨迹相对应的查询结果时,该第一处理模块13用于执行:在目标中间节点中所包括的叶子节点中,确定与目标子轨迹集合相交的第一叶子节点;基于第一叶子节点和目标子轨迹集合进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
在一些实例中,在第一处理模块13基于第一叶子节点和目标子轨迹集合进行轨迹查询操作,获得与待处理轨迹相对应的查询结果时,该第一处理模块13用于执行:获取与目标子轨迹集合相对应的目标轨迹点;在第一叶子节点中,确定与目标轨迹点相交的第二叶子节点;基于第二叶子节点和目标轨迹点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
在一些实例中,在第一处理模块13基于第二叶子节点和目标轨迹点进行轨迹查询操作,获得与待处理轨迹相对应的查询结果时,该第一处理模块13用于执行:获取与第二叶子节点相对应的至少一个索引数据点;在至少一个索引数据点中,确定与目标轨迹点相对应的目标索引数据点;将目标索引数据点确定为与待处理轨迹相对应的查询结果。
图8所示装置可以执行图1-图6所示实施例的方法,本实施例未详细描述的部分,可参考对图1-图6所示实施例的相关说明。该技术方案的执行过程和技术效果参见图1- 图6所示实施例中的描述,在此不再赘述。
在一个可能的设计中,图8所示轨迹查询装置的结构可实现为一电子设备,该电子设备可以是手机、平板电脑、服务器等各种设备。如图9所示,该电子设备可以包括:第一处理器21和第一存储器22。其中,第一存储器22用于存储相对应电子设备执行上述图1-图6所示实施例中提供的轨迹查询方法的程序,第一处理器21被配置为用于执行第一存储器22中存储的程序。
程序包括一条或多条计算机指令,其中,一条或多条计算机指令被第一处理器21执行时能够实现如下步骤:
获取待处理轨迹和用于对待处理轨迹进行分析处理的索引信息;
对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合,其中,子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同;
基于待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
进一步的,第一处理器21还用于执行前述图1-图6所示实施例中的全部或部分步骤。
其中,电子设备的结构中还可以包括第一通信接口23,用于电子设备与其他设备或通信网络通信。
另外,本发明实施例提供了一种计算机存储介质,用于储存电子设备所用的计算机软件指令,其包含用于执行上述图1-图6所示方法实施例中轨迹查询方法所涉及的程序。
此外,本发明实施例提供了一种计算机程序产品,包括:存储有计算机指令的计算机可读存储介质,当所述计算机指令被一个或多个处理器执行时,致使所述一个或多个处理器执行上述图1-图6所示方法实施例中轨迹查询方法中的步骤。
图10为本申请实施例提供的另一种轨迹查询装置的结构示意图;参考附图10所示,本实施例提供了另一种轨迹查询装置,该轨迹查询装置可以执行上述图7所示的轨迹查询方法,该轨迹查询装置可以包括:第二确定模块31和第二处理模块32:
第二确定模块31,用于响应于调用轨迹查询请求,确定轨迹查询服务对应的处理资源;
第二处理模块32,用于利用处理资源执行如下步骤:获取待处理轨迹和用于对待处理轨迹进行分析处理的索引信息;对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合,其中,子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同;基于待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
图10所示装置可以执行图6-图7所示实施例的方法,本实施例未详细描述的部分,可参考对图6-图7所示实施例的相关说明。该技术方案的执行过程和技术效果参见图6-图7所示实施例中的描述,在此不再赘述。
在一个可能的设计中,图10所示轨迹查询装置的结构可实现为一电子设备,该电子设备可以是手机、平板电脑、服务器等各种设备。如图11所示,该电子设备可以包括:第二处理器41和第二存储器42。其中,第二存储器42用于存储相对应电子设备执行上述图6-图7所示实施例中提供的轨迹查询方法的程序,第二处理器41被配置为用于执行第二存储器42中存储的程序。
程序包括一条或多条计算机指令,其中,一条或多条计算机指令被第二处理器41执行时能够实现如下步骤:
响应于调用轨迹查询请求,确定轨迹查询服务对应的处理资源;
利用处理资源执行如下步骤:获取待处理轨迹和用于对待处理轨迹进行分析处理的索引信息;对待处理轨迹进行划分操作,获得与待处理轨迹相对应的至少一个子轨迹集合,其中,子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同;基于待处理轨迹、至少一个子轨迹集合和索引信息进行轨迹查询操作,获得与待处理轨迹相对应的查询结果。
进一步的,第二处理器41还用于执行前述图6-图7所示实施例中的全部或部分步骤。
其中,电子设备的结构中还可以包括第二通信接口43,用于电子设备与其他设备或通信网络通信。
另外,本发明实施例提供了一种计算机存储介质,用于储存电子设备所用的计算机软件指令,其包含用于执行上述图6-图7所示方法实施例中轨迹检查方法所涉及的程序。
此外,本发明实施例提供了一种计算机程序产品,包括:存储有计算机指令的计算机可读存储介质,当所述计算机指令被一个或多个处理器执行时,致使所述一个或多个处理器执行上述图6-图7所示方法实施例中轨迹查询方法中的步骤。
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助加必需的通用硬件平台的方式来实现,当然也可以通过硬件和软件结合的方式来实现。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以计算机产品的形式体现出来,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程 图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程设备的处理器以产生一个机器,使得通过计算机或其他可编程设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (14)

  1. 一种轨迹查询方法,包括:
    获取待处理轨迹和用于对所述待处理轨迹进行分析处理的索引信息;
    对所述待处理轨迹进行划分操作,获得与所述待处理轨迹相对应的至少一个子轨迹集合,其中,所述子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同;
    基于所述待处理轨迹、至少一个子轨迹集合和所述索引信息进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果。
  2. 根据权利要求1所述的方法,对所述待处理轨迹进行划分操作,获得与所述待处理轨迹相对应的至少一个子轨迹集合,包括:
    获取与所述待处理轨迹相对应的查询外包框;
    确定用于对所述查询外包框进行划分操作的至少一个划分参数;
    利用所述至少一个划分参数对所述查询外包框进行切分操作,直至切分后所获得的子轨迹的数量大于所述子轨迹中的线段数量,获得与所述待处理轨迹相对应的至少一个子轨迹集合。
  3. 根据权利要求1所述的方法,所述轨迹查询操作包括以下至少之一:相交查询操作、包含查询操作、在前查询操作、在后查询操作。
  4. 根据权利要求3所述的方法,在所述轨迹查询操作包括相交查询操作时;基于所述待处理轨迹、至少一个子轨迹集合和所述索引信息进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果,包括:
    确定与所述待处理轨迹相对应的轨迹外包框;
    基于所述索引信息,确定与所述轨迹外包框相交的根节点;
    基于所述至少一个子轨迹集合和所述根节点进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果。
  5. 根据权利要求4所述的方法,基于所述至少一个子轨迹集合和所述根节点进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果,包括:
    获取所述根节点中包括的中间节点和叶子节点;
    基于所述叶子节点,在所述至少一个子轨迹集合中确定目标子轨迹集合;
    基于所述目标子轨迹集合和所述中间节点进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果。
  6. 根据权利要求5所述的方法,基于所述叶子节点,在所述至少一个子轨迹集合中确定目标子轨迹集合,包括:
    获取所述叶子节点所对应的节点外包框和所述至少一个子轨迹集合中子轨迹所对应的轨迹外包框;
    基于所述节点外包框和轨迹外包框,在所述至少一个子轨迹集合中确定目标子轨迹 集合,其中,所述目标子轨迹集合中子轨迹的轨迹外包框的大小与所述节点外包框的大小之间的相似度大于或等于预设阈值。
  7. 根据权利要求5所述的方法,基于所述目标子轨迹集合和所述中间节点进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果,包括:
    在所述中间节点中,确定与所述目标子轨迹集合相交的目标中间节点;
    获取所述目标中间节点中所包括的叶子节点;
    基于所述叶子节点和所述目标子轨迹集合进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果。
  8. 根据权利要求7所述的方法,基于所述叶子节点和所述目标子轨迹集合进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果,包括:
    在所述目标中间节点中所包括的叶子节点中,确定与所述目标子轨迹集合相交的第一叶子节点;
    基于所述第一叶子节点和所述目标子轨迹集合进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果。
  9. 根据权利要求8所述的方法,基于所述第一叶子节点和所述目标子轨迹集合进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果,包括:
    获取与所述目标子轨迹集合相对应的目标轨迹点;
    在所述第一叶子节点中,确定与所述目标轨迹点相交的第二叶子节点;
    基于所述第二叶子节点和所述目标轨迹点进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果。
  10. 根据权利要求9所述的方法,基于所述第二叶子节点和所述目标轨迹点进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果,包括:
    获取与所述第二叶子节点相对应的至少一个索引数据点;
    在所述至少一个索引数据点中,确定与所述目标轨迹点相对应的目标索引数据点;
    将所述目标索引数据点确定为与所述待处理轨迹相对应的查询结果。
  11. 一种轨迹查询方法,包括:
    响应于调用轨迹查询请求,确定轨迹查询服务对应的处理资源;
    利用所述处理资源执行如下步骤:获取待处理轨迹和用于对所述待处理轨迹进行分析处理的索引信息;对所述待处理轨迹进行划分操作,获得与所述待处理轨迹相对应的至少一个子轨迹集合,其中,所述子轨迹集合中包括多个子轨迹,且任意两个子轨迹集合各自对应的划分参数不同;基于所述待处理轨迹、至少一个子轨迹集合和所述索引信息进行轨迹查询操作,获得与所述待处理轨迹相对应的查询结果。
  12. 一种电子设备,包括:存储器、处理器;其中,所述存储器用于存储一条或多条计算机指令,其中,所述一条或多条计算机指令被所述处理器执行时实现如权利要求1-10中任意一项所述的轨迹查询方法。
  13. 一种计算机存储介质,用于储存计算机程序,所述计算机程序使计算机执行时实现如权利要求1-10中任意一项所述的轨迹查询方法。
  14. 一种计算机程序产品,包括:存储有计算机指令的计算机可读存储介质,当所述计算机指令被一个或多个处理器执行时,致使所述一个或多个处理器执行权利要求1-10中任意一项所述的轨迹查询方法中的步骤。
PCT/CN2022/106840 2021-07-28 2022-07-20 轨迹查询方法、设备、存储介质及计算机程序产品 WO2023005771A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110858897.1A CN113312361B (zh) 2021-07-28 2021-07-28 轨迹查询方法、装置、设备、存储介质及计算机程序产品
CN202110858897.1 2021-07-28

Publications (1)

Publication Number Publication Date
WO2023005771A1 true WO2023005771A1 (zh) 2023-02-02

Family

ID=77381776

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/106840 WO2023005771A1 (zh) 2021-07-28 2022-07-20 轨迹查询方法、设备、存储介质及计算机程序产品

Country Status (2)

Country Link
CN (1) CN113312361B (zh)
WO (1) WO2023005771A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116631055A (zh) * 2023-04-28 2023-08-22 广东科技学院 运动轨迹处理方法、装置、设备及存储介质
CN117596551A (zh) * 2024-01-19 2024-02-23 浙江大学建筑设计研究院有限公司 一种基于手机信令数据的绿道网用户行为还原方法及装置

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113312361B (zh) * 2021-07-28 2022-01-25 阿里云计算有限公司 轨迹查询方法、装置、设备、存储介质及计算机程序产品
CN113742548B (zh) * 2021-11-02 2022-04-15 阿里云计算有限公司 轨迹查询方法以及装置
CN114705214B (zh) * 2022-04-15 2023-05-23 北京龙驹易行科技有限公司 一种里程轨迹计算方法、装置、存储介质及电子设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844409A (zh) * 2016-06-16 2017-06-13 南京航空航天大学 快速连续历史轨迹距离查询技术
CN107291842A (zh) * 2017-06-01 2017-10-24 武汉理工大学 基于轨迹编码的轨迹查询方法
CN110095127A (zh) * 2019-04-08 2019-08-06 西北大学 一种基于分段的隐马尔可夫模型地图匹配方法
CN111475596A (zh) * 2020-04-05 2020-07-31 中国人民解放军国防科技大学 一种基于多层级轨迹编码树的子段相似性匹配方法
US20210165410A1 (en) * 2019-12-03 2021-06-03 International Business Machines Corporation Trajectory similarity search
CN113051359A (zh) * 2021-03-30 2021-06-29 大连理工大学 一种基于多级索引结构的大规模轨迹数据相似性查询方法
CN113312361A (zh) * 2021-07-28 2021-08-27 阿里云计算有限公司 轨迹查询方法、装置、设备、存储介质及计算机程序产品

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9251277B2 (en) * 2012-12-07 2016-02-02 International Business Machines Corporation Mining trajectory for spatial temporal analytics
CN107220285B (zh) * 2017-04-24 2020-01-21 中国科学院计算技术研究所 面向海量轨迹点数据的时空索引构建方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844409A (zh) * 2016-06-16 2017-06-13 南京航空航天大学 快速连续历史轨迹距离查询技术
CN107291842A (zh) * 2017-06-01 2017-10-24 武汉理工大学 基于轨迹编码的轨迹查询方法
CN110095127A (zh) * 2019-04-08 2019-08-06 西北大学 一种基于分段的隐马尔可夫模型地图匹配方法
US20210165410A1 (en) * 2019-12-03 2021-06-03 International Business Machines Corporation Trajectory similarity search
CN111475596A (zh) * 2020-04-05 2020-07-31 中国人民解放军国防科技大学 一种基于多层级轨迹编码树的子段相似性匹配方法
CN113051359A (zh) * 2021-03-30 2021-06-29 大连理工大学 一种基于多级索引结构的大规模轨迹数据相似性查询方法
CN113312361A (zh) * 2021-07-28 2021-08-27 阿里云计算有限公司 轨迹查询方法、装置、设备、存储介质及计算机程序产品

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LI RUIYUAN: "Distributed Management and Analytics Over Large-Scale Trajectory Data", CHINESE DOCTORAL DISSERTATIONS FULL-TEXT DATABASE, UNIVERSITY OF CHINESE ACADEMY OF SCIENCES, CN, 15 May 2021 (2021-05-15), CN , XP093028904, ISSN: 1674-022X *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116631055A (zh) * 2023-04-28 2023-08-22 广东科技学院 运动轨迹处理方法、装置、设备及存储介质
CN117596551A (zh) * 2024-01-19 2024-02-23 浙江大学建筑设计研究院有限公司 一种基于手机信令数据的绿道网用户行为还原方法及装置
CN117596551B (zh) * 2024-01-19 2024-04-09 浙江大学建筑设计研究院有限公司 一种基于手机信令数据的绿道网用户行为还原方法及装置

Also Published As

Publication number Publication date
CN113312361A (zh) 2021-08-27
CN113312361B (zh) 2022-01-25

Similar Documents

Publication Publication Date Title
WO2023005771A1 (zh) 轨迹查询方法、设备、存储介质及计算机程序产品
Park et al. Parallel computation of skyline and reverse skyline queries using mapreduce
US8868573B2 (en) Computing and applying order statistics for data preparation
US11366809B2 (en) Dynamic creation and configuration of partitioned index through analytics based on existing data population
US8965895B2 (en) Relationship discovery in business analytics
WO2017028696A1 (zh) 分布式存储系统的负载监控方法及设备
WO2016177280A1 (zh) 记录及还原网页中点击位置的方法和装置
US20190370599A1 (en) Bounded Error Matching for Large Scale Numeric Datasets
CN106648839B (zh) 数据处理的方法和装置
US20240078255A1 (en) Method and apparatus for determining spatial two-tuple, computer device, and storage medium
CN112905596B (zh) 数据处理的方法、装置、计算机设备以及存储介质
US20170053408A1 (en) Determining localization from images of a vicinity
US20170344454A1 (en) Determining dynamic statistics based on key value patterns
WO2016127858A1 (zh) 网页入侵脚本特征的识别方法及设备
CN115374109B (zh) 数据访问方法、装置、计算设备和系统
CN110737794A (zh) 图像查询方法、系统、服务器及存储介质
CN107408127B (zh) 用于索引队列的动态阈值门
CN113590623A (zh) 一种用于数据深分页查询的方法、装置及设备
US10503731B2 (en) Efficient analysis of distinct aggregations
CN113312360B (zh) 索引建立方法、装置、设备、存储介质及计算机程序产品
US20240045878A1 (en) Building and using a sparse time series database (tsdb)
CN110928738B (zh) 性能分析方法、装置和设备
US10339049B2 (en) Garbage collection facility grouping infrequently accessed data units in designated transient memory area
US11093542B2 (en) Multimedia object search
CN107516101B (zh) 一种边界数据划分方法与设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22848376

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE